c# - MFC Dll with COM Interface -


i pretty new managed/unmanaged interoperability , com concepts.

i received suggestion of using com interop, using existing mfc code in c#. problem me is, have mfc dll not valid com component. how can make mfc dlls have com-accessible interfaces ready use in .net?

from thread loading mfc dll in c# windows application

to access native code c# have few choices.

most directly, can use dllimportattribute describe dll's entry points in c# terms can called via p/invoke. they'll static methods c# program.

less directly, can create managed c++ assembly wraps dll in 1 or more managed objects. managed c++ dll can accessed c# via add reference (because managed assembly .dll extension) , should able access mfc dll using #include include mfc dll's header file.

a third option turn dll com object c# program can access way.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -