Can a static .Net class or method be called from COM?

Hello,

I have a C++ Com app that accesses some C# code through a Com Callable Wrapper.  Currently all of the public methods needed by the C++ are also declared in interfaces so that they can be seen from the C++.  This is all fine.  The problem is that I would like to have a static class (or method if needed) that I want to access from the C++.  I cannot declare these static classes or methods in an interface because they do not allow the static keyword.  Will this static class still be accessible from the C++ code, or am I going to have to choose to have the C# stuff not be static?

Thanks,
Tim
LVL 4
Tim_HeldbergAsked:
Who is Participating?
 
dstanley9Connect With a Mentor Commented:
COM does not support static methods

http://msdn2.microsoft.com/en-us/ms182198.aspx

So you're going to have to make it non-static.
0
All Courses

From novice to tech pro — start learning today.