Register a c# class

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Yoavo

    Register a c# class

    Hi,
    How can I register a c# class ?

    Yoav.


  • James

    #2
    Re: Register a c# class

    register it with what? - If you mean that you cannot access the class you
    have created then you may want to add a reference to the assembly that
    contains the class you require..

    James Jenkins


    "Yoavo" <yoav@cimatron. co.ilwrote in message
    news:O2Yy2VJ4GH A.988@TK2MSFTNG P02.phx.gbl...
    Hi,
    How can I register a c# class ?
    >
    Yoav.
    >

    Comment

    • Ciaran O''Donnell

      #3
      RE: Register a c# class

      If you want to add it to the registry for use in COM the look up regasm.exe
      Use regasm.exe
      heres the help output for starters:

      Microsoft (R) .NET Framework Assembly Registration Utility 2.0.50727.42
      Copyright (C) Microsoft Corporation 1998-2004. All rights reserved.

      Syntax: RegAsm AssemblyName [Options]
      Options:
      /unregister Unregister types
      /tlb[:FileName] Export the assembly to the specified type library
      and register it
      /regfile[:FileName] Generate a reg file with the specified name
      instead of registering the types. This option
      cannot be used with the /u or /tlb options
      /codebase Set the code base in the registry
      /registered Only refer to already registered type libraries
      /asmpath:Directo ry Look for assembly references here
      /nologo Prevents RegAsm from displaying logo
      /silent Silent mode. Prevents displaying of success messages
      /verbose Displays extra information
      /? or /help Display this usage message

      HTH


      Ciaran O'Donnell

      "Yoavo" wrote:
      Hi,
      How can I register a c# class ?
      >
      Yoav.
      >
      >
      >

      Comment

      • Yoavo

        #4
        Re: Register a c# class

        I have an unmanged code in C++ (COM).
        I want to write a c# class which implements the c++ interfaces.
        I need that the c# class will be registered in the registry (when I build my
        c# project).

        "James" <jamesNOSPAM@ta marsolutions.co .ukwrote in message
        news:%2306$knJ4 GHA.1252@TK2MSF TNGP04.phx.gbl. ..
        register it with what? - If you mean that you cannot access the class you
        have created then you may want to add a reference to the assembly that
        contains the class you require..
        >
        James Jenkins

        >
        "Yoavo" <yoav@cimatron. co.ilwrote in message
        news:O2Yy2VJ4GH A.988@TK2MSFTNG P02.phx.gbl...
        >Hi,
        >How can I register a c# class ?
        >>
        >Yoav.
        >>
        >
        >

        Comment

        • Yoavo

          #5
          Re: Register a c# class

          Hi,
          I used regasm, but my c# class is not shown in the registry.
          what am I doing wrong ?

          "Ciaran O''Donnell" <CiaranODonnell @discussions.mi crosoft.comwrot e in
          message news:C8CD0806-FD08-4885-8EB0-605BFC155359@mi crosoft.com...
          If you want to add it to the registry for use in COM the look up
          regasm.exe
          Use regasm.exe
          heres the help output for starters:
          >
          Microsoft (R) .NET Framework Assembly Registration Utility 2.0.50727.42
          Copyright (C) Microsoft Corporation 1998-2004. All rights reserved.
          >
          Syntax: RegAsm AssemblyName [Options]
          Options:
          /unregister Unregister types
          /tlb[:FileName] Export the assembly to the specified type library
          and register it
          /regfile[:FileName] Generate a reg file with the specified name
          instead of registering the types. This option
          cannot be used with the /u or /tlb options
          /codebase Set the code base in the registry
          /registered Only refer to already registered type libraries
          /asmpath:Directo ry Look for assembly references here
          /nologo Prevents RegAsm from displaying logo
          /silent Silent mode. Prevents displaying of success
          messages
          /verbose Displays extra information
          /? or /help Display this usage message
          >
          HTH
          >
          >
          Ciaran O'Donnell
          >
          "Yoavo" wrote:
          >
          >Hi,
          >How can I register a c# class ?
          >>
          >Yoav.
          >>
          >>
          >>

          Comment

          • Mattias Sjögren

            #6
            Re: Register a c# class

            >I used regasm, but my c# class is not shown in the registry.
            >what am I doing wrong ?
            Where in the registry are you looking?


            Mattias

            --
            Mattias Sjögren [C# MVP] mattias @ mvps.org
            http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
            Please reply only to the newsgroup.

            Comment

            • Yoavo

              #7
              Re: Register a c# class

              I am looking in HKEY_CLASSES_RO OT
              But I also made a search for my class name in the entire registry, and didnt
              find it anywere.

              "Mattias Sjögren" <mattias.dont.w ant.spam@mvps.o rgwrote in message
              news:uXzVkpN4GH A.696@TK2MSFTNG P06.phx.gbl...
              I used regasm, but my c# class is not shown in the registry.
              >>what am I doing wrong ?
              >
              Where in the registry are you looking?
              >
              >
              Mattias
              >
              --
              Mattias Sjögren [C# MVP] mattias @ mvps.org
              http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
              Please reply only to the newsgroup.

              Comment

              Working...