Thread: [C# COM development] output by Regasm

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    1,579

    [C# COM development] output by Regasm

    Hello everyone,


    I am debugging and learning MSDN C# COM server sample.

    http://msdn2.microsoft.com/en-us/lib...38(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}]

    thanks in advance,
    George

  2. #2
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,820
    You can generate regasm to output a typelib if you want to see the interfaces of your class. VB6 uses these typelibs to access your COM objects, other languages, such as C++ can just reference your dll using import statement compiler side.

    regasm dllName.dll /tlb dllName.tlb

    Basically COM creates the interface to your class based on the CLSID or ProgID.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. execl()/fork() output
    By tadams in forum C Programming
    Replies: 19
    Last Post: 02-04-2009, 03:29 PM
  2. Replies: 4
    Last Post: 11-30-2005, 04:44 PM
  3. Formatting output into even columns?
    By Uncle Rico in forum C Programming
    Replies: 2
    Last Post: 08-16-2005, 05:10 PM
  4. Control different DA output value!
    By Hunterhunter in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 03-13-2003, 12:11 PM
  5. Output problems with structures
    By Gkitty in forum C Programming
    Replies: 1
    Last Post: 12-16-2002, 05:27 AM