hook

C++ - Detours WinSock Hooking -> HELP

Hello I need to hook over the Send and Recv Function of Firefox but it doesn't work... I tried some things but nothing worked! (My c++ isn't as well as i wish ;) and so it's more diffcult for me...) ...

Win32 -- how to manage my mouse hook thread

I have successfully gotten my low-level mouse hook code to work, but there are some behaviors I'm observing that I don't quite understand. Everything works fine if I spawn a thread which installs the mouse hook. When i no longer need it running, I let the thread get destroyed automatically as I exit the program, and I imagine I can easil...

Low level mouse hook and DirectX

I'm building an application which needs to filter some mouse clicks system-wide. That is, I need to make the system ignore some mouse button clicks at special occasions. I use low level mouse hook and SetWindowsHookEx to filter out these clicks. It works relatively well, except for WPF applications. I guess that's because these applicat...

Intercepting a WM_PAINT message and acting upon this

I'm trying to intercept/hook the WM_PAINT message of the desktop in C++. I'm currently drawing with the desktop handle, my only problem is that I'm not in sync so it might flicker. What I basically would like is a statement where I can check on the WM_PAINT of UINT message. When this is the case, I want to do something else. I'm going ...

hooked endscene, ID3DXSprite::draw stops working after a few seconds

I have hooked the endscene of a game, and want to draw my desktop as an overlay using a ID3DXSprite. (I don't want to run my game minimized and want to be able to look at my desktop by pressing a key) So it works, but after a few seconds it will just stop showing up. To be precise: it works while the screen of the game is still black an...

Call a function twice with Assembly and C++

Hi, I have a code that changes the function that would be called, to my new function, but I don't want to call only my new function, I also want to call the old one. This is an example, so you can understand what I'm saying: If I disassemble my .exe, I will look at this part: L00123456: mov eax, [L00654321] //doesn't matter ...

Example of using EM_STREAMOUT with c# and RichEditBox

Hello i trying to get a text from a RichEdit field with WM_GETTEXT, but i run into some problems, so I found EM_STREAMOUT, this is especially for RichEdit. I found this code and played a little bit with it, but i can't get them to work: delegate uint EditStreamCallback(IntPtr dwCookie, IntPtr pbBuff, int cb, out int pcb); struct EDI...

Defining "method_called".. How do I make a hook method which gets called every time any function of a class gets called?

I want to make a hook method which gets called everytime any function of a class gets called. I have tried method_added, but it executes only once at the time of class definition, class Base def self.method_added(name) p "#{name.to_s.capitalize} Method's been called!!" end def a p "a called." end def b p "b called...

C# examples for hooking GDI (in particular TEXTOUT).

i'm looking for C# samples code for hooking GDI (in particular TEXTOUT). Probably similar to what thetextcapturex, textgrabsdk libraries are doing These libraries must be hooking something, but what, and how? Is there any way to do this in the .net world? ...

Subversion any pre lock hook causes unlock to fail

I have installed visual SVN server on windows XP.(Authentication method - windows login). I edited the pre-lock.cmd script and put a comment line, "REM do nothing". Next I tried to get a lock on a file. Everything works great uptil this point! . Then I try to release the lock and get the following error "Server sent unexpected return val...

how to add hook in object creation process in .net

Hi all, I want to customize a object's behavior before the object is created. I think maybe add some hooks in the object constructor and do the change there would be a choice. Is there any way to do so in .net? Thanks a lot in advance! EDIT: Here is a example: Assume we have a class Kid which use Perform method to get credit in the ...

SetWindowsHookEx for Mac OS X?

Windows hooks allows you to poke inside other processes and sometimes alter their behaviors. Is there such thing for Mac OS X? Thanks! ...

git post-receive-email hooks.showrev pretty formatting?

I'm trying to do this: git show --format=format:"parents:%p%ncommit:%h%nauthor:%an%n%N%n%s%n%b" -C; echo in my hooks.showrev in my post-receive-email script for git: custom_showrev=$(git config hooks.showrev || git show --format=oneline --abbrev-commit -C %s; echo) using the "standard" post-receive-email script. It just gives me th...

problem hooking NT dll file functions!

Hello all, what is the best tool to track the NT API's. ...

Hook a QT Application with C++ to capture textname of the application

Hi guys, I have a simple QT application running on Win32 platform. I need to write a C++ program described as: the input is the windows handle of that QT application, which is already available, the output is the text name ( AKA caption ) of the application. I hope someone will show me the way to do this right. Thanks a lot. Smile ...

(C/C++/C#) DirectX 9 Overlay, preferably the same way xfire or Steam does it

Hello! I wonder what techniques xfire and/or Steam uses to overlay into games. I'm trying to do something similar and I really would like to know what is the least intrusive way, I.e. won't alert any anti-cheat systems. I don't need any kind of information from the game (no wall-hack BS). I would basically just like to display a rectang...

Getting Mercurial in-process hook to run on Windows

I'm trying to get a Mercurial in-process hook to run on Windows. The problem is not how to write the hook (I want to use an existing one, in this case BugTracker.Net's hook for Mercurial integration - I didn't find a direct link to the file, but you can see it if you download BT.net here, it's in the "mercurial" subfolder). The problem i...

SVN: Differences between whole-repository updates and single-file updates?

We have a commit hook that runs an 'svn update' on a remote working copy every time a commit finishes. Users want to see committed changes immediately reflected in this remote copy. Users are extremely unhappy with the performance of running 'svn update' on the whole working copy, so I was asked to change the hook to use 'svnlook change...

Add Post Hook to Django Admin's Delete Action

I'm trying to add a hook after deleting an object from Django Admin page. From the doc, I found that ModelAdmin has save_model method where I can add a hook for Save action. However, I don't see anything like this for Delete action. What I want to do is that whenever a user saves/deletes an object from say the Article model, I want to a...

Obtain a filename from a file handle?

I have the ntdll.dll's NtCreateFile() function hooked to allow/deny the access of certain files. Unlike kernel32.dll's CreateFile() which easily gives you the full path to the file in question, ntdll.dll's NtCreateFile() function only gives you the handle to the file. I need to obtain the full path of the file from a file handle, to cons...