RasSendBuffer callback function

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

The PFNRASSENDBUFFER type of the RasCustomScriptExecute callback defines a pointer to this function. RasSendBuffer is a placeholder for the application-defined function name.

Syntax


DWORD CALLBACK RasSendBuffer(
   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 value

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.

ValueMeaning
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

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Ras.h

See also

RAS Custom-Scripting
RasCustomScriptExecute
RasReceiveBuffer
RasRetrieveBuffer

 

 

Community Additions

ADD
Show: