Displaying 20 results from an estimated 10000 matches similar to: "Rice"
2008 May 11
3
converting a RSTRING to an OLESTR
Hi,
I was going to modify the TaskScheduler#save method to take an optional
file name. But, I need to convert a Ruby string to an OLE string. I
thought I could use this:
http://msdn.microsoft.com/en-us/library/ms692615(VS.85).aspx
But, it only appears to accept literal string constants.
Any other suggestions?
Thanks,
Dan
2006 Dec 14
11
Tweak to win32-eventlog
All,
I got a bug report from Greg Holmes where the description wasn''t being
returned properly. At the moment, if there''s no event associated with
the event id, then the description is empty.
However, it turns out that there can still be associated information
about the event. So, I propose the following tweak to the
get_description private method:
# If FormatMessage()
2008 Jan 23
6
JRuby and callbacks?
Hi all,
Any Java/JRuby folks on the list? I''d like to see if we can implement
api.c for JRuby using JNA and see how it handles the callbacks.
I''m not a Java guy, nor do I know JNA, but I''ll take a stab at it if no
one else on the list does.
Here are a couple of useful links:
http://www.infoq.com/news/2007/09/jna-jruby
https://jna.dev.java.net/
Regards,
Dan
This
2007 Dec 05
21
Fwd: win32/process problem
Any ideas?
---------- Forwarded message ----------
From: Christian Kerth <christian.ke... at dynamicmedia.at>
Date: Dec 5, 8:28 am
Subject: win32/process problem
To: comp.lang.ruby
I have an application that consists of serveral independent parts.
I want to use the Windows Process API to spawn the different
processes.
e.g.
require ''rubygems''
require
2008 Jul 08
12
Some more win32-security: SID.create
Hi all,
How does this look as a general approach to a SID.create method:
# Creates and initializes
def self.create(authority, *sub_authorities)
if sub_authorities.length > 8
raise ArgumentError, ''maximum of 8 subauthorities allowed''
end
authorities = Array.new(8, 0)
authorities.replace(sub_authorities)
count = authorities.select{ |e| e > 0 }.size
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
2009 Aug 21
3
File.exists?("A:") on Windows VM
Hi,
I''ve got a Windows XP VM on my OS X box. Whenever I call
File.exists?("A:") on it I get a system error pop-up box from Windows.
The title of the window is "Windows - No Disk" and the error is
"Exception Processing Message" followed by some numeric codes.
It''s not a huge deal - eventually control returns to the program and it
returns false
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
2007 Aug 04
10
Need some help with pure Ruby win32-changenotify
Hi all,
I know it''s deprecated, but people seem to still be using
win32-changenotify, so I thought I''d see if I could make it pure Ruby.
Also, I thought it would be a good opportunity to test passing a custom
Win32::Event object.
I''m mostly done I think, but I''m having trouble unraveling the
FILE_NOTIFY_INFORMATION struct buffer. Please check out the
2005 Feb 26
7
Symlinks for Windows
Hi all,
Dave Burt mentioned the possibility of adding symlinks
to the Dir class.
http://www.sysinternals.com/ntw2k/source/misc.shtml#junction
There is also Autrijus Tang''s symlink Perl module at
http://search.cpan.org/~autrijus/Win32-Symlink-0.04/
Looks easy enough, but it only seems to work for
directories, not regular files. Should we add this to
the Directory class, or simply
2008 Jan 18
5
Temporarily setting the output language for cmd.exe
Hi all,
One of the net-ping users reported that the Net::Ping::External library
was returning false positives on Vista. Basically, it does a ''ping -n1
host'' and checks for certain error strings.
The problem is that the error strings it checks for are in English. The
user in question is using a cmd.exe that''s entirely in Swedish (I think).
Is there any way I can
2006 Oct 06
13
Need some help with latest win32-mmap
Hi all,
I''ve got the latest win32-mmap code checked into CVS. Unfortunately, it
seems that I''m not able to open an existing mapping and retrieve set
data. Below is a simple example that seems like it ought to work but
doesn''t. Any ideas?
# map1.rb
require ''win32/mmap''
include Win32
mmap = MMap.new(:name => ''alpha'', :size
2008 Nov 10
4
PathFindExtension and wide strings
Hi,
What''s happening here?
require ''windows/path''
require ''windows/unicode''
include Windows::Path
include Windows::Unicode
file_a = ''bar.txt''
file_w = multi_to_wide(file_a)
p PathFindExtensionA(file_a) # ''.txt'' => OK
p PathFindExtensionW(file_w) # ''.'' => WRONG
Is Ruby chopping the
2007 Sep 20
3
IO.read - binary by default?
Hi all,
I''m sick of hitting bugs in 3rd party libs where the issue is that the
authors didn''t do a binary read on the data. It''s hard to track down
sometimes and it currently makes creating cross-platform code more
difficult.
Is there *any* downside to making IO.read binary by default (on Windows)
that anyone can think of?
Thanks,
Dan
2006 Oct 26
5
[ win32utils-Patches-6335 ] pure ruby implementation
Patches item #6335, was opened at 2006-10-26 16:51
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=413&aid=6335&group_id=85
Category: win32-shortcut
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Jano Svitok (janek)
Assigned to: Nobody (None)
Summary: pure ruby implementation
Initial Comment:
This is (not finished) pure-ruby
2008 May 11
4
Latest rb_win32_select patch
Hi Park,
I tried your latest patch and ran the sample code:
readPipe, writePipe = IO.pipe
t = Thread.new{
sleep 5
while true
sleep 0.1
puts "got #{readPipe.readline.length} bytes"
end
}
i = 1
while true
i += 1
sleep 1
puts "hello from main"
if i > 3
writePipe.puts "a"*2048
end
end
t.join
At the console I typed the
2009 May 06
4
[ win32utils-Feature Requests-25792 ] Create a pure Ruby win32-ole library
Feature Requests item #25792, was opened at 2009-05-05 17:29
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=414&aid=25792&group_id=85
Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Daniel Berger (djberg96)
Assigned to: Nobody (None)
Summary: Create a pure Ruby win32-ole library
Initial Comment:
The current Win32OLE
2008 Jun 07
2
Unraveling a protoent struct
I''m spacing - how do I unravel a protent struct pointer?
require ''win32/api''
include Win32
getprotobyname = API.new(''getprotobyname'', ''P'', ''P'', ''ws2_32'')
ptr = getprotobyname.call(''tcp'')
puts "Name: " + # ???
puts "Aliases: " + # ???
puts "Number: "
2006 May 31
7
Getting at MakeOpenFile
Along the same lines as the last question - how can I get to functions
like MakeOpenFile via Win32API? It doesn''t seem to be exported by
msvcrt-ruby18.
Possible? Or am I out of luck?
Dan
This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly
prohibited and may be unlawful. If you have