NtCreatePort - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTLPCAPI_H

//
// Port creation
//

/**
 * The NtCreatePort routine creates a named port object to which clients can connect.
 *
 * \param PortHandle Receives a handle to the newly created port object.
 * \param ObjectAttributes Specifies the port's name and security descriptor.
 * \param MaxConnectionInfoLength Maximum size of connection data sent by a client.
 * \param MaxMessageLength Maximum size of a message that can be sent through this port.
 * \param MaxPoolUsage Maximum amount of paged pool memory for this port.
 * \return NTSTATUS Successful or errant status.
 */
NTSYSCALLAPI
NTSTATUS
NTAPI
NtCreatePort(
    _Out_ PHANDLE PortHandle,
    _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes,
    _In_ ULONG MaxConnectionInfoLength,
    _In_ ULONG MaxMessageLength,
    _In_opt_ ULONG MaxPoolUsage
    );

#endif

View code on GitHub
#ifndef _NTZWAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
ZwCreatePort(
    _Out_ PHANDLE PortHandle,
    _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes,
    _In_ ULONG MaxConnectionInfoLength,
    _In_ ULONG MaxMessageLength,
    _In_opt_ ULONG MaxPoolUsage
    );

#endif

View code on GitHub

NtDoc

No description available.

NTinternals.net (undocumented.ntinternals.net)

PortHandle

Result of call - HANDLE to Port Object.

ObjectAttributes

Typically contains name and SECURITY_DESCRIPTOR for newly created named port.

MaxConnectInfoLength

MaxDataLength

Maximum size of message.

Reserved

Documented by

See also