Partager via


RasCustomScriptExecute (Compact 2013)

3/26/2014

This function must be exported by the custom-scripting dynamic-link library (DLL), which is implemented by the developer. RAS calls this function when establishing a connection, allowing the DLL to communicate with the server and thus customize the connection process.

Syntax

DWORD RasCustomScriptExecute(
  HANDLE hPort, 
  LPCWSTR lpszPhonebook, 
  LPCWSTR lpszEntryName, 
  PFNRASGETBUFFER pfnRasGetBuffer, 
  PFNRASFREEBUFFER pfnRasFreeBuffer, 
  PFNRASSENDBUFFER pfnRasSendBuffer, 
  PFNRASRECEIVEBUFFER pfnRasReceiveBuffer, 
  PFNRASRETRIEVEBUFFER pfnRasRetrieveBuffer, 
  HWND hWnd, 
  RASDIALPARAMS* pRasDialParams, 
  RASCUSTOMSCRIPTEXTENSIONS* pRasCustomScriptExtensions 
);

Parameters

  • hPort
    [in] Handle to the port on which the connection is established. Use this handle when sending or receiving data on the port.
  • lpszPhonebook
    [in] Not used. Value always equals NULL.
  • lpszEntryName
    [in] Pointer to a Unicode string that contains the name of the entry that was dialed to establish the connection.
  • pfnRasGetBuffer
    [in] Pointer to a function of type PFNRASGETBUFFER. The custom-scripting DLL should use this function to allocate memory to send data to the server.
  • pfnRasFreeBuffer
    [in] Pointer to a function of type PFNRASFREEBUFFER. The custom-scripting DLL should use this function to free memory allocated by the pfnRasGetBuffer parameter.
  • pfnRasSendBuffer
    [in] Pointer to a function of type PFNRASSENDBUFFER. The custom-scripting DLL uses this function to communicate with the server over the specified port.
  • pfnRasReceiveBuffer
    [in] Pointer to a function of type PFNRASRECEIVEBUFFER. The custom-scripting DLL uses this function to communicate with the server over the specified port.
  • pfnRasRetrieveBuffer
    [in] Pointer to a function of type PFNRASRETRIEVEBUFFER. The custom-scripting DLL uses this function to communicate with the server over the specified port.
  • hWnd
    [in] Handle to a window that the custom-scripting DLL can use to present a user interface to the user.
  • pRasDialParams
    [in] Pointer to a Unicode RASDIALPARAMS structure. This structure contains the authentication credentials for the user. The custom-scripting DLL can modify the szUserName, szPassword, and szDomain members of this structure. The Point-to-Point Protocol (PPP) will use whatever is stored in these members when RasCustomScriptExecute returns.
  • pRasCustomScriptExtensions
    [in] Not used. Value always equals NULL.

Return Value

If the function succeeds, it should return ERROR_SUCCESS.

If the function fails, the return value should be an appropriate error code from Winerror.h or Raserror.h.

Note

RasCustomScriptExecute is exported from the custom-scripting DLL, and therefore is not defined in a header file.

Requirements

Library

Developer Implemented

See Also

Reference

Scripting Functions
RasFreeBuffer
RasGetBuffer
RasReceiveBuffer
RasRetrieveBuffer
RasSendBuffer