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

Exported C++ class

Hi,

I have a DLL that has a C++ class exported. Is there any way that I can
use this class in a C# program? I know about the COM interop but this class
isn't a COM class. I also know about accessing functions in DLLs using the
DllImport attribute but I don't think that imports classes (or does it??).
Any help will be appreciated. Thanks!

Gene
Aug 10 '05 #1
2 1179
Gene,
I have a DLL that has a C++ class exported. Is there any way that I can
use this class in a C# program?


Not directly no. The easiest way to do it would be to write a COM or
managed wrapper in C++.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Aug 11 '05 #2
Thanks!

"Mattias Sjögren" <ma********************@mvps.org> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Gene,
I have a DLL that has a C++ class exported. Is there any way that I
can
use this class in a C# program?


Not directly no. The easiest way to do it would be to write a COM or
managed wrapper in C++.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Aug 11 '05 #3

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

Similar topics

6
by: Mayer | last post by:
Hello: Is there a way to see at the python prompt the names of all the public methods of a class or the names exported by a module? I know that GUI-based IDEs have a nifty way of displaying...
1
by: Ingo Nolden | last post by:
Hi there, following example: class __declspec( dllexport ) Example { public: // ... some public funcs
1
by: vijay | last post by:
I'm having trouble with calling an exported function in a native DLL compiled with eMbedded Visual C++ using C#. Basicly, I have one exported function in the DLL: whenever i execute this exe to...
2
by: Rookie | last post by:
Hi, I have a DLL written in VC++ which exports a class. I want to import this class into a C# application and be able to instantiate it in the C# code. Is it possible to do this? If yes, is...
4
by: mccoyn | last post by:
I have a class exported in a dll that has member variables I wish to access. When I do it I get an error C2039: 'myVar' : is not a member of myClass Here is an example of what my code looks like...
2
by: Gene Daniel | last post by:
Hi, I have a DLL that has a C++ class exported. Is there any way that I can use this class in a C# program? I know about the COM interop but this class isn't a COM class. I also know about...
1
by: amitdedhia | last post by:
Hi I am migrating a product code (originally written in VS2003) to VS2005. The application is written in VC++ (using MFC) and has mix of managed and unmanaged classes. It is a desktop based...
18
by: ciccio | last post by:
Hi all, The intel c++ compiler supports exported templates but I was wondering a bit about their used syntax. If I compare the syntax written in strostroup's book then there is a difference. ...
4
by: =?Utf-8?B?SmVzc2ljYQ==?= | last post by:
Hi All, I know that I can use the GetProcAddress to get the proc address of a global exported function from a WIn32 dll. But if I have an exported class in the dll, is there a way to...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.