BOOL Close( LPCTSTR name_of_connection = NULL )
-
Same as HangUp()
except it will not return until RAS really hangs up.
BOOL Dial( LPCTSTR who_to_call )
-
Dials a phone book entry. Makes a connection.
static BOOL EnableLogging( BOOL enable_logging, LPCTSTR machine_name = NULL )
-
This method allows you to enable logging of the connection. If set to
TRUE, it will create a DEVICE.LOG file that holds the commands and
responses during a RAS connection (when you dial).
HRASCONN GetConnection( LPCTSTR name_of_connection )
-
Gives you the HRASONN for the named connection.
BOOL GetConnections( CStringArray& connection_names )
-
Gives you a list of connection names. These are the names of the
phone book entries that are currently connected. It is a list
of the active RAS connections.
BOOL GetConnectionStatus( void )
-
Returns TRUE is you're connected.
LONG GetErrorCode( void ) const
-
Returns the error code should any function return FALSE.
BOOL GetErrorString( CString& error_string )
-
Same as GetErrorCode() but it gives you a human
readable string instead of a number.
BOOL GetKeepConnectionsAfterLogoff( LPCTSTR machine_name = NULL )
-
Tells you if your RAS connections
will be dropped (disconnected) when the user logs off.
If
is not NULL,
void GetName( CString& name )
-
Gives you the name of the connection that was successfully
Open()'d or
Dial()'d.
BOOL GetPhoneBookEntries( CStringArray& phone_book_entries )
-
Gives you back a list of phone book entry
names. You can use these names to pass to Dial().
BOOL GetProtocolInformation( CRemoteAccessServiceAuthenticationMessageBlock& data_to_get )
BOOL GetProtocolInformation( CRemoteAccessServiceNetBEUIFramer& data_to_get )
BOOL GetProtocolInformation( CRemoteAccessServiceInternetworkPacketExchange& data_to_get )
BOOL GetProtocolInformation( CRemoteAccessServiceInternetProtocol& data_to_get )
-
Gives you back information about the networking protocol used on the active connection.
BOOL HangUp( LPCTSTR name_of_connection = NULL )
-
Tells RAS to terminate the connection. NOTE!
When this function returns, THE CONNECTION HAS NOT BEEN TERMINATED!!
If you immediately exit from your thread/process after calling HangUp(), the connection
will be left in a random state. It is much safer to use
Close() instead.
BOOL IsConnected( void )
-
Returns TRUE if you're connected.
BOOL Open( LPCTSTR who_to_call )
-
Same as Dial but lets you treat RAS like most other object in WFC.
BOOL SetAutomaticallyClose( BOOL automatically_close )
-
When this property is TRUE, the destructor will terminate the connection if there is one.
LPVOID SetConnectionCallback( LPVOID RasDialFunc1_function_pointer )
-
Lets you pass a pointer to a function so you can monitor the progress of RAS.
HWND SetConnectionCallbackWindow( HWND window_handle )
-
Lets you pass a window handle that will
receive
WM_RASDIALEVENT messages so you can monitor the progress of RAS.
DWORD SetDialOptions( DWORD dial_options )
-
Let's you set the dialing options.
BOOL SetKeepConnectionsAfterLogoff( BOOL keep_connections = TRUE, LPCTSTR machine_name )
-
Lets you tell NT whether or not it
should drop all RAS connections when the current user logs off.