Export (0) Print
Expand All
Expand Minimize

RpcServerInqDefaultPrincName function

The RpcServerInqDefaultPrincName function obtains the default principal name for a given authentication service.

Syntax


RPC_STATUS RPC_ENTRY RpcServerInqDefaultPrincName(
  unsigned long AuthnSvc,
  RPC_CHAR **PrincName
);

Parameters

AuthnSvc

Authentication service to use when the server receives a request for a remote procedure call.

PrincName

Upon success, contains the default principal name for the given authentication service as specified by the AuthnSvc parameter. The authentication service in use defines the content of the name and its syntax. This principal name must be used as the ServerPrincName parameter of the RpcServerRegisterAuthInfo function. If the function succeeds, PrincName must be freed using the RpcStringFree function. If the function fails, the contents of PrincName is undefined and the caller has no obligation to free it.

Return value

ValueMeaning
RPC_S_OK

The call succeeded.

RPC_S_OUT_OF_MEMORY

There is insufficient memory to complete the operation.

 

Note  For a list of valid error codes, see RPC Return Values.

Remarks

This function is the recommended way to obtain the server principal name to be passed to the RpcServerRegisterAuthInfo function. While composing the server principal name is possible without using this function, calling the function is easier and more portable across operating system versions.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Rpcdce.h (include Rpc.h)

Library

Rpcrt4.lib

DLL

Rpcrt4.dll

Unicode and ANSI names

RpcServerInqDefaultPrincNameW (Unicode) and RpcServerInqDefaultPrincNameA (ANSI)

See also

RpcBindingSetAuthInfo
RpcServerRegisterAuthInfo

 

 

Community Additions

ADD
Show:
© 2014 Microsoft