🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.ms-windows.programmer
1 messages
1 total messages Started by greg.boyko Mon, 30 Aug 1999 00:00
calling functions in DLLs from inside a Hook
#26
Author: greg.boyko
Date: Mon, 30 Aug 1999 00:00
38 lines
2403 bytes
Please email a cc of any reply to greg.boyko@zephyrtech.com.

Quick version of question:

Is it possible to call a function that resides in a DLL from inside a
global system hook?

Expanded description:

I have a global windows hook (intalled using SetWindowsHookEx) of type
WH_CALLWNDPROC. In the hook I check for the activation of a certain
window. When that window is activated, I want to call a function that
resides in a DLL. The function that I'm calling is a debugged module
written for a previous application, and is known to work well. When I
call it from inside the hook, however, the system crashes badly.

Right now I'd settle for being able to call something as simple as
MessageBox() from inside the hook. I cannot even do that right now. The
system crashes.

I've tried linking against the DLL's lib file at hook link time as well
as loading the DLL and the function dynamically at runtime. When I try
to load the DLL at runtime, I crash upon trying to load it. The DLL's
entry point does not execute.

I would be absolutely delighted if someone could tell me they have
successfully called MessageBox() from inside a hook function! There
must
be some little trick that I'm missing or some pit I don't know to
sidestep.

My development environment:

I'm using Borland C++ Builder 3.0 under windows 98.


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads