Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 245
  • Last Modified:

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
0
Tim_Heldberg
Asked:
Tim_Heldberg
1 Solution
 
dstanley9Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now