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
    54
    Posts
    8,636
    Blog Entries
    2
    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/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

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

    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
    54
    Posts
    8,636
    Blog Entries
    2
    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/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

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

    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
    thinBasic MVPs
    Join Date
    Sep 2006
    Posts
    3,289
    Blog Entries
    2
    Rep Power
    344

    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 Thumbnails Attached Thumbnails Click image for larger version. 

Name:	ThinBasic.JPG 
Views:	248 
Size:	141.7 KB 
ID:	4165   Click image for larger version. 

Name:	ThinCore.JPG 
Views:	249 
Size:	74.9 KB 
ID:	4166  
    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
    thinBasic MVPs
    Join Date
    Sep 2006
    Posts
    3,289
    Blog Entries
    2
    Rep Power
    344

    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
    54
    Posts
    8,636
    Blog Entries
    2
    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/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

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

Posting Permissions

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