我现在做个程序,要每次拨号成功后获取一个事件!

解决方案 »

  1.   

    DWORD RasConnectionNotification(    HANDLE hEvent, // handle to an event object
        DWORD dwFlags // type of event to receive notifications for
       );
    ParametershEventSpecifies the handle of an event object. Use the CreateEvent function to create an event object.dwFlagsIndicates the RAS event that causes the system to signal the event object specified by the hEvent parameter. This parameter can be a combination of the following values.Value Meaning
    RASCN_Connection A new RAS connection has been created.
    RASCN_Disconnection An existing RAS connection has been terminated.
     Return ValuesIf the function succeeds, the return value is zero.
    If the function fails, the return value is a nonzero error code.
    你可以参看win sdk