Page 5 of 14 FirstFirst ... 34567 ... LastLast
Results 41 to 50 of 137

Thread: thinBasic 1.10.7.x

  1. #41
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Hi Primo,

    the methods are documented here:
    https://msdn.microsoft.com/en-us/lib...(v=vs.84).aspx

    The work Eros has done in COM is equivalent of discovering America. It opens whole new world of possibilities, with friendly syntax.


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  2. #42
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    Ciao primo,

    I will start from the bottom.
    If you press F1 in thinAir while cursor is over iDispatch term, you will get some help I've written.

    Anyway iDispatch is standard interface developed over COM.
    COM stands for "Component Object Model". In a few words you can think about it as a common interface to be able to talk with binary objects without having any info about that objects.
    It is the Microsoft way to interconnect software using a common interface. These interfaces are defined in a COM Object.

    If you want to use some function that are inside a DLL, you need to know exactly function name, function return type, number of function parameters, their type, their passing way (byref or byval), ... you need to know everything before being able to call that function. With a COM object you do not need anything, just the registered name of the object is enough because the object is able to describe itself using a common binary interface.

    There are many sources on the web you can find talking about ActiveX, COM, iUnknown, iDIspatch, iTypeLib, ... you can stay one year studying about it and still you will have something new to learn for other years
    As an introduction, have a look at http://pubs.opengroup.org/onlinepubs/009899899/
    A great book can be "Inside COM" from Don Box: https://www.amazon.com/Essential-COM...BBBNRXCVCB1EGW



    That said, back to your first question: how to know what a COM object interface instantiated inside an iDispacth variable exposes to the programmer?

    Answer is easy and complicated at the same time.

    1. In general any component developed by Microsoft like Scripting.Dictionary is documented by Microsoft.
      For example Scripting component is documented at https://msdn.microsoft.com/en-us/lib...(v=vs.84).aspx
      In that page you will find that Scripting implements some objects and one of those is Dictionary interface: https://msdn.microsoft.com/en-us/lib...(v=vs.84).aspx
      And there you will find what Properties and Methods that interface implements.
      Here https://msdn.microsoft.com/en-us/lib...(v=vs.84).aspx your question: Exists method
      So, first reply is: search on the web inside developer of the COM object you are using.
      .
    2. Another option is to use a COM Object Browser.
      A COM Browser is an application that can be used to browse all registered COM objects, and all objects that support Ole Automation interface.
      Have a look at this page https://www.autoitscript.com/autoit3...tro/ComRef.htm and check "OLE/COM Object Viewer" chapter
      .
    3. I'm finishing to adapt to thinBasic a COM Browser developed by José Roca and generously released as Freeware: see image
      With this browser you will be able to get information about installed COM components and what automation interfaces they implements and for each of them what properties and method they have. And for each of them what parameters they need ...



    Hope to have answered to some of your needs.
    I just started to study this development area and at every turn I discover a complete new world.

    Ciao
    Eros
    Attached Images Attached Images
    Last edited by ErosOlmi; 14-09-2017 at 08:40.
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  3. #43
    I'm finishing to adapt to thinBasic a COM Browser developed by José Roca and generously released as open source
    One small precission: I never have released anything as open source, but as freeware, allowing to use it for your own purposes, even in commercial applications, without paying a fee, but not to make derivative works from, sell or redistribute without permission.

    You have asked permission to adapt it for use with thinBasic and I have granted it to you, but this does not make the original or the derivative work(s) open source, but freeware.

    Freeware (not to be confused with "Free Software"):
    https://en.wikipedia.org/wiki/Freeware
    Last edited by José Roca; 14-09-2017 at 05:06.

  4. #44
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    Ciao José,

    correct. Sorry for the confusion in writing.
    I've changed my post removing "open source" indication.

    Thanks
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  5. #45
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    Just released thinBasic 1.10.3

    See first post of this threat and have fun
    http://www.thinbasic.com/community/s...inBasic-1-10-x
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  6. #46
    Thanks Eros for the nicest thinbasic release full of golden innovations
    i have noticed there is a new Linked list LList in addition to the previous LL
    i will read and experiment with the new features, i am waiting my dental pain to stop
    best wishes

  7. #47
    Member Kuron's Avatar
    Join Date
    Sep 2017
    Location
    Nashville
    Posts
    54
    Rep Power
    12
    Thank you, Eros.

  8. #48
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    Just released thinBasic 1.10.4

    See first post of this threat and have fun
    http://www.thinbasic.com/community/s...inBasic-1-10-x
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  9. #49
    Member Kuron's Avatar
    Join Date
    Sep 2017
    Location
    Nashville
    Posts
    54
    Rep Power
    12
    Thank you, Eros.

  10. #50
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Eros,

    the COM is really powerful, I am amazed more and more how much new possibilities open with this.
    Thank you so much for this new toy

    I discovered few minor things to look into, once you have a minute:

    In SampleScripts
    • iDispatch_Scripting.FileSystemObject_WMI_InstalledSoftware.tbasic
      • Line 43 triggers run time error

    • iDispatch_System.Net.WebClient.tbasic
      • In case the COM is not created, it could write the hint listed in comment


    In help file:
    • Links to IsCOMNothing in See also section point incorrectly to IsNothing from Excel.
    • In the topic "Nothing", there is "It is always necessary to release an iDispatch variable if it is referencing to an object."
      • I think the object release is done once it runs out of scope now

    • ComObjPtr is not documented yet


    In editor:
    • Codemax does not correctly highlight lines commented via //
      • ​I know Scintilla is the way for the future, but it is not 100% ready yet

    • With Scintilla
      • Ctrl+F does not display find dialog, but strange edit box
      • Ctrl+R does not allow replacing yet
      • Ctrl+G does not work yet, would be handy



    Petr
    Last edited by Petr Schreiber; 01-10-2017 at 20:18.
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

Page 5 of 14 FirstFirst ... 34567 ... LastLast

Members who have read this thread: 3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •