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. how to read COM in C# ---------Please help me

how to read COM in C# ---------Please help me

Scheduled Pinned Locked Moved C#
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

    I am having following code in delphi language. i want to convert it into C# The delphi contains CreateOleObject method. but in .net we are not having such method. how to convert it. code: //set com port Comet := CreateOleObject('Comteck.xy'); Comet.ComPort := "COM1"; I wamt to Use that 'Comteck.xy' file compulsary. please help me. Thanks in advance gaurav

    _ 1 Reply Last reply
    0
    • L Lost User

      I am having following code in delphi language. i want to convert it into C# The delphi contains CreateOleObject method. but in .net we are not having such method. how to convert it. code: //set com port Comet := CreateOleObject('Comteck.xy'); Comet.ComPort := "COM1"; I wamt to Use that 'Comteck.xy' file compulsary. please help me. Thanks in advance gaurav

      _ Offline
      _ Offline
      _groo_
      wrote on last edited by
      #2

      Right click your project in VS and select "Add reference". Then select your COM object from the list of installed objects. .Net will create a managed wrapper class (RCW) which you can use to instantiate the object and access it like it was a managed object.

      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