Solved

Build ActiveX DLL

Posted on 2002-04-09
3
150 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

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…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

691 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