It would be nice if the BytesToStr function had a selection length parameter. This way the plug-in could choose to display only exact matches in the inspector.
... BytesToStr(
void* ThisPtr,
uint8_t* Bytes,
int ByteCount,
TFormattingOptions FormattingOptions,
int* ConvertedByteCount,
const wchar_t** ConvertedStr,
int ByteSelectionCount
);
ByteSelectionCount would be 0 if there is no selection, just a cursor position change. This is the way the API works today. To only display exact matches a plug-in could choose to do something like:
if (ByteCount >= 4 && (ByteSelectionCount == 0 || ByteSelectionCount == 4))
{
const wchar_t* match = LookupUINT32Constants(Bytes);
if (match) ...
}
if (ByteCount >= 2 && (ByteSelectionCount == 0 || ByteSelectionCount == 2))
{
...
}
It would be nice if the BytesToStr function had a selection length parameter. This way the plug-in could choose to display only exact matches in the inspector.
ByteSelectionCount would be 0 if there is no selection, just a cursor position change. This is the way the API works today. To only display exact matches a plug-in could choose to do something like: