Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
WTF Windows?
If you call the API function to lookup the name of a service it expects a buffer and the size of the buffer.
If the supplied size is smaller than the service name it returns the number of characters (excluding the null-terminator) of the service name.
You can allocate a buffer for the service name and call the function again to receive the service name.
Except now Windows wants to know the size of the buffer including null terminators.
That took me a moment to figure out.
rant