Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
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.
Windows NT: Custom scripting is not available.
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.
The custom scripting DLL should export a single entry point: RasCustomScriptExecute. RAS calls 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 passes a pointer to a RASCUSTOMSCRIPTEXTENSIONS structure as the last parameter to RasCustomScriptExecute. This structure contains a pointer to a function of type PFNRASSETCOMMSETTINGS. The custom-scripting DLL calls this function to modify the communication settings on the port being used by the connection.
RAS mediates the interaction 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 user.
When using custom-scripting to establish a connection, the server need not be running Windows NT 4.0 or Windows 2000.
If the custom dialer displays a user interface, the user interface must support WM_COMMAND messages where LOWORD(wParam) equals IDCANCEL.
The RasCustomScriptExecute entry point can be invoked from RasDialDlg or, on Windows XP, from RasDial.
To invoke RasCustomScriptExecute from RasDialDlg, set the RASEO_CustomScript option in the phone-book entry for the connection. 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.
Windows XP: To invoke RasCustomScriptExecute from RasDial, the call to RasDial must specify a RASDIALEXTENSIONS structure, and this structure must specify the RDEOPT_UseCustomScripting flag. In addition, the phone-book entry for the connection must specify the RASEO_CustomScript option as described in the preceding paragraph.
If the user activates a connection for a phone-book entry that has RASEO_CustomScript set, RAS invokes the custom-scripting DLL. In this scenario, RAS invokes the custom-scripting DLL from RasDialDlg.
To invoke the custom-scripting DLL programmatically, establish the connection using the RasDialDlg function. On Windows XP, the RasDial function also invokes the custom-scripting DLL.
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today