To utilize old MFC dll in WPF

B

blackbiscuit

Dear all,

Can I utilize old MFC DLL in my current WPF applications?

I have dozens of old MFC DLLs without .net support. How can I utilize
the classes defined in those DLLs?

In some tutorials, I see it needs to write a wrapper class in managed C
++. But if that is not allowed, what should I do to make use of those
old MFC DLLs, since sometimes there may be no source code kept for so
long a time?

Thank you very much!

Best,
Tony
 
I

Ignacio Machin ( .NET/ C# MVP )

Dear all,

Can I utilize old MFC DLL in my current WPF applications?

I have dozens of old MFC DLLs without .net support. How can I utilize
the classes defined in those DLLs?

In some tutorials, I see it needs to write a wrapper class in managed C
++. But if that is not allowed, what should I do to make use of those
old MFC DLLs, since sometimes there may be no source code kept for so
long a time?

Thank you very much!

Best,
Tony

Hi,

When you are trying to use unmanaged code you have two options based
on the code, if it's a COM object you can let the IDE create the
wrapper for you. It's by far the easiest solution as the code "look
like" regular .NET code. f not the case you can P/invoke them, usually
you create a class that wrap all the invocations and handle the
marshalling/conversion in case you need it
 
B

blackbiscuit

Hi,

When you are trying to use unmanaged code you have two options based
on the code, if it's a COM object you can let the IDE create the
wrapper for you. It's by far the easiest solution as the code "look
like" regular .NET code. f not the case you can P/invoke them, usually
you create a class that wrap all the invocations and handle the
marshalling/conversion in case you need it

Hi,

Thank you very much!

Best,
Tony
 
B

blackbiscuit

Hi,

When you are trying to use unmanaged code you have two options based
on the code, if it's a COM object you can let the IDE create the
wrapper for you. It's by far the easiest solution as the code "look
like" regular .NET code. f not the case you can P/invoke them, usually
you create a class that wrap all the invocations and handle the
marshalling/conversion in case you need it

Hi,

Thank you very much!

Best,
Tony
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top