Displaying 5 results from an estimated 5 matches for "rbpath".
Did you mean:
dbpath
2004 Nov 06
3
Calling CreateFile on an instance of File - possible?
...do this requires calling CreateFile() + DeviceIoControl().
The thing is, I don''t know how to get a valid HANDLE to a instance of an
already opened file. I''ve been trying something like this:
static VALUE file_set_compressed(VALUE self, VALUE rbBool){
DWORD dwAttr;
VALUE rbPath;
HANDLE h;
if((rbBool != Qtrue) && (rbBool != Qfalse)){
rb_raise(rb_eTypeError,"Argument must be true or false");
}
rbPath = rb_funcall(self,rb_intern("path"),0,0);
dwAttr = GetFileAttributes(StringValuePtr(rbPath));
h = CreateFile(
(LPCT...
2004 Nov 07
2
Problems with DeviceIoControl()
Hi all,
Thanks to Wayne and Park, I''ve got something like this
now:
static VALUE file_set_compressed(VALUE self, VALUE
rbBool){
HANDLE h;
BOOL rv;
DWORD dwBytesReturned;
int fn;
USHORT inBuf = COMPRESSION_FORMAT_DEFAULT;
if((rbBool != Qtrue) && (rbBool != Qfalse)){
rb_raise(rb_eTypeError,"Argument must be true or
false");
}
2004 Nov 21
3
win32-file, overlapped added
Hi all,
I''ve got overlapped and offset support in both nread and nwrite. The only
thing left before I want to release this (as 0.4.0) is to get NO_BUFFERING
to work. Unfortunately, I can''t get it to work.
Park, I looked at that site you sent (and borrowed some code from it), but I
don''t see anything special happening for NO_BUFFERING. I thought it
required
2005 Jan 20
1
ChangeNotify help wanted
Hi all,
I''ve checked in some code to win32-changenotify. Unfortunately, it
doesn''t work right. I need some help. I don''t understand what,
exactly, I''m supposed to pass to ReadDirectoryChangesW() for the 2nd
argument, nor how to read the data back out.
There''s also a WCHAR issue that needs to be worked out with regards to
the FileName
2004 Nov 11
0
File.nopen alpha - another followup
Hi all,
> fh = File.nopen("C:\\temp.txt",File::WRITE_ATTRIBUTES)
> fh.hidden = true
> fh.close
>
> I get "test.rb:16:in `hidden='': cannot convert nil into
> String (TypeError)"
It looks like this line is the culprit:
rbPath = rb_funcall(self,rb_intern("path"),0,0);
Hm...we could use GetFullPathName() if rbPath is nil. That, however,
doesn''t deal with the fact that there are probably several other
internal attributes that aren''t set if you use nopen(). I suppose I
need to take a look at t...