Home Forums Software Development Problem: System.DllNotFoundException Reply To: Problem: System.DllNotFoundException

Robert [Tobii]

Hi Sia,

I looked briefly in your sample code. It looks like one problem is the using statements:

            using (var eyeXHost = new EyeXHost())

                using (var stream = eyeXHost.CreateGazePointDataStream(GazePointDataMode.LightlyFiltered))
                 // ...

This means that the EyeXHost and data stream instances will be disposed right afterwards. You need to save a reference to the EyeXHost and stream object, and only dispose them when you dispose your TobiiController instance.

See MSDN for best practices regarding the using statement and IDisposable: