Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: EXE module request: exported procedures list

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

    EXE module request: exported procedures list

    Roberto,

    a nice addition to EXE module can be a function returning a TAB (or whatever) separated string listing all exported procedures giving an exe or dll file name. Something like:
    [code=thinbasic]
    FUNCTION EXE_ListExportedProcedcures(ExeOrDllName [, StringSeparator]) AS STRING
    [/code]

    Here some code can help to start:
    http://www.powerbasic.com/support/fo...ML/001212.html
    http://www.powerbasic.com/support/fo...ML/000821.html

    Do you like?
    Ciao
    Eros
    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

  2. #2
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: EXE module request: exported procedures list

    Oh my gosh so much to play with in the new release. TOo bad no time at the moment, but wow this will very great tool!! Thanks so much!
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

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

    Re: EXE module request: exported procedures list

    Hey Ken, not yet developed but just asked.
    But I'm pretty sure Roberto will add it. I think there are differences between OS versions but we will see.
    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

  4. #4
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: EXE module request: exported procedures list

    Thanks Eros.
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  5. #5

    Re: EXE module request: exported procedures list

    Added EXE_PE_GetExportList() and EXE_PE_GetImportList() functioons.
    Here is an example of use:

    [code=thinbasic] USES "UI"
    USES "EXE"
    USES "File"

    DIM sFile as string
    DIM sSeparator AS STRING
    DIM sFilter AS STRING
    DIM sImport as string
    DIM sExport as string

    sSeparator = ", "
    sFilter = "Executables files (*.exe, *.dll)|*.exe;*.dll|"
    sFilter += "All Files (*.*)|*.*"

    sFile = Dialog_OpenFile(0, "Please select an executable file", DIR_GetCurrent, sFilter, "exe", %OFN_FILEMUSTEXIST OR %OFN_HIDEREADONLY or %OFN_ENABLESIZING)

    if len(sFile) > 0 then
    sImport = EXE_PE_GetImportList(sFile, sSeparator)
    sExport = EXE_PE_GetExportList(sFile, sSeparator)
    Msgbox 0, "FILE: " + sFile + $CRLF + "IMPORTED FUNCTIONS:" + $CRLF + sImport + $CRLF + "EXPORTED FUNCTIONS:" + $CRLF + sExport
    end if
    [/code]

    Regards,
    Roberto
    http://www.thinbasic.com

  6. #6

    Re: EXE module request: exported procedures list

    Mmmh, do I read this correctly? I will be able to get the module functions including their parameters?

  7. #7

    Re: EXE module request: exported procedures list

    Here are a screenshots of output of above script runned on my Windows 98 PC.

    Ciao,
    Roberto
    Attached Images Attached Images
    http://www.thinbasic.com

  8. #8

    Re: EXE module request: exported procedures list

    Sorry, only the name of functions imported or exported by the PE executable.

    Roberto
    http://www.thinbasic.com

  9. #9

    Re: EXE module request: exported procedures list

    Thanks. I thought that it would be that way, but somehow I also thought that you guys foudn a way for thinbasic modules.

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

    Re: EXE module request: exported procedures list

    Quote Originally Posted by MikeHart
    Mmmh, do I read this correctly? I will be able to get the module functions including their parameters?
    That remain a dream :'(
    As you know, there is no way to detect function parameters in exported fucntions from DLLs.
    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

Page 1 of 2 12 LastLast

Similar Threads

  1. ADO module function list help
    By Reinking in forum thinBasic General
    Replies: 3
    Last Post: 17-11-2005, 11:11

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
  •