>Q1. How is the process used to host the CLR determined?
It loads into the current process, i.e. the one started by the
managed code EXE. It doesn't run as a separate process.
>Q2. what account does that process run under and how can you configure
>the account that process runs under?
Whatever the current process is running under.
Mattias

Signature
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Bajoo - 01 Nov 2005 09:53 GMT
Q1. How is the process used to host the CLR determined?
When the compiler/linker creates an assembly, JMP _CorExeMain 6-byte
x86 stub function is emitted into the PE file's. _CorExeMain function
belongs to Microsoft's MSCorEE.dll dynamic-link library. When managed
executable is invoked, OS treats it like unmanaged executable. Then the
loader obtains the address of the _CorExeMain function inside
MSCorEE.dll. _CorExeMain starts CLR and then looks at the executable
assembly's matadata to determine what entry point method should
execute. Its runs in the current Process not as a saperate process. In
XP and windows 2003 its a little different it checks the Directory
Entry 14.
Q2. what account does that process run under and how can you configure
the account that process runs under?
Under which the current process is running but you can change that
afterwards using System.Security.Permissions classes.
I hope it helps.
Regdrs,
Naveed Ahmad Bajwa
Kalsoft Pvt Ltd.
Hi Jim,
Does the community's replies make sense to you? If you still have any
concern, please feel free to tell me, thanks
Best regards,
Jeffrey Tan
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.