- Dec 24, 2004
- 2,583
- 0
- 0
Hi all,
I had a question about a specific function in the winGDI api, CreateDIBsection()
It looks to me like you pass this function a BITMAPINFO and a void**, and it points that pointer to direct memory access to the bits it allocates. However, it doesn't pass you back anything specifying how much memory it allocated, and so the buffer returned appears to be unbounded. I can't figure out how to check whether I'm going out of bounds when I'm using the allocated memory other than to just trust that it was done correctly.
Is there a way to do this that I've overlooked?
Thanks!
I had a question about a specific function in the winGDI api, CreateDIBsection()
It looks to me like you pass this function a BITMAPINFO and a void**, and it points that pointer to direct memory access to the bits it allocates. However, it doesn't pass you back anything specifying how much memory it allocated, and so the buffer returned appears to be unbounded. I can't figure out how to check whether I'm going out of bounds when I'm using the allocated memory other than to just trust that it was done correctly.
Is there a way to do this that I've overlooked?
Thanks!