From Daniel.Berger at qwest.com Tue Sep 2 09:57:46 2008 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Tue, 2 Sep 2008 08:57:46 -0500 Subject: [Win32utils-devel] [ win32utils-Bugs-21726 ] Description not shownon Win2k3-x64 In-Reply-To: <20080829121110.09562185859A@rubyforge.org> References: <20080829121110.09562185859A@rubyforge.org> Message-ID: <7524A45A1A5B264FA4809E2156496CFB04514C8C@ITOMAE2KM01.AD.QINTRA.COM> Anyone on the list have access to a 64-bit version of Windows? Dan > -----Original Message----- > From: win32utils-devel-bounces at rubyforge.org > [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of > noreply at rubyforge.org > Sent: Friday, August 29, 2008 6:11 AM > To: noreply at rubyforge.org > Subject: [Win32utils-devel] [ win32utils-Bugs-21726 ] > Description not shownon Win2k3-x64 > > Bugs item #21726, was opened at 2008-08-29 14:11 You can > respond by visiting: > http://rubyforge.org/tracker/?func=detail&atid=411&aid=21726&g > roup_id=85 > > Category: win32-eventlog > Group: Code > Status: Open > Resolution: None > Priority: 3 > Submitted By: Damjan Rems (ther) > Assigned to: Nobody (None) > Summary: Description not shown on Win2k3-x64 > > Initial Comment: > > I have only one 64bit server so I cannot commit if the same > error was also present before or is consistant. > > Win2k3 R2 Standard x64: > # time_generated=Fri Aug 29 13:29:07 +0200 2008, > time_written=Fri Aug 29 13:29:07 +0200 2008, event_id=16022, > event_type="information", category=16, > source="MSExchangeTransport", computer="MYMAIL", user=nil, > string_inserts=[], description=""> # Struct::EventLogStruct record_number=4825, time_generated=Fri > Aug 29 13:29:07 +0200 2008, time_written=Fri Aug 29 13:29:07 > +0200 2008, event_id=16002,event_type="information", > category=16, source="MSExchangeTransport", computer="MYMAIL", > user=nil, string_inserts=[], description=""> > > > Another machine > Win2k3 R2 Standard 32 bit: > # time_generated=Tue Aug 26 21:42:05 +0200 2008, > time_written=Tue Aug 26 21:42:05 +0200 2008, event_id=2003, > event_type="information", category=16, source="ESENT", > computer="MYDC", user=nil,string_inserts=["lsass", "480", "", > "4"], description="lsass (480) Shadow copy 4 freeze > stopped."> # time_generated=Tue Aug 26 21:42:05 +0200 2008, > time_written=Tue Aug 26 21:42:05 +0200 2008, event_id=2001, > event_type="information", category=16, source="ESENT", > computer="MYDC", user=nil,string_inserts=["lsass", "480", "", > "4"], description="lsass (480) Shadow copy 4 freeze started."> > > > by > TheR > > > ---------------------------------------------------------------------- > > You can respond by visiting: > http://rubyforge.org/tracker/?func=detail&atid=411&aid=21726&g > roup_id=85 > _______________________________________________ > win32utils-devel mailing list > win32utils-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/win32utils-devel > 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 received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments. From Daniel.Berger at qwest.com Wed Sep 3 13:42:49 2008 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Wed, 3 Sep 2008 12:42:49 -0500 Subject: [Win32utils-devel] New win32-api for Jruby in the works Message-ID: <7524A45A1A5B264FA4809E2156496CFB04514C9B@ITOMAE2KM01.AD.QINTRA.COM> Hi all, I've reorganized win32-api a bit in CVS. There's now a version under lib/ffi that uses Wayne Meissner's new foreign function interface for Jruby (also to be used by Rubinius) that was released as part of Jruby 1.1.4. It doesn't work quite right just yet, though, in part because of a pointer bug in FFI (now fixed in SVN/trunk I'm told). But, if you want to tinker, there you go. Regards, 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 received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments. From phasis at gmail.com Wed Sep 3 20:54:56 2008 From: phasis at gmail.com (Heesob Park) Date: Thu, 4 Sep 2008 09:54:56 +0900 Subject: [Win32utils-devel] [ win32utils-Bugs-21726 ] Description not shownon Win2k3-x64 In-Reply-To: <7524A45A1A5B264FA4809E2156496CFB04514C8C@ITOMAE2KM01.AD.QINTRA.COM> References: <20080829121110.09562185859A@rubyforge.org> <7524A45A1A5B264FA4809E2156496CFB04514C8C@ITOMAE2KM01.AD.QINTRA.COM> Message-ID: Hi, 2008/9/2 Berger, Daniel : > Anyone on the list have access to a 64-bit version of Windows? > > Dan I have confirmed it on my 64bit Vista Ultimate. I will look into it further to fix the problem. Regards, Park Heesob > >> -----Original Message----- >> From: win32utils-devel-bounces at rubyforge.org >> [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of >> noreply at rubyforge.org >> Sent: Friday, August 29, 2008 6:11 AM >> To: noreply at rubyforge.org >> Subject: [Win32utils-devel] [ win32utils-Bugs-21726 ] >> Description not shownon Win2k3-x64 >> >> Bugs item #21726, was opened at 2008-08-29 14:11 You can >> respond by visiting: >> http://rubyforge.org/tracker/?func=detail&atid=411&aid=21726&g >> roup_id=85 >> >> Category: win32-eventlog >> Group: Code >> Status: Open >> Resolution: None >> Priority: 3 >> Submitted By: Damjan Rems (ther) >> Assigned to: Nobody (None) >> Summary: Description not shown on Win2k3-x64 >> >> Initial Comment: >> >> I have only one 64bit server so I cannot commit if the same >> error was also present before or is consistant. >> >> Win2k3 R2 Standard x64: >> #> time_generated=Fri Aug 29 13:29:07 +0200 2008, >> time_written=Fri Aug 29 13:29:07 +0200 2008, event_id=16022, >> event_type="information", category=16, >> source="MSExchangeTransport", computer="MYMAIL", user=nil, >> string_inserts=[], description=""> #> Struct::EventLogStruct record_number=4825, time_generated=Fri >> Aug 29 13:29:07 +0200 2008, time_written=Fri Aug 29 13:29:07 >> +0200 2008, event_id=16002,event_type="information", >> category=16, source="MSExchangeTransport", computer="MYMAIL", >> user=nil, string_inserts=[], description=""> >> >> >> Another machine >> Win2k3 R2 Standard 32 bit: >> #> time_generated=Tue Aug 26 21:42:05 +0200 2008, >> time_written=Tue Aug 26 21:42:05 +0200 2008, event_id=2003, >> event_type="information", category=16, source="ESENT", >> computer="MYDC", user=nil,string_inserts=["lsass", "480", "", >> "4"], description="lsass (480) Shadow copy 4 freeze >> stopped."> #> time_generated=Tue Aug 26 21:42:05 +0200 2008, >> time_written=Tue Aug 26 21:42:05 +0200 2008, event_id=2001, >> event_type="information", category=16, source="ESENT", >> computer="MYDC", user=nil,string_inserts=["lsass", "480", "", >> "4"], description="lsass (480) Shadow copy 4 freeze started."> >> >> >> by >> TheR >> >> From phasis at gmail.com Thu Sep 4 10:31:11 2008 From: phasis at gmail.com (Park Heesob) Date: Thu, 4 Sep 2008 23:31:11 +0900 Subject: [Win32utils-devel] [ win32utils-Bugs-21726 ] Description notshownon Win2k3-x64 References: <20080829121110.09562185859A@rubyforge.org> <7524A45A1A5B264FA4809E2156496CFB04514C8C@ITOMAE2KM01.AD.QINTRA.COM> Message-ID: Hi, ----- Original Message ----- From: "Berger, Daniel" To: "Development and ideas for win32utils projects" Sent: Tuesday, September 02, 2008 10:57 PM Subject: Re: [Win32utils-devel] [ win32utils-Bugs-21726 ] Description notshownon Win2k3-x64 > Anyone on the list have access to a 64-bit version of Windows? > > Dan > >> -----Original Message----- >> From: win32utils-devel-bounces at rubyforge.org >> [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of >> noreply at rubyforge.org >> Sent: Friday, August 29, 2008 6:11 AM >> To: noreply at rubyforge.org >> Subject: [Win32utils-devel] [ win32utils-Bugs-21726 ] >> Description not shownon Win2k3-x64 >> >> Bugs item #21726, was opened at 2008-08-29 14:11 You can >> respond by visiting: >> http://rubyforge.org/tracker/?func=detail&atid=411&aid=21726&g >> roup_id=85 >> >> Category: win32-eventlog >> Group: Code >> Status: Open >> Resolution: None >> Priority: 3 >> Submitted By: Damjan Rems (ther) >> Assigned to: Nobody (None) >> Summary: Description not shown on Win2k3-x64 >> >> Initial Comment: >> >> I have only one 64bit server so I cannot commit if the same >> error was also present before or is consistant. >> >> Win2k3 R2 Standard x64: >> #> time_generated=Fri Aug 29 13:29:07 +0200 2008, >> time_written=Fri Aug 29 13:29:07 +0200 2008, event_id=16022, >> event_type="information", category=16, >> source="MSExchangeTransport", computer="MYMAIL", user=nil, >> string_inserts=[], description=""> #> Struct::EventLogStruct record_number=4825, time_generated=Fri >> Aug 29 13:29:07 +0200 2008, time_written=Fri Aug 29 13:29:07 >> +0200 2008, event_id=16002,event_type="information", >> category=16, source="MSExchangeTransport", computer="MYMAIL", >> user=nil, string_inserts=[], description=""> >> >> >> Another machine >> Win2k3 R2 Standard 32 bit: >> #> time_generated=Tue Aug 26 21:42:05 +0200 2008, >> time_written=Tue Aug 26 21:42:05 +0200 2008, event_id=2003, >> event_type="information", category=16, source="ESENT", >> computer="MYDC", user=nil,string_inserts=["lsass", "480", "", >> "4"], description="lsass (480) Shadow copy 4 freeze >> stopped."> #> time_generated=Tue Aug 26 21:42:05 +0200 2008, >> time_written=Tue Aug 26 21:42:05 +0200 2008, event_id=2001, >> event_type="information", category=16, source="ESENT", >> computer="MYDC", user=nil,string_inserts=["lsass", "480", "", >> "4"], description="lsass (480) Shadow copy 4 freeze started."> >> >> >> by >> TheR >> There are two issues running 32bit application on the 64bit Windows OS. 1. File System Redirector(http://msdn.microsoft.com/en-us/library/aa384187(VS.85).aspx) 2. Loading 64bit dll file with 32bit LoadLibraryEx API. Here is a patched code for get_description: (0x2 is LOAD_LIBRARY_AS_DATAFILE) def get_description(rec, event_source, lkey) begin wow64DisableWow64FsRedirection = API.new('Wow64DisableWow64FsRedirection', 'P', 'B', 'kernel32') wow64RevertWow64FsRedirection = API.new('Wow64RevertWow64FsRedirection', 'L', 'B', 'kernel32') rescue Win32::API::Error wow64DisableWow64FsRedirection = nil wow64RevertWow64FsRedirection = nil end val = 0.chr * 4 wow64DisableWow64FsRedirection.call(val) if wow64DisableWow64FsRedirection str = rec[rec[36,4].unpack('L')[0] .. -1] num = rec[26,2].unpack('S')[0] # NumStrings hkey = [0].pack('L') key = BASE_KEY + "#{@source}\\#{event_source}" buf = 0.chr * 8192 va_list = va_list0 = (num == 0) ? [] : str.unpack('Z*' * num) if RegOpenKeyEx(lkey, key, 0, KEY_READ, hkey) == 0 value = 'ParameterMessageFile' file = 0.chr * MAX_SIZE hkey = hkey.unpack('L')[0] size = [ file.length].pack('L') if RegQueryValueEx(hkey, value, 0, 0, file, size) == 0 file = file.nstrip exe = 0.chr * MAX_SIZE ExpandEnvironmentStrings(file, exe, exe.size) exe = exe.nstrip va_list = va_list0.map{ |v| va = v v.scan(/%%(\d+)/).uniq.each{ |x| exe.split(';').each{ |file| hmodule = LoadLibraryEx( file, 0, DONT_RESOLVE_DLL_REFERENCES|0x2 ) if hmodule != 0 FormatMessage( FORMAT_MESSAGE_FROM_HMODULE | FORMAT_MESSAGE_ARGUMENT_ARRAY, hmodule, x.first.to_i, 0, buf, buf.size, v ) FreeLibrary(hmodule) break if buf.nstrip != "" end } va = va.gsub("%%#{x.first}", buf.nstrip) } va } end value = 'EventMessageFile' file = 0.chr * MAX_SIZE size = [file.length].pack('L') if RegQueryValueEx(hkey, value, 0, 0, file, size) == 0 file = file.nstrip exe = 0.chr * MAX_SIZE ExpandEnvironmentStrings(file, exe, exe.size) exe = exe.nstrip # Try to retrieve message *without* expanding the inserts yet exe.split(';').each{ |file| hmodule = LoadLibraryEx(file, 0, DONT_RESOLVE_DLL_REFERENCES|0x2) event_id = rec[20,4].unpack('L')[0] if hmodule != 0 FormatMessage( FORMAT_MESSAGE_FROM_HMODULE | FORMAT_MESSAGE_IGNORE_INSERTS, hmodule, event_id, 0, buf, buf.size, nil ) FreeLibrary(hmodule) break if buf.nstrip != "" # All messages read end } buf = 0.chr * 8192 # Reset the buffer # Determine higest %n insert number max_insert = [num,buf.nstrip.scan(/%(\d+)/).map{|x|x[0].to_i}.max].compact.max # Insert dummy strings not provided by caller ((num+1)..(max_insert)).each{ |x| va_list.push("%#{x}") } if num == 0 va_list_ptr = 0.chr * 4 else va_list_ptr = va_list.map{ |x| [x + 0.chr].pack('P').unpack('L')[0] }.pack('L*') end exe.split(';').each{ |file| hmodule = LoadLibraryEx(file, 0, DONT_RESOLVE_DLL_REFERENCES|0x2) event_id = rec[20,4].unpack('L')[0] if hmodule != 0 FormatMessage( FORMAT_MESSAGE_FROM_HMODULE | FORMAT_MESSAGE_ARGUMENT_ARRAY, hmodule, event_id, 0, buf, buf.size, va_list_ptr ) FreeLibrary(hmodule) break if buf.nstrip != "" # All messages read end } end RegCloseKey(hkey) end wow64RevertWow64FsRedirection.call(val.unpack('L')[0]) if wow64RevertWow64FsRedirection [va_list0, buf.strip] end end end Regards, Park Heesob From Daniel.Berger at qwest.com Thu Sep 4 14:48:37 2008 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Thu, 4 Sep 2008 13:48:37 -0500 Subject: [Win32utils-devel] [ win32utils-Bugs-21726 ] Descriptionnotshownon Win2k3-x64 In-Reply-To: References: <20080829121110.09562185859A@rubyforge.org><7524A45A1A5B264FA4809E2156496CFB04514C8C@ITOMAE2KM01.AD.QINTRA.COM> Message-ID: <7524A45A1A5B264FA4809E2156496CFB04514CA3@ITOMAE2KM01.AD.QINTRA.COM> > -----Original Message----- > From: win32utils-devel-bounces at rubyforge.org > [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of > Park Heesob > Sent: Thursday, September 04, 2008 8:31 AM > To: Development and ideas for win32utils projects > Subject: Re: [Win32utils-devel] [ win32utils-Bugs-21726 ] > Descriptionnotshownon Win2k3-x64 > > Anyone on the list have access to a 64-bit version of Windows? > There are two issues running 32bit application on the 64bit > Windows OS. > > 1. File System > Redirector(http://msdn.microsoft.com/en-us/library/aa384187(VS > .85).aspx) > > 2. Loading 64bit dll file with 32bit LoadLibraryEx API. > > Here is a patched code for get_description: > (0x2 is LOAD_LIBRARY_AS_DATAFILE) Excellent. I've committed the changes you made, though I've made some minor changes. First, I've added Wow64DisableWow64FsRedirection and Wow64RevertWow64FsRedirection to the windows-pr library, and they'll be included in the 0.9.2 release, and win32-eventlog will now require 0.9.2 or later. Second, I wrapped the whole thing in a begin/ensure clause to make it a little more robust. I updated a few unrelated sections of code to do this as well. Thanks! 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 received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments. From noreply at rubyforge.org Fri Sep 5 17:37:08 2008 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 5 Sep 2008 17:37:08 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Bugs-21838 ] cannot kill the forked process from main process Message-ID: <20080905213708.95CF61858289@rubyforge.org> Bugs item #21838, was opened at 2008-09-05 17:37 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=21838&group_id=85 Category: win32-process Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: cannot kill the forked process from main process Initial Comment: Hi there, I have the problem to kill the forked process. The test code is listed below: require 'rubygems' require 'win32/process.rb' begin pid = Process.fork do 2.times do sleep 10 puts "output from process #{Process.pid}" end end puts ARGV.inspect if !(ARGV.last =~ /child/) puts "start parent process" sleep 11 Process.kill('INT', [pid]) 1.times do puts "output from parent process" sleep 10 end end rescue Exception => err puts "%s, %s"% [ err.inspect, err.backtrace] end when I run this test code, I always get the exception. Here is the test log: C:\myworkspace\SSMSProject\Source\ruby>ruby Noname3.rb start parent process output from process 5680 #, (eval):3:in `call'(eval):3:in `O penProcess'C:/ruby/lib/ruby/gems/1.8/gems/win32-process-0.5.3/lib/win32/process. rb:143:in `kill'C:/ruby/lib/ruby/gems/1.8/gems/win32-process-0.5.3/lib/win32/pro cess.rb:132:in `each'C:/ruby/lib/ruby/gems/1.8/gems/win32-process-0.5.3/lib/win3 2/process.rb:132:in `kill'Noname3.rb:19 C:\myworkspace\SSMSProject\Source\ruby>output from process 5680 start parent process #, (eval):3:in `call'(eval):3:in `O penProcess'C:/ruby/lib/ruby/gems/1.8/gems/win32-process-0.5.3/lib/win32/process. rb:143:in `kill'C:/ruby/lib/ruby/gems/1.8/gems/win32-process-0.5.3/lib/win32/pro cess.rb:132:in `each'C:/ruby/lib/ruby/gems/1.8/gems/win32-process-0.5.3/lib/win3 2/process.rb:132:in `kill'C:/myworkspace/SSMSProject/Source/ruby/Noname3.rb:19 C:\myworkspace\SSMSProject\Source\ruby>ruby Noname3.rb [] start parent process output from process 532 #, (eval):3:in `call'(eval):3:in `O penProcess'C:/ruby/lib/ruby/gems/1.8/gems/win32-process-0.5.3/lib/win32/process. rb:143:in `kill'C:/ruby/lib/ruby/gems/1.8/gems/win32-process-0.5.3/lib/win32/pro cess.rb:132:in `each'C:/ruby/lib/ruby/gems/1.8/gems/win32-process-0.5.3/lib/win3 2/process.rb:132:in `kill'Noname3.rb:20 C:\myworkspace\SSMSProject\Source\ruby>output from process 532 ["child#0"] Do I miss something to make Process.kill work? Any help would be much appreciated. Thanks in advance! Qi ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=21838&group_id=85 From noreply at rubyforge.org Thu Sep 11 09:34:04 2008 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 11 Sep 2008 09:34:04 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Bugs-21915 ] missing to require a lib file in ...\lib\win32\process.rb Message-ID: <20080911133404.CC7D418585A0@rubyforge.org> Bugs item #21915, was opened at 2008-09-11 13:34 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=21915&group_id=85 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Qi Lu (qi_lu) Assigned to: Nobody (None) Summary: missing to require a lib file in ...\lib\win32\process.rb Initial Comment: the file of \lib\win32\process.rb misses a require file 'windows/thread'. without it, Process.kill('signal, *pid) will fail, while 'signal' can be 4-8. The correction is like: require 'windows/thread' .... include Windows::Thread ...... extend Windows::Thread .... ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=21915&group_id=85 From Daniel.Berger at qwest.com Thu Sep 11 11:34:19 2008 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Thu, 11 Sep 2008 10:34:19 -0500 Subject: [Win32utils-devel] [ win32utils-Bugs-21915 ] missing to require alib file in ...\lib\win32\process.rb In-Reply-To: <20080911133404.CC7D418585A0@rubyforge.org> References: <20080911133404.CC7D418585A0@rubyforge.org> Message-ID: <7524A45A1A5B264FA4809E2156496CFB04514CD0@ITOMAE2KM01.AD.QINTRA.COM> This one has me very confused... > -----Original Message----- > From: win32utils-devel-bounces at rubyforge.org > [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of > noreply at rubyforge.org > Sent: Thursday, September 11, 2008 7:34 AM > To: noreply at rubyforge.org > Subject: [Win32utils-devel] [ win32utils-Bugs-21915 ] missing > to require alib file in ...\lib\win32\process.rb > > Bugs item #21915, was opened at 2008-09-11 13:34 You can > respond by visiting: > http://rubyforge.org/tracker/?func=detail&atid=411&aid=21915&g > roup_id=85 > > Category: None > Group: None > Status: Open > Resolution: None > Priority: 3 > Submitted By: Qi Lu (qi_lu) > Assigned to: Nobody (None) > Summary: missing to require a lib file in ...\lib\win32\process.rb > > Initial Comment: > the file of \lib\win32\process.rb misses a require file > 'windows/thread'. without it, Process.kill('signal, *pid) > will fail, while 'signal' can be 4-8. > The correction is like: > > require 'windows/thread' > .... > include Windows::Thread > ...... > extend Windows::Thread > .... > > ---------------------------------------------------------------------- > > You can respond by visiting: > http://rubyforge.org/tracker/?func=detail&atid=411&aid=21915&g > roup_id=85 > _______________________________________________ > win32utils-devel mailing list > win32utils-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/win32utils-devel > 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 received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments. From Daniel.Berger at qwest.com Thu Sep 11 11:48:36 2008 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Thu, 11 Sep 2008 10:48:36 -0500 Subject: [Win32utils-devel] Vista x64 support Message-ID: <7524A45A1A5B264FA4809E2156496CFB04514CD1@ITOMAE2KM01.AD.QINTRA.COM> Hi everyone, I'll start working on improved Vista x64 support. I was in need of a new laptop anyway, so I ran out and bought a Best Buy special, a Hewlett Packard DV2945SE. 4gb ram, 320gb hard drive, low end nvidia graphics card, etc, etc. All for only $750. Anyway, the only issue I'm aware of at the moment is the win32-eventlog library, but I haven't had the chance to do any testing on the others. Regards, 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 received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments. From noreply at rubyforge.org Wed Sep 24 11:18:45 2008 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 24 Sep 2008 11:18:45 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Support Requests-22149 ] open3 and daemon Message-ID: <20080924151847.719A3185859F@rubyforge.org> Support Requests item #22149, was opened at 2008-09-24 17:18 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=412&aid=22149&group_id=85 Category: win32-service Group: None Status: Open Resolution: None Priority: 3 Submitted By: Florian D?tsch (der_flo) Assigned to: Nobody (None) Summary: open3 and daemon Initial Comment: open3 blocks in combination with a daemon. here is the example-code: ################################################################################ require 'win32/open3' require 'win32/daemon' include Win32 ################################################################################ COMPUTER_NAME = 'test' LOGFILE = 'C:\test.txt' PSLOGGEDON_EXE = 'D:\pstools\psloggedon.exe' ################################################################################ class Daemon def service_main while running? # User ermitteln users = [] i, o, e = Open3.popen3("#{PSLOGGEDON_EXE} -l \\#{COMPUTER_NAME}") i.close e.close o.readlines.each do |line| m = /^DOMAINNAME\(.*)$/.match line users << m[1] if m end o.close txt = "#{Time.new.strftime('%d.%m.%Y %H:%M')} - #{users.join(',')}" File.open(LOGFILE, 'a') { |file| file.puts txt } sleep 1 * 60 end end def service_stop exit! end end ################################################################################ Daemon.mainloop ################################################################################ The service/daemon looks for logged in users on a specific host and logs it to a file. The tool psloggedon (http://technet.microsoft.com/de-de/sysinternals/bb897545.aspx ) When not using a service and calling the open3-stuff directly everything is ok. But when starting as a service the psloggedon.exe does not exit. I don't know why and debugging is quite hard. Any ideas? Thanks, der flo ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=412&aid=22149&group_id=85 From Daniel.Berger at qwest.com Wed Sep 24 15:43:32 2008 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Wed, 24 Sep 2008 14:43:32 -0500 Subject: [Win32utils-devel] Am I on Windows XP? Message-ID: <7524A45A1A5B264FA4809E2156496CFB04514D2A@ITOMAE2KM01.AD.QINTRA.COM> Hi all, I was looking over a code snippet to determine if I was on Windows XP or not. Normally this would be easy - just check for major version 5, minor version 1. There's one snag, though. According to the MSDN docs, a 64 bit Windows XP Pro will return a minor version of 2. So, how do we distinguish between Windows Server 2003 and a 64 bit Windows XP? This is what I came up with. It feels pretty hackish, as I'm just checking the suitemask to see if any 2003 features are installed, but maybe it works. Is there a more elegant solution? def windows_xp? bool = false buf = 0.chr * 156 buf[0,4] = [buf.size].pack("L") # Set the size GetVersionEx(buf) major = buf[4,4].unpack("L")[0] minor = buf[8,4].unpack("L")[0] suite = buf[152,2].unpack("S")[0] # Make sure we detect a 64-bit Windows XP Pro if major == 5 if minor == 1 bool = true elsif minor == 2 if suite && VER_SUITE_BLADE == 0 && suite && VER_SUITE_COMPUTE_SERVER == 0 && suite && VER_SUITE_DATACENTER == 0 && suite && VER_SUITE_ENTERPRISE == 0 && suite && VER_SUITE_STORAGE_SERVER == 0 then bool = true end else # Do nothing - already false end end bool end Thanks, 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 received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments. From Daniel.Berger at qwest.com Wed Sep 24 18:52:34 2008 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Wed, 24 Sep 2008 17:52:34 -0500 Subject: [Win32utils-devel] Am I on Windows XP? In-Reply-To: <7524A45A1A5B264FA4809E2156496CFB04514D2A@ITOMAE2KM01.AD.QINTRA.COM> References: <7524A45A1A5B264FA4809E2156496CFB04514D2A@ITOMAE2KM01.AD.QINTRA.COM> Message-ID: <7524A45A1A5B264FA4809E2156496CFB04514D2B@ITOMAE2KM01.AD.QINTRA.COM> > -----Original Message----- > From: win32utils-devel-bounces at rubyforge.org > [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of > Berger, Daniel > Sent: Wednesday, September 24, 2008 1:44 PM > To: Development and ideas for win32utils projects > Subject: [Win32utils-devel] Am I on Windows XP? > > Hi all, > > I was looking over a code snippet to determine if I was on > Windows XP or not. Normally this would be easy - just check > for major version 5, minor version 1. > > There's one snag, though. According to the MSDN docs, a 64 > bit Windows XP Pro will return a minor version of 2. So, how > do we distinguish between Windows Server 2003 and a 64 bit Windows XP? > > This is what I came up with. It feels pretty hackish, as I'm > just checking the suitemask to see if any 2003 features are > installed, but maybe it works. Is there a more elegant solution? > > def windows_xp? > bool = false > > buf = 0.chr * 156 > buf[0,4] = [buf.size].pack("L") # Set the size > > GetVersionEx(buf) > > major = buf[4,4].unpack("L")[0] > minor = buf[8,4].unpack("L")[0] > suite = buf[152,2].unpack("S")[0] > > # Make sure we detect a 64-bit Windows XP Pro > if major == 5 > if minor == 1 > bool = true > elsif minor == 2 > if suite && VER_SUITE_BLADE == 0 && > suite && VER_SUITE_COMPUTE_SERVER == 0 && > suite && VER_SUITE_DATACENTER == 0 && > suite && VER_SUITE_ENTERPRISE == 0 && > suite && VER_SUITE_STORAGE_SERVER == 0 > then > bool = true > end > else > # Do nothing - already false > end > end > > bool > end Whoops, should be single '&' there, e.g. "suite & VER_SUITE_BLADE". I could probably use some parens, too. But you get the idea. :) 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 received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments. From Daniel.Berger at qwest.com Thu Sep 25 18:03:17 2008 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Thu, 25 Sep 2008 17:03:17 -0500 Subject: [Win32utils-devel] Getting virtual folder information Message-ID: <7524A45A1A5B264FA4809E2156496CFB04514D42@ITOMAE2KM01.AD.QINTRA.COM> Hi, One of the problems with SHGetFolderPath is that it doesn't work for virtual folders. I _think_ we can get it with SHGetFolderLocation, but I'm not positive, as I'm having a bit of trouble making it work. Any ideas on how to get, say, the value of CSIDL_DRIVES? I mean, it should be "My Computer", but I want to get it programmatically. Thanks, Dan PS - I've added SHGetFolderLocation to Windows::Shell in CVS. 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 received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments. From phasis at gmail.com Fri Sep 26 00:59:04 2008 From: phasis at gmail.com (Heesob Park) Date: Fri, 26 Sep 2008 13:59:04 +0900 Subject: [Win32utils-devel] Getting virtual folder information In-Reply-To: <7524A45A1A5B264FA4809E2156496CFB04514D42@ITOMAE2KM01.AD.QINTRA.COM> References: <7524A45A1A5B264FA4809E2156496CFB04514D42@ITOMAE2KM01.AD.QINTRA.COM> Message-ID: Hi, 2008/9/26 Berger, Daniel : > Hi, > > One of the problems with SHGetFolderPath is that it doesn't work for > virtual folders. I _think_ we can get it with SHGetFolderLocation, but > I'm not positive, as I'm having a bit of trouble making it work. > > Any ideas on how to get, say, the value of CSIDL_DRIVES? I mean, it > should be "My Computer", but I want to get it programmatically. > require 'windows/shell' include Windows::Shell pidl = 0.chr * 4 SHGetSpecialFolderLocation(0, CSIDL_DRIVES, pidl) # size of SHFILEINFO is 692 bytes info = 0.chr * 692 # 0x200 says get display name, 0x8 says PIDL, not path. SHGetFileInfo(pidl.unpack('L').first,0, info ,692,0x208) folder = info[12..-1].strip Regards, Park Heesob From djberg96 at gmail.com Fri Sep 26 10:13:01 2008 From: djberg96 at gmail.com (Daniel Berger) Date: Fri, 26 Sep 2008 08:13:01 -0600 Subject: [Win32utils-devel] Getting virtual folder information In-Reply-To: References: <7524A45A1A5B264FA4809E2156496CFB04514D42@ITOMAE2KM01.AD.QINTRA.COM> Message-ID: <48DCEDED.7060201@gmail.com> Heesob Park wrote: > Hi, > > 2008/9/26 Berger, Daniel : >> Hi, >> >> One of the problems with SHGetFolderPath is that it doesn't work for >> virtual folders. I _think_ we can get it with SHGetFolderLocation, but >> I'm not positive, as I'm having a bit of trouble making it work. >> >> Any ideas on how to get, say, the value of CSIDL_DRIVES? I mean, it >> should be "My Computer", but I want to get it programmatically. >> > require 'windows/shell' > include Windows::Shell > > pidl = 0.chr * 4 > SHGetSpecialFolderLocation(0, CSIDL_DRIVES, pidl) > # size of SHFILEINFO is 692 bytes > info = 0.chr * 692 > # 0x200 says get display name, 0x8 says PIDL, not path. > SHGetFileInfo(pidl.unpack('L').first,0, info ,692,0x208) > folder = info[12..-1].strip Excellent, thanks! Dan From djberg96 at gmail.com Sat Sep 27 21:08:02 2008 From: djberg96 at gmail.com (Daniel Berger) Date: Sat, 27 Sep 2008 19:08:02 -0600 Subject: [Win32utils-devel] Great Lakes Ruby Bash Message-ID: <48DED8F2.6070006@gmail.com> Hi everyone, I'll be in Ann Arbor on October 11th for the Great Lakes Ruby Bash. http://greatlakesrubybash.org/ Maybe I'll see some of you there. :) Regards, Dan