INtime SDK Help
CreateRtPortEx (deprecated)

From INtime 6.0 the INtime Service and Port objects have been deprecated.

New projects should not be started using these features, and existing projects will not work with XM mode. You will receive a compiler warning by default if you use these calls.

Creates a message heap and port for access to a given service.

RTHANDLE CreateRtPortEx(
    LPSTR lpszServiceName,
    WORD wPortNumber,
    WORD wMaxTransactions,
    WORD wPortFlags
    DWORD dwHeapSize
);

Parameters

lpszServiceName
A pointer to a string containing the name of the service into which a port is to be created. If a value of NULL is specified, the port created can be used only as a sink port.
wPortNumber
A WORD value for the port number for the port to be created. If this value is a null port number (the value of which is defined by the service) then the service allocates a port number from the range of numbers defined for this purpose by the service implementer.
wMaxTransactions
Specifies the maximum number of simultaneous transactions allowed at this port. Internally determines the size of the transaction table on this port. If 0 (zero) is specified, the value is assigned from the wPortCreationMask parameter in the SERVICEDESC structure used to create the service named in lpszServiceName parameter.
wPortFlags
The port creation flags. These define the queuing scheme for the port (FIFO or priority). Some of the following values may be combined to form the flags parameter:
PRIORITY_QUEUING Specifies that tasks should be queued on a priority basis.
FIFO_QUEUING Specifies that tasks should be queued on a FIFO basis.
NO_FRAGMENTATION Specifies that fragmentation is not allowed at this port.
CREATE_UNBOUND Specifies that the port is to be created unbound. No operations are allowed on the port until a call to BindRtPort is made on this port.
Note that the PRIORITY_QUEUING and FIFO_QUEUING flags are mutually exclusive.
dwHeapSize
Specifies the size of the heap you want to create. You can use 0 (zero) to indicate that no heap should be created.

Return Values

An RTHANDLE for the newly-created message port object.
Success.
BAD_RTHANDLE
Failure. To determine the status, call GetLastRtError.

Status

E_OK 0x0000
No exceptional conditions occurred.
E_MEM 0x0002
Insufficient physical memory is available to the calling thread's process.
E_LIMIT 0x0004
The port ID table for this service is full.
E_CONTEXT 0x0005
The service with the name supplied can not be found.
E_PARAM 0x8004
One of these conditions exist:
  • The contents of the name string are invalid.
  • The given port ID is out of range for this service.
E_PORT_ID_USED 0x80E1
A port with the given port ID already exists.
E_NUC_BAD_BUF 0x80E2
An invalid name pointer was supplied.
Note:   Other status values may be generated by the service-specific CreatePort handler.

Requirements

Versions Defined in Include Link to
INtime 3.0 iintime/rt/include/rtbase.h rt.h rt.lib
See Also