teamviewer.com link icon
or
Ask The Community

Do you want to enjoy the new TeamViewer user interface for Windows?


Download the new version and let us know what you think about it! 👉 Please click here 👈

COM API

Enny
Enny Posts: 3 ✭✭

In 

https://community.teamviewer.com/t5/Knowledge-Base/Command-line-parameters/ta-p/34447

there is an COM API mentioned. I can instance an com Objet, and i figured out som methodnames, but unfortunatelly I can't  find any documentation.

Is there an documentation for COM API and is it still in active development....

Comments

  • mLipok
    mLipok Posts: 780 ⭐Star⭐
  • Enny
    Enny Posts: 3 ✭✭

    I could get the Interfaces and Methods, but I think you need a Token (aScript Token does not work):

    // Generated .IDL file (by the OLE/COM Object Viewer)
    //
    // typelib filename: TeamViewer.exe

    [
    uuid(D5883D5C-5456-4BF9-844A-3F8C5E61AF9F),
    version(1.2),
    custom(DE77BA64-517C-11D1-A2DA-0000F8773CE9, **Please do not post TeamViewer IDs**),
    custom(DE77BA63-517C-11D1-A2DA-0000F8773CE9, **Please do not post TeamViewer IDs**),
    custom(DE77BA65-517C-11D1-A2DA-0000F8773CE9, "Created by MIDL version 8.01.0622 at Tue Jan 19 04:14:07 2038
    ")

    ]
    library TeamViewer
    {
    // TLib : OLE Automation : {00020430-0000-0000-C000-**Please do not post TeamViewer IDs**46}
    importlib("stdole2.tlb");

    // Forward declare all types defined in this typelib
    interface ITvMachineSettings;
    interface ITvUserSettings;
    interface ITvAddress;
    interface ITvVersion;
    interface ITvSession;
    interface ITvMeetingSession;
    interface ITvSessionList;
    interface ITvConverter;
    interface ITvConverter2;
    interface ITvScheduledMeeting;
    interface ITvScheduledMeeting2;
    interface ITvScheduledMeetingList;
    interface ITvAccount;
    interface ITvApplication;
    interface ITvApplication2;
    interface ITvService;

    typedef enum {
    TvApplicationTypeUnknown = 0,
    TvApplicationTypeStandard = 1,
    TvApplicationTypeQuickSupport = 2,
    TvApplicationTypeQuickJoin = 3,
    TvApplicationTypePortable = 4,
    TvApplicationTypeHost = 5
    } TvApplicationType;

    typedef enum {
    TvSessionTypeUnknown = 0,
    TvSessionTypeRemoteControl = 1,
    TvSessionTypeMeeting = 2,
    TvSessionTypeFileTransfer = 3,
    TvSessionTypeVpn = 4
    } TvSessionType;

    typedef enum {
    TvAddressTypeUnknown = 0,
    TvAddressTypeUnspecified = 1,
    TvAddressTypeLocalNetwork = 2,
    TvAddressTypeTeamViewerId = 3,
    TvAddressTypeMeetingId = 4
    } TvAddressType;

    typedef enum {
    TvSessionFlagsNone = 0,
    TvSessionFlagUnknown = 1,
    TvSessionFlagServer = 2,
    TvSessionFlagClient = 4
    } TvSessionFlags;

    typedef enum {
    TvTextResourceIDUnknown = 0,
    TvTextResourceIDMeetingDefaultInvitation = 1,
    TvTextResourceIDMeetingDefaultLocation = 2,
    TvTextResourceIDMeetingDefaultSubject = 3,
    TvTextResourceIDMeetingURLPrefix = 4,
    TvTextResourceIDMeetingCustomInvitation = 5,
    TvTextResourceIDMeetingCustomSubject = 6
    } TvTextResourceID;

    [
    odl,
    uuid(A20E949F-5456-4A49-BE51-88077E13F793),
    dual,
    oleautomation
    ]
    interface ITvMachineSettings : IDispatch {
    [id(0x60020000), propget]
    HRESULT IsPasswordRequired([out, retval] VARIANT_BOOL* pbResult);
    [id(0x60020001)]
    HRESULT UnlockWithPassword(
    [in] BSTR sPassword,
    [out, retval] VARIANT_BOOL* pbResult);
    [id(0x60020002)]
    HRESULT UnlockWithHash(
    [in] BSTR sSaltedPasswordHash,
    [in] BSTR sPasswordSalt,
    [out, retval] VARIANT_BOOL* pbResult);
    [id(0x60020003)]
    HRESULT SetPermanentPassword([in] BSTR sPassword);
    [id(0x60020004), propget]
    HRESULT HasPermanentPassword([out, retval] VARIANT_BOOL* pResult);
    [id(0x60020005)]
    HRESULT AddAdditionalPermanentPasswordWithKey(
    [in] BSTR sKey,
    [in] BSTR sPassword,
    [out, retval] VARIANT_BOOL* pbWasAdded);
    [id(0x60020006)]
    HRESULT DeleteAdditionalPermanentPasswordWithKey(
    [in] BSTR sKey,
    [out, retval] VARIANT_BOOL* pbWasDeleted);
    [id(0x60020007)]
    HRESULT HasAdditionalPermanentPasswordWithKey(
    [in] BSTR sKey,
    [out, retval] VARIANT_BOOL* pResult);
    };

    [
    odl,
    uuid(DB86189D-5456-4B7B-B5AB-419653E156DD),
    dual,
    oleautomation
    ]
    interface ITvUserSettings : IDispatch {
    [id(0x60020000), propget]
    HRESULT IsPasswordRequired([out, retval] VARIANT_BOOL* pbResult);
    [id(0x60020001)]
    HRESULT UnlockWithPassword(
    [in] BSTR sPassword,
    [out, retval] VARIANT_BOOL* pbResult);
    [id(0x60020002)]
    HRESULT UnlockWithHash(
    [in] BSTR sSaltedPasswordHash,
    [in] BSTR sPasswordSalt,
    [out, retval] VARIANT_BOOL* pbResult);
    [id(0x60020003), propget]
    HRESULT DisplayName([out, retval] BSTR* psName);
    [id(0x60020003), propput]
    HRESULT DisplayName([in] BSTR psName);
    [id(0x60020005), propget]
    HRESULT MeetingName([out, retval] BSTR* psName);
    [id(0x60020005), propput]
    HRESULT MeetingName([in] BSTR psName);
    };

    [
    odl,
    uuid(D399478A-5456-4112-B963-38E6C8AA1217),
    dual,
    oleautomation
    ]
    interface ITvAddress : IDispatch {
    [id(0x60020000), propget]
    HRESULT AddressType([out, retval] TvAddressType* pType);
    [id(0x60020001), propget]
    HRESULT Value([out, retval] BSTR* psValue);
    };

    [
    odl,
    uuid(BF93CDAB-5456-4611-AE2C-6F50A41564C1),
    dual,
    oleautomation
    ]
    interface ITvVersion : IDispatch {
    [id(0x60020000), propget]
    HRESULT Major([out, retval] int* piMajor);
    [id(0x60020001), propget]
    HRESULT Minor([out, retval] int* piMinor);
    [id(0x60020002), propget]
    HRESULT Build([out, retval] int* piBuild);
    [id(0x60020003), propget]
    HRESULT Extra([out, retval] BSTR* psExtra);
    [id(0x60020004)]
    HRESULT ToString([out, retval] BSTR* psStr);
    };

    [
    odl,
    uuid(F274CC23-5456-42B2-AC7A-5C5EA0D6EFBC),
    dual,
    oleautomation
    ]
    interface ITvSession : IDispatch {
    [id(0x60020000), propget]
    HRESULT SessionType([out, retval] TvSessionType* pType);
    [id(0x60020001), propget]
    HRESULT SessionFlags([out, retval] TvSessionFlags* pFlags);
    [id(0x60020002), propget]
    HRESULT RemoteAddress([out, retval] ITvAddress** ppAddress);
    };

    [
    odl,
    uuid(6EB079FD-5456-432D-BDAB-9B38DF8DD0EE),
    dual,
    oleautomation
    ]
    interface ITvMeetingSession : ITvSession {
    [id(0x60030000), propget]
    HRESULT Password([out, retval] BSTR* psPassword);
    };

    [
    odl,
    uuid(457E4C9C-5456-471C-8A3C-F3BFC8DF242C),
    dual,
    oleautomation
    ]
    interface ITvSessionList : IDispatch {
    [id(0x60020000), propget]
    HRESULT Count([out, retval] long* piCount);
    [id(0xfffffffc), propget, restricted]
    HRESULT _NewEnum([out, retval] IUnknown** ppEnum);
    [id(00000000), propget]
    HRESULT Item(
    [in] long iIndex,
    [out, retval] ITvSession** ppSession);
    [id(0x60020003)]
    HRESULT UpdateLocalCopy();
    };

    [
    odl,
    uuid(95C0F21E-5456-4891-B9F6-014E98858D0B),
    dual,
    oleautomation
    ]
    interface ITvConverter : IDispatch {
    [id(0x60020000)]
    HRESULT ApplicationTypeToString(
    [in] TvApplicationType type,
    [out, retval] BSTR* psStr);
    [id(0x60020001)]
    HRESULT SessionTypeToString(
    [in] TvSessionType type,
    [out, retval] BSTR* psStr);
    [id(0x60020002)]
    HRESULT AddressTypeToString(
    [in] TvAddressType type,
    [out, retval] BSTR* psStr);
    [id(0x60020003)]
    HRESULT SessionFlagsToString(
    [in] TvSessionFlags flags,
    [out, retval] BSTR* psStr);
    [id(0x60020004)]
    HRESULT StringToApplicationType(
    [in] BSTR sStr,
    [out, retval] TvApplicationType* pType);
    [id(0x60020005)]
    HRESULT StringToSessionType(
    [in] BSTR sStr,
    [out, retval] TvSessionType* pType);
    [id(0x60020006)]
    HRESULT StringToAddressType(
    [in] BSTR sStr,
    [out, retval] TvAddressType* pType);
    [id(0x60020007)]
    HRESULT StringToSessionFlags(
    [in] BSTR sStr,
    [out, retval] TvSessionFlags* pFlags);
    };

    [
    odl,
    uuid(14B59F6C-4FF8-4AD9-BA71-D65FDF7AEC3B),
    dual,
    oleautomation
    ]
    interface ITvConverter2 : ITvConverter {
    [id(0x60030000)]
    HRESULT TextResourceIDToString(
    [in] TvTextResourceID trID,
    [out, retval] BSTR* psStr);
    [id(0x60030001)]
    HRESULT StringToTextResourceID(
    [in] BSTR sStr,
    [out, retval] TvTextResourceID* pTrID);
    };

    [
    odl,
    uuid(550C2D70-5456-4990-A6B2-20E1EF1C8EBC),
    dual,
    oleautomation
    ]
    interface ITvScheduledMeeting : IDispatch {
    [id(0x60020000), propget]
    HRESULT IsAttached([out, retval] VARIANT_BOOL* pbIsAttached);
    [id(0x60020001), propget]
    HRESULT StartTimeUtc([out, retval] DATE* pStartTime);
    [id(0x60020001), propput]
    HRESULT StartTimeUtc([in] DATE pStartTime);
    [id(0x60020003), propget]
    HRESULT EndTimeUtc([out, retval] DATE* pEndTime);
    [id(0x60020003), propput]
    HRESULT EndTimeUtc([in] DATE pEndTime);
    [id(0x60020005), propget]
    HRESULT Address([out, retval] ITvAddress** ppAddress);
    [id(0x60020006), propget]
    HRESULT Subject([out, retval] BSTR* psSubject);
    [id(0x60020006), propput]
    HRESULT Subject([in] BSTR psSubject);
    [id(0x60020008), propget]
    HRESULT SaveForReUse([out, retval] VARIANT_BOOL* pbSaveForReUse);
    [id(0x60020008), propput]
    HRESULT SaveForReUse([in] VARIANT_BOOL pbSaveForReUse);
    [id(0x6002000a), propget]
    HRESULT CustomIdentifier([out, retval] BSTR* psCustomID);
    [id(0x6002000a), propput]
    HRESULT CustomIdentifier([in] BSTR psCustomID);
    [id(0x6002000c), propget]
    HRESULT CustomConferenceData([out, retval] BSTR* psConferenceData);
    [id(0x6002000c), propput]
    HRESULT CustomConferenceData([in] BSTR psConferenceData);
    [id(0x6002000e)]
    HRESULT Commit();
    [id(0x6002000f)]
    HRESULT Delete();
    [id(0x60020010)]
    HRESULT StartMeeting();
    };

    [
    odl,
    uuid(AD9D431B-3B37-4F4A-B676-D43D8AEAD6E2),
    dual,
    oleautomation
    ]
    interface ITvScheduledMeeting2 : ITvScheduledMeeting {
    [id(0x60030000), propget]
    HRESULT ConferenceData([out, retval] BSTR* psConferenceData);
    };

    [
    odl,
    uuid(1B1BD342-5456-4F9F-A027-1BA0254C8C0A),
    dual,
    oleautomation
    ]
    interface ITvScheduledMeetingList : IDispatch {
    [id(0x60020000), propget]
    HRESULT Count([out, retval] long* piCount);
    [id(0xfffffffc), propget, restricted]
    HRESULT _NewEnum([out, retval] IUnknown** ppEnum);
    [id(00000000), propget]
    HRESULT Item(
    [in] long iIndex,
    [out, retval] ITvScheduledMeeting2** ppMeeting);
    [id(0x60020003)]
    HRESULT UpdateLocalCopy();
    };

    [
    odl,
    uuid(BDBA72AF-5456-49B0-875B-F9122A78D9FB),
    dual,
    oleautomation
    ]
    interface ITvAccount : IDispatch {
    [id(0x60020000), propget]
    HRESULT AccountName([out, retval] BSTR* psAccountName);
    [id(0x60020001)]
    HRESULT CreateScheduledMeetingList([out, retval] ITvScheduledMeetingList** ppList);
    [id(0x60020002)]
    HRESULT CreateScheduledMeeting([out, retval] ITvScheduledMeeting2** ppMeeting);
    };

    [
    odl,
    uuid(09183D47-5456-4B6E-BA7E-F170D9F4ABEE),
    dual,
    oleautomation
    ]
    interface ITvApplication : IDispatch {
    [id(0x60020000)]
    HRESULT UnlockToken([in] BSTR sGuid);
    [id(0x60020001)]
    HRESULT LockToken([in] BSTR sGuid);
    [id(0x60020002)]
    HRESULT CreateConverter([out, retval] ITvConverter** ppConverter);
    [id(0x60020003)]
    HRESULT CreateAddress(
    [in] BSTR sValue,
    [out, retval] ITvAddress** ppAddress);
    [id(0x60020004), propget]
    HRESULT ApiVersion([out, retval] ITvVersion** ppVersion);
    [id(0x60020005), propget]
    HRESULT ApplicationVersion([out, retval] ITvVersion** ppVersion);
    [id(0x60020006), propget]
    HRESULT MachineSettings([out, retval] ITvMachineSettings** ppMachineSettings);
    [id(0x60020007), propget]
    HRESULT UserSettings([out, retval] ITvUserSettings** ppUserSettings);
    [id(0x60020008), propget]
    HRESULT ApplicationType([out, retval] TvApplicationType* pType);
    [id(0x60020009), propget]
    HRESULT TeamViewerId([out, retval] int* pId);
    [id(0x6002000a), propget]
    HRESULT HasActiveSession([out, retval] VARIANT_BOOL* pbResult);
    [id(0x6002000b)]
    HRESULT CreateSessionList([out, retval] ITvSessionList** ppList);
    [id(0x6002000c)]
    HRESULT RequestHostMeeting([in] BSTR sPassword);
    [id(0x6002000d)]
    HRESULT RequestConnectTo(
    [in] TvSessionType type,
    [in] ITvAddress* pAddress,
    [in] BSTR sPassword);
    };

    [
    odl,
    uuid(2F5E4D7D-7181-44DC-8407-CAF525D85345),
    dual,
    oleautomation
    ]
    interface ITvApplication2 : ITvApplication {
    [id(0x60030000)]
    HRESULT CreateConverter2([out, retval] ITvConverter2** ppConverter);
    [id(0x60030001)]
    HRESULT GetAccount(
    [in, optional, defaultvalue(0)] VARIANT_BOOL bAllowInteractiveLogin,
    [in, optional, defaultvalue(0)] long hwndParent,
    [out, retval] ITvAccount** ppAccount);
    [id(0x60030002)]
    HRESULT GetTextResource(
    [in] TvTextResourceID textID,
    [out, retval] BSTR* pTextRes);
    };

    [
    odl,
    uuid(FC73DAE1-5456-440C-B6EE-0D4A235B71B5),
    dual,
    oleautomation
    ]
    interface ITvService : IDispatch {
    [id(0x60020000)]
    HRESULT UnlockToken([in] BSTR sGuid);
    [id(0x60020001)]
    HRESULT LockToken([in] BSTR sGuid);
    [id(0x60020002), propget]
    HRESULT ServiceVersion([out, retval] ITvVersion** ppVersion);
    [id(0x60020003), propget]
    HRESULT ApiVersion([out, retval] ITvVersion** ppVersion);
    [id(0x60020004), propget]
    HRESULT TeamViewerId([out, retval] int* pId);
    [id(0x60020005), propget]
    HRESULT MachineSettings([out, retval] ITvMachineSettings** ppMachineSettings);
    };

    [
    uuid(877D726A-5456-4171-9CDB-0DAB3AFFE07F)
    ]
    coclass TvApplication {
    [default] interface ITvApplication2;
    interface ITvApplication;
    };

    [
    uuid(CFDFB010-5456-4D0B-8A07-B55C0B963627)
    ]
    coclass TvService {
    [default] interface ITvService;
    };
    };