FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Ini Class Problem
Posts: 115
Joined: Mon Oct 17, 2005 04:42 AM
Ini Class Problem
Posted: 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.

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Ini Class Problem
Posted: Thu May 18, 2006 02: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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion