Implemented NtTerminateProcess and NtDisplayString.

This commit is contained in:
Juergen Schmied 1999-04-11 14:53:24 +00:00 committed by Alexandre Julliard
parent 1b34697ad3
commit d1f10c50ef
4 changed files with 38 additions and 4 deletions

View File

@ -67,6 +67,25 @@ NTSTATUS WINAPI NtQueryTimerResolution(DWORD x1,DWORD x2,DWORD x3)
* Process object
*/
/******************************************************************************
* NtTerminateProcess [NTDLL.]
*
* Native applications must kill themselves when done
* FIXME: return value 0-success
*/
NTSTATUS WINAPI NtTerminateProcess(
HANDLE ProcessHandle,
LONG ExitStatus)
{
TRACE(ntdll, "0x%08x 0x%08lx\n", ProcessHandle, ExitStatus );
/* win32 (0x7fffffff) to nt (-1) */
if ( NtCurrentProcess() == ProcessHandle )
ProcessHandle = GetCurrentProcess();
return (! TerminateProcess( ProcessHandle, ExitStatus ));
}
/******************************************************************************
* NtQueryInformationProcess [NTDLL.]
*
@ -495,8 +514,20 @@ NTSTATUS WINAPI NtCreatePagingFile(
IN ULONG MaxiumSize,
OUT PULONG ActualSize)
{
FIXME(ntdll,"(%p,0x%08lx,0x%08lx,%p),stub!\n",
debugstr_w(PageFileName->Buffer),MiniumSize,MaxiumSize,ActualSize);
FIXME(ntdll,"(%p(%s),0x%08lx,0x%08lx,%p),stub!\n",
PageFileName->Buffer, debugstr_w(PageFileName->Buffer),MiniumSize,MaxiumSize,ActualSize);
return 0;
}
/******************************************************************************
* NtDisplayString [NTDLL.95]
*
* writes a string to the nt-textmode screen eg. during startup
*/
NTSTATUS WINAPI NtDisplayString (
PUNICODE_STRING string)
{
TRACE(ntdll,"%p(%s)\n",string->Buffer, debugstr_w(string->Buffer));
WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), string->Buffer, string->Length, 0, 0);
return 0;
}

View File

@ -136,6 +136,8 @@ VOID WINAPI RtlInitString(PSTRING target,LPCSTR source)
*/
VOID WINAPI RtlInitUnicodeString(PUNICODE_STRING target,LPCWSTR source)
{
TRACE(ntdll,"%p %p(%s)\n", target, source, debugstr_w(source));
target->Length = target->MaximumLength = 0;
target->Buffer = (LPWSTR)source;
if (!source)

View File

@ -291,6 +291,7 @@ NTSTATUS WINAPI NtQueryInformationProcess(
IN ULONG ProcessInformationLength,
OUT PULONG ReturnLength);
#define NtCurrentProcess() ( (HANDLE) -1 )
/*
* timer

View File

@ -100,7 +100,7 @@ type win32
092 stub NtDeleteKey
093 stub NtDeleteValueKey
094 stdcall NtDeviceIoControlFile(long long long long long long long long long long) NtDeviceIoControlFile
095 stub NtDisplayString
095 stdcall NtDisplayString(ptr)NtDisplayString
096 stdcall NtDuplicateObject(long long long long long long long) NtDuplicateObject
097 stdcall NtDuplicateToken(long long long long long long) NtDuplicateToken
098 stub NtEnumerateBus
@ -235,7 +235,7 @@ type win32
227 stub NtStopProfile
228 stub NtSuspendThread
229 stub NtSystemDebugControl
230 stub NtTerminateProcess
230 stdcall NtTerminateProcess(long long)NtTerminateProcess
231 stdcall NtTerminateThread(long long) NtTerminateThread
232 stub NtTestAlert
233 stub NtUnloadDriver