Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Win32 API on Windows 2000 Professional - known changes??

Status
Not open for further replies.

sgopinath

Programmer
Dec 29, 2000
7
0
0
US
Hi,
I am getting an invalid handle error (GetLastError() returned 6, ERROR_INVALID_HANDLE) to a printer device context, while using the StartPage function in Windows2000 Professional. i am using the VisualC++ 5.0 compiler. The handle when used in the function StartDoc() to start printer spooling gives no errors, the document is spooled and a valid print job id is returned. But the same Devicecontext handle for the printer when passed to the subsequent StartPage function call, gives an invalid handle error. The document is spooled and no printing action occurs. The same stuff works on Windows NT 4.0, but not in Windows2000 professional. and this too happens only in a specific view for the Document in the application. I have checked the sequence of execution, and value of global variables in both NT and 2000. They remain the same... but when it comes to the StartPage() function call, only Windows2000 returns -1(error), and NT returns 1(success)...
Somebody has any info on these... I wonder if this is a bug in Windows2000 ???
Thanks in advance,...
sgopinath.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top