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

Thread: Creating MAPI Property with CreateIProp

  1. #1
    Join Date
    Apr 2013
    Posts
    2

    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

  2. #2
    Join Date
    Apr 2013
    Posts
    2

    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
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center