Commit d1f10c50 authored by Juergen Schmied's avatar Juergen Schmied Committed by Alexandre Julliard

Implemented NtTerminateProcess and NtDisplayString.

parent 1b34697a
......@@ -68,6 +68,25 @@ NTSTATUS WINAPI NtQueryTimerResolution(DWORD x1,DWORD x2,DWORD x3)
*/
/******************************************************************************
* 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;
}
......@@ -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)
......
......@@ -291,6 +291,7 @@ NTSTATUS WINAPI NtQueryInformationProcess(
IN ULONG ProcessInformationLength,
OUT PULONG ReturnLength);
#define NtCurrentProcess() ( (HANDLE) -1 )
/*
* timer
......
......@@ -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
......
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