[prev in list] [next in list] [prev in thread] [next in thread] 

List:       boost-users
Subject:    Re: [Boost-users] asio to read device files
From:       Zachary Turner <divisortheory () gmail ! com>
Date:       2009-11-30 15:11:40
Message-ID: 478231340911300711j5bc37d14u8696d80ea57bc5bb () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Mon, Nov 30, 2009 at 4:38 AM, Lloyd <lloyd@cdactvm.in> wrote:

>
> Hi,
> In Windows we can open and read storage meidias by using the call
> CreateFile() and ReadFile() respecively. The device name is passed as a
> string to the CreateFile() call, as an example "PhysicalDrive1". Create file
> returns  a handle of type "HANDLE". can I use this handle in asio in order
> to read a device file?
>

Yes, take a look at boost::asio::windows::random_access_handle and
random_access_handle_service.  You can use this in normal calls to
async_read, async_write, etc

[Attachment #5 (text/html)]

<br><br><div class="gmail_quote">On Mon, Nov 30, 2009 at 4:38 AM, Lloyd <span \
dir="ltr">&lt;<a href="mailto:lloyd@cdactvm.in">lloyd@cdactvm.in</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <br>
Hi,<br>
In Windows we can open and read storage meidias by using the call CreateFile() and \
ReadFile() respecively. The device name is passed as a string to the CreateFile() \
call, as an example &quot;PhysicalDrive1&quot;. Create file returns  a handle of type \
&quot;HANDLE&quot;. can I use this handle in asio in order to read a device file?<br> \
</blockquote></div><br>Yes, take a look at boost::asio::windows::random_access_handle \
and random_access_handle_service.  You can use this in normal calls to async_read, \
async_write, etc<br>



_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic