The RpcBindingInqAuthInfoEx function returns authentication, authorization, and security quality-of-service information from a binding handle.
Windows NT: 4.0 (limited functionality), 5.0 (full functionality).
Windows: Windows 95 (clients)
Import Library: RPCRT4.LIB
#include <rpc.h>
RPC_STATUS RPC_ENTRY RpcBindingInqAuthInfoEx(
RPC_BINDING_HANDLE Binding,
RPC_CHAR PAPI * ServerPrincName,
unsigned long PAPI * AuthnLevel,
unsigned long PAPI * AuthnSvc,
RPC_AUTH_IDENTITY_HANDLE PAPI * AuthIdentity,
unsigned long PAPI * AuthzSvc,
unsigned long RpcSecurityQosVersion,
RPC_SECURITY_QOS * SecurityQos
);
Specify a null value to prevent RpcBindingInqAuthInfoEx from returning the ServerPrincName argument. In this case, the application does not call the RpcStringFree routine.
The level returned in the AuthnLevel argument may be different from the level specified when the client called the RpcBindingSetAuthInfoEx routine. This discrepancy happens when the RPC run-time library does not support the authentication level specified by the client and automatically upgrades to the next higher authentication level.
Specify a null value to prevent RpcBindingInqAuthInfoEx from returning the AuthnSvc argument.
Specify a null value to prevent RpcBindingInqAuthInfoEx from returning the AuthIdentity argument.
Specify a null value to prevent RpcBindingInqAuthInfoEx from returning the AuthzSvc argument.
The RpcBindingInqAuthInfoEx function returns one of the following values:
Value | Meaning |
---|---|
RPC_S_OK | Success. |
RPC_S_INVALID_BINDING | Invalid binding handle. |
RPC_S_WRONG_KIND_OF_BINDING | Wrong kind of binding for operation. |
RPC_BINDING_HAS_NO_AUTH | Binding has no authentication information. |
A client application calls the RpcBindingInqAuthInfoEx function to view the authentication and authorization information associated with a server binding handle. This function provides the ability to inquire about the security quality of service on the binding handle. It is otherwise identical to RpcBindingInqAuthInfo.
The RPC run-time library allocates memory for the returned ServerPrincName argument. The application is responsible for calling the RpcStringFree routine for that returned argument string.
When a client application does not know a server's principal name, calling RpcBindingInqAuthInfoEx after making a remote procedure call provides the server's principal name. For example, clients that import from a group or profile may not know a server's principal name when calling the RpcBindingSetAuthInfoEx routine.
RPC_SECURITY_QOS, RpcBindingSetAuthInfoEx, RpcStringFree