This is more of a Mozilla Thunderbird issue but I think Ubuntu should push more for better calendering integration using the SDK provide by MS .
http://msdn2.microsoft.com/en-us/library/ms988691%28EXCHG.65%29.aspx
Calendaring
Microsoft® Exchange Server 2003 includes rich calendaring features that you can use to build calendaring applications. Collaboration Data Objects (CDO) provides the logic necessary to create applications that incorporate appointments, meetings, messages, and other calendaring items. The topics in this section describe how to use CDO to develop custom calendaring solutions.
//Creating an Appointment with CDOEx
#import rename_namespace("CDO") raw_interfaces_only
#include
#include
enum ConnectModeEnum
adModeUnknown = 0,
adModeRead = 1,
adModeWrite = 2,
adModeReadWrite = 3,
adModeShareDenyRead = 4,
adModeShareDenyWrite = 8,
adModeShareExclusive = 12,
adModeShareDenyNone = 16,
adModeRecursive = 4194304
;
enum RecordCreateOptionsEnum
adCreateCollection = 8192,
adCreateStructDoc = -2147483648,
adCreateNonCollection = 0,
adOpenIfExists = 33554432,
adCreateOverwrite = 67108864,
adFailIfNotExists = -1
;
enum RecordOpenOptionsEnum
adOpenRecordUnspecified = -1,
adOpenSource = 8388608,
adOpenAsync = 4096,
adDelayFetchStream = 16384,
adDelayFetchFields = 32768
;
void dump_com_error(_com_error &e)
_tprintf(_T("Oops - hit an error!\n"));
_tprintf(_T("\a\tCode = %08lx\n"), e.Error());
_tprintf(_T("\a\tCode meaning = \n"), e.ErrorMessage());
_bstr_t bstrSource(e.Source());
_bstr_t bstrDescription(e.Description());
_tprintf(_T("\a\tSource = \n"), (LPCTSTR) bstrSource);
_tprintf(_T("\a\tDescription = \n"), (LPCTSTR) bstrDescription);
struct StartOle
StartOle() CoInitialize(NULL);
~StartOle() CoUninitialize();
_inst_StartOle;
void main(int argc, char** argv)
HRESULT hr = S_OK;
if(argc != 2)
printf("Usage: CreateAppt\r\n");
printf("Example: CreateAppt \"file://./backofficestorage/mydomain.contoso.com/MBX/User1/calendar\"\n");
exit(0);
wchar_t* folderURL = NULL;
size_t size;
size = mbstowcs(NULL,argv[1],0);
folderURL = (wchar_t*)malloc(size * sizeof(wchar_t*) + 1);
mbstowcs(folderURL,argv[1],size+1);
BSTR bstrFolderURL = SysAllocString(folderURL);
try
CDO::IAppointmentPtr pAppt(_uuidof(CDO::Appointment));
CDO::IDataSourcePtr pDsrc;
SYSTEMTIME st = 0;
SYSTEMTIME et = 0;
DATE dst, det;
st.wYear = 1999;
st.wMonth = 12;
st.wDay = 21;
st.wHour = 15;
st.wMinute = 30;
et.wYear = 1999;
et.wMonth = 12;
et.wDay = 21;
et.wHour = 16;
et.wMinute = 30;
// Convert the system value to double date.
SystemTimeToVariantTime(&st, &dst);
SystemTimeToVariantTime(&et, &det);
// Set the properties of the appointment.
pAppt->put_Subject(L"CDO_VC:Important Appointment");
pAppt->put_Location(L"Conference Room");
pAppt->put_TextBody(L"Be there on time");
pAppt->put_StartTime(dst);
pAppt->put_EndTime(det);
pAppt->get_DataSource(&pDsrc);
// Save the appointment.
// Note: using adCreateOverwrite may cause an existing
// appointment to be overwritten.
hr = pDsrc->SaveToContainer(bstrFolderURL,
0,
(enum CDO::ConnectModeEnum) adModeReadWrite,
(enum CDO::RecordCreateOptionsEnum)adCreateOverwrite,
(enum CDO::RecordOpenOptionsEnum)adOpenSource,
L"",
L"");
if (SUCCEEDED(hr))
_tprintf(_T("Appointment created\n"));
catch(_com_error &e)
dump_com_error(e);
SysFreeString(bstrFolderURL);
Above is a sample code in C++ .
Tags:
(none)
No attachments.