1998-11-01 15:00:21 +01:00
|
|
|
/*
|
|
|
|
* NT basis DLL
|
|
|
|
*
|
|
|
|
* This file contains the Nt* API functions of NTDLL.DLL.
|
1999-02-13 08:35:31 +01:00
|
|
|
* In the original ntdll.dll they all seem to just call int 0x2e (down to the HAL)
|
1998-11-01 15:00:21 +01:00
|
|
|
*
|
|
|
|
* Copyright 1996-1998 Marcus Meissner
|
|
|
|
*/
|
|
|
|
|
1999-06-12 16:55:11 +02:00
|
|
|
#include <stdio.h>
|
1998-11-01 15:00:21 +01:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <time.h>
|
1999-02-17 14:51:06 +01:00
|
|
|
#include "debugstr.h"
|
1999-05-23 12:25:25 +02:00
|
|
|
#include "debugtools.h"
|
1999-02-13 08:35:31 +01:00
|
|
|
|
1999-03-09 18:47:51 +01:00
|
|
|
#include "ntddk.h"
|
|
|
|
|
1999-04-19 16:56:29 +02:00
|
|
|
DEFAULT_DEBUG_CHANNEL(ntdll)
|
|
|
|
|
1999-02-13 08:35:31 +01:00
|
|
|
/* move to winbase.h */
|
|
|
|
typedef VOID (CALLBACK *PTIMERAPCROUTINE)(LPVOID lpArgToCompletionRoutine,DWORD dwTimerLowValue,DWORD dwTimerHighValue);
|
|
|
|
|
1999-03-09 18:47:51 +01:00
|
|
|
/*
|
|
|
|
* Timer object
|
|
|
|
*/
|
|
|
|
|
1998-11-01 15:00:21 +01:00
|
|
|
/**************************************************************************
|
|
|
|
* NtCreateTimer [NTDLL.87]
|
|
|
|
*/
|
1999-02-13 08:35:31 +01:00
|
|
|
NTSTATUS WINAPI NtCreateTimer(
|
|
|
|
OUT PHANDLE TimerHandle,
|
|
|
|
IN ACCESS_MASK DesiredAccess,
|
|
|
|
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
|
|
|
|
IN TIMER_TYPE TimerType)
|
1998-11-01 15:00:21 +01:00
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(%p,0x%08lx,%p(%s),0x%08x) stub\n",
|
1999-02-19 17:29:05 +01:00
|
|
|
TimerHandle,DesiredAccess,ObjectAttributes,
|
|
|
|
ObjectAttributes ? debugstr_w(ObjectAttributes->ObjectName->Buffer) : NULL,
|
1999-02-13 08:35:31 +01:00
|
|
|
TimerType);
|
1998-11-01 15:00:21 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
/**************************************************************************
|
|
|
|
* NtSetTimer [NTDLL.221]
|
|
|
|
*/
|
1999-02-13 08:35:31 +01:00
|
|
|
NTSTATUS WINAPI NtSetTimer(
|
1999-02-26 12:11:13 +01:00
|
|
|
IN HANDLE TimerHandle,
|
1999-02-13 08:35:31 +01:00
|
|
|
IN PLARGE_INTEGER DueTime,
|
|
|
|
IN PTIMERAPCROUTINE TimerApcRoutine,
|
|
|
|
IN PVOID TimerContext,
|
1999-02-19 17:29:05 +01:00
|
|
|
IN BOOLEAN WakeTimer,
|
1999-02-13 08:35:31 +01:00
|
|
|
IN ULONG Period OPTIONAL,
|
|
|
|
OUT PBOOLEAN PreviousState OPTIONAL)
|
1998-11-01 15:00:21 +01:00
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(0x%08x,%p,%p,%p,%08x,0x%08lx,%p) stub\n",
|
1999-02-13 08:35:31 +01:00
|
|
|
TimerHandle,DueTime,TimerApcRoutine,TimerContext,WakeTimer,Period,PreviousState);
|
1998-11-01 15:00:21 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
1999-03-09 18:47:51 +01:00
|
|
|
* NtQueryTimerResolution [NTDLL.129]
|
|
|
|
*/
|
|
|
|
NTSTATUS WINAPI NtQueryTimerResolution(DWORD x1,DWORD x2,DWORD x3)
|
1998-11-01 15:00:21 +01:00
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(0x%08lx,0x%08lx,0x%08lx), stub!\n",x1,x2,x3);
|
1999-03-09 18:47:51 +01:00
|
|
|
return 1;
|
1998-11-01 15:00:21 +01:00
|
|
|
}
|
|
|
|
|
1999-03-09 18:47:51 +01:00
|
|
|
/*
|
|
|
|
* Process object
|
1999-02-13 08:35:31 +01:00
|
|
|
*/
|
1998-11-01 15:00:21 +01:00
|
|
|
|
1999-04-11 16:53:24 +02:00
|
|
|
/******************************************************************************
|
|
|
|
* NtTerminateProcess [NTDLL.]
|
|
|
|
*
|
|
|
|
* Native applications must kill themselves when done
|
|
|
|
* FIXME: return value 0-success
|
|
|
|
*/
|
|
|
|
NTSTATUS WINAPI NtTerminateProcess(
|
|
|
|
HANDLE ProcessHandle,
|
|
|
|
LONG ExitStatus)
|
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
TRACE("0x%08x 0x%08lx\n", ProcessHandle, ExitStatus );
|
1999-04-11 16:53:24 +02:00
|
|
|
|
|
|
|
/* win32 (0x7fffffff) to nt (-1) */
|
|
|
|
if ( NtCurrentProcess() == ProcessHandle )
|
|
|
|
ProcessHandle = GetCurrentProcess();
|
|
|
|
|
|
|
|
return (! TerminateProcess( ProcessHandle, ExitStatus ));
|
|
|
|
}
|
|
|
|
|
1998-11-01 15:00:21 +01:00
|
|
|
/******************************************************************************
|
1999-03-09 18:47:51 +01:00
|
|
|
* NtQueryInformationProcess [NTDLL.]
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
NTSTATUS WINAPI NtQueryInformationProcess(
|
|
|
|
IN HANDLE ProcessHandle,
|
|
|
|
IN PROCESSINFOCLASS ProcessInformationClass,
|
|
|
|
OUT PVOID ProcessInformation,
|
|
|
|
IN ULONG ProcessInformationLength,
|
|
|
|
OUT PULONG ReturnLength)
|
1998-11-01 15:00:21 +01:00
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(0x%08x,0x%08x,%p,0x%08lx,%p),stub!\n",
|
1999-03-09 18:47:51 +01:00
|
|
|
ProcessHandle,ProcessInformationClass,ProcessInformation,ProcessInformationLength,ReturnLength);
|
1999-02-13 08:35:31 +01:00
|
|
|
return 0;
|
1998-11-01 15:00:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* NtSetInformationProcess [NTDLL.207]
|
|
|
|
*/
|
1999-02-13 08:35:31 +01:00
|
|
|
NTSTATUS WINAPI NtSetInformationProcess(
|
1999-02-26 12:11:13 +01:00
|
|
|
IN HANDLE ProcessHandle,
|
1999-02-13 08:35:31 +01:00
|
|
|
IN PROCESSINFOCLASS ProcessInformationClass,
|
|
|
|
IN PVOID ProcessInformation,
|
|
|
|
IN ULONG ProcessInformationLength)
|
1998-11-01 15:00:21 +01:00
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(0x%08x,0x%08x,%p,0x%08lx) stub\n",
|
1999-02-13 08:35:31 +01:00
|
|
|
ProcessHandle,ProcessInformationClass,ProcessInformation,ProcessInformationLength);
|
1999-03-09 18:47:51 +01:00
|
|
|
return 0;
|
1998-11-01 15:00:21 +01:00
|
|
|
}
|
|
|
|
|
1999-03-09 18:47:51 +01:00
|
|
|
/*
|
|
|
|
* Thread
|
|
|
|
*/
|
|
|
|
|
1998-11-01 15:00:21 +01:00
|
|
|
/******************************************************************************
|
1999-03-09 18:47:51 +01:00
|
|
|
* NtResumeThread [NTDLL]
|
|
|
|
*/
|
|
|
|
NTSTATUS WINAPI NtResumeThread(
|
|
|
|
IN HANDLE ThreadHandle,
|
|
|
|
IN PULONG SuspendCount)
|
1999-02-13 08:35:31 +01:00
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(0x%08x,%p),stub!\n",
|
1999-03-09 18:47:51 +01:00
|
|
|
ThreadHandle,SuspendCount);
|
1999-02-13 08:35:31 +01:00
|
|
|
return 0;
|
1998-11-01 15:00:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
1999-03-09 18:47:51 +01:00
|
|
|
* NtTerminateThread [NTDLL]
|
1998-11-01 15:00:21 +01:00
|
|
|
*/
|
1999-03-09 18:47:51 +01:00
|
|
|
NTSTATUS WINAPI NtTerminateThread(
|
|
|
|
IN HANDLE ThreadHandle,
|
|
|
|
IN NTSTATUS ExitStatus)
|
1999-02-13 08:35:31 +01:00
|
|
|
{
|
1999-03-09 18:47:51 +01:00
|
|
|
if ( TerminateThread(ThreadHandle,ExitStatus) )
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
return 0xc0000000; /* FIXME: lasterror->ntstatus */
|
1998-11-01 15:00:21 +01:00
|
|
|
}
|
1999-03-09 18:47:51 +01:00
|
|
|
|
1998-11-01 15:00:21 +01:00
|
|
|
/******************************************************************************
|
|
|
|
* NtQueryInformationThread [NTDLL.]
|
|
|
|
*
|
|
|
|
*/
|
1999-02-13 08:35:31 +01:00
|
|
|
NTSTATUS WINAPI NtQueryInformationThread(
|
1999-02-26 12:11:13 +01:00
|
|
|
IN HANDLE ThreadHandle,
|
1999-02-13 08:35:31 +01:00
|
|
|
IN THREADINFOCLASS ThreadInformationClass,
|
|
|
|
OUT PVOID ThreadInformation,
|
|
|
|
IN ULONG ThreadInformationLength,
|
|
|
|
OUT PULONG ReturnLength)
|
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(0x%08x,0x%08x,%p,0x%08lx,%p),stub!\n",
|
1999-02-13 08:35:31 +01:00
|
|
|
ThreadHandle, ThreadInformationClass, ThreadInformation,
|
|
|
|
ThreadInformationLength, ReturnLength);
|
1998-11-01 15:00:21 +01:00
|
|
|
return 0;
|
|
|
|
}
|
1999-03-09 18:47:51 +01:00
|
|
|
|
1998-11-01 15:00:21 +01:00
|
|
|
/******************************************************************************
|
1999-03-09 18:47:51 +01:00
|
|
|
* NtSetInformationThread [NTDLL]
|
|
|
|
*/
|
|
|
|
NTSTATUS WINAPI NtSetInformationThread(
|
|
|
|
HANDLE ThreadHandle,
|
|
|
|
THREADINFOCLASS ThreadInformationClass,
|
|
|
|
PVOID ThreadInformation,
|
|
|
|
ULONG ThreadInformationLength)
|
1999-02-13 08:35:31 +01:00
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(0x%08x,0x%08x,%p,0x%08lx),stub!\n",
|
1999-03-09 18:47:51 +01:00
|
|
|
ThreadHandle, ThreadInformationClass, ThreadInformation, ThreadInformationLength);
|
1998-11-01 15:00:21 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
1999-03-09 18:47:51 +01:00
|
|
|
/*
|
|
|
|
* Token
|
|
|
|
*/
|
|
|
|
|
1998-11-01 15:00:21 +01:00
|
|
|
/******************************************************************************
|
1999-03-09 18:47:51 +01:00
|
|
|
* NtDuplicateToken [NTDLL]
|
1998-11-01 15:00:21 +01:00
|
|
|
*/
|
1999-03-09 18:47:51 +01:00
|
|
|
NTSTATUS WINAPI NtDuplicateToken(
|
|
|
|
IN HANDLE ExistingToken,
|
|
|
|
IN ACCESS_MASK DesiredAccess,
|
|
|
|
IN POBJECT_ATTRIBUTES ObjectAttributes,
|
|
|
|
IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,
|
|
|
|
IN TOKEN_TYPE TokenType,
|
|
|
|
OUT PHANDLE NewToken)
|
1999-02-13 08:35:31 +01:00
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(0x%08x,0x%08lx,%p,0x%08x,0x%08x,%p),stub!\n",
|
1999-03-09 18:47:51 +01:00
|
|
|
ExistingToken, DesiredAccess, ObjectAttributes, ImpersonationLevel,
|
|
|
|
TokenType, NewToken);
|
1998-11-01 15:00:21 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
1999-03-09 18:47:51 +01:00
|
|
|
* NtOpenProcessToken [NTDLL]
|
1998-11-01 15:00:21 +01:00
|
|
|
*/
|
1999-03-09 18:47:51 +01:00
|
|
|
NTSTATUS WINAPI NtOpenProcessToken(
|
|
|
|
HANDLE ProcessHandle,
|
|
|
|
DWORD DesiredAccess,
|
|
|
|
HANDLE *TokenHandle)
|
1999-02-13 08:35:31 +01:00
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(0x%08x,0x%08lx,%p): stub\n",
|
1999-03-09 18:47:51 +01:00
|
|
|
ProcessHandle,DesiredAccess, TokenHandle);
|
|
|
|
*TokenHandle = 0xcafe;
|
1998-11-01 15:00:21 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
1999-03-09 18:47:51 +01:00
|
|
|
* NtOpenThreadToken [NTDLL]
|
1998-11-01 15:00:21 +01:00
|
|
|
*/
|
1999-03-09 18:47:51 +01:00
|
|
|
NTSTATUS WINAPI NtOpenThreadToken(
|
|
|
|
HANDLE ThreadHandle,
|
|
|
|
DWORD DesiredAccess,
|
|
|
|
BOOLEAN OpenAsSelf,
|
|
|
|
HANDLE *TokenHandle)
|
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(0x%08x,0x%08lx,0x%08x,%p): stub\n",
|
1999-03-09 18:47:51 +01:00
|
|
|
ThreadHandle,DesiredAccess, OpenAsSelf, TokenHandle);
|
|
|
|
*TokenHandle = 0xcafe;
|
1998-11-01 15:00:21 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* NtAdjustPrivilegesToken [NTDLL]
|
1999-02-13 08:35:31 +01:00
|
|
|
*
|
|
|
|
* FIXME: parameters unsafe
|
1998-11-01 15:00:21 +01:00
|
|
|
*/
|
|
|
|
NTSTATUS WINAPI NtAdjustPrivilegesToken(
|
1999-02-26 12:11:13 +01:00
|
|
|
IN HANDLE TokenHandle,
|
1999-02-19 17:29:05 +01:00
|
|
|
IN BOOLEAN DisableAllPrivileges,
|
1999-02-13 08:35:31 +01:00
|
|
|
IN PTOKEN_PRIVILEGES NewState,
|
|
|
|
IN DWORD BufferLength,
|
|
|
|
OUT PTOKEN_PRIVILEGES PreviousState,
|
|
|
|
OUT PDWORD ReturnLength)
|
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(0x%08x,0x%08x,%p,0x%08lx,%p,%p),stub!\n",
|
1999-02-13 08:35:31 +01:00
|
|
|
TokenHandle, DisableAllPrivileges, NewState, BufferLength, PreviousState, ReturnLength);
|
1998-11-01 15:00:21 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
1999-03-09 18:47:51 +01:00
|
|
|
* NtQueryInformationToken [NTDLL.156]
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
NTSTATUS WINAPI NtQueryInformationToken(
|
|
|
|
HANDLE token,
|
|
|
|
DWORD tokeninfoclass,
|
|
|
|
LPVOID tokeninfo,
|
|
|
|
DWORD tokeninfolength,
|
|
|
|
LPDWORD retlen )
|
1999-02-13 08:35:31 +01:00
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(%08x,%ld,%p,%ld,%p): stub\n",
|
1999-03-09 18:47:51 +01:00
|
|
|
token,tokeninfoclass,tokeninfo,tokeninfolength,retlen);
|
1998-11-01 15:00:21 +01:00
|
|
|
|
1999-03-09 18:47:51 +01:00
|
|
|
switch (tokeninfoclass)
|
|
|
|
{ case TokenGroups: /* 2 */
|
1999-04-25 21:01:52 +02:00
|
|
|
*retlen = sizeof (TOKEN_GROUPS);
|
|
|
|
#if 0
|
1999-03-09 18:47:51 +01:00
|
|
|
case TokenUser: /* 1 */
|
|
|
|
case TokenPrivileges:
|
|
|
|
case TokenOwner:
|
|
|
|
case TokenPrimaryGroup:
|
|
|
|
case TokenDefaultDacl:
|
|
|
|
case TokenSource:
|
|
|
|
case TokenType:
|
|
|
|
case TokenImpersonationLevel:
|
|
|
|
case TokenStatistics:
|
1999-04-25 21:01:52 +02:00
|
|
|
#endif /* 0 */
|
1999-03-09 18:47:51 +01:00
|
|
|
}
|
1998-11-01 15:00:21 +01:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
1999-03-09 18:47:51 +01:00
|
|
|
/*
|
|
|
|
* Section
|
1998-11-01 15:00:21 +01:00
|
|
|
*/
|
1999-03-09 18:47:51 +01:00
|
|
|
|
1998-11-01 15:00:21 +01:00
|
|
|
/******************************************************************************
|
1999-03-09 18:47:51 +01:00
|
|
|
* NtCreateSection [NTDLL]
|
1998-11-01 15:00:21 +01:00
|
|
|
*/
|
1999-03-09 18:47:51 +01:00
|
|
|
NTSTATUS WINAPI NtCreateSection(
|
|
|
|
OUT PHANDLE SectionHandle,
|
1999-02-13 08:35:31 +01:00
|
|
|
IN ACCESS_MASK DesiredAccess,
|
1999-03-09 18:47:51 +01:00
|
|
|
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
|
|
|
|
IN PLARGE_INTEGER MaximumSize OPTIONAL,
|
|
|
|
IN ULONG SectionPageProtection OPTIONAL,
|
|
|
|
IN ULONG AllocationAttributes,
|
|
|
|
IN HANDLE FileHandle OPTIONAL)
|
1999-02-13 08:35:31 +01:00
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(%p,0x%08lx,%p(%s),%p,0x%08lx,0x%08lx,0x%08x) stub\n",
|
1999-03-09 18:47:51 +01:00
|
|
|
SectionHandle,DesiredAccess,ObjectAttributes,
|
|
|
|
ObjectAttributes ? debugstr_w(ObjectAttributes->ObjectName->Buffer) : NULL,
|
|
|
|
MaximumSize,SectionPageProtection,AllocationAttributes,FileHandle);
|
1998-11-01 15:00:21 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
1999-03-09 18:47:51 +01:00
|
|
|
* NtOpenSection [NTDLL]
|
1998-11-01 15:00:21 +01:00
|
|
|
*/
|
1999-03-09 18:47:51 +01:00
|
|
|
NTSTATUS WINAPI NtOpenSection(
|
|
|
|
PHANDLE SectionHandle,
|
|
|
|
ACCESS_MASK DesiredAccess,
|
|
|
|
POBJECT_ATTRIBUTES ObjectAttributes)
|
1999-02-13 08:35:31 +01:00
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(%p,0x%08lx,%p(%s)),stub!\n",
|
1999-03-09 18:47:51 +01:00
|
|
|
SectionHandle,DesiredAccess,ObjectAttributes,
|
|
|
|
ObjectAttributes ? debugstr_w(ObjectAttributes->ObjectName->Buffer) : NULL);
|
1998-11-01 15:00:21 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
1999-03-09 18:47:51 +01:00
|
|
|
* NtQuerySection [NTDLL]
|
1998-11-01 15:00:21 +01:00
|
|
|
*/
|
1999-03-09 18:47:51 +01:00
|
|
|
NTSTATUS WINAPI NtQuerySection(
|
|
|
|
IN HANDLE SectionHandle,
|
|
|
|
IN PVOID SectionInformationClass,
|
|
|
|
OUT PVOID SectionInformation,
|
|
|
|
IN ULONG Length,
|
|
|
|
OUT PULONG ResultLength)
|
1999-02-13 08:35:31 +01:00
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(0x%08x,%p,%p,0x%08lx,%p) stub!\n",
|
1999-03-09 18:47:51 +01:00
|
|
|
SectionHandle,SectionInformationClass,SectionInformation,Length,ResultLength);
|
1998-11-01 15:00:21 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
1999-02-13 08:35:31 +01:00
|
|
|
* NtMapViewOfSection [NTDLL]
|
|
|
|
* FUNCTION: Maps a view of a section into the virtual address space of a process
|
|
|
|
*
|
|
|
|
* ARGUMENTS:
|
|
|
|
* SectionHandle Handle of the section
|
|
|
|
* ProcessHandle Handle of the process
|
|
|
|
* BaseAddress Desired base address (or NULL) on entry
|
|
|
|
* Actual base address of the view on exit
|
|
|
|
* ZeroBits Number of high order address bits that must be zero
|
|
|
|
* CommitSize Size in bytes of the initially committed section of the view
|
|
|
|
* SectionOffset Offset in bytes from the beginning of the section to the beginning of the view
|
|
|
|
* ViewSize Desired length of map (or zero to map all) on entry
|
|
|
|
Actual length mapped on exit
|
|
|
|
* InheritDisposition Specified how the view is to be shared with
|
|
|
|
* child processes
|
|
|
|
* AllocateType Type of allocation for the pages
|
|
|
|
* Protect Protection for the committed region of the view
|
1998-11-01 15:00:21 +01:00
|
|
|
*/
|
|
|
|
NTSTATUS WINAPI NtMapViewOfSection(
|
1999-02-26 12:11:13 +01:00
|
|
|
HANDLE SectionHandle,
|
|
|
|
HANDLE ProcessHandle,
|
1999-02-13 08:35:31 +01:00
|
|
|
PVOID* BaseAddress,
|
|
|
|
ULONG ZeroBits,
|
|
|
|
ULONG CommitSize,
|
|
|
|
PLARGE_INTEGER SectionOffset,
|
|
|
|
PULONG ViewSize,
|
|
|
|
SECTION_INHERIT InheritDisposition,
|
|
|
|
ULONG AllocationType,
|
|
|
|
ULONG Protect)
|
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(0x%08x,0x%08x,%p,0x%08lx,0x%08lx,%p,%p,0x%08x,0x%08lx,0x%08lx) stub\n",
|
1999-02-13 08:35:31 +01:00
|
|
|
SectionHandle,ProcessHandle,BaseAddress,ZeroBits,CommitSize,SectionOffset,
|
|
|
|
ViewSize,InheritDisposition,AllocationType,Protect);
|
1998-11-01 15:00:21 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
1999-03-09 18:47:51 +01:00
|
|
|
/*
|
|
|
|
* ports
|
1998-11-01 15:00:21 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
/******************************************************************************
|
1999-03-09 18:47:51 +01:00
|
|
|
* NtCreatePort [NTDLL]
|
1998-11-01 15:00:21 +01:00
|
|
|
*/
|
1999-03-09 18:47:51 +01:00
|
|
|
NTSTATUS WINAPI NtCreatePort(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5)
|
1999-02-13 08:35:31 +01:00
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5);
|
1998-11-01 15:00:21 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
1999-03-09 18:47:51 +01:00
|
|
|
* NtConnectPort [NTDLL]
|
1998-11-01 15:00:21 +01:00
|
|
|
*/
|
1999-03-09 18:47:51 +01:00
|
|
|
NTSTATUS WINAPI NtConnectPort(DWORD x1,PUNICODE_STRING uni,DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7,DWORD x8)
|
1999-02-13 08:35:31 +01:00
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(0x%08lx,%s,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",
|
1999-03-09 18:47:51 +01:00
|
|
|
x1,debugstr_w(uni->Buffer),x3,x4,x5,x6,x7,x8);
|
1998-11-01 15:00:21 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
1999-03-09 18:47:51 +01:00
|
|
|
* NtListenPort [NTDLL]
|
1998-11-01 15:00:21 +01:00
|
|
|
*/
|
1999-03-09 18:47:51 +01:00
|
|
|
NTSTATUS WINAPI NtListenPort(DWORD x1,DWORD x2)
|
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(0x%08lx,0x%08lx),stub!\n",x1,x2);
|
1998-11-01 15:00:21 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* NtAcceptConnectPort [NTDLL]
|
|
|
|
*/
|
1999-03-09 18:47:51 +01:00
|
|
|
NTSTATUS WINAPI NtAcceptConnectPort(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6)
|
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5,x6);
|
1998-11-01 15:00:21 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* NtCompleteConnectPort [NTDLL]
|
|
|
|
*/
|
1999-03-09 18:47:51 +01:00
|
|
|
NTSTATUS WINAPI NtCompleteConnectPort(DWORD x1)
|
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(0x%08lx),stub!\n",x1);
|
1998-11-01 15:00:21 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* NtRegisterThreadTerminatePort [NTDLL]
|
|
|
|
*/
|
1999-03-09 18:47:51 +01:00
|
|
|
NTSTATUS WINAPI NtRegisterThreadTerminatePort(DWORD x1)
|
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(0x%08lx),stub!\n",x1);
|
1998-11-01 15:00:21 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
1999-03-09 18:47:51 +01:00
|
|
|
* NtRequestWaitReplyPort [NTDLL]
|
1998-11-01 15:00:21 +01:00
|
|
|
*/
|
1999-03-09 18:47:51 +01:00
|
|
|
NTSTATUS WINAPI NtRequestWaitReplyPort(DWORD x1,DWORD x2,DWORD x3)
|
1999-02-13 08:35:31 +01:00
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3);
|
1999-03-09 18:47:51 +01:00
|
|
|
return 0;
|
1998-11-01 15:00:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
1999-03-09 18:47:51 +01:00
|
|
|
* NtReplyWaitReceivePort [NTDLL]
|
1998-11-01 15:00:21 +01:00
|
|
|
*/
|
1999-03-09 18:47:51 +01:00
|
|
|
NTSTATUS WINAPI NtReplyWaitReceivePort(DWORD x1,DWORD x2,DWORD x3,DWORD x4)
|
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4);
|
1998-11-01 15:00:21 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
1999-03-09 18:47:51 +01:00
|
|
|
/*
|
|
|
|
* Misc
|
1998-11-01 15:00:21 +01:00
|
|
|
*/
|
1999-03-09 18:47:51 +01:00
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* NtSetIntervalProfile [NTDLL]
|
|
|
|
*/
|
|
|
|
NTSTATUS WINAPI NtSetIntervalProfile(DWORD x1,DWORD x2) {
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(0x%08lx,0x%08lx),stub!\n",x1,x2);
|
1998-11-01 15:00:21 +01:00
|
|
|
return 0;
|
|
|
|
}
|
1999-03-09 18:47:51 +01:00
|
|
|
|
1998-12-24 15:34:55 +01:00
|
|
|
/******************************************************************************
|
|
|
|
* NtQueryPerformanceCounter [NTDLL]
|
|
|
|
*/
|
1999-02-19 17:29:05 +01:00
|
|
|
NTSTATUS WINAPI NtQueryPerformanceCounter(
|
1999-02-13 08:35:31 +01:00
|
|
|
IN PLARGE_INTEGER Counter,
|
|
|
|
IN PLARGE_INTEGER Frequency)
|
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(%p, 0%p) stub\n",
|
1999-02-13 08:35:31 +01:00
|
|
|
Counter, Frequency);
|
1998-12-24 15:34:55 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
1999-03-09 18:47:51 +01:00
|
|
|
* NtCreateMailSlotFile [NTDLL]
|
1999-02-13 08:35:31 +01:00
|
|
|
*/
|
1999-03-09 18:47:51 +01:00
|
|
|
NTSTATUS WINAPI NtCreateMailslotFile(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7,DWORD x8)
|
1999-02-13 08:35:31 +01:00
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5,x6,x7,x8);
|
1999-02-13 08:35:31 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
1998-12-24 15:34:55 +01:00
|
|
|
/******************************************************************************
|
1999-03-09 18:47:51 +01:00
|
|
|
* NtQuerySystemInformation [NTDLL.168]
|
|
|
|
*
|
|
|
|
* ARGUMENTS:
|
|
|
|
* SystemInformationClass Index to a certain information structure
|
|
|
|
* SystemTimeAdjustmentInformation SYSTEM_TIME_ADJUSTMENT
|
|
|
|
* SystemCacheInformation SYSTEM_CACHE_INFORMATION
|
|
|
|
* SystemConfigurationInformation CONFIGURATION_INFORMATION
|
|
|
|
* observed (class/len):
|
|
|
|
* 0x0/0x2c
|
|
|
|
* 0x12/0x18
|
|
|
|
* 0x2/0x138
|
|
|
|
* 0x8/0x600
|
|
|
|
* SystemInformation caller supplies storage for the information structure
|
|
|
|
* Length size of the structure
|
|
|
|
* ResultLength Data written
|
1999-02-13 08:35:31 +01:00
|
|
|
*/
|
1999-03-09 18:47:51 +01:00
|
|
|
NTSTATUS WINAPI NtQuerySystemInformation(
|
|
|
|
IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
|
|
|
|
OUT PVOID SystemInformation,
|
|
|
|
IN ULONG Length,
|
|
|
|
OUT PULONG ResultLength)
|
1999-02-13 08:35:31 +01:00
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(0x%08x,%p,0x%08lx,%p) stub\n",
|
1999-03-09 18:47:51 +01:00
|
|
|
SystemInformationClass,SystemInformation,Length,ResultLength);
|
|
|
|
ZeroMemory (SystemInformation, Length);
|
1998-12-24 15:34:55 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
1998-11-01 15:00:21 +01:00
|
|
|
|
1999-02-13 08:35:31 +01:00
|
|
|
/******************************************************************************
|
1999-03-09 18:47:51 +01:00
|
|
|
* NtCreatePagingFile [NTDLL]
|
1999-02-13 08:35:31 +01:00
|
|
|
*/
|
1999-03-09 18:47:51 +01:00
|
|
|
NTSTATUS WINAPI NtCreatePagingFile(
|
|
|
|
IN PUNICODE_STRING PageFileName,
|
|
|
|
IN ULONG MiniumSize,
|
|
|
|
IN ULONG MaxiumSize,
|
|
|
|
OUT PULONG ActualSize)
|
1999-02-13 08:35:31 +01:00
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(%p(%s),0x%08lx,0x%08lx,%p),stub!\n",
|
1999-04-11 16:53:24 +02:00
|
|
|
PageFileName->Buffer, debugstr_w(PageFileName->Buffer),MiniumSize,MaxiumSize,ActualSize);
|
1999-02-13 08:35:31 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
1999-04-11 16:53:24 +02:00
|
|
|
/******************************************************************************
|
|
|
|
* NtDisplayString [NTDLL.95]
|
|
|
|
*
|
|
|
|
* writes a string to the nt-textmode screen eg. during startup
|
|
|
|
*/
|
|
|
|
NTSTATUS WINAPI NtDisplayString (
|
|
|
|
PUNICODE_STRING string)
|
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
TRACE("%p(%s)\n",string->Buffer, debugstr_w(string->Buffer));
|
1999-04-11 16:53:24 +02:00
|
|
|
WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), string->Buffer, string->Length, 0, 0);
|
|
|
|
return 0;
|
|
|
|
}
|