Platform SDK: RAS/Routing and RAS |
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.
DWORD RasGetConnectStatus( HRASCONN hrasconn, // handle to RAS connection of interest LPRASCONNSTATUS lprasconnstatus // buffer to receive status data );
If the function succeeds, the return value is zero.
If the function fails, the return value is a nonzero error value listed in the RAS header file or either ERROR_BUFFER_TOO_SMALL or ERROR_NOT_ENOUGH_MEMORY.
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.
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Ras.h.
Library: Use Rasapi32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000.
Remote Access Service (RAS) Overview, Remote Access Service Functions, RASCONNSTATUS, RasDial, RasEnumConnections