[C# COM development] output by Regasm
-
Hello everyone, I am debugging and learning MSDN C# COM server sample. http://msdn2.microsoft.com/en-us/library/aa645738(vs.71).aspx I am using Regasm to generate Windows Registry scripts, here it is, I can understand that for C# COM Server, since it is managed code, it will use mscoree.dll as the entry point. But I can not see anything related to the real codebase dll (CSharpServer.dll), which contains the real implementation of coclass and interface definition. I am wondering how mscoree.dll find and invoke real implementation in CSharpServer.dll? [code] REGEDIT4 [HKEY_CLASSES_ROOT\CSharpServer.InterfaceImplementation] @="CSharpServer.InterfaceImplementation" [HKEY_CLASSES_ROOT\CSharpServer.InterfaceImplementation\CLSID] @="{C6659361-1625-4746-931C-36014B146679}" [HKEY_CLASSES_ROOT\CLSID\{C6659361-1625-4746-931C-36014B146679}] @="CSharpServer.InterfaceImplementation" [HKEY_CLASSES_ROOT\CLSID\{C6659361-1625-4746-931C-36014B146679}\InprocServer32] @="mscoree.dll" "ThreadingModel"="Both" "Class"="CSharpServer.InterfaceImplementation" "Assembly"="CSharpServer, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" "RuntimeVersion"="v2.0.50727" [HKEY_CLASSES_ROOT\CLSID\{C6659361-1625-4746-931C-36014B146679}\InprocServer32\0.0.0.0] "Class"="CSharpServer.InterfaceImplementation" "Assembly"="CSharpServer, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" "RuntimeVersion"="v2.0.50727" [HKEY_CLASSES_ROOT\CLSID\{C6659361-1625-4746-931C-36014B146679}\ProgId] @="CSharpServer.InterfaceImplementation" [HKEY_CLASSES_ROOT\CLSID\{C6659361-1625-4746-931C-36014B146679}\Implemented Categories\{62C8FE65-4EBB-45E7-B440-6E39B2CDBF29}] [/code] thanks in advance, George
-
Hello everyone, I am debugging and learning MSDN C# COM server sample. http://msdn2.microsoft.com/en-us/library/aa645738(vs.71).aspx I am using Regasm to generate Windows Registry scripts, here it is, I can understand that for C# COM Server, since it is managed code, it will use mscoree.dll as the entry point. But I can not see anything related to the real codebase dll (CSharpServer.dll), which contains the real implementation of coclass and interface definition. I am wondering how mscoree.dll find and invoke real implementation in CSharpServer.dll? [code] REGEDIT4 [HKEY_CLASSES_ROOT\CSharpServer.InterfaceImplementation] @="CSharpServer.InterfaceImplementation" [HKEY_CLASSES_ROOT\CSharpServer.InterfaceImplementation\CLSID] @="{C6659361-1625-4746-931C-36014B146679}" [HKEY_CLASSES_ROOT\CLSID\{C6659361-1625-4746-931C-36014B146679}] @="CSharpServer.InterfaceImplementation" [HKEY_CLASSES_ROOT\CLSID\{C6659361-1625-4746-931C-36014B146679}\InprocServer32] @="mscoree.dll" "ThreadingModel"="Both" "Class"="CSharpServer.InterfaceImplementation" "Assembly"="CSharpServer, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" "RuntimeVersion"="v2.0.50727" [HKEY_CLASSES_ROOT\CLSID\{C6659361-1625-4746-931C-36014B146679}\InprocServer32\0.0.0.0] "Class"="CSharpServer.InterfaceImplementation" "Assembly"="CSharpServer, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" "RuntimeVersion"="v2.0.50727" [HKEY_CLASSES_ROOT\CLSID\{C6659361-1625-4746-931C-36014B146679}\ProgId] @="CSharpServer.InterfaceImplementation" [HKEY_CLASSES_ROOT\CLSID\{C6659361-1625-4746-931C-36014B146679}\Implemented Categories\{62C8FE65-4EBB-45E7-B440-6E39B2CDBF29}] [/code] thanks in advance, George
Hi! Without looking into it too deeply: I think the assembly containing the CSharpServer has to be placed in the GAC. That's the codebase...
Regards, mav -- Black holes are the places where God divided by 0...
-
Hi! Without looking into it too deeply: I think the assembly containing the CSharpServer has to be placed in the GAC. That's the codebase...
Regards, mav -- Black holes are the places where God divided by 0...
Hi mav, Do you know how to check GAC? In MSDN, it is not mentioned that we need to register codebase into GAC and only Regasm is mentioned to be used. regards, George
-
Hi mav, Do you know how to check GAC? In MSDN, it is not mentioned that we need to register codebase into GAC and only Regasm is mentioned to be used. regards, George
ReHi! There are several ways, for example using gacutil.exe. If you're using regasm to register an assembly, you either have to give a codebase so that your code can be found or put the assembly into the GAC. Can't imagine a different way for .NET to find the assemblies...
Regards, mav -- Black holes are the places where God divided by 0...
-
ReHi! There are several ways, for example using gacutil.exe. If you're using regasm to register an assembly, you either have to give a codebase so that your code can be found or put the assembly into the GAC. Can't imagine a different way for .NET to find the assemblies...
Regards, mav -- Black holes are the places where God divided by 0...
Thanks mav, If you look at the output I posted in the question, there is no real codebase (actual dll which contains coclass implementation), only mscoree.dll. So, I doubt if we are not using gacutil tool, how/whether the actual codebase could be found. Any comments? regards, George
-
Thanks mav, If you look at the output I posted in the question, there is no real codebase (actual dll which contains coclass implementation), only mscoree.dll. So, I doubt if we are not using gacutil tool, how/whether the actual codebase could be found. Any comments? regards, George