VB ActiveX and CLSID

I have a VB5 ActiveX DLL that uses it's own CLSID internally and supplies this to client applications via one of it's properties.

The problem is that everytime I make the DLL in VB, a new CLSID is generated and registered for the control.  Since I've been manually copying the CLSID into a string in the source for the control, when it's updated the code is wrong.  It's a catch-22 since when I update the code and rebuild, the CLSID is again updated....

An answer to any of the following would be helpful:

1) How can the control get it's own CLSID programatically and return it as a string through one of it's properties?

2) How can I stop VB5 from updating the CLSID when I make the DLL?

3) How can I manually set a CLSID instead of having VB make it's own.
LVL 32
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.

first.. compile and get one dll done.. copy it to a seperate directory

and then in the IDE goto

Project menu, Project Properties
choose Component Tab,

in the Version compatibility section, choose Binary Compatibility, and choose that newly created DLL by browsing from below,

now next time you create the dll, it will keep the interface IDs[CLSID] same.. but if u change any function parameters or so.. and if they are different from the previous dll, it'll break the binary compatiblity.. so u have to design ur dll carefully

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
jhanceAuthor Commented:
I never would have guessed that.  

I'm starting to remember why I hate VB.

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.