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. Remove Enum prefix from tlb

Remove Enum prefix from tlb

Scheduled Pinned Locked Moved C#
comcsharpquestion
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.
  • L Offline
    L Offline
    liqnit
    wrote on last edited by
    #1

    Hi all When creating COM dll from C# i get TLB file. All enums in the file get a prefix of the enum name is therea way to remove the prefix?

    //C# code
    public enum OPTIONS
    {
    Zoom = -1,
    FitWindow,
    FitWidth,
    FitHeight,
    Actual
    }

    //TLB
    OPTIONS
    {
    OPTIONS_Zoom = -1,
    OPTIONS_FitWindow = 0,
    OPTIONS_FitWidth = 1,
    OPTIONS_FitHeight = 2,
    OPTIONS_Actual = 3
    };

    Have a nice Day

    P 1 Reply Last reply
    0
    • L liqnit

      Hi all When creating COM dll from C# i get TLB file. All enums in the file get a prefix of the enum name is therea way to remove the prefix?

      //C# code
      public enum OPTIONS
      {
      Zoom = -1,
      FitWindow,
      FitWidth,
      FitHeight,
      Actual
      }

      //TLB
      OPTIONS
      {
      OPTIONS_Zoom = -1,
      OPTIONS_FitWindow = 0,
      OPTIONS_FitWidth = 1,
      OPTIONS_FitHeight = 2,
      OPTIONS_Actual = 3
      };

      Have a nice Day

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      There is, but you're not going to be keen on how much work it is. Anyway, if you want to do this you need to follow the steps in this[^] blog.

      Forgive your enemies - it messes with their heads

      "Mind bleach! Send me mind bleach!" - Nagy Vilmos

      My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

      L 1 Reply Last reply
      0
      • P Pete OHanlon

        There is, but you're not going to be keen on how much work it is. Anyway, if you want to do this you need to follow the steps in this[^] blog.

        Forgive your enemies - it messes with their heads

        "Mind bleach! Send me mind bleach!" - Nagy Vilmos

        My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

        L Offline
        L Offline
        liqnit
        wrote on last edited by
        #3

        Thanks - i red this before I was hoping for an easier way... :((

        Have a nice Day

        P D 2 Replies Last reply
        0
        • L liqnit

          Thanks - i red this before I was hoping for an easier way... :((

          Have a nice Day

          P Offline
          P Offline
          Pete OHanlon
          wrote on last edited by
          #4

          liqnit wrote:

          I was hoping for an easier way...

          Nope. Sorry.

          Forgive your enemies - it messes with their heads

          "Mind bleach! Send me mind bleach!" - Nagy Vilmos

          My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

          1 Reply Last reply
          0
          • L liqnit

            Thanks - i red this before I was hoping for an easier way... :((

            Have a nice Day

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            I can confirm that that procedure is as easy as it gets.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak

            L 1 Reply Last reply
            0
            • D Dave Kreskowiak

              I can confirm that that procedure is as easy as it gets.

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak

              L Offline
              L Offline
              liqnit
              wrote on last edited by
              #6

              HI ALL After trying all weekend i still get an error when trying to run the IDL to tlb using the commnad line . from this article - http://blogs.artinsoft.net/mrojas/archive/2010/05/17/interop-remove-prefix-from-c-enums-for-com.aspx[^]

              Save the modified .idl file as ClassLibrary1.dll and run a command like:

              midl ClassLibrary1.idl /tlb ClassLibrary1_new.tlb

              Shouls i save the modified idl as dll? is this command line ok ? has anyone worked with it? thanks

              Have a nice Day

              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