Code Comments
Programming Forum and web based access to our favorite programming groups.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.
Post Follow-up to this message"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.
Post Follow-up to this messageThank 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
Post Follow-up to this message"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.
Post Follow-up to this messageGot it !! Thank you Igor
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.