Declare port functions and fix prototypes.
This commit is contained in:
parent
0f36d124a2
commit
0c9cb1dcee
104
dlls/ntdll/nt.c
104
dlls/ntdll/nt.c
|
@ -40,41 +40,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(ntdll);
|
||||||
/* FIXME: fixed at 2005/2/22 */
|
/* FIXME: fixed at 2005/2/22 */
|
||||||
static LONGLONG boottime = (LONGLONG)1275356510 * 100000000;
|
static LONGLONG boottime = (LONGLONG)1275356510 * 100000000;
|
||||||
|
|
||||||
/* Structures used by NtConnectPort */
|
|
||||||
|
|
||||||
typedef struct LpcSectionInfo
|
|
||||||
{
|
|
||||||
DWORD Length;
|
|
||||||
HANDLE SectionHandle;
|
|
||||||
DWORD Param1;
|
|
||||||
DWORD SectionSize;
|
|
||||||
DWORD ClientBaseAddress;
|
|
||||||
DWORD ServerBaseAddress;
|
|
||||||
} LPCSECTIONINFO, *PLPCSECTIONINFO;
|
|
||||||
|
|
||||||
typedef struct LpcSectionMapInfo
|
|
||||||
{
|
|
||||||
DWORD Length;
|
|
||||||
DWORD SectionSize;
|
|
||||||
DWORD ServerBaseAddress;
|
|
||||||
} LPCSECTIONMAPINFO, *PLPCSECTIONMAPINFO;
|
|
||||||
|
|
||||||
/* Structure used by NtAcceptConnectPort, NtReplyWaitReceivePort */
|
|
||||||
|
|
||||||
#define MAX_MESSAGE_DATA 328
|
|
||||||
|
|
||||||
typedef struct LpcMessage
|
|
||||||
{
|
|
||||||
WORD ActualMessageLength;
|
|
||||||
WORD TotalMessageLength;
|
|
||||||
DWORD MessageType;
|
|
||||||
DWORD ClientProcessId;
|
|
||||||
DWORD ClientThreadId;
|
|
||||||
DWORD MessageId;
|
|
||||||
DWORD SharedSectionSize;
|
|
||||||
BYTE MessageData[MAX_MESSAGE_DATA];
|
|
||||||
} LPCMESSAGE, *PLPCMESSAGE;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Token
|
* Token
|
||||||
*/
|
*/
|
||||||
|
@ -443,22 +408,30 @@ NTSTATUS WINAPI NtCreatePort(PHANDLE PortHandle,POBJECT_ATTRIBUTES ObjectAttribu
|
||||||
* NtConnectPort [NTDLL.@]
|
* NtConnectPort [NTDLL.@]
|
||||||
* ZwConnectPort [NTDLL.@]
|
* ZwConnectPort [NTDLL.@]
|
||||||
*/
|
*/
|
||||||
NTSTATUS WINAPI NtConnectPort(PHANDLE PortHandle,PUNICODE_STRING PortName,PVOID Unknown1,
|
NTSTATUS WINAPI NtConnectPort(
|
||||||
PLPCSECTIONINFO sectionInfo,PLPCSECTIONMAPINFO mapInfo,PVOID Unknown2,
|
PHANDLE PortHandle,
|
||||||
PVOID ConnectInfo,PDWORD pConnectInfoLength)
|
PUNICODE_STRING PortName,
|
||||||
|
PSECURITY_QUALITY_OF_SERVICE SecurityQos,
|
||||||
|
PLPC_SECTION_WRITE WriteSection,
|
||||||
|
PLPC_SECTION_READ ReadSection,
|
||||||
|
PULONG MaximumMessageLength,
|
||||||
|
PVOID ConnectInfo,
|
||||||
|
PULONG pConnectInfoLength)
|
||||||
{
|
{
|
||||||
FIXME("(%p,%s,%p,%p,%p,%p,%p,%p (%ld)),stub!\n",PortHandle,debugstr_w(PortName->Buffer),Unknown1,
|
FIXME("(%p,%s,%p,%p,%p,%p,%p,%p),stub!\n",
|
||||||
sectionInfo,mapInfo,Unknown2,ConnectInfo,pConnectInfoLength,pConnectInfoLength?*pConnectInfoLength:-1);
|
PortHandle,debugstr_w(PortName->Buffer),SecurityQos,
|
||||||
if(ConnectInfo && pConnectInfoLength)
|
WriteSection,ReadSection,MaximumMessageLength,ConnectInfo,
|
||||||
TRACE("\tMessage = %s\n",debugstr_an(ConnectInfo,*pConnectInfoLength));
|
pConnectInfoLength);
|
||||||
return 0;
|
if (ConnectInfo && pConnectInfoLength)
|
||||||
|
TRACE("\tMessage = %s\n",debugstr_an(ConnectInfo,*pConnectInfoLength));
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* NtListenPort [NTDLL.@]
|
* NtListenPort [NTDLL.@]
|
||||||
* ZwListenPort [NTDLL.@]
|
* ZwListenPort [NTDLL.@]
|
||||||
*/
|
*/
|
||||||
NTSTATUS WINAPI NtListenPort(HANDLE PortHandle,PLPCMESSAGE pLpcMessage)
|
NTSTATUS WINAPI NtListenPort(HANDLE PortHandle,PLPC_MESSAGE pLpcMessage)
|
||||||
{
|
{
|
||||||
FIXME("(%p,%p),stub!\n",PortHandle,pLpcMessage);
|
FIXME("(%p,%p),stub!\n",PortHandle,pLpcMessage);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -468,10 +441,16 @@ NTSTATUS WINAPI NtListenPort(HANDLE PortHandle,PLPCMESSAGE pLpcMessage)
|
||||||
* NtAcceptConnectPort [NTDLL.@]
|
* NtAcceptConnectPort [NTDLL.@]
|
||||||
* ZwAcceptConnectPort [NTDLL.@]
|
* ZwAcceptConnectPort [NTDLL.@]
|
||||||
*/
|
*/
|
||||||
NTSTATUS WINAPI NtAcceptConnectPort(PHANDLE PortHandle,DWORD Unknown,PLPCMESSAGE pLpcMessage,
|
NTSTATUS WINAPI NtAcceptConnectPort(
|
||||||
DWORD acceptIt,DWORD Unknown2,PLPCSECTIONMAPINFO mapInfo)
|
PHANDLE PortHandle,
|
||||||
|
ULONG PortIdentifier,
|
||||||
|
PLPC_MESSAGE pLpcMessage,
|
||||||
|
BOOLEAN Accept,
|
||||||
|
PLPC_SECTION_WRITE WriteSection,
|
||||||
|
PLPC_SECTION_READ ReadSection)
|
||||||
{
|
{
|
||||||
FIXME("(%p,0x%08lx,%p,0x%08lx,0x%08lx,%p),stub!\n",PortHandle,Unknown,pLpcMessage,acceptIt,Unknown2,mapInfo);
|
FIXME("(%p,%lu,%p,%d,%p,%p),stub!\n",
|
||||||
|
PortHandle,PortIdentifier,pLpcMessage,Accept,WriteSection,ReadSection);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -499,20 +478,25 @@ NTSTATUS WINAPI NtRegisterThreadTerminatePort(HANDLE PortHandle)
|
||||||
* NtRequestWaitReplyPort [NTDLL.@]
|
* NtRequestWaitReplyPort [NTDLL.@]
|
||||||
* ZwRequestWaitReplyPort [NTDLL.@]
|
* ZwRequestWaitReplyPort [NTDLL.@]
|
||||||
*/
|
*/
|
||||||
NTSTATUS WINAPI NtRequestWaitReplyPort(HANDLE PortHandle,PLPCMESSAGE pLpcMessageIn,PLPCMESSAGE pLpcMessageOut)
|
NTSTATUS WINAPI NtRequestWaitReplyPort(
|
||||||
|
HANDLE PortHandle,
|
||||||
|
PLPC_MESSAGE pLpcMessageIn,
|
||||||
|
PLPC_MESSAGE pLpcMessageOut)
|
||||||
{
|
{
|
||||||
FIXME("(%p,%p,%p),stub!\n",PortHandle,pLpcMessageIn,pLpcMessageOut);
|
FIXME("(%p,%p,%p),stub!\n",PortHandle,pLpcMessageIn,pLpcMessageOut);
|
||||||
if(pLpcMessageIn)
|
if(pLpcMessageIn)
|
||||||
{
|
{
|
||||||
TRACE("Message to send:\n");
|
TRACE("Message to send:\n");
|
||||||
TRACE("\tActualMessageLength = %d\n",pLpcMessageIn->ActualMessageLength);
|
TRACE("\tDataSize = %u\n",pLpcMessageIn->DataSize);
|
||||||
TRACE("\tTotalMessageLength = %d\n",pLpcMessageIn->TotalMessageLength);
|
TRACE("\tMessageSize = %u\n",pLpcMessageIn->MessageSize);
|
||||||
TRACE("\tMessageType = %ld\n",pLpcMessageIn->MessageType);
|
TRACE("\tMessageType = %u\n",pLpcMessageIn->MessageType);
|
||||||
TRACE("\tClientProcessId = %ld\n",pLpcMessageIn->ClientProcessId);
|
TRACE("\tVirtualRangesOffset = %u\n",pLpcMessageIn->VirtualRangesOffset);
|
||||||
TRACE("\tClientThreadId = %ld\n",pLpcMessageIn->ClientThreadId);
|
TRACE("\tClientId.UniqueProcess = %p\n",pLpcMessageIn->ClientId.UniqueProcess);
|
||||||
TRACE("\tMessageId = %ld\n",pLpcMessageIn->MessageId);
|
TRACE("\tClientId.UniqueThread = %p\n",pLpcMessageIn->ClientId.UniqueThread);
|
||||||
TRACE("\tSharedSectionSize = %ld\n",pLpcMessageIn->SharedSectionSize);
|
TRACE("\tMessageId = %lu\n",pLpcMessageIn->MessageId);
|
||||||
TRACE("\tMessageData = %s\n",debugstr_an(pLpcMessageIn->MessageData,pLpcMessageIn->ActualMessageLength));
|
TRACE("\tSectionSize = %lu\n",pLpcMessageIn->SectionSize);
|
||||||
|
TRACE("\tData = %s\n",
|
||||||
|
debugstr_an(pLpcMessageIn->Data,pLpcMessageIn->DataSize));
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -521,9 +505,13 @@ NTSTATUS WINAPI NtRequestWaitReplyPort(HANDLE PortHandle,PLPCMESSAGE pLpcMessage
|
||||||
* NtReplyWaitReceivePort [NTDLL.@]
|
* NtReplyWaitReceivePort [NTDLL.@]
|
||||||
* ZwReplyWaitReceivePort [NTDLL.@]
|
* ZwReplyWaitReceivePort [NTDLL.@]
|
||||||
*/
|
*/
|
||||||
NTSTATUS WINAPI NtReplyWaitReceivePort(HANDLE PortHandle,PDWORD Unknown,PLPCMESSAGE pLpcMessageOut,PLPCMESSAGE pLpcMessageIn)
|
NTSTATUS WINAPI NtReplyWaitReceivePort(
|
||||||
|
HANDLE PortHandle,
|
||||||
|
PULONG PortIdentifier,
|
||||||
|
PLPC_MESSAGE ReplyMessage,
|
||||||
|
PLPC_MESSAGE Message)
|
||||||
{
|
{
|
||||||
FIXME("(%p,%p,%p,%p),stub!\n",PortHandle,Unknown,pLpcMessageOut,pLpcMessageIn);
|
FIXME("(%p,%p,%p,%p),stub!\n",PortHandle,PortIdentifier,ReplyMessage,Message);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1497,6 +1497,32 @@ typedef struct _SECTION_IMAGE_INFORMATION {
|
||||||
ULONG Unknown2[3];
|
ULONG Unknown2[3];
|
||||||
} SECTION_IMAGE_INFORMATION, *PSECTION_IMAGE_INFORMATION;
|
} SECTION_IMAGE_INFORMATION, *PSECTION_IMAGE_INFORMATION;
|
||||||
|
|
||||||
|
typedef struct _LPC_SECTION_WRITE {
|
||||||
|
ULONG Length;
|
||||||
|
HANDLE SectionHandle;
|
||||||
|
ULONG SectionOffset;
|
||||||
|
ULONG ViewSize;
|
||||||
|
PVOID ViewBase;
|
||||||
|
PVOID TargetViewBase;
|
||||||
|
} LPC_SECTION_WRITE, *PLPC_SECTION_WRITE;
|
||||||
|
|
||||||
|
typedef struct _LPC_SECTION_READ {
|
||||||
|
ULONG Length;
|
||||||
|
ULONG ViewSize;
|
||||||
|
PVOID ViewBase;
|
||||||
|
} LPC_SECTION_READ, *PLPC_SECTION_READ;
|
||||||
|
|
||||||
|
typedef struct _LPC_MESSAGE {
|
||||||
|
USHORT DataSize;
|
||||||
|
USHORT MessageSize;
|
||||||
|
USHORT MessageType;
|
||||||
|
USHORT VirtualRangesOffset;
|
||||||
|
CLIENT_ID ClientId;
|
||||||
|
ULONG MessageId;
|
||||||
|
ULONG SectionSize;
|
||||||
|
UCHAR Data[ANYSIZE_ARRAY];
|
||||||
|
} LPC_MESSAGE, *PLPC_MESSAGE;
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* Function declarations
|
* Function declarations
|
||||||
*/
|
*/
|
||||||
|
@ -1523,6 +1549,7 @@ void WINAPI LdrInitializeThunk(HANDLE,ULONG,ULONG,ULONG);
|
||||||
NTSTATUS WINAPI LdrLoadDll(LPCWSTR, DWORD, const UNICODE_STRING*, HMODULE*);
|
NTSTATUS WINAPI LdrLoadDll(LPCWSTR, DWORD, const UNICODE_STRING*, HMODULE*);
|
||||||
void WINAPI LdrShutdownProcess(void);
|
void WINAPI LdrShutdownProcess(void);
|
||||||
void WINAPI LdrShutdownThread(void);
|
void WINAPI LdrShutdownThread(void);
|
||||||
|
NTSTATUS WINAPI NtAcceptConnectPort(PHANDLE,ULONG,PLPC_MESSAGE,BOOLEAN,PLPC_SECTION_WRITE,PLPC_SECTION_READ);
|
||||||
NTSTATUS WINAPI NtAccessCheck(PSECURITY_DESCRIPTOR,HANDLE,ACCESS_MASK,PGENERIC_MAPPING,PPRIVILEGE_SET,PULONG,PULONG,NTSTATUS*);
|
NTSTATUS WINAPI NtAccessCheck(PSECURITY_DESCRIPTOR,HANDLE,ACCESS_MASK,PGENERIC_MAPPING,PPRIVILEGE_SET,PULONG,PULONG,NTSTATUS*);
|
||||||
NTSTATUS WINAPI NtAddAtom(const WCHAR*,ULONG,RTL_ATOM*);
|
NTSTATUS WINAPI NtAddAtom(const WCHAR*,ULONG,RTL_ATOM*);
|
||||||
NTSTATUS WINAPI NtAdjustGroupsToken(HANDLE,BOOLEAN,PTOKEN_GROUPS,ULONG,PTOKEN_GROUPS,PULONG);
|
NTSTATUS WINAPI NtAdjustGroupsToken(HANDLE,BOOLEAN,PTOKEN_GROUPS,ULONG,PTOKEN_GROUPS,PULONG);
|
||||||
|
@ -1534,6 +1561,8 @@ NTSTATUS WINAPI NtCancelIoFile(HANDLE,PIO_STATUS_BLOCK);
|
||||||
NTSTATUS WINAPI NtCancelTimer(HANDLE, BOOLEAN*);
|
NTSTATUS WINAPI NtCancelTimer(HANDLE, BOOLEAN*);
|
||||||
NTSTATUS WINAPI NtClearEvent(HANDLE);
|
NTSTATUS WINAPI NtClearEvent(HANDLE);
|
||||||
NTSTATUS WINAPI NtClose(HANDLE);
|
NTSTATUS WINAPI NtClose(HANDLE);
|
||||||
|
NTSTATUS WINAPI NtCompleteConnectPort(HANDLE);
|
||||||
|
NTSTATUS WINAPI NtConnectPort(PHANDLE,PUNICODE_STRING,PSECURITY_QUALITY_OF_SERVICE,PLPC_SECTION_WRITE,PLPC_SECTION_READ,PULONG,PVOID,PULONG);
|
||||||
NTSTATUS WINAPI NtCreateEvent(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *,BOOLEAN,BOOLEAN);
|
NTSTATUS WINAPI NtCreateEvent(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *,BOOLEAN,BOOLEAN);
|
||||||
NTSTATUS WINAPI NtCreateFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,PLARGE_INTEGER,ULONG,ULONG,ULONG,ULONG,PVOID,ULONG);
|
NTSTATUS WINAPI NtCreateFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,PLARGE_INTEGER,ULONG,ULONG,ULONG,ULONG,PVOID,ULONG);
|
||||||
NTSTATUS WINAPI NtCreateIoCompletion(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,ULONG);
|
NTSTATUS WINAPI NtCreateIoCompletion(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,ULONG);
|
||||||
|
@ -1567,6 +1596,7 @@ NTSTATUS WINAPI NtImpersonateAnonymousToken(HANDLE);
|
||||||
NTSTATUS WINAPI NtImpersonateClientOfPort(HANDLE,PPORT_MESSAGE);
|
NTSTATUS WINAPI NtImpersonateClientOfPort(HANDLE,PPORT_MESSAGE);
|
||||||
NTSTATUS WINAPI NtImpersonateThread(HANDLE,HANDLE,PSECURITY_QUALITY_OF_SERVICE);
|
NTSTATUS WINAPI NtImpersonateThread(HANDLE,HANDLE,PSECURITY_QUALITY_OF_SERVICE);
|
||||||
NTSTATUS WINAPI NtInitiatePowerAction(POWER_ACTION,SYSTEM_POWER_STATE,ULONG,BOOLEAN);
|
NTSTATUS WINAPI NtInitiatePowerAction(POWER_ACTION,SYSTEM_POWER_STATE,ULONG,BOOLEAN);
|
||||||
|
NTSTATUS WINAPI NtListenPort(HANDLE,PLPC_MESSAGE);
|
||||||
NTSTATUS WINAPI NtLoadDriver(const UNICODE_STRING *);
|
NTSTATUS WINAPI NtLoadDriver(const UNICODE_STRING *);
|
||||||
NTSTATUS WINAPI NtLoadKey(const OBJECT_ATTRIBUTES *,OBJECT_ATTRIBUTES *);
|
NTSTATUS WINAPI NtLoadKey(const OBJECT_ATTRIBUTES *,OBJECT_ATTRIBUTES *);
|
||||||
NTSTATUS WINAPI NtLockFile(HANDLE,HANDLE,PIO_APC_ROUTINE,void*,PIO_STATUS_BLOCK,PLARGE_INTEGER,PLARGE_INTEGER,ULONG*,BOOLEAN,BOOLEAN);
|
NTSTATUS WINAPI NtLockFile(HANDLE,HANDLE,PIO_APC_ROUTINE,void*,PIO_STATUS_BLOCK,PLARGE_INTEGER,PLARGE_INTEGER,ULONG*,BOOLEAN,BOOLEAN);
|
||||||
|
@ -1623,6 +1653,9 @@ NTSTATUS WINAPI NtReleaseMutant(HANDLE,PLONG);
|
||||||
NTSTATUS WINAPI NtReleaseSemaphore(HANDLE,ULONG,PULONG);
|
NTSTATUS WINAPI NtReleaseSemaphore(HANDLE,ULONG,PULONG);
|
||||||
NTSTATUS WINAPI NtRemoveIoCompletion(HANDLE,PULONG,PULONG,PIO_STATUS_BLOCK,PLARGE_INTEGER);
|
NTSTATUS WINAPI NtRemoveIoCompletion(HANDLE,PULONG,PULONG,PIO_STATUS_BLOCK,PLARGE_INTEGER);
|
||||||
NTSTATUS WINAPI NtReplaceKey(POBJECT_ATTRIBUTES,HKEY,POBJECT_ATTRIBUTES);
|
NTSTATUS WINAPI NtReplaceKey(POBJECT_ATTRIBUTES,HKEY,POBJECT_ATTRIBUTES);
|
||||||
|
NTSTATUS WINAPI NtReplyWaitReceivePort(HANDLE,PULONG,PLPC_MESSAGE,PLPC_MESSAGE);
|
||||||
|
NTSTATUS WINAPI NtReplyWaitReplyPort(HANDLE,PLPC_MESSAGE);
|
||||||
|
NTSTATUS WINAPI NtRequestWaitReplyPort(HANDLE,PLPC_MESSAGE,PLPC_MESSAGE);
|
||||||
NTSTATUS WINAPI NtResetEvent(HANDLE,PULONG);
|
NTSTATUS WINAPI NtResetEvent(HANDLE,PULONG);
|
||||||
NTSTATUS WINAPI NtRestoreKey(HKEY,HANDLE,ULONG);
|
NTSTATUS WINAPI NtRestoreKey(HKEY,HANDLE,ULONG);
|
||||||
NTSTATUS WINAPI NtResumeThread(HANDLE,PULONG);
|
NTSTATUS WINAPI NtResumeThread(HANDLE,PULONG);
|
||||||
|
|
Loading…
Reference in New Issue