Platform SDK: RAS/Routing and RAS

RasSendBuffer

The custom-scripting DLL calls the RasSendBuffer function to send data to the server over the specified port.

typedef DWORD (APIENTRY *PFNRASSENDBUFFER) (
  HANDLE    hPort,
  PBYTE     pBuffer,
  DWORD     dwSize
);

Parameters

hPort
Handle to the port on which to send the data in the buffer. This handle should be the handle passed in by RAS as the first parameter of the RasCustomScriptExecute function.
pBuffer
Pointer to a buffer of data to send over the port specified by the hPort parameter. Obtain this buffer using RasGetBuffer function.
dwSize
Specifies the size of the data in the buffer pointed to by the pBuffer parameter.

Return values

If the function succeeds, the return value is ERROR_SUCCESS.

If the function fails, the return value can be one of the following error codes.

Value Meaning
ERROR_BUFFER_INVALID The pointer to the buffer passed in the pBuffer parameter is invalid.
ERROR_INVALID_PORT_HANDLE The handle specified by the hPort parameter is invalid.

Remarks

The custom-scripting DLL calls RasSendBuffer through a function pointer. The function pointer is passed to the custom-scripting DLL as a parameter when RAS calls the DLL's implementation of RasCustomScriptExecute.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Unsupported.
  Header: Declared in Rasdlg.h.

See Also

RAS Custom-Scripting, RasCustomScriptExecute, RasReceiveBuffer, RasRetrieveBuffer