473,385 Members | 1,292 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,385 software developers and data experts.

Is it possible (GAC)

Is it possible to place a strongly named assembly (C++ based) which
references legacy (i.e., native) DLLs in the GAC? I seem to be having
difficulty when trying to load the assembly into a client app. I wondered
how the assembly found the legacy DLL dependencies; is there some kind of
search path?
Oct 13 '06 #1
5 1326
Is it possible to place a strongly named assembly (C++ based) which
references legacy (i.e., native) DLLs in the GAC? I seem to be having
difficulty when trying to load the assembly into a client app. I wondered
how the assembly found the legacy DLL dependencies; is there some kind of
search path?
You need to place the dlls someplace where the system will find them.
The easiest solution is to place them in a folder in program files, and then
add the path to the PATH variable.

I think the problem is that your unmanaged dlls are not placed alongside
your assembly in the GAC.
In that case, the assembly will not find them automatically.

--

Kind regards,
Bruno van Dooren
br**********************@hotmail.com
Remove only "_nos_pam"
Oct 13 '06 #2
What do you mean by "your unmanaged dlls are not placed alongside your
assembly in the GAC"; is this different than your suggested solution of make
sure DLLs are in PATH variable referenced directory? Am I correct that I
cannot place unmanaged DLLs in GAC?

Is the idea of a GAC based managed assembly referencing unmanaged DLLs a
problem in general, or do I just need to get the configuration correct?

Thanks for your help

"Bruno van Dooren [MVP VC++]" wrote:
Is it possible to place a strongly named assembly (C++ based) which
references legacy (i.e., native) DLLs in the GAC? I seem to be having
difficulty when trying to load the assembly into a client app. I wondered
how the assembly found the legacy DLL dependencies; is there some kind of
search path?

You need to place the dlls someplace where the system will find them.
The easiest solution is to place them in a folder in program files, and then
add the path to the PATH variable.

I think the problem is that your unmanaged dlls are not placed alongside
your assembly in the GAC.
In that case, the assembly will not find them automatically.

--

Kind regards,
Bruno van Dooren
br**********************@hotmail.com
Remove only "_nos_pam"
Oct 13 '06 #3
What do you mean by "your unmanaged dlls are not placed alongside your
assembly in the GAC"; is this different than your suggested solution to place
unmanaged DLLs in PATH variable referenced directories? Am I correct that
you cannot place unmanaged DLLs in GAC?

Also on the conceptual side; is there a problem with placing a mixed
assembly in the GAC since it references unmanaged DLLs?

"Bruno van Dooren [MVP VC++]" wrote:
Is it possible to place a strongly named assembly (C++ based) which
references legacy (i.e., native) DLLs in the GAC? I seem to be having
difficulty when trying to load the assembly into a client app. I wondered
how the assembly found the legacy DLL dependencies; is there some kind of
search path?

You need to place the dlls someplace where the system will find them.
The easiest solution is to place them in a folder in program files, and then
add the path to the PATH variable.

I think the problem is that your unmanaged dlls are not placed alongside
your assembly in the GAC.
In that case, the assembly will not find them automatically.

--

Kind regards,
Bruno van Dooren
br**********************@hotmail.com
Remove only "_nos_pam"
Oct 13 '06 #4
What do you mean by "your unmanaged dlls are not placed alongside your
assembly in the GAC"; is this different than your suggested solution of
make
sure DLLs are in PATH variable referenced directory? Am I correct that I
cannot place unmanaged DLLs in GAC?

Is the idea of a GAC based managed assembly referencing unmanaged DLLs a
problem in general, or do I just need to get the configuration correct?
If I recall correctly, If an assembly is installed in the GAC, it is
physically copied to a special location in the Windows directory.
If it relies on any native DLLs, those DLLs will no longer be located in the
same folder as the assembly because they are not copied along.
This means that the assembly cannot locate the native DLLs at runtime.

To solve this, the native DLLs have to be placed where the system can find
them.
I.e. the thing to do is to create a folder with those DLLs, and then add
that folder to the PATH variable.

Then, if the assembly tries to load those DLLs, the DLL loader will search
through all path folder and find them.

--

Kind regards,
Bruno van Dooren
br**********************@hotmail.com
Remove only "_nos_pam"
Oct 14 '06 #5

"MC-Advantica" <MC*********@discussions.microsoft.comwrote in message
news:9C**********************************@microsof t.com...
What do you mean by "your unmanaged dlls are not placed alongside your
assembly in the GAC"; is this different than your suggested solution of
make
sure DLLs are in PATH variable referenced directory? Am I correct that I
cannot place unmanaged DLLs in GAC?
GAC has two parts, a directory holding the DLLs and a metadata database.
Unmanaged DLLs can be in the directory (where the managed DLLs can find
them), but they don't have metadata.
>
Is the idea of a GAC based managed assembly referencing unmanaged DLLs a
problem in general, or do I just need to get the configuration correct?

Thanks for your help

"Bruno van Dooren [MVP VC++]" wrote:
Is it possible to place a strongly named assembly (C++ based) which
references legacy (i.e., native) DLLs in the GAC? I seem to be having
difficulty when trying to load the assembly into a client app. I
wondered
how the assembly found the legacy DLL dependencies; is there some kind
of
search path?

You need to place the dlls someplace where the system will find them.
The easiest solution is to place them in a folder in program files, and
then
add the path to the PATH variable.

I think the problem is that your unmanaged dlls are not placed alongside
your assembly in the GAC.
In that case, the assembly will not find them automatically.

--

Kind regards,
Bruno van Dooren
br**********************@hotmail.com
Remove only "_nos_pam"

Nov 7 '06 #6

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

Similar topics

6
by: Matt Frame | last post by:
I wrote a small assembly to test the process of placing it into the Global Assembly Cache but now I cannot remove it. When I hi-light and click delete I get the following: Assembly 'Assembly...
6
by: Wayne | last post by:
During building of one of my applications for deployment it occurred to me that I was using a common assembly, that most of our future applications will be using. So I started to wonder if the...
11
by: Wolfgang Kaml | last post by:
I am not sure if this is more of an expert question, but I am sure that they are out there. I'd like to setup a general application or bin directory on my Win2003.Net Server that will hold some...
4
by: Dave Kolb | last post by:
Hi, It is possible to reference an assembly in a directory other than in the bin subdir without registering in ghe GAC? For instance, I would love to have all my web apps on one server...
9
by: G Dean Blake | last post by:
I wrote a web component called GP and gave it a strong name. When I deploy my ASP application to another web server and put GP.dll in \mywebroot\bin and include a reference to that location,...
10
by: Steven Spits | last post by:
Hi, Because we have a large WebApp, back in 2002 we decided to use the following method: http://support.microsoft.com/default.aspx?scid=kb;en-us;307467 In short: Create a project "a" at...
5
by: Tony Johansson | last post by:
Hello! I have one solution file that consist of three project. One project that build the exe file called A One project that build a user control dll. Here we have a class called B One project...
4
by: Tony Johansson | last post by:
Hello! I have read some info on the WWW about GAC It says the following. "If you want to use an assembly from the GAC, you should drop your assemblies into a local folder, and then add a...
2
by: D | last post by:
I was toying around with assemblies, signing and adding them to the GAC. I was mistakenly thinking that if I added a console app to the GAC it could be run from anywhere (anywhere meaning as if the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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...

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.