mirror of
https://github.com/reactos/reactos.git
synced 2025-03-10 10:14:44 +00:00
- Fix csrss compilation (treat handles as pointer sized, use SIZE_T where appropriate)
svn path=/branches/ros-amd64-bringup/; revision=36992
This commit is contained in:
parent
1d619ca266
commit
3120b5e9f9
5 changed files with 13 additions and 13 deletions
|
@ -22,7 +22,7 @@ static PCSRSS_OBJECT_DEFINITION ObjectDefinitions = NULL;
|
|||
static BOOL
|
||||
CsrIsConsoleHandle(HANDLE Handle)
|
||||
{
|
||||
return ((ULONG)Handle & 0x10000003) == 0x3;
|
||||
return ((ULONG_PTR)Handle & 0x10000003) == 0x3;
|
||||
}
|
||||
|
||||
|
||||
|
@ -63,7 +63,7 @@ CsrRegisterObjectDefinitions(PCSRSS_OBJECT_DEFINITION NewDefinitions)
|
|||
|
||||
NTSTATUS STDCALL CsrGetObject( PCSRSS_PROCESS_DATA ProcessData, HANDLE Handle, Object_t **Object, DWORD Access )
|
||||
{
|
||||
ULONG h = (ULONG)Handle >> 2;
|
||||
ULONG_PTR h = (ULONG_PTR)Handle >> 2;
|
||||
DPRINT("CsrGetObject, Object: %x, %x, %x\n", Object, Handle, ProcessData ? ProcessData->HandleTableSize : 0);
|
||||
|
||||
RtlEnterCriticalSection(&ProcessData->HandleTableLock);
|
||||
|
@ -110,7 +110,7 @@ NTSTATUS STDCALL
|
|||
CsrReleaseObject(PCSRSS_PROCESS_DATA ProcessData,
|
||||
HANDLE Handle)
|
||||
{
|
||||
ULONG h = (ULONG)Handle >> 2;
|
||||
ULONG_PTR h = (ULONG_PTR)Handle >> 2;
|
||||
Object_t *Object;
|
||||
|
||||
RtlEnterCriticalSection(&ProcessData->HandleTableLock);
|
||||
|
@ -164,7 +164,7 @@ NTSTATUS STDCALL CsrInsertObject(PCSRSS_PROCESS_DATA ProcessData,
|
|||
ProcessData->HandleTable[i].Object = Object;
|
||||
ProcessData->HandleTable[i].Access = Access;
|
||||
ProcessData->HandleTable[i].Inheritable = Inheritable;
|
||||
*Handle = (HANDLE)((i << 2) | 0x3);
|
||||
*Handle = (HANDLE)(ULONG_PTR)((i << 2) | 0x3);
|
||||
_InterlockedIncrement( &Object->ReferenceCount );
|
||||
RtlLeaveCriticalSection(&ProcessData->HandleTableLock);
|
||||
return(STATUS_SUCCESS);
|
||||
|
@ -208,7 +208,7 @@ NTSTATUS STDCALL CsrDuplicateHandleTable(PCSRSS_PROCESS_DATA SourceProcessData,
|
|||
|
||||
NTSTATUS STDCALL CsrVerifyObject( PCSRSS_PROCESS_DATA ProcessData, HANDLE Handle )
|
||||
{
|
||||
ULONG h = (ULONG)Handle >> 2;
|
||||
ULONG_PTR h = (ULONG_PTR)Handle >> 2;
|
||||
|
||||
if (h >= ProcessData->HandleTableSize
|
||||
|| ProcessData->HandleTable[h].Object == NULL)
|
||||
|
|
|
@ -243,7 +243,7 @@ CSR_API(CsrCreateProcess)
|
|||
|
||||
if (Request->Data.CreateProcessRequest.Flags & CREATE_NEW_PROCESS_GROUP)
|
||||
{
|
||||
NewProcessData->ProcessGroup = (DWORD)NewProcessData->ProcessId;
|
||||
NewProcessData->ProcessGroup = (DWORD)(ULONG_PTR)NewProcessData->ProcessId;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -362,14 +362,14 @@ CSR_API(CsrVerifyHandle)
|
|||
|
||||
CSR_API(CsrDuplicateHandle)
|
||||
{
|
||||
ULONG Index;
|
||||
ULONG_PTR Index;
|
||||
PCSRSS_HANDLE Entry;
|
||||
DWORD DesiredAccess;
|
||||
|
||||
Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
|
||||
Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) - sizeof(PORT_MESSAGE);
|
||||
|
||||
Index = (ULONG)Request->Data.DuplicateHandleRequest.Handle >> 2;
|
||||
Index = (ULONG_PTR)Request->Data.DuplicateHandleRequest.Handle >> 2;
|
||||
RtlEnterCriticalSection(&ProcessData->HandleTableLock);
|
||||
if (Index >= ProcessData->HandleTableSize
|
||||
|| (Entry = &ProcessData->HandleTable[Index])->Object == NULL)
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
/* GLOBALS *******************************************************************/
|
||||
|
||||
static BOOLEAN ServicesProcessIdValid = FALSE;
|
||||
static ULONG ServicesProcessId;
|
||||
static ULONG_PTR ServicesProcessId;
|
||||
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
@ -36,7 +36,7 @@ CSR_API(CsrRegisterServicesProcess)
|
|||
}
|
||||
else
|
||||
{
|
||||
ServicesProcessId = (ULONG)Request->Data.RegisterServicesProcessRequest.ProcessId;
|
||||
ServicesProcessId = (ULONG_PTR)Request->Data.RegisterServicesProcessRequest.ProcessId;
|
||||
ServicesProcessIdValid = TRUE;
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -272,8 +272,8 @@ ClientConnectionThread(HANDLE ServerPort)
|
|||
}
|
||||
if (ProcessData->Terminated)
|
||||
{
|
||||
DPRINT1("Message %d: process %d already terminated\n",
|
||||
Request->Type, (ULONG)Request->Header.ClientId.UniqueProcess);
|
||||
DPRINT1("Message %d: process %p already terminated\n",
|
||||
Request->Type, Request->Header.ClientId.UniqueProcess);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ InitializeVideoAddressSpace(VOID)
|
|||
HANDLE PhysMemHandle;
|
||||
PVOID BaseAddress;
|
||||
LARGE_INTEGER Offset;
|
||||
ULONG ViewSize;
|
||||
SIZE_T ViewSize;
|
||||
CHAR IVTAndBda[1024+256];
|
||||
|
||||
/* Open the physical memory section */
|
||||
|
|
Loading…
Reference in a new issue