The NetHandleGetInfo API retrieves handle-specific information about a serial device or named pipe.
Restrictions
This API can be called from DLS and OS/2 workstations. However, DLS can issue only a level 1 call to a remote server.
This API is 16-bit only.
#include <netcons.h> #include <chardev.h> NetHandleGetInfo(handle, sLevel, buf, usBuflen, pusBytesAvail); /* 16 bit */Parameters
See Common Parameter Definitions for descriptions of parameters not defined here.
handle
Level 1 is available for handles to both serial devices and named pipes. However, level 2 is available only for named pipe handles.
When level 1 is specified, the call can be issued only from a requester. Otherwise, the ERROR_INVALID_PARAMETER error code is returned.
When level 2 is specified, the call can be issued only to a local server. At level 2, the call identifies the user of a particular instance of a remote named pipe with multiple instances. If the handle is not to a named pipe that a remote client currently has open, the ERROR_INVALID_PARAMETER error code is returned.
The following table lists the return codes most significant to this API.
(See API Return Codes for a complete
list of return codes.) ┌───────────────────────────┬───────┬──────────────────────────────────────────┐│SYMBOLICCONSTANT
│VALUE│MEANING │
├───────────────────────────┼───────┼──────────────────────────────────────────┤
│ NERR_Success │ 0 │ No errors were encountered. │
├───────────────────────────┼───────┼──────────────────────────────────────────┤
│ ERROR_ACCESS_DENIED │ 5 │ Administrator privilege is required. │
├───────────────────────────┼───────┼──────────────────────────────────────────┤
│ ERROR_NOT_SUPPORTED │ 50 │ This request is not supported by the
│
│ │ │ network. │
├───────────────────────────┼───────┼──────────────────────────────────────────┤
│ ERROR_INVALID_PARAMETER │ 87 │ At least one parameter value is not
│
│ │ │ valid. │
├───────────────────────────┼───────┼──────────────────────────────────────────┤
│ ERROR_INVALID_LEVEL │ 124 │ The sLevel parameter is not valid. │
├───────────────────────────┼───────┼──────────────────────────────────────────┤
│ ERROR_MORE_DATA │ 234 │ Additional data is available, but the │
│ │ │ buffer is too small. │
├───────────────────────────┼───────┼──────────────────────────────────────────┤
│ NERR_NetNotStarted │ 2102 │ The redirector NETWKSTA.200 has not been
│
│ │ │ started. │
├───────────────────────────┼───────┼──────────────────────────────────────────┤
│ NERR_BufTooSmall │ 2123 │ The buffer is too small for fixed-length
│
│ │ │ data. │
├───────────────────────────┼───────┼──────────────────────────────────────────┤
│ NERR_WkstaNotStarted │ 2138 │ The Requester service has not been
│
│ │ │ started. │
├───────────────────────────┼───────┼──────────────────────────────────────────┤
│ NERR_InvalidComputer │ 2351 │ The specified computer name is not
│
│ │ │ valid. │
└───────────────────────────┴───────┴──────────────────────────────────────────┘
Other codes could be returned from the following functions: