From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8ae7fca9d9e30239 X-Google-Attributes: gid103376,public From: David Botton Subject: Re: AdaCOM.Interface makes COM so easy... Date: 1999/05/12 Message-ID: <3739C6EB.471C1DEC@Botton.com>#1/1 X-Deja-AN: 477101533 Content-Transfer-Encoding: 7bit References: <373932F8.7699944E@Botton.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Trace: news1.iquest.net 926533190 204.180.46.127 (Wed, 12 May 1999 13:19:50 EDT) MIME-Version: 1.0 NNTP-Posting-Date: Wed, 12 May 1999 13:19:50 EDT Newsgroups: comp.lang.ada Date: 1999-05-12T00:00:00+00:00 List-Id: 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 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.