mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-04 17:04:07 +00:00
msiexec: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
34b1c21d15
commit
081bd13f11
|
@ -1,4 +1,3 @@
|
||||||
EXTRADEFS = -DWINE_NO_LONG_TYPES
|
|
||||||
MODULE = msiexec.exe
|
MODULE = msiexec.exe
|
||||||
IMPORTS = msi ole32 advapi32 user32 comctl32
|
IMPORTS = msi ole32 advapi32 user32 comctl32
|
||||||
|
|
||||||
|
|
|
@ -61,13 +61,13 @@ static void ShowUsage(int ExitCode)
|
||||||
*filename = 0;
|
*filename = 0;
|
||||||
res = GetModuleFileNameW(hmsi, filename, ARRAY_SIZE(filename));
|
res = GetModuleFileNameW(hmsi, filename, ARRAY_SIZE(filename));
|
||||||
if (!res)
|
if (!res)
|
||||||
WINE_ERR("GetModuleFileName failed: %d\n", GetLastError());
|
WINE_ERR("GetModuleFileName failed: %ld\n", GetLastError());
|
||||||
|
|
||||||
len = ARRAY_SIZE(msiexec_version);
|
len = ARRAY_SIZE(msiexec_version);
|
||||||
*msiexec_version = 0;
|
*msiexec_version = 0;
|
||||||
res = MsiGetFileVersionW(filename, msiexec_version, &len, NULL, NULL);
|
res = MsiGetFileVersionW(filename, msiexec_version, &len, NULL, NULL);
|
||||||
if (res)
|
if (res)
|
||||||
WINE_ERR("MsiGetFileVersion failed with %d\n", res);
|
WINE_ERR("MsiGetFileVersion failed with %ld\n", res);
|
||||||
|
|
||||||
/* Return the length of the resource.
|
/* Return the length of the resource.
|
||||||
No typo: The LPWSTR parameter must be a LPWSTR * for this mode */
|
No typo: The LPWSTR parameter must be a LPWSTR * for this mode */
|
||||||
|
@ -413,7 +413,7 @@ static int custom_action_server(const WCHAR *arg)
|
||||||
pipe = CreateFileW(buffer, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
|
pipe = CreateFileW(buffer, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
|
||||||
if (pipe == INVALID_HANDLE_VALUE)
|
if (pipe == INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
ERR("Failed to create custom action server pipe: %u\n", GetLastError());
|
ERR("Failed to create custom action server pipe: %lu\n", GetLastError());
|
||||||
return GetLastError();
|
return GetLastError();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -438,12 +438,12 @@ static int custom_action_server(const WCHAR *arg)
|
||||||
thread64 = (DWORD_PTR)thread;
|
thread64 = (DWORD_PTR)thread;
|
||||||
if (!WriteFile(pipe, &thread64, sizeof(thread64), &size, NULL) || size != sizeof(thread64))
|
if (!WriteFile(pipe, &thread64, sizeof(thread64), &size, NULL) || size != sizeof(thread64))
|
||||||
{
|
{
|
||||||
ERR("Failed to write to custom action server pipe: %u\n", GetLastError());
|
ERR("Failed to write to custom action server pipe: %lu\n", GetLastError());
|
||||||
CoUninitialize();
|
CoUninitialize();
|
||||||
return GetLastError();
|
return GetLastError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ERR("Failed to read from custom action server pipe: %u\n", GetLastError());
|
ERR("Failed to read from custom action server pipe: %lu\n", GetLastError());
|
||||||
CoUninitialize();
|
CoUninitialize();
|
||||||
return GetLastError();
|
return GetLastError();
|
||||||
}
|
}
|
||||||
|
@ -948,7 +948,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
||||||
LogFileName = argvW[i];
|
LogFileName = argvW[i];
|
||||||
if(MsiEnableLogW(LogMode, LogFileName, LogAttributes) != ERROR_SUCCESS)
|
if(MsiEnableLogW(LogMode, LogFileName, LogAttributes) != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Logging in %s (0x%08x, %u) failed\n",
|
fprintf(stderr, "Logging in %s (0x%08lx, %lu) failed\n",
|
||||||
wine_dbgstr_w(LogFileName), LogMode, LogAttributes);
|
wine_dbgstr_w(LogFileName), LogMode, LogAttributes);
|
||||||
ExitProcess(1);
|
ExitProcess(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,7 @@ static BOOL UpdateSCMStatus(DWORD dwCurrentState, DWORD dwWin32ExitCode,
|
||||||
|
|
||||||
static void WINAPI ServiceCtrlHandler(DWORD code)
|
static void WINAPI ServiceCtrlHandler(DWORD code)
|
||||||
{
|
{
|
||||||
WINE_TRACE("%d\n", code);
|
WINE_TRACE("%ld\n", code);
|
||||||
|
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
|
@ -93,7 +93,7 @@ static void WINAPI ServiceCtrlHandler(DWORD code)
|
||||||
KillService();
|
KillService();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fprintf(stderr, "Unhandled service control code: %d\n", code);
|
fprintf(stderr, "Unhandled service control code: %ld\n", code);
|
||||||
UpdateSCMStatus(SERVICE_RUNNING, NO_ERROR, 0);
|
UpdateSCMStatus(SERVICE_RUNNING, NO_ERROR, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue