I am afraid this has nothing to do with Win2K/WinXP. It's a bug in version 1.0 of 
ILASM: you need to specify the export alias even if it's the same as the name of the 
method. The book states it explicitly: "It is necessary to specify <export name> even 
if the method is exported under its own name".

Thanks,
Serge

-----Original Message-----
From: Peter Caven [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 21, 2002 5:26 PM
To: [EMAIL PROTECTED]
Subject: [ADVANCED-DOTNET] ILASM behaves differently on Win2K and WinXP


I was going through the "Managed Methods as Unmanaged Exports"
example "ydd.il" in Serge Lidin's book "Inside Microsoft .Net IL Assembler"
when I discovered a difference in the DLL produced by ILASM on Win2K and
WinXP. I was wondering if this has been documented or explained somewhere.

In the example, 3 exports (Yabba, Dabba and Doo) to unmanaged code are
defined. On WinXP the first export (Yabba) is exported as "$", while on
Win2K the same function is exported as "Yabba" (as expected).

After explicitly using the following ILASM code to declare the export:

.export [1] as Yabba

while leaving the other exports as just:

.export [2]
.export [3]

ILASM then produces the same result on WinXP as on Win2K.

I seems that on WinXP there is something else going on when writing the PE
file for the DLL.

Or, have I misunderstood the use of ".export" directive? Is the extra "as
<<something>>" after the ordinal always required?

Thanks,
Peter.

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to