devxlogo

Powerbuilder / application directory

Powerbuilder / application directory

Question:
How do I get the application directory for a PB5-16 app?

Answer:
You can use the API call GetCurrentDirectory when your application starts to find out its home directory. The API call should be defined as follows:

Function ulong GetCurrentDirectoryA (ulongtextlen, ref string dirtext) library"KERNEL32.DLL"

Then preallocate a string and call the function:

String ls_Als_A = Space( 255 )GetCurrentDirectoryA( ls_A, 255 )
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist