GetModemPort Method

Navigation:  Reference Guide > Modem >

GetModemPort Method

Previous pageReturn to chapter overviewNext page

Retrieves the name of the port associated with a modem explicitly identified by a modem index.

GetModemPort(short ModemIndex, BSTR *PortName, long *Size, VARIANT_BOOL *Result);

Parameters

ModemIndex

     This parameter is a 0-based index and a valid value must be between 0 and total number of modems - 1.

PortName

    A pointer to a buffer that receives a null-terminated character string containing the port name.

Size

    A pointer to the variable that receives the size, in characters, of the port name string.

Result

    If the method succeeds, the value of variable pointed to by Result is VARIANT_TRUE, otherwise the value is VARIANT_FALSE.

 

Remarks

Use SetPortParam method to define a relationship between a modem index and a communication channel ID (0-7).

 

See Also

SetPortParam Method   |   GetModemCount Method