首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ Builder >

CoInitialize(NULL); 这句到底有什么作用,该如何解决

2012-04-20 
CoInitialize(NULL) 这句到底有什么作用CoInitialize(NULL)在什么情况下要用这句话呢,能说的详细点吗,谢

CoInitialize(NULL); 这句到底有什么作用
CoInitialize(NULL);
在什么情况下要用这句话呢,
能说的详细点吗,谢谢了

[解决办法]
Initializes the COM library on the current apartment and identifies the concurrency model as single-thread apartment (STA). Applications must initialize the COM library before they can call COM library functions other than CoGetMalloc and memory allocation functions.

初始化com库。应用程序调用com库函数(除CoGetMalloc和内存分配函数)之前必须初始化com库
New applications should call CoInitializeEx instead of CoInitialize.
新的应用程序应该调用CoInitializeEx而不是CoInitialize


[解决办法]
一般是在 Dll 中使用 COM 才会需要使用的

热点排行