[Mono-devel-list] ToString() in DateTime failed on embedded mono

eric lindvall eric at 5stops.com
Wed Jul 9 12:07:56 EDT 2003

I don't feel comfortable submitting a patch for the documentation when I
really don't have any clue why you have to do any of these things, nor
what the correct thing to do is.

It would make me feel much more comfortable if someone who knew the
restrictions, etc, could do that.


On Wed, 09 Jul 2003, Martin Willemoes Hansen wrote:

> On Tue, 2003-07-08 at 19:12, eric lindvall wrote:
> > The exact exception you're running into is that Thread.CurrentThread is
> > returning null. The reason for this is the environment isn't fully setup.
> > 
> > It isn't documented anywhere, but you have to call
> > mono_runtime_exec_managed_code() after you do your mono_jit_init(), and
> > have your C function as the callback to mono_runtime_exec_managed_code().
> > 
> > I haven't gotten any response as to if there are other restrictions, which
> > have lead me to some questions:
> > 
> > - once i've made the call to mono_runtime_exec_managed_code(), can i then run
> >   code in the main thread?
> > 
> > - once i've made the call to mono_runtime_exec_managed_code(), can i use
> >   pthread_create() in the main thread and then use
> >   mono_thread_attach(domain)?
> > 
> > it would really be nice if the embeded-api.html was updated to include all
> > of the requirements to being able to embed mono.. it took me a few days to
> > figure out this problem.
> Please do submit a patch for it.

More information about the Mono-devel-list mailing list