By reading your post it seems that you need some kind of real-time feature; unfortunately this is not available on Windows, both using Matlab, C/C++ or any other language. This is due to the operating system architecture: Microsoft Windows is not able to ensure strict timing performances (i.e. in the order of microseconds).
To do it you should use real-time extensions from a third-party; the most famous are
RTX from
Venturcom and you can find more details on it on this web-site:
<ahref="http: www.intervalzero.com="" rtx.htm"="">http://www.intervalzero.com/rtx.htm[
^]
However be aware that such extensions require a
developer license and
runtime royalties (I don't know the prices but someone told be that they we talk about some tousand dollars for the developer license and about 200 dollars for each runtime).