comp.lang.ada
 help / color / mirror / Atom feed
* Re: AdaCOM.Interface makes COM so easy...
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Ray Blaak @ 1999-05-12  0:00 UTC (permalink / raw)


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.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: AdaCOM.Interface makes COM so easy...
  1999-05-12  0:00 ` Ray Blaak
@ 1999-05-12  0:00   ` David Botton
  0 siblings, 0 replies; 3+ messages in thread
From: David Botton @ 1999-05-12  0:00 UTC (permalink / raw)


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.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* AdaCOM.Interface makes COM so easy...
@ 1999-05-12  0:00 David Botton
  1999-05-12  0:00 ` Ray Blaak
  0 siblings, 1 reply; 3+ messages in thread
From: David Botton @ 1999-05-12  0:00 UTC (permalink / raw)


May 12, 1999

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.

Go to http://www.AdaPower.com/com to give it a try

BeepLibrary.ads was generated with the current version of BindCOM. I
then hand coded the thick IBeep_Type code (only a couple of lines).

David Botton




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-05-12  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox