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

Martin Willemoes Hansen mwh at sysrq.dk
Wed Jul 9 09:23:14 EDT 2003


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.

-- 
Martin Willemoes Hansen

--------------------------------------------------------
E-Mail	mwh at sysrq.dk	Website	mwh.sysrq.dk
IRC     MWH, freenode.net
--------------------------------------------------------               





More information about the Mono-devel-list mailing list