RpcMgmtInqServerPrincName function (rpcdce.h)
The RpcMgmtInqServerPrincName function returns a server's principal name.
RPC_STATUS RpcMgmtInqServerPrincName( RPC_BINDING_HANDLE Binding, unsigned long AuthnSvc, RPC_WSTR *ServerPrincName );
To receive the principal name for a server, specify a server binding handle for that server. To receive the principal name for your own (local) application, specify a value of NULL.
Authentication service for which a principal name is returned. Valid values are the constant for any valid security provider.
Returns a principal name that is registered for the authentication service in AuthnSvc by the server referenced in Binding. If multiple names are registered, only one name is returned.
||The call succeeded.|
||The binding handle was invalid.|
||This was the wrong kind of binding for the operation.|
An application calls the RpcMgmtInqServerPrincName function to obtain the principal name of a server that is registered for a specified authentication service.
The RPC run-time library allocates memory for the string returned in ServerPrincName. The application is responsible for calling the RpcStringFree function to release the memory used by this function.
The server must be listening for remote procedure calls for this function to succeed. If the server is not listening, the function fails.
|Minimum supported client||Windows 2000 Professional [desktop apps | UWP apps]|
|Minimum supported server||Windows 2000 Server [desktop apps | UWP apps]|
|Header||rpcdce.h (include Rpc.h)|