Commit e0d5dbae authored by Alexandre Julliard's avatar Alexandre Julliard

ntoskrnl.exe: Implemented PsGetVersion and added stubs for a couple of other Ps functions.

parent 4cbe5b78
......@@ -51,6 +51,7 @@ typedef struct _KSERVICE_TABLE_DESCRIPTOR
KSERVICE_TABLE_DESCRIPTOR KeServiceDescriptorTable[4];
typedef void (WINAPI *PCREATE_PROCESS_NOTIFY_ROUTINE)(HANDLE,HANDLE,BOOLEAN);
#ifdef __i386__
#define DEFINE_FASTCALL1_ENTRYPOINT( name ) \
......@@ -416,6 +417,59 @@ void WINAPI MmFreeNonCachedMemory( void *addr, SIZE_T size )
}
/***********************************************************************
* PsGetCurrentProcessId (NTOSKRNL.EXE.@)
*/
HANDLE WINAPI PsGetCurrentProcessId(void)
{
return (HANDLE)GetCurrentProcessId(); /* FIXME: not quite right... */
}
/***********************************************************************
* PsGetCurrentThreadId (NTOSKRNL.EXE.@)
*/
HANDLE WINAPI PsGetCurrentThreadId(void)
{
return (HANDLE)GetCurrentThreadId(); /* FIXME: not quite right... */
}
/***********************************************************************
* PsGetVersion (NTOSKRNL.EXE.@)
*/
BOOLEAN WINAPI PsGetVersion(ULONG *major, ULONG *minor, ULONG *build, UNICODE_STRING *version )
{
RTL_OSVERSIONINFOEXW info;
RtlGetVersion( &info );
if (major) *major = info.dwMajorVersion;
if (minor) *minor = info.dwMinorVersion;
if (build) *build = info.dwBuildNumber;
if (version)
{
#if 0 /* FIXME: GameGuard passes an uninitialized pointer in version->Buffer */
size_t len = min( strlenW(info.szCSDVersion)*sizeof(WCHAR), version->MaximumLength );
memcpy( version->Buffer, info.szCSDVersion, len );
if (len < version->MaximumLength) version->Buffer[len / sizeof(WCHAR)] = 0;
version->Length = len;
#endif
}
return TRUE;
}
/***********************************************************************
* PsSetCreateProcessNotifyRoutine (NTOSKRNL.EXE.@)
*/
NTSTATUS WINAPI PsSetCreateProcessNotifyRoutine( PCREATE_PROCESS_NOTIFY_ROUTINE callback, BOOLEAN remove )
{
FIXME( "stub: %p %d\n", callback, remove );
return STATUS_SUCCESS;
}
/*****************************************************
* DllMain
*/
......
......@@ -850,10 +850,10 @@
@ stub PsEstablishWin32Callouts
@ stub PsGetContextThread
@ stub PsGetCurrentProcess
@ stub PsGetCurrentProcessId
@ stdcall PsGetCurrentProcessId()
@ stub PsGetCurrentProcessSessionId
@ stub PsGetCurrentThread
@ stub PsGetCurrentThreadId
@ stdcall PsGetCurrentThreadId()
@ stub PsGetCurrentThreadPreviousMode
@ stub PsGetCurrentThreadStackBase
@ stub PsGetCurrentThreadStackLimit
......@@ -884,7 +884,7 @@
@ stub PsGetThreadSessionId
@ stub PsGetThreadTeb
@ stub PsGetThreadWin32Thread
@ stub PsGetVersion
@ stdcall PsGetVersion(ptr ptr ptr ptr)
@ stub PsImpersonateClient
@ stub PsInitialSystemProcess
@ stub PsIsProcessBeingDebugged
......@@ -907,7 +907,7 @@
@ stub PsRevertThreadToSelf
@ stub PsRevertToSelf
@ stub PsSetContextThread
@ stub PsSetCreateProcessNotifyRoutine
@ stdcall PsSetCreateProcessNotifyRoutine(ptr long)
@ stub PsSetCreateThreadNotifyRoutine
@ stub PsSetJobUIRestrictionsClass
@ stub PsSetLegoNotifyRoutine
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment