EngCreateBitmap failure after applying MS07-017 patch

Hello,

(I apologize if this is a duplicate - I do not think my earlier post made it)

I was wondering if anyone could answer a question about the EngCreateBitmap function. In particular, should the lWidth parameter be negative for a bottom-up bitmap?

The reason I ask is because I have a user-mode printer driver that began failing when the MS07-017 security patch was installed. As it turns out EngCreateBitmap was returning null. I noticed that I was passing a negative number for lWidth so as an experiment I changed this to positive and the driver seemed to work.

However, there are a few things that make me nervous about the change:

  1. The documentation states that that lWidth should be the # of bytes necessary to move down one scan line. For a bottom-up bitmap, what does down mean?

  2. The parameter is defined as a LONG and not a ULONG.

  3. I’ve seen DDK sample code along the lines of:

EngCreateBitmap(sizl,ppdev->lDelta,format,
(ppdev->lDelta>0)?BMF_TOPDOWN : 0, 0);

Such code seems imply that lWidth should be negative for a bottom-up bitmap. (Caveat: The samples were from the W2K DDK).

Before making this change, I was hoping for some confirmation that this is the correct thing to do.

Thanks in advance,
Josh Arnold