This is the code that I used as a basis for my articles "DirectX 8 Graphics and Video: A Fresh Start" which was published in November 2000 on gamedev.net, and "DirectX 9 Graphics: Improving On A Good Thing" which I published in 2003.
The code demonstrates basic C++ and C# usage of DirectX 8 and 9, though it's of waning utility now that Microsoft includes good sample code in the SDK, which wasn't the case in the early 2000's.
Most of the code is compiled with Visual Studio and SDK versions that are no longer available, so I left the code as it was written. The C++ DirectX 9 code I have ported to Visual C++ 2015 just to keep it up to date, but it doesn't really reflect my current practices. Perhaps it might be useful to someone.
Toby Jones (www.turbohex.com, ace.roqs.net)