Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

NPGetConnection3 function

Retrieves information about a network connection, even if it is currently disconnected.

Syntax


DWORD NPGetConnection3(
  _In_    LPCWSTR lpLocalName,
  _In_    DWORD   dwLevel,
  _Out_   LPVOID  lpBuffer,
  _Inout_ LPDWORD lpBufferSize
);

Parameters

lpLocalName [in]

Pointer to the name of the local device the caller is interested in. The provider can assume that this is syntactically valid.

dwLevel [in]

Value that specifies whether the network connection is currently connected or disconnected.

ValueMeaning
WNGETCON_CONNECTED

The network connection is connected.

WNGETCON_DISCONNECTED

The network connection is disconnected.

 

lpBuffer [out]

Void pointer that receives a buffer that contains the requested information.

lpBufferSize [in, out]

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 codeDescription
WN_NOT_CONNECTED

The device specified by lpLocalName is not redirected by this provider.

WN_MORE_DATA

The buffer was too small to receive all of the data.

WN_NO_NETWORK

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

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Npapi.h

 

 

Community Additions

ADD
Show:
© 2015 Microsoft