You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
It would be nice if PB just let the INHERIT IDISPATCH statement mean inherit IDispatch.
I mean we have precedents.
IUnknown interface - INHERIT IUNKNOWN
Automation-compatible IUnknown interface - INHERIT IAUTOMATION
Dual IDispatch interface -INHERIT DUAL
Also, it doesn't make much sense to use INHERIT DUAL in an event class.
That is being very polite. This just leaves my updated COM-code generator and type library
browser hanging in mid air.
Therefore, does this change in the meaning of INHERIT IDISPATCH affect the declaration of the interface shown above?
I'm afraid. The post advises to "change all instances of INHERIT IDISPATCH to INHERIT DUAL". While it makes sense to use INHERIT DUAL in the classes, it would be confusing in the declaration of an interface like the one that you have posted, that inherits from IDispatch but is not dual.
Also, it doesn't make much sense to use INHERIT DUAL in an event class.
Currently, the statement INHERIT IDISPATCH is used to signify a dual interface (a combination of direct VTable and Dispatch).
The statement INHERIT DUAL is accepted as a synonym.
In order to provide you with greater capabilities in the future, we have decided to disallow INHERIT IDISPATCH,
so that it can be reserved for another purpose in the future.
This change will be effective with PBCC 5.01 and PBWin 9.01, which will be available in the near future.
We recommend that you change all instances of INHERIT IDISPATCH to INHERIT DUAL in your current programs to
avoid any conflicts with the upcoming release.
This makes me happy because from a low-level COM perspective, I found the statement INHERIT IDISPATCH as
signifying a dual interface confusing.
But does this also apply to the declaration of an interface? For example, given the following interface
My natural inclination was to use INHERIT IDISPATCH in the PB declaration, but was stopped dead in
my tracks when I read that the statement signified a dual interface. But Jose cleared things up with
this reply
INHERIT IDispatch defines a dual interface when you are writing classes with PB to build a COM server,
but when it is a declaration to use a server as a client, it simply defines that it is an interface that inherits from IDispatch.
Therefore, does this change in the meaning of INHERIT IDISPATCH affect the declaration of the interface shown above?
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Leave a comment: