Re: Interfacing (was Re: Poor people's OS?)

From: Dimitri Maziuk (dima_at_127.0.0.1)
Date: 08/29/03


Date: Thu, 28 Aug 2003 23:13:44 +0000 (UTC)

Christopher Browne sez:
> After a long battle with technology,Dimitri Maziuk <dima@127.0.0.1>, an earthling, wrote:
...
>> Interfaces come with a lot of overhead so you normally wouldn't
>> use them unless you're writing a distributed app.
...
> I _don't_ see it being a disastrous overhead to have something like:
> module crypt {
> void encrypt_3des(in string input, in string key,
> in string cfb, out string output);
> void encrypt_twofish(in string input, in string key,
> in string cfb, out string output);
> };
> as a definition.

Ermm. I'm probably wrong -- it's been a while since I last looked
at this stuff. ISTR the part where you get list of supported interfaces
from IUnknown, go through IClassFactory to instantiate the object,
through IDispatch to actually use it, etc. I.e. a couple of levels of
indirection with a few extras like byte ordering possibly thrown in
the communication channel.

Dima

-- 
The wombat is a mixture of chalk and clay used for respiration.      -- MegaHal


Relevant Pages