Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Problem with FileBrowseDlg()


1 reply to this topic

Peter Bi

Peter Bi
  • Members
  • 68 posts

Posted 14 June 2001 - 21:40

*** I also post it on CustomAction forum, sorry if you see it twice... ***

Hi,

I am using FileBrowseDlg() in my CA (for the function, refer to InstallShield kb Q104325 and Q102579, go to http://support.installshield.com/kb/ search the article numbers), The browse dlg works - I can browse the txt file from my local drive, but the function returns empty file path/name in the msgbox. I step through FileBrowseDlg() and found after calling GetOpenFileNameA(&ofn), the 'szFile' is still empty, I expected it to change from empty to whatever I selected path/name, am I right? Anybody knows why and how to fix it?


Here is my simple CA, which follows the sample function in the article:
-------------------------
function browseLicense(hMSI)

STRING svFile[260];
  NUMBER nReturn;
begin    
if(MODE=SILENTMODE) then
//do silent mode license checking...
else
nReturn = FileBrowseDlg(svFile, 260, "Text files (*.txt)\0*.txt\0\0",
"Browse for license file", WINDISK, FALSE, NULL, FALSE);
  endif;

if (nReturn=0) then
MessageBox("File is " + svFile, 0);
else
MessageBox("Error happens!", 0);
endif;
end;


Thanks,
Peter