ProjectWise SDK - IMS authentication

My company has an existing ProjectWise integration using the SDK. Out application is written in C# and we have a DLL that is written in C++ to make the API calls. I've been tasked with extending this DLL to support IMS authentication. A couple of challenges are that I'm new to both C++ and ProjectWise. 

I’ve done some research and believe that I should implement the following:

hostName and dataSource are passed in from the C# code and assume hostname = “myServer” and dataSource = “myServer:myDataSource”

 

LPWSTR* relyingParty;

bool success = aaApi_GetDatasourceRelyingPartyIdentifier(MarshalHelper::BCLStringToWString(hostName).c_str(), relyingParty);

if (success)

{

     success = aaApi_LoginWithSecurityToken(MarshalHelper::BCLStringToWString(dataSourceName).c_str(), *relyingParty, false, NULL, NULL);

}

 

Does this look correct?