SplPdQueryPort

SplPdQueryPort returns textual data that describes the port configuration in a way that can be printed by the Workplace Shell.

Syntax
SplPdQueryPort(hab, pszPortName, pBuf, cbBuf, cItems);

Parameters

 * hab (HAB) - input : The handle to the anchor block.


 * pszPortName (PSZ) - input
 * The name of the port to be configured.


 * pBuf (PVOID) - input
 * The pointer to the buffer of data structures.


 * cbBuf (ULONG) - input
 * The size of the buffer in bytes.


 * cItems (PULONG) - input
 * The count of the number of strings of description returned.

Returns

 * rc (APIERR) - returns : Return codes.

This handling routine returns the following errors:


 * ERROR_INSUFFICIENT_BUFFER
 * NO_ERROR

Sample

 * 1) include 

HAB      hab;          /*  The handle to the anchor block. */ PSZ      pszPortName;  /*  The name of the port to be configured. */ PVOID    pBuf;         /*  The pointer to the buffer of data structures. */ ULONG    cbBuf;        /*  The size of the buffer in bytes. */ PULONG   cItems;       /*  The count of the number of strings of description returned. */ APIERR   rc;           /*  Return codes. */

rc = SplPdQueryPort(hab, pszPortName, pBuf,      cbBuf, cItems);

Remarks
The buffer consists of an array of strings (PSZ), the number of which is given by cItems. Each string contains one line of text that can be 0 to 80 characters long. The port name and port description is not required; the Workplace Shell can retrieve these from the OS2SYS.INI file.

The maximum size of the data returned is 4KB. If the buffer is too small, the error code, ERROR_INSUFFICIENT_BUFFER, is returned.