MprConfigInterfaceSetInfo

[This is preliminary documentation and subject to change.]

The MprConfigInterfaceSetInfo function sets the configuration for the specified interface.

DWORD MprConfigInterfaceSetInfo(
  HANDLE hMprConfig,        // handle to the router configuration
  HANDLE hRouterInterface,  // handle to the interface configuration
  DWORD dwLevel,            // level of the information requested
  LPBYTE lpBuffer           // MPR_INTERFACE_0 structure
);

Parameters

hMprConfig
[in] Handle to the router configuration. Obtain this handle by calling MprConfigServerConnect.
hRouterInterface
[in] Handle to the interface configuration being updated. Obtain this handle by calling MprConfigInterfaceCreate, MprConfigInterfaceGetHandle, or MprConfigInterfaceEnum.
dwLevel
[in] Specifies the level of the information in the lpBuffer parameter. This parameter must be zero.

Windows 2000 and later: This parameter may have a value of one. A value of one indicates that the lpBuffer parameter points to an MPR_INTERFACE_1 structure.

lpBuffer
[in] Pointer to a buffer that contains an MPR_INTERFACE_0 structure. The information in this structure is used to update the interface configuration.

Windows 2000 and later: The buffer contains either an MPR_INTERFACE_0 or MPR_INTERFACE_1 structure. The type of the structures is indicated by the value of the dwLevel parameter.

Return Values

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 zero or one.
  • lpBuffer is NULL.
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

Windows 2000 and later: 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

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Mprapi.h.
  Library: Use Mprapi.lib.

See Also

Router Management Reference, Router Configuration Functions, FormatMessage, MprConfigInterfaceCreate, MprConfigInterfaceEnum, MprConfigInterfaceGetHandle, MprConfigServerConnect