From: Amine Khaldi Date: Thu, 29 Aug 2013 20:37:02 +0000 (+0000) Subject: [KERNEL32] X-Git-Tag: ReactOS-0.3.16~1621 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=76ac8a4d9df3290cdc23ac0e8ff3f8ec02be1dc1 [KERNEL32] * Fix several print specifiers. svn path=/trunk/; revision=59881 --- diff --git a/reactos/dll/win32/kernel32/client/console/console.c b/reactos/dll/win32/kernel32/client/console/console.c index 8e76da6abe6..302a5ce1435 100644 --- a/reactos/dll/win32/kernel32/client/console/console.c +++ b/reactos/dll/win32/kernel32/client/console/console.c @@ -351,7 +351,7 @@ GetConsoleFontInfo(HANDLE hConsoleOutput, DWORD nFontCount, PCONSOLE_FONT_INFO lpConsoleFontInfo) { - DPRINT1("GetConsoleFontInfo(0x%x, %d, %d, 0x%x) UNIMPLEMENTED!\n", hConsoleOutput, bMaximumWindow, nFontCount, lpConsoleFontInfo); + DPRINT1("GetConsoleFontInfo(0x%p, %d, %lu, 0x%p) UNIMPLEMENTED!\n", hConsoleOutput, bMaximumWindow, nFontCount, lpConsoleFontInfo); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return 0; } @@ -366,7 +366,7 @@ GetConsoleFontSize(HANDLE hConsoleOutput, DWORD nFont) { COORD Empty = {0, 0}; - DPRINT1("GetConsoleFontSize(0x%x, 0x%x) UNIMPLEMENTED!\n", hConsoleOutput, nFont); + DPRINT1("GetConsoleFontSize(0x%p, 0x%x) UNIMPLEMENTED!\n", hConsoleOutput, nFont); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return Empty; } @@ -385,7 +385,7 @@ GetConsoleHardwareState(HANDLE hConsoleOutput, CONSOLE_API_MESSAGE ApiMessage; PCONSOLE_GETSETHWSTATE HardwareStateRequest = &ApiMessage.Data.HardwareStateRequest; - DPRINT1("GetConsoleHardwareState(%d, 0x%p) UNIMPLEMENTED!\n", Flags, State); + DPRINT1("GetConsoleHardwareState(%lu, 0x%p) UNIMPLEMENTED!\n", Flags, State); if (State == NULL) { @@ -430,7 +430,7 @@ GetCurrentConsoleFont(HANDLE hConsoleOutput, BOOL bMaximumWindow, PCONSOLE_FONT_INFO lpConsoleCurrentFont) { - DPRINT1("GetCurrentConsoleFont(0x%x, 0x%x, 0x%x) UNIMPLEMENTED!\n", hConsoleOutput, bMaximumWindow, lpConsoleCurrentFont); + DPRINT1("GetCurrentConsoleFont(0x%p, 0x%x, 0x%p) UNIMPLEMENTED!\n", hConsoleOutput, bMaximumWindow, lpConsoleCurrentFont); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return 0; } @@ -613,7 +613,7 @@ WINAPI SetConsoleFont(HANDLE hConsoleOutput, DWORD nFont) { - DPRINT1("SetConsoleFont(0x%x, %d) UNIMPLEMENTED!\n", hConsoleOutput, nFont); + DPRINT1("SetConsoleFont(0x%p, %lu) UNIMPLEMENTED!\n", hConsoleOutput, nFont); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return FALSE; } @@ -632,7 +632,7 @@ SetConsoleHardwareState(HANDLE hConsoleOutput, CONSOLE_API_MESSAGE ApiMessage; PCONSOLE_GETSETHWSTATE HardwareStateRequest = &ApiMessage.Data.HardwareStateRequest; - DPRINT1("SetConsoleHardwareState(%d, %d) UNIMPLEMENTED!\n", Flags, State); + DPRINT1("SetConsoleHardwareState(%lu, %lu) UNIMPLEMENTED!\n", Flags, State); HardwareStateRequest->OutputHandle = hConsoleOutput; HardwareStateRequest->State = State; @@ -677,7 +677,7 @@ WINAPI SetConsoleMaximumWindowSize(HANDLE hConsoleOutput, COORD dwMaximumSize) { - DPRINT1("SetConsoleMaximumWindowSize(0x%x, {%d, %d}) does nothing\n", + DPRINT1("SetConsoleMaximumWindowSize(0x%p, {%d, %d}) does nothing\n", hConsoleOutput, dwMaximumSize.X, dwMaximumSize.Y); return TRUE; } @@ -1268,7 +1268,7 @@ BOOL WINAPI GetNumberOfConsoleMouseButtons(LPDWORD lpNumberOfMouseButtons) { - DPRINT1("GetNumberOfConsoleMouseButtons(0x%x) UNIMPLEMENTED!\n", lpNumberOfMouseButtons); + DPRINT1("GetNumberOfConsoleMouseButtons(0x%p) UNIMPLEMENTED!\n", lpNumberOfMouseButtons); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return FALSE; } diff --git a/reactos/dll/win32/kernel32/client/console/init.c b/reactos/dll/win32/kernel32/client/console/init.c index d4114608918..4c8f7c511e7 100644 --- a/reactos/dll/win32/kernel32/client/console/init.c +++ b/reactos/dll/win32/kernel32/client/console/init.c @@ -179,7 +179,7 @@ BasepInitConsole(VOID) ULONG ConnectInfoSize = sizeof(ConnectInfo); DPRINT("BasepInitConsole for : %wZ\n", &Parameters->ImagePathName); - DPRINT("Our current console handles are: %lx, %lx, %lx %lx\n", + DPRINT("Our current console handles are: %p, %p, %p %p\n", Parameters->ConsoleHandle, Parameters->StandardInput, Parameters->StandardOutput, Parameters->StandardError); @@ -240,7 +240,7 @@ BasepInitConsole(VOID) { Parameters->ConsoleHandle = NULL; } - DPRINT("Using existing console: %x\n", Parameters->ConsoleHandle); + DPRINT("Using existing console: %p\n", Parameters->ConsoleHandle); } } @@ -309,7 +309,7 @@ BasepInitConsole(VOID) InputWaitHandle = ConnectInfo.InputWaitHandle; - DPRINT("Console setup: %lx, %lx, %lx, %lx\n", + DPRINT("Console setup: %p, %p, %p, %p\n", Parameters->ConsoleHandle, Parameters->StandardInput, Parameters->StandardOutput, diff --git a/reactos/dll/win32/kernel32/client/console/readwrite.c b/reactos/dll/win32/kernel32/client/console/readwrite.c index 1b45d8d806a..942c534389e 100644 --- a/reactos/dll/win32/kernel32/client/console/readwrite.c +++ b/reactos/dll/win32/kernel32/client/console/readwrite.c @@ -275,7 +275,7 @@ IntReadConsoleOutput(HANDLE hConsoleOutput, } /* Return the read region */ - DPRINT("read region: %lx\n", ReadOutputRequest->ReadRegion); + DPRINT("read region: %p\n", ReadOutputRequest->ReadRegion); *lpReadRegion = ReadOutputRequest->ReadRegion; /* Release the capture buffer */ @@ -592,7 +592,7 @@ IntWriteConsoleOutput(HANDLE hConsoleOutput, } /* Return the read region */ - DPRINT("read region: %lx\n", WriteOutputRequest->WriteRegion); + DPRINT("read region: %p\n", WriteOutputRequest->WriteRegion); *lpWriteRegion = WriteOutputRequest->WriteRegion; /* Release the capture buffer */ diff --git a/reactos/dll/win32/kernel32/client/dllmain.c b/reactos/dll/win32/kernel32/client/dllmain.c index 0434ce75644..04421291ac4 100644 --- a/reactos/dll/win32/kernel32/client/dllmain.c +++ b/reactos/dll/win32/kernel32/client/dllmain.c @@ -92,7 +92,7 @@ DllMain(HANDLE hDll, ULONG DummySize = sizeof(Dummy); WCHAR SessionDir[256]; - DPRINT("DllMain(hInst %lx, dwReason %lu)\n", + DPRINT("DllMain(hInst %p, dwReason %lu)\n", hDll, dwReason); Basep8BitStringToUnicodeString = RtlAnsiStringToUnicodeString; diff --git a/reactos/dll/win32/kernel32/client/file/copy.c b/reactos/dll/win32/kernel32/client/file/copy.c index 47b81995335..a5f3d30ee36 100644 --- a/reactos/dll/win32/kernel32/client/file/copy.c +++ b/reactos/dll/win32/kernel32/client/file/copy.c @@ -149,7 +149,7 @@ CopyLoop ( } else { - TRACE("Error 0x%08x allocating buffer of %d bytes\n", errCode, RegionSize); + TRACE("Error 0x%08x allocating buffer of %lu bytes\n", errCode, RegionSize); } return errCode; @@ -293,7 +293,7 @@ CopyFileExW ( } else { - WARN("Error %d during opening of dest file\n", GetLastError()); + WARN("Error %lu during opening of dest file\n", GetLastError()); } } } @@ -301,7 +301,7 @@ CopyFileExW ( } else { - WARN("Error %d during opening of source file\n", GetLastError()); + WARN("Error %lu during opening of source file\n", GetLastError()); } return RC; diff --git a/reactos/dll/win32/kernel32/client/file/create.c b/reactos/dll/win32/kernel32/client/file/create.c index 83467895b5b..0314b2494c5 100644 --- a/reactos/dll/win32/kernel32/client/file/create.c +++ b/reactos/dll/win32/kernel32/client/file/create.c @@ -394,7 +394,7 @@ OpenFile(LPCSTR lpFileName, PWCHAR FilePart; ULONG Len; - TRACE("OpenFile('%s', lpReOpenBuff %x, uStyle %x)\n", lpFileName, lpReOpenBuff, uStyle); + TRACE("OpenFile('%s', lpReOpenBuff %p, uStyle %x)\n", lpFileName, lpReOpenBuff, uStyle); if (lpReOpenBuff == NULL) { diff --git a/reactos/dll/win32/kernel32/client/file/disk.c b/reactos/dll/win32/kernel32/client/file/disk.c index c54ebe97e67..23972478ed6 100644 --- a/reactos/dll/win32/kernel32/client/file/disk.c +++ b/reactos/dll/win32/kernel32/client/file/disk.c @@ -416,7 +416,7 @@ GetDriveTypeW(IN LPCWSTR lpRootPathName) return DRIVE_FIXED; } - ERR("Returning DRIVE_UNKNOWN for device type %d\n", FileFsDevice.DeviceType); + ERR("Returning DRIVE_UNKNOWN for device type %lu\n", FileFsDevice.DeviceType); return DRIVE_UNKNOWN; } diff --git a/reactos/dll/win32/kernel32/client/file/fileinfo.c b/reactos/dll/win32/kernel32/client/file/fileinfo.c index a7486c60630..99f1f39186f 100644 --- a/reactos/dll/win32/kernel32/client/file/fileinfo.c +++ b/reactos/dll/win32/kernel32/client/file/fileinfo.c @@ -210,7 +210,7 @@ SetFilePointer(HANDLE hFile, IO_STATUS_BLOCK IoStatusBlock; LARGE_INTEGER Distance; - TRACE("SetFilePointer(hFile %x, lDistanceToMove %d, dwMoveMethod %d)\n", + TRACE("SetFilePointer(hFile %p, lDistanceToMove %d, dwMoveMethod %lu)\n", hFile,lDistanceToMove,dwMoveMethod); if(IsConsoleHandle(hFile)) diff --git a/reactos/dll/win32/kernel32/client/file/find.c b/reactos/dll/win32/kernel32/client/file/find.c index a1d481a6f61..ccd13854cd5 100644 --- a/reactos/dll/win32/kernel32/client/file/find.c +++ b/reactos/dll/win32/kernel32/client/file/find.c @@ -383,7 +383,7 @@ FindNextFileW(IN HANDLE hFindFile, NTSTATUS Status = STATUS_SUCCESS; DIR_INFORMATION FoundFile = {NULL}; - TRACE("FindNextFileW(%lx, 0x%p)\n", hFindFile, lpFindFileData); + TRACE("FindNextFileW(%p, 0x%p)\n", hFindFile, lpFindFileData); if (hFindFile != FIND_DEVICE_HANDLE) { @@ -499,7 +499,7 @@ BOOL WINAPI FindClose(HANDLE hFindFile) { - TRACE("FindClose(hFindFile %x)\n", hFindFile); + TRACE("FindClose(hFindFile %p)\n", hFindFile); if (hFindFile == FIND_DEVICE_HANDLE) return TRUE; diff --git a/reactos/dll/win32/kernel32/client/file/move.c b/reactos/dll/win32/kernel32/client/file/move.c index 8ddd4bb0f6b..e3c87c173b5 100644 --- a/reactos/dll/win32/kernel32/client/file/move.c +++ b/reactos/dll/win32/kernel32/client/file/move.c @@ -91,7 +91,7 @@ static BOOL add_boot_rename_entry( LPCWSTR source, LPCWSTR dest, DWORD flags ) WCHAR *p; NTSTATUS Status; - TRACE("add_boot_rename_entry( %S, %S, %d ) \n", source, dest, flags); + TRACE("add_boot_rename_entry( %S, %S, %lu ) \n", source, dest, flags); if(dest) DestLen = wcslen(dest); @@ -990,7 +990,7 @@ Cleanup: /* If there was an error, set the error code */ if(!Ret) { - TRACE("ReplaceFileW failed (error=%d)\n", Error); + TRACE("ReplaceFileW failed (error=%lu)\n", Error); SetLastError(Error); } return Ret; diff --git a/reactos/dll/win32/kernel32/client/file/rw.c b/reactos/dll/win32/kernel32/client/file/rw.c index f430850297a..20df0b1e5ab 100644 --- a/reactos/dll/win32/kernel32/client/file/rw.c +++ b/reactos/dll/win32/kernel32/client/file/rw.c @@ -29,7 +29,7 @@ WriteFile(IN HANDLE hFile, { NTSTATUS Status; - TRACE("WriteFile(hFile %x)\n", hFile); + TRACE("WriteFile(hFile %p)\n", hFile); if (lpNumberOfBytesWritten != NULL) *lpNumberOfBytesWritten = 0; @@ -128,7 +128,7 @@ ReadFile(IN HANDLE hFile, { NTSTATUS Status; - TRACE("ReadFile(hFile %x)\n", hFile); + TRACE("ReadFile(hFile %p)\n", hFile); if (lpNumberOfBytesRead != NULL) *lpNumberOfBytesRead = 0; if (!nNumberOfBytesToRead) return TRUE; diff --git a/reactos/dll/win32/kernel32/client/file/volume.c b/reactos/dll/win32/kernel32/client/file/volume.c index dedfb1c05b1..3a5d7138589 100644 --- a/reactos/dll/win32/kernel32/client/file/volume.c +++ b/reactos/dll/win32/kernel32/client/file/volume.c @@ -253,7 +253,7 @@ GetVolumeInformationW(IN LPCWSTR lpRootPathName, return FALSE; } - TRACE("hFile: %x\n", hFile); + TRACE("hFile: %p\n", hFile); errCode = NtQueryVolumeInformationFile(hFile, &IoStatusBlock, FileFsVolume, diff --git a/reactos/dll/win32/kernel32/client/loader.c b/reactos/dll/win32/kernel32/client/loader.c index 609c32f1776..82011e22e52 100644 --- a/reactos/dll/win32/kernel32/client/loader.c +++ b/reactos/dll/win32/kernel32/client/loader.c @@ -1123,7 +1123,7 @@ BaseQueryModuleData(IN LPSTR ModuleName, IN PVOID Unknown3, IN PVOID Unknown4) { - DPRINT1("BaseQueryModuleData called: %s %s %x %x %x\n", + DPRINT1("BaseQueryModuleData called: %s %s %p %p %p\n", ModuleName, Unknown, Unknown2, diff --git a/reactos/dll/win32/kernel32/client/proc.c b/reactos/dll/win32/kernel32/client/proc.c index 0e99abd0bb2..a91cef71063 100644 --- a/reactos/dll/win32/kernel32/client/proc.c +++ b/reactos/dll/win32/kernel32/client/proc.c @@ -503,7 +503,7 @@ BasepNotifyCsrOfThread(IN HANDLE ThreadHandle, BASE_API_MESSAGE ApiMessage; PBASE_CREATE_THREAD CreateThreadRequest = &ApiMessage.Data.CreateThreadRequest; - DPRINT("BasepNotifyCsrOfThread: Thread: %lx, Handle %lx\n", + DPRINT("BasepNotifyCsrOfThread: Thread: %p, Handle %p\n", ClientId->UniqueThread, ThreadHandle); /* Fill out the request */ @@ -2891,7 +2891,7 @@ StartScan: } /* Now use the path name, and the root path, to try opening the app */ - DPRINT1("Path: %wZ. Dir: %lx\n", &PathName, SxsWin32RelativePath.ContainingDirectory); + DPRINT1("Path: %wZ. Dir: %p\n", &PathName, SxsWin32RelativePath.ContainingDirectory); InitializeObjectAttributes(&LocalObjectAttributes, &PathName, OBJ_CASE_INSENSITIVE, @@ -3722,7 +3722,7 @@ StartScan: if (!Result) { /* It was not, bail out */ - DPRINT1("Invalid subsystem version: %d.%d\n", + DPRINT1("Invalid subsystem version: %hu.%hu\n", ImageInformation.SubSystemMajorVersion, ImageInformation.SubSystemMinorVersion); SetLastError(ERROR_BAD_EXE_FORMAT); @@ -4657,8 +4657,8 @@ CreateProcessInternalA(HANDLE hToken, BOOL bRetVal; STARTUPINFOW StartupInfo; - DPRINT("dwCreationFlags %x, lpEnvironment %x, lpCurrentDirectory %x, " - "lpStartupInfo %x, lpProcessInformation %x\n", + DPRINT("dwCreationFlags %x, lpEnvironment %p, lpCurrentDirectory %p, " + "lpStartupInfo %p, lpProcessInformation %p\n", dwCreationFlags, lpEnvironment, lpCurrentDirectory, lpStartupInfo, lpProcessInformation); diff --git a/reactos/dll/win32/kernel32/client/thread.c b/reactos/dll/win32/kernel32/client/thread.c index f4f8ad580bc..590d8deeb47 100644 --- a/reactos/dll/win32/kernel32/client/thread.c +++ b/reactos/dll/win32/kernel32/client/thread.c @@ -175,8 +175,8 @@ CreateRemoteThread(IN HANDLE hProcess, ACTIVATION_CONTEXT_BASIC_INFORMATION ActCtxInfo; ULONG_PTR Cookie; ULONG ReturnLength; - DPRINT("CreateRemoteThread: hProcess: %ld dwStackSize: %ld lpStartAddress" - ": %p lpParameter: %lx, dwCreationFlags: %lx\n", hProcess, + DPRINT("CreateRemoteThread: hProcess: %p dwStackSize: %lu lpStartAddress" + ": %p lpParameter: %p, dwCreationFlags: %lx\n", hProcess, dwStackSize, lpStartAddress, lpParameter, dwCreationFlags); /* Clear the Context */ diff --git a/reactos/dll/win32/kernel32/client/utils.c b/reactos/dll/win32/kernel32/client/utils.c index 089bda3f709..2c789364387 100644 --- a/reactos/dll/win32/kernel32/client/utils.c +++ b/reactos/dll/win32/kernel32/client/utils.c @@ -340,7 +340,7 @@ BaseFormatObjectAttributes(OUT POBJECT_ATTRIBUTES ObjectAttributes, Attributes, RootDirectory, SecurityDescriptor); - DPRINT("Attributes: %lx, RootDirectory: %lx, SecurityDescriptor: %p\n", + DPRINT("Attributes: %lx, RootDirectory: %p, SecurityDescriptor: %p\n", Attributes, RootDirectory, SecurityDescriptor); return ObjectAttributes; } @@ -361,7 +361,7 @@ BaseCreateStack(HANDLE hProcess, BOOLEAN UseGuard; ULONG PageSize, Dummy, AllocationGranularity; SIZE_T StackReserveHeader, StackCommitHeader, GuardPageSize, GuaranteedStackCommit; - DPRINT("BaseCreateStack (hProcess: %lx, Max: %lx, Current: %lx)\n", + DPRINT("BaseCreateStack (hProcess: %p, Max: %lx, Current: %lx)\n", hProcess, StackReserve, StackCommit); /* Read page size */ @@ -709,7 +709,7 @@ BasepMapFile(IN LPCWSTR lpApplicationName, NtClose(hFile); /* Return status */ - DPRINT("Section: %lx for file: %lx\n", *hSection, hFile); + DPRINT("Section: %p for file: %p\n", *hSection, hFile); return Status; } diff --git a/reactos/dll/win32/kernel32/include/baseheap.h b/reactos/dll/win32/kernel32/include/baseheap.h index 8cb2a7391e4..9312290f885 100644 --- a/reactos/dll/win32/kernel32/include/baseheap.h +++ b/reactos/dll/win32/kernel32/include/baseheap.h @@ -48,7 +48,7 @@ BH_PRINT("[BASE_HEAP] %s : Allocated %p\n", \ __FUNCTION__, x) #define BASE_TRACE_PTR(x, y) \ - BH_PRINT("[BASE_HEAP] %s : Using handle: %lx for pointer: %p\n", \ + BH_PRINT("[BASE_HEAP] %s : Using handle: %p for pointer: %p\n", \ __FUNCTION__, x, y) #define BASE_TRACE_HANDLE(x, y) \ BH_PRINT("[BASE_HEAP] %s : Using handle: %lx for block: %p\n", \ diff --git a/reactos/dll/win32/kernel32/winnls/string/lang.c b/reactos/dll/win32/kernel32/winnls/string/lang.c index 4cd0b42c86b..3db74d15a86 100644 --- a/reactos/dll/win32/kernel32/winnls/string/lang.c +++ b/reactos/dll/win32/kernel32/winnls/string/lang.c @@ -2702,7 +2702,7 @@ NLS_GetGeoFriendlyName(GEOID Location, LPWSTR szFriendlyName, int cchData) NTSTATUS Status; int Ret; - swprintf(szPath, L"\\REGISTRY\\Machine\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Telephony\\Country List\\%d", Location); + swprintf(szPath, L"\\REGISTRY\\Machine\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Telephony\\Country List\\%lu", Location); hKey = NLS_RegOpenKey(0, szPath); if (!hKey) diff --git a/reactos/dll/win32/kernel32/winnls/string/nls.c b/reactos/dll/win32/kernel32/winnls/string/nls.c index c2981de30f6..614a801c946 100644 --- a/reactos/dll/win32/kernel32/winnls/string/nls.c +++ b/reactos/dll/win32/kernel32/winnls/string/nls.c @@ -1713,7 +1713,7 @@ GetLocalisedText(DWORD dwResId, WCHAR *lpszDest) } } - DPRINT1("Could not get codepage name. dwResId = %ld\n", dwResId); + DPRINT1("Could not get codepage name. dwResId = %lu\n", dwResId); return FALSE; }