473,387 Members | 1,516 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.

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 4470
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 <MyCsharpAssembly.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*************@TK2MSFTNGP10.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:\Win32TestProg.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 <MyCsharpAssembly.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*************@TK2MSFTNGP10.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*******@discussions.microsoft.com> wrote in message
news:E9**********************************@microsof t.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:\Win32TestProg.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 <MyCsharpAssembly.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*************@TK2MSFTNGP10.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
by: Paul | last post by:
Hi all may I know how to use C# DLL inside my VC++ Project ? Thanks in advance.
2
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...
2
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...
11
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...
0
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...
4
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...
6
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
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...
2
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". ...
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: 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
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,...
0
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...

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.