Displaying 20 results from an estimated 100000 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,
>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
2004 Nov 09
0
Re: Problems with DeviceIoControl
>What do you mean by that?
>Here is my sample code and it worked fine.
Whoops, never mind. User error. ;)
Thanks much.
Dan
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
2008 Oct 02
1
Problems using a hand built OpenSSL on Windows
Hi everyone,
Windows XP Pro
OpenSSL 0.9.8i
Ruby 1.8.6-p114
Ok, I''m going a bit OT here, but I want to see if anyone knows the
answer.
I built Ruby with VC++ 8 (cl 14). I managed to build and install
OpenSSL. I also managed to build the Ruby OpenSSL extension, after 1
minor tweak to x509.h to eliminate a macro conflict:
--- x509.orig Thu Oct 02 11:30:10 2008
+++ x509.h Thu Oct
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
2008 Jul 07
0
[ win32utils-Support Requests-11344 ] Can''t user win32-service inside of a Rails application
Support Requests item #11344, was opened at 2007-06-04 03:21
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=412&aid=11344&group_id=85
Category: win32-service
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Roberto V. A. (robo)
Assigned to: Nobody (None)
Summary: Can''t user win32-service inside of a Rails application
Initial
2005 Nov 23
0
Some code change suggestions of thenwin32-service package
> -----Original Message-----
> From: win32utils-devel-bounces at rubyforge.org
> [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of
> Park Heesob
> Sent: Wednesday, November 23, 2005 6:16 AM
> To: Development and ideas for win32utils projects
> Subject: [Win32utils-devel] Some code change suggestions of
> thenwin32-service package
>
>
> Hi,
>
2006 Feb 02
5
Fwd: win32-clipboard and Unicode zero bytes
Hi all,
I''m forwarding this message from Brian Marick. If you
run this test script and then paste the results into a
Unicode aware text editor, you''ll notice that it only
prints one character instead of three.
I tried changing the strlen to _tcslen and strcpy to
_tcscpy, but that didn''t help. I mucked around a bit
with the MultiByteToWideChar function, too, but
2004 Feb 09
1
Curious pause/resume behavior
Hi all,
While testing the pause/resume functionality with the daemon_test.rb
script, I noticed this odd bit of behavior. It appears that sometimes,
the pause command seems to actually stop the service. It doesn''t happen
every time - just sometimes. Here is a bit of command line history to
demonstrate:
C:\eclipse\workspace\win32-service-0.4.0\test>ruby daemon_test.rb start
VERSION:
2011 Aug 22
2
Pure Ruby TCP Daemon
Hi all,
I created a "pure" branch on github that uses the code Heesob posted a while
back:
http://rubyforge.org/pipermail/win32utils-devel/2008-November/001274.html
However, I couldn''t make it work on my Vista laptop.
c:\Users\djberge\Repositories\win32-service\examples>ruby demo_daemon_ctl.rb
start
VERSION: 0.8.0
2017 Feb 16
0
(DeviceIoControl, FSCTL_SET_SPARSE)
Hi Brian,
On Thu, 16 Feb 2017 01:20:46 -0800, brian lamb via samba wrote:
> Configured as you mention, and prior with the other tweaks I had in the first place, Im getting the same results, which is "FSUTIL utility requires a Local NTFS Volume", and mapping it.
Hmm, this works fine for me against a Samba 4.4.2 Btrfs backed Samba
share.
smb.conf:
[global]
...
store dos
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
2006 May 17
0
Need a little help with the pure Rubywin32-eventlog
> -----Original Message-----
> From: win32utils-devel-bounces at rubyforge.org
> [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of
> Heesob Park
> Sent: Tuesday, May 16, 2006 9:51 PM
> To: Development and ideas for win32utils projects
> Subject: Re: [Win32utils-devel] Need a little help with the
> pure Rubywin32-eventlog
>
>
> Hi,
>
>
2006 Oct 13
2
win32-mmap - trying to marshal self
Hi all,
I realized the current implmentation has a problem - you can only get the last value set? I realized, after looking at the old C code, that it actually stores values in a hash and marshals the hash, not the values themselves.
That seemed clunky to me, though. I thought it would be more interesting if we just marshalled the entire mmap object and passed that back and forth.
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:
2004 Feb 25
5
Wide strings and LPCTSTR types
All,
I was experimenting with converting LPCTSTR strings to wide strings with
something like this:
// Converts a Ruby string to a LPWSTR
LPCTSTR AllocWideLString(VALUE rbString){
char* str = STR2CSTR(rbString);
int length = (strlen(str)+1) * sizeof(WCHAR);
LPCTSTR lpStr = (LPCTSTR)malloc(length);
MultiByteToWideChar(
CP_ACP,
0,
str,
strlen(str)+1,
2008 Apr 25
4
win32-mmap test failures
Hi all,
This is odd. It looks to me like we have all 4 variations of memcpy set
in Windows::MSVCRT::Buffer but somehow this one creeps up. I actually
noticed it in a few cases with that earlier mmap sub/replace example,
but I wasn''t sure what was happening.
Note that windows-api 0.2.3 and windows-pr-0.8.3 are the latest versions
in CVS, but this happens with windows-api-0.2.2 and
2006 May 31
0
Looking for docs on some functions andconstants
> -----Original Message-----
> From: win32utils-devel-bounces at rubyforge.org
> [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of
> John-Mason P. Shackelford
> Sent: Wednesday, May 31, 2006 9:12 AM
> To: Development and ideas for win32utils projects
> Subject: Re: [Win32utils-devel] Looking for docs on some
> functions andconstants
>
>
> Daniel,