Help - Print Driver - OEMDLL - OEMUNI

Windows 2000 DDK - Print Driver - OEMDLL - OEMUNI

My task is to create a Print Driver that will export the image printed to the
printer and export that as a file (.bmp file).

Currently, I’m using the function of IOemUni::FilterGraphics(…) to get the
bytes of the bitmap and writing them out to a file. This seem to be working?
I can open the file in Paint Shop Pro and you can tell sorta tell the Image is
the Print Test Page, But the image is all skued. The width and height values
just don’t look right for the image that I’m trying to display.

pGdiInfo->ulHorzRes: 2391
pGdiInfo->ulVertRes: 3150

I have also tried using IOemUni::ImageProcessing(…), But it seem that it’s
never called. And I’ve also tried to use OEMStartPage(…), But the pointer for
the bitmap here seem to be filled with nulls.

FILE *fp = fopen(“C:\OEMStartPage_Image1.raw”, “wb”);
if (fp)
{
fwrite(pso->pvScan0, pso->cjBits, 1, fp);
fclose(fp);
}

I know I’m missing something? But I don’t know what?

Thanks,
Weston Fryatt

The size of the image will depend on numerous factors. For example, what
resolution does your driver support? Instead of relying on the info from
the GDIINFO structure at OEMEnablePDEV time, you should probably keep
track of this by using custom counters in FilterGraphics.

As for the ImageProcessing approach, you need to define a IPCallbackID
in the GPD in order for it to be called. Please refer to the DDK docs
that talk in detail about how to implement ImageProcessing.

Regarding OEMStartPage, the page has not been rendered as yet onto the
surface. So you should probably try to dump the data in OEMSendPage
instead.

  • Ashwin

This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: Weston Fryatt [mailto:xxxxx@muuf.com]
Sent: Monday, March 24, 2003 8:30 AM
To: NT Developers Interest List
Subject: [ntdev] Help - Print Driver - OEMDLL - OEMUNI

Windows 2000 DDK - Print Driver - OEMDLL - OEMUNI

My task is to create a Print Driver that will export the image printed
to the
printer and export that as a file (.bmp file).

Currently, I’m using the function of IOemUni::FilterGraphics(…) to get
the
bytes of the bitmap and writing them out to a file. This seem to be
working?
I can open the file in Paint Shop Pro and you can tell sorta tell the
Image is
the Print Test Page, But the image is all skued. The width and height
values
just don’t look right for the image that I’m trying to display.

pGdiInfo->ulHorzRes: 2391
pGdiInfo->ulVertRes: 3150

I have also tried using IOemUni::ImageProcessing(…), But it seem that
it’s
never called. And I’ve also tried to use OEMStartPage(…), But the
pointer for
the bitmap here seem to be filled with nulls.

FILE *fp = fopen(“C:\OEMStartPage_Image1.raw”, “wb”);
if (fp)
{
fwrite(pso->pvScan0, pso->cjBits, 1, fp);
fclose(fp);
}

I know I’m missing something? But I don’t know what?

Thanks,
Weston Fryatt


You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com