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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. COM and DLL !!!!

COM and DLL !!!!

Scheduled Pinned Locked Moved C#
helpcsharpcomvisual-studioquestion
2 Posts 2 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
    Lost User
    wrote on last edited by
    #1

    Hi everybody i got a problem in DLL and COM interoperability so could some one help me please !!! I want to create a COM object in C# called conversion.dll So I begin by creating Class Library project called “conversion.dll” 1-I add reference to a COM Object called “devise.dll” 2-When i compile the project a wrapper is created by VS.NET called “Interop.devise.dll” 3-i compile in VS.NET no problem and that’s great!!! 3-but to create the COM object conversion as I know i must add a key file called “conversion.snk” So to create the file I go to prompt Sn –k conversion.dll 5-i edit the file AssemblyInfo.cs in my project by adding [assembly: AssemblyKeyFile("conversion.snk")] 6-I compile boooooom !! an error was generated Message the assembly Interop.devise referenced is not a strong name !!!!!! So how can I process to create the COM object conversion.dll knowing that the COM object devise.dll is alredy existing in the client Side.. Thank you in advance!!!!

    S 1 Reply Last reply
    0
    • L Lost User

      Hi everybody i got a problem in DLL and COM interoperability so could some one help me please !!! I want to create a COM object in C# called conversion.dll So I begin by creating Class Library project called “conversion.dll” 1-I add reference to a COM Object called “devise.dll” 2-When i compile the project a wrapper is created by VS.NET called “Interop.devise.dll” 3-i compile in VS.NET no problem and that’s great!!! 3-but to create the COM object conversion as I know i must add a key file called “conversion.snk” So to create the file I go to prompt Sn –k conversion.dll 5-i edit the file AssemblyInfo.cs in my project by adding [assembly: AssemblyKeyFile("conversion.snk")] 6-I compile boooooom !! an error was generated Message the assembly Interop.devise referenced is not a strong name !!!!!! So how can I process to create the COM object conversion.dll knowing that the COM object devise.dll is alredy existing in the client Side.. Thank you in advance!!!!

      S Offline
      S Offline
      Sivakumar R
      wrote on last edited by
      #2

      You no need to add key file unless it is to be put in Global Assembly Cache. In the command prompt you just move to your project folder and then to bin\debug. Type the following in the command prompt >regasm .dll /tlb: /codebase Here the /codebase switch is important. It will set the code base in the registry. Now, you will be able to access the component in com client.

      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