Platform SDK: RAS/Routing and RAS |
Developers can create a custom-scripting DLL that resides on a RAS client computer. This DLL can communicate with the server during the process of establishing a connection.
To set up the DLL, create a value with the name CustomScriptDllPath under the following registry key:
\\HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Rasman\Parameters\
This value should be of type REG_EXPAND_SZ. The value should contain the path to the custom-scripting DLL. Only one custom-scripting DLL is supported for each RAS client computer.
RAS will invoke RasCustomScriptExecute for a connection only if the phone-book entry for the connection has the RASEO_CustomScript option set. See the dwfOptions member of RASENTRY for a description of phone-book entry options. Use the RasGetEntryProperties and RasSetEntryProperties functions to set this option programmatically.
If the user activates a connectoid for a phone-book entry that has RASEO_CustomScript set, RAS will invoke the custom-scripting DLL.
To invoke the custom-scripting DLL programmatically, establish the connection using the RasDialDlg function. The RasDial function will not invoke the custom-scripting DLL.
The custom scripting DLL should export a single entry point: RasCustomScriptExecute. RAS will call this function during the RASCS_Interactive state of the connection process. The RASCS_Interactive state is a paused state, which allows the user to interact with a user interface presented by the custom-scripting DLL. See RASCONNSTATE for more information about connection states.
RAS will pass as parameters to the RasCustomScriptExecute function:
See RasCustomScriptExecute for more information about these parameters.
RAS mediates the dialog between the server and the custom-scripting DLL. Typically, the server initiates the dialog. For example, the server may request the user name and password of the the user.
RAS makes no assumptions about the type of server to which the client is connected. The server need not be running Windows NT version 4.0 or Windows 2000.