search for: file_flag_overlap

Displaying 6 results from an estimated 6 matches for "file_flag_overlap".

2010 Mar 25
4
CreateFile \\\\.\\x: non-root
...have a usb data aquisition device interfaced by mass storage protocol. I open it like: hEcgDrive=CreateFile("\\\\.\\g:", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_NO_BUFFERING | FILE_FLAG_WRITE_THROUGH | FILE_FLAG_OVERLAPPED, NULL); for communication I use DeviceIoControl(hEcgDrive, IOCTL_SCSI_PASS_THROUGH_DIRECT, .... with a 'custom' scsi operation code as wrapper. On Wine-1.1.30. under UHU linux (2.6.23.9-1) the program can open the device only if run as root. If run as plain user, CreateFile gives...
2001 Nov 07
1
WG: Re: Wine and the serial port [LONG]
...The Comm-Port gets opened with overlapped I/O. However, for WaitCommEvent() we do not specify an overlapped structure. This works fine on NT4 / W2K, but is contrary to the documentation, which specifys that you need to supply an overlapped structure if you do. Quote: "If hFile was opened with FILE_FLAG_OVERLAPPED, the lpOverlapped parameter must not be NULL. It must point to a valid OVERLAPPED structure. If hFile was opened with FILE_FLAG_OVERLAPPED and lpOverlapped is NULL, the function can incorrectly report that the operation is complete. " However, this has worked for years in "real life&qu...
2007 Sep 25
2
Using callbacks with ReadFileEx
...extend Windows::Synchronize class Error < StandardError; end def self.read_async(file, length=nil, offset=0, &block) handle = CreateFile( file, FILE_READ_DATA, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_FLAG_OVERLAPPED | FILE_FLAG_NO_BUFFERING, 0 ) if handle == INVALID_HANDLE_VALUE raise Error, get_last_error end func = Win32::API::Callback.new(''LLP'', ''V''){ block.call } over...
2007 Oct 09
5
Playing with ReadFileScatter()
...File extend Windows::MSVCRT::IO extend Windows::SystemInfo include Windows::File def self.readlines(file, sep = $INPUT_RECORD_SEPARATOR) handle = CreateFile( file, GENERIC_READ, FILE_SHARE_READ, nil, OPEN_EXISTING, FILE_FLAG_OVERLAPPED | FILE_FLAG_NO_BUFFERING, nil ) if handle == INVALID_HANDLE_VALUE raise SystemCallError.new(GetLastError()) end sysbuf = 0.chr * 40 GetSystemInfo(sysbuf) page_size = sysbuf[8,4].unpack(''L'')[0] # dwPageSize...
2008 May 20
10
Asynchronous Pipe::Server problems
Hi all, I''ve been working on the win32-pipe library (again) and I''ve reworked the interface. Instead of Pipe.new_server or Pipe.new_client, there''s now a base Pipe class, with Pipe::Server and Pipe::Client subclasses. You can find the latest code in the CVS repo. Oh, and you''ll need to update your windows-pr library with the latest from CVS if you want to
2019 Jan 14
6
[PATCH nbdkit incomplete 0/5] Port to Windows.
This is an incomplete port to Windows. Currently the server compiles and starts up successfully, but goes into an infinite loop when you connect to it. Nevertheless I think the approach is ready for feedback. This being Windows the changes go quite deep. Rich.