RasGetQuarantineConnectionId function

[This function is not available for use as of Windows Vista. It has been replaced by the RasGetNapStatus function.]

The RasGetQuarantineConnectionId function retrieves the connection ID of a connection participating to the Network Access Protection quarantine process.


DWORD RasGetQuarantineConnectionId(
  _In_  HRASCONN     hRasConn,
  _Out_ ConnectionId *lpConnectionId


  • hRasConn [in]
    Handle to the connection. Use RasDial or RasEnumConnections to obtain this handle.

  • lpConnectionId [out]
    Pointer to a connection ID that, on output, receives the ID value.

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.

Value Meaning

At least one of the following is true: the hRasConn parameter is zero, the lpStatistics parameter is NULL, or the value specified by the dwSize member of the RAS_STATS structure specifies a version of the structure that is not supported by the operating system in use.


The function could not allocate sufficient memory to complete the operation.


Use FormatMessage to retrieve the system error message that corresponds to the error code returned.



Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

End of client support

Windows XP

End of server support

Windows Server 2003


Ras.h (include NapTypes.h)





See also

Remote Access Service (RAS) Overview

Remote Access Service Functions

Network Access Protection