P
Peter Foot [MVP]
You can P/Invoke to C++ functions with decorated names only if they are
static functions, if they are instance members you can't, because
instantiating a C++ class from managed code is not possible.
If the functions are static, your only hurdle is to include the EntryPoint
property of the DllImport attribute to the full mangled name of the method /
or the numeric ordinal - you can use dumpbin or depends to find out this
information.
You could write a native C++ dll which would expose a single method which
created the class, called the method and then called the destructor, you can
then P/Invoke this from managed code.
Peter
--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org
Do have an opinion on the effectiveness of Microsoft Windows Mobile and
Embedded newsgroups? Let us know!
https://www.windowsembeddedeval.com/community/newsgroups
static functions, if they are instance members you can't, because
instantiating a C++ class from managed code is not possible.
If the functions are static, your only hurdle is to include the EntryPoint
property of the DllImport attribute to the full mangled name of the method /
or the numeric ordinal - you can use dumpbin or depends to find out this
information.
You could write a native C++ dll which would expose a single method which
created the class, called the method and then called the destructor, you can
then P/Invoke this from managed code.
Peter
--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org
Do have an opinion on the effectiveness of Microsoft Windows Mobile and
Embedded newsgroups? Let us know!
https://www.windowsembeddedeval.com/community/newsgroups