MprConfigInterfaceSetInfo function (mprapi.h)

The MprConfigInterfaceSetInfo function sets the configuration for the specified interface.

Syntax

DWORD MprConfigInterfaceSetInfo(
  [in] HANDLE hMprConfig,
  [in] HANDLE hRouterInterface,
  [in] DWORD  dwLevel,
  [in] LPBYTE lpbBuffer
);

Parameters

[in] hMprConfig

Handle to the router configuration. Obtain this handle by calling MprConfigServerConnect.

[in] hRouterInterface

Handle to the interface configuration being updated. Obtain this handle by calling MprConfigInterfaceCreate, MprConfigInterfaceGetHandle, or MprConfigInterfaceEnum.

[in] dwLevel

A DWORD value that describes the format in which the information is structured in the lpBuffer parameter. Acceptable values for dwLevel include 0, 1, 2, and 3, as listed in the following table.

Value Structure Format
0 MPR_INTERFACE_0
1 MPR_INTERFACE_1
2 MPR_INTERFACE_2
3 Windows Server 2008 or later: MPR_INTERFACE_3

[in] lpbBuffer

A pointer to a
MPR_INTERFACE_0, MPR_INTERFACE_1,
MPR_INTERFACE_2, or MPR_INTERFACE_3 structure. The dwLevel parameter indicates the type of structure. The information in this structure is used to update the interface configuration.

Return value

If the function succeeds, the return value is NO_ERROR.

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

Value Meaning
ERROR_INVALID_PARAMETER
At least one of the following is true:
  • hMprConfig is NULL.
  • hRouterInterface is NULL.
  • dwLevel is not 0, 1, 2, or 3.
  • lpBuffer is NULL.
Also returns this error code if the interface is of type ROUTER_IF_TYPE_DEDICATED or ROUTER_IF_TYPE_INTERNAL and the interface is enabled.
ERROR_NO_SUCH_INTERFACE
The interface that corresponds to hRouterInterface is not present in the router configuration.
Other
Use FormatMessage to retrieve the system error message that corresponds to the error code returned.

Remarks

The MprAdminInterfaceSetInfo function supports the MPR_INTERFACE_2 structure. However, MprConfigInterfaceSetInfo does not. In order to make persistent changes to a demand-dial interface, call MprAdminInterfaceSetInfo with MPR_INTERFACE_2, then call MprConfigInterfaceSetInfo with MPR_INTERFACE_0 or MPR_INTERFACE_1.

Requirements

   
Minimum supported client None supported
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header mprapi.h
Library Mprapi.lib
DLL Mprapi.dll

See also

FormatMessage

MprConfigInterfaceCreate

MprConfigInterfaceEnum

MprConfigInterfaceGetHandle

MprConfigServerConnect

Router Configuration Functions

Router Management Reference