Solved

Build ActiveX DLL

Posted on 2002-04-09
3
148 Views
Last Modified: 2010-05-02
Hi,

I have built serveral actviex dll files, they are called first.dll, second.dll, third.dll.

first.dll will be uesd by both second.dll and third.dll.

I found if I made some code modification at first.dll and rebuitl it.

I also need to rebuilt the second.dll and third.dll.
But the input arguments and output arguments at each method of first.dll remain the same.

Why do I need to rebuild second.dll & third.dll also in order to use the second.dll and third.dll at my executable application?

Thanks!

0
Comment
Question by:DoraMeMe
3 Comments
 
LVL 28

Expert Comment

by:AzraSound
ID: 6930448
Does first.dll have its compatibility set for binary compatibility?
0
 
LVL 2

Expert Comment

by:ronenr
ID: 6930595
When you create an activeX DLL it is assigned to it a special ID (GUID), each time that you compile without binary compitability a new ID is created, for this reason you have to compile again every project that has a reference to your ActiveX DLL.

To avoid this, on the Project menu, click on the project properties and in the "Component tab" choose Binary Compatibility and in the textbox below choose your previous compiled ActiveX DLL.

Note that the first time that you compile your project it option must not be set (you do not have a previous DLL to preserve the compatibility).

hope it Helps
0
 
LVL 2

Accepted Solution

by:
corvanderlinden earned 100 total points
ID: 6931161
The first time you compile your DLL make sure you have 'No Compatibilty' set in The Component Tab. Build this DLL in for example a Compatibility subdirectory of your project. You now have a reference DLL for binary compatibility. As long as you do not change your interface VB will now make sure all your GUID's and IID's will not change.

NOTE : your interface changes when parameters or return values change, and VB will warn you.

Caution : VB will NOT warn you if you for example add a member to a Public ENUM or add a Sub or Function to your interface. But realize that in these cases your interface HAS changed and you can get in trouble (to see what is going on view the DLL's typelib with OLEView)

Then make sure you set Binary Compatibilty in the Component Tab and select your previous build DLL in the Compatability directory. Then build your DLL again in your Bin or project directory (just make sure you do not overwrite your first built). This DLL will be your working DLL.

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question