powrprof: 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:
Eric Pouech 2022-02-17 07:10:49 +01:00 committed by Alexandre Julliard
parent 7ad38e3b80
commit 790b094066
2 changed files with 9 additions and 10 deletions

View File

@ -1,4 +1,3 @@
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = powrprof.dll MODULE = powrprof.dll
IMPORTLIB = powrprof IMPORTLIB = powrprof
IMPORTS = advapi32 IMPORTS = advapi32

View File

@ -68,7 +68,7 @@ BOOLEAN WINAPI CanUserWritePwrScheme(VOID)
r = RegOpenKeyExW(HKEY_LOCAL_MACHINE, szPowerCfgSubKey, 0, KEY_READ | KEY_WRITE, &hKey); r = RegOpenKeyExW(HKEY_LOCAL_MACHINE, szPowerCfgSubKey, 0, KEY_READ | KEY_WRITE, &hKey);
if (r != ERROR_SUCCESS) { if (r != ERROR_SUCCESS) {
TRACE("RegOpenKeyEx failed: %d\n", r); TRACE("RegOpenKeyEx failed: %ld\n", r);
bSuccess = FALSE; bSuccess = FALSE;
} }
@ -89,7 +89,7 @@ BOOLEAN WINAPI EnumPwrSchemes(PWRSCHEMESENUMPROC lpfnPwrSchemesEnumProc,
LPARAM lParam) LPARAM lParam)
{ {
/* FIXME: See note #1 */ /* FIXME: See note #1 */
FIXME("(%p, %ld) stub!\n", lpfnPwrSchemesEnumProc, lParam); FIXME("(%p, %Id) stub!\n", lpfnPwrSchemesEnumProc, lParam);
SetLastError(ERROR_FILE_NOT_FOUND); SetLastError(ERROR_FILE_NOT_FOUND);
return FALSE; return FALSE;
} }
@ -151,7 +151,7 @@ BOOLEAN WINAPI GetPwrDiskSpindownRange(PUINT RangeMax, PUINT RangeMin)
r = RegOpenKeyExW(HKEY_LOCAL_MACHINE, szPowerCfgSubKey, 0, KEY_READ, &hKey); r = RegOpenKeyExW(HKEY_LOCAL_MACHINE, szPowerCfgSubKey, 0, KEY_READ, &hKey);
if (r != ERROR_SUCCESS) { if (r != ERROR_SUCCESS) {
TRACE("RegOpenKeyEx failed: %d\n", r); TRACE("RegOpenKeyEx failed: %ld\n", r);
TRACE("Using defaults: 3600, 3\n"); TRACE("Using defaults: 3600, 3\n");
*RangeMax = 3600; *RangeMax = 3600;
*RangeMin = 3; *RangeMin = 3;
@ -161,7 +161,7 @@ BOOLEAN WINAPI GetPwrDiskSpindownRange(PUINT RangeMax, PUINT RangeMin)
r = RegQueryValueExW(hKey, L"DiskSpindownMax", 0, 0, lpValue, &cbValue); r = RegQueryValueExW(hKey, L"DiskSpindownMax", 0, 0, lpValue, &cbValue);
if (r != ERROR_SUCCESS) { if (r != ERROR_SUCCESS) {
TRACE("Couldn't open DiskSpinDownMax: %d\n", r); TRACE("Couldn't open DiskSpinDownMax: %ld\n", r);
TRACE("Using default: 3600\n"); TRACE("Using default: 3600\n");
*RangeMax = 3600; *RangeMax = 3600;
} else { } else {
@ -172,7 +172,7 @@ BOOLEAN WINAPI GetPwrDiskSpindownRange(PUINT RangeMax, PUINT RangeMin)
r = RegQueryValueExW(hKey, L"DiskSpindownMin", 0, 0, lpValue, &cbValue); r = RegQueryValueExW(hKey, L"DiskSpindownMin", 0, 0, lpValue, &cbValue);
if (r != ERROR_SUCCESS) { if (r != ERROR_SUCCESS) {
TRACE("Couldn't open DiskSpinDownMin: %d\n", r); TRACE("Couldn't open DiskSpinDownMin: %ld\n", r);
TRACE("Using default: 3\n"); TRACE("Using default: 3\n");
*RangeMin = 3; *RangeMin = 3;
} else { } else {
@ -318,21 +318,21 @@ POWER_PLATFORM_ROLE WINAPI PowerDeterminePlatformRole(void)
POWER_PLATFORM_ROLE WINAPI PowerDeterminePlatformRoleEx(ULONG version) POWER_PLATFORM_ROLE WINAPI PowerDeterminePlatformRoleEx(ULONG version)
{ {
FIXME("%u stub.\n", version); FIXME("%lu stub.\n", version);
return PlatformRoleDesktop; return PlatformRoleDesktop;
} }
DWORD WINAPI PowerEnumerate(HKEY key, const GUID *scheme, const GUID *subgroup, POWER_DATA_ACCESSOR flags, DWORD WINAPI PowerEnumerate(HKEY key, const GUID *scheme, const GUID *subgroup, POWER_DATA_ACCESSOR flags,
ULONG index, UCHAR *buffer, DWORD *buffer_size) ULONG index, UCHAR *buffer, DWORD *buffer_size)
{ {
FIXME("(%p,%s,%s,%d,%d,%p,%p) stub!\n", key, debugstr_guid(scheme), debugstr_guid(subgroup), FIXME("(%p,%s,%s,%d,%ld,%p,%p) stub!\n", key, debugstr_guid(scheme), debugstr_guid(subgroup),
flags, index, buffer, buffer_size); flags, index, buffer, buffer_size);
return ERROR_CALL_NOT_IMPLEMENTED; return ERROR_CALL_NOT_IMPLEMENTED;
} }
DWORD WINAPI PowerRegisterSuspendResumeNotification(DWORD flags, HANDLE recipient, PHPOWERNOTIFY handle) DWORD WINAPI PowerRegisterSuspendResumeNotification(DWORD flags, HANDLE recipient, PHPOWERNOTIFY handle)
{ {
FIXME("(0x%08x,%p,%p) stub!\n", flags, recipient, handle); FIXME("(0x%08lx,%p,%p) stub!\n", flags, recipient, handle);
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
@ -362,7 +362,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
PPRegSemaphore = CreateSemaphoreW(NULL, 1, 1, L"PowerProfileRegistrySemaphore"); PPRegSemaphore = CreateSemaphoreW(NULL, 1, 1, L"PowerProfileRegistrySemaphore");
if (PPRegSemaphore == NULL) { if (PPRegSemaphore == NULL) {
ERR("Couldn't create Semaphore: %d\n", GetLastError()); ERR("Couldn't create Semaphore: %ld\n", GetLastError());
return FALSE; return FALSE;
} }
break; break;