Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot get name of executable while running
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00646347
Message ID:
00646459
Views:
15
It would work if application is run as standalone EXE. If yiou're running your application from within VFP than you've to dig thru program stack. Something like
lnlevel = 2
lcExeName = ""
DO WHILE NOT EMPTY(SYS(16,lnlevel))
  IF RIGHT( UPPER( SYS(16,lnlevel)), 4) = ".EXE"
    lcExeName = SYS(16,lnlevel) 
  ENDIF
  lnlevel = lnlevel + 1
ENDDO
>Both of those commands show "vfp.exe". I guess I did not say it right, I need the application executable name, like: payroll.exe or genSrvcs.exe.
>
>>>Is there any way to capture the name of the executable while the app is running. I want to use a variable for that name to use in the newobject function oObj=newobject(class,parentclass,sExe), where sExe=executablename.
>>>
>>>Thanks
>>
>>
lcExeName = SYS(16,1)
>>* or
>>lcExeName = _vfp.ServerName
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform