How to specify openni driver in sample programs

Hi,

I’ve started with the ‘getting started’ documentation included in the windows sdk.
I can import the samples and they run fine.
I am now trying to copy the ’ depthreadercpp’ sample to my own project.
But it keeps returning no data.

I’ve copied all source code and headers and made sure all project properties are equal.

But somehow my own sample seems to use a different driver, if i check the log for the sample depthreadercpp program i see:

2016-10-19 12:26:12,571 WARN [context] Hold on to yer butts
2016-10-19 12:26:12,573 INFO [context] configuration path: C:\Users\Peter\Documents\development\AstraSDK-0.5.0-20160426T102744Z-vs2015-win64\samples\vs2015\bin\Debug\astra.toml
2016-10-19 12:26:12,580 INFO [context] log file path: astra.log
2016-10-19 12:26:12,583 INFO [context] plugin path: C:\Users\Peter\Documents\development\AstraSDK-0.5.0-20160426T102744Z-vs2015-win64\samples\vs2015\bin\Debug\Plugins
2016-10-19 12:26:12,598 INFO [orbbec.ni.oni_adapter_plugin] Initializing OpenNI v2.3.0.15
2016-10-19 12:26:12,638 INFO [orbbec.ni.oni_adapter_plugin] device connected: \?\usb#vid_2bc5&pid_0402&mi_00#6&32d84c61&0&0000#{c3b5f022-5a42-1980-1909-ea72095601b1}
2016-10-19 12:26:12,644 INFO [astra.plugin_service] creating streamset: device/sensor0 527cd1f0

But if i start my own created program the log is as follows:

2016-10-19 12:26:42,172 WARN [context] Hold on to yer butts
2016-10-19 12:26:42,175 INFO [context] configuration path: C:\Users\Peter\Documents\development\AstraSDK-0.5.0-20160426T102744Z-vs2015-win64\samples\vs2015\bin\Debug\astra.toml
2016-10-19 12:26:42,181 INFO [context] log file path: astra.log
2016-10-19 12:26:42,183 INFO [context] plugin path: C:\Users\Peter\Documents\development\AstraSDK-0.5.0-20160426T102744Z-vs2015-win64\samples\vs2015\bin\Debug\Plugins
2016-10-19 12:26:42,218 INFO [astra.xs.plugin] Initializing xs plugin
2016-10-19 12:26:42,221 INFO [context] client opening streamset: device/default

It doesn’ t seem to pick the openni driver but a different one?
Can someone point me in the right direction?

Regards,
Peter

Some additional info, it has to be visual studio related because if I run the executable directly from the bin/debug folder I do get sensor information back.
But if I run the program with ‘f5’ from Visual studio it doesn’ t work while the depthreadercpp sample does work when you run it with ’ F5’.

So it indeed was visual studio related.
I had the working directory under properties → debugging set to ‘ProjectDir’, this had to be ’ TargetDir’.
so change that if you have the same problem.