Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SetColumns with a MVI_FLAG property fails with error #609

Open
jengelh opened this issue Aug 20, 2023 · 0 comments
Open

SetColumns with a MVI_FLAG property fails with error #609

jengelh opened this issue Aug 20, 2023 · 0 comments
Assignees
Labels

Comments

@jengelh
Copy link
Contributor

jengelh commented Aug 20, 2023

Version: 23.0.23089.01 MFCMAPI Unicode x64

Reproduction

Make a contact with Outlook. Then open the "Root Container\Top of Information Store\Contacts" folder in MFCMAPI. The contact that was created by Outlook usually has some PT_MV_LONG properties, e.g. PidLidFileUnderList (mapped to 0x81AF1003 here).

contact

From the menu, choose Table ► Set Columns. Add that property to the list, but do set the MV_INSTANCE bit, e.g. enter 0x81AF3003.

contact2

Close the dialog with "OK".

Observed behavior

MFCMAPI throws an error at this point:

Error:
Code: MAPI_E_NO_SUPPORT == 0x80040102
Function lpContentsTable->QueryRows(rowCount, NULL, &pRows)
File D:\a\1\s\UI\Controls\SortList\ContentsTableListCtrl.cpp
Line 579

Expected behavior

Do not throw an error. / Give user more details (see below).

Background

MFCMAPI is too eager to call QueryRows right away after columns were set. Without a matching sortorder which includes MV_INSTANCE properties, the QueryRows call will always be rejected. However, it is not possible to edit the sortorder ahead of editing the column set, as that will also lead to a QueryRows error, because QueryRows does not like sortorders referencing properties that are not in the set of chosen columns.

Desired behavior

Let MFCMAPI take notice that there is one or more MV_INSTANCE properties in the column set, and show extra text in the error dialog that the error can be expected behavior and that a suitable sortorder needs to be set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants