On September 11, 2002 11:07 am, Patrik Stridvall wrote:
Well as I said a lot of API use LPSTR when it really should use LPCSTR so the potential IO/OUT cases are quite a few.
I don't think it's "lot". Can you give a count where LPSTR/LPWSTR is used for a IN parameter only? And those we can fix in our sources, as you said.
You mean just add a OUT before the type. That is quite easy to parse.
Even better -- encode it in the typeinfo.
/* M = modifiable */ typedef LPSTR LPMSTR; typedef LPWSTR LPMWSTR;
Use LPM{,W}STR instead of LP{,W}STR where the parameter is an IO one. The type are equivalent, so no one will notice a difference except our parsing tool.
BTW, how many are IO? I would suspect most are O only...