Displaying 20 results from an estimated 200000 matches similar to: "Re: Problems with DeviceIoControl"
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 08
0
Re: Problems with DeviceIoControl
Hi all,
>You have missed & before inBuf.
D''oh! Odd that I didn''t get a warning.
>Here is my modified version:
It worked, but it seems to eliminate the file''s contents in the process.
I''ve tried various flags with no luck.
Any ideas?
Regards,
Dan
2004 Nov 08
0
Re: Problems with DeviceIoControl
Hi,
>It worked, but it seems to eliminate the file''s contents in the process.
>I''ve tried various flags with no luck.
What do you mean by that?
Here is my sample code and it worked fine.
require ''win32/file''
f = File.open("c:/test","a")
f.puts "test"
f.compressed = true
f.close
Regards,
Park Heesob
--MIME
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
2004 Aug 28
2
We need a new installer!
I''ve finished updating all the packages for now. All
the sample scripts for all the packages have been
moved to doc/examples. So, things should be stable
for a while.
Shanko, any chance of creating new installer based on
the current releases?
Dan
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
2004 Oct 13
4
win32-eventlog problem
Hi all,
I''ve logged a new bug for win32-eventlog based on Joey Gibson''s ruby talk
post (116528). Park, I''ve assigned it to you for now, figuring that you''re
probably the one who best knows how to fix it.
All help welcome.
Dan
2008 Apr 30
8
Playing with NtQueryInformationFile
Hi all,
I''m trying to get the allocation size of a file via a file handle
(rather than its name). The example below works for FileNameInformation
but I can''t get it to work as expected for FileStandardInformation.
Here''s some sample code:
# query_test.rb
require ''windows/handle''
require ''windows/error''
include Windows::Handle
2004 Oct 04
2
open3 for windows
Hi all,
The topic of creating a unified API for open3 for Windows came up at
RubyConf 2004 this year.
Park, I was wondering if you would mind if we modified win32_popen so that
the API matches the open3 library that ships with Ruby.
This also means deciding whether or not to leave in the open2, open4, and
posix stuff. I guess it doesn''t hurt to leave this in, although Open3.open4
2004 Mar 01
0
RE: win32etc test failure
Excellent! Like I said, I really need to do some code cleanup. I''ll
also be adding the config_group and config_user methods :)
Dan
-----Original Message-----
From: Date, Shashank [Non-Employee]
[mailto:Shashank.Date@mail.sprint.com]
Sent: Monday, March 01, 2004 10:19 AM
To: Berger, Daniel
Subject: RE: [Win32utils-devel] RE: win32etc test failure
That worked !
Now everything is
2004 Mar 01
0
RE: win32etc test failure
For delete_user, try this patch:
etc.c, line 639:
- lpHost = (LPCWSTR)STR2CSTR(rbHost);
+lpHost = AllocWideLString(rbHost);
Lemme know how it goes.
Dan
-----Original Message-----
From: win32utils-devel-bounces@rubyforge.org
[mailto:win32utils-devel-bounces@rubyforge.org] On Behalf Of
win32utils-devel@rubyforge.org
Sent: Monday, March 01, 2004 10:02 AM
To: Date, Shashank [Non-Employee]
Cc:
2005 Feb 04
0
RE: Bug fix
> -----Original Message-----
> From: CT [mailto:demerzel@gmail.com]
> Sent: Friday, February 04, 2005 3:42 PM
> To: Berger, Daniel
> Subject: Re: Bug fix
> Okay, I tried 0.3.1, and the wait call blocks till a change
> occurs. So it''s working:)
>
> But I would still need a loop to get a daemon-like behaviour,
> since the wait terminates when a change
2004 May 16
1
com/dcom
Hi all,
I was just reading my "Python Programming on Win32" and I saw how easy it
was to setup a COM server and a class. I tried to download Ralph Mason''s
rubycom package, but the link is dead.
I''ve emailed Ralph, but if rubycom isn''t being maintained any more, I think
we should work on a COM/DCOM interface next.
Or, is this already possible with
2004 Nov 06
3
Calling CreateFile on an instance of File - possible?
Hi all,
I''m going over win32-file this weekend. I''m creating instance methods for
setting (or unsetting) the various file attributes. So, you can do
something like:
f = File.open("foo.txt")
f.archive = true
f.hidden = true
f.close
This works for the basic attributes, but it requires extra work for others.
Specifically, I am having trouble trying to set the
2006 Jun 18
0
[ win32utils-Bugs-4699 ] Service dependencies are not being created properly
Bugs item #4699, was opened at 2006-06-07 19:21
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=411&aid=4699&group_id=85
Category: win32-service
Group: Code
>Status: Closed
>Resolution: Accepted
Priority: 3
Submitted By: Scott Harper (sharperct)
Assigned to: Park Heesob (phasis68)
Summary: Service dependencies are not being created properly
Initial
2004 Dec 13
3
win32-thread experiment
Hi all,
I''ve checked in some semi-working code into CVS for win32-thread. I don''t
really expect this to ever work properly, given that the Ruby interpreter
itself isn''t thread safe, but I thought it was fun to tinker.
Anyway, with that in mind, give the following a shot:
require "win32/thread"
t = Win32::Thread.new{
puts "hello"
sleep 2
}
2004 Feb 01
2
test_services test case
While working on win32-service-0.3.0 I got hung up trying to resolve that
"RPC server is unavailable" error message that was popping up on some
systems. I couldn''t duplicate this on my XP Pro box, but it does show up on
my Win2k box.
Quick review - this is the test case from tc_service.rb
def test_services
assert_nothing_raised{ Service.services{ } }
2004 Mar 14
3
Re: RubyGems 0.2.0
Hello Chad,
I installed and tried out rubygems for one of the win32-utils
projects named win32-mmap. This is on Win XP (Home).
Here is how I did it but got some errors (see at the end).
I must be doing something wrong.
Please help ...
-- Shashank
#------------------------------------------------------------
require ''rubygems''
spec = Gem::Specification.new do |s|
2005 Feb 28
1
Re: win32utils installer
> -----Original Message-----
> From: win32utils-devel-bounces@rubyforge.org
> [mailto:win32utils-devel-bounces@rubyforge.org] On Behalf Of
> Shashank Date
> Sent: Monday, February 28, 2005 6:36 AM
> To: Shashank Date
> Cc: win32utils-devel@rubyforge.org
> Subject: [Win32utils-devel] Re: win32utils installer
>
>
> Hi All,
>
> I am working on this bug
2005 Dec 04
0
[ win32utils-Bugs-2918 ] docs and samples arealways installed in c:/ruby/
Shanko, I''ve assigned this one to you. :)
- Dan
________________________________
From: win32utils-devel-bounces at rubyforge.org on behalf of noreply at rubyforge.org
Sent: Thu 12/1/2005 7:25 AM
To: noreply at rubyforge.org
Subject: [Win32utils-devel] [ win32utils-Bugs-2918 ] docs and samples arealways installed in c:/ruby/
Bugs item #2918, was opened at 2005-12-01 08:25
You can
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