@Vitalii-Dovgan said in Announcement: NPPM_GETOPENFILENAMES and related are being deprecated in v8.8.2:
My last question was rather related to NPPM_GETFULLCURRENTPATH, NPPM_GETCURRENTDIRECTORY and the other messages from the same family. These messages:
are internally limited by MAX_PATH; do not provide ability to request/retrieve the length required for the returned path/name.
See the first part of this comment and the first part of the reply by the maintainer of Notepad++.
The MAX_PATH limitation is present in the file handling routines of Notepad++, not just the interface for these messages. As I read that reply, Don has rejected (for now, at least) consideration that the MAX_PATH constraint might someday be removed. If you know MAX_PATH is enough, there’s no need to request the actual length ahead of time.
I agree that there is some inconsistency in what is considered appropriate for deprecation, but I return to the observation that it will always be possible to screw up calling a C interface, and there were and are compelling reasons to keep the plugin interface as a pure C interface. (If we could pass a std::wstring or a std::vector<std::wstring> the whole problem would go away.) It’s a judgement call what is “too error-prone.” Not worth all that much debate.