hi all
I am facing a problem in printer driver UI.
I am adding a property sheet page to printer driver UI. When i am view the “Document Defaults” settings, the page views fine.
similarly when i am viewing the “Properties” my printer’s property page appears fine…
but the problem is when i am opening both these simultaneously, and close first one, the other window becomes invalid and it causes crash in explorer.exe when the window is closed or clicked!!
"
Unhandled Exception in explorer.exe (COMPSTUI.DLL) ): 0xC0000005: Access Violation.
"
At my end i have implemented the DrvDocumentPropertySheets() for “Document defaults” and in PROPSHEETUI_REASON_INIT reason i am using the callback function with parameter CPSFUNC_ADD_PCOMPROPSHEETUI.
similarly in other case i have implemented DrvDevicePropertySheets() for “Properties” i am using the same CPSFUNC_ADD_PCOMPROPSHEETUI parameter…
I checked the handle returned in both the cases and they are different !!!
in reason PROPSHEETUI_REASON_DESTROY i tried returning simply 1 but the crash remains…
i even tried the callback function with CPSFUNC_DELETE_HCOMPROPSHEET reason but still crash is there…
If anyone knows a way around to this please help me.
Thanks in advance!
regards
Vaibhav
Daring ideas are like chessmen moved forward. They may be beaten, but they may start a winning game.
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
I am not sure what is going on in your particular case. The crash
probably occurs because some resources are freed by CPSUI when you close
the first window. In any case, the oemui sample uses
CPSFUNC_ADD_PROPSHEETPAGE for the printer property sheet and
CPSFUNC_ADD_PCOMPROPSHEETUI for the document property sheet. I would
suggest that you test your driver with minimal functionality first and
then add more stuff to it with testing at every step. This way you will
know what is causing the problem. You can use the oemui sample as a
working reference.
This posting is provided “AS IS” with no warranties, and confers no
rights.
-----Original Message-----
From: Vaibhav Kalia [mailto:xxxxx@newgen.co.in]
Sent: Friday, February 22, 2002 5:59 AM
To: NT Developers Interest List
Subject: [ntdev] Crash in Printer user interface
hi all
I am facing a problem in printer driver UI.
I am adding a property sheet page to printer driver UI. When i am view
the “Document Defaults” settings, the page views fine.
similarly when i am viewing the “Properties” my printer’s property page
appears fine…
but the problem is when i am opening both these simultaneously, and
close first one, the other window becomes invalid and it causes crash in
explorer.exe when the window is closed or clicked!!
"
Unhandled Exception in explorer.exe (COMPSTUI.DLL) ): 0xC0000005: Access
Violation.
"
At my end i have implemented the DrvDocumentPropertySheets() for
“Document defaults” and in PROPSHEETUI_REASON_INIT reason i am using the
callback function with parameter CPSFUNC_ADD_PCOMPROPSHEETUI.
similarly in other case i have implemented DrvDevicePropertySheets()
for “Properties” i am using the same CPSFUNC_ADD_PCOMPROPSHEETUI
parameter…
I checked the handle returned in both the cases and they are different
!!!
in reason PROPSHEETUI_REASON_DESTROY i tried returning simply 1 but the
crash remains…
i even tried the callback function with CPSFUNC_DELETE_HCOMPROPSHEET
reason but still crash is there…
If anyone knows a way around to this please help me.
Thanks in advance!
regards
Vaibhav
Daring ideas are like chessmen moved forward. They may be beaten, but
they may start a winning game.
You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com