Unmanaged Multifile Assembly in C++
- From: "gfinger@xxxxxxxxx" <gfinger@xxxxxxxxx>
- Date: Mon, 13 Aug 2007 18:30:02 -0000
I have several unmanaged C++ dlls that were being shared by several
projects which were successfully converted to assemblies. However one
of those dlls is dependent on another dll which we currently handle by
putting it in a folder under Common Files and adding the location the
the "Path" environment variable. We'd really like to avoid doing this
however so I've been looking into packaging the two dlls together into
a single assembly.
Unfortunately all the documentation in msdn seems aimed at
constructing VB and C# assemblies using al.exe and do not seem
applicable to the situation I'm in using C++. After looking at the
example of the VC80 CRT dlls in WinSxS I've come up with a process
that seems to create a multifile assembly which can be installed
properly. When I examine the file structure after installation
everything seems correct, but when I try to use the assembly it fails.
Dependency Walker seems to think that the first dll cannot access the
second dll which is residing in the same folder. If I add the second
dll to the path I am running the program from it works correctly.
What do I need to change either about the first file or about the
assembly construction process so that it can find the second file?
The process I am currently using is to compile all the files as normal
(not embedding a manifest in file01 but embedding one in file02.) I
then modify the external manifest for file01 to add the line:
<file name="file02.dll"
hash="0000000000000000000000000000000000000000" hashalg="SHA1"></file>
(This goes just below the identical file reference for file01.dll)
Then perform the same steps as when creating a single file assembly:
mt -manifest "file01.manifest" -outputresource:file01.dll;2
mt -manifest file01.manifest -hashupdate -makecdfs
makecat file01.manifest.cdf
signtool sign /f Keys\OurKey.pfx /t http://timestamp.verisign.com/scripts/timestamp.dll
file01.cat
This results in file01.manifest (with file elements for both file01
and file02, including hashes, DigestValues, etc) file01.cat,
file01.dll, and file02.dll.
Thanks for any help anyone can provide!
.
- Prev by Date: Re: Mixed assemblies and enhanced instruction set
- Next by Date: Re: Moving interface & enum from IDL to C++/CLI
- Previous by thread: how to fix error: missing ';' before identifier 'lpSurf'
- Next by thread: RE: 407 Proxy Authentication Required - Not using a Proxy
- Index(es):
Relevant Pages
|