| Author |
Which version of a componente (OCX) am I executing?
|
|
| Igor Mendizabal 2004-09-28, 8:55 am |
| Good morning,
We're using "controls.add ComponentName" to load controls dinamically into
our application.
I'd like to know if it is possible to know which version of that component
we are loading.
Thank you very much
Igor Mendizabal
R.P.S.
| |
| Jeff Johnson [MVP: VB] 2004-09-28, 3:55 pm |
|
"Igor Mendizabal" <i.mendizabal@no_spam.rps.es> wrote in message
news:u$fi6KUpEHA.2304@TK2MSFTNGP14.phx.gbl...
> We're using "controls.add ComponentName" to load controls dinamically into
> our application.
>
> I'd like to know if it is possible to know which version of that component
> we are loading.
Unless the control was built to expose this information, you'd have to dig
into the registry to find the DLL (OCX) associated with "ComponentName" and
then use API calls to extract its version info.
| |
| Igor Mendizabal 2004-09-28, 3:55 pm |
| Thank you Jeff
That's what I was afraid I'd have to do. Anyway, is there a fast (direct)
way to dig into the registry and find that information, besides going
through all the CLSID branch checking all the ProgId's until matching one?
Which method does CreateObject() use to find the information needed?
Thanks
Igor
| |
| Jeff Johnson [MVP: VB] 2004-09-28, 3:55 pm |
|
"Igor Mendizabal" <i.mendizabal@no_spam.rps.es> wrote in message
news:u37BI4WpEHA.556@TK2MSFTNGP09.phx.gbl...
> That's what I was afraid I'd have to do. Anyway, is there a fast (direct)
> way to dig into the registry and find that information, besides going
> through all the CLSID branch checking all the ProgId's until matching one?
Oh, there's no need to do that. When you call RegOpenKey[Ex]() you pass the
name of the key you want. In your case (since you know the ProgID, right?)
it's simply "<ProgID>" (using the predefined HKEY_CLASSES_ROOT as the hKey).
Then from there you get the CLSID and find the InProcServer32 key.
| |
| Igor Mendizabal 2004-09-29, 3:55 am |
| Got it !!
Thank you
Igor
|
|
|
|