MprAdminInterfaceGetHandle function (mprapi.h)
The MprAdminInterfaceGetHandle function retrieves a handle to a specified interface.
Syntax
DWORD MprAdminInterfaceGetHandle(
[in] MPR_SERVER_HANDLE hMprServer,
[in] LPWSTR lpwsInterfaceName,
[out] HANDLE *phInterface,
[in] BOOL fIncludeClientInterfaces
);
Parameters
[in] hMprServer
Handle to the router on which to execute this call. Obtain this handle by calling MprAdminServerConnect.
[in] lpwsInterfaceName
Pointer to a null-terminated Unicode string that specifies the name of the interface to be retrieved.
[out] phInterface
Pointer to a HANDLE variable that receives a handle to the interface specified by lpwsInterfaceName.
[in] fIncludeClientInterfaces
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 value
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 |
---|---|
|
The calling application does not have sufficient privileges. |
|
No interface exists with the name specified by lpwsInterfaceName. |
|
The passed in handle to the server is NULL. |
|
lpwsInterfaceName is NULL. |
Requirements
Requirement | Value |
---|---|
Minimum supported client | None supported |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | mprapi.h |
Library | Mprapi.lib |
DLL | Mprapi.dll |