Einzelnen Beitrag anzeigen

wurzelsepp1

Registriert seit: 9. Dez 2012
82 Beiträge
 
Delphi 3 Professional
 
#5

AW: COM / DLL-Einbindung für Anfänger

  Alt 17. Okt 2023, 19:59
E2018 is Delphi compiler error.
Please share a simple code showing how are you declaring DymoAddIn and its construction.
I think I did. Here is the wrapper (only the part with the function I need to use):

Delphi-Quellcode:
const

  LIBID_DymoSDK: TGUID = '{25D837F1-8D49-3354-A820-AE8ED312EC09}';

  IID_IDymoLabel: TGUID = '{5748221F-3D1E-35AE-8F26-4D01C9798FE9}';
  IID_IDymoPrinter: TGUID = '{2BED54B5-C7F6-3939-973A-AFB075AB9572}';

type

// *********************************************************************//
// Forward-Deklaration von in der Typbibliothek definierten Typen
// *********************************************************************//
  IDymoLabel = interface;
  IDymoPrinter = interface;

// *********************************************************************//
// Interface: IDymoLabel
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {5748221F-3D1E-35AE-8F26-4D01C9798FE9}
// *********************************************************************//
  IDymoLabel = interface(IDispatch)
    ['{5748221F-3D1E-35AE-8F26-4D01C9798FE9}']
    function Get_XMLContent: WideString; safecall;
    procedure Set_XMLContent(const pRetVal: WideString); safecall;
    function Get_Preview: PSafeArray; safecall;
    procedure Set_Preview(pRetVal: PSafeArray); safecall;
    function GetPreviewLabel: PSafeArray; safecall;
    procedure LoadLabelFromFilePath(const filePath: WideString); safecall;
    procedure LoadLabelFromXML(const XMLContent: WideString); safecall;
    function UpdateLabelObject(const labelObject: ILabelObject; const objectValue: WideString): WordBool; safecall;
    function SetImageFromFilePath(const objectName: WideString; const imageFile: WideString): WordBool; safecall;
    function SetImageFromBase64(const objectName: WideString; const base64String: WideString): WordBool; safecall;
    function Save(const fileName: WideString): WordBool; safecall;
    function GetLabelObject(const objName: WideString): ILabelObject; safecall;
    procedure GhostMethod_IDymoLabel_72_1; safecall;
    property XMLContent: WideString read Get_XMLContent write Set_XMLContent;
    property Preview: PSafeArray read Get_Preview write Set_Preview;
  end;

HTH
  Mit Zitat antworten Zitat