M
Miguel Jimenez
Hi,
I'm trying to perfom a p/invoke call to the hrgetoneprop
function of mapi32.dll from c# but i get a
System.NullReferenceException when performing the call ..
The code is:
Outlook.Application applicationObject = new
Outlook.ApplicationClass();
Outlook.NameSpace outlookNS =
applicationObject.GetNamespace("MAPI");
Outlook.MAPIFolder inboxFolder =
outlookNS.GetDefaultFolder
(Outlook.OlDefaultFolders.olFolderInbox);
Outlook.MailItem mailItem = (Outlook.MailItem)
inboxFolder.Items.GetFirst();
IntPtr result = IntPtr.Zero;
uint headers = 0x007D001E;
HrGetOneProp((object)mailItem.MAPIOBJECT, headers, ref
result);
Has any pinvoke guru help me with the need conversions to
perform this call??
I'm trying to perfom a p/invoke call to the hrgetoneprop
function of mapi32.dll from c# but i get a
System.NullReferenceException when performing the call ..
The code is:
Outlook.Application applicationObject = new
Outlook.ApplicationClass();
Outlook.NameSpace outlookNS =
applicationObject.GetNamespace("MAPI");
Outlook.MAPIFolder inboxFolder =
outlookNS.GetDefaultFolder
(Outlook.OlDefaultFolders.olFolderInbox);
Outlook.MailItem mailItem = (Outlook.MailItem)
inboxFolder.Items.GetFirst();
IntPtr result = IntPtr.Zero;
uint headers = 0x007D001E;
HrGetOneProp((object)mailItem.MAPIOBJECT, headers, ref
result);
Has any pinvoke guru help me with the need conversions to
perform this call??