Announcement

Collapse

Maintenance

The forum could be offline for 30-60 minutes in the very near future for maintenance (said 3pm Pacific). I was behind on getting this notice. I do apologize.
See more
See less

LoadLibraryEx for EXE

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • LoadLibraryEx for EXE

    Hi, folks --
    LoadLibraryEx "maps a specified executable module into the address space of the calling process. The executable module can be a .DLL or an .EXE file".
    With DLL all is clear (GetProcAddr, Call Dword ...)
    Does anybody knows, is it possible to start EXE by such way ?
    If yes, how ?

  • #2
    As I understand it, it is possible to run EXPORTed functions from a 32-bit EXE in that way, just as you would run them from a DLL file, but it is not a method of running an EXE, per se.

    (Hmmm... I wonder what would happen if you started a thread and executed an EXE's WinMain function in that way...?)

    -- Eric

    ------------------
    Perfect Sync: Perfect Sync Development Tools
    Email: mailto:[email protected][email protected]</A>



    [This message has been edited by Eric Pearson (edited March 11, 2000).]
    "Not my circus, not my monkeys."

    Comment


    • #3
      Eric --
      I want to "talk" with another Exe (for example, Word) through messages.
      Sometimes, it's necessary to send addresses of structures or to add additional subclass procedure.
      With two processes this way is impossible.
      Yes, I think to start another Exe in thread.

      I tried "something", hinstance returns normal (points to MZ - beginning of any Exe), but what to do further ?
      Which address I should call ?

      GetProcAddress ..., "WinMain" returns 0.

      [This message has been edited by Semen Matusovski (edited March 11, 2000).]

      Comment


      • #4
        Eric --
        I want to "talk" with another Exe (for example, Word) through messages. Sometimes, it's necessary to send addresses of structures or to add additional subclass procedure.
        With two processes this way is impossible....
        Not impossible at at all to share data among processes, if you control both programs (Which rules out "Word" if you mean Microsoft Word(r)). See my article "Data Sharing in Win/32" in the October 1999 issue of "BASICally Speaking."

        BTW... the code for that article is public domain and available for download at the IMS web site (http://www.infoms.com). (Or for posting here, for that matter).

        ------------------
        Michael Mattias
        Racine WI USA
        [email protected]

        [This message has been edited by Michael Mattias (edited March 11, 2000).]
        Michael Mattias
        Tal Systems Inc. (retired)
        Racine WI USA
        [email protected]
        http://www.talsystems.com

        Comment


        • #5
          Michael --
          Thanks for information.
          If apps are controlled from both sides, situation is easy (and it possible to use, for example, MMF, like you mentioned).
          If to speak about MS Word, theoretically it possible to use macroes.
          But what to do, for example, with Notepad or WordPad ?
          I am interesting to control any (not my) app.


          ------------------

          Comment


          • #6
            Unfortunatelly, I found in MSDN exact words "Do not use LoadLibrary to "run" a .EXE file."
            There is no such remark in Win32.Hlp.
            Means, I am not first, who wanted to use LoadLibrary by such way.

            ------------------


            [This message has been edited by Semen Matusovski (edited March 11, 2000).]

            Comment

            Working...
            X