On Fri, 2010-03-19 at 21:41 +1100, Brad Hards wrote:
> ----------  Forwarded Message  ----------
> 
> Subject: GetProps/GetPropsAll always non-unicode
> Date: Thursday 18 March 2010, 12:26:36 am

>       Hi,
> while I was investigating [1] I realized that GetPropsAll is not
> requesting PT_UNICODE properties, but only PT_STRING8. It breaks strings
> with UTF8 letters.
> 
> The attached patch adds an API to request session to use unicode in
> GetProps/GetPropsAll. Even I do not know whether it worth anything to
> request no-unicode strings, I did it rather configurable, with a default
> behavior as of before the patch. Maybe there are more places where this
> flag can be used within openchange, I do not know.
> 
> Anyway, it would be nice to have this sorted out before 0.10 release.
>       Thanks and bye,
>       Milan
> 
> [1] https://bugzilla.gnome.org/show_bug.cgi?id=600389
> 
> -----------------------------------------

        Hi,
this is a different approach. I changed API for GetProps, SetProps,
GetPropsAll and SetPropertiesNoReplicate, with adding a 'flag' parameter
to each of them to be able to influence its behaviour.

There are two things which I want to influence:
a) unicodeness - with MAPI_UNICODE flag
b) named ids conversion forth and back - new PROPS_SKIP_NAMEDID_CHECK

ad a) - it replaces the previous proposed patch, in a better way, I
believe, though for an API change. But it shouldn't hurt, should it?
Because I noticed you are not mimic Microsoft MAPI API anyway, and
adding a 'flags' to GetProps makes it even closer to Microsoft MAPI API,
thus for a little sake of code rewrite on caller's side nothing
significant. I hope.

ad b) I noticed you are doing automatic PidLidxxx conversions in these
functions, which I do not think is a good thing to do, because for
example in evolution-mapi are cached these named ids and reused per
folder, and you are trying to convert already converted values, which
may result in a wrong fetching/storing. As there was no way to influence
it, I added a new flag PROPS_SKIP_NAMEDID_CHECK (feel free to rename it)
to avoid this conversion, and let everything be done by caller, same as
is requested in Microsoft MAPI API. I didn't want just drop the code, as
it is used this way by openchange samples. Note when named IDs are
cached one has lower bandwidth requirements on fetching, because not
doing same thing again and again.

This change is kinda crucial and would be nice to be included (in any
form) in 0.10. Thanks for your understanding.
        Bye,
        Milan

P.S.: Feel free to request any change, and I will do it.
Index: libmapi/simple_mapi.c
===================================================================
--- libmapi/simple_mapi.c	(revision 1872)
+++ libmapi/simple_mapi.c	(working copy)
@@ -142,7 +142,7 @@
 					  PR_IPM_TASK_ENTRYID,
 					  PR_IPM_DRAFTS_ENTRYID);
 	
-	retval = GetProps(&obj_inbox, SPropTagArray, &lpProps, &count);
+	retval = GetProps(&obj_inbox, 0, SPropTagArray, &lpProps, &count);
 	MAPIFreeBuffer(SPropTagArray);
 	OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
 	
@@ -439,7 +439,7 @@
 					  PR_CONTENT_UNREAD,
 					  PR_CONTENT_COUNT);
 
-	retval = GetProps(obj_folder, SPropTagArray, &lpProps, &count);
+	retval = GetProps(obj_folder, 0, SPropTagArray, &lpProps, &count);
 	MAPIFreeBuffer(SPropTagArray);
 	OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
 
@@ -800,7 +800,7 @@
 					  PR_RTF_COMPRESSED,
 					  PR_HTML,
 					  PR_RTF_IN_SYNC);
-	retval = GetProps(obj_message, SPropTagArray, &lpProps, &count);
+	retval = GetProps(obj_message, 0, SPropTagArray, &lpProps, &count);
 	MAPIFreeBuffer(SPropTagArray);
 	if (retval != MAPI_E_SUCCESS) {
 		*format = 0;
Index: libmapi/nspi.c
===================================================================
--- libmapi/nspi.c	(revision 1872)
+++ libmapi/nspi.c	(working copy)
@@ -933,7 +933,7 @@
 
 	r.in.handle = &nspi_ctx->handle;
 	r.in.Reserved = 0x0;
-	r.in.dwFlags = (WantUnicode == true) ? NspiUnicodeProptypes : 0x0;
+	r.in.dwFlags = (WantUnicode != false) ? NspiUnicodeProptypes : 0x0;
 	
 	r.out.ppColumns = ppColumns;
 
Index: libmapi/IMAPIProp.c
===================================================================
--- libmapi/IMAPIProp.c	(revision 1872)
+++ libmapi/IMAPIProp.c	(working copy)
@@ -40,6 +40,8 @@
    named properties.
 
    \param obj the object to get properties on
+   \param flags Flags for behaviour; can be bit OR of MAPI_UNICODE and
+      PROPS_SKIP_NAMEDID_CHECK constants
    \param SPropTagArray an array of MAPI property tags
    \param lpProps the result of the query
    \param PropCount the count of property tags
@@ -56,7 +58,7 @@
 
    \sa SetProps, GetPropList, GetPropsAll, DeleteProps, GetLastError
 */
-_PUBLIC_ enum MAPISTATUS GetProps(mapi_object_t *obj, 
+_PUBLIC_ enum MAPISTATUS GetProps(mapi_object_t *obj, uint32_t flags,
 				  struct SPropTagArray *SPropTagArray,
 				  struct SPropValue **lpProps, uint32_t *PropCount)
 {
@@ -90,15 +92,16 @@
 
 	/* Named property mapping */
 	nameid = mapi_nameid_new(mem_ctx);
-	retval = mapi_nameid_lookup_SPropTagArray(nameid, SPropTagArray);
-	if (retval == MAPI_E_SUCCESS) {
-		named = true;
-		SPropTagArray2 = talloc_zero(mem_ctx, struct SPropTagArray);
-		retval = GetIDsFromNames(obj, nameid->count, nameid->nameid, 0, &SPropTagArray2);
-		OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);		
-		mapi_nameid_map_SPropTagArray(nameid, SPropTagArray, SPropTagArray2);
-		MAPIFreeBuffer(SPropTagArray2);
-
+	if (!(flags & PROPS_SKIP_NAMEDID_CHECK)) {
+		retval = mapi_nameid_lookup_SPropTagArray(nameid, SPropTagArray);
+		if (retval == MAPI_E_SUCCESS) {
+			named = true;
+			SPropTagArray2 = talloc_zero(mem_ctx, struct SPropTagArray);
+			retval = GetIDsFromNames(obj, nameid->count, nameid->nameid, 0, &SPropTagArray2);
+			OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);		
+			mapi_nameid_map_SPropTagArray(nameid, SPropTagArray, SPropTagArray2);
+			MAPIFreeBuffer(SPropTagArray2);
+		}
 	}
 	errno = 0;
 
@@ -110,7 +113,7 @@
 	/* Fill the GetProps operation */
 	request.PropertySizeLimit = 0x0;
 	size += sizeof (uint16_t);
-	request.WantUnicode = 0x0;
+	request.WantUnicode = (flags & MAPI_UNICODE) != 0 ? true : 0x0;
 	size += sizeof (uint16_t);
 	request.prop_count = (uint16_t) SPropTagArray->cValues;
 	size += sizeof (uint16_t);
@@ -169,6 +172,7 @@
    This function sets one or more properties on a specified object.
 
    \param obj the object to set properties on
+   \param flags Flags for behaviour; can be PROPS_SKIP_NAMEDID_CHECK
    \param lpProps the list of properties to set
    \param PropCount the number of properties
 
@@ -182,7 +186,7 @@
 
    \sa GetProps, GetPropList, GetPropsAll, DeleteProps, GetLastError
 */
-_PUBLIC_ enum MAPISTATUS SetProps(mapi_object_t *obj, struct SPropValue *lpProps, 
+_PUBLIC_ enum MAPISTATUS SetProps(mapi_object_t *obj, uint32_t flags, struct SPropValue *lpProps, 
 				  unsigned long PropCount)
 {
 	TALLOC_CTX		*mem_ctx;
@@ -216,14 +220,16 @@
 
 	/* Named property mapping */
 	nameid = mapi_nameid_new(mem_ctx);
-	retval = mapi_nameid_lookup_SPropValue(nameid, lpProps, PropCount);
-	if (retval == MAPI_E_SUCCESS) {
-		named = true;
-		SPropTagArray = talloc_zero(mem_ctx, struct SPropTagArray);
-		retval = GetIDsFromNames(obj, nameid->count, nameid->nameid, 0, &SPropTagArray);
-		OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-		mapi_nameid_map_SPropValue(nameid, lpProps, PropCount, SPropTagArray);
-		MAPIFreeBuffer(SPropTagArray);
+	if (!(flags & PROPS_SKIP_NAMEDID_CHECK)) {
+		retval = mapi_nameid_lookup_SPropValue(nameid, lpProps, PropCount);
+		if (retval == MAPI_E_SUCCESS) {
+			named = true;
+			SPropTagArray = talloc_zero(mem_ctx, struct SPropTagArray);
+			retval = GetIDsFromNames(obj, nameid->count, nameid->nameid, 0, &SPropTagArray);
+			OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
+			mapi_nameid_map_SPropValue(nameid, lpProps, PropCount, SPropTagArray);
+			MAPIFreeBuffer(SPropTagArray);
+		}
 	}
 	errno = 0;
 
@@ -468,6 +474,7 @@
    for a given object.
 
    \param obj the object to get the properties for
+   \param flags Flags for behaviour; can be a MAPI_UNICODE constant
    \param properties the properties / values for the object
 
    \return MAPI_E_SUCCESS on success, otherwise MAPI error.
@@ -480,7 +487,7 @@
 
    \sa GetProps, GetPropList, GetLastError
 */
-_PUBLIC_ enum MAPISTATUS GetPropsAll(mapi_object_t *obj,
+_PUBLIC_ enum MAPISTATUS GetPropsAll(mapi_object_t *obj, uint32_t flags,
 				     struct mapi_SPropValue_array *properties)
 {
 	TALLOC_CTX		*mem_ctx;
@@ -511,7 +518,7 @@
 	/* Fill the GetPropsAll operation */
 	request.PropertySizeLimit = 0;
 	size += sizeof (uint16_t);
-	request.WantUnicode = 0;
+	request.WantUnicode = (flags & MAPI_UNICODE) != 0 ? true : 0x0;
 	size += sizeof (uint16_t);
 
 	/* Fill the MAPI_REQ request */
@@ -637,6 +644,7 @@
    this function does not result in folder properties being replicated.
 
    \param obj the object to set properties on
+   \param flags Flags for behaviour; can be PROPS_SKIP_NAMEDID_CHECK
    \param lpProps the list of properties to set
    \param PropCount the number of properties
 
@@ -651,7 +659,7 @@
 
    \sa SetProps, DeletePropertiesNoReplicate
 */
-_PUBLIC_ enum MAPISTATUS SetPropertiesNoReplicate(mapi_object_t *obj,
+_PUBLIC_ enum MAPISTATUS SetPropertiesNoReplicate(mapi_object_t *obj, uint32_t flags,
 						  struct SPropValue *lpProps, 
 						  unsigned long PropCount)
 {
@@ -686,14 +694,16 @@
 
 	/* Named property mapping */
 	nameid = mapi_nameid_new(mem_ctx);
-	retval = mapi_nameid_lookup_SPropValue(nameid, lpProps, PropCount);
-	if (retval == MAPI_E_SUCCESS) {
-		named = true;
-		SPropTagArray = talloc_zero(mem_ctx, struct SPropTagArray);
-		retval = GetIDsFromNames(obj, nameid->count, nameid->nameid, 0, &SPropTagArray);
-		OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
-		mapi_nameid_map_SPropValue(nameid, lpProps, PropCount, SPropTagArray);
-		MAPIFreeBuffer(SPropTagArray);
+	if (!(flags & PROPS_SKIP_NAMEDID_CHECK)) {
+		retval = mapi_nameid_lookup_SPropValue(nameid, lpProps, PropCount);
+		if (retval == MAPI_E_SUCCESS) {
+			named = true;
+			SPropTagArray = talloc_zero(mem_ctx, struct SPropTagArray);
+			retval = GetIDsFromNames(obj, nameid->count, nameid->nameid, 0, &SPropTagArray);
+			OPENCHANGE_RETVAL_IF(retval, retval, mem_ctx);
+			mapi_nameid_map_SPropValue(nameid, lpProps, PropCount, SPropTagArray);
+			MAPIFreeBuffer(SPropTagArray);
+		}
 	}
 	errno = 0;
 
Index: libmapi/freebusy.c
===================================================================
--- libmapi/freebusy.c	(revision 1872)
+++ libmapi/freebusy.c	(working copy)
@@ -225,7 +225,7 @@
 					  PR_FREEBUSY_BUSY_EVENTS,
 					  PR_FREEBUSY_OOF_MONTHS,
 					  PR_FREEBUSY_OOF_EVENTS);
-	retval = GetProps(&obj_message, SPropTagArray, &lpProps, &count);
+	retval = GetProps(&obj_message, 0, SPropTagArray, &lpProps, &count);
 	MAPIFreeBuffer(SPropTagArray);
 	OPENCHANGE_RETVAL_IF(retval, retval, NULL);
 
Index: libmapi/mapidefs.h
===================================================================
--- libmapi/mapidefs.h	(revision 1872)
+++ libmapi/mapidefs.h	(working copy)
@@ -296,4 +296,7 @@
 #define	FREEBUSY_FOLDER		"EX:/o=%s/ou=%s"
 #define	FREEBUSY_USER		"USER-/CN=RECIPIENTS/CN=%s"
 
+/* Other GetProps/SetProps flags */
+#define	PROPS_SKIP_NAMEDID_CHECK	0x00000001
+
 #endif /*!__MAPIDEFS_H__ */
Index: libexchange2ical/exchange2ical_property.c
===================================================================
--- libexchange2ical/exchange2ical_property.c	(revision 1872)
+++ libexchange2ical/exchange2ical_property.c	(working copy)
@@ -91,7 +91,7 @@
 									  );
 									  
 				lpProps = talloc_zero(exchange2ical->mem_ctx, struct SPropValue);
-				retval = GetProps(&obj_attach, SPropTagArray, &lpProps, &count);
+				retval = GetProps(&obj_attach, MAPI_UNICODE, SPropTagArray, &lpProps, &count);
 				MAPIFreeBuffer(SPropTagArray);
 				if (retval == MAPI_E_SUCCESS) {
 
Index: libexchange2ical/exchange2ical.c
===================================================================
--- libexchange2ical/exchange2ical.c	(revision 1872)
+++ libexchange2ical/exchange2ical.c	(working copy)
@@ -426,7 +426,7 @@
 									  );
 									  
 				lpProps = talloc_zero(exchange2ical->mem_ctx, struct SPropValue);
-				retval = GetProps(&obj_attach, SPropTagArray, &lpProps, &count);
+				retval = GetProps(&obj_attach, 0, SPropTagArray, &lpProps, &count);
 				MAPIFreeBuffer(SPropTagArray);
 				if (retval != MAPI_E_SUCCESS) {
 					return 1;
@@ -506,7 +506,7 @@
 								  
 								  
 		
-							retval = GetProps(&exception.obj_message, SPropTagArray, &lpProps, &count);
+							retval = GetProps(&exception.obj_message, MAPI_UNICODE, SPropTagArray, &lpProps, &count);
 							
 							if (retval == MAPI_E_SUCCESS) {	
 								aRow2.ulAdrEntryPad = 0;
@@ -559,7 +559,7 @@
 								/*has a modified summary*/
 								if(dBody && *dBody){
 									SPropTagArray = set_SPropTagArray(exchange2ical->mem_ctx, 0x1, PR_BODY_HTML_UNICODE);
-									retval = GetProps(&exception.obj_message, SPropTagArray, &lpProps, &count);
+									retval = GetProps(&exception.obj_message, MAPI_UNICODE, SPropTagArray, &lpProps, &count);
 									MAPIFreeBuffer(SPropTagArray);
 									if (retval == MAPI_E_SUCCESS) {
 										aRowT.ulAdrEntryPad = 0;
@@ -690,7 +690,7 @@
 								  );
 								  
 								  
-				retval = GetProps(&exchange2ical.obj_message, SPropTagArray, &lpProps, &count);
+				retval = GetProps(&exchange2ical.obj_message, MAPI_UNICODE, SPropTagArray, &lpProps, &count);
 
 				MAPIFreeBuffer(SPropTagArray);
 	
@@ -722,7 +722,7 @@
 					
 					/*Set PR_BODY_HTML for x_alt_desc property*/
 					SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, PR_BODY_HTML_UNICODE);
-					retval = GetProps(&exchange2ical.obj_message, SPropTagArray, &lpProps, &count);
+					retval = GetProps(&exchange2ical.obj_message, MAPI_UNICODE, SPropTagArray, &lpProps, &count);
 					MAPIFreeBuffer(SPropTagArray);
 					if (retval == MAPI_E_SUCCESS) {
 						aRowT.ulAdrEntryPad = 0;
Index: libexchange2ical/ical2exchange.c
===================================================================
--- libexchange2ical/ical2exchange.c	(revision 1872)
+++ libexchange2ical/ical2exchange.c	(working copy)
@@ -362,7 +362,7 @@
 	if (retval != MAPI_E_SUCCESS){
 		mapi_errstr("CreateMessage", GetLastError());
 	} else {
-		retval = SetProps(&obj_message, ical2exchange.lpProps, ical2exchange.cValues);
+		retval = SetProps(&obj_message, 0, ical2exchange.lpProps, ical2exchange.cValues);
 		if (retval != MAPI_E_SUCCESS){
 			mapi_errstr("SetProps", GetLastError());
 		} else {
Index: utils/backup/openchangemapidump.c
===================================================================
--- utils/backup/openchangemapidump.c	(revision 1872)
+++ utils/backup/openchangemapidump.c	(working copy)
@@ -138,7 +138,7 @@
 			mapi_object_init(&obj_attach);
 			retval = OpenAttach(obj_message, *attach_num, &obj_attach);
 			if (retval == MAPI_E_SUCCESS) {
-				retval = GetPropsAll(&obj_attach, &props);
+				retval = GetPropsAll(&obj_attach, MAPI_UNICODE, &props);
 				if (retval == MAPI_E_SUCCESS) {
 					/* extract unique identifier from PR_RECORD_KEY */
 					sbin = (const struct SBinary_short *)find_mapi_SPropValue_data(&props, PR_RECORD_KEY);
@@ -206,7 +206,7 @@
 			/* Open Message */
 			retval = OpenMessage(obj_folder, *fid, *mid, &obj_message, 0);
 			if (GetLastError() == MAPI_E_SUCCESS) {
-				retval = GetPropsAll(&obj_message, &props);
+				retval = GetPropsAll(&obj_message, MAPI_UNICODE, &props);
 				if (GetLastError() == MAPI_E_SUCCESS) {
 					/* extract unique identifier from PR_SOURCE_KEY */
 					sbin = (const struct SBinary_short *)find_mapi_SPropValue_data(&props, PR_SOURCE_KEY);
@@ -266,7 +266,7 @@
 	MAPI_RETVAL_IF(retval, GetLastError(), NULL);
 
 	/* Retrieve all its properties */
-	retval = GetPropsAll(&obj_folder, &props);
+	retval = GetPropsAll(&obj_folder, MAPI_UNICODE, &props);
 	MAPI_RETVAL_IF(retval, GetLastError(), NULL);
 	child_content = (const uint32_t *)find_mapi_SPropValue_data(&props, PR_CONTENT_COUNT);
 	child_folder = (const uint32_t *)find_mapi_SPropValue_data(&props, PR_FOLDER_CHILD_COUNT);
Index: utils/mapitest/mapitest_common.c
===================================================================
--- utils/mapitest/mapitest_common.c	(revision 1872)
+++ utils/mapitest/mapitest_common.c	(working copy)
@@ -294,7 +294,7 @@
 	format = EDITOR_FORMAT_PLAINTEXT;
 	set_SPropValue_proptag(&lpProps[3], PR_MSG_EDITOR_FORMAT, (const void *)&format);
 
-	retval = SetProps(obj_message, lpProps, 4);
+	retval = SetProps(obj_message, 0, lpProps, 4);
 	if (retval != MAPI_E_SUCCESS) {
 		mapitest_print_retval(mt, "(Common) SetProps");
 		return false;
@@ -403,7 +403,7 @@
 		set_SPropValue_proptag(&lpProp[1], PR_BODY, (const void *)body);
 		format = EDITOR_FORMAT_PLAINTEXT;
 		set_SPropValue_proptag(&lpProp[2], PR_MSG_EDITOR_FORMAT, (const void *)&format);
-		retval = SetProps(&(context->obj_test_msg[i]), lpProp, 3);
+		retval = SetProps(&(context->obj_test_msg[i]), 0, lpProp, 3);
 		MAPIFreeBuffer((void *)from);
 		MAPIFreeBuffer((void *)body);
 		if (retval != MAPI_E_SUCCESS) {
@@ -434,7 +434,7 @@
 		set_SPropValue_proptag(&lpProp[1], PR_BODY, (const void *)body);
 		format = EDITOR_FORMAT_PLAINTEXT;
 		set_SPropValue_proptag(&lpProp[2], PR_MSG_EDITOR_FORMAT, (const void *)&format);
-		retval = SetProps(&(context->obj_test_msg[i]), lpProp, 3);
+		retval = SetProps(&(context->obj_test_msg[i]), 0, lpProp, 3);
 		MAPIFreeBuffer((void *)from);
 		MAPIFreeBuffer((void *)body);
 		if (retval != MAPI_E_SUCCESS) {
Index: utils/mapitest/modules/module_oxcfold.c
===================================================================
--- utils/mapitest/modules/module_oxcfold.c	(revision 1872)
+++ utils/mapitest/modules/module_oxcfold.c	(working copy)
@@ -293,7 +293,7 @@
 
 		/* Step 4.2. Set its container class */
 		set_SPropValue_proptag(&lpProp[0], PR_CONTAINER_CLASS, (const void *) subfolders[i].class);
-		retval = SetProps(&obj_child, lpProp, 1);
+		retval = SetProps(&obj_child, 0, lpProp, 1);
 		mapitest_print_retval_fmt(mt, "SetProps", "(%s)", subfolders[i].name);		
 
 		mapi_object_release(&obj_child);
@@ -505,7 +505,7 @@
 	/* Step 5. Set properties on this search folder */
 	lpProps[0].ulPropTag = PR_CONTAINER_CLASS;
 	lpProps[0].value.lpszA = IPF_NOTE;
-	retval = SetProps(&obj_searchdir, lpProps, 1);
+	retval = SetProps(&obj_searchdir, 0, lpProps, 1);
 	mapitest_print_retval(mt, "SetProps");
 	if (GetLastError() != MAPI_E_SUCCESS) {
 		ret = false;
@@ -617,7 +617,7 @@
 	/* Step 5. Set properties on this search folder */
 	lpProps[0].ulPropTag = PR_CONTAINER_CLASS;
 	lpProps[0].value.lpszA = IPF_NOTE;
-	retval = SetProps(&obj_searchdir, lpProps, 1);
+	retval = SetProps(&obj_searchdir, 0, lpProps, 1);
 	mapitest_print_retval(mt, "SetProps");
 	if (GetLastError() != MAPI_E_SUCCESS) {
 		ret = false;
Index: utils/mapitest/modules/module_oxcprpt.c
===================================================================
--- utils/mapitest/modules/module_oxcprpt.c	(revision 1872)
+++ utils/mapitest/modules/module_oxcprpt.c	(working copy)
@@ -68,7 +68,7 @@
 	}
 
 	/* Step 3. Call the GetProps operation */
-	retval = GetProps(&obj_store, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_store, 0, SPropTagArray, &lpProps, &cValues);
 	mapitest_print_retval(mt, "GetProps");
 	if (retval != MAPI_E_SUCCESS) {
 		MAPIFreeBuffer(SPropTagArray);
@@ -109,7 +109,7 @@
 	}
 
 	/* Step 2. GetPropsAll operation */
-	retval = GetPropsAll(&obj_store, &properties_array);
+	retval = GetPropsAll(&obj_store, 0, &properties_array);
 	mapitest_print_retval(mt, "GetPropsAll");
 	if (retval != MAPI_E_SUCCESS) {
 		return false;
@@ -198,7 +198,7 @@
 
 	/* Step 2: GetProps, retrieve mailbox name */
 	SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x1, PR_DISPLAY_NAME);
-	retval = GetProps(&obj_store, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_store, 0, SPropTagArray, &lpProps, &cValues);
 	mapitest_print_retval_step_fmt(mt, "2.", "GetProps", "(%s)", "Retrieve the mailbox name");
 	if (retval != MAPI_E_SUCCESS) {
 		return false;
@@ -218,12 +218,12 @@
 	new_mailbox = talloc_asprintf(mt->mem_ctx, "%s [MAPITEST]", mailbox);
 	set_SPropValue_proptag(&lpProp[0], PR_DISPLAY_NAME, 
 			       (const void *) new_mailbox);
-	retval = SetProps(&obj_store, lpProp, cValues);
+	retval = SetProps(&obj_store, 0, lpProp, cValues);
 	mapitest_print_retval_step_fmt(mt, "2.1.", "SetProps", "(%s)", "NEW mailbox name");
 
 	/* Step 2.2: Double check with GetProps */
 	SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x1, PR_DISPLAY_NAME);
-	retval = GetProps(&obj_store, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_store, 0, SPropTagArray, &lpProps, &cValues);
 	MAPIFreeBuffer(SPropTagArray);
 	if (lpProps[0].value.lpszA) {
 		if (!strncmp(new_mailbox, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
@@ -237,12 +237,12 @@
 	/* Step 3.1: Reset mailbox to its original value */
 	cValues = 1;
 	set_SPropValue_proptag(&lpProp[0], PR_DISPLAY_NAME, (const void *)mailbox);
-	retval = SetProps(&obj_store, lpProp, cValues);
+	retval = SetProps(&obj_store, 0, lpProp, cValues);
 	mapitest_print_retval_step_fmt(mt, "3.1.", "SetProps", "(%s)", "OLD mailbox name");
 	
 	/* Step 3.2: Double check with GetProps */
 	SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x1, PR_DISPLAY_NAME);
-	retval = GetProps(&obj_store, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_store, 0, SPropTagArray, &lpProps, &cValues);
 	MAPIFreeBuffer(SPropTagArray);
 	if (lpProps[0].value.lpszA) {
 		if (!strncmp(mailbox, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
@@ -331,7 +331,7 @@
 	subject = talloc_asprintf(mt->mem_ctx, "Reference: %s", "subject");
 	set_SPropValue_proptag(&lpProp[0], PR_DISPLAY_NAME, (const void *)name);
 	set_SPropValue_proptag(&lpProp[1], PR_CONVERSATION_TOPIC, (const void *)subject);
-	retval = SetProps(&obj_ref_message, lpProp, 2);
+	retval = SetProps(&obj_ref_message, 0, lpProp, 2);
 	mapitest_print_retval_step_fmt(mt, "3.2.", "SetProps", "(%s)", "Set email properties");
 	if (retval != MAPI_E_SUCCESS) {
 		return false;
@@ -339,7 +339,7 @@
 
 	/* Step 4: Double check with GetProps */
 	SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC);
-	retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_ref_message, 0, SPropTagArray, &lpProps, &cValues);
 	MAPIFreeBuffer(SPropTagArray);
 	if (lpProps[0].value.lpszA) {
 		if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
@@ -369,7 +369,7 @@
 
 	/* Step 6. Double check with GetProps */
 	SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x1, PR_CONVERSATION_TOPIC);
-	retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_ref_message, 0, SPropTagArray, &lpProps, &cValues);
 	MAPIFreeBuffer(SPropTagArray);
 	if (get_SPropValue(lpProps, PR_CONVERSATION_TOPIC) == NULL) {
 		mapitest_print(mt, "* Step 5.1. - GetProps verifier [SUCCESS]\n");
@@ -478,7 +478,7 @@
 	subject = talloc_asprintf(mt->mem_ctx, "Reference: %s", "subject");
 	set_SPropValue_proptag(&lpProp[0], PR_DISPLAY_NAME, (const void *)name);
 	set_SPropValue_proptag(&lpProp[1], PR_CONVERSATION_TOPIC, (const void *)subject);
-	retval = SetProps(&obj_ref_message, lpProp, 2);
+	retval = SetProps(&obj_ref_message, 0, lpProp, 2);
 	mapitest_print_retval_step_fmt(mt, "3.2.", "SetProps", "(%s)", "Set email properties");
 	if (retval != MAPI_E_SUCCESS) {
 		return false;
@@ -486,7 +486,7 @@
 
 	/* Step 4: Double check with GetProps */
 	SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC);
-	retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_ref_message, 0, SPropTagArray, &lpProps, &cValues);
 	MAPIFreeBuffer(SPropTagArray);
 	if (lpProps[0].value.lpszA) {
 		if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
@@ -523,7 +523,7 @@
 	targ_dept = talloc_asprintf(mt->mem_ctx, "Target: %s", "department");
 	set_SPropValue_proptag(&lpProp[0], PR_DISPLAY_NAME, (const void *)targ_name);
 	set_SPropValue_proptag(&lpProp[1], PR_DEPARTMENT_NAME, (const void *)targ_dept);
-	retval = SetProps(&obj_target_message, lpProp, 2);
+	retval = SetProps(&obj_target_message, 0, lpProp, 2);
 	mapitest_print_retval_step_fmt(mt, "5.2.", "SetProps", "(%s)", "set properties on target email");
 	if (retval != MAPI_E_SUCCESS) {
 		return false;
@@ -531,7 +531,7 @@
 
 	/* Step 6: Double check with GetProps */
 	SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_DEPARTMENT_NAME);
-	retval = GetProps(&obj_target_message, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_target_message, 0, SPropTagArray, &lpProps, &cValues);
 	MAPIFreeBuffer(SPropTagArray);
 	if (lpProps[0].value.lpszA) {
 		if (!strncmp(targ_name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
@@ -567,7 +567,7 @@
 
 	/* Step 8: Double check with GetProps */
 	SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC);
-	retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_ref_message, 0, SPropTagArray, &lpProps, &cValues);
 	MAPIFreeBuffer(SPropTagArray);
 	if (lpProps[0].value.lpszA) {
 		if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
@@ -588,7 +588,7 @@
 		}
 	}
 	SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC, PR_DEPARTMENT_NAME);
-	retval = GetProps(&obj_target_message, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_target_message, 0, SPropTagArray, &lpProps, &cValues);
 	MAPIFreeBuffer(SPropTagArray);
 	/* this one shouldn't be overwritten */
 	if (lpProps[0].value.lpszA) {
@@ -634,7 +634,7 @@
 
 	/* Step 10: Double check with GetProps */
 	SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC);
-	retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_ref_message, 0, SPropTagArray, &lpProps, &cValues);
 	MAPIFreeBuffer(SPropTagArray);
 	if (lpProps[0].value.lpszA) {
 		if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
@@ -655,7 +655,7 @@
 		}
 	}
 	SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC, PR_DEPARTMENT_NAME);
-	retval = GetProps(&obj_target_message, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_target_message, 0, SPropTagArray, &lpProps, &cValues);
 	MAPIFreeBuffer(SPropTagArray);
 	/* this one should now be overwritten */
 	if (lpProps[0].value.lpszA) {
@@ -704,7 +704,7 @@
 
 	/* Step 12: Double check with GetProps */
 	SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC);
-	retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_ref_message, 0, SPropTagArray, &lpProps, &cValues);
 	MAPIFreeBuffer(SPropTagArray);
 	if (cValues == 2) {
 		mapitest_print(mt, "* Step 12A - Properties removed [SUCCESS]\n");
@@ -712,7 +712,7 @@
 		mapitest_print(mt, "* Step 12A - Properties removed [FAILURE]\n");
 	}
 	SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC, PR_DEPARTMENT_NAME);
-	retval = GetProps(&obj_target_message, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_target_message, 0, SPropTagArray, &lpProps, &cValues);
 	MAPIFreeBuffer(SPropTagArray);
 	if (lpProps[0].value.lpszA) {
 		if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
@@ -873,7 +873,7 @@
 	attach[2].ulPropTag = PR_ATTACH_FILENAME;
 	attach[2].value.lpszA = MT_MAIL_ATTACH;
 
-	retval = SetProps(&obj_attach, attach, 3);
+	retval = SetProps(&obj_attach, 0, attach, 3);
 	if (retval != MAPI_E_SUCCESS) {
 		ret = false;
 	}
@@ -1160,7 +1160,7 @@
 	attach[2].ulPropTag = PR_ATTACH_FILENAME;
 	attach[2].value.lpszA = MT_MAIL_ATTACH;
 
-	retval = SetProps(&obj_attach, attach, 3);
+	retval = SetProps(&obj_attach, 0, attach, 3);
 	if (retval != MAPI_E_SUCCESS) {
 		ret = false;
 	}
@@ -1226,7 +1226,7 @@
 	attach[2].ulPropTag = PR_ATTACH_FILENAME;
 	attach[2].value.lpszA = MT_MAIL_ATTACH2;
 
-	retval = SetProps(&obj_attach2, attach, 3);
+	retval = SetProps(&obj_attach2, 0, attach, 3);
 	if (retval != MAPI_E_SUCCESS) {
 		ret = false;
 	}
@@ -1435,7 +1435,7 @@
 	}
 	lpProp[0].ulPropTag = PR_CONTAINER_CLASS;
 	lpProp[0].value.lpszA = "IPF.Note";
-	retval = SetProps(&obj_ref_folder, lpProp, 1);
+	retval = SetProps(&obj_ref_folder, 0, lpProp, 1);
 	mapitest_print_retval(mt, "SetProps");
 	if (retval != MAPI_E_SUCCESS) {
 		ret = false;
@@ -1462,7 +1462,7 @@
 	set_SPropValue_proptag(&lpProp[0], PR_DISPLAY_NAME, (const void *)name);
 	set_SPropValue_proptag(&lpProp[1], PR_CONVERSATION_TOPIC, (const void *)subject);
 	set_SPropValue_proptag(&lpProp[2], PR_DEPARTMENT_NAME, (const void *)dept);
-	retval = SetProps(&obj_ref_message, lpProp, 3);
+	retval = SetProps(&obj_ref_message, 0, lpProp, 3);
 	mapitest_print_retval(mt, "SetProps");
 	if (retval != MAPI_E_SUCCESS) {
 		ret = false;
@@ -1472,7 +1472,7 @@
 	/* Step 4: Double check with GetProps */
 	SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC,
 					  PR_DEPARTMENT_NAME);
-	retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_ref_message, 0, SPropTagArray, &lpProps, &cValues);
 	MAPIFreeBuffer(SPropTagArray);
 	if (lpProps[0].value.lpszA) {
 		if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
@@ -1526,7 +1526,7 @@
 	targ_dept = talloc_asprintf(mt->mem_ctx, "Target: %s", "department");
 	set_SPropValue_proptag(&lpProp[0], PR_DISPLAY_NAME, (const void *)targ_name);
 	set_SPropValue_proptag(&lpProp[1], PR_DEPARTMENT_NAME, (const void *)targ_dept);
-	retval = SetProps(&obj_target_message, lpProp, 2);
+	retval = SetProps(&obj_target_message, 0, lpProp, 2);
 	mapitest_print_retval(mt, "SetProps");
 	if (retval != MAPI_E_SUCCESS) {
 		ret = false;
@@ -1535,7 +1535,7 @@
 
 	/* Step 6: Double check with GetProps */
 	SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_DEPARTMENT_NAME);
-	retval = GetProps(&obj_target_message, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_target_message, 0, SPropTagArray, &lpProps, &cValues);
 	MAPIFreeBuffer(SPropTagArray);
 	if (lpProps[0].value.lpszA) {
 		if (!strncmp(targ_name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
@@ -1577,7 +1577,7 @@
 
 	/* Step 8: Double check with GetProps */
 	SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC);
-	retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_ref_message, 0, SPropTagArray, &lpProps, &cValues);
 	MAPIFreeBuffer(SPropTagArray);
 	if (lpProps[0].value.lpszA) {
 		if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
@@ -1602,7 +1602,7 @@
 		}
 	}
 	SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC, PR_DEPARTMENT_NAME);
-	retval = GetProps(&obj_target_message, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_target_message, 0, SPropTagArray, &lpProps, &cValues);
 	MAPIFreeBuffer(SPropTagArray);
 	/* this one shouldn't be overwritten */
 	if (lpProps[0].value.lpszA) {
@@ -1654,7 +1654,7 @@
 
 	/* Step 10: Double check with GetProps */
 	SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC);
-	retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_ref_message, 0, SPropTagArray, &lpProps, &cValues);
 	MAPIFreeBuffer(SPropTagArray);
 	if (lpProps[0].value.lpszA) {
 		if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
@@ -1679,7 +1679,7 @@
 		}
 	}
 	SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC, PR_DEPARTMENT_NAME);
-	retval = GetProps(&obj_target_message, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_target_message, 0, SPropTagArray, &lpProps, &cValues);
 	MAPIFreeBuffer(SPropTagArray);
 	/* this one should now be overwritten */
 	if (lpProps[0].value.lpszA) {
@@ -1732,7 +1732,7 @@
 
 	/* Step 12: Double check with GetProps */
 	SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC);
-	retval = GetProps(&obj_ref_message, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_ref_message, 0, SPropTagArray, &lpProps, &cValues);
 	MAPIFreeBuffer(SPropTagArray);
 	if (cValues == 2) {
 		mapitest_print(mt, "* Step 12A - Properties removed [SUCCESS]\n");
@@ -1742,7 +1742,7 @@
 		goto cleanup;
 	}
 	SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3, PR_DISPLAY_NAME, PR_CONVERSATION_TOPIC, PR_DEPARTMENT_NAME);
-	retval = GetProps(&obj_target_message, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_target_message, 0, SPropTagArray, &lpProps, &cValues);
 	MAPIFreeBuffer(SPropTagArray);
 	if (lpProps[0].value.lpszA) {
 		if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
@@ -1791,7 +1791,7 @@
 	lpProp[1].value.l = 0;
 	lpProp[2].ulPropTag = PR_ATTACH_FILENAME;
 	lpProp[2].value.lpszA = MT_MAIL_ATTACH;
-	retval = SetProps(&obj_ref_attach, lpProp, 3);
+	retval = SetProps(&obj_ref_attach, 0, lpProp, 3);
 	mapitest_print_retval(mt, "SetProps");
 	if (retval != MAPI_E_SUCCESS) {
 		ret = false;
@@ -1813,7 +1813,7 @@
 	lpProp[1].value.l = 0;
 	lpProp[2].ulPropTag = PR_ATTACH_FILENAME;
 	lpProp[2].value.lpszA = MT_MAIL_ATTACH2;
-	retval = SetProps(&obj_targ_attach, lpProp, 3);
+	retval = SetProps(&obj_targ_attach, 0, lpProp, 3);
 	mapitest_print_retval(mt, "SetProps");
 	if (retval != MAPI_E_SUCCESS) {
 		ret = false;
@@ -1835,7 +1835,7 @@
 
 	/* Step 16: Check properties on both attachments are correct */
 	SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x1, PR_ATTACH_FILENAME);
-	retval = GetProps(&obj_ref_attach, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_ref_attach, 0, SPropTagArray, &lpProps, &cValues);
 	mapitest_print_retval(mt, "GetProps");
 	if (retval != MAPI_E_SUCCESS) {
 		ret = false;
@@ -1854,7 +1854,7 @@
 		}
 	}	
 	SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x1, PR_ATTACH_FILENAME);
-	retval = GetProps(&obj_targ_attach, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_targ_attach, 0, SPropTagArray, &lpProps, &cValues);
 	mapitest_print_retval(mt, "GetProps");
 	if (retval != MAPI_E_SUCCESS) {
 		ret = false;
@@ -1883,7 +1883,7 @@
 	}
 	lpProp[0].ulPropTag = PR_CONTAINER_CLASS;
 	lpProp[0].value.lpszA = "IPF.Journal";
-	retval = SetProps(&obj_targ_folder, lpProp, 1);
+	retval = SetProps(&obj_targ_folder, 0, lpProp, 1);
 	mapitest_print_retval(mt, "SetProps");
 	if (retval != MAPI_E_SUCCESS) {
 		ret = false;
@@ -1903,7 +1903,7 @@
 
 	/* Check that the properties on both folders are correct */
 	SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_CONTAINER_CLASS);
-	retval = GetProps(&obj_ref_folder, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_ref_folder, 0, SPropTagArray, &lpProps, &cValues);
 	mapitest_print_retval(mt, "GetProps");
 	if (retval != MAPI_E_SUCCESS) {
 		ret = false;
@@ -1933,7 +1933,7 @@
 		}
 	}
 	SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_CONTAINER_CLASS);
-	retval = GetProps(&obj_targ_folder, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_targ_folder, 0, SPropTagArray, &lpProps, &cValues);
 	mapitest_print_retval(mt, "GetProps");
 	if (retval != MAPI_E_SUCCESS) {
 		ret = false;
@@ -2354,7 +2354,7 @@
 	comment = talloc_asprintf(mt->mem_ctx, "Reference: %s", "the folder comment");
 	set_SPropValue_proptag(&lpProp[0], PR_DISPLAY_NAME, (const void *)name);
 	set_SPropValue_proptag(&lpProp[1], PR_COMMENT, (const void *)comment);
-	retval = SetPropertiesNoReplicate(&obj_ref_folder, lpProp, 2);
+	retval = SetPropertiesNoReplicate(&obj_ref_folder, 0, lpProp, 2);
 	mapitest_print_retval_step_fmt(mt, "3.", "SetProps", "(%s)", "Set folder properties");
 	if (retval != MAPI_E_SUCCESS) {
 		ret = false;
@@ -2363,7 +2363,7 @@
 
 	/* Step 4: Double check with GetProps */
 	SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_COMMENT);
-	retval = GetProps(&obj_ref_folder, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_ref_folder, 0, SPropTagArray, &lpProps, &cValues);
 	MAPIFreeBuffer(SPropTagArray);
 	if (lpProps[0].value.lpszA) {
 		if (!strncmp(name, lpProps[0].value.lpszA, strlen(lpProps[0].value.lpszA))) {
@@ -2396,7 +2396,7 @@
 
 	/* Step 6. Double check with GetProps */
 	SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x1, PR_COMMENT);
-	retval = GetProps(&obj_ref_folder, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_ref_folder, 0, SPropTagArray, &lpProps, &cValues);
 	MAPIFreeBuffer(SPropTagArray);
 	if (get_SPropValue(lpProps, PR_COMMENT) == NULL) {
 		mapitest_print(mt, "* Step 6.1. - GetProps verifier [SUCCESS]\n");
@@ -2509,7 +2509,7 @@
 	attach[2].ulPropTag = PR_ATTACH_FILENAME;
 	attach[2].value.lpszA = MT_MAIL_ATTACH;
 
-	retval = SetProps(&obj_attach, attach, 3);
+	retval = SetProps(&obj_attach, 0, attach, 3);
 	if (retval != MAPI_E_SUCCESS) {
 		ret = false;
 	}
Index: utils/mapitest/modules/module_oxcmsg.c
===================================================================
--- utils/mapitest/modules/module_oxcmsg.c	(revision 1872)
+++ utils/mapitest/modules/module_oxcmsg.c	(working copy)
@@ -152,7 +152,7 @@
 	ret = true;
 
 	/* 1. Retrieve and Save the original PR_MESSAGE_FLAGS value */
-	retval = GetProps(&obj_message, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_message, 0, SPropTagArray, &lpProps, &cValues);
 	if (GetLastError() != MAPI_E_SUCCESS) {
 		return false;
 	}
@@ -167,7 +167,7 @@
 	mapitest_print_retval_fmt(mt, "SetMessageReadFlag", "(%s)", "MSGFLAG_READ");
 
 	/* Check if the operation was successful */
-	retval = GetProps(&obj_message, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_message, 0, SPropTagArray, &lpProps, &cValues);
 	mapitest_print_retval(mt, "GetProps");
 	if (GetLastError() != MAPI_E_SUCCESS) {
 		return false;
@@ -187,7 +187,7 @@
 	mapitest_print_retval_fmt(mt, "SetMessageReadFlag", "(%s)", "MSGFLAG_SUBMIT");
 	
 	/* Check if the operation was successful */
-	retval = GetProps(&obj_message, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(&obj_message, 0, SPropTagArray, &lpProps, &cValues);
 	if (GetLastError() != MAPI_E_SUCCESS) {
 		return false;
 	}
@@ -1206,7 +1206,7 @@
 	attach[0].value.l = ATTACH_EMBEDDED_MSG;
 	attach[1].ulPropTag = PR_RENDERING_POSITION;
 	attach[1].value.l = 0;
-	retval = SetProps(&obj_attach, attach, 2);
+	retval = SetProps(&obj_attach, 0, attach, 2);
 	mapitest_print(mt, "* %-35s: 0x%.8x\n", "SetProps", retval);
 	if (retval != MAPI_E_SUCCESS) {
 		mapi_object_release(&obj_attach);
@@ -1419,7 +1419,7 @@
 	attach[1].value.l = 0;
 	attach[2].ulPropTag = PR_ATTACH_FILENAME;
 	attach[2].value.lpszA = "Attachment 0";
-	retval = SetProps(&obj_attach0, attach, 3);
+	retval = SetProps(&obj_attach0, 0, attach, 3);
 	mapitest_print(mt, "* %-35s: 0x%.8x\n", "SetProps", retval);
 	if (retval != MAPI_E_SUCCESS) {
 		ret = false;
@@ -1448,7 +1448,7 @@
 	attach[1].value.l = 0;
 	attach[2].ulPropTag = PR_ATTACH_FILENAME;
 	attach[2].value.lpszA = "Attachment 1";
-	retval = SetProps(&obj_attach1, attach, 3);
+	retval = SetProps(&obj_attach1, 0, attach, 3);
 	mapitest_print(mt, "* %-35s: 0x%.8x\n", "SetProps", retval);
 	if (retval != MAPI_E_SUCCESS) {
 		ret = false;
Index: utils/openchange-tools.c
===================================================================
--- utils/openchange-tools.c	(revision 1872)
+++ utils/openchange-tools.c	(working copy)
@@ -219,7 +219,7 @@
 					  PR_HASATTACH,
 					  PR_MESSAGE_CODEPAGE);
 	lpProps = talloc_zero(mem_ctx, struct SPropValue);
-	retval = GetProps(obj_message, SPropTagArray, &lpProps, &count);
+	retval = GetProps(obj_message, 0, SPropTagArray, &lpProps, &count);
 	MAPIFreeBuffer(SPropTagArray);
 	MAPI_RETVAL_IF(retval, retval, NULL);
 
Index: utils/openchangeclient.c
===================================================================
--- utils/openchangeclient.c	(revision 1872)
+++ utils/openchangeclient.c	(working copy)
@@ -287,14 +287,14 @@
 
 	/* retrieve the folder ID */
 	SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, PR_FID);
-	retval = GetProps(obj_folder, SPropTagArray, &lpProps, &count);
+	retval = GetProps(obj_folder, 0, SPropTagArray, &lpProps, &count);
 	MAPIFreeBuffer(SPropTagArray);
 	if (GetLastError() != MAPI_E_SUCCESS) return NULL;
 	fid = (const uint64_t *)get_SPropValue_data(lpProps);
 
 	/* retrieve the message ID */
 	SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, PR_MID);
-	retval = GetProps(obj_message, SPropTagArray, &lpProps, &count);
+	retval = GetProps(obj_message, 0, SPropTagArray, &lpProps, &count);
 	MAPIFreeBuffer(SPropTagArray);
 	if (GetLastError() != MAPI_E_SUCCESS) return NULL;
 	mid = (const uint64_t *)get_SPropValue_data(lpProps);
@@ -444,7 +444,7 @@
 					
 					SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, PR_HASATTACH);
 					lpProps = talloc_zero(mem_ctx, struct SPropValue);
-					retval = GetProps(&obj_message, SPropTagArray, &lpProps, &count);
+					retval = GetProps(&obj_message, 0, SPropTagArray, &lpProps, &count);
 					MAPIFreeBuffer(SPropTagArray);
 					if (retval != MAPI_E_SUCCESS) return retval;
 					
@@ -481,7 +481,7 @@
 													  PR_ATTACH_LONG_FILENAME,
 													  PR_ATTACH_SIZE);
 									lpProps2 = talloc_zero(mem_ctx, struct SPropValue);
-									retval = GetProps(&obj_attach, SPropTagArray, &lpProps2, &count2);
+									retval = GetProps(&obj_attach, MAPI_UNICODE, SPropTagArray, &lpProps2, &count2);
 									MAPIFreeBuffer(SPropTagArray);
 									if (retval != MAPI_E_SUCCESS) return retval;
 									
@@ -869,7 +869,7 @@
 		}
 	}
 
-	retval = SetProps(&obj_message, props, prop_count);
+	retval = SetProps(&obj_message, 0, props, prop_count);
 	if (retval != MAPI_E_SUCCESS) return retval;
 
 	/* attachment related code */
@@ -897,7 +897,7 @@
 			count_props_attach = 3;
 
 			/* SetProps */
-			retval = SetProps(&obj_attach, props_attach, count_props_attach);
+			retval = SetProps(&obj_attach, 0, props_attach, count_props_attach);
 			if (retval != MAPI_E_SUCCESS) return retval;
 
 			/* Stream operations */
@@ -1138,7 +1138,7 @@
 	flag = (oclient->private == true) ? 2 : 0;
 	lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PR_SENSITIVITY, (const void *)&flag);
 	
-	retval = SetProps(obj_message, lpProps, cValues);
+	retval = SetProps(obj_message, 0, lpProps, cValues);
 	MAPIFreeBuffer(lpProps);
 	MAPI_RETVAL_IF(retval, retval, NULL);
 
@@ -1236,7 +1236,7 @@
 	if (!oclient->update) {
 		lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PR_MESSAGE_CLASS, (const void *)"IPM.Contact");
 	}
-	retval = SetProps(obj_message, lpProps, cValues);
+	retval = SetProps(obj_message, 0, lpProps, cValues);
 	MAPIFreeBuffer(SPropTagArray);
 	MAPIFreeBuffer(lpProps);
 	MAPI_RETVAL_IF(retval, retval, NULL);
@@ -1356,7 +1356,7 @@
 		}
 	}
 
-	retval = SetProps(obj_message, lpProps, cValues);
+	retval = SetProps(obj_message, 0, lpProps, cValues);
 	MAPIFreeBuffer(lpProps);
 	MAPI_RETVAL_IF(retval, retval, NULL);
 
@@ -1465,7 +1465,7 @@
 	}
 
 	
-	retval = SetProps(obj_message, lpProps, cValues);
+	retval = SetProps(obj_message, 0, lpProps, cValues);
 	MAPIFreeBuffer(lpProps);
 	MAPI_RETVAL_IF(retval, retval, NULL);
 	
@@ -1532,7 +1532,7 @@
 	if (retval != MAPI_E_SUCCESS) return false;
 
 	SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, PR_CONTAINER_CLASS);
-	retval = GetProps(&obj_folder, SPropTagArray, &lpProps, &count);
+	retval = GetProps(&obj_folder, 0, SPropTagArray, &lpProps, &count);
 	MAPIFreeBuffer(SPropTagArray);
 	mapi_object_release(&obj_folder);
 	if ((lpProps[0].ulPropTag != PR_CONTAINER_CLASS) || (retval != MAPI_E_SUCCESS)) {
@@ -1681,7 +1681,7 @@
 
 	/* Retrieve the mailbox folder name */
 	SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, PR_DISPLAY_NAME_UNICODE);
-	retval = GetProps(obj_store, SPropTagArray, &lpProps, &cValues);
+	retval = GetProps(obj_store, MAPI_UNICODE, SPropTagArray, &lpProps, &cValues);
 	MAPIFreeBuffer(SPropTagArray);
 	if (retval != MAPI_E_SUCCESS) return false;
 
@@ -1784,7 +1784,7 @@
 				if (oclient->summary) {
 					mapidump_message_summary(&obj_message);
 				} else {
-					retval = GetPropsAll(&obj_message, &properties_array);
+					retval = GetPropsAll(&obj_message, MAPI_UNICODE, &properties_array);
 					if (retval == MAPI_E_SUCCESS) {
 						id = talloc_asprintf(mem_ctx, ": %"PRIX64"/%"PRIX64,
 								     SRowSet.aRow[i].lpProps[0].value.d,
@@ -2115,7 +2115,7 @@
 							     SRowSet.aRow[i].lpProps[1].value.d,
 							     &obj_message, 0);
 					if (GetLastError() == MAPI_E_SUCCESS) {
-						retval = GetPropsAll(&obj_message, &properties_array);
+						retval = GetPropsAll(&obj_message, MAPI_UNICODE, &properties_array);
 						if (retval != MAPI_E_SUCCESS) return retval;
 						id = talloc_asprintf(mem_ctx, ": %"PRIX64"/%"PRIX64,
 								     SRowSet.aRow[i].lpProps[0].value.d,
@@ -2568,7 +2568,7 @@
 	/* Step7. Set message properties */
 	lpProps = ocpf_get_SPropValue(&cValues);
 
-	retval = SetProps(&obj_message, lpProps, cValues);
+	retval = SetProps(&obj_message, 0, lpProps, cValues);
 	MAPIFreeBuffer(lpProps);
 	if (retval != MAPI_E_SUCCESS) return false;
 
@@ -2625,7 +2625,7 @@
 	if (retval != MAPI_E_SUCCESS) return false;
 
 	/* Step 3. retrieve all message properties */
-	retval = GetPropsAll(&obj_message, &lpProps);
+	retval = GetPropsAll(&obj_message, MAPI_UNICODE, &lpProps);
 
 	/* Step 4. save the message */
 	ret = ocpf_init();
Index: utils/openchangepfadmin.c
===================================================================
--- utils/openchangepfadmin.c	(revision 1872)
+++ utils/openchangepfadmin.c	(working copy)
@@ -185,7 +185,7 @@
 		set_SPropValue_proptag(&props[0], PR_CONTAINER_CLASS, (const void *) type);
 		prop_count++;
 
-		retval = SetProps(&obj_folder, props, prop_count);
+		retval = SetProps(&obj_folder, 0, props, prop_count);
 		mapi_object_release(&obj_folder);
 		MAPI_RETVAL_IF(retval, GetLastError(), NULL);
 	}
Index: utils/exchange2mbox.c
===================================================================
--- utils/exchange2mbox.c	(revision 1872)
+++ utils/exchange2mbox.c	(working copy)
@@ -489,7 +489,7 @@
 									  PR_ATTACH_LONG_FILENAME,
 									  PR_ATTACH_SIZE);
 					lpProps = talloc_zero(mem_ctx, struct SPropValue);
-					retval = GetProps(&obj_attach, SPropTagArray, &lpProps, &count);
+					retval = GetProps(&obj_attach, MAPI_UNICODE, SPropTagArray, &lpProps, &count);
 					MAPIFreeBuffer(SPropTagArray);
 					if (retval == MAPI_E_SUCCESS) {
 						aRow2.ulAdrEntryPad = 0;
@@ -746,7 +746,7 @@
 								  PR_DISPLAY_BCC,
 								  PR_DISPLAY_BCC_UNICODE,
 								  PR_HASATTACH);
-				retval = GetProps(&obj_message, SPropTagArray, &lpProps, &count);
+				retval = GetProps(&obj_message, MAPI_UNICODE, SPropTagArray, &lpProps, &count);
 				MAPIFreeBuffer(SPropTagArray);
 				if (retval != MAPI_E_SUCCESS) {
 					exit (1);
Index: torture/mapi_sendcontacts.c
===================================================================
--- torture/mapi_sendcontacts.c	(revision 1872)
+++ torture/mapi_sendcontacts.c	(working copy)
@@ -104,7 +104,7 @@
 	set_SPropValue_proptag(&props[2], PR_MESSAGE_CLASS, (const void *)"IPM.Contact");
 	set_SPropValue_proptag(&props[3], PR_NORMALIZED_SUBJECT, (const void *) cardname);
 	set_SPropValue_proptag(&props[4], SPropTagArray->aulPropTag[1], (const void *) cardname);
-	retval = SetProps(&obj_message, props, 5);
+	retval = SetProps(&obj_message, 0, props, 5);
 	mapi_errstr("SetProps", GetLastError());
 	MAPIFreeBuffer(SPropTagArray);
 	if (retval != MAPI_E_SUCCESS) return false;
Index: torture/mapi_common.c
===================================================================
--- torture/mapi_common.c	(revision 1872)
+++ torture/mapi_common.c	(working copy)
@@ -336,7 +336,7 @@
 	set_SPropValue_proptag(&props[0], PR_SUBJECT, (const void *)subject);
 	set_SPropValue_proptag(&props[1], PR_BODY, (const void *)body);
 	set_SPropValue_proptag(&props[2], PR_MESSAGE_FLAGS, (const void *)&flags);
-	retval = SetProps(&obj_message, props, 3);
+	retval = SetProps(&obj_message, 0, props, 3);
 	MAPI_RETVAL_IF(retval, retval, mem_ctx);
 
 	retval = SaveChangesMessage(obj_parent, &obj_message, KeepOpenReadOnly);
Index: torture/mapi_fetchcontacts.c
===================================================================
--- torture/mapi_fetchcontacts.c	(revision 1872)
+++ torture/mapi_fetchcontacts.c	(working copy)
@@ -106,7 +106,7 @@
 					     SRowSet.aRow[i].lpProps[1].value.d,
 					     &obj_message, 0);
 			if (retval != MAPI_E_NOT_FOUND) {
-				retval = GetPropsAll(&obj_message, &properties_array);
+				retval = GetPropsAll(&obj_message, MAPI_UNICODE, &properties_array);
 				mapidump_contact(&properties_array, NULL);
 				mapi_object_release(&obj_message);
 			}
Index: torture/mapi_sendmail.c
===================================================================
--- torture/mapi_sendmail.c	(revision 1872)
+++ torture/mapi_sendmail.c	(working copy)
@@ -139,7 +139,7 @@
 	set_SPropValue_proptag(&props[1], PR_BODY, (const void *)body);
 	set_SPropValue_proptag(&props[2], PR_MESSAGE_FLAGS, (const void *)&msgflag);
 
-	retval = SetProps(&obj_message, props, CN_MSG_PROPS);
+	retval = SetProps(&obj_message, 0, props, CN_MSG_PROPS);
 	mapi_errstr("SetProps", GetLastError());
 	if (retval != MAPI_E_SUCCESS) return false;
 
Index: torture/mapi_fetchmail.c
===================================================================
--- torture/mapi_fetchmail.c	(revision 1872)
+++ torture/mapi_fetchmail.c	(working copy)
@@ -116,7 +116,7 @@
 					     &obj_message, 0);
 
 			if (GetLastError() != MAPI_E_NOT_FOUND) {
-			  retval = GetPropsAll(&obj_message, &properties_array);
+			  retval = GetPropsAll(&obj_message, MAPI_UNICODE, &properties_array);
 			  mapidump_message(&properties_array, NULL, &obj_message);
 			  mapi_object_release(&obj_message);
 			}
Index: torture/mapi_sendtasks.c
===================================================================
--- torture/mapi_sendtasks.c	(revision 1872)
+++ torture/mapi_sendtasks.c	(working copy)
@@ -105,7 +105,7 @@
 	set_SPropValue_proptag(&props[2], PR_MESSAGE_CLASS, (const void *)"IPM.Task");
 	set_SPropValue_proptag(&props[3], PR_PRIORITY, (const void *)&priority);
 	set_SPropValue_proptag(&props[4], SPropTagArray->aulPropTag[0], (const void *)&status);
-	retval = SetProps(&obj_message, props, CN_PROPS);
+	retval = SetProps(&obj_message, 0, props, CN_PROPS);
 	mapi_errstr("SetProps", GetLastError());
 	MAPIFreeBuffer(SPropTagArray);
 	if (retval != MAPI_E_SUCCESS) return false;
Index: torture/mapi_fetchtasks.c
===================================================================
--- torture/mapi_fetchtasks.c	(revision 1872)
+++ torture/mapi_fetchtasks.c	(working copy)
@@ -107,7 +107,7 @@
 					     SRowSet.aRow[i].lpProps[1].value.d,
 					     &obj_message, 0);
 			if (retval != MAPI_E_NOT_FOUND) {
-				retval = GetPropsAll(&obj_message, &properties_array);
+				retval = GetPropsAll(&obj_message, MAPI_UNICODE, &properties_array);
 				if (retval == MAPI_E_SUCCESS) {
 				  mapidump_task(&properties_array, NULL);
 					mapi_object_release(&obj_message);
Index: torture/mapi_criteria.c
===================================================================
--- torture/mapi_criteria.c	(revision 1872)
+++ torture/mapi_criteria.c	(working copy)
@@ -98,7 +98,7 @@
 	/* Set Props */
 	lpProps[0].ulPropTag = PR_CONTAINER_CLASS;
 	lpProps[0].value.lpszA = "IPF.Note";
-	retval = SetProps(&obj_searchdir, lpProps, 1);
+	retval = SetProps(&obj_searchdir, 0, lpProps, 1);
 	mapi_errstr("SetProps", GetLastError());
 	if (retval != MAPI_E_SUCCESS) return false;
 
Index: torture/mapi_namedprops.c
===================================================================
--- torture/mapi_namedprops.c	(revision 1872)
+++ torture/mapi_namedprops.c	(working copy)
@@ -115,7 +115,7 @@
 			     &obj_message, Create);
 	if (retval != MAPI_E_SUCCESS) return false;
 
-	retval = GetPropsAll(&obj_message, &props_array);
+	retval = GetPropsAll(&obj_message, MAPI_UNICODE, &props_array);
 	if (retval != MAPI_E_SUCCESS) return false;
 
 	/* loop through properties, search for named properties
@@ -234,7 +234,7 @@
 		printf("\n\n5. Assigning %s to %s\n", NAMEDPROP_VALUE, NAMEDPROP_NAME);
 		
 		set_SPropValue_proptag(&props[0], propID, (const void *)testval);
-		retval = SetProps(&obj_message, props, 1);
+		retval = SetProps(&obj_message, 0, props, 1);
 		if (retval != MAPI_E_SUCCESS) return false;
 		mapi_errstr("SetProps", GetLastError());
 		
@@ -263,7 +263,7 @@
 	printf("\n\n7. GetProps (torture_namedprops property)\n");
 	propID = (propID & 0xFFFF0000) | PT_STRING8;
 	SPropTagArray = set_SPropTagArray(mem_ctx, 0x1, propID);
-	retval = GetProps(&obj_message, SPropTagArray, &propvals, &cn_propvals);
+	retval = GetProps(&obj_message, 0, SPropTagArray, &propvals, &cn_propvals);
 	MAPIFreeBuffer(SPropTagArray);
 	mapi_errstr("GetProps", GetLastError());
 	if (retval != MAPI_E_SUCCESS) return false;
Index: torture/mapi_fetchappointment.c
===================================================================
--- torture/mapi_fetchappointment.c	(revision 1872)
+++ torture/mapi_fetchappointment.c	(working copy)
@@ -107,7 +107,7 @@
 					     SRowSet.aRow[i].lpProps[1].value.d,
 					     &obj_message, 0);
 			if (retval != MAPI_E_NOT_FOUND) {
-				retval = GetPropsAll(&obj_message, &properties_array);
+				retval = GetPropsAll(&obj_message, MAPI_UNICODE, &properties_array);
 				if (retval == MAPI_E_SUCCESS) {
 				  mapidump_appointment(&properties_array, NULL);
 					mapi_object_release(&obj_message);
Index: torture/mapi_sendappointment.c
===================================================================
--- torture/mapi_sendappointment.c	(revision 1872)
+++ torture/mapi_sendappointment.c	(working copy)
@@ -157,7 +157,7 @@
 	flag = 30;
 	set_SPropValue_proptag(&props[12], SPropTagArray->aulPropTag[6], (const void *)&flag);
 	set_SPropValue_proptag(&props[13], PR_BODY, (const void *)(body?body:""));
-	retval = SetProps(&obj_message, props, CN_PROPS);
+	retval = SetProps(&obj_message, 0, props, CN_PROPS);
 	mapi_errstr("SetProps", GetLastError());
 	MAPIFreeBuffer(SPropTagArray);
 	if (retval != MAPI_E_SUCCESS) return false;
Index: torture/mapi_fetchattach.c
===================================================================
--- torture/mapi_fetchattach.c	(revision 1872)
+++ torture/mapi_fetchattach.c	(working copy)
@@ -52,7 +52,7 @@
   /* Get Attachment size
    */
   proptags = set_SPropTagArray(ctx_mem, 0x1, PR_ATTACH_SIZE);
-  status = GetProps(obj_attach, proptags, &vals, &cn_vals);
+  status = GetProps(obj_attach, 0, proptags, &vals, &cn_vals);
   mapi_errstr("GetProps", GetLastError());
   if (status != MAPI_E_SUCCESS) return status;
 
Index: torture/mapi_sendattach.c
===================================================================
--- torture/mapi_sendattach.c	(revision 1872)
+++ torture/mapi_sendattach.c	(working copy)
@@ -153,7 +153,7 @@
 	set_SPropValue_proptag(&props[0], PR_SUBJECT, (const void *)subject);
 	set_SPropValue_proptag(&props[1], PR_BODY, (const void *)body);
 	set_SPropValue_proptag(&props[2], PR_MESSAGE_FLAGS, (const void *)&msgflag);
-	retval = SetProps(&obj_message, props, CN_MSG_PROPS);
+	retval = SetProps(&obj_message, 0, props, CN_MSG_PROPS);
 	mapi_errstr("SetProps", GetLastError());
 
 	/* CreateAttach */
@@ -171,7 +171,7 @@
 	cn_props_attach = 3;
 
 	/* SetProps */
-	retval = SetProps(&obj_attach, props_attach, cn_props_attach);
+	retval = SetProps(&obj_attach, 0, props_attach, cn_props_attach);
 	mapi_errstr("SetProps", GetLastError());
 	if (retval != MAPI_E_SUCCESS) return false;
 
Index: torture/mapi_sendmail_html.c
===================================================================
--- torture/mapi_sendmail_html.c	(revision 1872)
+++ torture/mapi_sendmail_html.c	(working copy)
@@ -159,7 +159,7 @@
 	set_SPropValue_proptag(&props[0], PR_SUBJECT, (const void *)subject);
 	set_SPropValue_proptag(&props[1], PR_HTML, (const void *)&html);
 	set_SPropValue_proptag(&props[2], PR_MESSAGE_FLAGS, (const void *)&msgflag);
-	retval = SetProps(&obj_message, props, 3);
+	retval = SetProps(&obj_message, 0, props, 3);
 	mapi_errstr("SetProps", GetLastError());
 
 	/* message->SubmitMessage() */
_______________________________________________
devel mailing list
devel@lists.openchange.org
http://mailman.openchange.org/listinfo/devel

Reply via email to