Link to home
Start Free TrialLog in
Avatar of AVaulin
AVaulinFlag for Ukraine

asked on

COM or ActiveX

I have CLSID. Is there API function which lets me know if this is COM or ActiveX? In other words: has it GUI presentation or not?
Avatar of jhance
jhance

ActiveX is COM but COM is not necessarily ActiveX.  COM is the underlying technology upon which ActiveX as well as other things like OLE are built.  As such, you cannot tell from the CLSID what kind of thing (if anything) a CLSID refers to.  A CLSID is just a number and can be used for anything.  

Your question asks about a GUI and there is NO requirement for an ActiveX control to have UI.

If, however, you use the CLSID to get the IUnknown to a COM object, then you can use QueryInterface() to hazard a guess if it's ActiveX or not.  The problem is that there are a LOT of things that make a COM object ActiveX and checking for all of them can take all day.  If it has an IDispatch interface, then it's likely an ActiveX control of some sort.  One indicator of an ActiveX control with a GUI is the IOleObject interface.  The problem is that there are many other possibilities.
Avatar of AVaulin

ASKER

I wait for answer like: OleCreate API function returns E_NOINTERFACE result is case GUI absence (perhaps). But I wait no for explanation what a difference between COM and ActiveX.
>>I wait for answer like: OleCreate API function returns E_NOINTERFACE result is case GUI absence (perhaps).

No such function exists which can tell you if a ActiveX control has a GUI object, creates a GUI Object, or manipulates a GUI Object.

>>But I wait no for explanation what a difference between COM and ActiveX.

It is my impression that you can in fact benefit from an explanation of the difference between ActiveX and COM since the wording of your question betrays your ignorance.
PinTail,

Very original answer....thanks.
Avatar of AVaulin

ASKER

jhance said all I can...
ASKER CERTIFIED SOLUTION
Avatar of jhance
jhance

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AVaulin

ASKER

jhance,

Excuse me if I offended you. I did not want. I know EE rules. Look at my profile - I'm not a novice here :)

Not clear question formulation was my mistake.