/// <summary>
 ///  The DsrGetDcNameEx2 method returns information about
 ///  a domain controller in the specified domain and site. Supported
 ///  in windows_2000_server, windows_xp, windows_server_2003,
 ///  windows_vista, and windows_server_2008, windows_7,
 ///  and windows_server_7. The method will also verify that
 ///  the responding DC database contains an account if AccountName
 ///  is specified. The server that receives this call is
 ///  not required to be a DC. Opnum: 34 
 /// </summary>
 /// <param name="computerName">
 ///  The custom RPC binding handle.
 /// </param>
 /// <param name="accountName">
 ///  A null-terminated Unicode string that contains the name
 ///  of the account that MUST exist and be enabled on the
 ///  DC.
 /// </param>
 /// <param name="allowableAccountControlBits">
 ///  A set of bit flags that list properties of the AccountName
 ///  account. A flag is TRUE (or set) if its value is equal
 ///  to 1. If the flag is set, then the account MUST have
 ///  that property; otherwise, the property is ignored.
 ///  The value is constructed from zero or more bit flags
 ///  from the following table.
 /// </param>
 /// <param name="domainName">
 ///  A null-terminated Unicode string that contains the domain
 ///  name (3).
 /// </param>
 /// <param name="domainGuid">
 ///  A pointer to a GUID structure that specifies the GUID
 ///  of the domain queried. If DomainGuid is not NULL and
 ///  the domain specified by DomainName cannot be found,
 ///  the DC locator attempts to locate a DC in the domain
 ///  that has the GUID specified by DomainGuid. This allows
 ///  renamed domains to be found by their GUID.
 /// </param>
 /// <param name="siteName">
 ///  A null-terminated string that contains the name of the
 ///  site in which the DC MUST be located.
 /// </param>
 /// <param name="flags">
 ///  A set of bit flags that provide additional data that
 ///  is used to process the request. A flag is TRUE (or
 ///  set) if its value is equal to 1. The value is constructed
 ///  from zero or more bit flags from the following table,
 ///  with the exceptions that bits D, E, and H cannot be
 ///  combined; S and R cannot be combined; and N and O cannot
 ///  be combined.
 /// </param>
 /// <param name="domainControllerInfo">
 ///  A pointer to a DOMAIN_CONTROLLER_INFOW structure 
 ///  containing data about the DC.
 /// </param>
 /// <returns>
 /// The method returns 0x00000000 on success; 
 /// otherwise, it returns a nonzero error code.
 /// </returns>
 public NetApiStatus DsrGetDcNameEx2(
     string computerName,
     string accountName,
     NrpcAllowableAccountControlBits allowableAccountControlBits,
     string domainName,
     Guid? domainGuid,
     string siteName,
     NrpcDsrGetDcNameFlags flags,
     out _DOMAIN_CONTROLLER_INFOW? domainControllerInfo)
 {
     return rpc.DsrGetDcNameEx2(
         computerName,
         accountName,
         (uint)allowableAccountControlBits,
         domainName,
         domainGuid,
         siteName,
         (uint)flags,
         out domainControllerInfo);
 }
 /// <summary>
 ///  The DsrGetDcNameEx method Supported in windows_2000_server,
 ///  windows_xp, windows_server_2003, windows_vista, windows_server_2008,
 ///  windows_7, and windows_server_7. is a predecessor to
 ///  the DsrGetDcNameEx2 method. The method returns information
 ///  about a domain controller in the specified domain and
 ///  site. All parameters of this method have the same meanings
 ///  as the identically named parameters of the DsrGetDcNameEx2
 ///  method. Opnum: 27 
 /// </summary>
 /// <param name="computerName">
 ///  ComputerName parameter.
 /// </param>
 /// <param name="domainName">
 ///  DomainName parameter.
 /// </param>
 /// <param name="domainGuid">
 ///  DomainGuid parameter.
 /// </param>
 /// <param name="siteName">
 ///  SiteName parameter.
 /// </param>
 /// <param name="flags">
 ///  Flags parameter.
 /// </param>
 /// <param name="domainControllerInfo">
 ///  DomainControllerInfo parameter.
 /// </param>
 /// <returns>
 /// The method returns 0x00000000 on success; 
 /// otherwise, it returns a nonzero error code.
 /// </returns>
 public NetApiStatus DsrGetDcNameEx(
     string computerName,
     string domainName,
     Guid? domainGuid,
     string siteName,
     NrpcDsrGetDcNameFlags flags,
     out _DOMAIN_CONTROLLER_INFOW? domainControllerInfo)
 {
     return rpc.DsrGetDcNameEx(
         computerName,
         domainName,
         domainGuid,
         siteName,
         (uint)flags,
         out domainControllerInfo);
 }