COMate - control COM objects via automation - OBSOLETE!

Developed or developing a new product in PureBasic? Tell the world about it.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Is there any chance to do so?
I am sure there is! :wink:

Haven't time at the minute, being no expert on the agent! :wink:

I'll get this COMate update released and then have a look at the Agent as time allows. :)
I may look like a mule, but I'm not a complete ass.
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Just seen this - looks great... :D

But can't find the download link - just got:
COM automation

Whoops...
on the website?

Edit:

Just done a refresh - now the link is on the side.
(using IE v8b2)
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Download link is on the right hand side of that same page!!!

There will be an update within an hour or so which will pretty much invalidate the current version anyhow!
I may look like a mule, but I'm not a complete ass.
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Your too quick - just edited the post. lol

The link wasn't there on the first check - using IE v8b2

There now though, maybe a strange html problem?
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Unlikely, it's only a simple html page. Yes the css is quite involved, but nothing that IE shouldn't be able to handle. Works fine here on IE7.
I may look like a mule, but I'm not a complete ass.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

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! :wink: 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! :wink:
  • 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! :wink:
See the nxSoftware site for the download.
I may look like a mule, but I'm not a complete ass.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

@Michael Vogel : Have you tried the "Visible" property?

Code: Select all

Debug GenieObject\GetIntegerProperty("Visible")
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.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

:D thx for the update

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.
Image
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Probably! :)

Have to ask SFSxOI about that.

Try switching Win32_DesktopMonitor for Win32_DisplayConfiguration.
I may look like a mule, but I'm not a complete ass.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

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.
Image
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Post by SFSxOI »

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.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

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.
Sparkie
PureBatMan Forever
PureBatMan Forever
Posts: 2307
Joined: Tue Feb 10, 2004 3:07 am
Location: Ohio, USA

Post by Sparkie »

srod, I was going to take a look at COMate but none of your Quick links (freeware) are working for me.

COMate link opens new page but it says
COM automation
Woops...
All other links s are 404/not found. :(

(IE6 and Firefox3)
What goes around comes around.

PB 5.21 LTS (x86) - Windows 8.1
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Right hand side of the page with 'whoops' on it should be a download link.
I may look like a mule, but I'm not a complete ass.
Sparkie
PureBatMan Forever
PureBatMan Forever
Posts: 2307
Joined: Tue Feb 10, 2004 3:07 am
Location: Ohio, USA

Post by Sparkie »

:oops: Thanks. Thought that was a link to a download page for PureBasic 4.2.
What goes around comes around.

PB 5.21 LTS (x86) - Windows 8.1
Post Reply