BCX Console Demonstration Program S72.bas

 PRINT ExeName$()
 
 FUNCTION ExeName$
   LOCAL hModule AS HMODULE
   LOCAL Buffer$
   hModule = GetModuleHandle(NULL)
   GetModuleFileName(hModule, Buffer$, 256)
   FUNCTION = Buffer$
 END FUNCTION