Martin Slaman
April 15th, 1999, 02:16 PM
I get the following exception being thrown when DoPropExchange()is called inside my ActiveX control. The dialog containing the control will not come up. What am I doing wrong?
CArchive exception: endOfFile.
Warning: CreateDlgControls failed during dialog init.
Info: AfxDllCanUnloadNow returning S_OK
First-chance exception in TestApp.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception.
Info: AfxDllCanUnloadNow returning S_OK
The thread 0x11D has exited with code 0 (0x0).
The program 'R:\Source\ActiveX\TestApp\Debug\TestApp.exe' has exited with code 0 (0x0).
Here is what the function looks like. After some experimentation (commenting out lines and changing the order of the lines) I discovered that it allways happens the second time PX_Long() or PX_Bool() is called.
void CTimeCodeOcxCtrl::DoPropExchange(CPropExchange* pPX)
{
ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));
COleControl::DoPropExchange(pPX);
// TODO: Call PX_ functions for each persistent custom property.
VERIFY(PX_Long(pPX, _T("Format"), m_Format, (long)0 ));
VERIFY(PX_Bool(pPX, _T("ClipChildren"), m_ClipChildren, FALSE ));
VERIFY(PX_Long(pPX, _T("Border"), m_Border, (long)0 ));
VERIFY(PX_Long(pPX, _T("Rate"), m_Rate, (long)0 ));
VERIFY(PX_Bool(pPX, _T("ClipSiblings"), m_ClipSiblings, FALSE ));
}
CArchive exception: endOfFile.
Warning: CreateDlgControls failed during dialog init.
Info: AfxDllCanUnloadNow returning S_OK
First-chance exception in TestApp.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception.
Info: AfxDllCanUnloadNow returning S_OK
The thread 0x11D has exited with code 0 (0x0).
The program 'R:\Source\ActiveX\TestApp\Debug\TestApp.exe' has exited with code 0 (0x0).
Here is what the function looks like. After some experimentation (commenting out lines and changing the order of the lines) I discovered that it allways happens the second time PX_Long() or PX_Bool() is called.
void CTimeCodeOcxCtrl::DoPropExchange(CPropExchange* pPX)
{
ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));
COleControl::DoPropExchange(pPX);
// TODO: Call PX_ functions for each persistent custom property.
VERIFY(PX_Long(pPX, _T("Format"), m_Format, (long)0 ));
VERIFY(PX_Bool(pPX, _T("ClipChildren"), m_ClipChildren, FALSE ));
VERIFY(PX_Long(pPX, _T("Border"), m_Border, (long)0 ));
VERIFY(PX_Long(pPX, _T("Rate"), m_Rate, (long)0 ));
VERIFY(PX_Bool(pPX, _T("ClipSiblings"), m_ClipSiblings, FALSE ));
}