473,698 Members | 2,796 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 7001
Hi,

I would like to join question Kanaiya has asked. How can I call from
unmanaged (classic,mfc,et c.) 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******** ************@TK 2MSFTNGP09.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**********@c ampus.fri.uni-lj.si> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
How can I call from
unmanaged (classic,mfc,et c.) 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
5632
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 for my users, I am trying to make it possible for them to create dlls in C++ Builder (which works great) and VC++. I tried to use the same code in VC++ builder, which compilled fine, but during runtime I came across a problem. First of all, this is...
1
4803
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, so acomplish Autonmation std. I need to access the array inside the variant to load an user-defined struct with it. To do this I used the myvariant->parray.pvData but it didn't work. It seems that the data wasn't there... I tried with...
1
1308
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 seems to load OK none of the projects within the workspace load, I get an error message that just tells me that they failed to load and thats it. I've checked the paths and the .vcproj files are all where it expects them to be and I've also...
3
5484
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 your advice!!! Mail to : doberman@nest.ntu-kpi.kiev.ua
4
5712
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 project)***// //----dynapp.cpp----/ #include <windows.h #include "dynclass.h int main ( void
6
44483
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 = @"C:\PMDRepository\Tools\ManfBusProcMgr\Modules\TestModule\bin\Debug\TestModule"; Assembly a = Assembly.Load(modulePath); </code>
0
1282
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
1190
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 to load a project of mine. The funtion succeeds and I also get a valid reference to the loaded project. However I dont find the project in the Solution Explorer. How do I make it appear in the SolutionExplorer? Is there any other method that I need...
0
1364
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 application has failed to start beacuse MSVCP80D.dll was not found. Reinstalling the application may fix this problem. Then I searched this file in the C:\Program Files\Visual Studio.... folder and got a file with this name. So I copied this file to...
4
1409
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 items , combobox C and D each with 4500 items , combox E and F each with 100 items). I am using a stored procedure here , Please see the following example ( other stored proceduers and code blocks are also same but having differnt names) it takes...
0
8683
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
8609
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
9031
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...
1
8901
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8871
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...
0
5862
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
4371
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...
0
4622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2336
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.