473,495 Members | 2,021 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Wrapping unmanaged C++

Hello,

I have a huge set of unmanaged C++ classes, which I wrapped in managed C++.
Everything is in one assembly.
Using my wrapper in C# works fine.
However, when I would like to use the wrapper in managed C++ I get the
following warnings and errors:

warning C4945: 'MyType' : cannot import symbol from 'mydll.dll': as
'MyNamespace::MyType' has already been imported from another assembly
'mydll.dll'
stdafx.cpp(0) : see declaration of 'MyNamespace::MyType' first seen type is
used; re-order imported assemblies to use the current type

(Is this caused by forward declarations?)

And:

error C3635: 'MyUnmanagedNamespace::MyUnmanagedType': undefined native type
used in 'MyNamespace::MyType'; imported native types must be defined in the
importing source code
did you forget to include a header file?

My questions:

How can I solve these problems WITHOUT having to include my unmanaged header
files in the project that uses my assembly? I am not using any unmanaged
stuff, so why would I like to include anything?
I want to re-use the code at binary level only.

Greets,
Arthur

Jul 21 '05 #1
0 1298

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

Similar topics

4
4094
by: David Kantowitz | last post by:
I am trying to wrap a native-C++ DLL in managed C++, to use in a .NET project. The native code is compiled into a DLL, and I have created a .def file that exports the mangled names of the...
0
1161
by: Vinoth Kumar | last post by:
Hi I have created a unmanaged class in a header file UnManaged.h class UnManaged { UnManaged(){} ~UnManaged(){} void HelloWorld(){} };
0
1077
by: sklett | last post by:
I'm having a really hard time with wrapping an unmanaged class with a managed class, then calling that managed class from my C# code. I will show you the three pieces, then explain: --------...
2
5977
by: Paul Kenny | last post by:
Hi, I am trying to expose the functionality of an unmanaged C++ class to the other languages available in the .NET Framework. I have decided to do this by wrapping the unmanaged C++ class in a...
0
953
by: Roth | last post by:
I have an unmanaged C++ dll that exports 2 classes and a stl list. I've had no trouble writting wrapper classes around the two exported classes with managed C++, but one class wants a list of...
1
1109
by: roni | last post by:
hi. i have gc class written in manged c++ , some of his data members are __nogc pointers for arrays,structs.. and in that gc class methods i call to the unmaganged dll i wrap . my...
1
1513
by: jsroberts | last post by:
I have been desperately trying to solve a problem where I am wrapping an unmanaged dll with managed extensions for c++ and then calling the managed dll functions from C#. However, whenever I call...
5
1584
by: Lee Crabtree | last post by:
More fun wrapping unmanaged code... I have a class heirarchy that I need to expose to C#, so I need to wrap all the classes. That's not a big deal, except for the base class, which is abstract....
0
305
by: Arthur Roodenburg | last post by:
Hello, I have a huge set of unmanaged C++ classes, which I wrapped in managed C++. Everything is in one assembly. Using my wrapper in C# works fine. However, when I would like to use the...
0
7120
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
7196
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...
1
6878
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4583
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1405
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
286
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.