473,385 Members | 1,465 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 1882
<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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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...
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...

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.