C++ Hardware Capture