Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / March 2004

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul Brun - 01 Mar 2004 20:58 GMT
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 )
   {
     .
     .
   }
.
.
.
}

The exception occurs within the "if" statement and I can't seem to step in any further.

Any ideas.....
Thanks
Paul
Ted Miller - 03 Mar 2004 05:25 GMT
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 )
   {
     .
     .
   }
.
.
.
}
The exception occurs within the "if" statement and I can't seem to step in
any further.
Any ideas.....
Thanks
Paul
Paul Brun - 04 Mar 2004 16:35 GMT
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

> Looks like you are somehow skipping the crt init. Are you statically linked
> to the crt lib and linked /noentry?
[quoted text clipped - 31 lines]
> Thanks
> Paul

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.