Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a function that returns the path of my executable?

Status
Not open for further replies.

Lekar

Programmer
Sep 7, 2001
85
CR
Is there a function that returns the path of my executable?

I load some color for my application from a Ini file each time I open a window. But, when my application opens a Save Dialog Box and the user chooses another directory, then my application can't find the ini because is looking in the last directory selected by the user.

I remember I can find out the path of my exec in Visual Basic using App.Path, but I couldn't find some similar statement in PowerBuilder.

Thanks in advance.
 
I think there is no built-in function in PB that return your appl path, but you can call a external function which is API, if i am not mistaken the API name, it is getDirectoryA( Value handle, Ref string)
 
Hi,

There are some API functions to do this. However, there are some implications too, that you need to be addressed while implementing this. Surf to:



and various follow-up messages at the bottom of the above thread.


Regards,

--
PowerObject!
-----------------------------------------
PowerBuilder / PFC Developers' Group
 
Why not set a global variable in the application open event, then you can reference that each time you need to find your ini file

Good Luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top