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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c72b93d85d765332 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-10 16:35:57 PST Path: archiver1.sj.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.stealth.net!news-east.rr.com!news.rr.com!chnws02.mediaone.net!chnws06.ne.mediaone.net!24.91.0.34!typhoon.ne.mediaone.net.POSTED!not-for-mail From: "Jeff Creem" Newsgroups: comp.lang.ada References: <3AFACEC7.C2E67357@icn.siemens.de> Subject: Re: Ada and Hardware X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: <1BFK6.19477$9j1.4714444@typhoon.ne.mediaone.net> Date: Thu, 10 May 2001 23:35:25 GMT NNTP-Posting-Host: 24.147.67.93 X-Complaints-To: abuse@mediaone.net X-Trace: typhoon.ne.mediaone.net 989537725 24.147.67.93 (Thu, 10 May 2001 19:35:25 EDT) NNTP-Posting-Date: Thu, 10 May 2001 19:35:25 EDT Organization: Road Runner Xref: archiver1.sj.google.com comp.lang.ada:7368 Date: 2001-05-10T23:35:25+00:00 List-Id: "Ted Dennison" wrote in message news:JLCK6.91$j65.11856@www.newsranger.com... > In article <3AFACEC7.C2E67357@icn.siemens.de>, Alfred Hilscher says... > > > >Maybe the Windows API calls "CreateFile" and "DeviceIOControl" will be > >what you are looking for ? Look for this excerpt from MS-API > .. > >"You can use the CreateFile function to open a disk drive or a partition > .. > >\\.\A: Obtains a handle to drive A on the user's computer. > >\\.\C: Obtains a handle to drive C on the user's computer." > > Interesting. One has to wonder if this would work with the standard Ada IO > operations (eg: Ada.Streams.Stream_IO)... > I just had to know to. It looks like it does not work. with Ada.Streams.Stream_IO; with Ada.Streams; procedure Show_It is Buffer : Ada.Streams.Stream_Element_Array (1 .. 2048) := (others => 0); File : Ada.Streams.Stream_IO.File_Type; begin Ada.Streams.Stream_IO.Open ( File => File, Name => "\\.\A:", Mode => Ada.Streams.Stream_IO.Out_File); Ada.Streams.Stream_IO.Write ( File => File, Item => Buffer); Ada.Streams.Stream_IO.Write ( File => File, Item => Buffer); Ada.Streams.Stream_IO.Write ( File => File, Item => Buffer); Ada.Streams.Stream_IO.Close(File); end Show_It; Raises a name error on the open. I tried a few quick variations on it. (Including create instead of open).