P
Pascal Cloup
Hello,
I encounter problems during execution of code like the followng that is part
of Dll of managed C++ classes.
When attempting to create the not managed objet (instance of CA) i always
get the exception:
.....System.NullReferenceException....
La référence d'objet n'est pas définie à une instance d'un objet ( after
translation: The reference of object is not defined to an instance of an
object)
Somone (from microsoft?) can explain this, or better, give the right method
to create such
unmaged object inside method of managed class?
Thanks for help,
Pascal Cloup
__nogc class CA : public IUnknown
{
public:
CA(void){}
// IUnknown methods.
.......
};
__gc class CB
{
public:
.....
CA __nogc *aCA;
CB(void)
{
aCA = __nogc new CA(); // THE PROBLEM IS HERE
}
....
}
....
I encounter problems during execution of code like the followng that is part
of Dll of managed C++ classes.
When attempting to create the not managed objet (instance of CA) i always
get the exception:
.....System.NullReferenceException....
La référence d'objet n'est pas définie à une instance d'un objet ( after
translation: The reference of object is not defined to an instance of an
object)
Somone (from microsoft?) can explain this, or better, give the right method
to create such
unmaged object inside method of managed class?
Thanks for help,
Pascal Cloup
__nogc class CA : public IUnknown
{
public:
CA(void){}
// IUnknown methods.
.......
};
__gc class CB
{
public:
.....
CA __nogc *aCA;
CB(void)
{
aCA = __nogc new CA(); // THE PROBLEM IS HERE
}
....
}
....