Click here to Skip to main content
16,005,491 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Export functions in an exe Pin
Rickard Andersson2010-Oct-02 23:51
Rickard Andersson2010-Oct-02 23:51 
GeneralRe: Export functions in an exe Pin
Stephane Rodriguez.11-Oct-02 0:16
Stephane Rodriguez.11-Oct-02 0:16 
GeneralRe: Export functions in an exe Pin
Simon Steele11-Oct-02 0:50
Simon Steele11-Oct-02 0:50 
GeneralRe: Export functions in an exe Pin
Simon Steele11-Oct-02 1:17
Simon Steele11-Oct-02 1:17 
GeneralRe: Export functions in an exe Pin
Rickard Andersson2011-Oct-02 1:52
Rickard Andersson2011-Oct-02 1:52 
GeneralRe: Export functions in an exe Pin
DarrollWalsh11-Oct-02 1:59
DarrollWalsh11-Oct-02 1:59 
GeneralRe: Export functions in an exe Pin
Paul M Watt11-Oct-02 6:01
mentorPaul M Watt11-Oct-02 6:01 
GeneralRe: Export functions in an exe Pin
Stephane Rodriguez.11-Oct-02 6:30
Stephane Rodriguez.11-Oct-02 6:30 
Paul Watt (kilowatt) wrote:
So you will be able to load and EXE and map function addresses in that EXE at runtime just like it was a DLL.

Faking the OS by using an EXE as if it was a DLL leads you to unexpected problems. Allright, the vtable is exported and reflected by quickview or other PE viewers. Allright, you may even call a method on it. And if you are lucky, this will even work.
Indeed, The process boundary and load context enabled by a standard exe launch is totally different than with a DLL (loaded in the same address space). In other words, the DLL has no context at all.
You'll meet soon a guy called time chkesp.c complaining about such a use.
In addition, the executable must be designed to be able to respond to your calls. Don't forget that once a process is launched, it is doing something, and is not necessarily able to respond outside calls. That's one of the benefits of using COM instead.
The process life cycle raises a bunch of other troubles, but I let you discover them.

Good luck!




She's so dirty, she threw a boomerang and it wouldn't even come back.
GeneralRe: Export functions in an exe Pin
Gary R. Wheeler11-Oct-02 16:34
Gary R. Wheeler11-Oct-02 16:34 
QuestionHow to capture a frame from avi correctly? Pin
csqlhy10-Oct-02 20:25
csqlhy10-Oct-02 20:25 
GeneralDialog Box focus Pin
ShahShehpuri10-Oct-02 19:59
sussShahShehpuri10-Oct-02 19:59 
GeneralRe: Dialog Box focus Pin
alex.barylski10-Oct-02 20:09
alex.barylski10-Oct-02 20:09 
GeneralRe: Dialog Box focus Pin
ShahShehpori10-Oct-02 20:38
sussShahShehpori10-Oct-02 20:38 
GeneralHandle vs Pointer Pin
stevenson10-Oct-02 17:24
stevenson10-Oct-02 17:24 
GeneralRe: Handle vs Pointer Pin
Chris Losinger10-Oct-02 17:49
professionalChris Losinger10-Oct-02 17:49 
GeneralRe: Handle vs Pointer Pin
stevenson10-Oct-02 18:18
stevenson10-Oct-02 18:18 
GeneralRe: Handle vs Pointer Pin
stevenson10-Oct-02 18:24
stevenson10-Oct-02 18:24 
GeneralRe: Handle vs Pointer Pin
Nish Nishant10-Oct-02 20:00
sitebuilderNish Nishant10-Oct-02 20:00 
GeneralRe: Handle vs Pointer Pin
Michael Dunn10-Oct-02 20:04
sitebuilderMichael Dunn10-Oct-02 20:04 
GeneralRe: Handle vs Pointer Pin
stevenson10-Oct-02 20:43
stevenson10-Oct-02 20:43 
GeneralChanging the font of a CStatic Pin
monrobot1310-Oct-02 17:22
monrobot1310-Oct-02 17:22 
GeneralRe: Changing the font of a CStatic Pin
Nish Nishant10-Oct-02 18:07
sitebuilderNish Nishant10-Oct-02 18:07 
GeneralRe: Changing the font of a CStatic Pin
monrobot1310-Oct-02 19:40
monrobot1310-Oct-02 19:40 
Questionhow to delete the margins when print with mfc Pin
Anonymous10-Oct-02 16:58
Anonymous10-Oct-02 16:58 
AnswerRe: how to delete the margins when print with mfc Pin
Gary R. Wheeler11-Oct-02 16:39
Gary R. Wheeler11-Oct-02 16:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.