B bird007 Unregistered / Unconfirmed GUEST, unregistred user! 2008-06-22 #1 比如说,我在窗体Form1添加ADO数据库连接控件和数据显示控件,生成的Dll使用不了。但是如果把窗体上面的数据连接和显示控件都删除再生成Dll,运行正常。
风 风铃夜思雨 Unregistered / Unconfirmed GUEST, unregistred user! 2008-06-22 #2 在DLL中使用ADO控件要初始化 未初始化OLE function CoInitialize(pvReserved: Pointer): HResult; stdcall; external 'ole32.dll' Name 'CoInitialize'; procedure CoUninitialize; stdcall; external 'ole32.dll' Name 'CoUninitialize'; CoInitialize(Nil); CoUninitialize;
在DLL中使用ADO控件要初始化 未初始化OLE function CoInitialize(pvReserved: Pointer): HResult; stdcall; external 'ole32.dll' Name 'CoInitialize'; procedure CoUninitialize; stdcall; external 'ole32.dll' Name 'CoUninitialize'; CoInitialize(Nil); CoUninitialize;