PBRow and TLB_400

Started by Christian Weilguny, September 20, 2010, 08:28:08 AM

Previous topic - Next topic

Christian Weilguny

Hi,

I have a curious behaviour in this two programs (PBRow and TLB_400).

Independently from the settings in the options-dialog of both apps I get always only methods generated and no propertys.
I'm using direct interface.

May be some other configurations forces this behaviour, but I don't now what this can be.

Modified:
In Addition to this is in both programs no keyword opt or optional present even if it is defined in the dll.

Christian

José Roca

Quote
Independently from the settings in the options-dialog of both apps I get always only methods generated and no propertys.
I'm using direct interface.

If the interface inherits from IUnknown, low-level COM interfaces don't use properties, only methods.

Quote
In Addition to this is in both programs no keyword opt or optional present even if it is defined in the dll.

Currently, PB is unable to set this flag in the type libraries that it generates.

Christian Weilguny

Hi Jose,
QuoteIf the interface inherits from IUnknown, low-level COM interfaces don't use properties, only methods.
What is a low-level COM interface?

And why is this so?

Christian

José Roca

Quote
What is a low-level COM interface?

One that inherits directly from IUnknown.

Quote
And why is this so?

Because the return value is used to return an error code, not another kind of value.

Christian Weilguny

But I've changed the methods to props in the ready .inc file and it works fine.
Have I to expect errors from this?

Christian

José Roca

I can't know, since you don't provide any code.

If you want properties, then use INHERIT IDispatch instead of INHERIT IUnknown, if it is your own .DLL, that I don't know.

Christian Weilguny

I thought, with inherit IDispatch the accessing from an external exe is more complicated.
If this is the sure way, I'll go it.

Christian

José Roca

Low-level COM  interfaces use a different calling convention. If you trick it to use the syntax for properties, how are you going to return an error code when needed?

Well, at least now you know why the browsers will only use the METHOD keyword instead of the PROPERTY keyword: Because low-level interfaces only use methods.

Christian Weilguny

Thanks, Jose

no day without learning a new thing  :P

Christian