From: Giovanni Dicanio on

"Atmapuri" <janez.makovsek(a)usa.net> ha scritto nel messaggio
news:53004E0D-F3D4-448D-84C9-ADF5D8E96753(a)microsoft.com...

> I cant make the dll run on the development machine anyway.
> So why use a redistribution package?

I thought that you could run the DLL on the dev machine and instead there
was a problem on the client machine due to lack of CRT DLLs.

So, if you build the DLL on your dev machine (using VS2008), and you build a
small test app to test the DLL (using VS2008), doesn't the test app load?
Can't the test app load the DLL?

Giovanni


From: Atmapuri on
Hi!

> I thought that you could run the DLL on the dev machine and instead there
> was a problem on the client machine due to lack of CRT DLLs.
>
> So, if you build the DLL on your dev machine (using VS2008), and you build
> a small test app to test the DLL (using VS2008), doesn't the test app
> load? Can't the test app load the DLL?

If the test app is produced by VS.IDE and contains the manifest about
my dll then yes. However, if the application which loads my dll does
not have a manifest about my dll then this does not work.

As explained before, this is the case when developing plug-ins for
other applications like for example firefox. Those applications dont
have a manifset (of course) for my specific dll.

It appears that the only solution would be to ship the import
manifest with the dll, extract manifest from the target app,
merge the dll manifest with the app manifest and restamp the
application with the new merged manifest.

This however requires:
- somehow produce the import manifest
- admin rights to modify the target application,
- turns a simple deployment in to real job
especially if you dont know the name of the target
application. (could be any).
- does not work with other compilers and tools
which dont know about manifests. You have to
resign the app after each build.
- if there was an error in manifest merge, the
target application would become disabled.

If you would for example made a utility to be called
from Excel, and it depends upon msvcrt90, you have
to modify the manifest resource in Excel.exe to include
information about your dll, otherwise Excel wont
start and it would give the "attempt to invalid load the
run time library".

Thanks!
Atmapuri




From: Giovanni Dicanio on

"Atmapuri" <janez.makovsek(a)usa.net> ha scritto nel messaggio
news:5FC77411-1714-4C7B-8E88-4624DE377CC9(a)microsoft.com...

> If you would for example made a utility to be called
> from Excel, and it depends upon msvcrt90, you have
> to modify the manifest resource in Excel.exe to include
> information about your dll, otherwise Excel wont
> start and it would give the "attempt to invalid load the
> run time library".

This is one of the reasons why I like the static linking so much...

Giovanni

From: Nathan Mates on
In article <OqgIEb8fJHA.1252(a)TK2MSFTNGP03.phx.gbl>,
Giovanni Dicanio <giovanniDOTdicanio(a)REMOVEMEgmail.com> wrote:
>> If you would for example made a utility to be called
>> from Excel, and it depends upon msvcrt90, you have
>> to modify the manifest resource in Excel.exe to include
>> information about your dll, otherwise Excel wont
>> start and it would give the "attempt to invalid load the
>> run time library".

>This is one of the reasons why I like the static linking so much...

Microsoft had an opportunity with manifests to make it easy to
update their C/C++ runtime libs, in case any security bugs were found.
They failed, miserably. I've said it before-- manifests are a
half-baked fix to a problem that escaped into the wile while still
unready for every use the world throws at them. Static linking does
seem to be the quick & easy fix to some large percentage of manifest
hell issues. Unless, of course, that was their intention all along.

Nathan Mates
--
<*> Nathan Mates - personal webpage http://www.visi.com/~nathan/
# Programmer at Pandemic Studios -- http://www.pandemicstudios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A. Heinlein