How to use the Windows API for Desktop Duplication API?

Hey there! I try to get as many frames of my desktop as possible.
The Windows desktop API appears to be a good solution to get that.

However, I don’t know how to do it. I now get things done when it’s documented for C but not with C++.

I also did not find any information how to do it in those C++ cases.

Anyone a idea how to get the frames with this?

Thanks for you help!