Export (0) Print
Expand All

DnsAcquireContextHandle function

The DnsAcquireContextHandle function type acquires a context handle to a set of credentials. Like many DNS functions, the DnsAcquireContextHandle function type is implemented in multiple forms to facilitate different character encoding. Based on the character encoding involved, use one of the following functions:

  • DnsAcquireContextHandle_A (_A for ANSI encoding)

  • DnsAcquireContextHandle_W (_W for Unicode encoding)

Syntax


DNS_STATUS WINAPI DnsAcquireContextHandle(
  _In_      DWORD CredentialFlags,
  _In_opt_  PVOID Credentials,
  _Out_     PHANDLE pContext
);

Parameters

CredentialFlags [in]

A flag that indicates the character encoding. Set to TRUE for Unicode, FALSE for ANSI.

Credentials [in, optional]

A pointer to a SEC_WINNT_AUTH_IDENTITY_W structure or a SEC_WINNT_AUTH_IDENTITY_A structure that contains the name, domain, and password of the account to be used in a secure dynamic update. If CredentialFlags is set to TRUE, Credentials points to a SEC_WINNT_AUTH_IDENTITY_W structure; otherwise, Credentials points to a SEC_WINNT_AUTH_IDENTITY_A structure. If not specified, the credentials of the calling service are used. This parameter is optional.

pContext [out]

A pointer to a handle pointing to the returned credentials.

Return value

Returns success confirmation upon successful completion. Otherwise, returns the appropriate DNS-specific error code as defined in Winerror.h.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Windns.h

Library

Dnsapi.lib

DLL

Dnsapi.dll

Unicode and ANSI names

DnsAcquireContextHandle_W (Unicode) and DnsAcquireContextHandle_A (ANSI)

See also

DnsQuery
SEC_WINNT_AUTH_IDENTITY
DNS_RECORD

 

 

Community Additions

ADD
Show:
© 2014 Microsoft