RasGetNapStatus function

The RasGetNapStatus function retrieves the Network Access Protection (NAP) connection state variables for a given remote access connection.

Syntax


DWORD rasgetnapstatus(
  _In_     HRASCONN hRasConn,
  _Inout_  LPRASNAPSTATE pNapState
);

Parameters

hRasConn [in]

A handle to the connection. Use RasDial or RasEnumConnections to obtain this handle.

pNapState [in, out]

A pointer to a RASNAPSTATE structure. On input, the dwSize member of the structure must be set to sizeof(RASNAPSTATE). On output, pNapState returns the NAP state of the RAS connection.

Return value

If the function succeeds, the return value is ERROR_SUCCESS.

If the function fails, the return value is one of the following error codes or a value from Routing and Remote Access Error Codes or Winerror.h.

Return codeDescription
ERROR_NOT_NAP_CAPABLE

Connection corresponding to the hRasConn parameter is not configured for NAP.

ERROR_INVALID_SIZE

The dwSize parameter of the RASNAPSTATE structure has an invalid size value.

ERROR_INVALID_HANDLE

Handle passed to the function is either NULL or invalid.

ERROR_NO_CONNECTION

RASMAN could not find the handle in its list of handles.

 

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Ras.h

Library

Rasapi32.lib

DLL

Rasapi32.dll

 

 

Community Additions

ADD
Show:
© 2014 Microsoft