dll中创建adoconnetion,报错'尚未调用CoInitialize',为什么啊

解决方案 »

  1.   

    在DLL中创建com组件需要首先调用一下CoInitializeEx,MSDN中的说明:
    Initializes the COM library for use by the calling thread, sets the thread's concurrency model, and creates a new apartment for the thread if one is required. 
      

  2.   

    ActiveX类组件的动态建立,都需要CoInit的http://lysoft.7u7.net
      

  3.   

    在dll初始化时加入:
     CoInitialize(Nil);记得uses Activex