RasIOControl

This function is used to configure a Windows CE–based device to function as a Remote Access Service (RAS) server.

RasIOControl IMPLICIT_DECL(
  LPVOID hRasConn,
  DWORD dwCode,
  PBYTE pBufIn,
  DWORD dwLenIn,
  PBYTE pBufOut,
  DWORD dwLenOut,
  PDWORD pdwActualOut
);

Parameters

  • hRasConn
    [in] Set this parameter to NULL for configuring RAS server parameters.

  • dwCode
    [in] I/O control code describing which operation is performed.

    The following table shows a list of possible values for dwCode.

    Value Description BufInType BufOutType
    RASCNTL_SERVER_GET_STATUS Obtains the status of the Point-to-Point Protocol (PPP) server and lines. NULL RASCNTL_SERVERSTATUS+ dwNumLines * RASCNTL_SERVERLINE
    RASCNTL_SERVER_ENABLE Turns the PPP server on. NULL NULL
    RASCNTL_SERVER_DISABLE Turns the PPP server off. NULL NULL
    RASCNTL_SERVER_GET_PARAMETERS Obtains the global server parameters. NULL RASCNTL_SERVERSTATUS
    RASCNTL_SERVER_SET_PARAMETERS Sets the global server parameters. RASCNTL_SERVERSTATUS NULL
    RASCNTL_SERVER_LINE_ADD Adds a line to be managed by the PPP server. RASCNTL_SERVERLINE NULL
    RASCNTL_SERVER_LINE_REMOVE Removes a line being managed by the PPP server. RASCNTL_SERVERLINE NULL
    RASCNTL_SERVER_LINE_ENABLE Enables management of a line. RASCNTL_SERVERLINE NULL
    RASCNTL_SERVER_LINE_DISABLE Disables management of a line. RASCNTL_SERVERLINE NULL
    RASCNTL_SERVER_LINE_GET_PARAMETERS Obtains parameters of a line. RASCNTL_SERVERLINE RASCNTL_SERVERLINE
    RASCNTL_SERVER_LINE_SET_PARAMETERS Sets parameters of a line. RASCNTL_SERVERLINE NULL
    RASCNTL_SERVER_USER_SET_CREDENTIALS Allows a user name or password. RASCNTL_SERVERUSERCREDENTIALS NULL
    RASCNTL_SERVER_USER_DELETE_CREDENTIALS Removes a user name or password. RASCNTL_SERVERUSERCREDENTIALS NULL
  • pBufIn
    [in] I/O control code-dependent input buffer used to pass information to configure server parameters.

  • dwLenIn
    [in] Size of pBufIn in bytes.

  • pBufOut
    [out] I/O control code-dependent output buffer in which server information is returned.

  • dwLenOut
    [in] Size of pBufOut in bytes.

  • pdwActualOut
    [out] Contains the number of bytes of information that were written into pBufOut.

Return Values

This function returns SUCCESS if the function call succeeded or an error code if an error occurred. If the output buffer is too small for the data to be returned, the function will return an ERROR_BUFFER_TOO_SMALL status code.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Ras.h.
Link Library: Coredll.lib.

See Also

RAS Server/PPTP Server (Incoming) | RASCNTL_SERVERSTATUS | RASCNTL_SERVERLINE | RASCNTL_SERVERUSERCREDENTIALS

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.