RasGetConnectStatusA function (ras.h)

The RasGetConnectStatus function retrieves information on the current status of the specified remote access connection. An application can use this call to determine when an asynchronous RasDial call is complete.

Syntax

DWORD RasGetConnectStatusA(
  [in]      HRASCONN         unnamedParam1,
  [in, out] LPRASCONNSTATUSA unnamedParam2
);

Parameters

[in] unnamedParam1

Specifies the remote access connection for which to retrieve the status. This handle must have been obtained from RasDial or RasEnumConnections.

[in, out] unnamedParam2

Pointer to the RASCONNSTATUS structure that, on output, receives the status information.

On input, set the dwSize member of the structure to sizeof(RASCONNSTATUS) in order to identify the version of the structure being passed.

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
ERROR_NOT_ENOUGH_MEMORY
The function could not allocate sufficient memory to complete the operation.

Remarks

The return value for RasGetConnectStatus is not necessarily equal to the value of the dwError member of the RASCONNSTATUS structure returned by RasGetConnectStatus. The return value of RasGetConnectStatus indicates errors that occur during the RasGetConnectStatus function call, whereas the dwError member indicates errors that prevented the connection from being established.

Note

The ras.h header defines RasGetConnectStatus as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header ras.h
Library Rasapi32.lib
DLL Rasapi32.dll

See also

RASCONNSTATUS

RasDial

RasEnumConnections

Remote Access Service (RAS) Overview

Remote Access Service Functions