中 ANYSIZE_ARRAY 的用途是什么?
位于 WinNT.h 中的 ANYSIZE_ARRAY
的用途是什么?
我在 2004 年看到一篇关于它的 MSDN 博客文章,但它对我来说没有意义。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我假设您正在谈论 这篇博文。
当可变大小(编译时未知)数组是结构的一部分时,通常会使用它:
要使用这些结构,您通常首先调用所需的 API 来获取数据的大小,然后分配足够大的内存块最后再次调用相同的 API,以便它可以填充数据......
I assume you are talking about this blog post.
It is often used when a variable-sized (unknown at compile time) array is part of a struct:
To work with those structures you often first call the desired API to get the size of the data, then allocate a block of memory big enough and finally call the same API again so it can fill in the data...
来自此页面:
From this page: