[Mono-devel-list] Using mono components

Mark Easton mark.easton at blinksoftware.co.uk
Sat Sep 6 11:25:50 EDT 2003


Sorry my fault.  You were perfectly clear in your first mail but I'm not
thinking straight after a night on the town.

So you need to read an Assembly structure from C, for your own nefarious
purposes. I think Mono uses the loader.c file in the mono\metadata
folder to load the PECOFF image into a MonoImage structure, which I
assume you could then play with. In comparison, PNET contains some C
code in a file called Pecoff_loader.c that does as it says on the tin
and loads a PECOFF file into an ILImage struct.

Hope this is generally correct and is of some help,

Mark




-----Original Message-----
From: chris at chrisseaton.com [mailto:chris at chrisseaton.com] 
Sent: 06 September 2003 14:21
To: Mark Easton
Cc: mono-devel-list at lists.ximian.com
Subject: Re: RE: [Mono-devel-list] Using mono components

I'll try to be clearer:

When mono reads an assembly, planning to execute it, it must have a way
to access the structure: getting an array of namespaces that contains an
array of classes, and in that an array of methods, constructors and so
on.

Is this isolated in a library that could be used externally to the rest
of mono in a C program?

Mark Easton <mark.easton at blinksoftware.co.uk> wrote on 06.09.2003,
15:05:55:
> Chris,
> 
> I'm not sure from your description what exactly it is that you're
after,
> but FYI PNET has a C compiler that produces IL and I believe can
consume
> .NET assemblies.  Perhaps you already know this, or perhaps it will be
> of no use to you, but thought I'd throw it into the mixing pot,
> 
> Yours, wishing I'd flame proofed myself before mentioning PNET in the
> Mono list, 
> 
> Mark 
> 
> -----Original Message-----
> From: mono-devel-list-admin at lists.ximian.com
> [mailto:mono-devel-list-admin at lists.ximian.com] On Behalf Of Chris
> Seaton
> Sent: 06 September 2003 13:33
> To: mono-devel-list at lists.ximian.com
> Subject: [Mono-devel-list] Using mono components
> 
> Is it possible to use the part of Mono that can read the structure of
an
> assembly from a C program (linking as a library or something)?
> 
> I'm writing a compiler that targets .net as well as several other
> architectures, so the compiler is not written in a .net lanuguage and
I
> can't use the Reflection namespace (unless perhaps I can?...).
> 
> Hmm... perhaps I could write a separate program in C# that uses
> Reflection and exports a header file for my language...
> 
> -- 
> Chris Seaton
> 
> chris at chrisseaton.com
> http://www.chrisseaton.com/
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> 
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list





More information about the Mono-devel-list mailing list