I hope someone here can direct me with my special problem.
I use extensively Win32 multimedia functions hook by means of a special
library and it usually works fine. For every function that I want to hook ,
I declare the dll in which it resides, I define the hooked function in which
I do my specific tasks, and then I usually call the original one.
Now I need to hook "DriverProc" function which is an installable driver
function in my acm driver msadp32.acm.
Can this function be hooked as all win32 functions?
Where can I find the header for this function - DriverProc? Though MSDN
states that it's declared in mmsystem.h its not there.

Any reference is appreciated.

Regards

Gil

Re: hooking DriverProc by Tim

Tim
Sun Jun 25 19:54:36 CDT 2006

"Gil" <mgil@chasan.ar> wrote:
>
>I hope someone here can direct me with my special problem.
>I use extensively Win32 multimedia functions hook by means of a special
>library and it usually works fine. For every function that I want to hook ,
>I declare the dll in which it resides, I define the hooked function in which
>I do my specific tasks, and then I usually call the original one.
>Now I need to hook "DriverProc" function which is an installable driver
>function in my acm driver msadp32.acm.
>Can this function be hooked as all win32 functions?

Yes, assuming you can get in after msadp32.acm gets loaded but before its
DriverProc is called.

>Where can I find the header for this function - DriverProc? Though MSDN
>states that it's declared in mmsystem.h its not there.


\data\SDK\3790.1830\Include\MMSystem.h:
WINMMAPI LRESULT WINAPI DefDriverProc(
IN DWORD_PTR dwDriverIdentifier,
IN HDRVR hdrvr,
IN UINT uMsg,
IN LPARAM lParam1,
IN LPARAM lParam2
);
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Re: hooking DriverProc by Gil

Gil
Sun Jun 25 22:39:47 CDT 2006

Thanks Tim Roberts,

As you can guise I'm not a professional programmer - nor a driver
developer...
I still have one problem , that is whenever I hook a standard function like
waveInOpen, I need to link to the import library - Winmm.lib in this case.
But hooking to the acm driver msadp32.acm, I don't have the lib file.

Can you still help?

Thanks in advance.

Gil

> - Tim Roberts, timr@probo.com
> Providenza & Boekelheide, Inc.



Re: hooking DriverProc by Tim

Tim
Tue Jun 27 23:41:39 CDT 2006

"Gil" <mgil@chasan.ar> wrote:
>
>As you can guise I'm not a professional programmer - nor a driver
>developer...
>I still have one problem , that is whenever I hook a standard function like
>waveInOpen, I need to link to the import library - Winmm.lib in this case.
>But hooking to the acm driver msadp32.acm, I don't have the lib file.
>
>Can you still help?

Anything you can do by linking to a library can also be done with
LoadLibrary and GetProcAddress.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.