hook

retrieve the global hook chain in windows

霸气de小男生 提交于 2019-12-08 07:29:00
问题 I need to get the list of functions in global hook chain in Windows and get their corresponding application if it's possible. I don't know how to retrieve information from the global hook chain however. As far as I know there is no windows API for doing this so I think I have to find them by parsing the hook chain link list . The problem is that I don't know the data structure of this link list and it's begin address. Does anyone know how windows manages its global hook chain? 回答1: One

How to export revision on commit with a post-commit hook?

混江龙づ霸主 提交于 2019-12-08 06:30:19
问题 It may be handy to export the specific Subversion repository branch after a commit, using a post-commit hook. E.g. to update a website after a commit or to update a development branch for testing. Is there any instruction or sample of such a hook? 回答1: The best choice for writing a hook script for Subversion in Windows environment (e.g. VisualSVN Server) is to use Windows PowerShell scripting language or good ol' Windows batch command-line. Here is the sample code of post-commit.bat and post

Hooking NtCreateFile API from ntdll.dll with EasyHook (c#)

ⅰ亾dé卋堺 提交于 2019-12-08 05:40:06
问题 This is the first time I try to hook windows API. My goal is to monitor all files that a process is going to create/open/read/write. In order to be the most verbose possible, I decided to hook the ntdll.dll API such as NtCreateFile() and NtOpenFile(). So, in order to acheive this goal, I went on EasyHook, which seems easy and robust. I've essetially followed the FileMon example, changing what I really wanted: the Hooked function. When I try to read information about the file that is going to

Hook into tab changed event of browser

て烟熏妆下的殇ゞ 提交于 2019-12-08 05:34:06
问题 In an ongoing project (Windows, .NET C#) we encountered a bottleneck in our development: we have to observe the change of the current tab in all major browsers (IE,FF, Chrome, Opera, Safari). As soon as tab change event has been captured, it must be written to a file. Is this feasible? 回答1: What i finally did was the following: tracked the EVENT_OBJECT_NAMECHANGE for the Window title as soon as the title gets changed i know there was something "new" loaded, so i checked for the URL of the

After hooking hook procedure is called infinitely

徘徊边缘 提交于 2019-12-08 05:28:52
问题 I have hooked WM_SETFOCUS message by calling API hhookCallWndProc = SetWindowsHookEx(WH_CALLWNDPROC, HookCallWndProc, hInst, threadID); Hook Procedure is extern "C" LRESULT _declspec(dllexport) __stdcall CALLBACK HookCallWndProc(int nCode, WPARAM wParam, LPARAM lParam) { if (nCode == HC_ACTION) { CWPSTRUCT* info = (CWPSTRUCT*) lParam; if(info->message == WM_SETFOCUS ) { if(info->hwnd == hControl) { MessageBox(NULL,L"Focus on control",L"Focus",MB_OK); } } } return CallNextHookEx

How can I make Gitolite post-receive hook to show full path to modified file?

断了今生、忘了曾经 提交于 2019-12-08 05:19:00
问题 Here is my post-receive hook: #!/bin/bash while read oldrev newrev ref; do git diff --name-only oldrev..newrev git --work-tree=/tmp checkout HEAD -- plugin.yml echo -e "Test complete maybe..." | tee >(exec logger) done And here is the output: And if I replace oldrev..newrev by oldrev -- newrev, the output is: I need to get folder in which this file(plugin.yml) was modified. Thanks. 回答1: First, each hook can simply check its execution path: that will give you the name of the repo. Second, the

Did MS change something about keyboard hooks in Windows Vista or 7?

你离开我真会死。 提交于 2019-12-08 05:18:42
问题 I've implemented keyboard hooks in several languages (AutoIt, C#) using SetWindowsHookEx and WH_KEYBOARD_LL . I also know of a couple of C++ programs that have the same issue. I didn't post any code because they work perfectly in Windows XP. However, under Windows 7, at some point the hooks become "unloaded" or stop processing any further keys. It seems like it may be related to a low memory condition, but I'm not really sure. Did Microsoft change the way keyboard hooks work in Vista or 7 to

How to repeat key strokes with SendInput?

筅森魡賤 提交于 2019-12-08 05:15:51
问题 I'm writing a little tool in VC++ to record key strokes to replay them later, a macro recorder. It works quite nice already, using a keyboard hook function that reads each and every key press and release event. The playback works with the SendInput() function and generally also works fine - except for repeating key strokes. Pressing a key several times after releasing it every time is no problem. But pressing it and holding it down, for the input character to be repeated, can be recorded but

Delphi Keyboard Hook

送分小仙女□ 提交于 2019-12-08 05:02:55
问题 I'm having an interesting problem implementing a global keyboard hook. I wrote a dll which is used to set the hook and then an application (Delphi) which loads the dll and processes the results of the hook. This was done this afternoon on my PC at work and after some testing I figured it was working 100%. I've just tested the same app and dll here at home and I'm not getting any errors, but the application does not appear to be getting any data either. Both machines are WinXP, although my

ClearCase.ClearTool returns No view context available error

非 Y 不嫁゛ 提交于 2019-12-08 04:41:01
问题 I am trying to run the following code, but the got #error 1 at startview command, and #error 2 in desc command. use Win32::OLE; $ct = Win32::OLE->new('ClearCase.ClearTool') or die "Could not create ClearTool object\n"; $view = "ccadm01_UARK_DEV"; $output = $ct->CmdExec("pwv") or die("Cleartool returned error: ", Win32::OLE->LastError(), "\n"); print ("pwv \$output = $output\n"); # error 1 : cleartool return error 0 $output = $ct->CmdExec("startview ccadm01_UARK_DEV") or die("Cleartool