More WinAPI problems

2012-07-20 Thread DLimited
Hello everyone, I encountered a few more problems while creating my system-wide makro program. 1) I can't load my dll with LoadLibraryW, only LoadLibraryA. Why? 2) The LoadLibraryA function fails with Error Code 127 - I still get a Handle and can register my function as a

WinAPI LowLevel Keyboard Hooks

2012-07-19 Thread DLimited
Hello everyone, I had this great idea of writing a Program that intercepts all keyboard presses and modifies them in certain cases. I want to use it as some kind of global makro program to run in the background and for example allow me to easily post unicode smileys. This is where the probelms

Re: WinAPI LowLevel Keyboard Hooks

2012-07-19 Thread DLimited
But what are the differences of loading the Unicode version vs. the ANSI version? I called the Unicode one because I figured that would be the sensible choice, since Unicode is the default for D (if I remember correctly). I have no clue what the actual effects of calling the wrong version

Re: WinAPI LowLevel Keyboard Hooks

2012-07-19 Thread DLimited
I guess you have to 'export' the function: extern (Windows) export LRESULT LowLevelKeyboardProc(int code, WPARAM wParam, LPARAM lParam) and include EXPORTS LowLevelKeyboardProc in the .DEF file Thanks, I changed that. Also, I changed LoadLibraryW( ) to LoadLibraryA( ) in the main program

Re: WinAPI LowLevel Keyboard Hooks

2012-07-19 Thread DLimited
On Thursday, 19 July 2012 at 16:38:19 UTC, DLimited wrote: I guess you have to 'export' the function: extern (Windows) export LRESULT LowLevelKeyboardProc(int code, WPARAM wParam, LPARAM lParam) and include EXPORTS LowLevelKeyboardProc in the .DEF file Thanks, I changed that. Also, I

Re: WinAPI LowLevel Keyboard Hooks

2012-07-19 Thread DLimited
On Thursday, 19 July 2012 at 17:35:29 UTC, dnewbie wrote: You don't see the WHOA message? Try this alias HANDLE HHOOK; No, I don't get any message after key-presses. I changed int function() to HANDLE, sadly it still doesn't work.

Re: WinAPI LowLevel Keyboard Hooks

2012-07-19 Thread DLimited
On Thursday, 19 July 2012 at 18:40:15 UTC, dnewbie wrote: On Thursday, 19 July 2012 at 17:48:06 UTC, DLimited wrote: On Thursday, 19 July 2012 at 17:35:29 UTC, dnewbie wrote: You don't see the WHOA message? Try this alias HANDLE HHOOK; No, I don't get any message after key-presses. I changed

Re: WinAPI LowLevel Keyboard Hooks

2012-07-19 Thread DLimited
On Thursday, 19 July 2012 at 19:43:45 UTC, dnewbie wrote: On Thursday, 19 July 2012 at 18:56:15 UTC, DLimited wrote: On Thursday, 19 July 2012 at 18:40:15 UTC, dnewbie wrote: On Thursday, 19 July 2012 at 17:48:06 UTC, DLimited wrote: On Thursday, 19 July 2012 at 17:35:29 UTC, dnewbie wrote

Re: WinAPI LowLevel Keyboard Hooks

2012-07-19 Thread DLimited
On Thursday, 19 July 2012 at 20:06:55 UTC, dnewbie wrote: On Thursday, 19 July 2012 at 19:51:31 UTC, DLimited wrote: Yes, I did. Are the newlines important? And you really get a MessageBox per keystroke? I start as admin, disabled my AV but still, no success. Yes, I get 2 WHOA messages. One