COM Tutorial (work in progress)

Share your advanced PureBasic knowledge/code with the community.
Bonne_den_kule
Addict
Addict
Posts: 841
Joined: Mon Jun 07, 2004 7:10 pm

Post by Bonne_den_kule »

Nice tutorial.
User avatar
pdwyer
Addict
Addict
Posts: 2813
Joined: Tue May 08, 2007 1:27 pm
Location: Chiba, Japan

Post by pdwyer »

are there any examples around of how this works? Just a simple skeleton so I can see a full yet short piece of code that runs?

Maybe something like geting the size of a harddisk from wmi or using a filesystemopbject
Paul Dwyer

“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
User avatar
electrochrisso
Addict
Addict
Posts: 989
Joined: Mon May 14, 2007 2:13 am
Location: Darling River

Post by electrochrisso »

I agree, a nice tutorial :D
Keep up the good work.
User avatar
SimpleMind
Enthusiast
Enthusiast
Posts: 112
Joined: Sun May 18, 2003 12:40 pm
Location: Netherlands

Post by SimpleMind »

Thanks Freak! Nice work.
Give me books, fruit, french wine, fine weather and a little music.
John Keats
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Aye, read freak's tutorial first and then a couple more scattered about the web and suddenly COM doesn't look quite such a tough nut to crack after all. Very simple actually if just using existing components.

I even read a tutorial on creating com objects in c and even this doesn't look massively complex. Although the question of how (and when) you create GUID's does puzzle me a little! Still, why the hell would I want to create a com object anyhow?

Oh yea, the damn Window's shell...

:)
I may look like a mule, but I'm not a complete ass.
User avatar
SimpleMind
Enthusiast
Enthusiast
Posts: 112
Joined: Sun May 18, 2003 12:40 pm
Location: Netherlands

Post by SimpleMind »

Hi srod,

Yeah, I know. Once you know about the vtable stuff it's becomming clearer and that you just use an table of function pointers..... The Variant was a hurdle too but looks easy now.

I know the C stuff article: "COM in plain C", nice stuff. There is a whole series of it at The Code Project.

Why would I use COM. I want just to pull on the strings to play with MSWord from PureBasic.
Give me books, fruit, french wine, fine weather and a little music.
John Keats
Post Reply