[Mono-dev] [PATCH] New managed code for unmanaged (Win32) resource handling (SRE, PEAPI, MCS)

Kornél Pál kornelpal at hotmail.com
Fri Mar 3 10:48:57 EST 2006


Hi!

This patch adds a fully managed and object oriented unmanaged (Win32)
resource handling internal infractructure to the class library. The most
important change is that it implements the /resource command line option of
ilasm in PEAPI.

I revorked DefineUnmanagedResource and DefineVersionInfoResource methods to
be fully MS.NET compatible. Including resource blob support.

In addition I replaced the previous unamaged implementation with the same
unmanaged code that is used in PEAPI. This has the following advantages:
- Named resource identifiers are supported
- Very large .res files are supported because resources are not retained in
memory
- Has exactly the same behavior as MS cvtres.exe that is used by the MS
runtime and csc.exe as well including the some tests and exceptions thrown
by the wrapper code of MS runtime.

I removed the internal DefineIconResource method and moved it's
functionality to mcs compiler that now uses DefineUnmanagedResource.

DefineVersionInfoResource and mcs no generate two differend and MS.NET
compatible version info resource files.

For the details please have a look at the code.

I treat these three modified units as a single because they show the usage
of my work as well.

Note that there will be no Win32 icon support in al, bmcs and gmcs until
modifications done in mcs will be ported. Also note that the mcs patch can
be used in gmcs without modifications.

Please review and approve the patch.

Kornél
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Mono.UnmanagedResources.tar.gz
Type: application/x-gzip
Size: 31878 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060303/342c4466/attachment.gz 


More information about the Mono-devel-list mailing list