RasConnectionNotificationA function (ras.h)
The RasConnectionNotification function specifies an event object that the system sets to the signaled state when a RAS connection is created or terminated.
Syntax
DWORD RasConnectionNotificationA(
[in] HRASCONN unnamedParam1,
[in] HANDLE unnamedParam2,
[in] DWORD unnamedParam3
);
Parameters
[in] unnamedParam1
A handle to the RAS connection that receives the notifications. This can be a handle returned by the RasDial or RasEnumConnections function. If this parameter is INVALID_HANDLE_VALUE, notifications are received for all RAS connections on the local client.
[in] unnamedParam2
Specifies the handle of an event object. Use the CreateEvent function to create an event object.
[in] unnamedParam3
Specifies the RAS event that causes the system to signal the event object specified by the hEvent parameter. This parameter is a combination of the following values.
Return value
If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is a non-zero error code from Routing and Remote Access Error Codes or Winerror.h.
Remarks
To determine when the event object is signaled, use any of the wait functions.
When the event is signaled, use other RAS functions, such as RasEnumConnections, to get more information about the RAS connection that was created or terminated.
Note
The ras.h header defines RasConnectionNotification as an alias that 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 is 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 |