Re: C loader of .NET runtime (mscoree.h include errors)
- From: "Lloyd Dupont" <net.galador@ld>
- Date: Tue, 21 Jun 2005 09:37:23 +1000
thanks for this precious tidbits of information Willy, will see how it
works....
"Willy Denoyette [MVP]" <willy.denoyette@xxxxxxxxxx> wrote in message
news:e7YhRPadFHA.1612@xxxxxxxxxxxxxxxxxxxxxxx
>
> "Lloyd Dupont" <net.galador@ld> wrote in message
> news:uNDkmiVdFHA.1036@xxxxxxxxxxxxxxxxxxxxxxx
>> I'm trying to compile with GCC a very simple .NET loader.
>> (I'm using SDK.NET 2.0 beta 2)
>> the code is attached...
>>
>> Anyway there is an include of <mscoree.h>
>> it produces plenty of error kind of:
>> ../mscoree.h:487: error: syntax error before numeric constant
>> ../mscoree.h:487: warning: data definition has no type or storage class
>>
>> At line 487 there is something like that:
>> EXTERN_GUID(LIBID_mscoree,
>> 0x5477469e,0x83b1,0x11d2,0x8b,0x49,0x00,0xa0,0xc9,0xb7,0xc9,0xc4);
>>
>> Which means nothing to me...
>> Any idea about what the error could be?
>>
>>
>
> The unmanaged hosting API's are still un-documented, your only source of
> info will be the header files in the sdk.
>
> First of, the CLR is loaded/managed through a bunch of COM interfaces,
> ICLRRuntimeHost is such a COM interface, so it requires a pointer
> declaration...
> ICLRRuntimeHost* runtime;
>
> If you look in mscoree.h, you'll see that CorBindToRuntimeEx takes the
> CLRRuntimeHost class id and a interface id as 4th and 5th argument. So
> what you need is this...
>
> hr = CorBindToRuntimeEx(NULL, NULL, 0, CLSID_CLRRuntimeHost,
> IID_ICLRRuntimeHost, (LPVOID*) &runtime);
> ... where runtime is the pointer to the ICLRRuntimeHost interface, all
> methods on this interface must be called using "runtime" as pointer.
>
> Your call to ExecuteApplication has some invalid and the wrong number of
> arguments, and the ExecuteApplication method needs to be called on the
> interface pointer returned by CorBindToRuntimeEx.
>
> Willy.
>
>
>
>
.
- References:
- C loader of .NET runtime (mscoree.h include errors)
- From: Lloyd Dupont
- Re: C loader of .NET runtime (mscoree.h include errors)
- From: Willy Denoyette [MVP]
- C loader of .NET runtime (mscoree.h include errors)
- Prev by Date: Re: hosting the runtime
- Next by Date: Re: hosting the runtime
- Previous by thread: Re: C loader of .NET runtime (mscoree.h include errors)
- Next by thread: ado.net transaction
- Index(es):
Relevant Pages
|