.NET Null Reference Exception in C library - I really need help....

  • Thread starter Thread starter Ted Miller
  • Start date Start date
T

Ted Miller

Looks like you are somehow skipping the crt init. Are you statically linked
to the crt lib and linked /noentry?

--

Hey guys,

I have narrowed down the location of the exception....it is occurring within
a method call within
the strtok function:

Within strtok.c, there is a call like the following:

_ptiddata ptd = _getptd();

then, within the _getptd() method (tidtable.c), we have this:

_ptiddata __cdecl _getptd (void)
{
_ptiddata ptd;
DWORD TL_LastError;

TL_LastError = GetLastError();
if ( (ptd = FLS_GETVALUE(__tlsindex)) == NULL )
{
 
I am linked with "/noentry" as per the discussion in the Mixed Mode DLL
problem. There appears to be
4 steps:
- link with "/noentry"
- link with msvcrt.lib
- remove nochkclr.obj from linker dependencies
- add __DllMainCRTStartup@12 to Force Symbol References

I am not sure I am staticly linked or not, but what I am doing is a .NET
Class Library and I know where
were issues with Mixed Mode DLL's with Managed C++.

thanks
Paul
 
Back
Top