Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / COM / May 2007



Tip: Looking for answers? Try searching our database.

VB6 break COM compatibility

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Carlo - 15 May 2007 19:30 GMT
I recently started in a new position, and I inherited an application written
in VB6 that uses a bunch of DLLs and OCX controls. Version Compatibility is
set to Binary at the project level, but since I do not have the most recent
source code, on compilation it always asks me to break compatibility. The
app has been installed on half a dozen remote sites, and I am not sure what
all the different versions are. To clean up this mess, I decided to
recompile everything without any Compatibility settings. That works fine,
and tested it fine locally. There are no other apps that use these controls
or DLLs, so I think it's safe to redeploy this project without COM
Compatibility. However before I can reinstall this app on the remote sites I
guess I need to clean up all old OCX, DLLs and registry settings on those
boxes to make it work. Is there an easier way?
Brian Muth - 15 May 2007 20:12 GMT
>I recently started in a new position, and I inherited an application
>written in VB6 that uses a bunch of DLLs and OCX controls. Version
[quoted text clipped - 8 lines]
>remote sites I guess I need to clean up all old OCX, DLLs and registry
>settings on those boxes to make it work. Is there an easier way?

If you recompile without binary compatibility then new GUID's will be
generated for the VB6 objects. Clients that are expecting to use the old
GUID's are sure to break as a result.

Since the app has already been installed on a number of remote sites, go
fetch the old DLL from there and use that as a reference in order to
maintain binary compatibility.

Brian
Ken Halter - 15 May 2007 21:19 GMT
>I recently started in a new position, and I inherited an application
>written in VB6 that uses a bunch of DLLs and OCX controls. Version
[quoted text clipped - 8 lines]
>remote sites I guess I need to clean up all old OCX, DLLs and registry
>settings on those boxes to make it work. Is there an easier way?

Well, the house cleaning is fairly easy....

Register and unregister components with context menus
http://www.devx.com/vb2themax/Tip/18337

That should remove any left over reg keys pointing to the existing
components. Once the new components are there, double-click each one (or
select all and hit Enter) to re-register it. If it's an issue of you not
having physical access to these PCs, installsheild should be able to help
there... or even a simple batch file that unregisters the components,
optionally backs them up, copies and registers the new components, should do
it for you.

Just don't forget to reset Binary Compatibility, or you'll end up doing this
every time you compile, regardless if there are any changes or not.

Signature

Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
In Loving Memory - http://www.vbsight.com/Remembrance.htm

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.