- This topic has 22 replies, 4 voices, and was last updated 11 years ago by BattleStar-Galactica.
-
AuthorPosts
-
November 23, 2006 at 8:49 am #191323nooobMember
hi all
does anyone have the time and skills to show a simple example of external hooking or subclassing in c#?
plz help if you do
😕nooob
November 26, 2006 at 6:49 am #191345BattleStar-GalacticaMemberthat’s a subject no fucking moron on here can help you 😆 sure except me
but first I will ask you do you know c++ cuz you need that to create your dll or just look around google search for dll has been created for a generic hook like keyboard or mouse or cbtproc etc.
an advice you have to go to c sharp forum ask for help and read tutorial on that. that’s an advanced subject and you have to read some tuto before coding a test app.
It’s take too a lot time to explain you from a to z so I cannot help you
🙄 and that subject has been discussed on google search 8)
November 27, 2006 at 7:48 am #191344nooobMemberlol..ok dude…ty for your reply
i m getting a book about this hooking and subclassing thing…so hopefully i will get it….
but is it not possible to write that dll in c# instead of c++?
i will be able to write in c++ after some reading…tho*
ty nano…always appreciate your help
nooob
November 27, 2006 at 8:19 am #191343BattleStar-GalacticaMemberI dont know and I never try to understand if it can be done in c#
I always create my dll in c++ and use MFC to do the hooking.
btw I love c# and I hate vb6 or vbnet 😈
November 27, 2006 at 1:02 pm #191342nooobMember🙂 man vbnet is ok….it goes
but vb6 <<<– i hate it 2.. 😯ty man
probably i will get the book today….then i will see what i can do
BIG EDIT: I LOVE VB6 ….lol……no seriously i do 😉
December 10, 2006 at 8:30 pm #191341DodyMemberas long as you can create you .dll call back function, then it doesn’t matter if you use c++ or c# to hook it inside the target process
I have done something similar with Messenger (WLM) to hook its create window function and install my own menu there, and filters the WM_COMMAND messages and fire up my events once it has been applied from the menuit is kinda fun, I encourge you to do some test
good luck
December 11, 2006 at 9:36 am #191340nooobMemberthx Dody….that was something i was desperate to find out but got no direct answer…then i got the book “Subclassing and hooking with visual basic”…so i got the concepts of hooking and subclassing..but the book doesnt talk about external hooking (which i wanted). but luckily i found a good example of external hooking (the dll is in c++ and the and this dll is used from within visual basic 6)….but i have another laptop (the old had a problem) and i havent got vb6 on this pc…lol….damn many problems
i tried that dll from vc# 2005…but doesnt work…the hook doesnt get set…
i started a new thread to see if someone can help me with getting a free copy of vb6
thx again dody for your time
nooob
December 11, 2006 at 11:17 am #191339DodyMemberyou seem to be confused, so let me break it up to you…
first of all you create your .dll hook and make sure your call back function it exportable
then import tha .dll into your project and import the callback function using GetProcAddress into the hook process, then use SetWindowsHookEx to hook the .dll into the target process
I hope that will make it clear for you, otherwise ask again, because I have a little time these days (just passed my MySQL course)
good luck
December 11, 2006 at 4:43 pm #191338BattleStar-GalacticaMemberso you know what is SetWindowHookEx and SetWindowLong, now we can discuss about hooking 😉
December 11, 2006 at 6:05 pm #191337nooobMemberlol..nano..i guess now i do 😛
dody ty man…i got it…based on that example i got from a site…but i can develope on it—-hopefully
nano..its just because…i havent programmed in c/c++….so all these “bad notations” like _tmain…(something*)..etc lol….they scare me
but seems like…i am getting something
nooob
December 11, 2006 at 6:21 pm #191336BattleStar-GalacticaMemberwhere are you stuck and what do you want to do, give us some point we can help you if you understand hooking and subclassing
what kind of hooking do you want to do
December 11, 2006 at 9:06 pm #191335DodyMemberSetWindowHookEx is just the start of the hooking… the advance hooking is done by detours… check it out 😉
and yes I know what SetWindowHookEx, c++ is my study and my job 🙂good luck nooob, I am glad you got it…
December 11, 2006 at 10:04 pm #191334BattleStar-GalacticaMember@nanomachine007 wrote:
so you know what is SetWindowHookEx and SetWindowLong, now we can discuss about hooking 😉
that was for noob not for you dody, yep setwindowhookex is just a starting point of hook and if it combined with setwindowlong is became very interesting.
December 12, 2006 at 12:57 am #191333DodyMember@nanomachine007 wrote:
@nanomachine007 wrote:
so you know what is SetWindowHookEx and SetWindowLong, now we can discuss about hooking 😉
that was for noob not for you dody, yep setwindowhookex is just a starting point of hook and if it combined with setwindowlong is became very interesting.
I apologize for my misunderstanding, and I am sorry if my post was offensive, I didn’t mean to hurt anyone I was trying to clear up… I apologize once again nanomachine…
best wishes to both of you guys
December 12, 2006 at 8:39 am #191332nooobMemberlol…nooob is creating problems…. 😆
thx guys…..dody and nano…
i was trying to get WH_GETMESSAGE hook implemented…to hook the notepad.
now that i have a complete example….hopefullly i can elaborate on it…also i have a book that has an example on the 15 (or 16) types of hooks..and also example of subclassing…
i apprecitae your help …nano and oddy …thank you
how can you find out if a message is “sent” or “posted”….?
-
AuthorPosts
Related
- You must be logged in to reply to this topic.