MgslEnumeratePorts


Prototype  
ULONG MgslEnumeratePorts( PMGSL_PORT pPorts,
                          ULONG BufferSize,
                          PULONG PortCount );
Parameters  
pPorts
Pointer to buffer that receives port information
BufferSize
Size of the buffer pointed to by pPorts in bytes
AdapterCount
Pointer to ULONG that receives the count of PCI adapters
Return Value  
ERROR_SUCCESS (0)
Success
ERROR_INVALID_PARAMETER
PortCount pointer invalid, or return buffer to small
ERROR_GEN_FAILURE
call failed for unspecified reason

Enumerate all available HDLC ports on a computer. Each available port is identified by an entry in a returned array of MGSL_PORT structures. The PortID member of each structure can be used with the MgslOpen call to obtain a port handle. Other structure members are useful for display purposes when prompting the user for a port choice.

See the Opening the Port section of the API Description for more details about the PortID and device name.

Calling this function with pPorts set to NULL will return the number of available ports in PortCount. This can be used to allocate a block of memory large enough to hold the array of MGSL_PORT structures on a subsequent call to MgslEnumeratePorts.


Previous Contents Next