Displaying 20 results from an estimated 85 matches for "win32api".
2006 Mar 23
0
Win32API patch?
Hi all,
Passing a Fixnum when you should have passed a String (pointer) causes a
segfault in Win32API.
I''ve already reported this on RubyForge (Bug #3904):
require ''Win32API''
RegFormat = Win32API.new(''user32'', ''RegisterClipboardFormat'', ''P'', ''I'')
RegFormat.call(1) # Boom!
I''ve traced the e...
2005 Apr 21
9
Screen capture, save to file
Is there anything in the utils to capture a screen ( or maybe just a
window) and save to a file.
I have this, but I have no idea where it came from, but it gives a
corrupted image
Paul
# -*- ruby -*-
# screen capture --
# This script runs with a Ruby/DL which is included in ruby-1.7.
require ''dl/import''
module ScreenCapture
extend DL::Importable
dlload
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'', ''V'', ''L'',
''kernel32'')
=> #<Win32::API:0x2db6314>
# Old version
irb(main):005:0> GetLastErrorB = Win32API.new(''...
2007 Feb 28
3
[ win32utils-Bugs-8942 ] several typo in windows-pr.
...patch against windows-pr HEAD.
I checked all windows-pr sources using following script.
Thanks,
--
class String
def normalize
self.downcase.gsub(/_/, "")
end
end
ARGV.each do |file|
defs = nil
File.read(file).each_with_index do |line, i|
case line
when /(\w+)\s*=\s*Win32API.new\([^,]+?,\s*.(\w+)/
a, b = $1, $2
p ["Win32API", file, i + 1, a, b] if a.normalize != b.normalize
when /(\w+).call\(/
next unless defs
a = $1
p ["def/call", file, i + 1, defs, a] if a.normalize != defs.normalize
when /def\s+(\w+)/
d...
2011 Jun 23
1
make and coompiling win32api in linux platform
Hi, we study Win32API in University and would like to know what is required to make and compile codes in linux platform and then start them in Wine.
2008 Jan 05
0
One on the issue of the return win32api
hello,all:
The code below:
return = Win32API.new("my.dll", "myfunction", "PI", "P").call(params)
The return value is a type C-Structure
For example,
struct person{
int age;
char* name;
}
In the process of ruby,I how to get the return value
--~--~---------~--~----~------------~-------~--~----~
You...
2005 May 18
2
Networking functionality?
Is there (if not, can we get) the functionality to query for
workstations in the local workgroup or domain?
Zach
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
2008 Jun 05
2
win32api call NetFileEnum against samba
Hi,
I'm trying to list open files on a samba server with the win32 api call
NetFileEnum(). I have successfully done this against samba 3.0.30-1. I have
another samba server (debian version: 3.0.14a-3sarge2) which the call
doesn't seem to work properly against. I get one result for username
\PIPE\samr even when I have open files on the server. I can list open files
fine with smbstatus, so
2010 Aug 07
3
C++ runtime error
...-----------------------------------------------------------
# * Open a console window for debug output
#-----------------------------------------------------------------------------
def self.start
@active = true
if self.active
# Open console window and select it for :puts
Win32API.new("kernel32", "AllocConsole", "V", "L").call
$stdout.reopen("CONOUT$")
# Bring the game window back to the front
Win32API.new("user32", "SetForegroundWindow", "L", "L").call(hwnd)...
2007 Sep 09
0
windows-api command decision
Hi all,
Ok folks, here''s how it is.
The windows-api project will, from now on, consist of two parts.
The first part is "win32-api". This is a replacement for ''Win32API''.
This is a refactored version of the Win32API that currently ships with
Ruby''s stdlib. It is a C extension.
Changes include:
* Name change - it''s now "win32/api" instead of "Win32API".
* It''s now under the "Win32" namespace/modu...
2006 Aug 21
1
[ win32utils-Bugs-5479 ] Incorrect SetLastError declarations
...unc=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
SetLastError = Win32API.new(''kernel32'', ''GetLastError'', ''L'', ''V'')
SetLastErrorEx = Win32API.new(''kernel32'', ''GetLastError'', ''LL'', ''V'')
Should import SetLastError instead of G...
2004 Dec 10
1
Modification for mkmf
...end
# END
I realize there are possible scenarios where this won''t quite work (see
the example they discuss near the bottom of the link I provided). In
such cases, it would be up to the extension writer to set $CPPFLAGS
accordingly.
Optionally, the WMI + OLE code could be replaced with WIN32API +
GetVersionEx().
What do you think?
Dan
2007 Sep 28
1
Help with win32/api, windows-api
...th status (3): [C:/ruby/bin/ruby -w
-Ilib;lib;lib/windows ...]
(See full trace by running task with --trace)
The warning is bizarre. How can @boolean be uninitialized? The line
number for the segfault it baffling.
If I revert back to using an older version of windows-api (that uses the
stdlib Win32API) everything works fine. We seemed to have messed up
something in win32/api, but I couldn''t tell you what.
Help please!!!
Regards,
Dan
2005 May 03
4
Wx::HtmlWindow.on_link_clicked
...ile htmllinkinfo.t (need to be added to $objs array in
extconf.rb).
Sample code of fancy about dialog for windows (for windows -- because
of using function from shell32.dll to call favorite email client and
favorite browser):
=====================================================
require ''Win32API''
require ''wxruby''
class WrappedHtml < Wx::HtmlWindow
def initialize(*args)
super
@shell = Win32API.new(''shell32'', ''ShellExecute'', ''LPPPPI'', ''L'')
end
def on_link_clicked(...
2005 Feb 07
7
win32-driveinfo in CVS
Hi all,
I committed win32-driveinfo 0.1.0 to CVS.
What is it?
===========
A class for getting information of drives
Synopsis
========
include Win32::DriveInfo
(sectorsPerCluster,
bytesPerSector,
numberOfFreeClusters,
totalNumberOfClusters,
freeBytesAvailableToCaller,
totalNumberOfBytes,
totalNumberOfFreeBytes) = getDriveSpace(''c'').to_a
2006 Nov 06
4
Errno::EBADF (Bad file descriptor)
I posted this to the discussion forum on rubyforge.org, but it appears that
it would have been better to post here.
Does anyone have any advice on how to resolve the problem reported at
http://rubyforge.org/tracker/index.php?func=detail&aid=6284&group_id=1306&atid=5145?
Thanks,
Justin
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2008 May 26
9
App#process_message
how can rewrite the App # process_message to treat the messages of the
system?
wxruby
--
Posted via http://www.ruby-forum.com/.
2005 May 04
0
New win32-dir
Hi all,
In lieu of Timothy''s pure Ruby junction code, and Zach''s VC++ 6 issues,
I decided to just rewrite the dang thing in pure Ruby using Win32API.
That will solve''s Zach''s problem and make it easier to add Timothy''s
code, which I plan to add (slightly modified) to the 0.2.0 release.
The code is below. One thing I have a question about is how to handle
the situation where SHGetFolderPath is not found. I just wrap...
2006 Mar 25
1
Help with File.set_permissions port
I''ve got a (broken) version of File.set_permissions in CVS, and I need
some help finishing it off please.
Heesob, can you take a look?
Thanks,
Dan