Seamless integration of code written in various languages

  • Thread starter Thread starter Lio
  • Start date Start date
L

Lio

Hi

I am writing a new project using C# in .NET platform.
My solution includes C# project and recently I added another project to this
solution, an MFC project that deals with Video Capture Librarys that cannot
be found in C#. I can compile the MFC project to DLL and use it in C#
project.
BUT... as I understand, .NET Framework supports integration of code in
variouse languages. I would like to ask for your help...
assume i have a whole project in C# and would like to use MFC objects I have
created for video capture. how can I use the MFC object via the C# GUI???

Thanks in Advance

Lio
 
Thanks a lot...

Since my UI is already written and also execute process on Bitmap objects I
prefer to stay with it. So, as i understand, the only option left is to
write the COM interface... I've never done it before :-) !!! and
recommended links ???

Thanks again

Lio
 
Thanks again...

I read your article and found it interesting and also implemented most of
it. I could build C# classes and use them with the #using
<ClassLibrary1.dll> and using namespace ClassLibrary1. so far so good. Now,
in my case, i need the oposite way, i need to use my Managed C++ classes (I
wrote my MFC classes as Managed calsses) in C#. I have created namespaces
for the C++ classes, but somehow when I build my C# application the compiler
cannot find the namespace and returnes:
G:\Tests\InteroperatedCode\ClassLibrary1\Class1.cs(3): The type or namespace
name 'TestVCapture' could not be found (are you missing a using directive or
an assembly reference?)...
any suggestions???

thanks again (you helped me a lot !!!)

Lio
 
Oren, I hope it is my last question... Now about the UI in MC++ (I am
completely new to MC++).
Well, as you suggested, i also checked the UI MC++. I opened a new project
MC++ Application and tried to add a form or a dialog. In you previouse email
you mentioned that in .NET platform, MC++ had the same GUI Designer as C#
and i tried to figure it out searching the web (codeproject) and the
documentation of microsoft. all i found is the ability to add MFC components
to the MC++ Project wrapping them with the Menaged keywords. but i could not
found the way to use the UI designer you have mentioned except writing its
code using the .NET libraries.

what did you mean? and how can i use it?

Lio
 
Lio said:
Oren, I hope it is my last question... Now about the UI in MC++ (I am
completely new to MC++).
Well, as you suggested, i also checked the UI MC++. I opened a new project
MC++ Application and tried to add a form or a dialog. In you previouse email
you mentioned that in .NET platform, MC++ had the same GUI Designer as C#
and i tried to figure it out searching the web (codeproject) and the
documentation of microsoft. all i found is the ability to add MFC components
to the MC++ Project wrapping them with the Menaged keywords. but i could not
found the way to use the UI designer you have mentioned except writing its
code using the .NET libraries.

Yes, I should have been more clear--in order to use the new GUI designers,
you need to be using the .NET libraries. For MFC/WTL/ATL apps, you still
need to use the old designers.

--Oren
 
Back
Top