aximp of SHDocVW.dll problem

O

Or Lavy

Hi there,

As mentioned in message "aximp of shdocvw.dll -> problem with
ShellExecute" posted before, aximp creates two files:
AxSHDocVW.dll
SHDocVW.dll
The second has the same name as the original dll, and that makes
problems with internet explorer.

The offered solution was disassembly the interops using the ildasm
tool and recompile it using ilasm with new name. What I could not
understand is how I change the refernce of the AxSHDocVW.dll to point
to the new interop I created.

I also tried using the /source option when importing the library and
get a .cs file, but I could not find the refernce directive in the
code, so I created an empty project, added the source code and
referenced to the new assembly I created. Still the refernce remained
the same (looked in the manifest button of ildasm).

Help.... PPPPPLLLLEEEAAAASSEE.....

Regards,
Or Lavy
 
N

Nicholas Paldino [.NET/C# MVP]

Or,

In the IL file, you should see something like this:

..assembly extern /*23000002*/ 'System'
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) //
..z\V.4..
.ver 1:0:5000:0
}

This analagous to a reference. You will have to replace 'System' with
the assembly you are referencing as well as any public key information and
version number, etc, etc.

Hope this helps.
 
W

Wiktor Zychla

In the IL file, you should see something like this:
.assembly extern /*23000002*/ 'System'
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) //
.z\V.4..
.ver 1:0:5000:0
}

the correct solution would be to ildasm both shdocvw.dll and axshdocvw.dll
and then

1. recompile shdocvw.il to MyAssembly.dll but remember to change

..assembly SHDocVw
to
..assembly MyAssembly

and

..module Shdocvw.dll
to
..module MyAssembly.dll

(but! you do not need to change the namespace Shdocvw to other name)

2. recompile axshdocvw.il to AxMyAssembly.dll but change the reference

..assembly extern SHDocVw
{
.ver 1:1:0:0
}

to

..assembly extern MyAssembly
{
.ver 1:1:0:0
}

(also add the .publickeytoken directive if you use strong signing).

and change the

..assembly AxSHDocVw
to
..assembly AxMyAssembly

and

..module AxShdocvw.dll
to
..module AxMyAssembly.dll

then everything will work correctly. you'll have to libraries:
MyAssembly.dll and AxMyAssembly.dll. the axmyassembly.dll will use
myassembly.dll instead of shdocvw.dll and, in your application, use
axmyassembly instead of axshdocvw.dll.

Regards,
Wiktor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top