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
>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/default.asp?url=/library/en-us/cpguide/html/cp
conplatforminvokeexamples.asp
2) Use "It just works" aka IJW aka C++ interop in place of Platform/Invoke
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmxspec/html/v
cmg_PlatformInvocationServices.asp
3) Wrap up the native code into a COM object and use the framework's support
for COm
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cp
conadvancedcominterop.asp
Regards,
Will