13.07.2015 Views

REFERENCE GUIDE

REFERENCE GUIDE

REFERENCE GUIDE

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SefWindowsHookprocedure-instance address. Dynamic-link libraries must useGetProcAddress to get a procedure-instance address.The following section describes how to support the individual hookfunctions.Filter FunctionWindows calls the WH_CALLWNDPROC filter function whenever theSend Message function is called. Windows does not call the filter functionwhen the PostMessage function is called.The filter function must use the Pascal calling convention and must bedeclared FAR. The filter function must have the following form:DWORD FAR PASCAL FilterFunc(nCode, wParam, IParam)int nCode;WORD wParam;DWORD IParam;FilterFunc is a placeholder for the application- or library-supplied functionname. The actual name must be exported by including it in an EXPORTSstatement in the library's module-definition file.Parameters nCode Specifies whether the filter function should process themessage or call the DefHookProc function. If the nCodeparameter is less than zero, the filter function must pass themessage to DefHookProc without further processing andreturn the value returned by DefHookProc.wParamIParamSpecifies whether the message is sent by the current task. Itis nonzero if the message is sent; otherwise, it is NULL.Points to a data structure that contains details about themessage intercepted by the filter. The following shows theorder, type, and description of each field of the datastructure:FieldhlParamIIParamType/DescriptionWORD Contains the highorderword of the IParamparameter of the messagereceived by the filter.WORD Contains the loworderword of the IParam538Software development kit

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!