Page 1 of 1

Cannot use cGetFile32 in some secure networks

Posted: Mon Jun 05, 2006 2:26 pm
by Gale FORd
Because of the way cGetFile32 uses ini file in the windows directory to communicate with rundlg32 I cannot use this function.

Some administrators limit the users access rights to the windows directory.
Is there a way to use an ini in a different directory or use the registry instead?

Re: Cannot use cGetFile32 in some secure networks

Posted: Mon Jun 05, 2006 2:40 pm
by Enrico Maria Giordano
It seems that you are using the Clipper/FW version as the xHarbour/FWH one doesn't use rundlg32.dll at all.

EMG

Posted: Mon Jun 05, 2006 2:51 pm
by Gale FORd
I am not sure about that.

My source file is c:\fwh\source\function\dlgs32.prg

The function cGetFile32() uses

nRet := WinExec( "rundlg32 " + If( lSave, "2", "1" ) )

if nRet > 21 .or. nRet < 0
StopUntil( {|| GetPvProfString( cSection, "working", "0", INIFILE ) != "1" } )
/*while GetPvProfString( cSection, "working", "0", INIFILE ) == "1"
SysRefresh()
end*/

cFile := GetPvProfString( cSection, "lpstrFile", "", INIFILE )
nFilterIndex := Val( GetPvProfString( cSection, "nFilterIndex", "", INIFILE ) )
else
cFile := cGetFile( cFileMask, cTitle, nDefaultMask, cInitDir, lSave,, nFlags )
endif

Posted: Mon Jun 05, 2006 2:53 pm
by Enrico Maria Giordano
That source is for FW 16 bit. The one for FWH is getfile.c.

EMG

Posted: Mon Jun 05, 2006 3:06 pm
by Gale FORd
The only cGetFile function in getfile.c is cGetFile().
There is no cGetFile32() function located in getfile.c.

But I guess what you are saying is that I should not use cGetFile32(). I should only use cGetFile().

Posted: Mon Jun 05, 2006 4:22 pm
by Enrico Maria Giordano
Exactly.

EMG