comp.lang.ada
 help / color / mirror / Atom feed
From: David Botton <David@Botton.com>
Subject: Re: AdaCOM.Interface makes COM so easy...
Date: 1999/05/12
Date: 1999-05-12T00:00:00+00:00	[thread overview]
Message-ID: <3739C6EB.471C1DEC@Botton.com> (raw)
In-Reply-To: uhfpikw3y.fsf@infomatch.com

THANK YOU FOR YOUR SUGGESTIONS!

Since I am generating the low level binding and thus CLSID, I didn't care to much
what it looked like for the prototype. I am debating what method to use for the
final application.

If you download the latest version of newbeep.zip at http://www.adapower.com/com, I
just uploaded a new one about an hour ago, it has all the methods of the spec
implemented and a couple new ones.

It would now also be possible to write:

CLSID_BeepClass : aliased Stdole.GUID := To_GUID(
"{0FE0EE21-8AA2-11d2-81AA-444553540001}");

But I don't like the idea of parsing strings (time consuming). I LIKE your idea of a
conversion function to clean things up in the binding. I will probably go with
something along those lines combined with a hex output so that it looks more like
the original GUID.

BTW, You can now use the ProgID instead of the CLSID to create the COM object:

Create(Beep_Interface, "BeepLibrary.BeepClass");

or the GUID from a string:

Create(Beep_Inteface, To_GUID( "{0FE0EE21-8AA2-11d2-81AA-444553540001}"));


THANK YOU FOR YOUR SUGGESTIONS!

David Botton


Ray Blaak wrote:

> David Botton <David@Botton.com> writes:
>
> > Now you can try out what a Thick COM binding will be like. This new
> > binding to the beep example should give you an idea of how easy COM will
> > be. Included in the zip file is the AdaCom.Interface package that makes
> > it all possible.
>
> Pretty cool! One minor comment. The GUIDs look like:
>
>    CLSID_BeepClass : aliased Stdole.GUID := ( 266399265 , 35490 , 4562 ,
>       (unsigned_char'Val( 129),unsigned_char'Val( 170),unsigned_char'Val( 68),
>        unsigned_char'Val( 69),unsigned_char'Val( 83),unsigned_char'Val( 84),
>        unsigned_char'Val( 0),unsigned_char'Val( 1)));
>
> Could not something other than unsigned_char be used (i.e. some sort of 8-bit
> integer), so that you could actually have cleaner declarations like:
>
>    CLSID_BeepClass : aliased Stdole.GUID :=
>                 (266399265, 35490, 4562, (129, 170, 68, 69, 83, 84, 0, 1));
>
> If unsigned_char is absolutely required, supply a conversion function so that
> one do:
>
>    CLSID_BeepClass : aliased Stdole.GUID :=
>                 GUID_Of(266399265, 35490, 4562, 129, 170, 68, 69, 83, 84, 0, 1);
>
> --
> Cheers,                                        The Rhythm is around me,
>                                                The Rhythm has control.
> Ray Blaak                                      The Rhythm is inside me,
> blaak@infomatch.com                            The Rhythm has my soul.





      reply	other threads:[~1999-05-12  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-12  0:00 AdaCOM.Interface makes COM so easy David Botton
1999-05-12  0:00 ` Ray Blaak
1999-05-12  0:00   ` David Botton [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox