• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 314
  • Last Modified:

Are there static functions in ATL/COM

Is it possible to have static methods declared and defined within an ATL object, so that VB client  won't have to create the object but call the method directly as I do within C++ MyClass::MyStaticMethod() without having to call 'new' on MyClass.

If there is, I would appreciate a link to an example
0
yossikally
Asked:
yossikally
1 Solution
 
multithreadingCommented:
Not via COM. It is an interface based calling protocol. Interfaces (by their very nature, being interfaces to -objects-, not interfaces to -classes-) have no static (class level) methods.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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