Page 1 of 1

Ini Class Problem

Posted: Thu May 18, 2006 11:29 am
by Milan Mehta
Hello All,

In order to open the file using Ini class, I need to mention, the complete path of the file, which I do with curdrive() and curdir() function. But when I run the application from network however, above two function do not return me the complete network path, hence I am not able to open the same properly when used in network.

Is there any way out ?

TIA
Milan.

Posted: Thu May 18, 2006 2:55 pm
by James Bott
Milan,

Where are you putting the INI file? If it is in the application directory, then you don't need the path. If it is in a subdirectory of the application, then use something like "..\data\" as the path.

Or, maybe this will help:

Here is how to find the path to the application you are running. It handles long file/path names by returning the short ones. Trailing slash is included.

cPath:= (cFilePath( GetModuleFileName( GetInstance() ) ))

James