AnsweredAssumed Answered

vrf ActiveX Helper: Finding the ProgID

Question asked by VRFuser on Jun 24, 2003

> because the documentation blows chunks

I *most* heartily agree my friend. And that's when you can even *find* the
dox. Say, speaking of that, does VEE 6 launch .chm files correctly or is
that still broken? Select an ActiveX class or function or property in the
Function & Object browser & click help. Does it still say "suchandsuch is
not a Windows help file" ?

> (and I don't have your apparent
> intimate knowledge of the Windows
> underworld)

I've been programming Windows since shortly after version 3 came out. I'm a
Windows programmer who just happened to land in Test Engineering, not a Test
Engineer. That's my partner's job (I work for a *very* small company).

> I just want to know how you find the
> time to come up with all of this
> wonderful stuff!

After Stargate and before the sun comes up

> does any language that uses ActiveX use ProgID's?

They all should definitely be capable of doing so, so I'll say yes. It's
central to the idea of identifying a particular IDispatch interface for the
purpose of utilizing the functions and data accessible via that IDispatch

ActiveX might be said to be "native" to Visual Basic, though that's kind of
a leap. Any language that supports ActiveX usually uses Visual Basic
Scripting (VBS) or something like it to deal with it (as VEE does - I've
called it VEEScript but I don't know what Agilent calls it. It's the
language you use in in Formula objects). The final answer is yes. JScript
does, Windows Script Host does and Java itself does. As far as compilers go,
they usually don't have the concept "built in" as it's rather abstract (not
to mention the fact that if you're using a compiler, a better option is to
make use of the larger COM part of an ActiveX "dual interface" control).

Way back in the mists of time (oh, about 10 years ago), VBXs (Visual Basic
Extensions - which were then trying to get to be known as "OLE Controls")
merged with the then-emerging concept of COM. ActiveX means more than just
controls and libraries that are enabled to be used by languages that can't
deal with a function pointer, but it still means much, much less than the
larger idea of COM.

In the underlying COM API, the mother-of-all-COM function, CoCreateInstance,
takes a CLSID (class object id) and an IID (interface id). The users of
ActiveX (those who use ActiveX containers such as VEE for instance - us,
that is) are only exposed to an interface called IDispatch so that part of
the creation call is already taken care of. The COM API provides a function
called CLSIDFromProgID to get a CLSID, so you can see that even at the
lowest level of COM the ProgID is taken quite seriously.

What I posted was in fact a modified version of something I call "VCom1 -
COM: CLSIDs, IIDs and ProgIDs for VEE". And I see I left a whole bunch of
unnecessary API definitions in it. Everything in kernel32 and ole32 can be
taken out. The only thing GetProgId needs is advapi32. In particular, in the
function LoadLibs, Lib2 and Lib3 aren't necessary. One of these days I'll
finish the whole VCOM series and everybody can explore the wonders of COM

> when I contacted the vendor of the
> aforementioned ActiveX Server, they
> didn't seem to know what I was talking
> about

I hear ya. I don't want to say that help desks are useless, but they're
staffed by people who know little to nothing about programming. All they do
is digest the FAQs for you. The secret is talking to a programmer at the
company. They'll immediately know what a ProgID is. They also probably will
never have heard of VEE, but if you tell them you don't have either the
Nothing or New keywords and can't do With blocks or For Each loops, they'll
probably get the picture.

You are currently subscribed to vrf as:
To subscribe send a blank email to "".
To unsubscribe send a blank email to "".
To send messages to this mailing list,  email "". 
If you need help with the mailing list send a message to "".