RDP implementation in C++