Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. [C# COM development] output by Regasm

[C# COM development] output by Regasm

Scheduled Pinned Locked Moved C#
csharpvisual-studiocomsysadminwindows-admin
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    George_George
    wrote on last edited by
    #1

    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

    M 1 Reply Last reply
    0
    • G George_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

      M Offline
      M Offline
      mav northwind
      wrote on last edited by
      #2

      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...

      G 1 Reply Last reply
      0
      • M mav northwind

        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...

        G Offline
        G Offline
        George_George
        wrote on last edited by
        #3

        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

        M 1 Reply Last reply
        0
        • G George_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

          M Offline
          M Offline
          mav northwind
          wrote on last edited by
          #4

          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...

          G 1 Reply Last reply
          0
          • M mav northwind

            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...

            G Offline
            G Offline
            George_George
            wrote on last edited by
            #5

            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

            R 1 Reply Last reply
            0
            • G George_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

              R Offline
              R Offline
              RepliCrux
              wrote on last edited by
              #6

              Pleasure to help :) !!

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups