Changeset 40993 in vbox for trunk/src/VBox/HostDrivers/win
- Timestamp:
- Apr 19, 2012 2:25:38 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/win/cfg/VBoxDrvCfg.cpp
r38731 r40993 24 24 #include <malloc.h> 25 25 #include <stdio.h> 26 27 #include <Newdev.h> 26 28 27 29 static PFNVBOXDRVCFG_LOG g_pfnVBoxDrvCfgLog; … … 811 813 return hr; 812 814 } 815 816 817 HRESULT VBoxDrvCfgDrvUpdate(LPCWSTR pcszwHwId, LPCWSTR pcsxwInf, BOOL *pbRebootRequired) 818 { 819 if (pbRebootRequired) 820 *pbRebootRequired = FALSE; 821 BOOL bRebootRequired = FALSE; 822 WCHAR InfFullPath[MAX_PATH]; 823 DWORD dwChars = GetFullPathNameW(pcsxwInf, 824 sizeof (InfFullPath) / sizeof (InfFullPath[0]), 825 InfFullPath, 826 NULL /* LPTSTR *lpFilePart */ 827 ); 828 if (!dwChars || dwChars >= MAX_PATH) 829 { 830 NonStandardLogCrap(("GetFullPathNameW failed, WinEr(%d), dwChars(%d)\n", GetLastError(), dwChars)); 831 return E_INVALIDARG; 832 } 833 834 835 if (!UpdateDriverForPlugAndPlayDevicesW(NULL, /* HWND hwndParent */ 836 pcszwHwId, 837 InfFullPath, 838 INSTALLFLAG_FORCE, 839 &bRebootRequired)) 840 { 841 NonStandardLogCrap(("UpdateDriverForPlugAndPlayDevicesW failed, WinEr(%d)\n", GetLastError(), dwChars)); 842 return E_FAIL; 843 } 844 845 846 if (bRebootRequired) 847 NonStandardLogCrap(("!!Driver Update: REBOOT REQUIRED!!\n", GetLastError(), dwChars)); 848 849 if (pbRebootRequired) 850 *pbRebootRequired = bRebootRequired; 851 852 return S_OK; 853 }
Note:
See TracChangeset
for help on using the changeset viewer.