hook

Where to place hooks in Drupal?

Please, I can't use hooks in Drupal, because I don't know where to place them. I tried to place in template.php, unsuccessfull. This is the hook which I want to use: http://api.drupal.org/api/function/hook_form_FORM_ID_alter/6 ...

SetWindowsHookEx() , the hook is not maintained? (possibly)

Hi, I am trying to learn the Windows API. Currently I am having a lot of trouble trying to get hooks to work. I have some sample code I have been messing around with for a few days - it has a GUI written in C# or something, and a dll in C++. The dll has this function externalized: bool __declspec(dllexport) InstallHook(){ g_hHook ...

c++ IPC - d3d hook and directshow capture source

I'm writing an app that will basically be like Fraps, but it will push video frames as a DirectShow Capture Source. This will make it easy to stream games on websites like ustream, justin.tv, etc. I'm wondering what the best way to do the interprocess communication would be. Speed is very important. Right now I have a dll that is injecte...

SVN post-update hook?

Does it exist? Basically I'm developing a Django app on my local machine, when I've finished adding my feature and get it working locally, I want to commit it, and then update the production server. Then I want to automatically restart apache. Is this possible? How? ...

logging apache2 to mongodb: apache hook? something out there?

i just found a great blog posting on http://simonwillison.net/2009/Aug/26/logging/ stating the following MongoDB is fantastic for logging". Sounds tempting... high performance inserts, JSON structured records and capped collections if you only want to keep the past X entries. If you care about older historic data but still...

SVN - pre-commit hook to check code formatting

Hi, We want to implement pre-commit hook in SVN to check code formatting in jsp/java files. If the submited files do not pass the guidelines, it should not commit and indicate the lines in error. How can we implement it? Please guide. ...

Git pre-commit hook : changed/added files

I am writing a pre-commit hook. I want to run php -l against all files with .php extension. However I am stuck. I need to obtain a list of new/changed files that are staged. deleted files should be excluded. I have tried using git diff and git ls-files, but I think I need a hand here. ...

Is it possible to listen for em_replacesel message to control in another application in C#

This might be a long shot, even not possible. I was wondering if it is possible to listen for the em_replacesel message to a rich text control in another programs window and then call one of the Win32API's to get the text from the window, or even just get the text that was sent via em_replacesel. Is this possible, and possible in C#...

git update hook: Finding all revs being committed

I'm creating an update hook so that our central git repository can do some simple sanity checks of each file in each commit. However, I don't know how to make git cough up the names of all of the commits in a "push". No matter how many commits the client is pushing, the update hook is called just once (by design). For example, suppose...

Documentation for Liferay Hooks

Hi there, I need to listen for user log in and log out events in Liferay. From what little I've been able to find, it seems that using Liferay hooks would be the way to accomplish this. Unfortunately I haven't been able to find any information other that at the following link: http://www.liferay.com/web/raymond.auge/blog/-/blogs/portal...

How do I make git post-receive emails be sent from the commit author?

I'm using the post-receive-email script included with git. (Source is here.) It works just fine, but I want each email to be sent from the author of the commits pushed. How do I do it? My post-receive file currently looks like this, and I want to customize the from-email-address. #!/bin/sh export USER_EMAIL=from-email-address@blah....

Change the key being pressed with C#

Hey, I'm trying to write a program in C# that will track the pressing of certain keys (using a keyboard hook), and send different ones instead. For instance, when I press the A key it will instead send the Q key. I used http://www.codeproject.com/KB/cs/CSLLKeyboardHook.aspx this for my hooks and tried to use the SendKeys function, but ...

Delphi, read data from 3rd party data field

I am writing an application that needs to read a data field on another Delphi program and I do not have access to the source code of the 3rd party program. The data field contains the "foreign key" to a record I need to retrieve or create in my application. I would appreciate any links to knowledge or components that will help me with ...

Google API Hooks, is there a way to be Programmatically Alerted When a Google Doc is Updated?

Does Google have an API for registering hooks/callbacks for whenever a document is updated? That way, I could run a process on one of my servers every time a doc was updated. If they don't have that, what the recommended way to accomplish that? Cron? Anything else? ...

Adding hooks to TortoiseHg

I am using TortoiseHg and would like to apply a hook to my repo. My repo's .hg/hgrc file is as follows: [hooks] pretxncommit = python:hg_checksize.newbinsize The thing is that I don't know where TortoiseHg's PYTHONPATH variable is set. How do I change it? Or where do I put my Python file so that it is visible by TortoiseHg's Python...

Pass-by-Reference Error

I have a hook system setup... which is working on localhost... I put it live and get an error saying "Warning: Call-time pass-by-reference has been deprecated". Now, apparently the work around is to remove all "&" from your function calls, ie foo(&$me) to foo($me) and then in foo's function definition do "function foo(&$me)". However, ...

Global WH_CBT hook DLL is loaded into some processes only

The main program calls the function SetHook in the wi.dll to install global WH_CBT hook. bool WI_API SetHook() { if (!g_hHook) { g_hHook = SetWindowsHookEx(WH_CBT, (HOOKPROC) CBTProc, g_hInstDll, 0); } return g_hHook != NULL; } I presume after installing global hook, wi.dll should be loaded into each process' ...

Need to call original function from detoured function

I'm using Detours to hook into an executable's message function, but I need to run my own code and then call the original code. From what I've seen in the Detours docs, it definitely sounds like that should happen automatically. The original function prints a message to the screen, but as soon as I attach a detour it starts running my co...

How to monitor screen updates?

I am trying to write a program that monitors when the screen has been redrawn. Meaning if any part of any window is redrawn, then the program is notified. As far as I understand I should use a journal record hook like at http://www.vbaccelerator.com/home/vb/code/libraries/Hooks/Journal_Record_Hooks/article.asp However, I do not unders...

Extract text from a chatbox-type textbox in a 3d-party windows application

I have no experience with windows application hooking, DLL injection etc. What is the simplest way to achieve that described in the title and nothing else? ...