Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert To VFP Code
Message
De
22/02/2003 07:32:11
Virgil Reboton
Iger Technologies Inc.
Bacolod, Philippines
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Convert To VFP Code
Divers
Thread ID:
00756543
Message ID:
00756543
Vues:
46
The VB Code from "allapi.net" below allows me to select an Active Directory Container.

I wonder if somebody here can convert this to VFP code.

I have tried my best but i think my best is not good enough.LOL

I am having problem with API structures in VFP. Please guide me.

Thanks in advance.

*----------------------------------------
Private Const MAX_PATH = 160
Private Type DSBROWSEINFO
cbStruct As Long
hwndOwner As Long
pszCaption As String
pszTitle As String
pszRoot As String
pszPath As Long
cchPath As Long
dwFlags As Long
pfnCallback As Long
lParam As Long
dwReturnFormat As Long
pUserName As String
pPassword As String
pszObjectClass As String
cchObjectClass As Long
End Type

Private Declare Function DsBrowseForContainer Lib "dsuiext" Alias "DsBrowseForContainerA" (pInfo As DSBROWSEINFO) As Long
Private Sub Form_Load()
Dim dsbi As DSBROWSEINFO, szResult As String
'initialize the DSBROWSEINFO structure
szResult = Space(MAX_PATH)
dsbi.cbStruct = Len(dsbi)
dsbi.pszCaption = "The container picker"
dsbi.pszTitle = "Pick a container for this example. This will be returned if the user clicks ""OK"""
dsbi.pszPath = StrPtr(szResult)
dsbi.cchPath = Len(szResult)
'call the function
DsBrowseForContainer dsbi
'show the result
MsgBox szResult
End Sub
*----------------------------------------
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform