- documented most of the undocumented functions in nt.c

- implemented RtlGetDaclSecurityDescriptor
- stubs for NtEnumerateKey, NtOpenSymbolicLinkObject, NtQueryKey
- stubs for NtRaiseException, RtlRaiseException (this both will crash)
This commit is contained in:
Juergen Schmied 1999-02-13 07:35:31 +00:00 committed by Alexandre Julliard
parent 1ed51af346
commit 6f4435b104
5 changed files with 923 additions and 230 deletions

View File

@ -7,6 +7,7 @@ MODULE = ntdll
C_SRCS = \
nt.c \
reg.c \
rtl.c
all: $(MODULE).o

View File

@ -2,9 +2,7 @@
* NT basis DLL
*
* This file contains the Nt* API functions of NTDLL.DLL.
* In the original ntdll.dll they all seem to just call int 0x2e (down to the
* HAL), so parameter counts/parameters are just guesswork from -debugmsg
* +relay.
* In the original ntdll.dll they all seem to just call int 0x2e (down to the HAL)
*
* Copyright 1996-1998 Marcus Meissner
*/
@ -16,112 +14,240 @@
#include "file.h"
#include "windows.h"
#include "winnls.h"
#include "ntdll.h"
#include "heap.h"
#include "debug.h"
#include "module.h"
#include "debugstr.h"
#include "winreg.h"
#include "winnt.h"
#include "windef.h"
#include "ntdef.h"
#include "ntddk.h"
/* move to winbase.h */
typedef VOID (CALLBACK *PTIMERAPCROUTINE)(LPVOID lpArgToCompletionRoutine,DWORD dwTimerLowValue,DWORD dwTimerHighValue);
/* move to somewhere */
typedef void * POBJDIR_INFORMATION;
/**************************************************************************
* NtOpenFile [NTDLL.127]
* FUNCTION: Opens a file
* ARGUMENTS:
* FileHandle Variable that receives the file handle on return
* DesiredAccess Access desired by the caller to the file
* ObjectAttributes Structue describing the file to be opened
* IoStatusBlock Receives details about the result of the operation
* ShareAccess Type of shared access the caller requires
* OpenOptions Options for the file open
*/
NTSTATUS WINAPI NtOpenFile(
DWORD x1, DWORD flags, DWORD x3, DWORD x4, DWORD alignment, DWORD x6
) {
FIXME(ntdll,"(%08lx,0x%08lx,%08lx,%08lx,%08lx,%08lx): stub\n",
x1,flags,x3,x4,alignment,x6);
OUT PHANDLE FileHandle,
ACCESS_MASK DesiredAccess,
POBJECT_ATTRIBUTES ObjectAttributes,
OUT PIO_STATUS_BLOCK IoStatusBlock,
ULONG ShareAccess,
ULONG OpenOptions)
{
FIXME(ntdll,"(%p,0x%08lx,%p(%s),%p,0x%08lx,0x%08lx) stub\n",
FileHandle, DesiredAccess, ObjectAttributes, debugstr_w(ObjectAttributes->ObjectName->Buffer),
IoStatusBlock, ShareAccess, OpenOptions);
return 0;
}
/**************************************************************************
* NtCreateFile [NTDLL.73]
* FUNCTION: Either causes a new file or directory to be created, or it opens
* an existing file, device, directory or volume, giving the caller a handle
* for the file object. This handle can be used by subsequent calls to
* manipulate data within the file or the file object's state of attributes.
* ARGUMENTS:
* FileHandle Points to a variable which receives the file handle on return
* DesiredAccess Desired access to the file
* ObjectAttributes Structure describing the file
* IoStatusBlock Receives information about the operation on return
* AllocationSize Initial size of the file in bytes
* FileAttributes Attributes to create the file with
* ShareAccess Type of shared access the caller would like to the file
* CreateDisposition Specifies what to do, depending on whether the file already exists
* CreateOptions Options for creating a new file
* EaBuffer Undocumented
* EaLength Undocumented
*/
NTSTATUS WINAPI NtCreateFile(
PHANDLE filehandle, DWORD access, LPLONG attributes, LPLONG status,
LPVOID x5, DWORD x6, DWORD x7, LPLONG x8, DWORD x9, DWORD x10,
LPLONG x11
) {
FIXME(ntdll,"(%p,%lx,%lx,%lx,%p,%08lx,%08lx,%p,%08lx,%08lx,%p): empty stub\n",
filehandle,access,*attributes,*status,x5,x6,x7,x8,x9,x10,x11);
OUT PHANDLE FileHandle,
ACCESS_MASK DesiredAccess,
POBJECT_ATTRIBUTES ObjectAttributes,
OUT PIO_STATUS_BLOCK IoStatusBlock,
PLARGE_INTEGER AllocateSize,
ULONG FileAttributes,
ULONG ShareAccess,
ULONG CreateDisposition,
ULONG CreateOptions,
PVOID EaBuffer,
ULONG EaLength)
{
FIXME(ntdll,"(%p,0x%08lx,%p(%s),%p,%p,0x%08lx,0x%08lx,0x%08lx,0x%08lx,%p,0x%08lx) stub\n",
FileHandle,DesiredAccess,ObjectAttributes,debugstr_w(ObjectAttributes->ObjectName->Buffer),
IoStatusBlock,AllocateSize,FileAttributes,
ShareAccess,CreateDisposition,CreateOptions,EaBuffer,EaLength);
return 0;
}
/**************************************************************************
* NtCreateTimer [NTDLL.87]
*/
NTSTATUS WINAPI NtCreateTimer(DWORD x1, DWORD x2, DWORD x3)
NTSTATUS WINAPI NtCreateTimer(
OUT PHANDLE TimerHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
IN TIMER_TYPE TimerType)
{
FIXME(ntdll,"(%08lx,%08lx,%08lx), empty stub\n",x1,x2,x3);
FIXME(ntdll,"(%p,0x%08lx,%p(%s),0x%08x) stub\n",
TimerHandle,DesiredAccess,ObjectAttributes,debugstr_w(ObjectAttributes->ObjectName->Buffer),
TimerType);
return 0;
}
/**************************************************************************
* NtSetTimer [NTDLL.221]
*/
NTSTATUS WINAPI NtSetTimer(DWORD x1,DWORD x2,DWORD x3,DWORD x4, DWORD x5,DWORD x6)
NTSTATUS WINAPI NtSetTimer(
IN HANDLE32 TimerHandle,
IN PLARGE_INTEGER DueTime,
IN PTIMERAPCROUTINE TimerApcRoutine,
IN PVOID TimerContext,
IN BOOL WakeTimer,
IN ULONG Period OPTIONAL,
OUT PBOOLEAN PreviousState OPTIONAL)
{
FIXME(ntdll,"(%08lx,%08lx,%08lx,%08lx,%08lx,%08lx): empty stub\n",
x1,x2,x3,x4,x5,x6);
FIXME(ntdll,"(0x%08x,%p,%p,%p,%08lx,0x%08lx,%p) stub\n",
TimerHandle,DueTime,TimerApcRoutine,TimerContext,WakeTimer,Period,PreviousState);
return 0;
}
/**************************************************************************
* NtCreateEvent [NTDLL.71]
*/
NTSTATUS WINAPI NtCreateEvent(PHANDLE eventhandle, DWORD desiredaccess,
DWORD attributes, DWORD eventtype, DWORD initialstate)
NTSTATUS WINAPI NtCreateEvent(
OUT PHANDLE EventHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN BOOLEAN ManualReset,
IN BOOLEAN InitialState)
{
FIXME(ntdll,"(%p,%08lx,%08lx,%08lx,%08lx): empty stub\n",
eventhandle,desiredaccess,attributes,eventtype,initialstate);
FIXME(ntdll,"(%p,0x%08lx,%p(%s),%08x,%08x): empty stub\n",
EventHandle,DesiredAccess,ObjectAttributes,debugstr_w(ObjectAttributes->ObjectName->Buffer),
ManualReset,InitialState);
return 0;
}
/**************************************************************************
* NtDeviceIoControlFile [NTDLL.94]
*/
NTSTATUS WINAPI NtDeviceIoControlFile(HANDLE32 filehandle, HANDLE32 event,
DWORD x3, DWORD x4, DWORD x5, UINT32 iocontrolcode,
LPVOID inputbuffer, DWORD inputbufferlength,
LPVOID outputbuffer, DWORD outputbufferlength)
NTSTATUS WINAPI NtDeviceIoControlFile(
IN HANDLE32 DeviceHandle,
IN HANDLE32 Event OPTIONAL,
IN PIO_APC_ROUTINE UserApcRoutine OPTIONAL,
IN PVOID UserApcContext OPTIONAL,
OUT PIO_STATUS_BLOCK IoStatusBlock,
IN ULONG IoControlCode,
IN PVOID InputBuffer,
IN ULONG InputBufferSize,
OUT PVOID OutputBuffer,
IN ULONG OutputBufferSize)
{
FIXME(ntdll,"(%x,%x,%08lx,%08lx,%08lx,%08x,%lx,%lx): empty stub\n",
filehandle,event,x3,x4,x5,iocontrolcode,inputbufferlength,outputbufferlength);
FIXME(ntdll,"(0x%08x,0x%08x,%p,%p,%p,0x%08lx,%p,0x%08lx,%p,0x%08lx): empty stub\n",
DeviceHandle, Event, UserApcRoutine, UserApcContext,
IoStatusBlock, IoControlCode, InputBuffer, InputBufferSize, OutputBuffer, OutputBufferSize);
return 0;
}
/**************************************************************************
* NtOpenDirectoryObject [NTDLL.124]
* FUNCTION: Opens a namespace directory object
* ARGUMENTS:
* DirectoryHandle Variable which receives the directory handle
* DesiredAccess Desired access to the directory
* ObjectAttributes Structure describing the directory
* RETURNS: Status
*/
NTSTATUS WINAPI NtOpenDirectoryObject(DWORD x1,DWORD x2,LPUNICODE_STRING name)
NTSTATUS WINAPI NtOpenDirectoryObject(
PHANDLE DirectoryHandle,
ACCESS_MASK DesiredAccess,
POBJECT_ATTRIBUTES ObjectAttributes)
{
FIXME(ntdll,"(0x%08lx,0x%08lx,%s): stub\n",x1,x2,debugstr_w(name->Buffer));
FIXME(ntdll,"(%p,0x%08lx,%p(%s)): stub\n",
DirectoryHandle, DesiredAccess, ObjectAttributes,debugstr_w(ObjectAttributes->ObjectName->Buffer));
return 0;
}
/******************************************************************************
* NtQueryDirectoryObject [NTDLL.149]
* FUNCTION: Reads information from a namespace directory
* ARGUMENTS:
* DirObjInformation Buffer to hold the data read
* BufferLength Size of the buffer in bytes
* GetNextIndex If TRUE then set ObjectIndex to the index of the next object
* If FALSE then set ObjectIndex to the number of objects in the directory
* IgnoreInputIndex If TRUE start reading at index 0
* If FALSE start reading at the index specified by object index
* ObjectIndex Zero based index into the directory, interpretation depends on IgnoreInputIndex and GetNextIndex
* DataWritten Caller supplied storage for the number of bytes written (or NULL)
*/
NTSTATUS WINAPI NtQueryDirectoryObject( DWORD x1, DWORD x2, DWORD x3, DWORD x4,
DWORD x5, DWORD x6, DWORD x7 )
NTSTATUS WINAPI NtQueryDirectoryObject(
IN HANDLE32 DirObjHandle,
OUT POBJDIR_INFORMATION DirObjInformation,
IN ULONG BufferLength,
IN BOOLEAN GetNextIndex,
IN BOOLEAN IgnoreInputIndex,
IN OUT PULONG ObjectIndex,
OUT PULONG DataWritten OPTIONAL)
{
FIXME(ntdll,"(%lx,%lx,%lx,%lx,%lx,%lx,%lx): stub\n",x1,x2,x3,x4,x5,x6,x7);
FIXME(ntdll,"(0x%08x,%p,0x%08lx,0x%08x,0x%08x,%p,%p) stub\n",
DirObjHandle, DirObjInformation, BufferLength, GetNextIndex,
IgnoreInputIndex, ObjectIndex, DataWritten);
return 0xc0000000; /* We don't have any. Whatever. (Yet.) */
}
/******************************************************************************
* 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
*/
NTSTATUS WINAPI NtQuerySystemInformation( DWORD x1, DWORD x2, DWORD x3, DWORD x4 )
NTSTATUS WINAPI NtQuerySystemInformation(
IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
OUT PVOID SystemInformation,
IN ULONG Length,
OUT PULONG ResultLength)
{
FIXME(ntdll,"(%lx,%lx,%lx,%lx): stub\n",x1,x2,x3,x4);
FIXME(ntdll,"(0x%08x,%p,0x%08lx,%p) stub\n",
SystemInformationClass,SystemInformation,Length,ResultLength);
ZeroMemory (SystemInformation, Length);
return 0;
}
/******************************************************************************
* NtQueryObject [NTDLL.161]
*/
NTSTATUS WINAPI NtQueryObject( DWORD x1, DWORD x2 ,DWORD x3, DWORD x4, DWORD x5 )
NTSTATUS WINAPI NtQueryObject(
IN HANDLE32 ObjectHandle,
IN OBJECT_INFORMATION_CLASS ObjectInformationClass,
OUT PVOID ObjectInformation,
IN ULONG Length,
OUT PULONG ResultLength)
{
FIXME(ntdll,"(0x%lx,%lx,%lx,%lx,%lx): stub\n",x1,x2,x3,x4,x5);
FIXME(ntdll,"(0x%08x,0x%08x,%p,0x%08lx,%p): stub\n",
ObjectHandle, ObjectInformationClass, ObjectInformation, Length, ResultLength);
return 0;
}
@ -129,9 +255,14 @@ NTSTATUS WINAPI NtQueryObject( DWORD x1, DWORD x2 ,DWORD x3, DWORD x4, DWORD x5
/******************************************************************************
* NtSetInformationProcess [NTDLL.207]
*/
NTSTATUS WINAPI NtSetInformationProcess( DWORD x1, DWORD x2, DWORD x3, DWORD x4 )
NTSTATUS WINAPI NtSetInformationProcess(
IN HANDLE32 ProcessHandle,
IN PROCESSINFOCLASS ProcessInformationClass,
IN PVOID ProcessInformation,
IN ULONG ProcessInformationLength)
{
FIXME(ntdll,"(%lx,%lx,%lx,%lx): stub\n",x1,x2,x3,x4);
FIXME(ntdll,"(0x%08x,0x%08x,%p,0x%08lx) stub\n",
ProcessHandle,ProcessInformationClass,ProcessInformation,ProcessInformationLength);
return 0;
}
@ -139,89 +270,115 @@ NTSTATUS WINAPI NtSetInformationProcess( DWORD x1, DWORD x2, DWORD x3, DWORD x4
* NtFsControlFile [NTDLL.108]
*/
NTSTATUS WINAPI NtFsControlFile(
DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7,DWORD x8,
DWORD x9,DWORD x10
) {
FIXME(ntdll,"(0x%08lx,0x%08lx,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,x9,x10);
IN HANDLE32 DeviceHandle,
IN HANDLE32 Event OPTIONAL,
IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
IN PVOID ApcContext OPTIONAL,
OUT PIO_STATUS_BLOCK IoStatusBlock,
IN ULONG IoControlCode,
IN PVOID InputBuffer,
IN ULONG InputBufferSize,
OUT PVOID OutputBuffer,
IN ULONG OutputBufferSize)
{
FIXME(ntdll,"(0x%08x,0x%08x,%p,%p,%p,0x%08lx,%p,0x%08lx,%p,0x%08lx): stub\n",
DeviceHandle,Event,ApcRoutine,ApcContext,IoStatusBlock,IoControlCode,
InputBuffer,InputBufferSize,OutputBuffer,OutputBufferSize);
return 0;
}
/******************************************************************************
* NtOpenKey [NTDLL.129]
* NtQueryTimerResolution [NTDLL.129]
*/
NTSTATUS WINAPI NtOpenKey(DWORD x1,DWORD x2,LPUNICODE_STRING key) {
FIXME(ntdll,"(0x%08lx,0x%08lx,%s),stub!\n",x1,x2,debugstr_w(key->Buffer));
return RegOpenKey32W(HKEY_LOCAL_MACHINE,key->Buffer,(LPHKEY)x1);
}
/******************************************************************************
* NtQueryValueKey [NTDLL.129]
*/
NTSTATUS WINAPI NtQueryValueKey(DWORD x1,LPUNICODE_STRING key,DWORD x3,DWORD x4,DWORD x5,DWORD x6) {
FIXME(ntdll,"(%08lx,%s,%08lx,%08lx,%08lx,%08lx),stub!\n",
x1,debugstr_w(key->Buffer),x3,x4,x5,x6
);
return 0;
}
NTSTATUS WINAPI NtQueryTimerResolution(DWORD x1,DWORD x2,DWORD x3) {
NTSTATUS WINAPI NtQueryTimerResolution(DWORD x1,DWORD x2,DWORD x3)
{
FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx), stub!\n",x1,x2,x3);
return 1;
}
/**************************************************************************
* NtClose [NTDLL.65]
* FUNCTION: Closes a handle reference to an object
* ARGUMENTS:
* Handle handle to close
*/
NTSTATUS WINAPI NtClose(DWORD x1) {
FIXME(ntdll,"(0x%08lx),stub!\n",x1);
NTSTATUS WINAPI NtClose(
HANDLE32 Handle)
{
FIXME(ntdll,"(0x%08x),stub!\n",Handle);
return 1;
}
/******************************************************************************
* NtQueryInformationProcess [NTDLL.]
*
*/
NTSTATUS WINAPI NtQueryInformationProcess(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5) {
FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",
x1,x2,x3,x4,x5
);
NTSTATUS WINAPI NtQueryInformationProcess(
IN HANDLE32 ProcessHandle,
IN PROCESSINFOCLASS ProcessInformationClass,
OUT PVOID ProcessInformation,
IN ULONG ProcessInformationLength,
OUT PULONG ReturnLength)
{
FIXME(ntdll,"(0x%08x,0x%08x,%p,0x%08lx,%p),stub!\n",
ProcessHandle,ProcessInformationClass,ProcessInformation,ProcessInformationLength,ReturnLength);
return 0;
}
/******************************************************************************
* NtQueryInformationThread [NTDLL.]
*
*/
NTSTATUS WINAPI NtQueryInformationThread(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5) {
FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",
x1,x2,x3,x4,x5
);
NTSTATUS WINAPI NtQueryInformationThread(
IN HANDLE32 ThreadHandle,
IN THREADINFOCLASS ThreadInformationClass,
OUT PVOID ThreadInformation,
IN ULONG ThreadInformationLength,
OUT PULONG ReturnLength)
{
FIXME(ntdll,"(0x%08x,0x%08x,%p,0x%08lx,%p),stub!\n",
ThreadHandle, ThreadInformationClass, ThreadInformation,
ThreadInformationLength, ReturnLength);
return 0;
}
/******************************************************************************
* NtQueryInformationToken [NTDLL.156]
*
*/
NTSTATUS WINAPI NtQueryInformationToken(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5) {
NTSTATUS WINAPI NtQueryInformationToken(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5)
{
FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",
x1,x2,x3,x4,x5
);
x1,x2,x3,x4,x5);
return 0;
}
/******************************************************************************
* NtCreatePagingFile [NTDLL]
*/
NTSTATUS WINAPI NtCreatePagingFile(DWORD x1,DWORD x2,DWORD x3,DWORD x4) {
FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4);
NTSTATUS WINAPI NtCreatePagingFile(
IN PUNICODE_STRING PageFileName,
IN ULONG MiniumSize,
IN ULONG MaxiumSize,
OUT PULONG ActualSize)
{
FIXME(ntdll,"(%p,0x%08lx,0x%08lx,%p),stub!\n",
PageFileName,MiniumSize,MaxiumSize,ActualSize);
return 0;
}
/******************************************************************************
* NtDuplicateObject [NTDLL]
*/
NTSTATUS WINAPI NtDuplicateObject(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,
DWORD x6,DWORD x7
) {
FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5,x6,x7);
NTSTATUS WINAPI NtDuplicateObject(
IN HANDLE32 SourceProcessHandle,
IN PHANDLE SourceHandle,
IN HANDLE32 TargetProcessHandle,
OUT PHANDLE TargetHandle,
IN ACCESS_MASK DesiredAccess,
IN BOOLEAN InheritHandle,
ULONG Options)
{
FIXME(ntdll,"(0x%08x,%p,0x%08x,%p,0x%08lx,0x%08x,0x%08lx) stub!\n",
SourceProcessHandle,SourceHandle,TargetProcessHandle,TargetHandle,
DesiredAccess,InheritHandle,Options);
*TargetHandle = 0;
return 0;
}
@ -237,11 +394,19 @@ NTSTATUS WINAPI NtDuplicateToken(
/******************************************************************************
* NtAdjustPrivilegesToken [NTDLL]
*
* FIXME: parameters unsafe
*/
NTSTATUS WINAPI NtAdjustPrivilegesToken(
DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6
) {
FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5,x6);
IN HANDLE32 TokenHandle,
IN BOOL32 DisableAllPrivileges,
IN PTOKEN_PRIVILEGES NewState,
IN DWORD BufferLength,
OUT PTOKEN_PRIVILEGES PreviousState,
OUT PDWORD ReturnLength)
{
FIXME(ntdll,"(0x%08x,0x%08lx,%p,0x%08lx,%p,%p),stub!\n",
TokenHandle, DisableAllPrivileges, NewState, BufferLength, PreviousState, ReturnLength);
return 0;
}
@ -256,8 +421,14 @@ NTSTATUS WINAPI NtOpenProcessToken(DWORD x1,DWORD x2,DWORD x3) {
/******************************************************************************
* NtSetInformationThread [NTDLL]
*/
NTSTATUS WINAPI NtSetInformationThread(DWORD x1,DWORD x2,DWORD x3,DWORD x4) {
FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4);
NTSTATUS WINAPI NtSetInformationThread(
HANDLE32 ThreadHandle,
THREADINFOCLASS ThreadInformationClass,
PVOID ThreadInformation,
ULONG ThreadInformationLength)
{
FIXME(ntdll,"(0x%08x,0x%08x,%p,0x%08lx),stub!\n",
ThreadHandle, ThreadInformationClass, ThreadInformation, ThreadInformationLength);
return 0;
}
@ -265,24 +436,29 @@ NTSTATUS WINAPI NtSetInformationThread(DWORD x1,DWORD x2,DWORD x3,DWORD x4) {
* NtOpenThreadToken [NTDLL]
*/
NTSTATUS WINAPI NtOpenThreadToken(DWORD x1,DWORD x2,DWORD x3,DWORD x4) {
FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4);
FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx) stub\n",x1,x2,x3,x4);
return 0;
}
/******************************************************************************
* NtSetVolumeInformationFile [NTDLL]
*/
NTSTATUS WINAPI NtSetVolumeInformationFile(DWORD x1,DWORD x2,DWORD x3,DWORD x4,
DWORD x5
) {
FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5);
NTSTATUS WINAPI NtSetVolumeInformationFile(
IN HANDLE32 FileHandle,
IN PVOID VolumeInformationClass,
PVOID VolumeInformation,
ULONG Length)
{
FIXME(ntdll,"(0x%08x,%p,%p,0x%08lx) stub\n",
FileHandle,VolumeInformationClass,VolumeInformation,Length);
return 0;
}
/******************************************************************************
* NtCreatePort [NTDLL]
*/
NTSTATUS WINAPI NtCreatePort(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5) {
NTSTATUS WINAPI NtCreatePort(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5)
{
FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5);
return 0;
}
@ -290,63 +466,75 @@ NTSTATUS WINAPI NtCreatePort(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5) {
/******************************************************************************
* NtSetInformationFile [NTDLL]
*/
NTSTATUS WINAPI NtSetInformationFile(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5) {
FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx)\n",x1,x2,x3,x4,x5);
NTSTATUS WINAPI NtSetInformationFile(
HANDLE32 FileHandle,
PIO_STATUS_BLOCK IoStatusBlock,
PVOID FileInformation,
ULONG Length,
FILE_INFORMATION_CLASS FileInformationClass)
{
FIXME(ntdll,"(0x%08x,%p,%p,0x%08lx,0x%08x)\n",
FileHandle,IoStatusBlock,FileInformation,Length,FileInformationClass);
return 0;
}
/******************************************************************************
* NtSetEvent [NTDLL]
*/
NTSTATUS WINAPI NtSetEvent(DWORD x1,DWORD x2) {
FIXME(ntdll,"(0x%08lx,0x%08lx)\n",x1,x2);
NTSTATUS WINAPI NtSetEvent(
IN HANDLE32 EventHandle,
PULONG NumberOfThreadsReleased)
{
FIXME(ntdll,"(0x%08x,%p)\n",
EventHandle, NumberOfThreadsReleased);
return 0;
}
/******************************************************************************
* NtCreateKey [NTDLL]
*/
NTSTATUS WINAPI NtCreateKey(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7) {
FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5,x6,x7);
return 0;
}
/******************************************************************************
* NtQueryInformationFile [NTDLL]
*/
NTSTATUS WINAPI NtQueryInformationFile(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5) {
FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5);
return 0;
}
/******************************************************************************
* NtSetValueKey [NTDLL]
*/
NTSTATUS WINAPI NtSetValueKey(DWORD x1,LPUNICODE_STRING key,DWORD x3,DWORD x4,DWORD x5,DWORD x6) {
FIXME(ntdll,"(0x%08lx,%s,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,debugstr_w(key->Buffer),x3,x4,x5,x6);
NTSTATUS WINAPI NtQueryInformationFile(
HANDLE32 FileHandle,
PIO_STATUS_BLOCK IoStatusBlock,
PVOID FileInformation,
ULONG Length,
FILE_INFORMATION_CLASS FileInformationClass)
{
FIXME(ntdll,"(0x%08x,%p,%p,0x%08lx,0x%08x),stub!\n",
FileHandle,IoStatusBlock,FileInformation,Length,FileInformationClass);
return 0;
}
/******************************************************************************
* NtOpenEvent [NTDLL]
*/
NTSTATUS WINAPI NtOpenEvent(DWORD x1,DWORD x2,DWORD x3) {
FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3);
NTSTATUS WINAPI NtOpenEvent(
OUT PHANDLE EventHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes)
{
FIXME(ntdll,"(%p,0x%08lx,%p(%s)),stub!\n",
EventHandle,DesiredAccess,ObjectAttributes,debugstr_w(ObjectAttributes->ObjectName->Buffer));
return 0;
}
/******************************************************************************
* NtWaitForSingleObject [NTDLL]
*/
NTSTATUS WINAPI NtWaitForSingleObject(DWORD x1,DWORD x2,DWORD x3) {
FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3);
NTSTATUS WINAPI NtWaitForSingleObject(
IN PHANDLE Object,
IN BOOLEAN Alertable,
IN PLARGE_INTEGER Time)
{
FIXME(ntdll,"(%p,0x%08x,%p),stub!\n",Object,Alertable,Time);
return 0;
}
/******************************************************************************
* NtConnectPort [NTDLL]
*/
NTSTATUS WINAPI NtConnectPort(DWORD x1,LPUNICODE_STRING uni,DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7,DWORD x8) {
NTSTATUS WINAPI NtConnectPort(DWORD x1,PUNICODE_STRING uni,DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7,DWORD x8) {
FIXME(ntdll,"(0x%08lx,%s,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,debugstr_w(uni->Buffer),x3,x4,x5,x6,x7,x8);
return 0;
}
@ -370,19 +558,50 @@ NTSTATUS WINAPI NtRequestWaitReplyPort(DWORD x1,DWORD x2,DWORD x3) {
/******************************************************************************
* NtCreateDirectoryObject [NTDLL]
*/
NTSTATUS WINAPI NtCreateDirectoryObject(DWORD x1,DWORD x2,DWORD x3) {
FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3);
NTSTATUS WINAPI NtCreateDirectoryObject(
PHANDLE DirectoryHandle,
ACCESS_MASK DesiredAccess,
POBJECT_ATTRIBUTES ObjectAttributes)
{
FIXME(ntdll,"(%p,0x%08lx,%p(%s)),stub!\n",
DirectoryHandle,DesiredAccess,ObjectAttributes,debugstr_w(ObjectAttributes->ObjectName->Buffer));
return 0;
}
/******************************************************************************
* 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
*/
NTSTATUS WINAPI NtMapViewOfSection(
DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7,
DWORD x8,DWORD x9,DWORD x10
) {
FIXME(ntdll,"(0x%08lx,0x%08lx,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,x9,x10);
HANDLE32 SectionHandle,
HANDLE32 ProcessHandle,
PVOID* BaseAddress,
ULONG ZeroBits,
ULONG CommitSize,
PLARGE_INTEGER SectionOffset,
PULONG ViewSize,
SECTION_INHERIT InheritDisposition,
ULONG AllocationType,
ULONG Protect)
{
FIXME(ntdll,"(0x%08x,0x%08x,%p,0x%08lx,0x%08lx,%p,%p,0x%08x,0x%08lx,0x%08lx) stub\n",
SectionHandle,ProcessHandle,BaseAddress,ZeroBits,CommitSize,SectionOffset,
ViewSize,InheritDisposition,AllocationType,Protect);
return 0;
}
@ -395,13 +614,32 @@ NTSTATUS WINAPI NtCreateMailslotFile(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x
}
/******************************************************************************
* NtReadFile [NTDLL]
* NtReadFile/ZwReadFile [NTDLL]
*
* Parameters
* HANDLE32 FileHandle
* HANDLE32 Event OPTIONAL
* PIO_APC_ROUTINE ApcRoutine OPTIONAL
* PVOID ApcContext OPTIONAL
* PIO_STATUS_BLOCK IoStatusBlock
* PVOID Buffer
* ULONG Length
* PLARGE_INTEGER ByteOffset OPTIONAL
* PULONG Key OPTIONAL
*/
NTSTATUS WINAPI NtReadFile(
DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7,
DWORD x8,DWORD x9
) {
FIXME(ntdll,"(0x%08lx,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,x9);
NTSTATUS WINAPI NtReadFile (
HANDLE32 FileHandle,
HANDLE32 EventHandle,
PIO_APC_ROUTINE ApcRoutine,
PVOID ApcContext,
PIO_STATUS_BLOCK IoStatusBlock,
PVOID Buffer,
ULONG Length,
PLARGE_INTEGER ByteOffset,
PULONG Key)
{
FIXME(ntdll,"(0x%08x,0x%08x,%p,%p,%p,%p,0x%08lx,%p,%p),stub!\n",
FileHandle,EventHandle,ApcRoutine,ApcContext,IoStatusBlock,Buffer,Length,ByteOffset,Key);
return 0;
}
@ -410,17 +648,29 @@ NTSTATUS WINAPI NtReadFile(
* NtCreateSection [NTDLL]
*/
NTSTATUS WINAPI NtCreateSection(
DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7
) {
FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5,x6,x7);
OUT PHANDLE SectionHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
IN PLARGE_INTEGER MaximumSize OPTIONAL,
IN ULONG SectionPageProtection OPTIONAL,
IN ULONG AllocationAttributes,
IN HANDLE32 FileHandle OPTIONAL)
{
FIXME(ntdll,"(%p,0x%08lx,%p(%s),%p,0x%08lx,0x%08lx,0x%08x) stub\n",
SectionHandle,DesiredAccess,ObjectAttributes,debugstr_w(ObjectAttributes->ObjectName->Buffer),
MaximumSize,SectionPageProtection,AllocationAttributes,FileHandle);
return 0;
}
/******************************************************************************
* NtResumeThread [NTDLL]
*/
NTSTATUS WINAPI NtResumeThread(DWORD x1,DWORD x2) {
FIXME(ntdll,"(0x%08lx,0x%08lx),stub!\n",x1,x2);
NTSTATUS WINAPI NtResumeThread(
IN HANDLE32 ThreadHandle,
IN PULONG SuspendCount)
{
FIXME(ntdll,"(0x%08x,%p),stub!\n",
ThreadHandle,SuspendCount);
return 0;
}
@ -459,8 +709,11 @@ NTSTATUS WINAPI NtRegisterThreadTerminatePort(DWORD x1) {
/******************************************************************************
* NtTerminateThread [NTDLL]
*/
NTSTATUS WINAPI NtTerminateThread(HANDLE32 hThread,DWORD exitcode) {
BOOL32 ret = TerminateThread(hThread,exitcode);
NTSTATUS WINAPI NtTerminateThread(
IN HANDLE32 ThreadHandle,
IN NTSTATUS ExitStatus)
{
BOOL32 ret = TerminateThread(ThreadHandle,ExitStatus);
if (ret)
return 0;
@ -478,22 +731,38 @@ NTSTATUS WINAPI NtSetIntervalProfile(DWORD x1,DWORD x2) {
/******************************************************************************
* NtOpenSection [NTDLL]
*/
NTSTATUS WINAPI NtOpenSection(DWORD x1,DWORD x2,DWORD x3) {
FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3);
NTSTATUS WINAPI NtOpenSection(
PHANDLE SectionHandle,
ACCESS_MASK DesiredAccess,
POBJECT_ATTRIBUTES ObjectAttributes)
{
FIXME(ntdll,"(%p,0x%08lx,%p(%s)),stub!\n",
SectionHandle,DesiredAccess,ObjectAttributes,debugstr_w(ObjectAttributes->ObjectName->Buffer));
return 0;
}
/******************************************************************************
* NtQueryPerformanceCounter [NTDLL]
*/
BOOL32 WINAPI NtQueryPerformanceCounter(DWORD x1,DWORD x2) {
FIXME(ntdll,"(0x%08lx, 0x%08lx) stub!\n",x1,x2);
BOOL32 WINAPI NtQueryPerformanceCounter(
IN PLARGE_INTEGER Counter,
IN PLARGE_INTEGER Frequency)
{
FIXME(ntdll,"(%p, 0%p) stub\n",
Counter, Frequency);
return 0;
}
/******************************************************************************
* NtQuerySection [NTDLL]
*/
NTSTATUS WINAPI NtQuerySection(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5) {
FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx) stub!\n",x1,x2,x3,x4,x5);
NTSTATUS WINAPI NtQuerySection(
IN HANDLE32 SectionHandle,
IN PVOID SectionInformationClass,
OUT PVOID SectionInformation,
IN ULONG Length,
OUT PULONG ResultLength)
{
FIXME(ntdll,"(0x%08x,%p,%p,0x%08lx,%p) stub!\n",
SectionHandle,SectionInformationClass,SectionInformation,Length,ResultLength);
return 0;
}
@ -505,18 +774,96 @@ NTSTATUS WINAPI NtQuerySecurityObject(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD
return 0;
}
/******************************************************************************
* NtQuerySemaphore [NTDLL]
* NtCreateSemaphore [NTDLL]
*/
NTSTATUS WINAPI NtQuerySemaphore(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5) {
FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx) stub!\n",x1,x2,x3,x4,x5);
NTSTATUS WINAPI NtCreateSemaphore(
OUT PHANDLE SemaphoreHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
IN ULONG InitialCount,
IN ULONG MaximumCount)
{
FIXME(ntdll,"(%p,0x%08lx,%p(%s),0x%08lx,0x%08lx) stub!\n",
SemaphoreHandle, DesiredAccess, ObjectAttributes, debugstr_w(ObjectAttributes->ObjectName->Buffer),
InitialCount, MaximumCount);
return 0;
}
/******************************************************************************
* NtOpenSemaphore [NTDLL]
*/
NTSTATUS WINAPI NtOpenSemaphore(
IN HANDLE32 SemaphoreHandle,
IN ACCESS_MASK DesiredAcces,
IN POBJECT_ATTRIBUTES ObjectAttributes)
{
FIXME(ntdll,"(0x%08x,0x%08lx,%p(%s)) stub!\n",
SemaphoreHandle, DesiredAcces, ObjectAttributes,debugstr_w(ObjectAttributes->ObjectName->Buffer));
return 0;
}
/******************************************************************************
* NtEnumerateValueKey [NTDLL]
* NtQuerySemaphore [NTDLL]
*/
NTSTATUS WINAPI NtEnumerateValueKey(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5, DWORD x6) {
FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx) stub!\n",x1,x2,x3,x4,x5, x6);
return 1;
NTSTATUS WINAPI NtQuerySemaphore(
HANDLE32 SemaphoreHandle,
PVOID SemaphoreInformationClass,
OUT PVOID SemaphoreInformation,
ULONG Length,
PULONG ReturnLength)
{
FIXME(ntdll,"(0x%08x,%p,%p,0x%08lx,%p) stub!\n",
SemaphoreHandle, SemaphoreInformationClass, SemaphoreInformation, Length, ReturnLength);
return 0;
}
/******************************************************************************
* NtQuerySemaphore [NTDLL]
*/
NTSTATUS WINAPI NtReleaseSemaphore(
IN HANDLE32 SemaphoreHandle,
IN ULONG ReleaseCount,
IN PULONG PreviousCount)
{
FIXME(ntdll,"(0x%08x,0x%08lx,%p,) stub!\n",
SemaphoreHandle, ReleaseCount, PreviousCount);
return 0;
}
/******************************************************************************
* NtCreateSymbolicLinkObject [NTDLL]
*/
NTSTATUS WINAPI NtCreateSymbolicLinkObject(
OUT PHANDLE SymbolicLinkHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN PUNICODE_STRING Name)
{
FIXME(ntdll,"(%p,0x%08lx,%p(%s), %p) stub\n",
SymbolicLinkHandle, DesiredAccess, ObjectAttributes, debugstr_w(ObjectAttributes->ObjectName->Buffer), Name);
return 0;
}
/******************************************************************************
* NtOpenSymbolicLinkObject [NTDLL]
*/
NTSTATUS WINAPI NtOpenSymbolicLinkObject(
OUT PHANDLE LinkHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes)
{
FIXME(ntdll,"(%p,0x%08lx,%p(%s)) stub\n",
LinkHandle, DesiredAccess, ObjectAttributes,debugstr_w(ObjectAttributes->ObjectName->Buffer));
return 0;
}
/******************************************************************************
* NtQuerySymbolicLinkObject [NTDLL]
*/
NTSTATUS NtQuerySymbolicLinkObject(
IN HANDLE32 LinkHandle,
IN OUT PUNICODE_STRING LinkTarget,
OUT PULONG ReturnedLength OPTIONAL)
{
FIXME(ntdll,"(0x%08x,%p,%p) stub\n",
LinkHandle, LinkTarget, ReturnedLength);
return 0;
}

285
dlls/ntdll/reg.c Normal file
View File

@ -0,0 +1,285 @@
#include "win.h"
#include "debug.h"
#include "windows.h"
#include "winreg.h"
#include "ntdll.h"
#include "ntddk.h"
/******************************************************************************
* NtCreateKey [NTDLL]
* ZwCreateKey
*/
NTSTATUS WINAPI NtCreateKey(
PHANDLE KeyHandle,
ACCESS_MASK DesiredAccess,
POBJECT_ATTRIBUTES ObjectAttributes,
ULONG TitleIndex,
PUNICODE_STRING Class,
ULONG CreateOptions,
PULONG Disposition)
{
FIXME(ntdll,"(%p,0x%08lx,%p (%s),0x%08lx, %p(%s),0x%08lx,%p),stub!\n",
KeyHandle, DesiredAccess, ObjectAttributes,debugstr_w(ObjectAttributes->ObjectName->Buffer),
TitleIndex, Class, debugstr_w(Class->Buffer), CreateOptions, Disposition);
return 0;
}
/******************************************************************************
* NtDeleteKey [NTDLL]
* ZwDeleteKey
*/
NTSTATUS NtDeleteKey(HANDLE32 KeyHandle)
{
FIXME(ntdll,"(0x%08x) stub!\n",
KeyHandle);
return 1;
}
/******************************************************************************
* NtDeleteValueKey [NTDLL]
* ZwDeleteValueKey
*/
NTSTATUS WINAPI NtDeleteValueKey(
IN HANDLE32 KeyHandle,
IN PUNICODE_STRING ValueName)
{
FIXME(ntdll,"(0x%08x,%p(%s)) stub!\n",
KeyHandle, ValueName,debugstr_w(ValueName->Buffer));
return 1;
}
/******************************************************************************
* NtEnumerateKey [NTDLL]
* ZwEnumerateKey
*/
NTSTATUS WINAPI NtEnumerateKey(
HANDLE32 KeyHandle,
ULONG Index,
KEY_INFORMATION_CLASS KeyInformationClass,
PVOID KeyInformation,
ULONG Length,
PULONG ResultLength)
{
FIXME(ntdll,"(0x%08x,0x%08lx,0x%08x,%p,0x%08lx,%p) stub\n",
KeyHandle, Index, KeyInformationClass, KeyInformation, Length, ResultLength);
return 1;
}
/******************************************************************************
* NtEnumerateValueKey [NTDLL]
* ZwEnumerateValueKey
*/
NTSTATUS WINAPI NtEnumerateValueKey(
HANDLE32 KeyHandle,
ULONG Index,
KEY_VALUE_INFORMATION_CLASS KeyInformationClass,
PVOID KeyInformation,
ULONG Length,
PULONG ResultLength)
{
FIXME(ntdll,"(0x%08x,0x%08lx,0x%08x,%p,0x%08lx,%p) stub!\n",
KeyHandle, Index, KeyInformationClass, KeyInformation, Length, ResultLength);
return 1;
}
/******************************************************************************
* NtFlushKey [NTDLL]
* ZwFlushKey
*/
NTSTATUS NtFlushKey(HANDLE32 KeyHandle)
{
FIXME(ntdll,"(0x%08x) stub!\n",
KeyHandle);
return 1;
}
/******************************************************************************
* NtLoadKey [NTDLL]
* ZwLoadKey
*/
NTSTATUS WINAPI NtLoadKey(
PHANDLE KeyHandle,
POBJECT_ATTRIBUTES ObjectAttributes)
{
FIXME(ntdll,"(%p,%p (%s)),stub!\n",
KeyHandle, ObjectAttributes,debugstr_w(ObjectAttributes->ObjectName->Buffer));
return 0;
}
/******************************************************************************
* NtNotifyChangeKey [NTDLL]
* ZwNotifyChangeKey
*/
NTSTATUS WINAPI NtNotifyChangeKey(
IN HANDLE32 KeyHandle,
IN HANDLE32 Event,
IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
IN PVOID ApcContext OPTIONAL,
OUT PIO_STATUS_BLOCK IoStatusBlock,
IN ULONG CompletionFilter,
IN BOOLEAN Asynchroneous,
OUT PVOID ChangeBuffer,
IN ULONG Length,
IN BOOLEAN WatchSubtree)
{
FIXME(ntdll,"(0x%08x,0x%08x,%p,%p,%p,0x%08lx, 0x%08x,%p,0x%08lx,0x%08x) stub!\n",
KeyHandle, Event, ApcRoutine, ApcContext, IoStatusBlock, CompletionFilter,
Asynchroneous, ChangeBuffer, Length, WatchSubtree);
return 0;
}
/******************************************************************************
* NtOpenKey [NTDLL.129]
* ZwOpenKey
* OUT PHANDLE KeyHandle,
* IN ACCESS_MASK DesiredAccess,
* IN POBJECT_ATTRIBUTES ObjectAttributes
*/
NTSTATUS WINAPI NtOpenKey(
PHANDLE KeyHandle,
ACCESS_MASK DesiredAccess,
POBJECT_ATTRIBUTES ObjectAttributes)
{
FIXME(ntdll,"(%p,0x%08lx,%p (%s)),stub!\n",
KeyHandle, DesiredAccess, ObjectAttributes,debugstr_w(ObjectAttributes->ObjectName->Buffer));
return 0;
}
/******************************************************************************
* NtQueryKey [NTDLL]
* ZwQueryKey
*/
NTSTATUS WINAPI NtQueryKey(
HANDLE32 KeyHandle,
KEY_INFORMATION_CLASS KeyInformationClass,
PVOID KeyInformation,
ULONG Length,
PULONG ResultLength)
{
FIXME(ntdll,"(0x%08x,0x%08x,%p,0x%08lx,%p) stub\n",
KeyHandle, KeyInformationClass, KeyInformation, Length, ResultLength);
return 0;
}
/******************************************************************************
* NtQueryMultipleValueKey [NTDLL]
* ZwQueryMultipleValueKey
*/
NTSTATUS WINAPI NtQueryMultipleValueKey(
HANDLE32 KeyHandle,
PVALENTW ListOfValuesToQuery,
ULONG NumberOfItems,
PVOID MultipleValueInformation,
ULONG Length,
PULONG ReturnLength)
{
FIXME(ntdll,"(0x%08x,%p,0x%08lx,%p,0x%08lx,%p) stub!\n",
KeyHandle, ListOfValuesToQuery, NumberOfItems, MultipleValueInformation,
Length,ReturnLength);
return 0;
}
/******************************************************************************
* NtQueryValueKey [NTDLL]
* ZwQueryValueKey
*/
NTSTATUS WINAPI NtQueryValueKey(
HANDLE32 KeyHandle,
PUNICODE_STRING ValueName,
KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
PVOID KeyValueInformation,
ULONG Length,
PULONG ResultLength)
{
FIXME(ntdll,"(0x%08x,%p,0x%08x,%p,0x%08lx,%p) stub\n",
KeyHandle, ValueName, KeyValueInformationClass, KeyValueInformation, Length, ResultLength);
return 0;
}
/******************************************************************************
* NtReplaceKey [NTDLL]
* ZwReplaceKey
*/
NTSTATUS WINAPI NtReplaceKey(
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN HANDLE32 Key,
IN POBJECT_ATTRIBUTES ReplacedObjectAttributes)
{
FIXME(ntdll,"(%p(%s),0x%08x,%p (%s)),stub!\n",
ObjectAttributes,debugstr_w(ObjectAttributes->ObjectName->Buffer),Key,
ReplacedObjectAttributes,debugstr_w(ReplacedObjectAttributes->ObjectName->Buffer));
return 0;
}
/******************************************************************************
* NtRestoreKey [NTDLL]
* ZwRestoreKey
*/
NTSTATUS WINAPI NtRestoreKey(
HANDLE32 KeyHandle,
HANDLE32 FileHandle,
ULONG RestoreFlags)
{
FIXME(ntdll,"(0x%08x,0x%08x,0x%08lx) stub\n",
KeyHandle, FileHandle, RestoreFlags);
return 0;
}
/******************************************************************************
* NtSaveKey [NTDLL]
* ZwSaveKey
*/
NTSTATUS WINAPI NtSaveKey(
IN HANDLE32 KeyHandle,
IN HANDLE32 FileHandle)
{
FIXME(ntdll,"(0x%08x,0x%08x) stub\n",
KeyHandle, FileHandle);
return 0;
}
/******************************************************************************
* NtSetInformationKey [NTDLL]
* ZwSetInformationKey
*/
NTSTATUS WINAPI NtSetInformationKey(
IN HANDLE32 KeyHandle,
IN const int KeyInformationClass,
IN PVOID KeyInformation,
IN ULONG KeyInformationLength)
{
FIXME(ntdll,"(0x%08x,0x%08x,%p,0x%08lx) stub\n",
KeyHandle, KeyInformationClass, KeyInformation, KeyInformationLength);
return 0;
}
/******************************************************************************
* NtSetValueKey [NTDLL]
* ZwSetValueKey
*/
NTSTATUS WINAPI NtSetValueKey(
HANDLE32 KeyHandle,
PUNICODE_STRING ValueName,
ULONG TitleIndex,
ULONG Type,
PVOID Data,
ULONG DataSize)
{
FIXME(ntdll,"(0x%08x,%p(%s), 0x%08lx, 0x%08lx, %p, 0x%08lx) stub!\n",
KeyHandle, ValueName,debugstr_w(ValueName->Buffer), TitleIndex, Type, Data, DataSize);
return 1;
}
/******************************************************************************
* NtUnloadKey [NTDLL]
* ZwUnloadKey
*/
NTSTATUS WINAPI NtUnloadKey(
IN HANDLE32 KeyHandle)
{
FIXME(ntdll,"(0x%08x) stub\n",
KeyHandle);
return 0;
}

View File

@ -23,8 +23,12 @@
#include "module.h"
#include "heap.h"
#include "debugstr.h"
#include "ntdef.h"
#include "winreg.h"
/* fixme: move to windef.h*/
typedef BOOL32 *LPBOOL;
/**************************************************************************
* RtlLengthRequiredSid [NTDLL.427]
*/
@ -36,7 +40,7 @@ DWORD WINAPI RtlLengthRequiredSid(DWORD nrofsubauths)
/**************************************************************************
* RtlLengthSid [NTDLL.429]
*/
DWORD WINAPI RtlLengthSid(LPSID sid)
DWORD WINAPI RtlLengthSid(PSID sid)
{ TRACE(ntdll,"sid=%p\n",sid);
if (!sid)
return FALSE;
@ -49,7 +53,7 @@ DWORD WINAPI RtlLengthSid(LPSID sid)
* NOTES
* This should return NTSTATUS
*/
DWORD WINAPI RtlCreateAcl(LPACL acl,DWORD size,DWORD rev)
DWORD WINAPI RtlCreateAcl(PACL acl,DWORD size,DWORD rev)
{
if (rev!=ACL_REVISION)
return STATUS_INVALID_PARAMETER;
@ -70,7 +74,9 @@ DWORD WINAPI RtlCreateAcl(LPACL acl,DWORD size,DWORD rev)
* looks for the AceCount+1 ACE, and if it is still within the alloced
* ACL, return a pointer to it
*/
BOOL32 WINAPI RtlFirstFreeAce(LPACL acl,LPACE_HEADER *x)
BOOL32 WINAPI RtlFirstFreeAce(
PACL acl,
LPACE_HEADER *x)
{
LPACE_HEADER ace;
int i;
@ -91,9 +97,12 @@ BOOL32 WINAPI RtlFirstFreeAce(LPACL acl,LPACE_HEADER *x)
/**************************************************************************
* RtlAddAce [NTDLL.260]
*/
DWORD /* NTSTATUS */
WINAPI RtlAddAce(LPACL acl,DWORD rev,DWORD xnrofaces,
LPACE_HEADER acestart,DWORD acelen)
NTSTATUS WINAPI RtlAddAce(
PACL acl,
DWORD rev,
DWORD xnrofaces,
LPACE_HEADER acestart,
DWORD acelen)
{
LPACE_HEADER ace,targetace;
int nrofaces;
@ -111,35 +120,44 @@ WINAPI RtlAddAce(LPACL acl,DWORD rev,DWORD xnrofaces,
return STATUS_INVALID_PARAMETER;
memcpy((LPBYTE)targetace,acestart,acelen);
acl->AceCount+=nrofaces;
return 0;
return STATUS_SUCCESS;
}
/**************************************************************************
* RtlCreateSecurityDescriptor [NTDLL.313]
*
* RETURNS:
* 0 success,
* STATUS_INVALID_OWNER, STATUS_PRIVILEGE_NOT_HELD, STATUS_NO_INHERITANCE,
* STATUS_NO_MEMORY
*/
DWORD /* NTSTATUS */
WINAPI RtlCreateSecurityDescriptor(LPSECURITY_DESCRIPTOR lpsd,DWORD rev)
NTSTATUS WINAPI RtlCreateSecurityDescriptor(
PSECURITY_DESCRIPTOR lpsd,
DWORD rev)
{
if (rev!=SECURITY_DESCRIPTOR_REVISION)
return STATUS_UNKNOWN_REVISION;
memset(lpsd,'\0',sizeof(*lpsd));
lpsd->Revision = SECURITY_DESCRIPTOR_REVISION;
return 0;
return STATUS_SUCCESS;
}
/**************************************************************************
* RtlSetDaclSecurityDescriptor [NTDLL.483]
*/
DWORD /* NTSTATUS */
WINAPI RtlSetDaclSecurityDescriptor ( LPSECURITY_DESCRIPTOR lpsd,BOOL32 daclpresent,LPACL dacl,BOOL32 dacldefaulted )
NTSTATUS WINAPI RtlSetDaclSecurityDescriptor (
PSECURITY_DESCRIPTOR lpsd,
BOOL32 daclpresent,
PACL dacl,
BOOL32 dacldefaulted )
{
if (lpsd->Revision!=SECURITY_DESCRIPTOR_REVISION)
return STATUS_UNKNOWN_REVISION;
if (lpsd->Control & SE_SELF_RELATIVE)
return STATUS_INVALID_SECURITY_DESCR;
if (!daclpresent) {
lpsd->Control &= ~SE_DACL_PRESENT;
return 0;
if (!daclpresent)
{ lpsd->Control &= ~SE_DACL_PRESENT;
return TRUE;
}
lpsd->Control |= SE_DACL_PRESENT;
lpsd->Dacl = dacl;
@ -147,16 +165,18 @@ WINAPI RtlSetDaclSecurityDescriptor ( LPSECURITY_DESCRIPTOR lpsd,BOOL32 daclpres
lpsd->Control |= SE_DACL_DEFAULTED;
else
lpsd->Control &= ~SE_DACL_DEFAULTED;
return 0;
return STATUS_SUCCESS;
}
/**************************************************************************
* RtlSetSaclSecurityDescriptor [NTDLL.488]
*/
DWORD /* NTSTATUS */
WINAPI RtlSetSaclSecurityDescriptor (
LPSECURITY_DESCRIPTOR lpsd,BOOL32 saclpresent,LPACL sacl,BOOL32 sacldefaulted
)
DWORD WINAPI RtlSetSaclSecurityDescriptor (
PSECURITY_DESCRIPTOR lpsd,
BOOL32 saclpresent,
PACL sacl,
BOOL32 sacldefaulted)
{
if (lpsd->Revision!=SECURITY_DESCRIPTOR_REVISION)
return STATUS_UNKNOWN_REVISION;
@ -172,14 +192,16 @@ LPSECURITY_DESCRIPTOR lpsd,BOOL32 saclpresent,LPACL sacl,BOOL32 sacldefaulted
lpsd->Control |= SE_SACL_DEFAULTED;
else
lpsd->Control &= ~SE_SACL_DEFAULTED;
return 0;
return STATUS_SUCCESS;
}
/**************************************************************************
* RtlSetOwnerSecurityDescriptor [NTDLL.487]
*/
DWORD /* NTSTATUS */
WINAPI RtlSetOwnerSecurityDescriptor (LPSECURITY_DESCRIPTOR lpsd,LPSID owner,BOOL32 ownerdefaulted)
NTSTATUS WINAPI RtlSetOwnerSecurityDescriptor(
PSECURITY_DESCRIPTOR lpsd,
PSID owner,
BOOL32 ownerdefaulted)
{
if (lpsd->Revision!=SECURITY_DESCRIPTOR_REVISION)
return STATUS_UNKNOWN_REVISION;
@ -191,14 +213,16 @@ WINAPI RtlSetOwnerSecurityDescriptor (LPSECURITY_DESCRIPTOR lpsd,LPSID owner,BOO
lpsd->Control |= SE_OWNER_DEFAULTED;
else
lpsd->Control &= ~SE_OWNER_DEFAULTED;
return 0;
return STATUS_SUCCESS;
}
/**************************************************************************
* RtlSetGroupSecurityDescriptor [NTDLL.485]
*/
DWORD /* NTSTATUS */
WINAPI RtlSetGroupSecurityDescriptor (LPSECURITY_DESCRIPTOR lpsd,LPSID group,BOOL32 groupdefaulted)
NTSTATUS WINAPI RtlSetGroupSecurityDescriptor (
PSECURITY_DESCRIPTOR lpsd,
PSID group,
BOOL32 groupdefaulted)
{
if (lpsd->Revision!=SECURITY_DESCRIPTOR_REVISION)
return STATUS_UNKNOWN_REVISION;
@ -210,7 +234,7 @@ WINAPI RtlSetGroupSecurityDescriptor (LPSECURITY_DESCRIPTOR lpsd,LPSID group,BOO
lpsd->Control |= SE_GROUP_DEFAULTED;
else
lpsd->Control &= ~SE_GROUP_DEFAULTED;
return 0;
return STATUS_SUCCESS;
}
@ -226,39 +250,39 @@ LPVOID WINAPI RtlNormalizeProcessParams(LPVOID x)
/**************************************************************************
* RtlInitializeSid [NTDLL.410]
*/
DWORD WINAPI RtlInitializeSid(LPSID lpsid,LPSID_IDENTIFIER_AUTHORITY lpsidauth,
DWORD WINAPI RtlInitializeSid(PSID PSID,PSID_IDENTIFIER_AUTHORITY PSIDauth,
DWORD c)
{
BYTE a = c&0xff;
if (a>=SID_MAX_SUB_AUTHORITIES)
return a;
lpsid->SubAuthorityCount = a;
lpsid->Revision = SID_REVISION;
memcpy(&(lpsid->IdentifierAuthority),lpsidauth,sizeof(SID_IDENTIFIER_AUTHORITY));
return 0;
PSID->SubAuthorityCount = a;
PSID->Revision = SID_REVISION;
memcpy(&(PSID->IdentifierAuthority),PSIDauth,sizeof(SID_IDENTIFIER_AUTHORITY));
return STATUS_SUCCESS;
}
/**************************************************************************
* RtlSubAuthoritySid [NTDLL.497]
*/
LPDWORD WINAPI RtlSubAuthoritySid(LPSID lpsid,DWORD nr)
LPDWORD WINAPI RtlSubAuthoritySid(PSID PSID,DWORD nr)
{
return &(lpsid->SubAuthority[nr]);
return &(PSID->SubAuthority[nr]);
}
/**************************************************************************
* RtlSubAuthorityCountSid [NTDLL.496]
*/
LPBYTE WINAPI RtlSubAuthorityCountSid(LPSID lpsid)
LPBYTE WINAPI RtlSubAuthorityCountSid(PSID PSID)
{
return ((LPBYTE)lpsid)+1;
return ((LPBYTE)PSID)+1;
}
/**************************************************************************
* RtlCopySid [NTDLL.302]
*/
DWORD WINAPI RtlCopySid(DWORD len,LPSID to,LPSID from)
DWORD WINAPI RtlCopySid(DWORD len,PSID to,PSID from)
{ if (!from)
return 0;
if (len<(from->SubAuthorityCount*4+8))
@ -271,7 +295,7 @@ DWORD WINAPI RtlCopySid(DWORD len,LPSID to,LPSID from)
* RtlAnsiStringToUnicodeString [NTDLL.269]
*/
DWORD /* NTSTATUS */
WINAPI RtlAnsiStringToUnicodeString(LPUNICODE_STRING uni,LPANSI_STRING ansi,BOOL32 doalloc)
WINAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING uni,PANSI_STRING ansi,BOOL32 doalloc)
{
DWORD unilen = (ansi->Length+1)*sizeof(WCHAR);
@ -294,7 +318,7 @@ WINAPI RtlAnsiStringToUnicodeString(LPUNICODE_STRING uni,LPANSI_STRING ansi,BOOL
* RtlOemStringToUnicodeString [NTDLL.447]
*/
DWORD /* NTSTATUS */
WINAPI RtlOemStringToUnicodeString(LPUNICODE_STRING uni,LPSTRING ansi,BOOL32 doalloc)
WINAPI RtlOemStringToUnicodeString(PUNICODE_STRING uni,PSTRING ansi,BOOL32 doalloc)
{
DWORD unilen = (ansi->Length+1)*sizeof(WCHAR);
@ -354,45 +378,45 @@ WINAPI RtlOemToUnicodeN(LPWSTR unistr,DWORD unilen,LPDWORD reslen,LPSTR oemstr,D
/**************************************************************************
* RtlInitAnsiString [NTDLL.399]
*/
VOID WINAPI RtlInitAnsiString(LPANSI_STRING target,LPCSTR source)
VOID WINAPI RtlInitAnsiString(PANSI_STRING target,LPCSTR source)
{
target->Length = target->MaximumLength = 0;
target->Buffer = (LPSTR)source;
if (!source)
return;
target->Length = lstrlen32A(target->Buffer);
target->MaximumLength = target->Length+1;
target->MaximumLength = lstrlen32A(target->Buffer);
target->Length = target->MaximumLength+1;
}
/**************************************************************************
* RtlInitString [NTDLL.402]
*/
VOID WINAPI RtlInitString(LPSTRING target,LPCSTR source)
VOID WINAPI RtlInitString(PSTRING target,LPCSTR source)
{
target->Length = target->MaximumLength = 0;
target->Buffer = (LPSTR)source;
if (!source)
return;
target->Length = lstrlen32A(target->Buffer);
target->MaximumLength = target->Length+1;
target->MaximumLength = lstrlen32A(target->Buffer);
target->Length = target->MaximumLength+1;
}
/**************************************************************************
* RtlInitUnicodeString [NTDLL.403]
*/
VOID WINAPI RtlInitUnicodeString(LPUNICODE_STRING target,LPCWSTR source)
VOID WINAPI RtlInitUnicodeString(PUNICODE_STRING target,LPCWSTR source)
{
target->Length = target->MaximumLength = 0;
target->Buffer = (LPWSTR)source;
if (!source)
return;
target->Length = lstrlen32W(target->Buffer)*2;
target->MaximumLength = target->Length+2;
target->MaximumLength = lstrlen32W(target->Buffer)*2;
target->Length = target->MaximumLength+2;
}
/**************************************************************************
* RtlFreeUnicodeString [NTDLL.377]
*/
VOID WINAPI RtlFreeUnicodeString(LPUNICODE_STRING str)
VOID WINAPI RtlFreeUnicodeString(PUNICODE_STRING str)
{
if (str->Buffer)
HeapFree(GetProcessHeap(),0,str->Buffer);
@ -401,7 +425,7 @@ VOID WINAPI RtlFreeUnicodeString(LPUNICODE_STRING str)
/**************************************************************************
* RtlFreeAnsiString [NTDLL.373]
*/
VOID WINAPI RtlFreeAnsiString(LPANSI_STRING AnsiString)
VOID WINAPI RtlFreeAnsiString(PANSI_STRING AnsiString)
{
if( AnsiString->Buffer )
HeapFree( GetProcessHeap(),0,AnsiString->Buffer );
@ -431,7 +455,7 @@ WINAPI RtlUnicodeToOemN(LPSTR oemstr,DWORD oemlen,LPDWORD reslen,LPWSTR unistr,D
* RtlUnicodeStringToOemString [NTDLL.511]
*/
DWORD /* NTSTATUS */
WINAPI RtlUnicodeStringToOemString(LPANSI_STRING oem,LPUNICODE_STRING uni,BOOL32 alloc)
WINAPI RtlUnicodeStringToOemString(PANSI_STRING oem,PUNICODE_STRING uni,BOOL32 alloc)
{
if (alloc) {
oem->Buffer = (LPSTR)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,uni->Length/2)+1;
@ -446,7 +470,7 @@ WINAPI RtlUnicodeStringToOemString(LPANSI_STRING oem,LPUNICODE_STRING uni,BOOL32
* RtlUnicodeStringToAnsiString [NTDLL.507]
*/
DWORD /* NTSTATUS */
WINAPI RtlUnicodeStringToAnsiString(LPANSI_STRING oem,LPUNICODE_STRING uni,BOOL32 alloc)
WINAPI RtlUnicodeStringToAnsiString(PANSI_STRING oem,PUNICODE_STRING uni,BOOL32 alloc)
{
if (alloc) {
oem->Buffer = (LPSTR)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,uni->Length/2)+1;
@ -460,7 +484,7 @@ WINAPI RtlUnicodeStringToAnsiString(LPANSI_STRING oem,LPUNICODE_STRING uni,BOOL3
/**************************************************************************
* RtlEqualUnicodeString [NTDLL]
*/
DWORD WINAPI RtlEqualUnicodeString(LPUNICODE_STRING s1,LPUNICODE_STRING s2,DWORD x) {
DWORD WINAPI RtlEqualUnicodeString(PUNICODE_STRING s1,PUNICODE_STRING s2,DWORD x) {
FIXME(ntdll,"(%s,%s,%ld),stub!\n",debugstr_w(s1->Buffer),debugstr_w(s2->Buffer),x);
return 0;
if (s1->Length != s2->Length)
@ -490,7 +514,7 @@ BOOL32 WINAPI RtlGetNtProductType(LPDWORD type)
/**************************************************************************
* RtlUpcaseUnicodeString [NTDLL.520]
*/
DWORD WINAPI RtlUpcaseUnicodeString(LPUNICODE_STRING dest,LPUNICODE_STRING src,BOOL32 doalloc)
DWORD WINAPI RtlUpcaseUnicodeString(PUNICODE_STRING dest,PUNICODE_STRING src,BOOL32 doalloc)
{
LPWSTR s,t;
DWORD i,len;
@ -515,7 +539,7 @@ DWORD WINAPI RtlUpcaseUnicodeString(LPUNICODE_STRING dest,LPUNICODE_STRING src,B
/**************************************************************************
* RtlxOemStringToUnicodeSize [NTDLL.549]
*/
UINT32 WINAPI RtlxOemStringToUnicodeSize(LPSTRING str)
UINT32 WINAPI RtlxOemStringToUnicodeSize(PSTRING str)
{
return str->Length*2+2;
}
@ -523,7 +547,7 @@ UINT32 WINAPI RtlxOemStringToUnicodeSize(LPSTRING str)
/**************************************************************************
* RtlxAnsiStringToUnicodeSize [NTDLL.548]
*/
UINT32 WINAPI RtlxAnsiStringToUnicodeSize(LPANSI_STRING str)
UINT32 WINAPI RtlxAnsiStringToUnicodeSize(PANSI_STRING str)
{
return str->Length*2+2;
}
@ -577,7 +601,7 @@ out:
* FIXME: convert to UNC or whatever is expected here
*/
BOOL32 WINAPI RtlDosPathNameToNtPathName_U(
LPWSTR from,LPUNICODE_STRING us,DWORD x2,DWORD x3)
LPWSTR from,PUNICODE_STRING us,DWORD x2,DWORD x3)
{
LPSTR fromA = HEAP_strdupWtoA(GetProcessHeap(),0,from);
@ -676,8 +700,8 @@ DWORD WINAPI RtlOpenCurrentUser(DWORD x1, DWORD *x2)
* RtlAllocateAndInitializeSid [NTDLL.265]
*
*/
BOOL32 WINAPI RtlAllocateAndInitializeSid (LPSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,DWORD nSubAuthorityCount,
DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7,DWORD x8,DWORD x9,DWORD x10, LPSID pSid)
BOOL32 WINAPI RtlAllocateAndInitializeSid (PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,DWORD nSubAuthorityCount,
DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7,DWORD x8,DWORD x9,DWORD x10, PSID pSid)
{ FIXME(ntdll,"(%p,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,%p),stub!\n",
pIdentifierAuthority,nSubAuthorityCount,x3,x4,x5,x6,x7,x8,x9,x10,pSid);
return 0;
@ -701,10 +725,35 @@ DWORD WINAPI RtlFreeSid(DWORD x1)
/******************************************************************************
* RtlGetDaclSecurityDescriptor [NTDLL]
*
* NOTES: seems to be like GetSecurityDescriptorDacl (js)
*/
DWORD WINAPI RtlGetDaclSecurityDescriptor(DWORD x1,DWORD x2,DWORD x3,DWORD x4) {
FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4);
return 0;
DWORD WINAPI RtlGetDaclSecurityDescriptor(
IN PSECURITY_DESCRIPTOR pSecurityDescriptor,
OUT LPBOOL lpbDaclPresent,
OUT PACL *pDacl,
OUT LPBOOL lpbDaclDefaulted)
{ DWORD ret = 0;
TRACE(ntdll,"(%p,%p,%p,%p)\n",
pSecurityDescriptor, lpbDaclPresent, *pDacl, lpbDaclDefaulted);
if (pSecurityDescriptor->Revision != SECURITY_DESCRIPTOR_REVISION)
return STATUS_UNKNOWN_REVISION ;
if ( (*lpbDaclPresent = (SE_DACL_PRESENT & pSecurityDescriptor->Control) ? 1 : 0) )
{
if ( SE_SELF_RELATIVE & pSecurityDescriptor->Control)
{ *pDacl = (PACL) ((LPBYTE)pSecurityDescriptor + (DWORD)pSecurityDescriptor->Dacl);
}
else
{ *pDacl = pSecurityDescriptor->Dacl;
}
}
*lpbDaclDefaulted = (( SE_DACL_DEFAULTED & pSecurityDescriptor->Control ) ? 1 : 0);
return ret;
}
/******************************************************************************
@ -727,7 +776,7 @@ DWORD WINAPI RtlDestroyEnvironment(DWORD x) {
/******************************************************************************
* RtlQueryEnvironmentVariable_U [NTDLL]
*/
DWORD WINAPI RtlQueryEnvironmentVariable_U(DWORD x1,LPUNICODE_STRING key,LPUNICODE_STRING val) {
DWORD WINAPI RtlQueryEnvironmentVariable_U(DWORD x1,PUNICODE_STRING key,PUNICODE_STRING val) {
FIXME(ntdll,"(0x%08lx,%s,%p),stub!\n",x1,debugstr_w(key->Buffer),val);
return 0;
}
@ -735,7 +784,7 @@ DWORD WINAPI RtlQueryEnvironmentVariable_U(DWORD x1,LPUNICODE_STRING key,LPUNICO
/******************************************************************************
* RtlSetEnvironmentVariable [NTDLL]
*/
DWORD WINAPI RtlSetEnvironmentVariable(DWORD x1,LPUNICODE_STRING key,LPUNICODE_STRING val) {
DWORD WINAPI RtlSetEnvironmentVariable(DWORD x1,PUNICODE_STRING key,PUNICODE_STRING val) {
FIXME(ntdll,"(0x%08lx,%s,%s),stub!\n",x1,debugstr_w(key->Buffer),debugstr_w(val->Buffer));
return 0;
}
@ -800,7 +849,7 @@ DWORD WINAPI RtlAddAccessAllowedAce(DWORD x1,DWORD x2,DWORD x3,DWORD x4) {
/******************************************************************************
* RtlGetAce [NTDLL]
*/
DWORD WINAPI RtlGetAce(LPACL pAcl,DWORD dwAceIndex,LPVOID *pAce ) {
DWORD WINAPI RtlGetAce(PACL pAcl,DWORD dwAceIndex,LPVOID *pAce ) {
FIXME(ntdll,"(%p,%ld,%p),stub!\n",pAcl,dwAceIndex,pAce);
return 0;
}
@ -837,8 +886,10 @@ DWORD WINAPI RtlTimeToTimeFields(DWORD x1,DWORD x2) {
/******************************************************************************
* RtlCompareUnicodeString [NTDLL]
*/
NTSTATUS WINAPI RtlCompareUnicodeString(LPUNICODE_STRING x1,LPUNICODE_STRING x2,DWORD x3) {
FIXME(ntdll,"(%s,%s,0x%08lx),stub!\n",debugstr_w(x1->Buffer),debugstr_w(x2->Buffer),x3);
NTSTATUS WINAPI RtlCompareUnicodeString(
PUNICODE_STRING String1, PUNICODE_STRING String2, BOOLEAN CaseInSensitive)
{
FIXME(ntdll,"(%s,%s,0x%08x),stub!\n",debugstr_w(String1->Buffer),debugstr_w(String1->Buffer),CaseInSensitive);
return 0;
}
@ -852,6 +903,15 @@ void __cdecl DbgPrint(LPCSTR fmt,LPVOID args) {
MSG("DbgPrint says: %s",buf);
/* hmm, raise exception? */
}
DWORD NtRaiseException ( DWORD dwExceptionCode, DWORD dwExceptionFlags, DWORD nNumberOfArguments,CONST ULONG_PTR *lpArguments)
{ FIXME(ntdll,"0x%08lx 0x%08lx 0x%08lx %p\n", dwExceptionCode, dwExceptionFlags, nNumberOfArguments, lpArguments);
return 0;
}
DWORD RtlRaiseException ( DWORD x)
{ FIXME(ntdll, "0x%08lx\n", x);
return 0;
}
/***********************************************************************
* RtlInitializeResource (NTDLL.409)

View File

@ -104,7 +104,7 @@ type win32
096 stdcall NtDuplicateObject(long long long long long long long) NtDuplicateObject
097 stdcall NtDuplicateToken(long long long long long long) NtDuplicateToken
098 stub NtEnumerateBus
099 stub NtEnumerateKey
099 stdcall NtEnumerateKey (long long long long long long) NtEnumerateKey
100 stdcall NtEnumerateValueKey (long long long long long long) NtEnumerateValueKey
101 stub NtExtendSection
102 stub NtFlushBuffersFile
@ -141,7 +141,7 @@ type win32
133 stdcall NtOpenProcessToken(long long long) NtOpenProcessToken
134 stdcall NtOpenSection(long long long) NtOpenSection
135 stub NtOpenSemaphore
136 stub NtOpenSymbolicLinkObject
136 stdcall NtOpenSymbolicLinkObject (long long long) NtOpenSymbolicLinkObject
137 stub NtOpenThread
138 stdcall NtOpenThreadToken(long long long long) NtOpenThreadToken
139 stub NtOpenTimer
@ -164,7 +164,7 @@ type win32
156 stdcall NtQueryInformationToken (long long long long long) NtQueryInformationToken
157 stub NtQueryIntervalProfile
158 stub NtQueryIoCompletion
159 stub NtQueryKey
159 stdcall NtQueryKey (long long long long) NtQueryKey
160 stub NtQueryMutant
161 stdcall NtQueryObject(long long long long long) NtQueryObject
162 stdcall NtQueryPerformanceCounter (long long) NtQueryPerformanceCounter
@ -180,7 +180,7 @@ type win32
172 stdcall NtQueryValueKey(long long long long long long) NtQueryValueKey
173 stub NtQueryVirtualMemory
174 stub NtQueryVolumeInformationFile
175 stub NtRaiseException
175 stdcall NtRaiseException(long long long ptr) NtRaiseException
176 stub NtRaiseHardError
177 stdcall NtReadFile(long long long long long long long long long) NtReadFile
178 stub NtReadRequestData
@ -469,7 +469,7 @@ type win32
461 stub RtlQuerySecurityObject
462 stub RtlQueryTagHeap
463 stub RtlQueryTimeZoneInformation
464 stub RtlRaiseException
464 stdcall RtlRaiseException (long) RtlRaiseException
465 stub RtlRaiseStatus
466 stub RtlRandom
467 stub RtlReAllocateHeap