473,385 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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

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

--

"Paul Brun" <pb**********@pbrun.net> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
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 )
{
Nov 17 '05 #2
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

"Ted Miller" <te*@nwlink.com> wrote in message
news:10*************@corp.supernews.com...
Looks like you are somehow skipping the crt init. Are you statically linked to the crt lib and linked /noentry?

--

"Paul Brun" <pb**********@pbrun.net> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
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

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: David Sworder | last post by:
Hi, I've created a UserControl-derived class called MyUserControl that is able to persist and subsequently reload its state. It exposes two methods as follows: public void Serialize(Stream...
9
by: Steve Sargent | last post by:
Hi: I'm trying to debug the following code, and it keeps looping on the if statement: public static bool operator == (OnlineMemberNode first, OnlineMemberNode second) { if(first == null) {
4
by: rrober07 | last post by:
Hello, My Setup is I have a Web Server machine(Devweb01), Database SQL Machine(Devsql01), a Client Machine(local machine) I have configured the SQL machine as follows: 1) Added local Aspnet...
6
by: blash | last post by:
Can someone help me? I really don't have a clue. My company staff told me they often got such error: "Object reference not set to an instance of an object." when they are in search result page...
5
by: Matt | last post by:
Hi all, I'm having a very strange problem. The third line in the following code gives me a null reference exception when used in an ASP.Net web page. The code is called on the click of a...
18
by: Denis Petronenko | last post by:
Hello, in the following code i have segmentaion fault instead of exception. Why? What i must to do to catch exceptions in such situation? Used compiler: gcc version 3.3.6 (Debian 1:3.3.6-13) ...
2
by: Weeble | last post by:
Back in C++, I had a type that looked something like this (entering from memory so this might not quite compile): template <class T> class NotNull { private: T* value; public: NotNull(T*...
11
by: MikeT | last post by:
This may sound very elementary, but can you trap when your object is set to null within the object? I have created a class that registers an event from an object passed in the constructor. When...
76
by: valentin tihomirov | last post by:
As explained in "Using pointers vs. references" http://groups.google.ee/group/borland.public.delphi.objectpascal/browse_thread/thread/683c30f161fc1e9c/ab294c7b02e8faca#ab294c7b02e8faca , the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.