hook

Does Drupal parse hooks that aren't being used?

Does Drupal parse (and/or run) hooks that are unrelated to the content being loaded by the current user? For example, say I had a module foo installed and active with the following hooks: <?php // .. stuff ... function foo_menu() { $items = array(); $items['foo/show'] = array( 'title' => t('Foo!'), 'pa...

Problem with WH_SHELL

I'm trying to create a Windows hook, specifically to catch HSHELL_WINDOWCREATED messages. However, my hook proc never gets called. My dll has a function to install the hook: hHook = SetWindowsHookEx(WH_SHELL, (HOOKPROC)CreateWindowHook, hinst, 0); hinst was filled in by DllMain(), at the DLL_PROCESS_ATTACH message. CreateWindowHook i...

C# How to find if an event is hooked up

I want to be able to find out if an event is hooked up or not. I've looked around, but I've only found solutions that involved modifying the internals of the object that contains the event. I don't want to do this. Here is some test code that I thought would work: // Create a new event handler that takes in the function I want to exe...

codeigniter hook for app version checking

I am using CodeIgniter to build an application. The app is having many AJAX requests on setTimeoutInterval, which fires every few seconds. Now the situation is: If a user has a page kept open. The page sends ajax requests at intervals. At that point of time I have updated my application in the server. So I want to keep a version chec...

Using python scripts in subversion hooks on windows

My main goal is to get this up and running. My hook gets called when I do the commit with Tortoise SVN, but it always exits when I get to this line: Python "%~dp0trac-post-commit-hook.py" -p "%TRAC_ENV%" -r "%REV%" || EXIT 5 If I try and replace the call to the python script with any simple Python script it still doesn't work so I'm as...

How does one control the hook order when adding a PerlTransHandler hook?

In apache 2.2 / mod_perl2 I'd like to add a translation phase handler (PerlTransHandler) but have it run after mod_rewrite. In apache 1.3 this was done by controlling module load order. In apache 2.x the hook ordering is more flexible, however mod_perl2 seems to always insert itself first in that hook phase. Looking at the Request Hook...

Intercept keyboard input using current keyboard layout in C#

Hello. I've implemented a low-level keyboard hook using SetWindowsHookEx() function. It works fine and returns a virtual key code for each keystroke. I can convert this virtual key code to a System.Windows.Input.Key using KeyInterop.KeyFromVirtualKey(). But the target is to get a symbol that corresponds to this virtual key code in curre...

How do I change a process's socket connection

A process is connecting to a certain ip or domain, but I do not know what it is. The process can't connect to the server. How do I find and change it? ...

Finding a 3rd party QWidget with injected code & QWidget::find(hwnd)

Hey, I have a Qt Dll wich I inject into a third-party Application using windows detours library: if(!DetourCreateProcessWithDll( Path, NULL, NULL, NULL, TRUE, CREATE_DEFAULT_ERROR_MODE | CREATE_SUSPENDED, NULL, NULL, &si, &pi, "C:\\Program Files\\Microsoft Research\\Detour...

Problem with WH_CALLWNDPROCRET

I am trying to catch messages from an application for which I have no source code. I install a Windows hook like this: hhk = SetWindowsHookEx(WH_CALLWNDPROCRET, HookProcSetTextRet, hinst, threadID); (The hhk variable is in shared data.) I don't understand some of the behavior, though, specifically: LRESULT CALLBACK HookProcSetTextRet...

Where can I find the file VisualSVNServerHooks.exe

I'm trying to activate the post-commit hook in SVN, and I don't have the file VisualSVNServerHooks.exe where can I find it? Thanks, Oded. ...

wordpress: actions, filters & hooks

Howdy Guys, I'm quite new to this (understanding the WP Guts), and I wanted to understand the Hooks and Filters better, I can't get it right from Codex. I did a simple test, the idea is to override the get_title() method in order to erase the "Protected: " sentence from the title if the page is protected, there is a protected_title_f...

Babylon Text Select

How does Babylon recognize text selection in any software? I've to implement this. Maybe it's possible with API Hook? Thanks. ...

How to write a global save hook for Emacs?

I usually have to deal with a lot of people sending me Windows files and I'm tired of having to convert them by hand, usually by doing: C-x RET f unix RET Is there any way to add a global hook (for all modes) to automatically do this on saves? ...

Wordpress: displaying an error message - hook admin_notices fails on wp_insert_post_data or publish_post

I'm adding validation so if a post is in a particular category, it needs certain Custom Fields to be set. This should be easy hooking wp_insert_post_data and admin_notices, but there is a redirect that causes the admin_notices callback to disappear. OK - So I created a hack that uses the Session to store my error message across the red...

Get log details for a specific revision number in a post-commit hook with SharpSVN?

I'm trying to write a post-commit hook using SharpSVN but can't figure out how to get the changeset info using SharpSVN given the revision number and the path to the repo. Any ideas are much appreciated. ...

How can an application write text to the screen?

How can an application write text to the screen without using any DrawText type methods, and how can I catch it? I've hooked the following: DrawText DrawTextA DrawTextW DrawTextEx DrawTextExA DrawTextExW TextOut TextOutA TextOutW ExtTextOut ExtTextOutA ExtTextOutW PolyTextOut PolyTextOutA PolyTextOutW None of them yields a thing. ...

Non-terminating / non-blocking Windows Mobile App

I have a console app that I want to run continually in the background. I thought that if I started it up and then told it to wait things would work. But when I have it wait, it freezes the application. Here is my code: class Program { static public ManualResetEvent StopMain; static void Main(string[] args) { ...

C# dll hooks: passing null as parameter

Hi, I have successfully hooked a dll function in c# [DllImport ("ftusbsrv.dll", EntryPoint="FtEnumDevices")] public unsafe static extern bool FtEnumDevices(ref FT_SERVER_USB_DEVICE lpUsbDevices, ref ulong pulBufferSize, ref FT_ERROR_STATE lpES); I need to pass null as as first parameter as below FtEnumDevices(null, pulBufferSize,lpE...

linux netfilter pass the packet content to user space socket app

I want to write a linux 2.6 netfilter module, which can check the incoming IP packet information ,such as dest-ip ,source-ip. and then pass these information to user space app. that app (socket app,I think ) will handle these information as soon as the packet reach the HOOKs. I want to try two ways : 1, inside the netfilter module, ma...