Creating MAPI Property with CreateIProp
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 2 of 2

Thread: Creating MAPI Property with CreateIProp

Hybrid View

  1. #1
    Join Date
    Apr 2013

    Creating MAPI Property with CreateIProp


    I have a problem creating a MAPI property.
    I have code like this:
    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
    			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, 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

  2. #2
    Join Date
    Apr 2013

    Re: Creating MAPI Property with CreateIProp

    can anybody help me?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

This is a survey!

HTML5 Development Center