[comp.windows.ms] Hooking into the System API

jdg@sisd.kodak.com (Jeff Gortatowsky CUST) (08/23/90)

Does anyone know how one would 'hook' into a few API calls in the GDI?
I need to be able to take over the GDI's handling of palettes. There's
nothing wrong with the way the palette manager works as it is, I just
want to add new functionality to any program running that uses the
palette manager.  I need to do this in a global fashion, the idea here
being any Windows 3.0 program will benefit from the functionality
I would provide with out the author rewriting the application. Of course 
there would be a method of unhooking should the user wish to not
use the functionality.  Perhaps a control panel item.

To be more specific, I simply want to try some color correction. I'll
look at the color values and optionally correct them for a specific
device before passing them to the original GDI API.  I have the DDK and
SDK. I would like this to be a part of the system like a device driver
but don't want to reinvent entire device driver functionality.  Just
the few areas I'm interested.  This needs to run under Standard mode
and Enhanced mode so a VDD is out.

What do you think?  I thought of loading my driver in place of the 
user's selected driver then loading the real device driver with
my program.  This seems pretty difficult.  Is there an easy system
call to wedge my code in-between the GDI and the hardware supplier's
device driver?  I guess what I'm trying to is virtualize access to 
a device's palette.  Any ideas?
	Jeff

--
Jeff Gortatowsky-Eastman Kodak Company  .....uunet!atexnet!kodak!sisd!jdg
(716)-726-0084
Eastman Kodak makes film not comments.  Therefore these comments are mine
not theirs.