A
alkatal
Hi,
Im using a ATL Project. with a Simple ATL object as a class to add User
definied Function to EXcel via C++.
Thats all not prob. evrithing works fine.
Thing is i need to include a managed class. First time i changed the project
to /clr and i got the error D8045. After a bit of googling i found out that i
needed to make the project no common language support and just my class where
the include is to a /clr.
All fine the compiler make my dll. my Functions works fine und excel. but
when i close Excel it crashes @ altbase.inl
@
ATLINLINE ATLAPI_(void) AtlCallTermFunc(_ATL_MODULE* pModule)
{
if (pModule == NULL)
_AtlRaiseException((DWORD)EXCEPTION_ACCESS_VIOLATION);
_ATL_TERMFUNC_ELEM* pElem = pModule->m_pTermFuncs;
_ATL_TERMFUNC_ELEM* pNext = NULL;
while (pElem != NULL)
{
pElem->pFunc(pElem->dw);
pNext = pElem->pNext;
delete pElem;
pElem = pNext;
}
pModule->m_pTermFuncs = NULL;
}
i removed the include so just compling with /clr same prob.
if i remove /clr all works fine.
any idea since i need to add a managed class
mny thnks
Im using a ATL Project. with a Simple ATL object as a class to add User
definied Function to EXcel via C++.
Thats all not prob. evrithing works fine.
Thing is i need to include a managed class. First time i changed the project
to /clr and i got the error D8045. After a bit of googling i found out that i
needed to make the project no common language support and just my class where
the include is to a /clr.
All fine the compiler make my dll. my Functions works fine und excel. but
when i close Excel it crashes @ altbase.inl
@
ATLINLINE ATLAPI_(void) AtlCallTermFunc(_ATL_MODULE* pModule)
{
if (pModule == NULL)
_AtlRaiseException((DWORD)EXCEPTION_ACCESS_VIOLATION);
_ATL_TERMFUNC_ELEM* pElem = pModule->m_pTermFuncs;
_ATL_TERMFUNC_ELEM* pNext = NULL;
while (pElem != NULL)
{
pElem->pFunc(pElem->dw);
pNext = pElem->pNext;
delete pElem;
pElem = pNext;
}
pModule->m_pTermFuncs = NULL;
}
i removed the include so just compling with /clr same prob.
if i remove /clr all works fine.
any idea since i need to add a managed class
mny thnks