![]() |
#5 |
Участник
|
Цитата:
Сообщение от belugin
я думаю, ято вряд ли получится передать IAxaptaRecord в качестве параметра в функцию DLL
Вот пример с Excel и Delphi X++: static void Job33(Args _args) { ComExcelDocument_RU excel = new ComExcelDocument_RU(); ComVariant cv; Com doc; Com app; ComInterface ci; DLL _DLL = new DLL("COMCall.dll"); DllFunction dllfunc = new DllFunction(_dll, "ComObject"); ; excel.newFile(); excel.visible(false); doc = excel.getComDocument(); app = doc.Application(); cv = ComVariant::createFromCOM(app); ci = cv.iDispatch(); DllFunc.returns(ExtTypes::DWord); DllFunc.arg(ExtTypes::DWord); DllFunc.Call(ci); } X++: library ComCall; uses Windows, ExcelXP; function ComObject(Int : IDispatch) : Boolean; stdcall; var app : _Application; begin Result := False; if Int <> nil then begin int.QueryInterface(IID__Application, app); if app <> nil then begin app.Visible[GetUserDefaultLCID] := True; app.Range['a1', 'a1'].Value2 := '?????'; app := nil; end; end; end; exports ComObject; begin end.
__________________
Axapta v.3.0 sp5 kr2 |
|
|
За это сообщение автора поблагодарили: gl00mie (1). |