Displaying 20 results from an estimated 2000 matches similar to: "Getting an actual system error"
2007 Oct 09
5
Playing with ReadFileScatter()
Hi all,
Looking at the IO.readlines source in io.c, it looks to me like they
grab 8k chunks, split on the input record separator, and buffer accordingly.
Since it looks like ReadFileScatter() does some of that work
automatically (in page file sized chunks), I thought I''d give it a try.
Here''s what I''ve got, but it doesn''t work. I have an incorrect parameter
2006 Mar 20
5
Need some ACL help for win32-file
Hi folks,
I''ve got most everything done for the pure Ruby version of win32-file.
The last thing left (since I''ll be moving the IO methods to a different
package eventually) is the file security stuff. Here''s what I''ve got so
far for the get_permissions method. However, I''m stuck at GetAce(). If
someone could help me finish up this method, I
2007 Oct 04
0
Prototyping the Dir class
Hi all,
I''ve been prototyping a Windows-only Dir class for Ruby. Below is what
I''ve got so far. The class methods were easy, except for Dir.glob. The
code in dir.c is just nasty, and I can''t help but think that it could be
heavily refactored. I did come across this link:
http://www.codeproject.com/file/fileglob.asp
But I haven''t investigated it yet. Anyone
2008 May 17
2
Problem reading log with win32-eventlog - buffer too small
Hi all,
A user recently ran into an issue with win32-eventlog and the
EventLog#read method when reading a saved log file. It seems that
there''s an issue.
After some experimentation I found that the problem seems to be that the
initial buffer to ReadEventLog() in line 558 is too small, so it tries a
second call to ReadEventLog() with a larger buffer. The problem is that,
after I
2008 Jun 18
2
[ win32utils-Bugs-20722 ] Windows::Error.get_last_error only returns the first character (PATCH)
Bugs item #20722, was opened at 2008-06-18 15:16
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=411&aid=20722&group_id=85
Category: windows-pr
Group: Code
Status: Open
Resolution: None
Priority: 3
Submitted By: John Whitley (whitley)
Assigned to: Nobody (None)
Summary: Windows::Error.get_last_error only returns the first character (PATCH)
Initial
2007 Oct 01
2
[ win32utils-Bugs-14360 ] Bad interaction between win32-file-stat and FileUtils
Bugs item #14360, was opened at 2007-10-01 15:00
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=411&aid=14360&group_id=85
Category: win32-file-stat
Group: Code
Status: Open
Resolution: None
Priority: 3
Submitted By: Daniel Berger (djberg96)
Assigned to: Nobody (None)
Summary: Bad interaction between win32-file-stat and FileUtils
Initial Comment:
Ruby
2007 Sep 25
2
Using callbacks with ReadFileEx
Hi all,
First, I just realized I''ll need to go back and fix some of the
prototype declarations for windows-pr. The callback parameters will now
need to be set to ''K''. ReadFileEx is one example of this. For purposes
of my question, let''s assume ReadFileEx has been declared like so:
API.new(''ReadFileEx'', ''LPLPK'',
2007 Sep 25
2
Bug in win32-api with void prototypes?
Hi all,
It seems that a void prototype requires an explicit argument in our
version of win32/api:
C:\>irb
irb(main):001:0> require ''win32/api''
=> true
irb(main):002:0> include Win32
=> Object
irb(main):003:0> require ''Win32API''
=> true
# Our version
irb(main):004:0> GetLastErrorA = API.new(''GetLastError'',
2008 May 06
4
DeviceIoControl + IOCTL_DISK_GET_DRIVE_GEOMETRY problem
Hi all,
Ok, what am I doing wrong here?
require ''windows/device_io''
require ''windows/handle''
require ''windows/error''
include Windows::DeviceIO
include Windows::Handle
include Windows::Error
fh = File.open(''test.txt'') # Assume you have this
handle = get_osfhandle(fh.fileno)
if handle == INVALID_HANDLE_VALUE
puts
2007 Oct 27
0
Who wants to take a stab at IO.foreach?
Hi all,
Anyone want to help with a native IO.foreach?
I''m missing some of the critical logic here. This currently just does a
straight BYTE_MAX data read, instead of a line by line data read, and
doesn''t deal with lines split between multiple reads.
I checked strtok into CVS (for windows-pr) if anyone wants to use that
instead of String#split. It''s in
2006 May 26
13
win32-dir, unicode
Hi,
I''ve got a preliminary version of the pure Ruby version of win32-dir in
CVS. However, I was hoping to work out the Unicode issue. Run this:
from = "C:\\test"
to = "?????"
Dir.mkdir(from) unless File.exists?(from)
Dir.create_junction(to, from)
It works, but my explorer (and dos) window shows the name garbled. I
don''t think it''s a font
2013 Aug 29
5
[PATCH 1/6] Rationalise whitespace to 4 space indentation with no trailing spaces
RHSrvAny.c was using a mixture of 4 space indentation, and tabs with a width of
4. This commit rationalises the whitespace to use only 4 space indentation, and
removes trailing whitespace.
---
RHSrvAny/RHSrvAny.c | 537 ++++++++++++++++++++++++++--------------------------
RHSrvAny/RHSrvAny.h | 1 -
RHSrvAny/resource.h | 2 +-
3 files changed, 269 insertions(+), 271 deletions(-)
diff --git
2006 Aug 21
1
[ win32utils-Bugs-5479 ] Incorrect SetLastError declarations
Bugs item #5479, was opened at 2006-08-21 07:43
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=411&aid=5479&group_id=85
Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Nobody (None)
Assigned to: Nobody (None)
Summary: Incorrect SetLastError declarations
Initial Comment:
windows-pr-0.5.3
lib\windows\error.rb
2008 May 18
2
Pure win32-thread library?
Hi all,
Here''s my initial stab at a pure Ruby win32-thread library that doesn''t
work at all. I''m not sure how to pass the start address of the arguments
to the callback. I thought about Marshal, but you can''t marshal a proc.
BTW, the CreateThread method in windows-pr needs to be updated for this
to have any hope of success.
Any ideas?
Thanks,
Dan
#
2005 Aug 07
1
Can''t rake without swig
You can''t rake without swig now. I keep swig out of my path so I can do
a build without swig to be sure it works with the download.
Exception `Errno::ENOENT'' at ./rake/rakewx.rb:20 - No such file or
directory - swig -version
No such file or directory - swig -version
./rake/rakewx.rb:20:in ``''
./rake/rakewx.rb:20:in `have_good_swig''
./rake/rakewx.rb:254:in
2006 Aug 14
2
after_create is not being called
Hi all
I have the following model:
class PhotoGallery < ActiveRecord::Base
attr_accessible :title, :description, :file_path, :title_photo_id
has_many :photos, :dependent => :destroy
belongs_to :title_photo,
:class_name => ''Photo'',
:foreign_key => ''title_photo_id''
validates_presence_of :title, :description, :file_path
2007 Oct 21
0
Taking a stab at a pure Ruby Dir.glob
Hi all,
Here''s what I''ve come up with so far for a pure Ruby Dir.glob for MS
Windows. It almost works. The problem right now is the [] notation,
which I''m not translating properly into a regex.
I haven''t started on the ''**'' notation yet either, but I figure that''s
more of a control flow issue. Feel free to disagree with me and/or
2011 Feb 08
2
WSAStartup failure
Hi,
I added the Windows::WSA module to windows-pr recently (it''s in the latest
git repo). However, I can''t seem to make WSAStartup work. I tried the
following bit of code, only to get "The Windows Sockets version requested is
not supported" on my Vista box.
Is it really not supported on Vista? The docs say Win2k or later. Or is
there another issue?
require
2009 Aug 02
2
win32-security, 1.9.x, encoding issue?
Hi,
Windows Vista Home Premium
ruby 1.9.2dev (2009-07-18 trunk 24186) [i386-mswin32_90]
I noticed there was an ordinal bug in win32-security and Ruby 1.9.x. I fixed
those easily enough, but now we''re left with this:
1) Error:
test_string_to_sid(TC_Win32_Security_Sid):
ArgumentError: invalid byte sequence in US-ASCII
2004 Jan 22
1
code cleanup suggestion - error classes
Currently, most of the modules define an error class of some sort (e.g.
cWin32ServiceError). Within the code, the error is raised like this:
rb_raise(cWin32ServiceError,ErrorDescription(GetLastError()));
It seems logical that, instead of appending the message every time, that
we should simply call ErrorDescription(GetLastError()) simply by raising
an error (i.e. within the