How do I know which ocx is current using?

I have this two files for calendar control, first one is Version 11.0, second one is 8.0
"C:\Program Files\Microsoft Office\OFFICE11\MSCAL.OCX"
"C:\WINDOWS\system32\MSCAL.OCX"

How do I know when the program is running, which one is currently using?
LVL 9
william007Asked:
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.

Mark_FreeSoftwareCommented:

try to rename one (when the program runs) and if it is not possible than is that the one used...
0
Éric MoreauSenior .Net ConsultantCommented:
Hi william007,

if you open your project's source code and you go to Project->Components and select the calendar component, you will see the complete path of the used component.

You can also open the registry and search for mscal.ocx in InProcServer32 key.
   

Cheers!
0
william007Author Commented:
Hi,

>>if you open your project's source code and you go to Project->Components and select the calendar component, you will see the complete path of the used component.
Isn't there is a process like this
"go and get the guid as retrieved by the project references for this class, check the registry for the filename it is mapped to, open the file and call the internal CoCreateInstance of this class"
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_21652467.html (Accepted Answer)

Will the MSCAL.OCX Version 11 and MSCAL.OCX Version 8 contain the same GUID?
How we know their GUID?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Éric MoreauSenior .Net ConsultantCommented:
>>Will the MSCAL.OCX Version 11 and MSCAL.OCX Version 8 contain the same GUID?

I think so because I think they were set to "binary compatible".
0
Leo EikelmanDirector, IT and Business DevelopmentCommented:
I know it's stored in the registry somewhere.

I'm not exactly sure where though


anyone could expand on this?

Leo
0
william007Author Commented:
Hi, I have asked the related question here. (I know we can use a find in registry, enter the mscal.ocx file name, and we will finally reach a folder that using the GUID as its folder name, my objective here is to get the GUID without register it, thanks:))
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_21787383.html
0
Éric MoreauSenior .Net ConsultantCommented:
if you open your project's .vbp file, you will see is the class id.
0
danaseamanCommented:
To get the GUID of MsCal.Ocx without registering add a reference to "TypeLib Information" and use this code:
Option Explicit

    Private Sub Form_Load()
    Dim t As TypeLibInfo
    Set t = TLI.TypeLibInfoFromFile("mscal.ocx")
    MsgBox "GUID = " & t.Guid
End Sub

From there you can search the registry for this GUID under HKEY_CLASSES_ROOT\CLSID\ and find the default value. On my machine it is:
     (Default)     REGSZ      Calendar Control 11.0

This info ("Microsoft Office Access Calendar Control Version 11.0") is also available under Calendar AboutBox but I assume you are trying to get this info programmatically.


0

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
william007Author Commented:
Thanks, I have never noticed that About box until now. It is really the fastest way to know the version that we are using.
I have asked another relevant question here
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_21787857.html
0
william007Author Commented:
Thanks:-)
0
Mark_FreeSoftwareCommented:

happy coding, and thanx for the points!
0
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
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.