hook

How to add a system "windows hook" so as to be notified of windows being created/activated?

Tried a bunch of things but I can't get it to work consistently amid my taskbar being nuked and other supernatural effects on my desktop UI. Tried using a open-library http://mwinapi.sourceforge.net/ first. Although it worked nicely as an OO layer for enumerating windows and stuff. It couldn't do hooks properly Next stop was Dino E.'s...

Suppress keystrokes to dialog

I have added a keyboard hook for a dialog that I don't control (it runs its own DialogProc Function in a library with closed source). I'm able to capture the key strokes, but the key stroke is always sent the dialog. This causes error beeps as well as some weird behavior. Installing the hook: hKeyHook=SetWindowsHookEx(WH_KEYBOARD, KeyH...

SetWindowsHookEx - Dll Injection misses out on the first few calls

Hi, I am trying to use SetWindowsHookEx to capture calls to a API in java.dll. So I created another dll, and injected into all other processes using setwindowsHookEx g_hHook = SetWindowsHookEx(WH_CALLWNDPROC, JLoadSetFunc, g_hHookDll, 0) The problem is following: While trying to capture calls from a process, I notice that my dll ge...

Possible to disable a hook made with SetWindowsHookEx run-time?

Hello. If an application (mine, or in an external process, for example) called SetWindowsHookEx, would it be possible for me to unhook the hook? Remember that it wasn't me who made the hook first place, so I don't have any kind of variables or pointers to the original hooks. ...

Why isn't WH_MOUSE hook global anymore?

I have this global mouse hook setup in a DLL that watches for mouse gestures. Everything works perfectly but with a hook set for WH_MOUSE_LL which is a low-level hook and one that doesn't need to be in an external injectable DLL. Once I switch - to the more suitable one would say - WH_MOUSE mouse hook, everything falls apart. Once I cl...

HWND Creation Time

Hi Friends, I am new to this community, while working with 1 of my automation script I am encountering an issue, I wanted to get HWND’s, creation time. I am having a set of HWND in an array which I have retrieved from FindWindowEx, I want to find in array which HWND is created last depending upon system time I do not have enough knowle...

How can I hook multiple windows in C#?

Hi, I am trying to create an application that makes a window (external to the app) transparent when it loses focus. Most of things (getting window id, seting transparent, etc.) would be easy, except one thing - how do I hook windows? ...

Method to intercept child process filesystem activity

I have a small command-line application written in C that acts as a wrapper/launcher for other programs (think: xargs). The application is written to compile on FreeBSD/Linux (via fork()/exec()) and Windows (CreateProcess()). In addition to being able to intercept, inject, or otherwise manipulate the command-line arguments for the chil...

global keyboard hook in windows mobile 5 or above (smartphone platform), how?

so, i guess i must do it in c++, anyone know about this problem? i already searching everywhere and i found some articles about keyboard hook on windows ce, windows mobile is windows ce, isn't it? another questions: which free compiler, ide for windows mobile i could use? ...

pre-update svn script to filter what get

Imagine a repository with many kind of files. Then, I want to get from this repository just some kind of files in a "filter process". I mean ALL FILES are versioned. But to my local work, I just wanna i.e get *.php files, ignoring download *.jpg instead. I think about client-site hook script (pre-update). Anyone know if is it possible?...

Detecting when an object is passed to a new thread in C++?

I have an object for which I'd like to track the number of threads that reference it. In general, when any method on the object is called I can check a thread local boolean value to determine whether the count has been updated for the current thread. But this doesn't help me if the user say, uses boost::bind to bind my object to a boost:...

How to perform Request destination in user page

Hi, I'm trying to redirect any logged user attempts to access /user. In my module I've the next code to redirect after login: function ccmm_user($op, &$edit, &$account, &$category = NULL) { switch($op){ case 'login': $_REQUEST['destination'] = 'admin/'; break; } } And this is working great.. then I try with ca...

KeyboardProc returning TRUE causes performance drops

I'm developing an interface for an add-on to a game. I can't use the game API (for several reasons including the fact that the code must be game-agnostic) and I need to get keyboard input from the user so I've decided to use a keyboard hook (WH_KEYBOARD) to process user input when certain conditions are met. The problem is that while I c...

How to add hooks in twisted.web (or twisted.web2)?

How can I add a hook before and after processing a request on twisted.web (twisted.web2 is fine too)? The equivalent of webpy's: app = web.application(urls, globals()) app.add_processor(web.loadhook(my_attach_callback)) app.add_processor(web.unloadhook(my_detach_callback)) Thanks! ...

Read from STDIN on a Git pre-commit Hook (with PHP)

Hi, I'm looking for a way to have git-commit wait for standard input. I'm coding this in PHP, as my bash skills are non-existant, so I thougth doing a regular <?php $input = trim(fgets(STDIN)); fscanf(STDIN, "%d\n", $line); ?> would do the trick, and wait until I write stuff in to continue, but it just goes ahead and continues executi...

low level, global keyboard hook in wince

I'm trying to make a small tool will run in background & capture all key events. For instance it will do a job like: when user types 'uu' on any textbox it will turn 'uu' to 'aa' ...

C#: Excel 2007 Addin, How to Hook Windows Activate and Deactivate Events

I am writing an Excel 2007 Addin. using VS2008 and .net 3.5, C#. I catched Microsoft.Office.Interop.Excel.Application's WindowActivate and WindowDeActivate events. It was surprised to know that WindowActivate and Deactivate only triggers when i switch between two Excel Windows. if i switch to notepad, i expect Deactivate to be trigger...

What is the recommended way to hook Win32 APIs for a commmercial application?

What is your recommendation for an API hooking library or code to be used in a commercial application? I have looked at Microsoft Detours which seems to be very good, but definitely is out of budget for the profit I am expecting out of my application. Is there any library that offers compatibility across WinXP and Vista (and Windows 7...

Firefox/Gecko control interfering with Windows Forms key presses

Edit: In addition to the bounty, we're willing to pay $250 to have this bug fixed in the Firefox/Gecko codebase. Here is a simple test project (Visual Studio 2008 C#) that reproduces the problem. Edit #2 we're willing to pay $600 to have this bug fixed. See above for sample project that reproduces the problem. We have a Firefox (Gecko)...

Inject to NPSWF32.dll & Flash10a.ocx & flashplayer.xpt to create a global ActionScript VM console and debugger?

Hi all, since all browser's Flash plugin is based on: NPSWF32.dll Flash10a.ocx flashplayer.xpt Is there a way to inject these dll's, use some voodoo to create a global ActionScript VM console and debugger? Perhaps then I can submit arbitary score to any online Flash games? ...