Does anybody have some sample code (preferably C++) that shows how to create
an appointment in the calendar?
I am basically using the same code that I use to create email messages,
which executes OK but nothing shows up in
the calendar. Roughly, the code looks like this (with some lines removed
for clarity):

pIGWMsgFolder->get_Messages(&pDIGWMessages);
pDIGWMessages->QueryInterface(IID_IGWMessages, (LPVOID*)&pIGWMessages);
pIGWMessages->Add(vClass, vType, vVersion, &pDIGWMessage); // class set to
GW.MESSAGE.APPOINTMENT
pDIGWMessage->QueryInterface(IID_IGWMessage, (LPVOID*)&pIGWMessage);
pIGWMessage->QueryInterface(IID_IGWAppointment, (LPVOID*)&pIGWAppointment);
pIGWAppointment->put_StartDate(mDate); // mDate set to start date of
appointment
pIGWAppointment->put_OnCalendar(vFlag); // vFlag set to TRUE
pIGWMessage->get_Subject(&pDSubject);
pDSubject->QueryInterface(IID_IGWFormattedText, (LPVOID*)&pSubject);
pSubject->put_PlainText(bstrSubject); // this set to main title of
appointment

pDIGWMessage->Release();
pIGWMessage->Release();
pIGWMessages->Release();

The only thing different about this from my email creation code is not
calling AddExistingMessage, which didn't
seem to make sense here.