Hi,
What is the best case for accessing managed code from unmanaged C++ code,
considering that the unmanaged code doesn't have managed extension?
Please reply.
Thanks in advance.
Regards,
Hyun-jik Bae 4 1262
"Bae,Hyun-jik" <im***@NOSPAM.p aran.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. .. Hi,
What is the best case for accessing managed code from unmanaged C++ code, considering that the unmanaged code doesn't have managed extension?
See the CLR hosting APIs.
See http://msdn.microsoft.com/msdnmag/is...r/default.aspx, for
example.
Using Managed Extensions is a far better choice in most cases.
-cd
In addition to that, you can also use pointers to managed functions with
unmanaged calling conventions.
A standard case of this is virtual functions of native classes implemented
in managed code. Other cases exist as well.
Marcus Heege
"Nishant Sivakumar" <ni**@nospam.as ianetindia.com> wrote in message
news:Ox******** ******@TK2MSFTN GP15.phx.gbl... In addition to Carl's suggestions, you could also look at CCW.
-- Regards, Nish [VC++ MVP] http://www.voidnish.com http://blog.voidnish.com
Marcus Heege wrote: In addition to that, you can also use pointers to managed functions with unmanaged calling conventions.
A standard case of this is virtual functions of native classes implemented in managed code. Other cases exist as well.
.... but only through the use of Managed Extensions for C++, which the OP
specifically didn't want to use.
-cd This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Bruce Farmer |
last post by:
I am having problems accessing a managed object from
unmanaged code. Specifically, I have a .NET forms
application with a web service proxy. The forms
application links to an unmanaged DLL which uses callbacks
to receive data via TCP. The data received in the
callback must be passed to a web service via a web method
provided by the proxy. So the callback (which is
unmanaged code) needs to access the proxy (managed object)
to send the...
|
by: lester |
last post by:
a pre-beginner's question:
what is the pros and cons of .net, compared to ++
I am wondering what can I get if I continue to learn C# after I have learned
C --> C++ --> C# ??
I think there must be many know the answer here.
thanks
|
by: Alper AKCAYOZ |
last post by:
Hello Esteemed Developers and Experts,
I have been using Microsoft Visual C++ .NET for 1 year. During this time,
I have searhed some topics over internets. Most of the topics about .NET is
related to C# and Visual Basic .NET. There are less documents about Visual
C++ .NET or Managed C++.
I wonder the reasons of below questions:
1) Is C# more powerful than Managed C++ and Visual C++ .NET?
2) Is Microsoft intending to support C# and...
|
by: SailFL |
last post by:
I have read threads here and there and I have looked at MS but I can not get
a clear understanding of what .Net acutally is. I understand that C++ and Vb
and other languages are being out a .Net. I get some idea that it still is
OOP. I think it has different ways of managing the code. But what is it?
Thanks
--
SailFL
|
by: 0to60 |
last post by:
I'm trying to create a .dll with VS.NET 2003 Architect that contains a math
computational component. I need the guts of the thing to be in native code,
as performance is key for that part. But, I need a .net wrapper because
this "calculator" is actually a component used by an enterprise app written
entirely in .net.
What I want to do is have one project. I've created an MC++ .dll project.
Its got a __gc class (the wrapper) and a...
| |
by: Rachel Suddeth |
last post by:
What is the difference between a managed/unmanaged resource, and how do you
tell which is which? I'm trying to understand how to write some Dispose()
methods, and we are supposed to put code that deals with managed in one
place, and code that deals with unmanaged in another place, but I can't seem
to find anything that clearly explains what that means.
I think if I used a Windows API function to optain a handle, that handle
would be an...
|
by: Dave |
last post by:
I've seen at least one article on this: How to access classes, etc.
managed-to-unmanaged. I can't find it. Any tricks or pointers?
I guess the class name won't get munged but I'm not clear about
necessary class declarations.
|
by: Mau |
last post by:
Hi,
I have a managed dll which I am accessing from an unmanaged exe using Com Interop. I installed everything on computer 1 and run the unmanaged exe and from exe called my managed dll and everything works fine. Now from a second machine 2 on same network, I called this exe from Computer 1. Unmanaged exe run properly but when I called my managed dll, get error "OLE error 8013150A, ClassID: 4AD092B-26F2-4598-9B7B-A4654C9ACB76". But if I copy...
|
by: =?Utf-8?B?VGltIE1hcnNkZW4=?= |
last post by:
Hi,
I am after suggestions on the best practice declaring and destroying objects.
some example code:
Private Sub MySub
Dim frmMyForm As MyForm
Try
|
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,...
|
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...
| |
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...
|
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,...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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();...
|
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...
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |