Changeset 38794 in vbox for trunk/src/VBox
- Timestamp:
- Sep 19, 2011 2:26:22 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.cpp
r38793 r38794 127 127 DWORD *pdwExitCode) 128 128 { 129 STARTUPINFO si;129 STARTUPINFOW si; 130 130 PROCESS_INFORMATION pi; 131 131 DWORD rc = ERROR_SUCCESS; … … 144 144 145 145 SetLastError(0); 146 if (!CreateProcess (pwszAppName, /* Module name. */147 pwszCmdLine, /* Command line. */148 NULL, /* Process handle not inheritable. */149 NULL, /* Thread handle not inheritable. */150 FALSE, /* Set handle inheritance to FALSE .*/151 0, /* No creation flags. */152 NULL, /* Use parent's environment block. */153 pwszWorkDir, /* Use parent's starting directory. */154 &si, /* Pointer to STARTUPINFO structure. */155 &pi)) /* Pointer to PROCESS_INFORMATION structure. */146 if (!CreateProcessW(pwszAppName, /* Module name. */ 147 pwszCmdLine, /* Command line. */ 148 NULL, /* Process handle not inheritable. */ 149 NULL, /* Thread handle not inheritable. */ 150 FALSE, /* Set handle inheritance to FALSE .*/ 151 0, /* No creation flags. */ 152 NULL, /* Use parent's environment block. */ 153 pwszWorkDir, /* Use parent's starting directory. */ 154 &si, /* Pointer to STARTUPINFO structure. */ 155 &pi)) /* Pointer to PROCESS_INFORMATION structure. */ 156 156 { 157 157 rc = GetLastError(); … … 189 189 HKEY hkPythonCore = NULL; 190 190 BOOL bFound = FALSE; 191 LONG rc = RegOpenKeyEx (HKEY_LOCAL_MACHINE, L"SOFTWARE\\Python\\PythonCore", 0, KEY_READ, &hkPythonCore);191 LONG rc = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Python\\PythonCore", 0, KEY_READ, &hkPythonCore); 192 192 if (rc != ERROR_SUCCESS) 193 193 { … … 205 205 DWORD dwKeyType = REG_SZ; 206 206 207 rc = RegEnumKeyEx (hkPythonCore, i, wszRoot, &dwLen, NULL, NULL, NULL, NULL);207 rc = RegEnumKeyExW(hkPythonCore, i, wszRoot, &dwLen, NULL, NULL, NULL, NULL); 208 208 if (rc != ERROR_SUCCESS || dwLen <= 0) 209 209 break; … … 213 213 214 214 HKEY hkPythonInstPath = NULL; 215 rc = RegOpenKeyEx (hkPythonCore, wszPath, 0, KEY_READ, &hkPythonInstPath);215 rc = RegOpenKeyExW(hkPythonCore, wszPath, 0, KEY_READ, &hkPythonInstPath); 216 216 if (rc != ERROR_SUCCESS) 217 217 continue; 218 218 219 rc = RegQueryValueEx (hkPythonInstPath, L"", NULL, &dwKeyType, (LPBYTE)wszVal, &dwLen);219 rc = RegQueryValueExW(hkPythonInstPath, L"", NULL, &dwKeyType, (LPBYTE)wszVal, &dwLen); 220 220 if (rc == ERROR_SUCCESS) 221 221 logStringW(hModule, L"InstallPythonAPI: Path \"%s\" detected.", wszVal); … … 303 303 LONG rc; 304 304 WCHAR wszValue[_MAX_PATH]; 305 if (GetPrivateProfileString (pwszSection, pwszValue, NULL,306 wszValue, sizeof(wszValue), pwszFileName) > 0)305 if (GetPrivateProfileStringW(pwszSection, pwszValue, NULL, 306 wszValue, sizeof(wszValue), pwszFileName) > 0) 307 307 { 308 308 HKEY hkBranding; … … 314 314 swprintf_s(wszKey, RT_ELEMENTS(wszKey), L"SOFTWARE\\%s\\VirtualBox\\Branding", VBOX_VENDOR_SHORT); 315 315 316 rc = RegOpenKeyEx (HKEY_LOCAL_MACHINE, wszKey, 0, KEY_WRITE, &hkBranding);316 rc = RegOpenKeyExW(HKEY_LOCAL_MACHINE, wszKey, 0, KEY_WRITE, &hkBranding); 317 317 if (rc == ERROR_SUCCESS) 318 318 { … … 342 342 swprintf_s(wszSource, RT_ELEMENTS(wszSource), L"%s%c", pwszSourceDir, '\0'); 343 343 344 SHFILEOPSTRUCT s = {0};344 SHFILEOPSTRUCTW s = {0}; 345 345 s.hwnd = NULL; 346 346 s.wFunc = FO_COPY; … … 353 353 354 354 logStringW(hModule, L"CopyDir: DestDir=%s, SourceDir=%s", wszDest, wszSource); 355 int r = SHFileOperation (&s);355 int r = SHFileOperationW(&s); 356 356 if (r != 0) 357 357 { … … 539 539 { 540 540 logStringW(hModule, L"Reboot required, setting REBOOT property to Force"); 541 HRESULT hr2 = MsiSetProperty (hModule, L"REBOOT", L"Force");541 HRESULT hr2 = MsiSetPropertyW(hModule, L"REBOOT", L"Force"); 542 542 if (hr2 != ERROR_SUCCESS) 543 543 logStringW(hModule, L"Failed to set REBOOT property, error = 0x%x", hr2); … … 979 979 980 980 DWORD dwLen = sizeof(wszEnumName); 981 lStatus = RegEnumKeyEx (hNetcard, i, wszEnumName, &dwLen, NULL, NULL, NULL, NULL);981 lStatus = RegEnumKeyExW(hNetcard, i, wszEnumName, &dwLen, NULL, NULL, NULL, NULL); 982 982 if (lStatus != ERROR_SUCCESS) 983 983 break; 984 984 985 lStatus = RegOpenKeyEx (hNetcard, wszEnumName, 0, KEY_READ, &hNetCardGUID);985 lStatus = RegOpenKeyExW(hNetcard, wszEnumName, 0, KEY_READ, &hNetCardGUID); 986 986 if (lStatus == ERROR_SUCCESS) 987 987 { … … 1170 1170 /* get the device instance ID */ 1171 1171 WCHAR wszDevID[MAX_DEVICE_ID_LEN]; 1172 if (CM_Get_Device_ID (DeviceInfoData.DevInst,1173 wszDevID, MAX_DEVICE_ID_LEN, 0) == CR_SUCCESS)1172 if (CM_Get_Device_IDW(DeviceInfoData.DevInst, 1173 wszDevID, MAX_DEVICE_ID_LEN, 0) == CR_SUCCESS) 1174 1174 { 1175 1175 /* compare to what we determined before */
Note:
See TracChangeset
for help on using the changeset viewer.