-
April 17th, 2013, 08:48 AM
#1
Creating MAPI Property with CreateIProp
Hello,
I have a problem creating a MAPI property.
I have code like this:
Code:
int SetProperty( LPPROFSECT lpProfileSection, LPSPropValue lpPropValue) {
HRESULT hr;
LPPROPDATA lpPropData;
SPropValue spvEID;
//printf("Server DN: %d\n", lpPropValue->Value.b); for good select auto
cout << "CustomBook: PropValue " << lpPropValue << endl;
lpPropValue->Value.l = false;
if (SUCCEEDED(hr = HrSetOneProp(lpProfileSection, lpPropValue)))
return S_OK; // good
else
spvEID.ulPropTag = PR_AB_CHOOSE_DIRECTORY_AUTOMATICALLY;
spvEID.Value.l = 0;
CreateIProp (NULL,MAPIAllocateBuffer, MAPIAllocateMore, MAPIFreeBuffer, 0, &lpPropData);
//lpPropData.Tag = spvEID;
cout << "CustomBook: HrSetOneProp failed (hr=" << hr << ")" << endl ;
return 3;
}
I want to create the choose_directory_Automatically property if its not exists.
But I don't know how.
If the CreateIProp method returns me a pointer in lpPropData how can I put the PropTag and the Value in it?
I am totally new to C++ (normally I do programming in VB, VB.net and T-SQL) and its driving me crazy for days now.
Can anybody help me coding these few lines of code?
I have already implemented change the property if it exists already but the Outlook Addressbook stays on automatically until I or the user creates this property.
I took a look with OutlookSpy at this property but I could not come any further.
Plese help me.
Thanks in advance
Regards
Reiner
-
April 19th, 2013, 09:45 AM
#2
Re: Creating MAPI Property with CreateIProp
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|