Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request; PWR_ObjGetName #36

Open
hlward opened this issue Apr 5, 2018 · 0 comments
Open

Feature request; PWR_ObjGetName #36

hlward opened this issue Apr 5, 2018 · 0 comments

Comments

@hlward
Copy link

hlward commented Apr 5, 2018

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 :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant