Link to home
Start Free TrialLog in
Avatar of ronin258
ronin258

asked on

need help setting root directory for a BrowseInfo object

I am using BrowseInfo with BrowseForFolder to let the user select a folder but I want to specify a certain directory as the root directory. I am trying to use the function SHSimpleIDListFromPath(string path of folder) to get the PIDL of the folder. The problem is that I don't know the right syntax for the declaration of the function.

I tried:
Declare Function SHSimpleIDListFromPath Lib "shell32.dll" (ByVal pszPath As String) As Long

I get the error "Can't find DLL entry point SHSimpleIDListFromPath in shell32.dll" Can anybody help me?
Avatar of twalgrave
twalgrave

Try this declaration:

Private Declare Function SHSimpleIDListFromPath Lib "Shell32" Alias "#162" _
    (ByVal lpszPath As String) As Long


ASKER CERTIFIED SOLUTION
Avatar of twalgrave
twalgrave

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial