Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


LotusScript calling API SHBrowseForFolder

Posted on 2000-03-03
Medium Priority
Last Modified: 2013-12-18
In Notes 4.52, I tried using SHBrowseForFolder to select a folder/directory in my harddrive.

It works for returning the target directory.  However, I don't know how to pass the Initial directory, say c:\My Documents, to the SHBrowseForFolder window.

For anyone who can use LotusScript to perform the call back routine to pass a pre-defined directory into the SHBrowseForFolder, please help me to solve it?
Question by:keithchiu
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3

Expert Comment

ID: 2579505
Check this site for more info:

What you want to do is set the starting directory that the user see at first...I dont think you need callback for that.  The pointer "browseinfo.pidlRoot" contains the starting directory, if its 0 or Null it will start at the desktop.


Author Comment

ID: 2579541
For browseinfo.pidlRoot, any function call so that I can pass a string "C:\My Documents" or other path string and get the folder id (long)?


Expert Comment

ID: 2581901
You can use:
SHGetFolderLocation or SHGetSpecialFolderLocation

An excellent example can be found here:

more detailed info can be found here:

This function will fill in the value in a special structure called ITEMIDLIST, then use it like the example - BI.pidlRoot = IDL.mkid.cb
You tell the function of the special folder through predefined CSIDL's, like "C:\My Documents" is 'CSIDL_PERSONAL', which u pass to the SHGetFOlderLocation.

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 2586151
Your answer is encouraging.  However, it seems that SHGetFolderLocation or SHGetSpecialFolderLocation can only get special folders and not for folders created manually. (e.g, c:\A\B\C\)

Using pidlroot will only show the specific folder and its subfolders that User cannot click to uppper folder.  In Notes, is there any method for the SHBrowseForFolder to show the root as Desktop and a default highlighted directory is somewhere else (c:\A\B\C\)?

Accepted Solution

ghassan99 earned 600 total points
ID: 2586732
Did you check the ulFlag of the BrowserInfo Structure?  Those r cool stuff you can do to the dialog box.  Also in Win2000 the dialog box willl have a new look as I read.
I think to set any directory you have to use the lpfn from the same structure, but it has to use a callback function and they are not supported in Notes.
There is no function from Notes that you can use to do this.
Anyway I found an example in MS website about using the callback routine in C


Expert Comment

ID: 2656371
Any news?


Author Comment

ID: 2659280
When I knew that it does not support the callback function, I gave up and the application simply has no default folder.  Anyway, thank you very much.  Your answer saved me a lot of time.

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

597 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question