怎样保存至通讯录?
怎样将信息保存至通讯录?
[解决办法]
use POOM
[解决办法]
用POOM,从SDK里弄下来的
void SaveContact(IPOutlookApp * polApp)
{
IContact * pContact;
IFolder * pFolder;
IPOutlookItemCollection * pItems;
// Create a new contact.
polApp-> GetDefaultFolder(olFolderContacts, &pFolder);
pFolder-> get_Items(&pItems)
pItems-> Add(&pContact)
pContact-> put_FirstName(TEXT( "Brian "));
pContact-> put_LastName(TEXT( "Fleming "));
pContact-> put_Company(TEXT( "Microsoft "));
pContact-> put_FileAs(TEXT( "Fleming "));
// Save the new contact.
pContact-> Save();
// Release objects.
pContact-> Release();
pFolder-> Release();
pItems-> Release();
}