Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / March 2006

Tip: Looking for answers? Try searching our database.

CLR details- Are MSCorEE.dll and MSCorWks.dll\MSCorSvr.dll COM ser

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Manoj Agarwal - 27 Feb 2006 07:00 GMT
I had read that the CLR is actually implemented as a COM server in the files
MSCorWks.dll (or MSCorSvr.dll). But when I get a list of exported functions
by this dll then it doesn't have the COM functions DllGetClassObject,
DllRegisterServer, DllUnRegisterServer and DllCanUnloadNow. It has functions
like DllCanUnloadNowInternal, DllRegisterServerInternal etc.. So are these
files really COM servers?

Also, is MSCorEE.dll a COM server? And why is it call the shim?

Thanks,
- Manoj
Willy Denoyette [MVP] - 27 Feb 2006 21:50 GMT
Yes, they are and both COM DLL's...

mscoree.dll exports the standard DLL COM register/unregister functions, like
dumpbin reveals...

      58   18 000115F3 DllCanUnloadNow = _DllCanUnloadNow@0
      59   19 000105C6 DllGetClassObject = _DllGetClassObject@12
      60   1A 000198DF DllRegisterServer = _DllRegisterServer@0
      61   1B 00019975 DllUnregisterServer = _DllUnregisterServer@0

while mscorwks.dll does not, however that doesn't mean it's not a COM DLL,
it's not a requirement of COM to export these.

MScorEE.dll is called a shim because it's used to load the CLR in the
process (through COM on Windows).

Willy.

|I had read that the CLR is actually implemented as a COM server in the files
| MSCorWks.dll (or MSCorSvr.dll). But when I get a list of exported functions
[quoted text clipped - 7 lines]
| Thanks,
| - Manoj
Manoj Agarwal - 28 Feb 2006 05:22 GMT
Thanks a lot for the quick reply!

Both MSCorEE.dll and MSCorWks.dll\MSCorSvr.dll export a lot of other
functions too e.g.
MSCorEE.dll exports CallFunctionShim, _CorExeMain etc
MSCorWks.dll exports ClearDownloadCache, _CorExeMain etc

So it looks like they are a combination of a COM dlls + an ordinary dll
library. Is that true?

Thanks,
- Manoj

> Yes, they are and both COM DLL's...
>
[quoted text clipped - 28 lines]
> | Thanks,
> | - Manoj
Willy Denoyette [MVP] - 28 Feb 2006 17:55 GMT
Yes, they are regular DLL's that also expose some COM interfaces, that's
right.
The public COM interfaces are polished in the mscoree.idl, while the public
C style interfaces are in the mscorree.h file in the framework SDK. The
mscorwks.dll are not published, that means they are private and should
therefore not be used from user code.

Willy.

| Thanks a lot for the quick reply!
|
[quoted text clipped - 41 lines]
| > | Thanks,
| > | - Manoj
Huihong - 28 Feb 2006 19:37 GMT
You can take a look of all of the exports from mscoree.dll from my
deprotector source code. The sample code may help you understand more
about mscoree.dll, the COM interfaces is defined in
c:\windows\microsoft.net\framework\v2.0.50727\mscorlib.tlb

The deprotector programs I provided replace the whole mscoree.dll, so
it hooks every functions inside mscoree.dll. so you can monitor which
methods are being invoked.

http://www.remotesoft.com/deprotector/   then click Source code
Willy Denoyette [MVP] - 28 Feb 2006 20:05 GMT
I don't need this, I'm having a source code license and I'm not interested
in non public and documented interfaces anyway. Also tlb files do not
necessarily represent accurately the COM interfaces of a COM server, the IDL
files do.

Willy.

| You can take a look of all of the exports from mscoree.dll from my
| deprotector source code. The sample code may help you understand more
[quoted text clipped - 6 lines]
|
| http://www.remotesoft.com/deprotector/   then click Source code
Manoj Agarwal - 01 Mar 2006 13:47 GMT
Thanks for the reply and the prompt help :)

> Yes, they are regular DLL's that also expose some COM interfaces, that's
> right.
[quoted text clipped - 56 lines]
> | > | Thanks,
> | > | - Manoj

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.