473,387 Members | 1,493 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,387 software developers and data experts.

Fw: URGENT Mixing Managed/unmanaged C++

Dear Ronald,

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


Nov 17 '05 #1
0 856

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

Similar topics

0
by: kaalus | last post by:
Hello I have problem mixing managed and unmanaged C++ code in VS.NET 2003. I want to create a windows forms application which uses some C++ code that is incompatible with managed extensions...
0
by: kaalus | last post by:
Hello I have problem mixing managed and unmanaged C++ code in VS.NET 2003. I want to create a windows forms application which uses some C++ code that is incompatible with managed extensions...
3
by: frank | last post by:
Hi I've got aplication, which one is written in unmanaged c++ with stl, i've made for it gui in managed c++. Problem becomes when I'm starting to filling up for example datagrids, when I'm...
3
by: frank | last post by:
Hi I've got aplication, which one is written in unmanaged c++ with stl, i've made for it gui in managed c++. Problem becomes when I'm starting to filling up for example datagrids, when I'm...
2
by: Jon Slaughter | last post by:
How difficult is it for one to integrate unmanaged C++ into C#? I know for functions one can use DLLimport but how does one go about doing it for classes? Do I have to completely reimplement the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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,...

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.