Completing BAuthentication for C# and C++