The WNetGetProviderName function obtains the provider name for a specific type of network.
DWORD WNetGetProviderName(
DWORD dwNetType, |
// specifies network type |
LPTSTR lpProvider, |
// pointer to buffer to receive provider name |
LPDWORD lpBufferSize |
// size of buffer |
); |
Windows 95: Size is in bytes, not characters. Also, the buffer must be at least 1 byte long.
If the function succeeds, the return value is WN_SUCCESS. If the function fails, one of the following errors will occur:
Value |
Meaning |
WN_MORE_DATA |
The buffer is too small to hold the provider name. |
WN_NO_NETWORK |
The network is not present. |
WN_BAD_POINTER |
lpProvider or lpBufferSize is invalid. |