Announcement

Collapse
No announcement yet.

Passing hs host through other dll

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Passing hs host through other dll

    My plugin has a dll where most of the logic resides and a wrapper hspi project that provides the interface to HS. In HS2 I was able to pass down the callback object to the dll and then it was able to pick up the hs object for its use.

    When I try a similiar technique of trying to pass callback or hs down to the dll I do not have any success. To overcome this I made passthrough functions in hspi that are public to my dll. Is there a more elegant way to pass the ability to use hs directly to the lower level dll?

    #2
    I'm using a separate static class called GlobalVar that both my main interface class and worker classes reference. In that class I put my IHSApplication and IAppCallbackAPI variables (as public static). Now from any of my other classes I can use GlobalVar.hs to get to the homeseer functions.
    HS Pro 3.0 | Linux Ubuntu 16.04 x64 virtualized under Proxmox (KVM)
    Hardware: Z-NET - W800 Serial - Digi PortServer TS/8 and TS/16 serial to Ethernet - Insteon PLM - RFXCOM - X10 Wireless
    Plugins: HSTouch iOS and Android, RFXCOM, BlueIris, BLLock, BLDSC, BLRF, Insteon PLM (MNSandler), Device History, Ecobee, BLRing, Kodi, UltraWeatherWU3
    Second home: Zee S2 with Z-Wave, CT101 Z-Wave Thermostat, Aeotec Z-Wave microswitches, HSM200 occupancy sensor, Ecolink Z-Wave door sensors, STI Driveway Monitor interfaced to Zee S2 GPIO pins.

    Comment


      #3
      What do you do for a separate project in the same solution?

      Comment

      Working...
      X