none
Sensor does not Open successfully under windows service

    Question

  • Hi, 

    I wrote a program using Kinect SDK V2 and I am starting it up in the foreground, it works fine. But I converted that prohgram into the Service and it is unable to crank up Kinect camera. I am using the following code :

    sensor = KinectSensor.GetDefault()

    if (sensor != null)

    {

     sensor.Open();

    }

    Windows service is under "LocalSystem" user. I tried to set the Administrator Account user (not Administrator user) but still it did not help. It starts fine under Visual studio. But when I start manually by double click I need to give "Run as administrator" and it works fine.

    I do not see any API which captures error while opening the sensor. Nor do I see any error in Event Viewer.

    Please guide how to catch error ?

    Nilesh.



    Tuesday, September 23, 2014 2:00 PM

Answers

  • Our API in v2.0 does not support being called from a Service. Sorry.

    Thanks, Rob Relyea | Kinect Team


    Rob Relyea [MSFT] http://twitter.com/rrelyea

    Tuesday, September 23, 2014 4:25 PM
  • Sorry, I am not aware of a work around to run as a service.

    The only workaround I'm aware of is to run your app as a normal process, not a service.


    Rob Relyea [MSFT] http://twitter.com/rrelyea


    Tuesday, September 23, 2014 6:21 PM

All replies