Deleting GDI objects failing in virtual printer driver! plz help!!!

hi!
If anyone of you has some idea of printer drivers in Windows 95. please help! (i am not aware of any mailing list for 95 driver development, or some link that can provide some documentation on Win 95 printer drivers)
i am working on a virtual printer driver and am facing a frustrating problem.
When the GDI calls RealizeObject() function of printer driver, i am creating solid brush, pen by setting the style, color according to the input parameters recieved. (I am not using the UniDrv driver of microsoft, provided in the 95DDK samples.)
The code is working fine but the problem is while deleting the objects. When GDI calls the RealizeObject() function it passes the style parameter as negative to indicate that the object is to be deleted.
i am trying to delete the object (PEN,FONT,BRUSH) using DeleteObject() but it fails (return value 0). I tried to free the object by converting it to a handle using GlobalHandle() and then deleting it using GlobalFree() but even that fails.
I even called dmRealizeObject() in case of deletion in the hope that it will do the job, but no success!!
My driver is working fine for smaller print jobs but for larger print jobs (say 30 page powerpoint presentation printed through MSPowerPoint 2000) the system resorces fall like anything and after sometimes the windows displays a message that “More than 90% of your system resources are used, close some applications”.

Please suggest something on this.
Thanks in advance!
Best regards
Vaibhav Kalia


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com