CoInitialize 上保留参数的预期用途是什么
它创建至今已有大约 16 年了,我仍然不知道为什么 CoInitialize 方法。有谁知道(或能够做出明智的猜测)为什么添加此参数以及预期用途是什么?
Its been about 16 years now since it was created and I still don't know why there was a reserved parameter in the CoInitialize method. Does anyone know (or is able to make an intelligent guess about) why this parameter was added and what the anticipated use was?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这其实并不是为了以后使用,而是为了向后兼容。阅读:为什么在 CoInitialize 期间指定分配器的功能从系统中删除了? by @Larry奥斯特曼,他实际上偶尔会在这里闲逛......
简而言之:该参数过去允许您指定自定义分配器。但由于该功能已被滥用,因此已被弃用。
This is actually not for future use, but for backward compatibility. Read: Why was the ability to specify an allocator during CoInitialize removed from the system? by @Larry Osterman, who actually hangs around here occasionally...
In short: that argument used to allow you to specify a custom allocator. But since that feature has been misused, it was deprecated.