NPGetConnection

Obtains information about a redirected device.


DWORD NPGetConnection(
  LPTSTR lpLocalName,
  LPTSTR lpRemoteName,
  LPDWORD lpBufferSize
  );

lpLocalName

Contains the name of the local device the caller is interested in.

lpRemoteName

Points to a buffer to receive the remote name used to make the connection.

lpBufferSize

This is used to specify the size, in bytes, of the buffer passed in. If the call fails because the buffer is not big enough, this location will be used to return the required buffer size.

WN_BAD_LOCALNAME

lpLocalName is invalid.

WN_NOT_CONNECTED

lpLocalName not a redirected device.

WN_MORE_DATA

The buffer is too small.

WN_NO_NETWORK

The network is not present.