You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do I really have to guess about the size of the buffer to pass? Wouldn't it be nice if, say, the size parameter was value-return? Then, instead of returning an error, do what is done now and update the size with the total length.
If the updated length is greater then what I passed in then I know:
a) The buffer has a truncated result
b) What the size of the buffer is that I need.
Because... Right now...
while (PWR_ObjGetName == PWR_RET_TRUNC)
double the buffer size
reallocate a bigger buffer
trim the buffer
...is awkward :(
The text was updated successfully, but these errors were encountered:
Do I really have to guess about the size of the buffer to pass? Wouldn't it be nice if, say, the size parameter was value-return? Then, instead of returning an error, do what is done now and update the size with the total length.
If the updated length is greater then what I passed in then I know:
a) The buffer has a truncated result
b) What the size of the buffer is that I need.
Because... Right now...
while (PWR_ObjGetName == PWR_RET_TRUNC)
double the buffer size
reallocate a bigger buffer
trim the buffer
...is awkward :(
The text was updated successfully, but these errors were encountered: