DirectAnim
Programmer
Hello everyone.
I have a managed executable and an unmanged library combination, and I've spent the past couple of hours trying to track down a bug in the system. Finally, I think I may have discovered what it is.
I have some global variables in my static library, and it would appear that when the global variables are being initialized, the CRT itself is in fact not initialized. I'm trying to figure out what's going wrong with it, but I'm not having much luck.
All I have is a global instance of a particular class. The __onexitbegin and __onexitend global pointers are NULL when the call to "_onexit" is made by the global variable construction code. As __onexitbegin and __onexitend are globals and therefore defined in segment space, it explains the reason that they're null-initialized. It's for this reason that I've come to the conclusion that the CRT for that context must not be initialized.
Any ideas? Should I just move the entire thing to a dynamic linking library? That's really something I wanted to avoid if possible.
I have a managed executable and an unmanged library combination, and I've spent the past couple of hours trying to track down a bug in the system. Finally, I think I may have discovered what it is.
I have some global variables in my static library, and it would appear that when the global variables are being initialized, the CRT itself is in fact not initialized. I'm trying to figure out what's going wrong with it, but I'm not having much luck.
All I have is a global instance of a particular class. The __onexitbegin and __onexitend global pointers are NULL when the call to "_onexit" is made by the global variable construction code. As __onexitbegin and __onexitend are globals and therefore defined in segment space, it explains the reason that they're null-initialized. It's for this reason that I've come to the conclusion that the CRT for that context must not be initialized.
Any ideas? Should I just move the entire thing to a dynamic linking library? That's really something I wanted to avoid if possible.