RpcBindingInqAuthClientExW function (rpcdce.h)
A server application calls the RpcBindingInqAuthClientEx function to obtain extended information about the client program that made the remote procedure call.
Syntax
RPC_STATUS RpcBindingInqAuthClientExW(
RPC_BINDING_HANDLE ClientBinding,
RPC_AUTHZ_HANDLE *Privs,
RPC_WSTR *ServerPrincName,
unsigned long *AuthnLevel,
unsigned long *AuthnSvc,
unsigned long *AuthzSvc,
unsigned long Flags
);
Parameters
ClientBinding
Client binding handle of the client that made the remote procedure call. This value can be zero. See Remarks.
Privs
Returns a pointer to a handle to the privileged information for the client application that made the remote procedure call on the ClientBinding binding handle. For ncalrpc calls, Privs contains a string with the client's principal name.
The server application must cast the Privs parameter to the data type specified by the AuthnSvc parameter. The data referenced by this argument is read-only and should not be modified by the server application. If the server wants to preserve any of the returned data, the server must copy the data into server-allocated memory.
For more information on SSPs, see Security Support Providers (SSPs).
ServerPrincName
Returns a pointer to a pointer to the server principal name specified by the server application that called the RpcServerRegisterAuthInfo function. The content of the returned name and its syntax are defined by the authentication service in use. For the SCHANNEL SSP, the principal name is in msstd format. For further information on msstd format, see Principal Names.
Specify a null value to prevent RpcBindingInqAuthClientEx from returning the ServerPrincName parameter. In this case, the application does not call the RpcStringFree function.
AuthnLevel
Returns a pointer set to the level of authentication requested by the client application that made the remote procedure call on the ClientBinding binding handle. For a list of the RPC-supported authentication levels, see Authentication-Level Constants.
Specify a null value to prevent RpcBindingInqAuthClientEx from returning the AuthnLevel parameter.
AuthnSvc
Returns a pointer set to the authentication service requested by the client application that made the remote procedure call on the ClientBinding binding handle. For a list of the RPC-supported authentication services, see Authentication-Service Constants.
Specify a null value to prevent RpcBindingInqAuthClientEx from returning the AuthnSvc parameter.
AuthzSvc
Returns a pointer set to the authorization service requested by the client application that made the remote procedure call on the Binding binding handle. For a list of the RPC-supported authorization services, see Authorization-Service Constants .
Specify a null value to prevent RpcBindingInqAuthClientEx from returning the AuthzSvc parameter. This parameter is not used by the RPC_C_AUTHN_WINNT authentication service. The returned value will always be RPC_S_AUTHZ_NONE.
Flags
Controls the format of the principal name. This parameter can be set to the following value.
Value | Meaning |
---|---|
|
Passes back the principal name in fullsic format. |
Return value
Value | Meaning |
---|---|
|
The call succeeded. |
|
The binding handle was invalid. |
|
This was the wrong kind of binding for the operation. |
|
Binding has no authentication information. |
Remarks
A server application calls the RpcBindingInqAuthClientEx function to obtain the principal name or privilege attributes of the authenticated client that made the remote procedure call. In addition, RpcBindingInqAuthClientEx returns the authentication service, authentication level, and server principal name specified by the client. The server can use the returned data for authorization purposes.
The RPC run-time library allocates memory for the returned ServerPrincName parameter. The application is responsible for calling the RpcStringFree function for the returned argument string.
For synchronous RPC calls, the server application can use zero as the value for the ClientBinding parameter. Using zero retrieves the authentication and authorization information from the currently executing remote procedure call.
Note
The rpcdce.h header defines RpcBindingInqAuthClientEx as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | rpcdce.h (include Rpc.h) |
Library | Rpcrt4.lib |
DLL | Rpcrt4.dll |