接口数组的声明: FEmpArray: Array[1 .. MAX_EMPLOYEES] of IUnknown;
OLE容器中的自动化对象与iMPORT 后的 xxxx_tlb.PAS 的通信方式。 var vsht:IUnknown; isht:_Workbook; begin olc.Run; if not (olc.State=osRunning) then olc.Run; vsht:=olc.OleObjectInterface; //调用OLE容器D的OleObjectInterface 而不是OleObject isht:=vsht as _Workbook; esht.ConnectTo(isht); (esht.Worksheets.Item[1] as _WorkSheet).Cells.Item[1,1].value:=25; esht.Application.Quit; esht.Disconnect; end;