Share via


CreateTicket (Windows CE 5.0)

Send Feedback

This function creates a port mapping for an inbound session.

NTSTATUS CreateTicket(PVOIDInterfaceHandle,UCHARProtocol,ULONGPrivateAddress,USHORTPrivatePort,ULONGRemoteAddress,USHORTRemotePort,PULONGPublicAddress,PUSHORTPublicPort)

Parameters

  • InterfaceHandle
    [in] Handle to an interface.
  • Protocol
    [in] Unsigned character that specifies the protocol field of the IP header. It is one of the values in the following table.
    Value Description
    NAT_PROTOCOL_TCP Specifies the TCP protocol.
    NAT_PROTOCOL_UDP Specifies the UDP protocol.
  • PrivateAddress
    [in] Unsigned long integer that specifies the private IP address to which PublicAddress and PublicPort should translate.
  • PrivatePort
    [in] Unsigned short integer that specifies the private port to which PublicAddress and PublicPort should translate.
  • RemoteAddress
    [in] Unsigned long integer that specifies an address for which to create a mapping. This parameter is optional, and if a value for this parameter is specified, the function creates a mapping only on sessions from this address.
  • RemotePort
    [in] Unsigned short integer that specifies a port for which to create a mapping. This parameter is optional, and if a value for this parameter is specified, the function creates a mapping only on sessions from this port.
  • PublicAddress
    [out] Pointer to an unsigned long integer that receives the public address that is used in the mapping.
  • PublicPort
    [out] Pointer to an unsigned short integer that receives the port that is used in the mapping.

Return Values

STATUS_SUCCESS indicates success. A non-zero value indicates failure.

Requirements

OS Versions: Windows CE 3.0 and later.
Header: Natedit.h.
Link Library: Coredll.dll.

See Also

DeleteTicket

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.