Click here to Skip to main content
15,921,646 members
Home / Discussions / System Admin
   

System Admin

 
AnswerRe: what does "documented" meaning here Pin
Michael Dunn23-Feb-06 17:49
sitebuilderMichael Dunn23-Feb-06 17:49 
QuestionWndows98 Problem... Pin
Aqueel21-Feb-06 19:27
Aqueel21-Feb-06 19:27 
AnswerRe: Wndows98 Problem... Pin
Mekong River22-Feb-06 5:02
Mekong River22-Feb-06 5:02 
AnswerRe: Wndows98 Problem... Pin
Dave Kreskowiak23-Feb-06 16:04
mveDave Kreskowiak23-Feb-06 16:04 
Questionerror 1068: The depending service for group failed to start Pin
misecprj21-Feb-06 19:22
misecprj21-Feb-06 19:22 
QuestionDisk space allocation management/monitor Pin
devvvy21-Feb-06 15:26
devvvy21-Feb-06 15:26 
QuestionSetting default UDP Network stack buffer size Pin
Giles21-Feb-06 1:09
Giles21-Feb-06 1:09 
QuestionGDI rendering in printer driver Pin
loneadam200019-Feb-06 20:47
loneadam200019-Feb-06 20:47 
Hi all I am using the MSPLOT driver as a model to build a monolithic printer
driver, what I am trying to do is have the driver create a engine managed
bitmap and hook some functions to it, when the driver cannot process the
drawing instruction it must punt to the GDI using ENGxxx function.

The code is something like this at DrvEnablePDEV:

SurfSize.cx = pPDev->HorzRes;
SurfSize.cy = pPDev->VertRes;
hHeap = GetProcessHeap();

pPDev->pbBitmap = (LPBYTE)HeapAlloc(hHeap, HEAP_ZERO_MEMORY,
(SIZE_T)(pPDev->HorzRes * pPDev->VertRes));
if (pPDev->pbBitmap == NULL)
{
TRACE_WARN("WARNING - BITMAP buffer not allocated reverting to Kernel
buffer",0);
// Should this be NULL GDI will allocate a buffer in kernel mode for the
bits
}

(HBITMAP)pPDev->hSurf = (HBITMAP)EngCreateBitmap( SurfSize, SurfSize.cx,
BMF_1BPP, BMF_TOPDOWN | BMF_NOZEROINIT, pPDev->pbBitmap );
// GDI punting, we shall call for a an engine managed bitmap to be called to

if (!EngAssociateSurface(pPDev->hSurf, (HDEV)pPDev->hpdev, HOOK_BITBLT |
HOOK_STRETCHBLT | HOOK_COPYBITS | HOOK_STROKEPATH | HOOK_FILLPATH |
HOOK_STROKEANDFILLPATH | HOOK_TEXTOUT))
{
TRACE_ERR(("DrvEnableSurface: UNable to associate surface"));
DrvDisableSurface((DHPDEV)pPDev->hpdev);
EngDeleteSurface(pPDev->hsurf);

return(NULL);
}
return((HSURF)pPDev->hsurf);

And at the drawing functions (sample DrvTextOut) :

// Punt call to GDI if no special rendering can be done
pso->iType = STYPE_BITMAP;
if (EngTextOut(pso, pstro, pfo, pco, prclExtra, prclOpaque, pboFore,
pboOpaque,
pptlBrushOrg, mix ) == DDI_ERROR)
{
return DDI_ERROR;
}

But when I punt to the GDI the Bitmap returned has its bits all 0, meaning
no drawing is done and I cannot understand why. Could any one help or maybe
hint me in whats missing in my code.

Thanks alot

AnswerRe: GDI rendering in printer driver Pin
Mike Dimmick19-Feb-06 23:35
Mike Dimmick19-Feb-06 23:35 
QuestionVMWare and Virtual Server Pin
devvvy19-Feb-06 17:41
devvvy19-Feb-06 17:41 
AnswerRe: VMWare and Virtual Server Pin
Dave Kreskowiak20-Feb-06 8:51
mveDave Kreskowiak20-Feb-06 8:51 
AnswerRe: VMWare and Virtual Server Pin
Vraxx10-Mar-06 11:40
Vraxx10-Mar-06 11:40 
QuestionError page Pin
Mekong River19-Feb-06 4:10
Mekong River19-Feb-06 4:10 
AnswerRe: Error page Pin
Dave Kreskowiak19-Feb-06 7:56
mveDave Kreskowiak19-Feb-06 7:56 
GeneralRe: Error page Pin
Mekong River19-Feb-06 11:15
Mekong River19-Feb-06 11:15 
QuestionUnsafe expressions in Access2003 problem? Pin
george ivanov18-Feb-06 7:21
george ivanov18-Feb-06 7:21 
AnswerRe: Unsafe expressions in Access2003 problem? Pin
Saksida Bojan19-Feb-06 3:32
Saksida Bojan19-Feb-06 3:32 
AnswerRe: Unsafe expressions in Access2003 problem? Pin
Mike Dimmick19-Feb-06 9:04
Mike Dimmick19-Feb-06 9:04 
AnswerRe: Unsafe expressions in Access2003 problem? Pin
Mekong River19-Feb-06 14:12
Mekong River19-Feb-06 14:12 
Questionincreasing virtual memory Pin
narayanagvs17-Feb-06 17:22
narayanagvs17-Feb-06 17:22 
AnswerRe: increasing virtual memory Pin
Mekong River18-Feb-06 4:47
Mekong River18-Feb-06 4:47 
AnswerRe: increasing virtual memory Pin
Michael Dunn18-Feb-06 5:42
sitebuilderMichael Dunn18-Feb-06 5:42 
GeneralRe: increasing virtual memory Pin
Mekong River18-Feb-06 15:06
Mekong River18-Feb-06 15:06 
GeneralRe: increasing virtual memory Pin
Michael Dunn18-Feb-06 17:20
sitebuilderMichael Dunn18-Feb-06 17:20 
GeneralRe: increasing virtual memory Pin
Mekong River19-Feb-06 3:40
Mekong River19-Feb-06 3:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.