2009-11-12 2 views

답변

0
정말 AD 관련이 있지만 대부분의 경우 당신은 당신의 코드로 컴파일 가능한 DLL을 만들고, VB.NET (& 그 반대)로 C 번호를 번역하는 리플렉터를 사용하지

및 Reflector with VB.NET 코드로 dissemble하십시오.

0

당신은 PrincipalContext 사용할 수 있습니다

Imports System.DirectoryServices.AccountManagement 

Module Module1 

    Sub Main() 
     Using ctx As New PrincipalContext(ContextType.Domain) 
      Using p = Principal.FindByIdentity(ctx, "your_account_name") 
       If Not p Is Nothing Then 
        Dim groups = p.GetGroups() 
        Using groups 
         For Each group In groups 
          Console.WriteLine("{0} - {1}", group.SamAccountName, group.DisplayName) 
         Next 
        End Using 
       End If 
      End Using 
     End Using 
    End Sub 
End Module 
관련 문제