Thread View: borland.public.delphi.language.objectpascal
1 messages
1 total messages
Started by Leslie
Tue, 29 Jun 2004 00:49
Problem: Passing data between EXE and DLL thru an exported function
Author: Leslie
Date: Tue, 29 Jun 2004 00:49
Date: Tue, 29 Jun 2004 00:49
27 lines
1930 bytes
1930 bytes
Dear Everyone, this is misterious for me, so please help if you can. I'm programming a global keyboard hook in Delphi 7. Hook/unhook procedures and KeyboardProc are in a DLL, it traps every keystroke nicely. My main EXE must provide information to the DLL on what key combinations the DLL needs to catch. So, from the EXE, I pass a dynamic array to the DLL thru an exported procedure. (In KeyboardProc, the DLL loops thru this array to decide which keys to trap and what to do with them.) This works PERFECTLY, as long as my application is active. As soon as I activate another window, or minimize my EXE, the DLL still catches every keystrokes, BUT the passed array is EMPTY, its length is 0! This renders my hook useless. When my EXE is re-activated, everything works perfectly again. What is happening "backstage" with my passed datas, when other windows have the focus? I did not use file mapping. When (for testing) I fill a "local" array with data within the DLL, instead of passing one from the EXE, it works even after my app loses focus. Any help would be very much appreciated! Vic
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