[This is preliminary documentation and subject to change.]
The MprAdminInterfaceCreate function creates an interface on a specified server.
DWORD MprAdminInterfaceCreate( MPR_SERVER_HANDLE hMprServer, // handle to router DWORD dwLevel, // level of information provided LPBYTE lpBuffer, // info that describes interface HANDLE *phInterface // handle to the interface );
Windows 2000 and later: The dwLevel parameter may have a value of zero, one, or two. A value of one indicates that lpBuffer points to an MPR_INTERFACE_1 structure. A value of two indicates that lpBuffer points to an MPR_INTERFACE_2 structure.
Windows 2000 and later: The lpBuffer parameter points to either an MPR_INTERFACE_0, MPR_INTERFACE_1, or MPR_INTERFACE_2 structure. The dwLevel parameter indicates the type of structure.
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_DDM_NOT_RUNNING | The router interface type specified in the MPR_INTERFACE_0 or MPR_INTERFACE_1 structure is not supported because the Dynamic Interface Manager is configured to run only on a LAN. |
ERROR_INTERFACE_ALREADY_EXISTS | An interface with the same name already exists. |
ERROR_NOT_ENOUGH_MEMORY | Insufficient resources to complete the operation. |
ERROR_NOT_SUPPORTED | The dwLevel value is invalid. |
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.
Windows NT/2000: Requires Windows 2000.
Header: Declared in Mprapi.h.
Library: Use Mprapi.lib.
Router Management Reference, Router Administration Functions, MPR_INTERFACE_0, MPR_INTERFACE_1, MPR_INTERFACE_2, MprAdminInterfaceDelete, MprAdminServerConnect