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.
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.