Skip to content

QtWS: Super Early Bird Tickets Available!

  • 0 Votes
    4 Posts
    1k Views
    H

    @halowei

    ActUtlType64.exe // Generated .IDL file (by the OLE/COM Object Viewer) // // typelib filename: ActUtlType64.exe [ uuid(719A5FAB-EB1C-4B52-98BC-F8C9F6912D04), version(5.0), helpstring("ActUtlType64 Control"), custom(DE77BA64-517C-11D1-A2DA-0000F8773CE9, 134283886), custom(DE77BA63-517C-11D1-A2DA-0000F8773CE9, 2147483647), custom(DE77BA65-517C-11D1-A2DA-0000F8773CE9, "Created by MIDL version 8.01.0622 at Tue Jan 19 12:14:07 2038 ") ] library ActUtlType64Lib { // TLib : OLE Automation : {00020430-0000-0000-C000-000000000046} importlib("stdole2.tlb"); // Forward declare all types defined in this typelib interface IActUtlType64; [ uuid(F0B1A112-BFCB-4DA3-9535-C296D69A17E0), helpstring("MITSUBISHI ActUtlType64 Control") ] coclass ActUtlType64 { [default] interface IActUtlType64; }; [ odl, uuid(174DD3F4-961E-4833-A4D2-6BFFE5DDFC6C), helpstring("IActUtlType64 Interface") ] interface IActUtlType64 : IUnknown { [propget, helpstring("Property ActLogicalStationNumber")] HRESULT _stdcall ActLogicalStationNumber([out, retval] long* pVal); [propput, helpstring("Property ActLogicalStationNumber")] HRESULT _stdcall ActLogicalStationNumber([in] long pVal); [propget, helpstring("Property ActPassword")] HRESULT _stdcall ActPassword([out, retval] BSTR* pVal); [propput, helpstring("Property ActPassword")] HRESULT _stdcall ActPassword([in] BSTR pVal); [helpstring("Method Open")] HRESULT _stdcall Open([out, retval] long* lplReturnCode); [helpstring("Method Close")] HRESULT _stdcall Close([out, retval] long* lplReturnCode); [helpstring("Method ReadDeviceBlock2")] HRESULT _stdcall ReadDeviceBlock2( [in] BSTR szDevice, [in] long lSize, [out] short* lplData, [out, retval] long* lplReturnCode); [helpstring("Method WriteDeviceBlock2")] HRESULT _stdcall WriteDeviceBlock2( [in] BSTR szDevice, [in] long lSize, [in] short* lplData, [out, retval] long* lplReturnCode); [helpstring("Method ReadDeviceRandom2")] HRESULT _stdcall ReadDeviceRandom2( [in] BSTR szDeviceList, [in] long lSize, [out] short* lplData, [out, retval] long* lplReturnCode); [helpstring("Method WriteDeviceRandom2")] HRESULT _stdcall WriteDeviceRandom2( [in] BSTR szDeviceList, [in] long lSize, [in] short* lplData, [out, retval] long* lplReturnCode); [helpstring("Method CheckControl")] HRESULT _stdcall CheckControl([out, retval] long* lplReturnCode); [helpstring("Method GetCpuType")] HRESULT _stdcall GetCpuType( [out] BSTR* szCpuName, [out] long* lplCpuCode, [out, retval] long* lplReturnCode); [helpstring("Method SetCpuStatus")] HRESULT _stdcall SetCpuStatus( [in] long lOperation, [out, retval] long* lplReturnCode); [helpstring("Method ReadDeviceBlock")] HRESULT _stdcall ReadDeviceBlock( [in] BSTR szDevice, [in] long lSize, [out] long* lplData, [out, retval] long* lplReturnCode); [helpstring("Method WriteDeviceBlock")] HRESULT _stdcall WriteDeviceBlock( [in] BSTR szDevice, [in] long lSize, [in] long* lplData, [out, retval] long* lplReturnCode); [helpstring("Method ReadDeviceRandom")] HRESULT _stdcall ReadDeviceRandom( [in] BSTR szDeviceList, [in] long lSize, [out] long* lplData, [out, retval] long* lplReturnCode); [helpstring("Method WriteDeviceRandom")] HRESULT _stdcall WriteDeviceRandom( [in] BSTR szDeviceList, [in] long lSize, [in] long* lplData, [out, retval] long* lplReturnCode); [helpstring("Method ReadBuffer")] HRESULT _stdcall ReadBuffer( [in] long lStartIO, [in] long lAddress, [in] long lSize, [out] short* lpsData, [out, retval] long* lplReturnCode); [helpstring("Method WriteBuffer")] HRESULT _stdcall WriteBuffer( [in] long lStartIO, [in] long lAddress, [in] long lSize, [in] short* lpsData, [out, retval] long* lplReturnCode); [helpstring("Method GetClockData")] HRESULT _stdcall GetClockData( [out] short* lpsYear, [out] short* lpsMonth, [out] short* lpsDay, [out] short* lpsDayOfWeek, [out] short* lpsHour, [out] short* lpsMinute, [out] short* lpsSecond, [out, retval] long* lplReturnCode); [helpstring("Method SetClockData")] HRESULT _stdcall SetClockData( [in] short sYear, [in] short sMonth, [in] short sDay, [in] short sDayOfWeek, [in] short sHour, [in] short sMinute, [in] short sSecond, [out, retval] long* lplReturnCode); [helpstring("Method SetDevice")] HRESULT _stdcall SetDevice( [in] BSTR szDevice, [in] long lData, [out, retval] long* lplReturnCode); [helpstring("Method GetDevice")] HRESULT _stdcall GetDevice( [in] BSTR szDevice, [out] long* lplData, [out, retval] long* lplReturnCode); [helpstring("Method GetDevice2")] HRESULT _stdcall GetDevice2( [in] BSTR szDevice, [out] short* lpsData, [out, retval] long* lplReturnCode); [helpstring("Method SetDevice2")] HRESULT _stdcall SetDevice2( [in] BSTR szDevice, [in] short sData, [out, retval] long* lplReturnCode); }; }; ActUtlType.dll // Generated .IDL file (by the OLE/COM Object Viewer) // // typelib filename: ActUtlType.dll [ uuid(D217E54E-4A26-4A76-B0AB-57166B90F9AF), version(1.0), helpstring("MITSUBISHI ActUtlType Controls Ver1.0"), custom(DE77BA64-517C-11D1-A2DA-0000F8773CE9, 134283886), custom(DE77BA63-517C-11D1-A2DA-0000F8773CE9, 2147483647), custom(DE77BA65-517C-11D1-A2DA-0000F8773CE9, "Created by MIDL version 8.01.0622 at Tue Jan 19 12:14:07 2038 ") ] library ActUtlTypeLib { // TLib : OLE Automation : {00020430-0000-0000-C000-000000000046} importlib("stdole2.tlb"); // Forward declare all types defined in this typelib dispinterface _IActUtlTypeEvents; interface IActUtlType; dispinterface _IActMLUtlTypeEvents; interface IActMLUtlType; [ uuid(0D40C842-E0AE-40FE-BB36-894B27D170BF), helpstring("_IActUtlTypeEvents Interface") ] dispinterface _IActUtlTypeEvents { properties: methods: [id(0x00000001), helpstring("Method OnDeviceStatus")] void OnDeviceStatus( [in] BSTR szDevice, [in] long lData, [in] long lReturnCode); }; [ uuid(63885648-1785-41A4-82D5-C578D29E4DA8), helpstring("MITSUBISHI ActUtlType Control"), control ] coclass ActUtlType { [default] interface IActUtlType; [default, source] dispinterface _IActUtlTypeEvents; }; [ odl, uuid(F4A6601A-130D-4FEE-B4CD-7FACAE1011C6), helpstring("IActUtlType Interface"), dual, nonextensible, oleautomation ] interface IActUtlType : IDispatch { [id(0x00000001), propget, helpstring("Property ActLogicalStationNumber")] HRESULT ActLogicalStationNumber([out, retval] long* pVal); [id(0x00000001), propput, helpstring("Property ActLogicalStationNumber")] HRESULT ActLogicalStationNumber([in] long pVal); [id(0x00000002), helpstring("Method Open")] HRESULT Open([out, retval] long* lplReturnCode); [id(0x00000003), helpstring("Method Close")] HRESULT Close([out, retval] long* lplReturnCode); [id(0x00000004), helpstring("Method GetCpuType")] HRESULT GetCpuType( [out] BSTR* szCpuName, [out] long* lplCpuCode, [out, retval] long* lplReturnCode); [id(0x00000005), helpstring("Method SetCpuStatus")] HRESULT SetCpuStatus( [in] long lOperation, [out, retval] long* lplReturnCode); [id(0x00000006), helpstring("Method ReadDeviceBlock")] HRESULT ReadDeviceBlock( [in] BSTR szDevice, [in] long lSize, [out] long* lplData, [out, retval] long* lplReturnCode); [id(0x00000007), helpstring("Method WriteDeviceBlock")] HRESULT WriteDeviceBlock( [in] BSTR szDevice, [in] long lSize, [in] long* lplData, [out, retval] long* lplReturnCode); [id(0x00000008), helpstring("Method ReadDeviceRandom")] HRESULT ReadDeviceRandom( [in] BSTR szDeviceList, [in] long lSize, [out] long* lplData, [out, retval] long* lplReturnCode); [id(0x00000009), helpstring("Method WriteDeviceRandom")] HRESULT WriteDeviceRandom( [in] BSTR szDeviceList, [in] long lSize, [in] long* lplData, [out, retval] long* lplReturnCode); [id(0x0000000a), helpstring("Method ReadBuffer")] HRESULT ReadBuffer( [in] long lStartIO, [in] long lAddress, [in] long lSize, [out] short* lpsData, [out, retval] long* lplReturnCode); [id(0x0000000b), helpstring("Method WriteBuffer")] HRESULT WriteBuffer( [in] long lStartIO, [in] long lAddress, [in] long lSize, [in] short* lpsData, [out, retval] long* lplReturnCode); [id(0x0000000c), helpstring("Method GetClockData")] HRESULT GetClockData( [out] short* lpsYear, [out] short* lpsMonth, [out] short* lpsDay, [out] short* lpsDayOfWeek, [out] short* lpsHour, [out] short* lpsMinute, [out] short* lpsSecond, [out, retval] long* lplReturnCode); [id(0x0000000d), helpstring("Method SetClockData")] HRESULT SetClockData( [in] short sYear, [in] short sMonth, [in] short sDay, [in] short sDayOfWeek, [in] short sHour, [in] short sMinute, [in] short sSecond, [out, retval] long* lplReturnCode); [id(0x0000000e), helpstring("Method SetDevice")] HRESULT SetDevice( [in] BSTR szDevice, [in] long lData, [out, retval] long* lplReturnCode); [id(0x0000000f), helpstring("Method GetDevice")] HRESULT GetDevice( [in] BSTR szDevice, [out] long* lplData, [out, retval] long* lplReturnCode); [id(0x00000010), helpstring("Method CheckDeviceString")] HRESULT CheckDeviceString( [in] BSTR szDevice, [in] long lCheckType, [in] long lSize, [out] long* lplDeviceType, [out] BSTR* lpszDeviceName, [out] long* lplDeviceNumber, [out] long* lplDeviceRadix, [out, retval] long* lplReturnCode); [id(0x00000011), helpstring("Method EntryDeviceStatus")] HRESULT EntryDeviceStatus( [in] BSTR szDeviceList, [in] long lSize, [in] long lMonitorCycle, [in] long* lplData, [out, retval] long* lplReturnCode); [id(0x00000012), helpstring("Method FreeDeviceStatus")] HRESULT FreeDeviceStatus([out, retval] long* lplReturnCode); [id(0x00000014), propget, helpstring("Property ActPassword")] HRESULT ActPassword([out, retval] BSTR* pVal); [id(0x00000014), propput, helpstring("Property ActPassword")] HRESULT ActPassword([in] BSTR pVal); [id(0x00000015), helpstring("Method ReadDeviceBlock2")] HRESULT ReadDeviceBlock2( [in] BSTR szDevice, [in] long lSize, [out] short* lpsData, [out, retval] long* lplReturnCode); [id(0x00000016), helpstring("Method WriteDeviceBlock2")] HRESULT WriteDeviceBlock2( [in] BSTR szDevice, [in] long lSize, [in] short* lpsData, [out, retval] long* lplReturnCode); [id(0x00000017), helpstring("Method ReadDeviceRandom2")] HRESULT ReadDeviceRandom2( [in] BSTR szDeviceList, [in] long lSize, [out] short* lpsData, [out, retval] long* lplReturnCode); [id(0x00000018), helpstring("Method WriteDeviceRandom2")] HRESULT WriteDeviceRandom2( [in] BSTR szDeviceList, [in] long lSize, [in] short* lpsData, [out, retval] long* lplReturnCode); [id(0x00000019), helpstring("Method GetDevice2")] HRESULT GetDevice2( [in] BSTR szDevice, [out] short* lpsData, [out, retval] long* lplReturnCode); [id(0x0000001a), helpstring("Method SetDevice2")] HRESULT SetDevice2( [in] BSTR szDevice, [in] short sData, [out, retval] long* lplReturnCode); [id(0x0000001b), helpstring("Method ConnectTel")] HRESULT Connect([out, retval] long* lplReturnCode); [id(0x0000001c), helpstring("Method DisconnectTel")] HRESULT Disconnect([out, retval] long* lplReturnCode); }; [ uuid(EC0956E5-A882-4855-87A9-CA571090F36E), helpstring("_IActMLUtlTypeEvents Interface") ] dispinterface _IActMLUtlTypeEvents { properties: methods: [id(0x00000001), helpstring("Method OnDeviceStatus")] void OnDeviceStatus( [in] VARIANT varDevice, [in] VARIANT varData, [in] VARIANT varReturnCode); }; [ uuid(29DE4B06-C429-420A-B3B7-BF7DC62649B2), helpstring("MITSUBISHI ActMLUtlType Control"), control ] coclass ActMLUtlType { [default] interface IActMLUtlType; [default, source] dispinterface _IActMLUtlTypeEvents; }; [ odl, uuid(B05A87E9-21CB-47A1-84A0-82ABACF879CD), helpstring("IActMLUtlType Interface"), dual, nonextensible, oleautomation ] interface IActMLUtlType : IDispatch { [id(0x00000001), helpstring("Method Open")] HRESULT Open([out, retval] VARIANT* lpvarReturnCode); [id(0x00000002), helpstring("Method Close")] HRESULT Close([out, retval] VARIANT* lpvarReturnCode); [id(0x00000003), helpstring("Method GetDevice")] HRESULT GetDevice( [in] VARIANT varDevice, [out] VARIANT* lpvarData, [out, retval] VARIANT* lpvarReturnCode); [id(0x00000004), helpstring("Method SetDevice")] HRESULT SetDevice( [in] VARIANT varDevice, [in] VARIANT varData, [out, retval] VARIANT* lpvarReturnCode); [id(0x00000005), helpstring("Method ReadDeviceBlock")] HRESULT ReadDeviceBlock( [in] VARIANT varDevice, [in] VARIANT varSize, [out] VARIANT* lpvarData, [out, retval] VARIANT* lpvarReturnCode); [id(0x00000006), helpstring("Method WriteDeviceBlock")] HRESULT WriteDeviceBlock( [in] VARIANT varDevice, [in] VARIANT varSize, [in] VARIANT varData, [out, retval] VARIANT* lpvarReturnCode); [id(0x00000007), helpstring("Method ReadDeviceRandom")] HRESULT ReadDeviceRandom( [in] VARIANT varDeviceList, [in] VARIANT varSize, [out] VARIANT* lpvarData, [out, retval] VARIANT* lpvarReturnCode); [id(0x00000008), helpstring("Method WriteDeviceRandom")] HRESULT WriteDeviceRandom( [in] VARIANT varDeviceList, [in] VARIANT varSize, [in] VARIANT varData, [out, retval] VARIANT* lpvarReturnCode); [id(0x00000009), helpstring("Method ReadBuffer")] HRESULT ReadBuffer( [in] VARIANT varStartIO, [in] VARIANT varAddress, [in] VARIANT varReadSize, [out] VARIANT* lpvarData, [out, retval] VARIANT* lpvarReturnCode); [id(0x0000000a), helpstring("Method WriteBuffer")] HRESULT WriteBuffer( [in] VARIANT varStartIO, [in] VARIANT varAddress, [in] VARIANT varWriteSize, [in] VARIANT varData, [out, retval] VARIANT* lpvarReturnCode); [id(0x0000000b), helpstring("Method GetCpuType")] HRESULT GetCpuType( [out] VARIANT* lpvarCpuName, [out] VARIANT* lpvarCpuCode, [out, retval] VARIANT* lpvarReturnCode); [id(0x0000000c), helpstring("Method SetCpuStatus")] HRESULT SetCpuStatus( [in] VARIANT varOperation, [out, retval] VARIANT* lpvarReturnCode); [id(0x0000000d), helpstring("Method GetClockData")] HRESULT GetClockData( [out] VARIANT* lpvarYear, [out] VARIANT* lpvarMonth, [out] VARIANT* lpvarDay, [out] VARIANT* lpvarDayOfWeek, [out] VARIANT* lpvarHour, [out] VARIANT* lpvarMinute, [out] VARIANT* lpvarSecond, [out, retval] VARIANT* lpvarReturnCode); [id(0x0000000e), helpstring("Method SetClockData")] HRESULT SetClockData( [in] VARIANT varYear, [in] VARIANT varMonth, [in] VARIANT varDay, [in] VARIANT varDayOfWeek, [in] VARIANT varHour, [in] VARIANT varMinute, [in] VARIANT varSecond, [out, retval] VARIANT* lpvarReturnCode); [id(0x0000000f), helpstring("Method EntryDeviceStatus")] HRESULT EntryDeviceStatus( [in] VARIANT varDeviceList, [in] VARIANT varSize, [in] VARIANT varMonitorCycle, [in] VARIANT varData, [out, retval] VARIANT* lpvarReturnCode); [id(0x00000010), propget, helpstring("Property ActLogicalStationNumber")] HRESULT ActLogicalStationNumber([out, retval] VARIANT* pVal); [id(0x00000010), propput, helpstring("Property ActLogicalStationNumber")] HRESULT ActLogicalStationNumber([in] VARIANT pVal); [id(0x00000011), helpstring("Method FreeDeviceStatus")] HRESULT FreeDeviceStatus([out, retval] VARIANT* lpvarReturnCode); [id(0x00000013), propget, helpstring("Property ActPassword")] HRESULT ActPassword([out, retval] VARIANT* pVal); [id(0x00000013), propput, helpstring("Property ActPassword")] HRESULT ActPassword([in] VARIANT pVal); [id(0x00000014), helpstring("Method ReadDeviceBlock2")] HRESULT ReadDeviceBlock2( [in] VARIANT varDevice, [in] VARIANT varSize, [out] VARIANT* lpvarData, [out, retval] VARIANT* lpvarReturnCode); [id(0x00000015), helpstring("Method WriteDeviceBlock2")] HRESULT WriteDeviceBlock2( [in] VARIANT varDevice, [in] VARIANT varSize, [in] VARIANT varData, [out, retval] VARIANT* lpvarReturnCode); [id(0x00000016), helpstring("Method ReadDeviceRandom2")] HRESULT ReadDeviceRandom2( [in] VARIANT varDeviceList, [in] VARIANT varSize, [out] VARIANT* lpvarData, [out, retval] VARIANT* lpvarReturnCode); [id(0x00000017), helpstring("Method WriteDeviceRandom2")] HRESULT WriteDeviceRandom2( [in] VARIANT varDeviceList, [in] VARIANT varSize, [in] VARIANT varData, [out, retval] VARIANT* lpvarReturnCode); [id(0x00000018), helpstring("Method GetDevice2")] HRESULT GetDevice2( [in] VARIANT varDevice, [out] VARIANT* lpvarData, [out, retval] VARIANT* lpvarReturnCode); [id(0x00000019), helpstring("Method SetDevice2")] HRESULT SetDevice2( [in] VARIANT varDevice, [in] VARIANT varData, [out, retval] VARIANT* lpvarReturnCode); }; };
  • 0 Votes
    14 Posts
    3k Views
    J

    @SGaist Ok, I saw his user name is "china-Qter", so I used chinese.

  • 0 Votes
    8 Posts
    3k Views
    hskoglundH

    2nd version, a bit more fancy, requiring you to run dumpcpp to get 2 files: word.cpp and word.h. Create a vanilla widget app, insert " axcontainer" in the .pro file (same as above). Add word.cpp into your project (so it wil compiled along with main.cpp and mainwindow.cpp.

    Then in mainwindow.cpp insert "#include word.h" at the top, and after ui->setupUi(this); insert:

    auto wApp = new Word::Application; if (nullptr == wApp) return; wApp->SetVisible(true); auto doc = wApp->Documents()->Add(); for (int p = 0; (p < 100); ++p) { auto para= doc->Content()->Paragraphs()->Add(); para->Range()->SetText("Four score and seven years ago our fathers " "brought forth on this continent a new nation, conceived in liberty, and dedicated to the " "proposition that all men are created equal. Now we are engaged in a great civil war, " "testing whether that nation, or any nation so conceived and so dedicated, can long endure."); para->Format()->SetSpaceAfter(20); para->SetWidowControl(0); // for false // para->setWidowControl(-1); // for true para->Range()->InsertParagraphAfter(); }

    These calls will be changed to dynamic calls inside word.h but it's nice to have command completions and syntax checking by the compiler.

    Note: when dealing with COM, thanks to it being used first by Visual Basic and VBA for Office, it's sometimes problems with the boolean chaps true and false, so I prefer to use 0 for false and -1 for true, same as in the Visual Basic.

  • 0 Votes
    13 Posts
    5k Views
    SGaistS

    @koahnig closed without any reason ? That's surprising