473,386 Members | 1,795 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

External DLL

Hello. My program has to use third party components located in several
external libraries.
Those components, also as my program, are usually been changed.

The problem is to make my program use newest versions of external dlls, when
they were during my program compilation.

As far as I know, there are only 2 methods of using components storied in
external dlls:
1. Just setting reference to those libraries. But it does not solve the
problem because newest Assembly.FullName is not the same.
2. Creating a library which implements base Interfaces. So external
components just inherits those interfaces. It also doesn't solve the problem
because sometimes I have to change the base library (changes from
Debug/Release build versions, including new Interfaces and so on). Earlier
compiled external dlls does not recognize new base library (see item 1).

I rally don't want to write intermediate class like this one:
public class IntermediateClass1 {
object srcClassObject;
public int Method1(){
return srcClassObject.GetType().InvokeMember("Method1",
BindingFlags.Public | BindingFlags.InvokeMethod, null, srcClassObject, new
object [] {});
}
}

I know, the library version protection was made to solve the "Dll hell"
problem, but didn't is create a new one?
Nov 15 '05 #1
2 1338
Hi, Nickolay.
..Net let you redirect the built application references to assemblies with
versions that are different from the versions that were used when the
application was built.

Inspect this chapter in the ".NET Framework Developer's Guide": Redirecting
Assembly Versions.
It can help you resolve your problem.
This link to MSDN Library July 2003:
ms-help://MS.MSDNQTR.2003JUL.1033/cpguide/html/cpconassemblyversionredirecti
on.htm

--
Thanks,
Dan Ignatov

"Matora Nickolay" <m_********@mail.ru> wrote in message
news:O4**************@TK2MSFTNGP12.phx.gbl...
Hello. My program has to use third party components located in several
external libraries.
Those components, also as my program, are usually been changed.

The problem is to make my program use newest versions of external dlls, when they were during my program compilation.

As far as I know, there are only 2 methods of using components storied in
external dlls:
1. Just setting reference to those libraries. But it does not solve the
problem because newest Assembly.FullName is not the same.
2. Creating a library which implements base Interfaces. So external
components just inherits those interfaces. It also doesn't solve the problem because sometimes I have to change the base library (changes from
Debug/Release build versions, including new Interfaces and so on). Earlier compiled external dlls does not recognize new base library (see item 1).

I rally don't want to write intermediate class like this one:
public class IntermediateClass1 {
object srcClassObject;
public int Method1(){
return srcClassObject.GetType().InvokeMember("Method1",
BindingFlags.Public | BindingFlags.InvokeMethod, null, srcClassObject, new
object [] {});
}
}

I know, the library version protection was made to solve the "Dll hell"
problem, but didn't is create a new one?

Nov 15 '05 #2
Hi.
Thank you for this articles, but I've found more useable way by using
Assembly.LoadWithPartialName() method and AppDomain.AssemblyResolve event.

Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: bba | last post by:
os:xp pro sp1 ie 6.2800.1106 For some reason any java scripts that refers to 'external' fails: example: external.menuArguments.document.body.style.zoom="100%"; error message:
0
by: Ida | last post by:
Hi, I am trying to build an dll with Microsoft Visual C++ but during the linking phase I get linking errors. Script.obj : error LNK2019: unresolved external symbol __imp__PyString_AsString...
1
by: Aravind | last post by:
we have two files: 1. rc4.c (defines one function "create_pin()") 2. MyImpl.c(calling the function "create_pin()"),This implements JNI method. 1.When I am trying to create .dll file with one...
3
by: al.cpwn | last post by:
do static and inline functions or members have internal linkage? I have been reading this newsgroup on google and found conflicting ideas. Can someone please help me understand why in some places...
2
by: f rom | last post by:
----- Forwarded Message ---- From: Josiah Carlson <jcarlson@uci.edu> To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org Sent: Monday, December 4, 2006 10:03:28 PM Subject: Re: ...
2
by: Maydogg6 | last post by:
I need a hand with some stubborn link errors. I'm trying to recreate and old program from 6.0 into .NET, but for some reason when I try to compile I'm getting linking errors for all my function...
6
by: sadegh | last post by:
Hi I have a problem with my program in VC++6 When I compile it, the following errors are listed. I spend a lot of time on the groups.google.com to find its reason, but none of comments could...
0
debasisdas
by: debasisdas | last post by:
This thread contains some useful tips for using External tables. USING EXTERNAL TABLE ======================= 1.THE TABLE POINTS TO EXTERNAL FILE. IF DATA IS ALTERED IN THE EXTERNAL FILE,DATA...
0
by: Ryan Gaffuri | last post by:
hlink72@hotmail.com (Eric) wrote in message news:<ab8d8b14.0308220550.54fb5f22@posting.google.com>... LNK1120 is a standard C++ error. you using Visual C++? Means your references a class that...
2
by: =?Utf-8?B?YmFzaA==?= | last post by:
Hello, I am compiling a CPP code using Visual studion .net 2003. I get the following error, despite having windldap.h and wldap32.dll in my include and lib paths. Here is the error. uuid.lib...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.