Je me connect a Outlook 2003 sans probleme mais je voudrais me connecter avec un autre compte et je n'y arrive pas.
J'ai vu pas mal de truc qui on l'aire de tourner en c# mais impossible d'utiliser Logon correctement en C/C++.
Il faut donner des VARIANT a Logon mais je ne comprend pas comment faire. Si vous avez une idée ...CInlOutlookApp olApp.CreateDispatch("Outlook.Application", &e));
VARIANT x1,x2,x3,x4;
x1.vt = VT_BYREF;sprintf(x1.pcVal,"");
x2.vt = VT_BYREF;sprintf(x2.pcVal,"");
x3.vt = VT_BOOL;x3.boolVal = true;
x4.vt = VT_BOOL;x4.boolVal = false;
np.Logon((const VARIANT) x1,(const VARIANT) x2,(const VARIANT) x3,(const
VARIANT) x4);
_NameSpace np = olApp.GetNamespace("MAPI");
MAPIFolder fo = np.GetDefaultFolder(6);
_Items it = fo.GetItems();
_MailItem mit = it.GetLast();
Partager