Ok, here's a simple q&d sample plug-in with C++ source:
http://wincmd.ru/files/9924355/tc10_wdx_test.zip
The 0x800 came through another misunderstanding: the docs clearly say:
contflags_fieldsearch
Pass the search string to the plugin via ContentFindValue instead of calling ContentGetValue and comparing the results. New in Total Commander 10.
As
I didn't expect a call to ContentGetValue(), I used the maxlen parameter for FieldType in an internal call for a function handling both ContentFindValue() and ContentGetValue().
Sorry for the confusion. So all in all this means that TC makes a call to ContentGetValue() for a field flagged with
contflags_fieldsearch. I call a messag box in the plug-in for this case.
So why does TC call ContentGetValue() in the plug-in chooser dialog despite the flag and the docs? This is the most confusing part: sure, having a field handling both functions might be useful at some point, but this isn't consistent with the other wdx features: if I mark a field for "compare by content", I'm expecting it to be only requested from ContentCompareFiles(), and so on.
It's even more confusing as the same happens with the custom columns editor dialog: TC calls ContentGetValue() when I click on such field in the dialog. Same with the custom column view itself: when I've selected such field for a view, TC calls ContentGetValue() for each file.
And concerning the "!": this will
only show if I combine contflags_fieldsearch with
contflags_searchpageonly. But even then TC calls ContentGetValue() in the plug-in chooser dialog from via "Find text" -> Plugins, but they seem to
not appear in the custom column chooser dialog at all.
In any case: I will use
contflags_fieldsearch only in combination with
contflags_searchpageonly. And I can confirm that the double pointer/BOOL mechanism works, though it's quite cumbersome.