[USERSRV]: Use UlongToHandle and make ServicesProcessId global (will be used later on, for shutdown). Part 2/X

CORE-8322

svn path=/trunk/; revision=65516
This commit is contained in:
Hermès Bélusca-Maïto 2014-11-28 21:08:57 +00:00
parent c5601a5515
commit 331ed663bf
2 changed files with 3 additions and 3 deletions

View file

@ -17,8 +17,7 @@
/* GLOBALS ********************************************************************/
static BOOLEAN ServicesProcessIdValid = FALSE;
static ULONG_PTR ServicesProcessId = 0;
ULONG_PTR ServicesProcessId = 0;
ULONG_PTR LogonProcessId = 0;
/* PUBLIC SERVER APIS *********************************************************/
@ -36,7 +35,7 @@ CSR_API(SrvRegisterLogonProcess)
}
else
{
if (ApiMessage->Header.ClientId.UniqueProcess != (HANDLE)LogonProcessId)
if (ApiMessage->Header.ClientId.UniqueProcess != UlongToHandle(LogonProcessId))
{
DPRINT1("Current logon process 0x%x, can't deregister from process 0x%x\n",
LogonProcessId, ApiMessage->Header.ClientId.UniqueProcess);

View file

@ -38,6 +38,7 @@
/* Globals */
extern HINSTANCE UserServerDllInstance;
extern HANDLE UserServerHeap;
extern ULONG_PTR ServicesProcessId;
extern ULONG_PTR LogonProcessId;
#endif /* __USERSRV_H__ */