svkr2k
July 12th, 2005, 01:33 AM
Dear forum members,
I have an unmanaged dll (written in VC++ 6.0) that implements a class CUnmanaged. The class has the following constructor:
CUnmanaged::CUnmanaged( const std::string& filename )
{
/* ... */
}
I have a client application (written in VC++ .Net) that uses the above class dll as follows:
CUnmanaged* oserr = new CUnmanaged("error.out");
When the above line is executed, an assertion dialog is popped up:
"An unhandled exception of type 'System.NullReferenceException' occurred in MyUnmanaged.dll
Additional information: Object reference not set to an instance of an object."
Can anyone tell me what is wrong with the code ? and how to solve the problem ?
Thanks in advance.
-Rajesh.
I have an unmanaged dll (written in VC++ 6.0) that implements a class CUnmanaged. The class has the following constructor:
CUnmanaged::CUnmanaged( const std::string& filename )
{
/* ... */
}
I have a client application (written in VC++ .Net) that uses the above class dll as follows:
CUnmanaged* oserr = new CUnmanaged("error.out");
When the above line is executed, an assertion dialog is popped up:
"An unhandled exception of type 'System.NullReferenceException' occurred in MyUnmanaged.dll
Additional information: Object reference not set to an instance of an object."
Can anyone tell me what is wrong with the code ? and how to solve the problem ?
Thanks in advance.
-Rajesh.