You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// <param name="dwReserved">Provider-specific authentication flags used to define the binding options. For more information, see ADS_AUTHENTICATION_ENUM.</param>
545
-
/// <returns>
546
-
/// <para>Type: <c>HRESULT</c></para>
547
-
/// <para>This method supports the standard <c>HRESULT</c> return values, including the following.</para>
548
-
/// <para>For more information, see ADSI Error Codes.</para>
549
-
/// </returns>
550
-
/// <remarks>
551
-
/// <para>This function should not be used just to validate user credentials.</para>
552
-
/// <para>
553
-
/// A C/C++ client calls the <c>ADsOpenObject</c> helper function to bind to an ADSI object, using the user name and password supplied as
554
-
/// credentials for the appropriate directory service. If <c>lpszUsername</c> and <c>lpszPassword</c> are <c>NULL</c> and
555
-
/// <c>ADS_SECURE_AUTHENTICATION</c> is set, ADSI binds to the object using the security context of the calling thread, which is either
556
-
/// the security context of the user account under which the application is running or of the client user account that the calling thread impersonates.
557
-
/// </para>
558
-
/// <para>
559
-
/// The credentials passed to the <c>ADsOpenObject</c> function are used only with the particular object bound to and do not affect the
560
-
/// security context of the calling thread. This means that, in the example below, the call to <c>ADsOpenObject</c> will use different
561
-
/// credentials than the call to ADsGetObject.
562
-
/// </para>
563
-
/// <para>To work with the WinNT: provider, you can pass in <c>lpszUsername</c> as one of the following strings:</para>
564
-
/// <list type="bullet">
565
-
/// <item>
566
-
/// <description>The name of a user account, that is, "jeffsmith".</description>
567
-
/// </item>
568
-
/// <item>
569
-
/// <description>The Windows style user name, that is, "Fabrikam\jeffsmith".</description>
570
-
/// </item>
571
-
/// </list>
572
-
/// <para>With the LDAP provider for Active Directory, you may pass in <c>lpszUsername</c> as one of the following strings:</para>
573
-
/// <list type="bullet">
574
-
/// <item>
575
-
/// <description>
576
-
/// The name of a user account, such as "jeffsmith". To use a user name by itself, you must set only the <c>ADS_SECURE_AUTHENTICATION</c>
577
-
/// flag in the <c>dwReserved</c> parameter.
578
-
/// </description>
579
-
/// </item>
580
-
/// <item>
581
-
/// <description>The user path from a previous version of Windows, such as "Fabrikam\jeffsmith".</description>
582
-
/// </item>
583
-
/// <item>
584
-
/// <description>
585
-
/// Distinguished Name, such as "CN=Jeff Smith,OU=Sales,DC=Fabrikam,DC=Com". To use a DN, the <c>dwReserved</c> parameter must be zero or
586
-
/// it must include the <c>ADS_USE_SSL</c> flag.
587
-
/// </description>
588
-
/// </item>
589
-
/// <item>
590
-
/// <description>
591
-
/// User Principal Name (UPN), such as "jeffsmith@Fabrikam.com". To use a UPN, assign the appropriate UPN value for the
592
-
/// <c>userPrincipalName</c> attribute of the target user object.
593
-
/// </description>
594
-
/// </item>
595
-
/// </list>
596
-
/// <para>
597
-
/// If Kerberos authentication is required for the successful completion of a specific directory request using the LDAP provider, the
598
-
/// <c>lpszPathName</c> binding string must use either a serverless ADsPath, such as "LDAP://CN=Jeff Smith,CN=admin,DC=Fabrikam,DC=com",
599
-
/// or it must use an ADsPath with a fully qualified DNS server name, such as "LDAP://central3.corp.Fabrikam.com/CN=Jeff
600
-
/// Smith,CN=admin,DC=Fabrikam,DC=com". Binding to the server using a flat NETBIOS name or a short DNS name, for example, using the short
601
-
/// name "central3" instead of "central3.corp.Fabrikam.com", may or may not yield Kerberos authentication.
602
-
/// </para>
603
-
/// <para>The following code example shows how to bind to a directory service object with the requested user credentials.</para>
0 commit comments