Ini Class Problem

Post Reply
Milan Mehta
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

Ini Class Problem

Post 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.
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post 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
Post Reply