Update - version 1.1.0. 6th Sept. 2008.
My thanks to all those who have tested out the first version of COMate and to SFSxOI in particular for creating some nice WMI demos.
Changes for this new version include :
Addition of a 'BYREF' parameter type-modifier. This is for calling methods (VB) in which certain parameters have been declared with the 'ByRef' modifier. For many COM objects it is not enough to simply pass the address of a variable, you will also need to use this new modifier. Particularly true for components created in VB.
COMate can now house ActiveX controls. See the demo programs and the help manual for details. I haven't added 'Event sinks' yet for trapping events/messages sent by such controls, but it is only a matter of time! Consider this part to be in 'beta' stage because I took a slightly different approach here than PureDispHelper and so it remains to be seen whether more than just a handful of ActiveX controls will function correctly?
Have totally rewritten the command parser and various utility functions in order to increase the speed. DispHelper does not utilise such a parser and so will of course generally run faster. Increasing the speed has been accomplished by simply removing all PB string functions from the aforementioned functions and replacing with memory buffers and 'in place' alteration (via pointers) of strings. Tests on my machine of these functions (when stripped from COMate) show a x50 increase in speed. Take this with a pinch of salt though! It remains to be seen what effect (if any) these new routines will have, speed-wise, on COMate itself.
This new version is now to be known as COMate-Turbo!
Have included a slightly modified version of mk-soft's / ts-soft's excellent 'VariantHelper' utility within the COMate-Turbo download, because there was a slight bug with the 'SafeArray' macros. Some COM methods/properties will return a SafeArray (yuk!) See the 'Demo_IPAddresses.pb' demo for an example of dealing with a return from a COM method in the form of a SafeArray. NOTE that the VariantHelper utility can only deal with SafeArray's of one dimension. Beyond this you are on your own!
See the nxSoftware site for the download.
I may look like a mule, but I'm not a complete ass.
This returns -1 (for being visible) 0 for hidden. If you hide the agent then you do have to wait until it has completely vanished before the "visible" property will return 0.
I may look like a mule, but I'm not a complete ass.
the example: "Demo_MonitorInfo.pb" shows only the dimension of my
secondary monitor but should this show all monitors?
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
sry, it shows the primary display, not the secondary
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Oh WoW! An update already. That is just more then excellent ! Thank you very much srod.
Just tried out the new version, it is indeed faster.
I spent almost 10 hours yesterday playing around with it, my wife thought I was nuts 'cause when something worked she would hear me gleefully chuckling about it. She stuck her head into the room a few times and said "Are you OK ?"
I've already started digging out some past and recent projects that used converted C++ code and i'm re-doing them with COmate.
SFSxOI - could you please take a look at the monitors WMI example which I took from an example you posted. ts-soft reports that it does not list his secondary monitor!
I may look like a mule, but I'm not a complete ass.