Altova XMLSpy 2024 Enterprise Edition

Die IDL des neu erstellten ATL-Objekts enthält eine Deklaration für eine COM-Schnittstelle.

 

Diese Schnittstellenbeschreibung muss, wie unten gezeigt, durch die Deklaration von IXMLSpyPlugIn ersetzt werden.

 

Die IDL muss außerdem die Definition der SPYUpdateAction Enumeration enthalten.

 

Ersetzen Sie in der coclass-Deklaration den (vom Assistenten) generierten Standard-Schnittstellennamen durch "IXMLSpyPlugIn".

 

Die IDL sollte anschließend in etwa so aussehen wie im Beispielcode unten: Nach Erstellung des ATL-Objekts müssen Sie nun die IDE Plug-In-Schnittstelle von XMLSpy implementieren.

 

import "oaidl.idl";

import "ocidl.idl";

 

// ----- please insert the following block into your IDL file -----

typedef enum {

  spyEnable = 1,

  spyDisable = 2,

  spyCheck = 4,

  spyUncheck = 8

} SPYUpdateAction;

 

// ----- end insert block ----

 

 

// ----- E.g. Interface entry automatically generated by the ATL wizard -----

//     [

//           object,

//           uuid(AB7CD86A-8145-429A-A1F3-270692EO8AFC),

 

//           helpstring("IXMLSpyPlugIn Interface")

//           pointer_default(unique)

//     ]

//     interface IXMLSpyPlugIn : IUnknown

//     {

//     };

// ----- end automatically generated Interface Entry

 

 

// ----- replace the Interface Entry (shown above) generated for you by the ATL wizard, with the following block -----

 

      [

         odl,

         uuid(88F2A622-4B7E-42CD-8D04-3C0E5389DD85),

         helpstring("IXMLSpyPlugIn Interface")

      ]

      interface IXMLSpyPlugIn : IUnknown

         {

            HRESULT _stdcall OnCommand([in] long nID, [in] IDispatch* pXMLSpy);

            HRESULT _stdcall OnUpdateCommand([in] long nID, [in] IDispatch* pXMLSpy, [out, retval] SPYUpdateAction* pAction);

            HRESULT _stdcall OnEvent([in] long nEventID, [in] SAFEARRAY(VARIANT)* arrayParameters, [in] IDispatch* pXMLSpy, [out, retval] VARIANT* pReturnValue);

            HRESULT _stdcall GetUIModifications([out, retval] BSTR* pModificationsXML);

            HRESULT _stdcall GetDescription([out, retval] BSTR* pDescription);

         };

 

// ----- end replace block -----

 

 

// ----- The code below is automatically generated by the ATL wizard and will look slightly different in your case -----

 

      [

         uuid(24FE0D1B-3FC0-494E-B36E-1D4CE412B014),

         version(1.0),

         helpstring("XMLSpyIDEPlugInDLL 1.0 Type Library")

      ]

      library XMLSPYIDEPLUGINDLLLib

         {

      importlib("stdole32.tlb");

      importlib("stdole2.tlb");

 

      [

         uuid(3800E791-7F6B-4ACD-9E32-2AC184444501),

         helpstring("XMLSpyIDEPlugIn Class")

      ]

      coclass XMLSpyIDEPlugIn

      {

         [default] interface IXMLSpyPlugIn;   // ----- define IXMLSpyPlugIn as the default interface -----

      };

};

 

© 2018-2024 Altova GmbH