Ini Class Problem

Ini Class Problem

Postby Milan Mehta » Thu May 18, 2006 11:29 am

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.
Milan Mehta
 
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

Postby James Bott » Thu May 18, 2006 2:55 pm

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 87 guests