Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
E

elbow

@elbow
About
Posts
2
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • DLL won't phone home?
    E elbow

    I have a hook dLL that I'd like to send a message back to the calling app. Something like...... keyboard hook detects that F2 is pressed dLL sends message to app app shows dialog main code in dLL as follows /////////////////////////////////////////////////////////// #define WM_APPSTARTED WM_USER + 100 #pragma data_seg(".shared") HWND g_mainWnd = NULL; //the server window handle HHOOK g_hShellHook = NULL; HHOOK g_hKeyboard = NULL; #pragma data_seg() #pragma comment(linker, "section:.shared,rws") SYSDLL_API BOOL _Startup(HWND hwnd) { g_hKeyboard = NULL; g_mainWnd = hwnd; // g_mainWnd is the main window handle g_hKeyboard = SetWindowsHookEx(WH_KEYBOARD, MyProc, g_hInstance, 0); if(g_hKeyboard == NULL) MessageBox(HWND_DESKTOP, "hook fail", "BLAH", MB_OK); if(g_mainWnd != NULL) return FALSE; // already hooked! g_hShellHook = SetWindowsHookEx(WH_SHELL, MyShellProc,g_hInstance, 0); if(g_hShellHook != NULL) { g_mainWnd = hwnd; return TRUE; } return FALSE; } SYSDLL_API LRESULT CALLBACK MyShellProc(int ncode, WPARAM wparam, LPARAM lparam) { if(ncode < 0 ) return CallNextHookEx(g_hShellHook, ncode, wparam, lparam); if(ncode == HSHELL_WINDOWCREATED) { HWND hfoundApp; hfoundApp = FindWindow(NULL, TEXT("my_window" ) ); if(hfoundApp) { PostMessage(hfoundApp, WM_APPSTARTED, lparam, wparam); } } this is where I'd like the dLL to send a message to the callin app but the message never gets to the app thanks for your time :confused:

    C / C++ / MFC

  • Beginner Question Virtual Key Code to ascii
    E elbow

    greetings, i am working on a dll hook project in this function LRESULT CALLBACK MyProc(int nCode, WPARAM wParam, LPARAM lParam) wParam gets the virtual key code whats the best way to convert the virtual key code to ascii? thanks for your time:confused:

    C / C++ / MFC
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups