NPSDeviceGetString
DWORD NPSDeviceGetString (
DWORD dwNumber,
DWORD dwType,
LPTSTR lpLocalName,
LPDWORD lpBufferSize
);
- dwNumber
- Specifies the number associated with the local device. Devices "A:" to "Z:" for disk devices are assigned numbers 1 to 26, and devices "LPT1" onwards for print devices are assigned numbers 1 onwards.
- dwType
- Specifies the type of device passed in. It can be RESOURCETYPE_DISK, RESOURCETYPE_PRINT.
- lpLocalName
- Returns the name of the local device the caller is interested in. The name will be capitalized with a trailing ":" for disk devices (e.g., "F:" or "LPT2").
- lpBufferSize
- Specifies the size of the lpLocalName buffer passed in, in bytes. If the call fails because the buffer is not big enough, this location will return the required buffer size.
- WN_SUCCESS if the call is successful.
WN_BAD_LOCALNAME |
dwNumber is not a valid number for a disk or print device. |
WN_MORE_DATA |
The lpLocalName buffer is too small. |