MprConfigInterfaceCreate

[This is preliminary documentation and subject to change.]

The MprConfigInterfaceCreate function creates a router interface in the specified router configuration.

DWORD MprConfigInterfaceCreate(
  HANDLE hMprConfig,         // handle to the router configuration 
  DWORD dwLevel,             // level of information requested
  LPBYTE lpbBuffer,          // MPR_INTERFACE_0 structure
  HANDLE *phRouterInterface  // handle to the interface configuration
);

Parameters

hMprConfig
[in] Handle to the router configuration. Obtain this handle by calling MprConfigServerConnect.
dwLevel
[in] Specifies the level of information requested. This parameter must be zero.

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

lpbBuffer
[in] Pointer to an MPR_INTERFACE_0 structure.

Windows 2000 and later: This parameter may point to either an MPR_INTERFACE_0 or MPR_INTERFACE_1 structure. The type of structures is indicated by the value of the dwLevel parameter.

phRouterInterface
[out] Pointer to a handle variable. This variable receives a handle to the interface configuration.

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
  • dwLevel is not zero or one.
  • lpbBuffer is NULL
  • phRouterInterface is NULL
ERROR_NOT_ENOUGH_MEMORY Insufficient resources to complete the operation.
Other Use FormatMessage to retrieve the system error message that corresponds to the error code returned.

Remarks

Windows 2000 and later: The MprAdminInterfaceCreate function supports the MPR_INTERFACE_2 structure. However, MprConfigInterfaceCreate does not. In order to create a demand-dial interface that is persistent after a reboot, call MprAdminInterfaceCreate with MPR_INTERFACE_2, then call MprConfigInterfaceCreate 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, MprConfigInterfaceDelete, MprConfigServerConnect