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. Using C code in C# project

Using C code in C# project

Scheduled Pinned Locked Moved C#
csharpxmlhelptutorialquestion
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.
  • M Offline
    M Offline
    mikeyhardingboyo
    wrote on last edited by
    #1

    I am building an application in C# but want to make use of a module coded in pure C. Im new to C# programming and not sure what my options as to how to make use of the C code in my C# project? Is there a simple bridging techique I can do? the C module I want to make use of is here http://www.ibr.cs.tu-bs.de/projects/libsmi/ - its a MIB to XML compiler Any help would be much appreciated. Cheers MM

    L 1 Reply Last reply
    0
    • M mikeyhardingboyo

      I am building an application in C# but want to make use of a module coded in pure C. Im new to C# programming and not sure what my options as to how to make use of the C code in my C# project? Is there a simple bridging techique I can do? the C module I want to make use of is here http://www.ibr.cs.tu-bs.de/projects/libsmi/ - its a MIB to XML compiler Any help would be much appreciated. Cheers MM

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Just compile the C code into a DLL which exports the necessary functions. You can then access it via P/Invoke and the DllImport attribute regards

      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