Share via


RIL_GetSerialPortHandle (Windows Embedded CE 6.0)

1/6/2010

This function retrieves a serial port handle to be used for data communications.

Syntax

HRESULT RIL_GetSerialPortHandle(
  HRIL hRil,
  HANDLE* lphSerial
);

Parameters

  • lphSerial
    Pointer to the serial port handle.

Return Value

Positive HRESULT values indicate success and are used as command identifications for matching the asynchronous call result. Negative HRESULT values indicate an error. Errors are defined in the Ril.h file.

Remarks

The RIL proxy translates the RIL_GetSerialPortHandle function into IOCTL_RIL_GetSerialPortHandle when the RIL proxy calls RIL_IOControl.

During a call to RIL_GetSerialPortHandle, the proxy checks the registry for the serial port handle. If no serial port has been defined, the proxy defaults to "COM:9" and opens up a handle for this serial port.

This function is synchronous. The client is responsible for closing the serial port returned using lphSerial.

Requirements

Header ril.h
Library Ril.lib
Windows Embedded CE Windows CE .NET 4.2 and later

See Also

Reference

RIL Functions
RIL_Initialize
RIL_GetSerialPortHandleFromContextID