INtime SDK Help
LookupPortHandle

Looks up a port handle given a port ID. For example, when a message has been received at the interface, the service thread needs to know where to deliver the message to in a multiple-port implementation.

RTHANDLE LookupPortHandle(
    LPSERVICEDESC lpServiceDescriptor, 
    WORD wPortID
);

Parameters

lpServiceDescriptor
A pointer to the service descriptor.
wPortID
The ID of the port whose handle is desired.

Return Values

A valid port handle which can be used in subsequent calls to DeliverMessage or DeliverTransaction.
Success.
BAD_RTHANDLE
Failure. To determine the status, call GetLastRtError.

Status

E_CONTEXT 0x0005
The service is being uninstalled.
E_EXIST 0x0006
No port exists with the given ID for this service.
E_TYPE 0x8002
The SERVICEDESC structure is not valid.

Requirements

Versions Defined in Include Link to
INtime 3.0 intime/rt/include/rtserv.h rtserv.h rtserv.lib

See Also

RT Service system calls, DeliverMessage, DeliverTransaction, SERVICEDESC