MprAdminInterfaceSetInfo

The MprAdminInterfaceSetInfo function sets information for a specified interface on a specified server.

DWORD MprAdminInterfaceSetInfo(
  MPR_SERVER_HANDLE hMprServer,  // handle to router 
  HANDLE hInterface,             // handle to interface
  DWORD dwLevel,                 // level of information
  LPBYTE lpbBuffer               // buffer of information
);

Parameters

hMprServer
[in] Handle to the Windows 2000 router to query. This handle is obtained from a previous call to MprAdminServerConnect.
hInterface
[in] Handle to the interface obtained by a previous call to MprAdminInterfaceCreate.
dwLevel
[in] Specifies the type of structure returned through the lplpbBuffer parameter. Must be zero, one, or two.
lpbBuffer
[in] Pointer to an MPR_INTERFACE_0, MPR_INTERFACE_1, or MPR_INTERFACE_2 structure. The dwLevel parameter indicates the type of structure.

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_ACCESS_DENIED The calling application does not have sufficient privileges.
ERROR_INVALID_HANDLE The hInterface value is invalid.
ERROR_INVALID_PARAMETER The lplpbBuffer parameter is NULL.
ERROR_NOT_ENOUGH_MEMORY Insufficient resources to complete the operation.
ERROR_NOT_SUPPORTED The dwLevel value is invalid.

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 Administration Functions, MPR_INTERFACE_0, MPR_INTERFACE_1, MPR_INTERFACE_2, MprAdminBufferFree, MprAdminInterfaceCreate, MprAdminInterfaceGetInfo, MprAdminServerConnect