You will wild find below all the lines of an example that reproduces the
error.
I use :
Visual Studio 2003 vers 7.1.3088
..NET Framework 1.1 vers 1.1.4322
I remember that i had encountered a problem for generating the dll with the
linker: The code line 'ce = new CEmbeded(); ' generated a link error :
error LNK2001: symbole externe non résolu "void * __cdecl operator
new(unsigned int)" (??2@$$FYAPAXI@Z)
To solve these error i just added the libc;lib in the dll project.I suppose
that my is at this level.
Thanks for helping
Pascal
// Il s'agit du fichier DLL principal.
#include "stdafx.h"
#include "TestEmbended.h"
#using <mscorlib.dll>
using namespace System;
namespace TestEmbended
{
public __gc class Class1
{
public:
__nogc class CEmbeded
{
public:
void toto()
{
};
};
CEmbeded *ce;
Class1(void)
{
ce = new CEmbeded(); // Exeption here
ce->toto();
};
};
}
"Ronald Laeremans [MSFT]" <ro*****@online.microsoft.com> a écrit dans le
message de news:uU**************@TK2MSFTNGP12.phx.gbl...
Could you post a full repro case (A something containing all the lines of
code needed to reproduce the problem plus the version of the compiler and
CLR you build it with)?
Thanks.
Ronald Laeremans
Visual C++ team
"Pascal Cloup" <pc****@biogesta.fr> wrote in message
news:ut**************@TK2MSFTNGP10.phx.gbl...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