Implement a Direct3D 9 screen-capture function in C++. Skeleton code is provided; you will only need to implement 6 functions, most of which are trivial. This project should take less than 1 hour for a capable Direct3D 9 programmer.
## Deliverables
This project should take less than 1 hour for a capable Direct3D 9 programmer. Those with less experience will take several hours. There are six functions that you must implement; three of them are trivial inline functions, one is a constructor, one is a destructor, and one is the actual screen grabber. Implement a Direct3D 9 screen grabber. Requirements:
* It must use version 9 of Direct3D; no other version will be accepted.
* It must capture an exact copy of the entire front buffer of the primary screen.
* The implementation must be small (under 100 lines of additional code).
* The implementation must be able to execute the attached unit test in under one second.
* The implementation must be commented.
* It must support 8, 16, 24, and 32 bit screen depths.
* It must build with Visual C++ and MinGW/g++.
* It must adhere *exactly* to the attached interface.
* It must use the skeleton code that has been provided.
* C++ templates may NOT be used.
* C++ RTTI may NOT be used.
* File IO may NOT be used.
* static keyword may NOT be used.
* The implementation must not prevent other applications from running simultaneously.
* Any additional members that you add must be private.
* It must be delivered within 48 hours of accepting the job.
See attached file for skeleton code.
## Platform
All variants of Windows which support Direct3D 9.