MprAdminInterfaceGetHandle
The MprAdminInterfaceGetHandle function retrieves a handle to a specified interface.
DWORD MprAdminInterfaceGetHandle(
MPR_SERVER_HANDLE hMprServer, // handle to router
LPWSTR lpwsInterfaceName, // name of interface
HANDLE *phInterface, // handle to interface
BOOL fIncludeClientInterfaces // toggles inclusion of
// client interfaces
);
Parameters
- hMprServer
- [in] Handle to the Windows 2000 router on which to execute this call. Obtain this handle by calling MprAdminServerConnect.
- lpwsInterfaceName
- [in] Pointer to a Unicode string that specifies the name of the interface to be retrieved.
- phInterface
- [out] Pointer to a HANDLE variable that receives a handle to the interface specified by lpwsInterfaceName.
- fIncludeClientInterfaces
- [in] Specifies whether the function returns a client interface. If this parameter is FALSE, interfaces of type ROUTER_IF_TYPE_CLIENT are ignored in the search for the interface with the name specified by lpwsInterfaceName. If this parameter is TRUE and an interface with the specified name exists, MprAdminInterfaceGetHandle returns a handle to an interface of type ROUTER_IF_TYPE_CLIENT. Since it is possible that there are several interfaces of type ROUTER_IF_TYPE_CLIENT, the handle returned references the first interface found with the name specified by lpwsInterfaceName.
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_PARAMETER |
lpwsInterfaceName is NULL. |
ERROR_NO_SUCH_INTERFACE |
No interface exists with the name specified by lpwsInterfaceName. |
Windows NT/2000: Requires Windows 2000.
Header: Declared in Mprapi.h.
Library: Use Mprapi.lib.
See Also
Router Management Reference, Router Administration Functions, ROUTER_INTERFACE_TYPE, MprAdminServerConnect