?
Solved

Compiling a DLL

Posted on 2002-06-11
11
Medium Priority
?
265 Views
Last Modified: 2010-05-02
Hi All,
 
   Suppose I am writing 2 ActiveX Dlls, say A and B .
First, I write A , compile it and register it on Server ( Which is a different machine from the one in which it was compiled).
   Now B calls some method of A . So, I add a reference to A and compile it. Everything works fine.
   Next, due to some changes, I need to modify A. I modify, re-compile and re-register ,putting the file at the same place.
   Now when I call the method of A from B, it says "Type Mismatch". I figured out that I need to recompile B as well to make everything run correctly.

Why is this so ?

Reagrds,
Rasaraja
0
Comment
Question by:rasaraja
[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
  • 3
  • 2
  • +3
11 Comments
 
LVL 14

Expert Comment

by:ajexpert
ID: 7071965
Ensure while compiling a DLL for second time make it as Binary Compatibility.  To achieve this
   Project->Project Properties->Component->Binary Compatibility

This will solve your problem
0
 
LVL 2

Expert Comment

by:corvanderlinden
ID: 7072422
>> Why is this so

If you do not have binary compatible set, after compiling your A dll again, new GUID's IID's etc for this dll are registered into the registry. Your B Dll, that you compiled after A, has A's old GUID's, IID's etc compiled into its binary. So when B executes it looks for these old ones in the registry but these are no longer associated with the new A dll.

0
 
LVL 5

Expert Comment

by:rpai
ID: 7072899
As suggested above, switch to Binary Compatibility mode when you begin work on the second version of any component, if you want applications compiled using the earlier version to continue to work using the new version.

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Expert Comment

by:corvanderlinden
ID: 7072948
Just switching to Binary compatibility mode is only part of the solution to create and maintain your ActiveX DLL component. There are some good articles in MSDN about the (not so trivial) subject
0
 
LVL 5

Expert Comment

by:rpai
ID: 7076515
Please maintain your open questions.
Questions Asked 21
Last 10 Grades Given A A A A A B B C B B  
Question Grading Record 10 Answers Graded / 10 Answers Received
0
 

Author Comment

by:rasaraja
ID: 7077125
Hi Cor*,
  What is GUID and IID ? And can u give me the links in MSDN?
Regards,
Rasaraja
0
 

Author Comment

by:rasaraja
ID: 7077127
rpai,
  If I am not satisfied with the answers, I guess I have every right not to award any point to anybody .
Regards,
Ras
0
 
LVL 2

Accepted Solution

by:
corvanderlinden earned 100 total points
ID: 7077467
0
 
LVL 5

Expert Comment

by:rpai
ID: 7084125
rasaraja,
This might be of help in closing some of your open questions.
http://www.experts-exchange.com/jsp/cmtyQuestAnswer.jsp#3
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7900009
Hi rasaraja,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Split points between: ajexpert and corvanderlinden

rasaraja, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 

Expert Comment

by:SpideyMod
ID: 7978384
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange

ajexpert points for you at:
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20519695.html
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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 …
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…
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…
Suggested Courses

719 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