B
Ben Schwehn
Hello
I have a mixed mode c++ dll that i want to use from a c# project.
However, I get an debug assertion when the dll is loaded. The assertion
is in line 1301 in dbgheap.c in the function
extern "C" _CRTIMP size_t __cdecl _msize_dbg
it checks for pUserData not being NULL and pUserData is NULL.
The function is called from
_onexit_t __cdecl __dllonexit
in onexit.c:247 which itself is called by _initterm in my dll module.
the problem seems to be that the parameter pbegin in the __dllonext
points to a NULL value.
The comments in onexit.c say that "void (***pbegin)() - pointer to
variable pointing to the beginning of list of functions to execute on
detach"
I have not defined a function to be called on detach and in fact have
not defined any dll specific function like an entrypoint since normally
the VS Compiler did all the magic itself.
I've created the Project in Visual C++ Express Beta1 by using the
Project Wizard and then added some native c++ files and also implemented
some managed Types. I've created mixed mode dlls in this way before and
it worked fine.
Any suggestions anyone?
Thanks
Ben
I have a mixed mode c++ dll that i want to use from a c# project.
However, I get an debug assertion when the dll is loaded. The assertion
is in line 1301 in dbgheap.c in the function
extern "C" _CRTIMP size_t __cdecl _msize_dbg
it checks for pUserData not being NULL and pUserData is NULL.
The function is called from
_onexit_t __cdecl __dllonexit
in onexit.c:247 which itself is called by _initterm in my dll module.
the problem seems to be that the parameter pbegin in the __dllonext
points to a NULL value.
The comments in onexit.c say that "void (***pbegin)() - pointer to
variable pointing to the beginning of list of functions to execute on
detach"
I have not defined a function to be called on detach and in fact have
not defined any dll specific function like an entrypoint since normally
the VS Compiler did all the magic itself.
I've created the Project in Visual C++ Express Beta1 by using the
Project Wizard and then added some native c++ files and also implemented
some managed Types. I've created mixed mode dlls in this way before and
it worked fine.
Any suggestions anyone?
Thanks
Ben