Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

RpcMgmtInqServerPrincName function

The RpcMgmtInqServerPrincName function returns a server's principal name.

Syntax


RPC_STATUS RPC_ENTRY RpcMgmtInqServerPrincName(
  RPC_BINDING_HANDLE Binding,
  unsigned int AuthnSvc,
  unsigned char **ServerPrincName
);

Parameters

Binding

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.

AuthnSvc

Authentication service for which a principal name is returned. Valid values are the constant for any valid security provider.

ServerPrincName

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.

Return value

ValueMeaning
RPC_S_OK

The call succeeded.

RPC_S_INVALID_BINDING

The binding handle was invalid.

RPC_S_WRONG_KIND_OF_BINDING

This was the wrong kind of binding for the operation.

 

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

Remarks

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.

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

RpcMgmtInqServerPrincNameW (Unicode) and RpcMgmtInqServerPrincNameA (ANSI)

See also

RpcStringFree

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.