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
  1. Home
  2. General Programming
  3. Visual Basic
  4. Creating A vc++ hook dll used in VB6

Creating A vc++ hook dll used in VB6

Scheduled Pinned Locked Moved Visual Basic
questionc++helpperformance
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    percyvimal
    wrote on last edited by
    #1

    Sir i want to creat a Vc++ system wide hook dll.{{Whatever hook articles available on the internet are intended for advanced developers who know thing or 2 in vc++.}}But students like me who are new to vc++ find it difficult to grasp some ideas. I want a basic level explanation from some experts who really wants to teach those things to their students. The hooks i am intended to create is Wh_Getmessage and i have to call that dll from vb6 Say my objective of this hook is say if i a user type A then i have to change to B for any application running. I am a stranger to vc++ so i need help in how to create this {{system wide}} wh_getmessge hook 1.In vc++ in new what dll i have to chose ] a.MFC appwizard Dll b.WIn32 Dynamic link library What is the difference between these 2 dlls.? 2.What is an header file and what are the things we have to declare here and why we have to declare?? 3.How functions in vc++ dll should be declared inorder to call those functions from vb.? 4.Say i am calling SetHook funciton from vb which is in dll then hook is set. MsgFilterHook = SetWindowsHookEx( WH_GETMESSAGE,(HOOKPROC)MsgFilterFunc, dll_hInstance, threadID ); I am having the hookhandle in MsgFilterHook which i can use to unhook this hook. Threadid = 0 to create a system wide hook MsgFilterFunc is my callback function My doubt is once hook is set , will the system automatically call my callback filter function for any application which process getmessage Say i have notepad and i am typing A and in my call back function i will get a wm_char = A.NOw if i change to another application say wordpad and type B then will it be possible to get the wm_char=B message in my callback function.Please Explain me how does this work. 5.Say n no of editor applications are running and i want to disable the character T from going to any application and i have to make T into H how to do this in my callbackfunciton.Issue in this question is how am going to get these hook work for any application which is running.?? Issues 1.How to start creating a dll in vc++6 2.Header file decleration ideas. 3.Export functions declerations. 4.Explanations of how these hook work on a systemwide basis(i understood how dll maps the memory of other applications but wanted codings point of view like what are the parameters come to callback function each time a new application is actvated.) 5.What is #pragma and shared data segment ?How variables should be decalred in the hook dll and how it should be accessed??Please

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

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