473,407 Members | 2,315 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,407 software developers and data experts.

how to load c# dll into vc++

hello
i get some answers from previous messages but i am not able to get
proper idea in vc++ case. can u explain me proper. bye.
Nov 17 '05 #1
3 6990
Hi,

I would like to join question Kanaiya has asked. How can I call from
unmanaged (classic,mfc,etc.) a c# dll funcitons? Should I do COM/DCOM/.NET
dll? Easiest way? Is it possible at all?

Thanks,
Anton
"Kanaiya" <ka*************@hotmail.com> wrote in message
news:%2********************@TK2MSFTNGP09.phx.gbl.. .
hello
i get some answers from previous messages but i am not able to get proper idea in vc++ case. can u explain me proper. bye.

Nov 17 '05 #2
On Wed, 21 Jan 2004 11:04:10 +0530, Kanaiya wrote:
hello
i get some answers from previous messages but i am not able to get
proper idea in vc++ case. can u explain me proper. bye.


From Managed C++ you would just import your C# .dll like you do with the
<mscorlib.dll>. If you want to access the C# .dll's functionality from
non-managed code then you would need to expose the C# .dll to COM
through interop and access it in C++ like you would any other COM
object.

Tim
--
I only know as much about myself as my mind can work out under its
current conditions. And its current conditions are not good.
Nov 17 '05 #3
"Anton ml. Vahčič" <an**********@campus.fri.uni-lj.si> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
How can I call from
unmanaged (classic,mfc,etc.) a c# dll funcitons?
This is a C++ newsgroup so ...

I recommend this book for anyone trying to build an application using (some
dialect of) C++ in which native and managed code bases need to be able to
interoperate:

http://www.apress.com/book/bookDisplay.html?bID=61

Of all the the MS .Net languages, managed C++ is the only one which allows
you to mix mananged and unmanaged code in the same module. Now, since
Managed C++ is a .Net language, and since all .Net languages share the same
object model, you can write a managed C++ wrapper for your C# code. And
since unmanaged C++ code can call managed C++ code you can have a unmanaged
(possibly MFC) wrapper, too
Should I do COM/DCOM/.NET
dll? Easiest way? Is it possible at all?


Certainly possible. The way I described is useful in some situations. For
others it is more natural to view the C# class as a COM object and use
strictly COM techniques to make the call. Only you can know which method you
"should" use. After reading the book or other samples you will be able to
make an informed decision as to what fits your particular situation.

Regards,
Will
Nov 17 '05 #4

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

Similar topics

4
by: Seabass | last post by:
Hey all, I have come across the following issue. I have an application written with Borland C++ Builder, this application loads dlls(plug-ins) dynamically during run time. To make things easier...
1
by: Demian | last post by:
Hi, I developed an OCX in VC++, wich takes a VARIANT as parameter and return a Long as the result of the operation. This VARIANT cames from a client VB6.0 wich send an array of Byte as a VARIANT,...
1
by: Neil Alford | last post by:
I've got a project that has been developed in C++ using Visual Studio .NET Professional and I'm trying to load it into Visual C++ .NET Standard, however, although the main project workspace file...
3
by: Boris Kuznetsov | last post by:
Hey Gurus!!! Please help me to figure out how to work with images!!!! My project has to be accomplished in pure VC++ (not .NET), and I have ran into troubles doing that!!! Thank you for...
4
by: Scott Chang | last post by:
Hi all I copied the following VC++ 6.0 code (written by someone in the website) to my VC++ .Net 2002-Windows XP Pro PC ////****Solution 'dyndllclass' (2 projects)***/// ///***dynapp****(1st...
6
by: Steve | last post by:
I'm playing with late binding and trying a very simple test to load an assembly In my "Host" application I have this code: <code> string modulePath =...
0
by: discussionforum | last post by:
Hi Guys, Can any one help me how we can load VC++ DLL in Java only by using .h,.dll,.lib files. please mail me back if anybody have idea regarding this as soon as possible.
0
by: meenu | last post by:
HI All, I'm very new to C# and .Net programming. I'm trying to load a VC++ project programmatically. I came across VCProjectEngine interface. I tried using VCProjectEngine.LoadProject...
0
by: ppuniversal | last post by:
I am making a client server application in VC++ 2005. It compiles correctly with 0 errors. But when I execute the executable file say GridServer.exe, it gives the following error : The...
4
mathewphilipp
by: mathewphilipp | last post by:
Dear all, I have a VC# (winforms) application written in Visual studio 2003 with .Net framework 1.1, here I want to populate 6 listboxes with bulk amount of data ( Eg. combox A and B each with 20000...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...
0
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...
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
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...

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.