This is used to obtain the provider name for a specific type of network.
DWORD WNetGetProviderName( DWORD dwNetType, LPTSTR lpProvider, LPDWORD lpBufferSize );
dwNetType
The network type unique to the network. If two networks claim the same type, then the first network loaded is returned. Only the high word of the network type is used. If a network reports a subtype in the loword, then this is ignored.
lpProvider
Pointer to a buffer in which to return the provider name.
lpBufferSize
The size in bytes of the buffer passed to the function call. The buffer must be at least one byte long. If the result is WN_MORE_DATA, this will contain the buffer size required (in bytes) to hold the provider name.
WN_MORE_DATA | the buffer is too small to hold the provider name. |
WN_NO_NETWORK | wNetType does not match a running provider. |
WN_BAD_POINTER | lpProvider or lpBufferSize is invalid. |