Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

We don't really understand it, so we'll give it to the programmers.


devel / comp.lang.ada / Re: [Ann] WinRt - version 3

SubjectAuthor
* [Ann] WinRt - version 3AlexG
`- Re: [Ann] WinRt - version 3AlexG

1
[Ann] WinRt - version 3

<a8682e62-de20-4954-86da-ed81a81df0c2n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9965&group=comp.lang.ada#9965

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:ad4:4b24:0:b0:64a:64a3:d018 with SMTP id s4-20020ad44b24000000b0064a64a3d018mr558196qvw.8.1693113509926;
Sat, 26 Aug 2023 22:18:29 -0700 (PDT)
X-Received: by 2002:a5b:991:0:b0:d07:9d79:881c with SMTP id
c17-20020a5b0991000000b00d079d79881cmr732762ybq.11.1693113509638; Sat, 26 Aug
2023 22:18:29 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Sat, 26 Aug 2023 22:18:29 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=2001:8003:281a:c01:f0e4:cb6d:2dec:20d4;
posting-account=rpELHgoAAADyznoDQ9DF8kYwISCaKTaz
NNTP-Posting-Host: 2001:8003:281a:c01:f0e4:cb6d:2dec:20d4
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a8682e62-de20-4954-86da-ed81a81df0c2n@googlegroups.com>
Subject: [Ann] WinRt - version 3
From: agamper@bigpond.net.au (AlexG)
Injection-Date: Sun, 27 Aug 2023 05:18:29 +0000
Content-Type: text/plain; charset="UTF-8"
 by: AlexG - Sun, 27 Aug 2023 05:18 UTC

Dear Ada community

I have created a new git repo for the Ada binding to WinRT (now version 3)
This version is a cleaner implementation than the previous version and includes the following changes

1) Wide strings are mapped to HStrings
2) Async operations and actions are handled automatically
3) code files now contain code at the Namespace level

Git repo is located here https://github.com/Alex-Gamper/Ada-WinRt3

Re: [Ann] WinRt - version 3

<98530b20-c270-434c-a5f7-049905d94bf9n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=9984&group=comp.lang.ada#9984

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:620a:6193:b0:76f:c1c:8697 with SMTP id or19-20020a05620a619300b0076f0c1c8697mr140097qkn.8.1693732025861;
Sun, 03 Sep 2023 02:07:05 -0700 (PDT)
X-Received: by 2002:a17:90a:fc8a:b0:26b:6df8:eb70 with SMTP id
ci10-20020a17090afc8a00b0026b6df8eb70mr1780242pjb.1.1693732025287; Sun, 03
Sep 2023 02:07:05 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Sun, 3 Sep 2023 02:07:04 -0700 (PDT)
In-Reply-To: <a8682e62-de20-4954-86da-ed81a81df0c2n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:8003:281a:c01:bc6f:e492:284e:bc3;
posting-account=rpELHgoAAADyznoDQ9DF8kYwISCaKTaz
NNTP-Posting-Host: 2001:8003:281a:c01:bc6f:e492:284e:bc3
References: <a8682e62-de20-4954-86da-ed81a81df0c2n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <98530b20-c270-434c-a5f7-049905d94bf9n@googlegroups.com>
Subject: Re: [Ann] WinRt - version 3
From: agamper@bigpond.net.au (AlexG)
Injection-Date: Sun, 03 Sep 2023 09:07:05 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3055
 by: AlexG - Sun, 3 Sep 2023 09:07 UTC

Below is a simple example of the Api usage

--------------------------------------------------------------------------------
with Ada.Wide_Text_IO;
with Ada.Strings.Wide_Unbounded;
with WinRt;
with WinRt.Windows.Foundation;
with WinRt.Windows.Networking;
with WinRt.Windows.Networking.Sockets;
with WinRt.Windows.Storage.Streams;
with WinRt.Windows.Web.Http;
--------------------------------------------------------------------------------
procedure WinRt3Test2 is

use WinRt;
use Ada.Strings.Wide_Unbounded;

Hr : HResult := 0;

function "+"(value : Wide_String) return Unbounded_Wide_String renames To_Unbounded_Wide_String;
function "+"(value : Unbounded_Wide_String) return Wide_String renames To_Wide_String;

begin
Hr := RoInitialize;
if Hr = 0 then

declare
Uri : Windows.Foundation.Uri := Windows.Foundation.Constructor (+"http://www.google.com");
HttpClient : Windows.Web.Http.HttpClient := Windows.Web.Http.Constructor;
Result : WString;
begin
Result := HttpClient.GetStringAsync (Uri);
Ada.Wide_Text_IO.Put_Line (+Result);
HttpClient.Close;
end;

declare
Host : Windows.Networking.HostName := Windows.Networking.Constructor(+"www.google.com");
Port : WString := +"80";
Socket : Windows.Networking.Sockets.StreamSocket := Windows.Networking.Sockets.Constructor;
DataWriter : Windows.Storage.Streams.DataWriter := Windows.Storage.Streams.Constructor (Socket.get_OutputStream);
begin
Socket.ConnectAsync (Host, Port);
Socket.Close;
end;

RoUninitialize;
end if;
end;

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor