benpoole.com

“It is a very sad thing that nowadays there is so little useless information.”

GetOpenFilename that works with Windoze old and new

Written by Ben Poole on 20 Aug 2002
Categories / keywords: Win32 API, Lotusscript
(click on a term to search for related articles at this site)

Add a comment...



Background

File browsing from the Notes client is easier with R5's new "OpenFileDialog" NotesUIWorkspace method, but what about backwards compatibility (with Win95 etc.) within a newer (XP / Professional) Windows environment?

An application I look after recently got upgraded to an R5 server, but had to work with R4.x clients on Win95 and R5 clients on Win2k. It used a Win32 function adapted for Lotusscript, that browsed the local file system (i.e. used a common dialog box).

This code no longer worked in R5, despite it making use of a standard Win32 call. After a lot of head-scratching I figured out why (and will update this document to tell you once I read the code again / remember), and I was able to sort it out so that it worked again, in both environments.

Download the attached LSS file, and do with it what you will (I suggest creating a blank script library, and then doing a File / Import with the LSS file).


Further reading:


Attachment(s): libGetOpenFileName.lss (4 KB)

   » GetOpenFilename that works with Windoze old and new (Ben Poole 20 Aug 2002)

Add a comment...