I am using an ActiveX DLL developed by someone else (I guess, it's developed using Visual C++).
From VB5.0, I make a reference to it in the project and create objects using New Keyword. Everything works perfect.
However for some reason, I do not want to refer to it in the project but later on create the objects using CreateObject (don't bother suggesting it's better to refer to it in the project. I have to use the CreateObject, whatever the reason may be).
Now to use CreateObject I wanted the ProgId and tried to get it from running regedt32.exe. I see the following entries:
X.X, value data as X Class
-> CurVer, value data as X.X.1
X.X.1, value data as X Class
-> CLSID, value data A4A6..... so on specifying the class id.
Under HKEY_CLASSES_ROOT\CLSID\A4A6.... so on,
InProcServer32, value data as c:\winnt\system32\XXXXXX~1.DLL
ProgId, value data as X.X.1
Programmable, <value not set>
VersionIndependentProgID, value data X.X
I was in the impression that I can use VersionIndependentProgID. However in this case, if I use "X.X" as ProgId with CreateObject I am unable to create the object. It's as if it cannot find that ProgId. However, if I use "X.X.1" as ProId with CreateObject I am able to create the object and everything seems to work fine.
Isn't that .1 version information? Can anybody tell me why is this so? Should I be registering in any different way? Currently I am registering using the command,
regsvr32 /v "c:\winnt\system32\xxxxxxxxxx.dll"
(Tried withour /v as well)
Or is it anything to do with while compiling in VC++?
Could anyone detail me on this? Thank you and look forward to your answer.