Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert To VFP Code
Message
From
22/02/2003 07:32:11
Virgil Reboton
Iger Technologies Inc.
Bacolod, Philippines
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Convert To VFP Code
Miscellaneous
Thread ID:
00756543
Message ID:
00756543
Views:
40
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
*----------------------------------------
Next
Reply
Map
View

Click here to load this message in the networking platform