ATLASSUME(m_bInitialized) Gives Assert in atlcore.h After Porting from VC6.0 to VC8

Hello,

I have ported a OPC server application from VC6 to VC8 and after fixing complication and linking I was able to run the same. But while testing the OPCServer Interface i have come across a issue where I get Assert dialog for the ATLASSUME macro. The location details are below.

ATLASSUME(m_bInitialized); in atlcore.h inside the functionHRESULT Lock() at Line no 182.

From the documentation in function HRESULT Locak() I undestand that one has to callCComObjectRootEx::_AtlInitialConstruct, but from where should i call this ? I ahve no idea.

Can anyone help me to resolve this issue.

Thanks and Regards

kedar patki

[914 byte] By [kbpatki] at [2007-12-22]
# 1

Sridhar has described roots of this asserts and some workarounds here

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=159503&SiteID=1

Nikola

NikolaDudar at 2007-8-30 > top of Msdn Tech,Visual C++,Visual C++ General...
# 2

Hi Kbpatki,

I am also struggling with the same problem.

If you have identified the solution then please let me know asap.

Thanks & Regards,

Sam_Tuteja

Sam_Tuteja at 2007-8-30 > top of Msdn Tech,Visual C++,Visual C++ General...