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?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.
AVaulinAuthor Commented:
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.
PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.


Very original answer....thanks.
AVaulinAuthor Commented:
jhance said all I can...

I don't understand why you reject my answer.  There is NO such magic call to identify an ActiveX vs. non-ActiveX.  As I said, there are some clues that will lead you to an "informed decision" but being ActiveX vs. non-ActiveX is not clear cut.  

Also, I did explain what ActiveX and COM are.  It seems clear that you didn't even read my answer but just rejected it.

If you want help here on EE, it's important that you ask good questions and read and understand the answers.  If something is not clear, ask for an explanation.  Often the correct answer is "no it cannot be done".  Not all questions have a yes/no definitive answer either.  In this case, distinguishing ActiveX vs. COM is a shades of grey issue vs. yes/no.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AVaulinAuthor Commented:

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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.