Embedded programming under Windows operating systems is a closed shop. The correct way to approach the problem is a trade secret and those who know are on the inside. I know because as an outsider I have followed the Microsoft recommended methods and have been chasing my own tail in a circle for months. Every single scheme I have come up with to monitor I2C in real-time has started to slow down when I began loading more devices and sharing the data with more applications. Ask the pros how it is "really done" for all these SCADA systems running Windows NT in factories and for assembly line machines and they'll give you the shifty eyes and weird smirks. It's a secret and it's not widely available to newbies.
This is what I have figured out with the help of some articles on the Code Project.
1. You must run your I2C driver as a Windows service on startup. OWFS or OWHTTP are best in the background.
2. Use IPC (Inter Process Communication) to share the data with all other applications in a general pool. Don't use named pipes. They're ridiculously slow and they crash on a dime.
3. Use a shared memory data structure available through a mutex to make the Windows Service data available to all running applications.
4. Your applications will have to access the shared memory structure without conflicts, which is best done through semaphores and raising events.
If you get this running correctly, it will fly like a bat out of hell and you will have a real-time operating system under Windows monitoring a network of I2C sensors and never missing a beat in reaction time or data updates.
With 12 devices, this is the first arrangement I have had with no slowdown. It entails a rewrite of some of my applications in their interfacing to the data but they are all basically zero-lag now and can look into the shared memory structure at any time.
The first "application" I am trying to get running on top of this service is a totally independent marquee scroller, an adjustable window band, that displays configured sensors in real time all the time with no lags or hitches. I want to make it configurable with things like ...
EXT TEMP : 61.....EXT WINDSPEED : 20 KNOTS.....RADS TOPSIDE : 14+
... scrolling by on the marquee band day and night.