NPGetConnection3 function (npapi.h)
Retrieves information about a network connection, even if it is currently disconnected.
Syntax
DWORD NPGetConnection3(
[in] LPCWSTR lpLocalName,
[in] DWORD dwLevel,
[out] LPVOID lpBuffer,
[in, out] LPDWORD lpBufferSize
);
Parameters
[in] lpLocalName
Pointer to the name of the local device the caller is interested in. The provider can assume that this is syntactically valid.
[in] dwLevel
Value that specifies whether the network connection is currently connected or disconnected.
Value | Meaning |
---|---|
|
The network connection is connected. |
|
The network connection is disconnected. |
[out] lpBuffer
Void pointer that receives a buffer that contains the requested information.
[in, out] lpBufferSize
Pointer to the size, in characters, of the lpBuffer 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.
If the function fails, it should return one of the following values.
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
A network connection can exist in three states: connected, disconnected, and unavailable. The NPGetConnection3 function cannot retrieve information about network connections that are currently unavailable. It can, however, retrieve information about network connections that are currently disconnected because Windows stores the connection information.
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 |