hook

API Hook on a COM object function?

Greetings StackOverflowians, As discovered here, Windows 7 features a bug in which the DISPID_BEFORENAVIGATE2 event does not fire for Windows Explorer instances. This event allows shell extensions to be notified when a navigation is about to take place, and (most importantly for me) have the opportunity to cancel the navigation. I've ...

SugarCRM 6 logic hooks

I'm developing an logic hook for calls, meetings and tasks, but I can't get it to work! I have done many logic hooks but the module calls, meetings and tasks seems to ignore the logic_hook.php file! So, I have created a logic_hooks.php in custom/modules folder with the hook 'before_save' (like the others that I have created until now - ...

How to use ZwQueryInformationProcess to get ProcessImageFileName in a kernel driver

I'm writing a simple kernel driver for my application (which is somehow an antimalware application). I hooked ZwOpenFile() and got the process handle calling this API with PsGetCurrentProcess() which returns a PEPROCESS stucture: PEPROCESS proc = PsGetCurrentProcess(); then I used ZwQueryInformationProcess to get the PID and ImageFil...

silverlight receive INotifyPropertyChanged in non UI class hook

Hi, I've a class that raises INotifyPropertyChanged events. I'm quite happy with databinding to UI controls, but I'd like to get these events fired into a non-UI class, but am unsure of what to register or hook into. I know it should be simple, and it probably is, I'm just after a quick pointer down this road. Many Thanks Paul ...

Datamapper's hooks won't work

Can't understand why hooks don't work. I have the following model: class DirItem include DataMapper::Resource # property <name>, <type> property :id, Serial property :dir_cat_id, Integer, :required => true property :title, String, :required => true property :price, Integer, :default => 0 belongs_to :dir_cat has n, :dir...

Hook for pthread_create

Hi Is there (in glibc-2.5 and newer) a way to define a hook for pthread_create? There is a lot of binary applications and I want to write a dynamic lib to be loaded via LD_PRELOAD I can add hook on entry to main (''attributte constructor''), but how can I force my code to be executed in every thread just before the thread's function w...

I'm trying to call MSTest from a console app inside an SVN pre-commit hook, but getting an error?

I am trying to call MSTest.exe from a simple console app that is executed from inside an SVN pre-commit hook. If I use TortoiseSVN to Commit, it auto-runs the console app code below. (skip after the code to see what happens...) // CODE static void Main(string[] args) { string testPath = @"C:\Users\myname\Documents\SVN\Test\bin\De...

how do I get MSTest to run as Administrator, when called from a console app?

This console app code calls MSTest and starts to run the unit test but fails with "Access Denied" to some assemblies required for unit testing (see errors below code). Any way to smoothly make MSTest to run as Admin from here? I tried a manifest, didn't change anything, since the manifest refers to the calling app, not to mstest, right...

What is the best way to get started writing a hook for Mercurial?

I'm new to Mercurial and want to write some hooks to prevent merging between certain branches and the like. I'm looking for some kind of tutorial that goes through the whole loop. I've looked at the API and these examples, but I still find it confusing. I've always been better at learning through a tutorial/workshop than by reading a ma...

retrieve the global hook chain in windows

I want to get information about functions in global hook chain in windows. in fact i need to get the list of them and get their corresponding application if it's possible. As far as I know there is no windows API for doing this so I think i have to find them by going through the hook chain link list. but i don`t know the data structure ...

probelm with $node object inside hook_view (drupal 6.x)

function my_content_view($node, $teaser = FALSE, $page = FALSE){ $my_data_table = array( 'personal_info' => array( 'gender' => array('M' => t('Male Only'),'F' => t('Female Only'),'MF' => t('Both Gender Allow'),), ), ); $node = node_prepare($node, $teaser); if($page){ /...

drupal Webform HTML Email hooks

I'm trying to send a thank you email to the user submitting the form in HTML. I found out by using a hook in my template.php file like this works to set the header correctly: function mythemename_webform_mail_headers($form_values, $node, $sid) { $headers = array( 'Content-Type' => 'text/html; charset=UTF-8; format=flowed; delsp=y...

SVN Hook does not have write permissions

Hello. I have successfully set up a post-commit script that can send e-mails and whatever. I extended it to, on commit, checkout the newly committed repo locally and run doxygen on it. I have an issue with permissions though. When I do a commit (which is mapped through HTTP), my post-commit log says permission denied for both checking ...

Drupal hook_user switch for registration and submit

I need to send registration details somewhere else when Drupal completes a registration. I can't find the correct variables for the switch. I tried this but it's not working. This function is in my module "externalnewsletter". function externalnewsletter_user($op, &$edit, &$account, $category = NULL) { if ($op == 'register' && $cate...

Mercurial changegroup hooks not triggered; Linux

I have a server which serves a "central" Mercurial repository; the team clones it and pushes their changes up to it via ssh. Hudson is installed on the same server (RHEL 5.5). I wish to trigger a Hudson build whenever anyone pushes to the central Mercurial repository. I also wish to send a notification email upon a push. In ProjectName/...

Testing HTTP Hooks

Hello stackers, I am building an API, one of its feature is the use of HTTP POST Hook calls triggered on particular actions. Without taking the time to set a locale route to be the target of the POST call I was looking for an online service showing live POST to a given URL or some other way of testing POST hooks in my code. Any advice...

Enforce mercurial commit message policies via pretxnchangegroup?

As described in: http://hgbook.red-bean.com/read/handling-repository-events-with-hooks.html I thought I could write a small hook which rejects checkins with malformed commit messages. Thats no problem, the issue I encounter is the following work flow: If a developer makes let's say 10 local commits, some of them are malformed, and then ...

Add custom toolbar button to application at runtime

Hi, I use an application compiled in either Visuall C++ or Visual Basic (not sure which) and do not have access to source code. I would like to add a button to the existing toolbar at runtime. Can I code a program that uses something like sendmessage to add a button and set an onclick event? I would like for the button to rename a file o...

hook application procedure and change target file name

Hi I have an application written in visual c++ or visual basic (not sure, sorry) that I do not have source code access to. One of the toolbar options it offers generates an HTML report from a template that has bookmarks or space-holders that are filled by variables calculated in the program before it renders the HTML report. I would like...

Update on each client

Hi everyone, I have a SVN server running on Windows. I need to force an update on every "working copy" (for each people using the svn repos) after a commit. I tried with a post-commit.bat script in the hook directory on the svn server. The problem is that the update occures on the server and not in the client file. Here an extract ...