Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating .EXE and .DLL. Binary Problem

Status
Not open for further replies.

faztech

Programmer
May 21, 2001
22
AU
Hi,
I am currently creating an advanced booking system for a backpacking hostel. I am using VB6 with an Access back end. I am using dll's but I am having troubles creating the executable for the project and also creating the dll themseleves. When I try to create a .dll from the class or try to create the executable I keep getting an error message saying "cannot make dll since it doesn't have a binary compatibility set". I was wondering if anyone out there knew what this meant and secondly how to fix it.

Thanks for you help

Faztech
:)
 
It seems to be telling you to go to the Project menu, pick the Project Properties option, and in the dialog look for the Component tab or whatever (this machine has VB5 on it, can't remember what VB6 puts this option on right now).

On that part of the dialog (or somewhere there) you should see radio buttons for version compatability. You probably have "project compatability" or something. Select "binary compatability" and you should be on your way.
 
faztech -

Are you using MTS/COM+? If so, whenever you build a DLL that contains any classes with their MTSTransactionMode set to something other than "0 - Not An MTS Object", it requires you to set binary compatability.

What binary compatability means is that the public interface to the class will stay the same from version to version. That way other COM objects (like MTS) can call it and be assured that the parameters they pass to the methods will still line up. As soon as you change one of the public methods (change the datatype on a parameter, remove a method, remove a parameter, etc), compatability gets broken. It's OK to add new methods, but you can't touch existing methods. Once it's broken, as far as COM is concerned, it's a new object. And since it's a new object, MTS/COM+ will not be able to find it. Thus the requirement for COM+ classes to have binary compatability set.

If you're not using MTS at all, go through your project and make sure the MTSTransactionMode is set to 0 on all your classes. You can probably leave compatability set to "Project", unless you're doing some advanced stuff like developing your own interfaces.

Chip H.


 
Thanks guys. Dilettante I did what you said and it started to work but I have not quit finished yet so I will have to stay on project compatability. Chip H i am using Com so I will stay on Project Combatibility and when I am ready to Pack it up I will switch to binary compatibility(as dilettante stated). Is this correct?
Thanks again for your help

Faztech FAZTECH
:p
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top