请教:Win98 下 在进程间调用COM接口失败

请教:Win98 下 在进程间调用COM接口失败 - 故障解答 - 电脑教程网

请教:Win98 下 在进程间调用COM接口失败

日期:2006-08-20   荐:
请教:Win98 下 在进程间调用COM接口失败接口的实现(在一个单独的进程中启动(SINGLETON)):STDMETHODIMP CInstallImp::RegisterEventHandler(IUnknown* piSinkInterface, DWORD* phHandle){ return Advise(piSinkInterface, phHandle);}=========================================客户端调用代码: m_pInstallServiceEventHandler = new CInstallServiceEventHandler(this); IUnknown* pSinkUnknown; HRESULT hr = m_pInstallServiceEventHandler->QueryInterface(IID_IUnknown, (void**)&pSinkUnknown);if (SUCCEEDED(hr)){m_pInstall->RegisterEventHandler(pSinkUnknown, &m_dwCookie); pSinkUnknown->Release();}在执行m_pInstall->RegisterEventHandler(pSinkUnknown, &m_dwCookie);时程序崩溃, 错误信息为"InstallService.exe caused an invalid page fault in module RPCRT4.DLL".该代码在WIN2K下运行正常SYSTEM INFO: Dell, 1.8GHz, 512Mb, Win98 2nd, IE6.0 SP1.请高手指点.Any advice?
标签: