custom session

I try to send an invitation message to the buddy, and the buddy will display a dialog to either accept it or reject it.

The following is the code:
VARIANT customValue;
customValue.intVal = 2;
int transId = 0;
Session->CreateCustomSession(OLESTR("MY UUID"), &imCustomSession);

imCustomSession->put_Property((int)AccCustomSessionProp_Mode, customValue);

imCustomSession->Invite(userName.AllocSysString(), OLESTR("Would you like to play BomberAnimal?"), &transId);

I modified the above codes based on the examples from AIM SDK using C#
customSess = s.CreateCustomSession(customUUID); customSess.set_Property((int)AccCustomSessionProp.AccCustomSessionProp_Mode, 2);
customSess.Invite(buddy, "Join me in this custom session");

Two functions are different in C++ and C#
I guess it is the problem of the customValue, but I don't know what value I should put in.
also, the transID is for return value, according to the reference provided by SDK. What is its purpose?

The following is the receiver code:
STDMETHOD(OnSecondarySessionStateChange)(IAccSession* session, IAccSecondarySession* secondarySession, AccSecondarySessionState State, HRESULT hr)
{
switch(State)
{
case AccSecondarySessionState_ReceivedProposal:
dialog->DoModal();
break;
case AccSecondarySessionState_Online:
break;
case AccSecondarySessionState_Offline:
break;
}
return S_OK;
}

Thanks

Re: custom session

When using VARIANT, you need to also set customValue.vt = VT_INT. AccTransId is used to match events with requests. For example, some time after calling Invite(), OnInviteResult fires.