Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2006-06-23
1
Medium Priority
?
243 Views
Last Modified: 2010-04-16
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
Comment
Question by:Tim_Heldberg
1 Comment
 
LVL 25

Accepted Solution

by:
dstanley9 earned 2000 total points
ID: 16972252
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

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question