Although you have posted in the Windows API forum, the sample code you reference is for .net c++/clr and it will compile fine if you set the clr switch in your project. The syntax is different - but it depends on what direction you want to move forward with in your programming. The Windows API is the oldest and most basic (it's really c, not c++) and .net is the latest. Regardless of which method you choose there is going to be a learning curve - working with raw char buffers in the API (of course, it would also help use string objects) or System::String^ in .net. Personally, I would recommend .net.