Declare port functions and fix prototypes.

This commit is contained in:
Mike McCormack 2005-06-14 11:43:20 +00:00 committed by Alexandre Julliard
parent 0f36d124a2
commit 0c9cb1dcee
2 changed files with 79 additions and 58 deletions

View File

@ -40,41 +40,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(ntdll);
/* FIXME: fixed at 2005/2/22 */
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
*/
@ -443,13 +408,21 @@ NTSTATUS WINAPI NtCreatePort(PHANDLE PortHandle,POBJECT_ATTRIBUTES ObjectAttribu
* NtConnectPort [NTDLL.@]
* ZwConnectPort [NTDLL.@]
*/
NTSTATUS WINAPI NtConnectPort(PHANDLE PortHandle,PUNICODE_STRING PortName,PVOID Unknown1,
PLPCSECTIONINFO sectionInfo,PLPCSECTIONMAPINFO mapInfo,PVOID Unknown2,
PVOID ConnectInfo,PDWORD pConnectInfoLength)
NTSTATUS WINAPI NtConnectPort(
PHANDLE PortHandle,
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,
sectionInfo,mapInfo,Unknown2,ConnectInfo,pConnectInfoLength,pConnectInfoLength?*pConnectInfoLength:-1);
if(ConnectInfo && pConnectInfoLength)
FIXME("(%p,%s,%p,%p,%p,%p,%p,%p),stub!\n",
PortHandle,debugstr_w(PortName->Buffer),SecurityQos,
WriteSection,ReadSection,MaximumMessageLength,ConnectInfo,
pConnectInfoLength);
if (ConnectInfo && pConnectInfoLength)
TRACE("\tMessage = %s\n",debugstr_an(ConnectInfo,*pConnectInfoLength));
return 0;
}
@ -458,7 +431,7 @@ NTSTATUS WINAPI NtConnectPort(PHANDLE PortHandle,PUNICODE_STRING PortName,PVOID
* NtListenPort [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);
return 0;
@ -468,10 +441,16 @@ NTSTATUS WINAPI NtListenPort(HANDLE PortHandle,PLPCMESSAGE pLpcMessage)
* NtAcceptConnectPort [NTDLL.@]
* ZwAcceptConnectPort [NTDLL.@]
*/
NTSTATUS WINAPI NtAcceptConnectPort(PHANDLE PortHandle,DWORD Unknown,PLPCMESSAGE pLpcMessage,
DWORD acceptIt,DWORD Unknown2,PLPCSECTIONMAPINFO mapInfo)
NTSTATUS WINAPI NtAcceptConnectPort(
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;
}
@ -499,20 +478,25 @@ NTSTATUS WINAPI NtRegisterThreadTerminatePort(HANDLE PortHandle)
* NtRequestWaitReplyPort [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);
if(pLpcMessageIn)
{
TRACE("Message to send:\n");
TRACE("\tActualMessageLength = %d\n",pLpcMessageIn->ActualMessageLength);
TRACE("\tTotalMessageLength = %d\n",pLpcMessageIn->TotalMessageLength);
TRACE("\tMessageType = %ld\n",pLpcMessageIn->MessageType);
TRACE("\tClientProcessId = %ld\n",pLpcMessageIn->ClientProcessId);
TRACE("\tClientThreadId = %ld\n",pLpcMessageIn->ClientThreadId);
TRACE("\tMessageId = %ld\n",pLpcMessageIn->MessageId);
TRACE("\tSharedSectionSize = %ld\n",pLpcMessageIn->SharedSectionSize);
TRACE("\tMessageData = %s\n",debugstr_an(pLpcMessageIn->MessageData,pLpcMessageIn->ActualMessageLength));
TRACE("\tDataSize = %u\n",pLpcMessageIn->DataSize);
TRACE("\tMessageSize = %u\n",pLpcMessageIn->MessageSize);
TRACE("\tMessageType = %u\n",pLpcMessageIn->MessageType);
TRACE("\tVirtualRangesOffset = %u\n",pLpcMessageIn->VirtualRangesOffset);
TRACE("\tClientId.UniqueProcess = %p\n",pLpcMessageIn->ClientId.UniqueProcess);
TRACE("\tClientId.UniqueThread = %p\n",pLpcMessageIn->ClientId.UniqueThread);
TRACE("\tMessageId = %lu\n",pLpcMessageIn->MessageId);
TRACE("\tSectionSize = %lu\n",pLpcMessageIn->SectionSize);
TRACE("\tData = %s\n",
debugstr_an(pLpcMessageIn->Data,pLpcMessageIn->DataSize));
}
return 0;
}
@ -521,9 +505,13 @@ NTSTATUS WINAPI NtRequestWaitReplyPort(HANDLE PortHandle,PLPCMESSAGE pLpcMessage
* NtReplyWaitReceivePort [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;
}

View File

@ -1497,6 +1497,32 @@ typedef struct _SECTION_IMAGE_INFORMATION {
ULONG Unknown2[3];
} 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
*/
@ -1523,6 +1549,7 @@ void WINAPI LdrInitializeThunk(HANDLE,ULONG,ULONG,ULONG);
NTSTATUS WINAPI LdrLoadDll(LPCWSTR, DWORD, const UNICODE_STRING*, HMODULE*);
void WINAPI LdrShutdownProcess(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 NtAddAtom(const WCHAR*,ULONG,RTL_ATOM*);
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 NtClearEvent(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 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);
@ -1567,6 +1596,7 @@ NTSTATUS WINAPI NtImpersonateAnonymousToken(HANDLE);
NTSTATUS WINAPI NtImpersonateClientOfPort(HANDLE,PPORT_MESSAGE);
NTSTATUS WINAPI NtImpersonateThread(HANDLE,HANDLE,PSECURITY_QUALITY_OF_SERVICE);
NTSTATUS WINAPI NtInitiatePowerAction(POWER_ACTION,SYSTEM_POWER_STATE,ULONG,BOOLEAN);
NTSTATUS WINAPI NtListenPort(HANDLE,PLPC_MESSAGE);
NTSTATUS WINAPI NtLoadDriver(const UNICODE_STRING *);
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);
@ -1623,6 +1653,9 @@ NTSTATUS WINAPI NtReleaseMutant(HANDLE,PLONG);
NTSTATUS WINAPI NtReleaseSemaphore(HANDLE,ULONG,PULONG);
NTSTATUS WINAPI NtRemoveIoCompletion(HANDLE,PULONG,PULONG,PIO_STATUS_BLOCK,PLARGE_INTEGER);
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 NtRestoreKey(HKEY,HANDLE,ULONG);
NTSTATUS WINAPI NtResumeThread(HANDLE,PULONG);