Strange Petr.
Do you have a script example not working?
Hi,
I think latest thinBASIC preview has some odd version of EXE module, following functions are not recognized by parser:
EXE_PE_Is32
EXE_PE_Is64
EXE_PE_IsManaged
It is strange, as EXE_PE_IsUPX works without problem I think.
Bye,
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Strange Petr.
Do you have a script example not working?
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Hi,
here is sample:
[code=thinBASIC]
uses "EXE"
dim s as string
s = EXE_Gettypename(EXE_Gettype("Riddick.exe"))+$CRLF+STR$(EXE_PE_Is64("Riddick.exe"))
msgbox 0, s
[/code]
Might be a parsing problem ? I tried simplier statement and it worked.
Or maybe I miss something obvious, not sure
Thanks,
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Petr your example is wrong.
EXE_Gettypename should be passed a filename not a value, you are passing the returned value from EXE_Gettype().
Also if riddick.exe is not in the same directory as your script it wont see it (i think).
I think there could be a problem with EXE_Gettypename see my example you will see that it is blank.
[code=thinbasic]uses "EXE"
dim s as string
s = APP_PATH +"THINBASIC.EXE" + $CRLF(2)
s += "File Type Name " + $TAB + "= " + EXE_Gettypename(APP_PATH + "thinbasic.exe") +$CRLF
s += "File Type " + $TAB(2) + "= " + EXE_Gettype(APP_PATH + "thinbasic.exe") +$CRLF
s += "Is File 32 " + $tab(2) + "= " + IIF$ (EXE_PE_Is32(APP_PATH + "THINBASIC.exe") = %TRUE, "Yes","No") + $CRLF
s += "Is File 64 " + $tab(2) + "= " + IIF$ (EXE_PE_Is64(APP_PATH + "THINBASIC.exe") = %TRUE, "Yes","No") + $CRLF
msgbox 0, s[/code]
Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370
Thanks Abraxas,
check this out:
[code=thinbasic]
uses "EXE"
dim s as string
s = APP_PATH +"THINBASIC.EXE" + $CRLF(2)
s += "File Type Name " + $TAB + "= " + EXE_Gettypename(EXE_Gettype(APP_PATH + "thinbasic.exe")) +$CRLF
s += "File Type " + $TAB(2) + "= " + EXE_Gettype(APP_PATH + "thinbasic.exe") +$CRLF
s += "Is File 32 " + $tab(2) + "= " + IIF$ (EXE_PE_Is32(APP_PATH + "THINBASIC.exe") = 0, "Yes","No") + $CRLF
s += "Is File 64 " + $tab(2) + "= " + IIF$ (EXE_PE_Is64(APP_PATH + "THINBASIC.exe") = 0, "Yes","No") + $CRLF
msgbox 0, s
[/code]
Now it works! So I think I had it correct ???
But I would also prefer the way it is in documentation as EXE_Gettypename(EXE_Gettype(... is a bit clumsy
Thanks,
Petr
P.S. I had Riddick.exe in the same directory, but I must admit APP_SOURCEPATH+"Riddick.exe" would be cleaner :-[
P.P.S. I completely forgot that equate + (n) repetition trick, thanks for reminding me of it
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
I see the problem now!
The documentation is wrong, you need to pass the filetype number not the filename.
Over to you Eros.
Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370
Even weirder,
now the problematic script runs ?!
I need to check if I do have some duplicate thinBASIC installation ...
Thanks,
Petr
EDIT> I had a thinBASIC.exe+thinCore.dll+... in Windows/System32. Do not know why, maybe thinBundle without path specified loong time ago ? ( data 2.11.2007 )
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
change these :-[ they work now
[code=thinbasic]
s += "Is File 32 " + $tab(2) + "= " + IIF$ (EXE_PE_Is32(APP_PATH + "THINBASIC.exe") = %TRUE, "Yes","No") + $CRLF
s += "Is File 64 " + $tab(2) + "= " + IIF$ (EXE_PE_Is64(APP_PATH + "THINBASIC.exe") = %TRUE, "Yes","No") + $CRLF
[/code]
Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370
I did not noticed there was a problem ,
Thanks!
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Bookmarks