M
Mozzak
Dear Readers,
I am currently trying to understand how to access the
pocket outlook data from a .net application. I have found
the example for POOM written in C#
(seehttp://www.gotdotnet.com/team/netcf/Samples.aspx)
which basically shows what dlls there are and how to
access them. However this example (I guess written by
microsoft) access all data that bring a string back for
example the subject of an appointment:
public String Subject
{
get
{
IntPtr bz = new IntPtr(0);
int hResult = do_get_Subject(this.RawItemPtr, ref bz);
String zSubject = null;
try
{
PocketOutlook.CheckHRESULT(hResult);
zSubject = Marshal.PtrToStringUni(bz);
}
finally
{
PocketOutlook.SysFreeString(bz);
}
return zSubject;
}
set
{
PocketOutlook.CheckHRESULT(do_put_Subject(this.RawItemPtr,
value));
}
} // Subject
....
...
[ DllImport("PocketOutlook.dll",
EntryPoint="IAppointment_put_Subject") ]
private static extern int do_put_Subject(IntPtr self,
String zBody);
I wonder now how to access Date type related data like the
Start date of the appointment.
I tried the following without success:
public String Start
{
get
{
IntPtr bz = new IntPtr(0);
int hResult = do_get_Start(this.RawItemPtr, ref bz);
String zStart = null;
try
{
PocketOutlook.CheckHRESULT(hResult);
zStart = Marshal.PtrToStringUni(bz);
}
finally
{
PocketOutlook.SysFreeString(bz);
}
return zStart;
}
set
{
//PocketOutlook.CheckHRESULT(do_put_Categories
(this.RawItemPtr, value));
}
}
.....
[DllImport("PocketOutlook.dll",
EntryPoint="IAppointment_get_Start")]
private static extern int do_get_Start (IntPtr self, ref
IntPtr pStart);
By doing that I get an error: A native exception occured.
Exception code 0x80000002
Any idea how to extend this do get date types back ?
Thanks alot,
Michael
I am currently trying to understand how to access the
pocket outlook data from a .net application. I have found
the example for POOM written in C#
(seehttp://www.gotdotnet.com/team/netcf/Samples.aspx)
which basically shows what dlls there are and how to
access them. However this example (I guess written by
microsoft) access all data that bring a string back for
example the subject of an appointment:
public String Subject
{
get
{
IntPtr bz = new IntPtr(0);
int hResult = do_get_Subject(this.RawItemPtr, ref bz);
String zSubject = null;
try
{
PocketOutlook.CheckHRESULT(hResult);
zSubject = Marshal.PtrToStringUni(bz);
}
finally
{
PocketOutlook.SysFreeString(bz);
}
return zSubject;
}
set
{
PocketOutlook.CheckHRESULT(do_put_Subject(this.RawItemPtr,
value));
}
} // Subject
....
...
[ DllImport("PocketOutlook.dll",
EntryPoint="IAppointment_put_Subject") ]
private static extern int do_put_Subject(IntPtr self,
String zBody);
I wonder now how to access Date type related data like the
Start date of the appointment.
I tried the following without success:
public String Start
{
get
{
IntPtr bz = new IntPtr(0);
int hResult = do_get_Start(this.RawItemPtr, ref bz);
String zStart = null;
try
{
PocketOutlook.CheckHRESULT(hResult);
zStart = Marshal.PtrToStringUni(bz);
}
finally
{
PocketOutlook.SysFreeString(bz);
}
return zStart;
}
set
{
//PocketOutlook.CheckHRESULT(do_put_Categories
(this.RawItemPtr, value));
}
}
.....
[DllImport("PocketOutlook.dll",
EntryPoint="IAppointment_get_Start")]
private static extern int do_get_Start (IntPtr self, ref
IntPtr pStart);
By doing that I get an error: A native exception occured.
Exception code 0x80000002
Any idea how to extend this do get date types back ?
Thanks alot,
Michael