BOOL EnumPorts(pName, Level, pPorts, cbBuf, pcbNeeded, pcReturned) | |||
LPSTR pName; | |||
DWORD Level; | |||
LPBYTE pPorts; | |||
DWORD cbBuf; | |||
LPDWORD pcbNeeded; | |||
LPDWORD pcReturned; |
This function Enumerates the available Monitors that are installed.
pName
Points to a null-terminated string specifying the Server that the Monitors reside on. If NULL, then the Monitors available locally are returned.
Level
This value must be 1.
pMonitors
This points to a buffer that will be filled with an array of MONITOR_INFO_1 structures.
cbBuf
Specifies the size of the buffer pointed to by pMonitors.
pcbNeeded
This points to a variable that will be updated to contain the actual buffer size required that is pointed to by pMonitors. If cbBuf is too small then GetLastError will indicate ERROR_BUFFER_TOO_SMALL, and pcbNeeded will contain the size required. If cbBuf is large enough, then pcbNeeded will contain the number of bytes that were copied.
pcReturned
Points to a variable that will contain the number of MONITOR_INFO_1 structures returned in pMonitors.
The return value is TRUE if the function was successful, or FALSE if an error occurred. To obtain extended error information, use the GetLastError function.