Hacker News new | ask | show | jobs
by andrewf 1613 days ago
Specific example from the good old days: EnableTraceEx2 "supersedes the EnableTrace and EnableTraceEx functions.". https://docs.microsoft.com/en-us/windows/win32/api/evntrace/...

Func -> FuncEx -> FuncExN was a common pattern. (Which I like more than Func -> Funcness -> FuncnessContext, despite the lack of creativity!) Another one was tagging structures with their own length as the first member variable, so if a later SDK creates a newer version of the struct, the callee can tell the difference. eg https://docs.microsoft.com/en-us/windows/win32/seccrypto/cry...