473,807 Members | 2,884 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to use vc# dll into vc++ project

how to use c# dll into visual c++ project.


With regards,

Gangani Kanaiya.
Nov 15 '05 #1
3 4484
HI Kanaiya,

Is the VC++ project, a managed extensions project or
an unmanaged VC++ project ?.
For the former, you can use the #using directive to reference any
managed assemblies.
#using <MyCsharpAssemb ly.dll>
For the latter, you can expose your managed types via COM Interop
(generate a tlb via Regasm/tlbexp), and then consume the typelibrary
from your unmanaged VC++ COM-aware client.

Regards,
Aravind C
"Kanaiya" <ka************ *@hotmail.com> wrote in message
news:uN******** *****@TK2MSFTNG P10.phx.gbl...
how to use c# dll into visual c++ project.


With regards,

Gangani Kanaiya.

Nov 15 '05 #2
Hi

I was trying to use my C# DLL inside my Visual c++ Project. I followed your instruction with #using <mydll.dll>

However, it reports ..
c:\Win32TestPro g.cpp(5): fatal error C1190: managed targeted code requires '#using <mscorlib.dll >' and '/clr' optio

Please advice

Thank

----- Aravind C wrote: ----

HI Kanaiya

Is the VC++ project, a managed extensions project o
an unmanaged VC++ project ?
For the former, you can use the #using directive to reference an
managed assemblies
#using <MyCsharpAssemb ly.dll
For the latter, you can expose your managed types via COM Intero
(generate a tlb via Regasm/tlbexp), and then consume the typelibrar
from your unmanaged VC++ COM-aware client

Regards
Aravind
"Kanaiya" <ka************ *@hotmail.com> wrote in messag
news:uN******** *****@TK2MSFTNG P10.phx.gbl..
how to use c# dll into visual c++ project
> With regards

Gangani Kanaiya

Nov 15 '05 #3
Are you trying to compile a clr compliant executable with your VC++ project
or not?

"Paul" <an*******@disc ussions.microso ft.com> wrote in message
news:E9******** *************** ***********@mic rosoft.com...
Hi,

I was trying to use my C# DLL inside my Visual c++ Project. I followed your instruction with #using <mydll.dll>.
However, it reports ...
c:\Win32TestPro g.cpp(5): fatal error C1190: managed targeted code requires '#using <mscorlib.dll >' and '/clr' option
Please advice.

Thanks

----- Aravind C wrote: -----

HI Kanaiya,

Is the VC++ project, a managed extensions project or
an unmanaged VC++ project ?.
For the former, you can use the #using directive to reference any
managed assemblies.
#using <MyCsharpAssemb ly.dll>
For the latter, you can expose your managed types via COM Interop
(generate a tlb via Regasm/tlbexp), and then consume the typelibrary
from your unmanaged VC++ COM-aware client.

Regards,
Aravind C
"Kanaiya" <ka************ *@hotmail.com> wrote in message
news:uN******** *****@TK2MSFTNG P10.phx.gbl...
> how to use c# dll into visual c++ project.
>>>>> With regards,
>> Gangani Kanaiya.
>>

Nov 15 '05 #4

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

Similar topics

8
19901
by: Paul | last post by:
Hi all may I know how to use C# DLL inside my VC++ Project ? Thanks in advance.
2
6651
by: Paolo | last post by:
I imported a VC++6.0 project into VC++7.1. The conversion operation makes a mess with Preprocessor Definitions, adding a "$(NoInherit)" for each file. For example: I had a DLL project in VC++6.0 where the definitions were: _UNICODE,_DEBUG,_WIN32_DCOM,WIN32,_WINDOWS,_WINDLL,_AFXDLL,_USRDLL In VC++7.1, these are the preprocessor definitions of the project (right-click the project in Solution Explorer and choose Properties -> C++ ->...
2
1101
by: kalyan. | last post by:
hello, i am working on WMA SDK. i got the SDK from Microsoft under source development agreement . The SDK has the project of WMA 9.1 built in VC 7.1 As i dont have VC 7 i found a tool to convert the project to VC 6. now that project has some errors , is it bcoz of building the project in VC 6.
11
2210
by: Dr. Zharkov | last post by:
We want to export myArrayVB (2000, 2) of VB .NET 2003 in myArrayVó of VC++ .NET 2003 on scheme "component - client". But there is an error. For development of a component in VB .NET 2003 we make: File, New, Project, Visual Basic Projects, Class Library, name of project: ComponentVB. We write the code: Public Function myFunction1(ByVal N_i As Integer, _
0
1819
by: parekh | last post by:
Hi All , I am facing a problem wherein my VB project is not recognizing a change in the argument list of a method ( the method itself being declared and defined in another VC++ project and it is now updated to accept one more additional argument ). The problem in detail is as follows: I have a Class (named Student ) in an existing VC++ project. One of its Methods has the following signature and accepts 2 arguments ...
4
6254
by: nmrcarl | last post by:
I'm trying to upgrade a large project from VS 6.0 to VS 2005. After fixing a lot of things that changed (mostly sloppy coding in the original project that VS2005 didn't allow), I got the release version to build successfully. Unfortunately, it crashes right away when I start it. So now I need to build the debug version. Unfortunately, the compiler gives innumerable error messages of the sort shown below. The #include file referenced...
6
2826
by: =?Utf-8?B?S3VlaXNoaW9uZyBUdQ==?= | last post by:
Is there a way to convert a VC++ MFC project into a VC++ .NET project? If yes, how do I do it?
7
8457
by: Norman Diamond | last post by:
A project depends on VC runtime from Visual Studio 2005 SP1, and DotNet Framework 2. Options are set in the setup project properties, so if these two dependencies are not already installed then this installer will install them. But what about the situation where VC runtime has already been installed? In fact it's been installed twice. Although the project was built on a Windows XP system with Visual Studio 2005 SP1 and the results were...
2
2642
by: NvrBst | last post by:
I'm not too much of a C++ programmer but I have a bunch of C programs (they compile with GNU) and want to get them to compile in VC++ 2008. In Unix I go "./configure" and it makes a "Makefile". I then do "make" and when thats done I do "make install". Is there some way to easily get this type of project working in VC++ 2008? I do "New Project From Exsisting Code Use VIsual Studio: Console application". And I give it the Include...
0
9720
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9599
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10626
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10372
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10112
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7650
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6879
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5546
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3854
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.