Solved

Build ActiveX DLL

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Adding to a VBA? 6 85
vb6 connector to SQL Server 2 42
Visual Studio search word table and return Cell index 8 78
Collapse and expand table in Word 2010 2 106
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…

730 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