NPGetConnection function (npapi.h)
Retrieves information about a connection.
Syntax
DWORD NPGetConnection(
[in] LPWSTR lpLocalName,
[out] LPWSTR lpRemoteName,
[in, out] LPDWORD lpnBufferLen
);
Parameters
[in] lpLocalName
Pointer to the name of the local device the caller is interested in. The network provider can assume this name is syntactically valid.
[out] lpRemoteName
Pointer to a buffer that will receive the remote name used to make the connection. This buffer is allocated by the caller.
[in, out] lpnBufferLen
Pointer to the size, in characters, of the lpRemoteName buffer. If the call fails because the buffer is not big enough, lpBufferSize is set to the required buffer size.
Return value
If the function succeeds, it should return WN_SUCCESS. Otherwise, it should return an error code, which can be one of the following:
Return code | Description |
---|---|
|
The device specified by lpLocalName is not redirected by this provider. |
|
The buffer was too small to receive all of the data. |
|
The network is not present. |
Remarks
The NPGetConnection function can return information only about a network connection that is currently connected. To retrieve information about a network connection that is currently disconnected, use NPGetConnection3.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | npapi.h |