CoTaskMemFree的用法
来源:互联网 发布:家具erp 知乎 编辑:程序博客网 时间:2024/06/06 05:01
http://blog.csdn.net/gaoxiaowei/article/details/5701789
从网上看来的说法:
The thing is that COM (actually the RPC runtime library, but it's easier to blame COM) has an additional requirement for [out] pointers. This requirement is that if the type of an [out] parameter isn't a scalar quantity (in other words if it's a structure or anything more complicated than a int or float), then the memory pointed to by the [out] parameter needs to be allocated either by MIDL_user_allocate (for RPC) or (for COM).
也就是说,如果需要调用COM接口,并且接口中有[out]的参数,且类型不是整形或浮点数之类的基本数据类型,就需要调用CoTaskMemAlloc来申请这块内存,并使用完毕后调用CoTaskMemFree来释放。
- CoTaskMemFree的用法
- 关于什么时候使用CoTaskMemAlloc/CoTaskMemFree来申请/释放内存
- 关于什么时候使用CoTaskMemAlloc/CoTaskMemFree来申请/释放内存
- ?的用法
- ?的用法
- ---" ~ " 的用法---
- ---" ~ " 的用法---
- ~ 的用法
- 的用法
- ##的用法
- ##的用法
- 的用法
- ${ }的用法
- ##的用法
- ${ }的用法
- "->"的用法
- ${ }的用法
- >>的用法
- js实现批量删除,编辑操作
- mongodb的备份与还原
- JavaWeb开发过滤器Filter
- Google OAUTH + OpenID解决方案
- tar命令详解
- CoTaskMemFree的用法
- LeetCode 6: ZigZag Conversion
- 空管局通信资源管理系统
- 偶遇TCP: time wait bucket table overflow错误
- FastDFS+Nginx 集成并实现断点续传(一)
- Android Intent 基本使用及对象构成
- SQL批量复制命令的六个陷阱
- 给android添加系统属性:Settings.system和SystemProperties
- allocator自定义实现