comp.lang.ada
 help / color / mirror / Atom feed
* Microsoft UWP/WinRt
@ 2017-06-02  1:23 alby.gamper
  2017-06-02  7:24 ` Dmitry A. Kazakov
  0 siblings, 1 reply; 12+ messages in thread
From: alby.gamper @ 2017-06-02  1:23 UTC (permalink / raw)


Hello Ada community

Would anyone be interested in a set of Ada bindings to the new Microsoft
UWP/WinRT api ?. This would enable Ada to be used to develop native Windows Store
applications and also allow parts of the Api to be used from Desktop applications
as well. (Note, as documented by Microsoft, only a subset of the WinRT api can
be used by traditional desktop applications)

Below is a very simple sample of what the bindings would look like

procedure Test4 is

			procedure ConnectAsync_Callback (asyncInfo : Windows.Foundation.IAsyncAction ; asyncStatus : Windows.Foundation.AsyncStatus) is
				Hr			: Windows.HRESULT := 0;
				m_RetVal	: aliased Windows.Void;
			begin
				Hr := asyncInfo.GetResults(m_RetVal'access);
				Put_Line("Callback Invoked - connected to www.microsoft.com");
			end;

			Hr						: Windows.HRESULT := 0;
			m_RetVal				: aliased Windows.Void;
			m_HostNameFactory		: HostNameFactory;
			m_IHostName				: IHostName;
			m_StreamSocket			: StreamSocket;
			m_IAsyncAction			: IAsyncAction;						
			m_AsyncActionCompleted	: AsyncActionCompletedHandler := new AsyncActionCompletedHandler_Interface(ConnectAsync_Callback'access);

		begin
			m_IHostName := m_HostNameFactory.CreateHostName(To_String("www.microsoft.com"));
			m_IAsyncAction := m_StreamSocket.ConnectAsync(m_IHostName, To_String("http"));
			Hr := m_IAsyncAction.put_Completed(m_AsyncActionCompleted, m_RetVal'access);
			delay 5.0;
			m_StreamSocket.Close;
		end;

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

end of thread, other threads:[~2017-07-03 10:14 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-02  1:23 Microsoft UWP/WinRt alby.gamper
2017-06-02  7:24 ` Dmitry A. Kazakov
2017-06-02 12:27   ` Lucretia
2017-06-02 13:28     ` Dmitry A. Kazakov
2017-06-02 14:53       ` gautier_niouzes
2017-06-02 14:56         ` Dmitry A. Kazakov
2017-06-02 21:11         ` Randy Brukardt
2017-06-08 15:31     ` Pascal Obry
2017-06-14  5:43       ` Microsoft UWP/WinRT - Update alby.gamper
2017-06-18  1:15         ` Ivan Levashev
2017-06-18  2:03       ` JEDI, Win32Ada and GNAT-COM Ivan Levashev
2017-07-03 10:14         ` Luke A. Guest

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