Re: [Mono-list] How best to detect if running in mono from an unmanaged library?

2008-05-05 Thread Paolo Molaro
On 04/30/08 Maser, Dan wrote: I've got a situation where my managed app p/invokes to my unmanaged library. The unmanaged library also gets used in regular unmanaged processes. The library has some logic that uses the name of the executable. Which doesn't what I want when it's used via

[Mono-list] How best to detect if running in mono from an unmanaged library?

2008-04-30 Thread Maser, Dan
I've got a situation where my managed app p/invokes to my unmanaged library. The unmanaged library also gets used in regular unmanaged processes. The library has some logic that uses the name of the executable. Which doesn't what I want when it's used via the interop. For example when the

Re: [Mono-list] How best to detect if running in mono from an unmanaged library?

2008-04-30 Thread Robert Jordan
Maser, Dan wrote: I've got a situation where my managed app p/invokes to my unmanaged library. The unmanaged library also gets used in regular unmanaged processes. The library has some logic that uses the name of the executable. Which doesn't what I want when it's used via the interop.

Re: [Mono-list] How best to detect if running in mono from an unmanaged library?

2008-04-30 Thread Chris Howie
On Wed, Apr 30, 2008 at 7:19 PM, Robert Jordan [EMAIL PROTECTED] wrote: For unix: #include dlfcn.h /* let's assume this is a function exposed to mono: */ void test () { /* get the address of one of mono's API functions */ void *p = dlsym (NULL, mono_runtime_invoke);