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. Expose Objects through Remoting with Windows services

Expose Objects through Remoting with Windows services

Scheduled Pinned Locked Moved C#
questionsysadminannouncement
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
    MarkPhB
    wrote on last edited by
    #1

    Deusche Version: (für die deutschsprachigen unter uns) Hi, Ich möchte eine Anwendung schreiben die aus einem Windows Dienst (Server) und einer Desktopanwendung (Client) besteht. Der Dienst erstellt dabei eine Instanz von einr Klasse, die selbstständig, mit meheren Ressourcen, über dem SerielPort und TCP/IP, arbeitet. Die Desktopanwendung soll sich nun irgend wie mit dem Dienst in Verbindung setzten und dieses Instance abrüfen können um bestimmte Events zu behandel, Eigenschaften abzufragen und methoden auszuführen. Soweit ich weiß gibt es da eine möglichkeit mittels remoting. Aber bei dem was ich bisher gesehen hab, wird das Object, erst durch den Abruf durch eines Clients erstellt. Ich brauche das Object aber bereits beim Start des Dienstes und nicht erst wenn es irgend jemand abruft. Daher meine Frage: Wie ist es möglich ein Objekt welches ich selbst erstellt hab, einer Desktopanwendung zur Verfügung zu stelllen ? -------------------------------------------------- english version: Hi, I want to write an application with a windows service as server and a desktop application as client. The service creates an instance of class which works independently with serveral resources on the SerielPort and the TCP/IP. The desktop application must be able to connect to the service and get the afore created instance and may handle events, invoke properties and perform methods. As far as I know there is a possibility using Remoting. But with what I've seen so far, the instance will first created on a demand by a client. But I already need the object on the start of the service and not only when someone demand it. Thats why my question: How is it possible to expose or provide an instance, which I've created on my own, for a desktop application ?

    J 1 Reply Last reply
    0
    • M MarkPhB

      Deusche Version: (für die deutschsprachigen unter uns) Hi, Ich möchte eine Anwendung schreiben die aus einem Windows Dienst (Server) und einer Desktopanwendung (Client) besteht. Der Dienst erstellt dabei eine Instanz von einr Klasse, die selbstständig, mit meheren Ressourcen, über dem SerielPort und TCP/IP, arbeitet. Die Desktopanwendung soll sich nun irgend wie mit dem Dienst in Verbindung setzten und dieses Instance abrüfen können um bestimmte Events zu behandel, Eigenschaften abzufragen und methoden auszuführen. Soweit ich weiß gibt es da eine möglichkeit mittels remoting. Aber bei dem was ich bisher gesehen hab, wird das Object, erst durch den Abruf durch eines Clients erstellt. Ich brauche das Object aber bereits beim Start des Dienstes und nicht erst wenn es irgend jemand abruft. Daher meine Frage: Wie ist es möglich ein Objekt welches ich selbst erstellt hab, einer Desktopanwendung zur Verfügung zu stelllen ? -------------------------------------------------- english version: Hi, I want to write an application with a windows service as server and a desktop application as client. The service creates an instance of class which works independently with serveral resources on the SerielPort and the TCP/IP. The desktop application must be able to connect to the service and get the afore created instance and may handle events, invoke properties and perform methods. As far as I know there is a possibility using Remoting. But with what I've seen so far, the instance will first created on a demand by a client. But I already need the object on the start of the service and not only when someone demand it. Thats why my question: How is it possible to expose or provide an instance, which I've created on my own, for a desktop application ?

      J Offline
      J Offline
      Jimmanuel
      wrote on last edited by
      #2

      It sounds like the resource classes and the remoting classes should be independent of one another. When the service starts it can create and manage whatever resources it's designed to manage and then use remoting simply as a message channel that clients can use to connect and issue commands to the service.

      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