hook

How do I implement an SVN hook to know the filename of the file committed, etc.?

I am using Windows XP and TortoiseSVN, and I would like to know the filename, the path of the file, author, and other details about the revision committed to the repository by using a post-commit hook. Do we have to use a certain language to do this such as Python or is this possible to write even by using a batch file only? ...

Java/SWT: How to receive mouse events from an embedded window

I am embedding a windows application into my SWT application using 'reparenting'. That part works ok. I would now like to hook my SWT app into the message queue for the embedded app to receive mouse move events. I see that the OS class in SWT has a number of interesting methods for adding hooks but I have not been able to figure out how...

Drupal hook_search function location

I can't for the life of me figure out where the hook_search function in drupal is located. Is it something I need to add to a file to access? ...

Window Hooking Questions

Is am using this: SetWindowsHookEx(WH_CALLWNDPROC, ...); I can see the messages I want to process, but I want to prevent those message from reaching the target window. So I tried this: SetWindowsHookEx(WH_GETMESSAGE, ...); When I do this I can modify the message, and prevent the target window from processing it, but this hook doesn...

An impasse with hooking calls to HeapAlloc for a memory tracking application.

I am writing a memory tracking application that hooks all the calls to HeapAlloc using IAT patching mechanism. The idea is to capture all the calls to HeapAlloc and get a callstack. However I am currently facing a problem with getting the callstack using DBGHELP Apis. I found that the dbghelp dll itself is linking to MSVCRT dll and thi...

What are all the differences between WH_MOUSE and WH_MOUSE_LL hooks?

I've found that WH_MOUSE is not always called. Could the problem be that I'm using WH_MOUSE and not WH_MOUSE_LL? The code: class MouseHook { public: static signal<void(UINT, const MOUSEHOOKSTRUCT&)> clickEvent; static bool install() { if (isInstalled()) return true; hook = ::SetWindowsHookEx(WH_MOUSE, (HOOKPROC)&mousePr...

How can I hook Windows functions in C/C++?

If I have a function foo() that windows has implemented in kernel32.dll and it always returns true, can I have my program: "bar.exe" hook/detour that Windows function and make it return false for all processes instead? So if my svchost, for example, calls foo(), it will return false instead of true. The same action should be expected fo...

Problem with Filtering Windows Messages in a Hook Filter Function

I am trying to retrieve messages for another application with a Windows hook. I have setup a WH_GETMESSAGE hook with SetWindowsHookEx. This is done via a DLL. In my GetMsgProc fuction (that should be called whenever the target application recieves a message) I want to take action based on the type of message. However I am having trou...

Share common / useful SVN pre-commit hooks

What are some common and/or useful pre-commit hooks for SVN? ...

Hook onto the adding of new DOM elements with jQuery (or plain JS)

To be clear: I am not asking how to put existing hooks onto new DOM elements. I know about the live() function and the old livequery plugin. I am asking something else. What I want to know is how to hook onto the very creation of new DOM elements. The reason I'm asking is I'm creating a third-party user JS script that doesn't have co...

Application hooking :: x64 system

Is there some kind of secret to hooking both 64bit & 32bit process on a 64bit system? In an application that I'm currently writing I need to be able to hook 64bit processes. Hooking 32bit processes works just fine on 64 & 32bit systems but, no messages are received when trying to hook 64bit applications. Before anyone tells me that I ...

How to mark a global as deprecated in Python?

I've seen decorators that let you mark a function a deprecated so that a warning is given whenever that function is used. I'd like to do the same thing but for a global variable, but I can't think of a way to detect global variable accesses. I know about the globals() function, and I could check its contents, but that would just tell me ...

Hooking within my application

What should I do to implement a hook-like system? This is my setup: I have these static libraries: A.lib B.lib A and B are like modules that can be included together within a same application. The thing is I have a function in A that I want to expose to B. I was doing this with a callback list... but I'm not comfortable with this id...

Writing a pre-commit hook using SharpSvn. Does it lack svnlook propget?

Hello all I am rewriting an older subversion precommit hook. In our company, we need to make sure that binary files are allowed on commit only if they have the property svn:needs-lock set before commit. I started writing the hook and it looks like every part of the hook works, but I cannot find how to read, if the property is set. I w...

program ir receiver

Hi Hi, I am thinking to buy an IR receiver for my HTPC. I wonder if I can make a software for my IR Receiver myself. How does ir receiver work on windows ? I mean, if I install IR receiver driver and press a key on my remote controller, what happen? can I get pressed button in c# using hook? if I can catch pressed button, it would be...

SetWindowsHookEx with WH_MOUSE not capturing mouse moves over HTCAPTION area

I try to use SetWindowsHookEx with WH_MOUSE to capture mouse move events. It work everywhere but over HTCAPTION areas (at least in my code sample ). I can't find any reference to this behavior and I tried to windbg into another application that do the same to monitor mouse moves. The method used is WH_MOUSE as well, and the events are ge...

Weird behavior caused by using .Net ComboBox properties SelectionStart & SelectionLength in "DropDownList" mode

We have a sample application with such handler for a combobox in "DropDownList" mode: private void comboBox1_Leave(object sender, EventArgs e) { comboBox1.SelectionStart = 0; comboBox1.SelectionLength = 0; } the code above behaves differently depending whether the application has CALLWNDPROC hook loaded or not. If application h...

Overlay Window not drawing correctly when hooking

The requirement is to draw my information in side of another application's window. To take care of z order and so forth hooking WH_GETMESSAGE and draw on WM_PAINT seem good. However some WM_PAINT are intended for the window area of my concern, but other WM_PAINT are for something completely different, like a context menu or button. Exa...

trapping http/https requests in windows

Is it possible to trap http/https requests for filtering in windows? ...

My C Program provides a callback function for a hook. How can I keep it alive, un-kludgily?

Currently, I'm spawning a message box with a OS-library function (Windows.h), which magically keeps my program alive and responding to calls to the callback function. What alternative approach could be used to silently let the program run forever? Trapping 'Ctrl-c' or SIGINT and subsequently calling RemoveHook() for a clean exit would ...