PRB: StartDoc() Fails with Non-Zeroed DOCINFOLast reviewed: September 29, 1995Article ID: Q135119 |
The information in this article applies to:
SYMPTOMSA call to StartDoc() fails, and no other reason for failure can be found.
CAUSEThe DOCINFO structure passed to StartDoc() is not initialized to zeros before use.
RESOLUTIONPerform the following three steps:
Sample CodeHere is an example of what this code might be:
DOCINFO di; // Get the DC, SetAbortProc(), and so on.memset( &di, 0, sizeof( DOCINFO ) ); di.cbSize = sizeof( DOCINFO ); di.lpszDocName = "MyDoc"; if( StartDoc( hDC, &di ) <= 0 ) HandleFailure(); MORE INFORMATIONAs a general rule, any structure that has a member that indicates the size of the structure should be initialized to all zeros before being used by following the previous steps.
|
Additional reference words: 3.10 3.50 4.00 fail error print DC
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |