Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Exchange
2000.active.directory
2000.admin
2000.announcements
2000.app.conversion
2000.applications
2000.clients
2000.clustering
2000.connectivity
2000.development
2000.documentation
2000.general
2000.information.store
2000.interop
2000.kms
2000.misc
2000.protocols
2000.realtime.collabo.
2000.setup
2000.transport
2000.win2000
admin
application.conversion
applications
clients
clustering
connectivity
design
development
misc
mobility
setup
tools
  
 
date: 8 Mar 2007 05:30:15 -0800,    group: microsoft.public.exchange.development        back       


Setting appointment duration with IAppointment   
Hi,

using IAppointment interface in C++ to create appointments in a
calendar on an Exchange 2000 server. Previously starttime/endtime
properties were used to set the time of the appointment, but now a
change to starttime/duration is neccessary to fix a problem.

I have tried setting the duration property in several different ways,
but nothing seems to make any difference. The endtime of the created
appointment is always set to the current time and the duration is set
to reflect this. Exactly the same behaviour as if I don't specify any
of duration or endtime.

Below is some of the code, the first version works correctly, but in
the second version I try to replace endtime with duration and it gives
the strange endtime...

CODE:
---------------------------------------
// Create a pointer to the CDOEX Appointment interface.
IAppointmentPtr iAppointment(__uuidof(Appointment));
iAppointment->Fields->Item[ cdoReminderOffset ]->Value = (long)900;
iAppointment->StartTime =
CTimeConversion::GetVariantDate( timeStart );
iAppointment->EndTime   = CTimeConversion::GetVariantDate( timeEnd );
.....
iAppointment->Fields->Update();
---------------------------------------
// Create a pointer to the CDOEX Appointment interface.
IAppointmentPtr iAppointment(__uuidof(Appointment));
iAppointment->Fields->Item[ cdoReminderOffset ]->Value = (long)900;
iAppointment->StartTime =
CTimeConversion::GetVariantDate( timeStart );
iAppointment->Fields->Item [ cdoDuration ]->Value = (long) 1530002;
//iAppointment->Duration	= (long) lDuration;
//iAppointment->put_Duration ( lDuration );
.....
iAppointment->Fields->Update();
---------------------------------------

I have tried the three different ways of setting duration above.
Setting the reminder offset works and that is the same type as
duration, so why can't I set the duration in the same way??

Regards
 - Jellobiaffra
date: 8 Mar 2007 05:30:15 -0800   author:   Jellobiaffra

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us