You're right - there is something going on with the XP/W2k creation of the PE file. XP's loader was modified to read the IL directly instead of being fixed up in the old-technology way previous versions of windows loaded modules.
Jeff Richter describes exactly what's going on in his book, but I read it too quickly to be able to give you the full details. :-( > -----Original Message----- > From: Peter Caven [mailto:[EMAIL PROTECTED]] > Sent: 22 July 2002 01:26 > 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. > > ______________________________________________________________ > __________ > This e-mail has been scanned for all viruses by Star Internet. The > service is powered by MessageLabs. For more information on a proactive > anti-virus service working around the clock, around the globe, visit: > http://www.star.net.uk > ______________________________________________________________ > __________ > ******************************************************** Attachments in this message have been swept by NAIs TVD (version 4.0.4213) for the presence of known computer viruses. ******************************************************** ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. ________________________________________________________________________
