View Single Post
  #1  
Old April 3rd 07, 04:24 PM posted to microsoft.public.outlook.program_addins
Godandag
external usenet poster
 
Posts: 8
Default How to get Microsoft.Office.Interop.Outlook.TaskItem from the IUnknown (C#)

Hi all.

In other words, how to implement the method GetTaskFromIntPtr in the
code below?

using Outlook = Microsoft.Office.Interop.Outlook;

....

public void Method1(Outlook.TaskItem task)
{
IntPtr ptr = Marshal.GetIUnknownForObject(task.MAPIOBJECT);
Outlook.TaskItem task1 = GetTaskFromIntPtr(ptr); //
GetTaskFromIntPtr - ?
}

public Outlook.TaskItem GetTaskFromIntPtr(IntPtr)
{
????
}

Ads