Results 1 to 9 of 9

Thread: Few EXE module functions missing

  1. #1
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Few EXE module functions missing

    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

  2. #2
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: Few EXE module functions missing

    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

  3. #3
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: Few EXE module functions missing

    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
    Attached Images Attached Images
    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

  4. #4
    thinBasic MVPs
    Join Date
    May 2007
    Location
    UK
    Posts
    1,427
    Rep Power
    159

    Re: Few EXE module functions missing

    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

  5. #5
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: Few EXE module functions missing

    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
    Attached Images Attached Images
    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

  6. #6
    thinBasic MVPs
    Join Date
    May 2007
    Location
    UK
    Posts
    1,427
    Rep Power
    159

    Re: Few EXE module functions missing

    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

  7. #7
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: Few EXE module functions missing

    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

  8. #8
    thinBasic MVPs
    Join Date
    May 2007
    Location
    UK
    Posts
    1,427
    Rep Power
    159

    Re: Few EXE module functions missing

    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

  9. #9
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: Few EXE module functions missing

    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

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •