Author: weiden
Date: Sun Jul 29 01:30:16 2007
New Revision: 27977
URL:
http://svn.reactos.org/svn/reactos?rev=27977&view=rev
Log:
Some more function prototype fixes and pointer type warning fixes
Modified:
trunk/reactos/dll/ntdll/ldr/utils.c
trunk/reactos/dll/win32/advapi32/reg/reg.c
trunk/reactos/include/ndk/mmfuncs.h
trunk/reactos/include/ndk/rtlfuncs.h
trunk/reactos/lib/rtl/dbgbuffer.c
trunk/reactos/lib/rtl/debug.c
trunk/reactos/lib/rtl/env.c
trunk/reactos/lib/rtl/error.c
trunk/reactos/lib/rtl/handle.c
trunk/reactos/lib/rtl/nls.c
trunk/reactos/lib/rtl/path.c
trunk/reactos/lib/rtl/ppb.c
trunk/reactos/lib/rtl/process.c
trunk/reactos/lib/rtl/sid.c
trunk/reactos/lib/rtl/thread.c
trunk/reactos/lib/rtl/timerqueue.c
Modified: trunk/reactos/dll/ntdll/ldr/utils.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/ldr/utils.c?rev=…
==============================================================================
--- trunk/reactos/dll/ntdll/ldr/utils.c (original)
+++ trunk/reactos/dll/ntdll/ldr/utils.c Sun Jul 29 01:30:16 2007
@@ -1991,7 +1991,7 @@
NTSTATUS Status;
PLDR_DATA_TABLE_ENTRY tmpModule;
HANDLE SectionHandle;
- ULONG ViewSize;
+ SIZE_T ViewSize;
PVOID ImageBase;
PIMAGE_NT_HEADERS NtHeaders;
BOOLEAN MappedAsDataFile;
@@ -2963,7 +2963,7 @@
FILE_STANDARD_INFORMATION FileInfo;
IO_STATUS_BLOCK IoStatusBlock;
HANDLE SectionHandle;
- ULONG ViewSize;
+ SIZE_T ViewSize;
PVOID BaseAddress;
BOOLEAN Result;
NTSTATUS Status;
Modified: trunk/reactos/dll/win32/advapi32/reg/reg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/reg/reg…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/reg/reg.c (original)
+++ trunk/reactos/dll/win32/advapi32/reg/reg.c Sun Jul 29 01:30:16 2007
@@ -2240,7 +2240,7 @@
DWORD NameLength;
DWORD ClassLength = 0;
DWORD BufferSize;
- DWORD ResultSize;
+ ULONG ResultSize;
HANDLE KeyHandle;
NTSTATUS Status;
@@ -2541,7 +2541,7 @@
{
HANDLE KeyHandle;
NTSTATUS status;
- DWORD total_size;
+ ULONG total_size;
char buffer[256], *buf_ptr = buffer;
KEY_VALUE_FULL_INFORMATION *info = (KEY_VALUE_FULL_INFORMATION *)buffer;
static const int info_size = FIELD_OFFSET( KEY_VALUE_FULL_INFORMATION, Name );
@@ -2587,7 +2587,7 @@
if (is_string(info->Type))
{
- DWORD len;
+ ULONG len;
RtlUnicodeToMultiByteSize( &len, (WCHAR *)(buf_ptr +
info->DataOffset),
total_size - info->DataOffset );
if (data && len)
@@ -2612,7 +2612,7 @@
if (value && !status)
{
- DWORD len;
+ ULONG len;
RtlUnicodeToMultiByteSize( &len, info->Name, info->NameLength );
if (len >= *val_count)
@@ -2668,7 +2668,7 @@
{
HANDLE KeyHandle;
NTSTATUS status;
- DWORD total_size;
+ ULONG total_size;
char buffer[256], *buf_ptr = buffer;
KEY_VALUE_FULL_INFORMATION *info = (KEY_VALUE_FULL_INFORMATION *)buffer;
static const int info_size = FIELD_OFFSET( KEY_VALUE_FULL_INFORMATION, Name );
Modified: trunk/reactos/include/ndk/mmfuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/mmfuncs.h?rev=…
==============================================================================
--- trunk/reactos/include/ndk/mmfuncs.h (original)
+++ trunk/reactos/include/ndk/mmfuncs.h Sun Jul 29 01:30:16 2007
@@ -261,8 +261,8 @@
IN HANDLE ProcessHandle,
IN PVOID BaseAddress,
OUT PVOID Buffer,
- IN ULONG NumberOfBytesToRead,
- OUT PULONG NumberOfBytesRead
+ IN SIZE_T NumberOfBytesToRead,
+ OUT PSIZE_T NumberOfBytesRead
);
NTSTATUS
@@ -270,7 +270,7 @@
NtResetWriteWatch(
IN HANDLE ProcessHandle,
IN PVOID BaseAddress,
- IN ULONG RegionSize
+ IN SIZE_T RegionSize
);
NTSYSCALLAPI
@@ -279,8 +279,8 @@
NtUnlockVirtualMemory(
IN HANDLE ProcessHandle,
IN PVOID BaseAddress,
- IN ULONG NumberOfBytesToUnlock,
- OUT PULONG NumberOfBytesUnlocked OPTIONAL
+ IN SIZE_T NumberOfBytesToUnlock,
+ OUT PSIZE_T NumberOfBytesUnlocked OPTIONAL
);
NTSYSCALLAPI
@@ -369,8 +369,8 @@
ZwLockVirtualMemory(
HANDLE ProcessHandle,
PVOID BaseAddress,
- ULONG NumberOfBytesToLock,
- PULONG NumberOfBytesLocked
+ SIZE_T NumberOfBytesToLock,
+ PSIZE_T NumberOfBytesLocked
);
NTSYSAPI
@@ -439,8 +439,8 @@
IN HANDLE ProcessHandle,
IN PVOID BaseAddress,
OUT PVOID Buffer,
- IN ULONG NumberOfBytesToRead,
- OUT PULONG NumberOfBytesRead
+ IN SIZE_T NumberOfBytesToRead,
+ OUT PSIZE_T NumberOfBytesRead
);
NTSYSAPI
@@ -449,8 +449,8 @@
ZwUnlockVirtualMemory(
IN HANDLE ProcessHandle,
IN PVOID BaseAddress,
- IN ULONG NumberOfBytesToUnlock,
- OUT PULONG NumberOfBytesUnlocked OPTIONAL
+ IN SIZE_T NumberOfBytesToUnlock,
+ OUT PSIZE_T NumberOfBytesUnlocked OPTIONAL
);
NTSYSAPI
Modified: trunk/reactos/include/ndk/rtlfuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/rtlfuncs.h?rev…
==============================================================================
--- trunk/reactos/include/ndk/rtlfuncs.h (original)
+++ trunk/reactos/include/ndk/rtlfuncs.h Sun Jul 29 01:30:16 2007
@@ -576,7 +576,7 @@
HANDLE Heap,
ULONG Flags,
PVOID Ptr,
- ULONG Size
+ SIZE_T Size
);
NTSYSAPI
Modified: trunk/reactos/lib/rtl/dbgbuffer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/dbgbuffer.c?rev=27…
==============================================================================
--- trunk/reactos/lib/rtl/dbgbuffer.c (original)
+++ trunk/reactos/lib/rtl/dbgbuffer.c Sun Jul 29 01:30:16 2007
@@ -54,8 +54,8 @@
if (NULL != Buf)
{
Status = NtFreeVirtualMemory( NtCurrentProcess(),
- (PVOID)&Buf,
- &Buf->ViewSize,
+ (PVOID)&Buf,
+ (PSIZE_T)&Buf->ViewSize, /* FIXME: not
portable! */
MEM_RELEASE);
}
if (!NT_SUCCESS(Status))
Modified: trunk/reactos/lib/rtl/debug.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/debug.c?rev=27977&…
==============================================================================
--- trunk/reactos/lib/rtl/debug.c (original)
+++ trunk/reactos/lib/rtl/debug.c Sun Jul 29 01:30:16 2007
@@ -313,7 +313,7 @@
NTAPI
DbgLoadImageSymbols(IN PANSI_STRING Name,
IN PVOID Base,
- IN ULONG ProcessId)
+ IN ULONG_PTR ProcessId)
{
PIMAGE_NT_HEADERS NtHeader;
KD_SYMBOLS_INFO SymbolInfo;
Modified: trunk/reactos/lib/rtl/env.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/env.c?rev=27977&am…
==============================================================================
--- trunk/reactos/lib/rtl/env.c (original)
+++ trunk/reactos/lib/rtl/env.c Sun Jul 29 01:30:16 2007
@@ -25,7 +25,7 @@
MEMORY_BASIC_INFORMATION MemInfo;
PVOID EnvPtr = NULL;
NTSTATUS Status = STATUS_SUCCESS;
- ULONG RegionSize = PAGE_SIZE;
+ SIZE_T RegionSize = PAGE_SIZE;
if (Inherit == TRUE)
{
@@ -96,7 +96,7 @@
VOID NTAPI
RtlDestroyEnvironment(PWSTR Environment)
{
- ULONG Size = 0;
+ SIZE_T Size = 0;
NtFreeVirtualMemory(NtCurrentProcess(),
(PVOID)&Environment,
@@ -275,7 +275,7 @@
int hole_len, new_len, env_len = 0;
WCHAR *new_env = 0, *env_end = 0, *wcs, *env, *val = 0, *tail = 0, *hole = 0;
PWSTR head = NULL;
- ULONG size = 0, new_size;
+ SIZE_T size = 0, new_size;
LONG f = 1;
NTSTATUS Status = STATUS_SUCCESS;
Modified: trunk/reactos/lib/rtl/error.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/error.c?rev=27977&…
==============================================================================
--- trunk/reactos/lib/rtl/error.c (original)
+++ trunk/reactos/lib/rtl/error.c Sun Jul 29 01:30:16 2007
@@ -932,7 +932,7 @@
*
* @implemented
*/
-DWORD NTAPI
+ULONG NTAPI
RtlNtStatusToDosError(IN NTSTATUS Status)
{
PTEB Teb = NtCurrentTeb ();
Modified: trunk/reactos/lib/rtl/handle.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/handle.c?rev=27977…
==============================================================================
--- trunk/reactos/lib/rtl/handle.c (original)
+++ trunk/reactos/lib/rtl/handle.c Sun Jul 29 01:30:16 2007
@@ -35,7 +35,7 @@
RtlDestroyHandleTable(PRTL_HANDLE_TABLE HandleTable)
{
PVOID ArrayPointer;
- ULONG ArraySize;
+ SIZE_T ArraySize;
/* free handle array */
if (HandleTable->CommittedHandles)
@@ -61,7 +61,7 @@
NTSTATUS Status;
PRTL_HANDLE_TABLE_ENTRY retval;
PVOID ArrayPointer;
- ULONG ArraySize;
+ SIZE_T ArraySize;
pp_new = &HandleTable->FreeHandles;
Modified: trunk/reactos/lib/rtl/nls.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/nls.c?rev=27977&am…
==============================================================================
--- trunk/reactos/lib/rtl/nls.c (original)
+++ trunk/reactos/lib/rtl/nls.c Sun Jul 29 01:30:16 2007
@@ -809,6 +809,8 @@
WCHAR UpcaseChar;
ULONG Size = 0;
ULONG i;
+
+ ASSERT(NlsUnicodeToOemTable != NULL);
if (NlsMbOemCodePageTag == FALSE)
{
Modified: trunk/reactos/lib/rtl/path.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/path.c?rev=27977&a…
==============================================================================
--- trunk/reactos/lib/rtl/path.c (original)
+++ trunk/reactos/lib/rtl/path.c Sun Jul 29 01:30:16 2007
@@ -611,15 +611,15 @@
*
* @implemented
*/
-DWORD NTAPI RtlGetFullPathName_U(
+ULONG NTAPI RtlGetFullPathName_U(
const WCHAR* name,
ULONG size,
WCHAR* buffer,
WCHAR** file_part)
{
WCHAR* ptr;
- DWORD dosdev;
- DWORD reqsize;
+ ULONG dosdev;
+ ULONG reqsize;
DPRINT("RtlGetFullPathName_U(%S %lu %p %p)\n", name, size, buffer,
file_part);
Modified: trunk/reactos/lib/rtl/ppb.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/ppb.c?rev=27977&am…
==============================================================================
--- trunk/reactos/lib/rtl/ppb.c (original)
+++ trunk/reactos/lib/rtl/ppb.c Sun Jul 29 01:30:16 2007
@@ -55,7 +55,7 @@
{
NTSTATUS Status = STATUS_SUCCESS;
PRTL_USER_PROCESS_PARAMETERS Param = NULL;
- ULONG RegionSize = 0;
+ SIZE_T RegionSize = 0;
ULONG Length = 0;
PWCHAR Dest;
UNICODE_STRING EmptyString;
@@ -222,7 +222,7 @@
NTSTATUS NTAPI
RtlDestroyProcessParameters(PRTL_USER_PROCESS_PARAMETERS ProcessParameters)
{
- ULONG RegionSize = 0;
+ SIZE_T RegionSize = 0;
return ZwFreeVirtualMemory (NtCurrentProcess (),
(PVOID)ProcessParameters,
Modified: trunk/reactos/lib/rtl/process.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/process.c?rev=2797…
==============================================================================
--- trunk/reactos/lib/rtl/process.c (original)
+++ trunk/reactos/lib/rtl/process.c Sun Jul 29 01:30:16 2007
@@ -72,8 +72,8 @@
{
NTSTATUS Status;
PVOID BaseAddress = NULL;
- ULONG EnviroSize;
- ULONG Size;
+ SIZE_T EnviroSize;
+ SIZE_T Size;
PWCHAR Environment = 0;
DPRINT("RtlpInitEnvironment (hProcess: %p, Peb: %p Params: %p)\n",
ProcessHandle, Peb, ProcessParameters);
Modified: trunk/reactos/lib/rtl/sid.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/sid.c?rev=27977&am…
==============================================================================
--- trunk/reactos/lib/rtl/sid.c (original)
+++ trunk/reactos/lib/rtl/sid.c Sun Jul 29 01:30:16 2007
@@ -80,7 +80,7 @@
PAGED_CODE_RTL();
- return &Sid->SubAuthority[SubAuthority];
+ return (PULONG)&Sid->SubAuthority[SubAuthority];
}
Modified: trunk/reactos/lib/rtl/thread.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/thread.c?rev=27977…
==============================================================================
--- trunk/reactos/lib/rtl/thread.c (original)
+++ trunk/reactos/lib/rtl/thread.c Sun Jul 29 01:30:16 2007
@@ -133,7 +133,7 @@
RtlpFreeUserStack(IN HANDLE Process,
IN PINITIAL_TEB InitialTeb)
{
- ULONG Dummy = 0;
+ SIZE_T Dummy = 0;
NTSTATUS Status;
/* Free the Stack */
@@ -242,7 +242,7 @@
{
NTSTATUS Status;
THREAD_BASIC_INFORMATION ThreadBasicInfo;
- ULONG Dummy, Size = 0;
+ SIZE_T Dummy, Size = 0;
PVOID StackLocation;
/* Query the Basic Info */
Modified: trunk/reactos/lib/rtl/timerqueue.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/timerqueue.c?rev=2…
==============================================================================
--- trunk/reactos/lib/rtl/timerqueue.c (original)
+++ trunk/reactos/lib/rtl/timerqueue.c Sun Jul 29 01:30:16 2007
@@ -32,11 +32,11 @@
NTAPI
RtlCreateTimer(HANDLE TimerQueue,
PHANDLE phNewTimer,
- WAITORTIMERCALLBACKFUNC Callback,
- PVOID Parameter,
- DWORD DueTime,
- DWORD Period,
- ULONG Flags)
+ WAITORTIMERCALLBACKFUNC Callback,
+ PVOID Parameter,
+ ULONG DueTime,
+ ULONG Period,
+ ULONG Flags)
{
DPRINT1("RtlCreateTimer: stub\n");
return STATUS_NOT_IMPLEMENTED;