Solved

Build ActiveX DLL

Posted on 2002-04-09
3
142 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now