Displaying 2 results from an estimated 2 matches for "rb_cfile".
Did you mean:
db_file
2004 Nov 13
0
Sanity check for win32-file
....txt")
fh.close
I now get:
test.rb:12:in `initialize'': Invalid argument (Errno::EINVAL)
from test.rb:12:in `nopen''
Specifically, it''s failing on this in file.c:
args[0] = UINT2NUM(_open_osfhandle((long)h,O_RDWR));
self = rb_class_new_instance(1,args,rb_cFile); // BOOM
How could this work yesterday, and suddenly stop working today? What am I
missing?
Dan
2004 Nov 07
2
Problems with DeviceIoControl()
...eIoControl(
h,
FSCTL_SET_COMPRESSION,
(LPVOID)inBuf,
sizeof(inBuf),
NULL,
0,
&dwBytesReturned,
NULL
);
if(!rv){
rb_raise(cFileError,ErrorDescription(GetLastError()));
}
return self;
}
// Inside Init_file()
rb_define_method(rb_cFile,"compressed=",file_set_compressed,1);
# Sample program
f = File.open("temp.txt")
f.compressed = true
f.close
But, I''m still getting "access denied" or "invalid
access to memory location", depending on the open mode
flag I use.
Testing indicates th...