From: Adriano d. S. F. <adr...@gm...> - 2011-03-30 20:18:34
|
On 30-03-2011 17:09, Vlad Khorsun wrote: >>> Therefore it will be very desirable to add queryInterface to the our base interface, >>> even empty or raising notImplemented error. IUnknown *is* industry standard, despite >>> of our wish to accept it. >>> >>> Simple Delphi wrappers could be written to deal with reference counters but >>> i prefer to add queryInterface to the our interfaces. >>> >> No, it's not desirable to add bogus method to our interface. > > Make it not bogus > Then go months ago and re-discuss the versioning approach. >> We also use >> different calling convention than COM, otherwise our versioning system >> don't work. > > Here i don't understand you. Also, please, don't use wors "COM" everywhere, this just > wrong and annoying. > Delphi IInterface is documented to be same as IUnknown under Windows. And IUnknown is for COM. So this interface declare methods using stdcall. stdcall is incompatible with our approach to upgradeInterface. Sure two methods may use it, but I see no reason to have all these mix and bogus (queryInterface) to please a very small fraction of Delphi users while, ... > There is no stack allocated objects, yes. But if you ask google, you'll find a samples of > how to use interfaces to implement RAII. It is not as natural as in C++, but it is exists. ... there are ways to use it without we need *such* a hack of bogus queryInterface, and ... > > We have contacts with vendors of most used component libraries. It is more than enough > to have support of new API from them. Moreover, it will be not too hard to create Delphi unit > with necessary declarations (and wrappers, if needed) to me. > ... everybody is going to wrap it on another thing best suited for Delphi. Adriano |