要先uses一个Unit,大概是ActiveX或者ComServ,你试试吧。
解决方案 »
- delphi中listview错行显示的原因
- 请问如何实现报表中隔开各列的竖线的打印?以及为什么我在QReport中,为什么控件老是会乱跑,修改一下就会跑到页面外的地方?
- To 奇怪的问题(在线等待)
- 菜鸟求助!
- 请各位给点建议
- 这样的SQL SERVER 数据库 误操作 还能恢复吗?高手请进
- 长空万古查收
- 有关Delphi下socket的问题
- 重贴:(版主别骂我, 我已经找过了, 但是没找着答案,另外下面的那个打不开又删不掉)怎样用{$define}定义一个几个单元都能用{$ifdef}来使用
- 一个关于存储设备的问题,在线给分!!!
- 在SQL Server中如何用Select语句给返回的每行加一序号
- 关天DELPHI窗体
否则就是你的Delphi不对。
begin
Coinitialize
end;
如是,在该线程里加上CoInitialize和CoUninitialize。
原因如下(引自msdn):
This function initializes the COM library on the current thread 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.