This example shows how to get the application path for development and deployment environments. This is compatible with PB 12.6.
I recommend to use a NVO to develop this functionality.
1. First declare the Local External Functions:
FUNCTION int GetModuleFileNameW(&
ulong hinstModule, &
REF string lpszPath, &
ulong cchPath) LIBRARY "KERNEL32.DLL"
FUNCTION ulong GetCurrentDirectoryW (&
ulong textlen, &
REF string dirtext) LIBRARY "KERNEL32.DLL"