Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
0c9cb1dc
Commit
0c9cb1dc
authored
Jun 14, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Jun 14, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Declare port functions and fix prototypes.
parent
0f36d124
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
79 additions
and
58 deletions
+79
-58
nt.c
dlls/ntdll/nt.c
+46
-58
winternl.h
include/winternl.h
+33
-0
No files found.
dlls/ntdll/nt.c
View file @
0c9cb1dc
...
...
@@ -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,22 +408,30 @@ 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
)
TRACE
(
"
\t
Message = %s
\n
"
,
debugstr_an
(
ConnectInfo
,
*
pConnectInfoLength
));
return
0
;
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
(
"
\t
Message = %s
\n
"
,
debugstr_an
(
ConnectInfo
,
*
pConnectInfoLength
));
return
0
;
}
/******************************************************************************
* 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
(
"
\t
ActualMessageLength = %d
\n
"
,
pLpcMessageIn
->
ActualMessageLength
);
TRACE
(
"
\t
TotalMessageLength = %d
\n
"
,
pLpcMessageIn
->
TotalMessageLength
);
TRACE
(
"
\t
MessageType = %ld
\n
"
,
pLpcMessageIn
->
MessageType
);
TRACE
(
"
\t
ClientProcessId = %ld
\n
"
,
pLpcMessageIn
->
ClientProcessId
);
TRACE
(
"
\t
ClientThreadId = %ld
\n
"
,
pLpcMessageIn
->
ClientThreadId
);
TRACE
(
"
\t
MessageId = %ld
\n
"
,
pLpcMessageIn
->
MessageId
);
TRACE
(
"
\t
SharedSectionSize = %ld
\n
"
,
pLpcMessageIn
->
SharedSectionSize
);
TRACE
(
"
\t
MessageData = %s
\n
"
,
debugstr_an
(
pLpcMessageIn
->
MessageData
,
pLpcMessageIn
->
ActualMessageLength
));
TRACE
(
"
\t
DataSize = %u
\n
"
,
pLpcMessageIn
->
DataSize
);
TRACE
(
"
\t
MessageSize = %u
\n
"
,
pLpcMessageIn
->
MessageSize
);
TRACE
(
"
\t
MessageType = %u
\n
"
,
pLpcMessageIn
->
MessageType
);
TRACE
(
"
\t
VirtualRangesOffset = %u
\n
"
,
pLpcMessageIn
->
VirtualRangesOffset
);
TRACE
(
"
\t
ClientId.UniqueProcess = %p
\n
"
,
pLpcMessageIn
->
ClientId
.
UniqueProcess
);
TRACE
(
"
\t
ClientId.UniqueThread = %p
\n
"
,
pLpcMessageIn
->
ClientId
.
UniqueThread
);
TRACE
(
"
\t
MessageId = %lu
\n
"
,
pLpcMessageIn
->
MessageId
);
TRACE
(
"
\t
SectionSize = %lu
\n
"
,
pLpcMessageIn
->
SectionSize
);
TRACE
(
"
\t
Data = %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
;
}
...
...
include/winternl.h
View file @
0c9cb1dc
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment