Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a way to tell if its a VFP EXE?
Message
From
14/01/1999 12:40:19
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00175871
Message ID:
00176058
Views:
28
FWIW, I wrote a procedure that I call with the file to check ...

lparameter lcFile2Check
Local lnFileHandle, lnSize, lcString, llOk
lnFileHandle = FOPEN(lcFile2Check)
lnSize = FSEEK(lnFileHandle, 0, 2)
IF lnSize > 0
= FSEEK(lnFileHandle , 0, 0) && Move pointer to BOF
lcString = FREAD(lnFileHandle , lnSize && Read Into Memory
IF 'FOXPRO' $ UPPER(lcString) && Look for FOXPRO
llOk = .T.
ENDIF
ENDIF
= FCLOSE(lnFileHandle) && Close File
RETURN llOk

-Isaac


>George,
>
>Thanks I was too lazy to fire up 6 and build an exe, hopefully his code will scan for the string which may move with any particular release of VFP.
>
>>In VFP 6.0 it's 5144 (1418h), or at least that's what I've found.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform