473,385 Members | 1,925 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,385 software developers and data experts.

How to write a managed wrapper class for a unmanagedDialog class in VC++?

I have a dialog application that is created using VC++ 6.0 and a Windows form application using .NET 2003. I'd like to access the Dialog from the form. I have tried every thing I know to write a wrapper class for the dialog class but failed. Would someone here help me out on this?
Thanks
Aug 23 '06 #1
1 1883
<2yuexuewrote in message news:%2****************@TK2MSFTNGP06.phx.gbl...
>I have a dialog application that is created using
VC++ 6.0 and a Windows form application using
.NET 2003. I'd like to access the Dialog from the
form. I have tried every thing I know to write a
wrapper class for the dialog class but failed.
Well, you don't say what you tried and how it failed.
Would someone here help me out on this?
Assuming that your resides in a DLL and exposes a flat interface, you have
at least three ways to go:

1) Use Platform/Invole aka P/Invoke aka P/Invoke to call from the managed
code to unmanaged code

http://msdn.microsoft.com/library/de...keexamples.asp

2) Use "It just works" aka IJW aka C++ interop in place of Platform/Invoke

http://msdn.microsoft.com/library/de...onServices.asp

3) Wrap up the native code into a COM object and use the framework's support
for COm

http://msdn.microsoft.com/library/de...cominterop.asp

Regards,
Will
Aug 23 '06 #2

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

Similar topics

2
by: Weston Fryatt | last post by:
(Sorry for spamming multiple groups, But I need a solution to this problem) I think this should be a simple question on Memory Allocation in a managed DLL and passing a memory pointer over to an...
1
by: Kieran Benton | last post by:
Hi, Sorry to be a pain in the neck managed vc++ newbie but Im having real problems working through this problem. Its been a few years since ive done any serious work in C++ and MFC and I cant seem...
4
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...
0
by: DotNetJunkies User | last post by:
Background: I am creating a VC++ .NET wrapper for a C++ DLL; the aim is to use this wrapper in C# as shown below: Range r = new Range( 2, 2 ); r = new Cell( “Hello Mum” ); Range is a...
4
by: devmentee | last post by:
I want to write a managed wrapper( kind of proxy) which will call into unmanaged C++ code. I've got a general idea and have read some articles on how to do it. But I cannot find any information on...
0
by: moniqui | last post by:
Bobby (or anyone else), I found a response that you had written to someone who is having the exact same problem that I am at the moment. I have an unmanaged C++ shared mfc extension dll, and I...
0
by: 2yuexue | last post by:
I have a dialog application that is created using VC++ 6.0 and a Windows form application using .NET 2003. I'd like to access the Dialog from the form. I have tried every thing I know to write a...
1
by: mschuck | last post by:
Here is the scenario I'm trying to make work. I've got 2 managed C++ classes, each of which wrappes an unmanaged C++ class, kind of like so: __nogc class UnmanagedClassA { public: void...
9
by: =?Utf-8?B?RWR3YXJkUw==?= | last post by:
I would greatly appreciate some help on passing managed object into unmanaged code. I need to pass a reference (address of) of a managed class into unmanaged code (written by a thrid party). The...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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
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
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.