Take a look at Microsoft's documentation. You'll likely find there an example in C++