comp.lang.ada
 help / color / mirror / Atom feed
From: jerry@jvdsys.nextjk.stuyts.nl (Jerry van Dijk)
Subject: Re: Win32 File Handles and Ada
Date: 1998/05/31
Date: 1998-05-31T00:00:00+00:00	[thread overview]
Message-ID: <EtuCI8.55@jvdsys.nextjk.stuyts.nl> (raw)
In-Reply-To: 3570933D.50780D04@roanoke.infi.net


Srinivasan, R (gitas@roanoke.infi.net) wrote:

: Environment : Win NT 4.0

: I am looking for a way to map Win32 File handles - created by CreatePipe
: for instance into Ada Text_Io.File_Type (or some other such construct
: that is close).

You invoke quite a number of issues here...

1) The Ada.Text_IO.File_Type is a limited private type, how it is
   defined depends on you particular Ada Runtime Library Environment.
   Most likely, it will be different for all compilation systems.
   You seem to assume that File_Type will be a File Handle. This might
   or might not be true.

2) a Win32 File Handle can be many things, like a Windows Handle, a
   C type file handle or file descriptor, but also a Asynchronous
   Windows Handle that acts like a C file descriptor...
   You have to be absolutely clear on what you are talking about here.

What your question seems to be is: 

	How can I use the Text_IO functions and procedures to
	read and write on Win32 pipes.

which is a different question.

The answer is: you implement them on top of the Win32 binding.

For an example you could take a peek at my Win32 port of AdaSockets,
which does a simular thing for reading/writing through sockets.
The source is at http://stad.dsl.nl/~jvandyk

Jerry.
-- 
-- Jerry van Dijk  | email: jdijk@acm.org
-- Leiden, Holland | member Team-Ada




  reply	other threads:[~1998-05-31  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-05-30  0:00 Win32 File Handles and Ada Srinivasan, R
1998-05-31  0:00 ` Jerry van Dijk [this message]
1998-06-03  0:00   ` Srinivasan, R
1998-05-31  0:00 ` Robert Dewar
replies disabled

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