Knowledgebase

Back to Articles List

I have a problem with MS Vista - StartDoc fails with DC.

Problem:

I have a problem with MS Vista - StartDoc fails with DC.

Our spooler is a win32 executable. At the beginning of WinMain, I create an instance of the factory and the printer:

m_pFactory = PXC::IPXCControlExPtr(__uuidof(PXC::CPXCControlEx));
if (m_pFactory == NULL)
{
MessageBox(NULL,L"PDF-XChange 4.0 SDK not installed or not properly registered. Application will quit.",
L"PXC-XChange 4.0 Example", MB_OK | MB_ICONERROR);
return;
}
if (m_pPrinter == NULL)
{
m_pPrinter = m_pFactory->Printer[L"", PDF_PRINTER_NAME, L"<YOUR REG KEY HERE>", L"<YOUR DEV CODE HERE>"];

then there is a main message loop of the app, and at the very end of WinMain I simply do:

if (m_pPrinter)
m_pPrinter.Release();
if(m_pFactory)
m_pFactory.Release();
CoUninitialize();

And it always crashes Vista's Spooler SubSystem ("Spooler SubSystem App stopped working and was closed"). It happens on Vista ONLY.
The key is there can be no PDF-XChange printer among windows printers before starting the test application. "Please do the following - install your driver on a clean Vista machine, then go to printers and remove the default PDF-XChange printer. Reboot the system, make sure there is no PDF-XChange printer among the printers, run your test application CExAPI.exe, print anything (the PDF-XChange 4.0 Sample printer will appear). If you now close the application, the m_pPrinter.Release() will cause exception at pdfsaver4.exe (I attached WinDbg to it) and Spooler SubSystem will crash in consequence." <- We'd like to have to make the PDF-XChange printer appear only when our application is working.

Resolution:

This is a known bug that was fixed in Build 155. If you are experiencing this problem please download the latest version from our website here:

http://tracker-software.com/downloads/dev/

Was this article helpful?
Yes No Somewhat