Macro framework for creating COM objects

Developed or developing a new product in PureBasic? Tell the world about it.
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Post by SFSxOI »

OK, stupid question here,,,,but i want to make sure i'm doing something right before I go any further with trying to locate a small problem;

If I do this:

Code: Select all

DefineGUID(BlurEffectGuid, $633C80A4, $1843, $482b, $9E, $F2, $BE, $28, $34, $C5, $FD, $D4)
When I call this, is it:

Code: Select all

_?GUID_BlurEffectGuid
or...
GUID_BlurEffectGuid
or
?GUID_BlurEffectGuid
freak
PureBasic Team
PureBasic Team
Posts: 5929
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

The name you provide becomes a label in the datasection as it is, so it is:

Code: Select all

?BlurEffectGuid
This gives you the pointer to the guid, which is usually needed.
So if you want the name to be GUID_... you have to include that in the name.
quidquid Latine dictum sit altum videtur
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Post by SFSxOI »

OK, got it. Ya know when you stare at this stuff long enough you start to forget...or maybe its just old age :) What the problem realy turned out to be was a spelling error - I did BlurEffcctGuid instead of BlurEffectGuid - had a 'c' instead of an 'e'.

Thanks freak
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Post by SFSxOI »

freak,

This is weird. Using your example code from the first page of this thread, the first time i run it it works, however, any more tries to run the example you provided in your post gives this error:

XIncludeFile #PB_Compiler_Home+"COMFramework\BaseInclude.pb"
__COM_Class(StatusObject) is not a valid operator

works the very first time i run the sample, but will not work after that.
freak
PureBasic Team
PureBasic Team
Posts: 5929
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

I extended the number of interfaces that can be implemented in an object to 20, as it was requested by somebody via email.
It is available from the above location.

Let me know if there are any troubles.
quidquid Latine dictum sit altum videtur
lexvictory
Addict
Addict
Posts: 1027
Joined: Sun May 15, 2005 5:15 am
Location: Australia
Contact:

Post by lexvictory »

@Freak: I know this is a rather old topic, but is there any chance you can update the debugging code for x64? (i got the other bits to work, but converting the asm is throwing up linker errors)
If you don't have time / can't I guess I'll just do the debug needy work in the x86 IDE...
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!
Post Reply