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. windows service written in C++, COM objects, call from C#

windows service written in C++, COM objects, call from C#

Scheduled Pinned Locked Moved C#
c++questioncsharpcom
2 Posts 1 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.
  • A Offline
    A Offline
    alma
    wrote on last edited by
    #1

    How can I access the functions of a COM object located in a windows service? The windows service was written under Visual C++ 6.0. -Alma-

    A 1 Reply Last reply
    0
    • A alma

      How can I access the functions of a COM object located in a windows service? The windows service was written under Visual C++ 6.0. -Alma-

      A Offline
      A Offline
      alma
      wrote on last edited by
      #2

      I have done it in the following way: 1. registered the service: MyService.exe /service 2. added the associated type lib to the project: using MyServiceLib; (I used the Add reference wizard: Solution explorer tab, right click on the solution name, click on Add reference..., click on COM tab, in the appearing list box select the needed type library) 3. Created an object: IMyObject newObject = new MyServiceLib.MyObjectClass(); 4. Called the objects methods: newObject.Function(param1, param2); -Alma-

      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