mapi_object_init(&obj_message);
retval = OpenMessage(&obj_store, *fid, *mid, &obj_message, 0x0);
if (retval != MAPI_E_NOT_FOUND) {
- retval = GetPropsAll(&obj_message, &props_all);
+ retval = GetPropsAll(&obj_message, MAPI_UNICODE, &props_all);
mapidump_appointment(&props_all, NULL);
mapi_object_release(&obj_message);
}
mapi_object_init(&obj_message);
retval = OpenMessage(&obj_store, *fid, *mid, &obj_message, 0x0);
if (retval != MAPI_E_NOT_FOUND) {
- retval = GetPropsAll(&obj_message, &props_all);
+ retval = GetPropsAll(&obj_message, MAPI_UNICODE, &props_all);
mapidump_message(&props_all, NULL, &obj_message);
mapi_object_release(&obj_message);
}
);
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;
- 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;
/*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;
);
- retval = GetProps(&exchange2ical.obj_message, SPropTagArray, &lpProps, &count);
+ retval = GetProps(&exchange2ical.obj_message, MAPI_UNICODE, SPropTagArray, &lpProps, &count);
MAPIFreeBuffer(SPropTagArray);
/*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;
);
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) {
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 {
*/
uint32_t fetch()
{
- if (GetProps(&m_mapi_object, m_property_tag_array, &m_property_values, &m_cn_vals) != MAPI_E_SUCCESS)
+ if (GetProps(&m_mapi_object, MAPI_UNICODE, m_property_tag_array, &m_property_values, &m_cn_vals) != MAPI_E_SUCCESS)
throw mapi_exception(GetLastError(), "property_container::fetch : GetProps");
MAPIFreeBuffer(m_property_tag_array);
/// \brief Fetches \b ALL properties of the object associated with this container.
void fetch_all()
{
- if (GetPropsAll(&m_mapi_object, &m_property_value_array) != MAPI_E_SUCCESS)
+ if (GetPropsAll(&m_mapi_object, MAPI_UNICODE, &m_property_value_array) != MAPI_E_SUCCESS)
throw mapi_exception(GetLastError(), "property_container::fetch_all : GetPropsAll");
// Free property_tag_array in case user used operator<< by mistake.
named properties.
\param obj the object to get properties on
+ \param flags Flags for behaviour; can be bit-OR of MAPI_UNICODE and
+ MAPI_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
\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)
/* 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 & MAPI_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;
/* 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);
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 MAPI_PROPS_SKIP_NAMEDID_CHECK
\param lpProps the list of properties to set
\param PropCount the number of properties
\sa GetProps, GetPropList, GetPropsAll, DeleteProps, GetLastError
*/
-_PUBLIC_ enum MAPISTATUS SetProps(mapi_object_t *obj,
+_PUBLIC_ enum MAPISTATUS SetProps(mapi_object_t *obj,
+ uint32_t flags,
struct SPropValue *lpProps,
unsigned long PropCount)
{
/* 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 & MAPI_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;
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.
\sa GetProps, GetPropList, GetLastError
*/
_PUBLIC_ enum MAPISTATUS GetPropsAll(mapi_object_t *obj,
+ uint32_t flags,
struct mapi_SPropValue_array *properties)
{
TALLOC_CTX *mem_ctx;
/* 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 */
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 MAPI_PROPS_SKIP_NAMEDID_CHECK
\param lpProps the list of properties to set
\param PropCount the number of properties
\sa SetProps, DeletePropertiesNoReplicate
*/
_PUBLIC_ enum MAPISTATUS SetPropertiesNoReplicate(mapi_object_t *obj,
+ uint32_t flags,
struct SPropValue *lpProps,
unsigned long PropCount)
{
/* 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 & MAPI_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;
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);
... check the return value ...
// Initialise the embedded message object
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);
enum MAPISTATUS HardDeleteMessagesAndSubfolders(mapi_object_t *);
/* The following public definitions come from libmapi/IMAPIProp.c */
-enum MAPISTATUS GetProps(mapi_object_t *, struct SPropTagArray *, struct SPropValue **, uint32_t *);
-enum MAPISTATUS SetProps(mapi_object_t *, struct SPropValue *, unsigned long);
+enum MAPISTATUS GetProps(mapi_object_t *, uint32_t, struct SPropTagArray *, struct SPropValue **, uint32_t *);
+enum MAPISTATUS SetProps(mapi_object_t *, uint32_t, struct SPropValue *, unsigned long);
enum MAPISTATUS SaveChangesAttachment(mapi_object_t *, mapi_object_t *, enum SaveFlags);
enum MAPISTATUS GetPropList(mapi_object_t *, struct SPropTagArray *);
-enum MAPISTATUS GetPropsAll(mapi_object_t *, struct mapi_SPropValue_array *);
+enum MAPISTATUS GetPropsAll(mapi_object_t *, uint32_t, struct mapi_SPropValue_array *);
enum MAPISTATUS DeleteProps(mapi_object_t *, struct SPropTagArray *);
-enum MAPISTATUS SetPropertiesNoReplicate(mapi_object_t *, struct SPropValue *, unsigned long);
+enum MAPISTATUS SetPropertiesNoReplicate(mapi_object_t *, uint32_t, struct SPropValue *, unsigned long);
enum MAPISTATUS DeletePropertiesNoReplicate(mapi_object_t *, struct SPropTagArray *);
enum MAPISTATUS GetNamesFromIDs(mapi_object_t *, enum MAPITAGS, uint16_t *, struct MAPINAMEID **);
enum MAPISTATUS GetIDsFromNames(mapi_object_t *, uint16_t, struct MAPINAMEID *, uint32_t, struct SPropTagArray **);
/* UNICODE flags */
#define MAPI_UNICODE 0x80000000
+/* Other GetProps/SetProps flags */
+#define MAPI_PROPS_SKIP_NAMEDID_CHECK 0x00000001
+
/* Property types */
#define PT_UNSPECIFIED 0x0
#define PT_NULL 0x1
const uint32_t *cp;
ssize_t len;
- msgid = (const char *)find_mapi_SPropValue_data(properties, PR_INTERNET_MESSAGE_ID);
- subject = (const char *) find_mapi_SPropValue_data(properties, PR_CONVERSATION_TOPIC);
- body = (const char *) find_mapi_SPropValue_data(properties, PR_BODY);
+ msgid = (const char *)find_mapi_SPropValue_data(properties, PR_INTERNET_MESSAGE_ID_UNICODE);
+ if (!msgid)
+ msgid = (const char *)find_mapi_SPropValue_data(properties, PR_INTERNET_MESSAGE_ID);
+ subject = (const char *) find_mapi_SPropValue_data(properties, PR_CONVERSATION_TOPIC_UNICODE);
+ if (!subject)
+ subject = (const char *) find_mapi_SPropValue_data(properties, PR_CONVERSATION_TOPIC);
+ body = (const char *) find_mapi_SPropValue_data(properties, PR_BODY_UNICODE);
if (!body) {
- body = (const char *) find_mapi_SPropValue_data(properties, PR_BODY_UNICODE);
+ body = (const char *) find_mapi_SPropValue_data(properties, PR_BODY);
if (!body) {
html = (const struct SBinary_short *) find_mapi_SPropValue_data(properties, PR_HTML);
}
}
- from = (const char *) find_mapi_SPropValue_data(properties, PR_SENT_REPRESENTING_NAME);
- to = (const char *) find_mapi_SPropValue_data(properties, PR_DISPLAY_TO);
- cc = (const char *) find_mapi_SPropValue_data(properties, PR_DISPLAY_CC);
- bcc = (const char *) find_mapi_SPropValue_data(properties, PR_DISPLAY_BCC);
+ from = (const char *) find_mapi_SPropValue_data(properties, PR_SENT_REPRESENTING_NAME_UNICODE);
+ if (!from)
+ from = (const char *) find_mapi_SPropValue_data(properties, PR_SENT_REPRESENTING_NAME);
+ to = (const char *) find_mapi_SPropValue_data(properties, PR_DISPLAY_TO_UNICODE);
+ if (!to)
+ to = (const char *) find_mapi_SPropValue_data(properties, PR_DISPLAY_TO);
+ cc = (const char *) find_mapi_SPropValue_data(properties, PR_DISPLAY_CC_UNICODE);
+ if (!cc)
+ cc = (const char *) find_mapi_SPropValue_data(properties, PR_DISPLAY_CC);
+ bcc = (const char *) find_mapi_SPropValue_data(properties, PR_DISPLAY_BCC_UNICODE);
+ if (!bcc)
+ bcc = (const char *) find_mapi_SPropValue_data(properties, PR_DISPLAY_BCC);
has_attach = (const uint8_t *)find_mapi_SPropValue_data(properties, PR_HASATTACH);
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;
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);
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);
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;
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);
/* 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);
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);
PR_ATTACH_MIME_TAG,
PR_ATTACH_METHOD);
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) {
uint32_t *mp, method = -1;
PR_DISPLAY_BCC_UNICODE,
PR_HASATTACH,
PR_TRANSPORT_MESSAGE_HEADERS);
- retval = GetProps(&obj_embeddedmsg, embTagArray,
+ retval = GetProps(&obj_embeddedmsg, MAPI_UNICODE, embTagArray,
&embProps, &emb_count);
MAPIFreeBuffer(embTagArray);
PR_NORMALIZED_SUBJECT_UNICODE,
PR_SUBJECT,
PR_SUBJECT_UNICODE);
- retval = GetProps(&obj_message, SPropTagArray, &lpProps, &count);
+ retval = GetProps(&obj_message, MAPI_UNICODE, SPropTagArray, &lpProps, &count);
MAPIFreeBuffer(SPropTagArray);
if (retval != MAPI_E_SUCCESS) {
fprintf(stderr, "Badness getting row %d attrs\n", i);
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;
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) {
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) {
}
/* 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);
if (retval != MAPI_E_SUCCESS) {
mapitest_deindent();
/* 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;
/* 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;
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;
}
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;
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;
}
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);
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_retval_clean(mt, "SetProps", retval);
if (retval != MAPI_E_SUCCESS) {
ret = false;
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_retval_clean(mt, "SetProps", retval);
if (retval != MAPI_E_SUCCESS) {
ret = false;
}
/* 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);
}
/* 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;
/* 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;
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))) {
/* 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))) {
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;
/* 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))) {
/* 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");
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;
/* 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))) {
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;
/* 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))) {
/* 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))) {
}
}
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) {
/* 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))) {
}
}
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) {
/* 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");
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))) {
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;
}
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;
}
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;
}
}
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;
set_SPropValue_proptag(&lpProp[0], PR_DISPLAY_NAME, (const void *)name);
set_SPropValue_proptag(&lpProp[1], PR_SUBJECT, (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;
/* Step 4: Double check with GetProps */
SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3, PR_DISPLAY_NAME, PR_SUBJECT,
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))) {
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_clean(mt, "SetProps", retval);
if (retval != MAPI_E_SUCCESS) {
ret = false;
/* 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))) {
/* Step 8: Double check with GetProps */
SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_SUBJECT);
- 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))) {
}
}
SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3, PR_DISPLAY_NAME, PR_SUBJECT, 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) {
/* Step 10: Double check with GetProps */
SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_SUBJECT);
- 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))) {
}
}
SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3, PR_DISPLAY_NAME, PR_SUBJECT, 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) {
/* Step 12: Double check with GetProps */
SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x2, PR_DISPLAY_NAME, PR_SUBJECT);
- 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");
goto cleanup;
}
SPropTagArray = set_SPropTagArray(mt->mem_ctx, 0x3, PR_DISPLAY_NAME, PR_SUBJECT, 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))) {
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;
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;
/* 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;
}
}
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;
}
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;
/* 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;
}
}
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;
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;
/* 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))) {
/* 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");
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;
}
PR_HASATTACH,
PR_MESSAGE_CODEPAGE);
lpProps = talloc_zero(mem_ctx, struct SPropValue);
- retval = GetProps(obj_message, SPropTagArray, &lpProps, &count);
+ retval = GetProps(obj_message, MAPI_UNICODE, SPropTagArray, &lpProps, &count);
MAPIFreeBuffer(SPropTagArray);
MAPI_RETVAL_IF(retval, retval, NULL);
/* 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);
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;
PR_ATTACH_SIZE,
PR_ATTACH_CONTENT_ID);
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;
}
}
- 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 */
count_props_attach = 4;
/* 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 */
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);
if (!oclient->update) {
lpProps = add_SPropValue(mem_ctx, lpProps, &cValues, PR_MESSAGE_CLASS_UNICODE, (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);
}
}
- retval = SetProps(obj_message, lpProps, cValues);
+ retval = SetProps(obj_message, 0, lpProps, cValues);
MAPIFreeBuffer(lpProps);
MAPI_RETVAL_IF(retval, retval, NULL);
}
- retval = SetProps(obj_message, lpProps, cValues);
+ retval = SetProps(obj_message, 0, lpProps, cValues);
MAPIFreeBuffer(lpProps);
MAPI_RETVAL_IF(retval, retval, NULL);
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, MAPI_UNICODE, SPropTagArray, &lpProps, &count);
MAPIFreeBuffer(SPropTagArray);
mapi_object_release(&obj_folder);
if ((lpProps[0].ulPropTag != PR_CONTAINER_CLASS) || (retval != MAPI_E_SUCCESS)) {
/* 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;
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,
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,
/* Step7. Set message properties */
lpProps = ocpf_get_SPropValue(context_id, &cValues);
- retval = SetProps(&obj_message, lpProps, cValues);
+ retval = SetProps(&obj_message, 0, lpProps, cValues);
MAPIFreeBuffer(lpProps);
if (retval != MAPI_E_SUCCESS) return false;
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();
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);
}