Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Last try... VFP EXE ?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00565960
Message ID:
00566005
Views:
14
This message has been marked as the solution to the initial question of the thread.
>HI, last try...
>
>how do I know if an .EXE file is a VFP exe before call it ?
>
>I got answers that pointed to use AGETFILEVERSION() function and to use the DEBUG command...
>any other?
>
>thanks
>fabian

Fabian,
Here is another way:
lnh = fopen('MyExe.exe')
if lnh > 0 then
   lcdata = fread(lnh,20000)
   if at(strconv(strconv('Microsoft Visual FoxPro',1),5),lcdata) > 0 then
      * VFP application
   else
      * it is not a VFP EXE
   endif
   =fclose(lnh)
endif
I tested this using very small EXEs (9K and 17K) and one "normal" VFP EXE (9.2 MB). The 20000 bytes worked for both. The VFP information is stored near the beginning of the EXE.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform