General Help regarding HMG, Compilation, Linking, Samples
Moderator: Rathinagiri
-
AUGE_OHR
- Posts: 2061
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Post
by AUGE_OHR »
hi,
i do have
Code: Select all
zPATH := HB_CurDrive() + ':\' + CURDIR() + '\'
USE (ZPATH+"WMPSETUP.DBF") ALIAS WMPSETUP SHARED
let say App is in C:\MYDIR and i start with
C:\MYDIR\MyApp.EXE
from C:\Somewhere
than zPATH is NOT C:\MYDIR ... it is C:\Somewhere
so how to get App Start Directory
have fun
Jimmy
-
SALINETAS24
- Posts: 667
- Joined: Tue Feb 27, 2018 3:06 am
- DBs Used: DBF
-
Contact:
Post
by SALINETAS24 »
AUGE_OHR wrote: ↑Sun May 09, 2021 10:33 am
hi,
i do have
Code: Select all
zPATH := HB_CurDrive() + ':\' + CURDIR() + '\'
USE (ZPATH+"WMPSETUP.DBF") ALIAS WMPSETUP SHARED
let say App is in C:\MYDIR and i start with
C:\MYDIR\MyApp.EXE
from C:\Somewhere
than zPATH is NOT C:\MYDIR ... it is C:\Somewhere
so how to get App Start Directory
No termino de entender,
Pero quizas buscas esto
GetCurrentFolder()
Te devuelve el Directorio donde estas ejecutando el programa
Sl2
Como dijo el gran pensador Hommer Simpson..., - En este mundo solo hay 3 tipos de personas, los que saben contar y los que no.
-
AUGE_OHR
- Posts: 2061
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Post
by AUGE_OHR »
hi,
SALINETAS24 wrote: ↑Sun May 09, 2021 10:53 am
No termino de entender,
Pero quizas buscas esto
GetCurrentFolder()
Te devuelve el Directorio donde estas ejecutando el programa
thx for Answer.
it does give me Folder where i start external App, not where App exist.
---
Code for "C:\MYDIR\MyApp.EXE"
Code: Select all
PROCEDURE MAIN
LOCAL cDIr := GetCurrentFolder()
MsgInfo(cDIr)
now try to start from "C:\Somewhere" and call "C:\MYDIR\MyApp.EXE"
GetCurrentFolder() give me "C:\Somewhere" not "C:\MYDIR"
have fun
Jimmy
-
mustafa
- Posts: 1158
- Joined: Fri Mar 20, 2009 11:38 am
- DBs Used: DBF
- Location: Alicante - Spain
-
Contact:
Post
by mustafa »
maybe ?
Code: Select all
cDir1 := HB_CurDrive()+':\'+CurDir()+'\'
cDir2 := HB_CurDrive()+':\'+CurDir()+'\Docs\'
DIRCHANGE( cDir1)
DIRCHANGE( cDir2)
Saludos/Regards/Salam
Mustafa
-
edk
- Posts: 911
- Joined: Thu Oct 16, 2014 11:35 am
- Location: Poland
Post
by edk »
hb_DirBase() ➜ cDirName
returns the application's executable base directory (program statrtup directory).
hb_ProgName() ➜ cExeName
returns the executable program name.
-
hansmarc
- Posts: 40
- Joined: Thu Jun 23, 2016 5:38 am
- Location: Belgium
Post
by hansmarc »
Hi Jimmy,
use hb_dirbase()
regards
Hans
-
AUGE_OHR
- Posts: 2061
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Post
by AUGE_OHR »
hi
edk wrote: ↑Sun May 09, 2021 12:08 pm
hb_DirBase() ➜ cDirName
returns the application's executable base directory (program statrtup directory).
hb_ProgName() ➜ cExeName
returns the executable program name.
YES ... hb_DirBase() work like i want, THX
have fun
Jimmy