Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Which version of a componente (OCX) am I executing?
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.



Report this thread to moderator Post Follow-up to this message
Old Post
Igor Mendizabal
09-28-04 01:55 PM


Re: Which version of a componente (OCX) am I executing?
"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.



Report this thread to moderator Post Follow-up to this message
Old Post
Jeff Johnson [MVP: VB]
09-28-04 08:55 PM


Re: Which version of a componente (OCX) am I executing?
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




Report this thread to moderator Post Follow-up to this message
Old Post
Igor Mendizabal
09-28-04 08:55 PM


Re: Which version of a componente (OCX) am I executing?
"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.



Report this thread to moderator Post Follow-up to this message
Old Post
Jeff Johnson [MVP: VB]
09-28-04 08:55 PM


Re: Which version of a componente (OCX) am I executing?
Got it !!

Thank you

Igor



Report this thread to moderator Post Follow-up to this message
Old Post
Igor Mendizabal
09-29-04 08:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Visual Basic archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:32 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.