From zdennis at mktec.com Sun May 1 15:25:26 2005 From: zdennis at mktec.com (Zach Dennis) Date: Sun May 1 15:21:42 2005 Subject: [Win32utils-devel] Symlinks for Windows In-Reply-To: <6037b70c050430090354374173@mail.gmail.com> References: <20050226192300.28766.qmail@web50301.mail.yahoo.com> <427316A9.1010207@mktec.com> <6037b70c050430090354374173@mail.gmail.com> Message-ID: <42752D26.3020707@mktec.com> Daniel Berger wrote: > > Nope, hasn't happened yet. I'm still mulling it over. I noticed that > some Perl folks got confused by Autrijus' module with regards to the > file versus directory issue, so now I'm leaning towards adding this to > win32-dir as Dir.junction and Dir#junction? instead of File.symlink > and File#symlink? > > However, if anyone feels strongly one way or the other, I'm listening. > I can see where confusion may play a part. I will second 'junction'. Any idea on the time, effort or level of difficulty on putting this in ruby? I have already found a need for this feature! Thanks, Zach From zdennis at mktec.com Sun May 1 15:26:41 2005 From: zdennis at mktec.com (Zach Dennis) Date: Sun May 1 15:22:55 2005 Subject: [Win32utils-devel] Symlinks for Windows In-Reply-To: <42752D26.3020707@mktec.com> References: <20050226192300.28766.qmail@web50301.mail.yahoo.com> <427316A9.1010207@mktec.com> <6037b70c050430090354374173@mail.gmail.com> <42752D26.3020707@mktec.com> Message-ID: <42752D71.7070003@mktec.com> Zach Dennis wrote: > I can see where confusion may play a part. I will second 'junction'. Any > idea on the time, effort or level of difficulty on putting this in ruby? ^^^^^^^^^^^^^^^^^^^^^^^^^ I mean putting this in a ruby extension. =) Zach From zdennis at mktec.com Sun May 1 15:32:02 2005 From: zdennis at mktec.com (Zach Dennis) Date: Sun May 1 15:28:17 2005 Subject: [Win32utils-devel] win32-changejournal 0.2.0-1 compile error Message-ID: <42752EB2.3090201@mktec.com> I get the following error when trying to compile: win32-changejournal-0.2.0-1 on: Windows 2000, Service Pack 4 Microsoft Visual Studio 6 Any ideas? Thanks, Zach ----- ERROR BELOW----- C:\unzipped\win32-changejournal-0.2.0-1\win32-changejournal-0.2.0>nmake Microsoft (R) Program Maintenance Utility Version 6.00.9782.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. cl -nologo -MD -Zi -O2b2xg- -G6 -I. -Ic:/ruby/lib/ruby/1.8/i386-mswin32 -Ic:/ruby/lib/ruby/1.8/i386-mswin32 -I. -I. -I./.. -I./../missing -D_WIN32_WINN T=0x0500 -c -Tcchangejournal.c changejournal.c changejournal.h(49) : error C2039: 'FileNameOffset' : is not a member of 'USN_RE CORD' C:\Program Files\Microsoft Visual Studio\VC98\include\winioctl.h(1895) : see declaration of 'USN_RECORD' changejournal.c(60) : error C2065: 'DELETE_USN_JOURNAL_DATA' : undeclared identi fier changejournal.c(60) : error C2146: syntax error : missing ';' before identifier 'dujd' changejournal.c(60) : error C2065: 'dujd' : undeclared identifier changejournal.c(61) : error C2275: 'BOOL' : illegal use of this type as an expre ssion C:\Program Files\Microsoft Visual Studio\VC98\include\windef.h(142) : se e declaration of 'BOOL' changejournal.c(61) : error C2146: syntax error : missing ';' before identifier 'fOk' changejournal.c(61) : error C2065: 'fOk' : undeclared identifier changejournal.c(63) : error C2224: left of '.UsnJournalID' must have struct/unio n type changejournal.c(64) : error C2224: left of '.DeleteFlags' must have struct/union type changejournal.c(65) : error C2065: 'FSCTL_DELETE_USN_JOURNAL' : undeclared ident ifier changejournal.c(74) : error C2146: syntax error : missing ')' before identifier 'pUsnJournalData' changejournal.c(74) : error C2081: 'PUSN_JOURNAL_DATA' : name in formal paramete r list illegal changejournal.c(74) : error C2061: syntax error : identifier 'pUsnJournalData' changejournal.c(74) : error C2059: syntax error : ';' changejournal.c(74) : error C2059: syntax error : ')' changejournal.c(74) : error C2449: found '{' at file scope (missing function hea der?) changejournal.c(83) : error C2059: syntax error : '}' changejournal.c(191) : error C2065: 'USN_JOURNAL_DATA' : undeclared identifier changejournal.c(191) : error C2146: syntax error : missing ';' before identifier 'ujd' changejournal.c(191) : error C2065: 'ujd' : undeclared identifier changejournal.c(194) : error C2224: left of '.UsnJournalID' must have struct/uni on type changejournal.c(194) : error C2065: 'USN_DELETE_FLAG_DELETE' : undeclared identi fier changejournal.c(194) : error C2198: 'Delete' : too few actual parameters changejournal.c(280) : error C2146: syntax error : missing ';' before identifier 'ujd' changejournal.c(285) : error C2065: 'ERROR_JOURNAL_DELETE_IN_PROGRESS' : undecla red identifier changejournal.c(285) : error C2051: case expression not constant changejournal.c(289) : error C2065: 'USN_DELETE_FLAG_NOTIFY' : undeclared identi fier changejournal.c(293) : error C2065: 'ERROR_JOURNAL_NOT_ACTIVE' : undeclared iden tifier changejournal.c(293) : error C2051: case expression not constant changejournal.c(316) : error C2224: left of '.FirstUsn' must have struct/union t ype changejournal.c(316) : error C2224: left of '.UsnJournalID' must have struct/uni on type changejournal.c(385) : error C2146: syntax error : missing ';' before identifier 'ujd' changejournal.c(386) : error C2275: 'DWORD' : illegal use of this type as an exp ression C:\Program Files\Microsoft Visual Studio\VC98\include\windef.h(141) : se e declaration of 'DWORD' changejournal.c(386) : error C2146: syntax error : missing ';' before identifier 'dwTimeout' changejournal.c(386) : error C2065: 'dwTimeout' : undeclared identifier changejournal.c(386) : error C2065: 'dwWait' : undeclared identifier changejournal.c(387) : error C2275: 'READ_USN_JOURNAL_DATA' : illegal use of thi s type as an expression C:\Program Files\Microsoft Visual Studio\VC98\include\winioctl.h(1881) : see declaration of 'READ_USN_JOURNAL_DATA' changejournal.c(387) : error C2146: syntax error : missing ';' before identifier 'rujd' changejournal.c(387) : error C2065: 'rujd' : undeclared identifier changejournal.c(388) : error C2275: 'BOOL' : illegal use of this type as an expr ession C:\Program Files\Microsoft Visual Studio\VC98\include\windef.h(142) : se e declaration of 'BOOL' changejournal.c(388) : error C2146: syntax error : missing ';' before identifier 'fOk' changejournal.c(402) : error C2115: '=' : incompatible types changejournal.c(403) : error C2224: left of '.BytesToWaitFor' must have struct/u nion type changejournal.c(445) : error C2146: syntax error : missing ';' before identifier 'ujd' changejournal.c(451) : error C2224: left of '.UsnJournalID' must have struct/uni on type changejournal.c(451) : error C2198: 'Delete' : too few actual parameters NMAKE : fatal error U1077: 'cl' : return code '0x2' Stop. From zdennis at mktec.com Sun May 1 15:39:19 2005 From: zdennis at mktec.com (Zach Dennis) Date: Sun May 1 15:35:35 2005 Subject: [Win32utils-devel] win32-dir 0.1.0 compile problems Message-ID: <42753067.8060507@mktec.com> I tried to download/compile/install win32-dir, but I couldn't get it to go. Over a private email Daniel Berger had me... "Curious. What platform are you on exactly? Try modifying the extconf.rb file. Add 'have_library("SHFolder")' above 'have_library("shell32")'. If that doesn't work, try uncommenting the other two 'have_library' calls." I did those and the below is the output I get from running 'ruby extconf.rb' is... C:\unzipped\WIN32-~2.0\WIN32-~1.0>ruby extconf.rb checking for main() in shlwapi.lib... yes checking for main() in SHFolder.lib... no checking for main() in shell32.lib... yes checking for main() in comctl32.lib... yes checking for SHGetFolderPath()... no creating Makefile I then ran a: C:\WINNT\system32>dumpbin /exports shell32.dll | grep SH (yes i have unix tools) and found that I don't have SHGetFolderPath. I have SHGetFolderPathA and SHGetFolderPathW. The actual compiles I got are listed below this email. I am running... Windows 2000 Service Pack 4 Visual Studio 6 I get this problem at my home and at my office. Could this be easily remedied by checking to see if SHGetFolderPath is an invalid pointer, and if so checking for SHGetFolderPathA or SHGetFolderPathW ? Thanks, Zach ---- ERROR BELOW ---- C:\unzipped\WIN32-~2.0\WIN32-~1.0>nmake Microsoft (R) Program Maintenance Utility Version 6.00.9782.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. cl -nologo -MD -Zi -O2b2xg- -G6 -I. -Ic:/ruby/lib/ruby/1.8/i386-mswin32 -Ic:/ruby/lib/ruby/1.8/i386-mswin32 -I. -I. -I./.. -I./../missing -D_WIN32_WINN T=0x0500 -D_WIN32_IE=0x0500 -c -Tcdir.c dir.c dir.c(36) : error C2065: 'CSIDL_ADMINTOOLS' : undeclared identifier dir.c(40) : error C2065: 'CSIDL_CDBURN_AREA' : undeclared identifier dir.c(41) : error C2065: 'CSIDL_COMMON_ADMINTOOLS' : undeclared identifier dir.c(43) : error C2065: 'CSIDL_COMMON_APPDATA' : undeclared identifier dir.c(48) : error C2065: 'CSIDL_COMMON_DOCUMENTS' : undeclared identifier dir.c(50) : error C2065: 'CSIDL_COMMON_MUSIC' : undeclared identifier dir.c(51) : error C2065: 'CSIDL_COMMON_PICTURES' : undeclared identifier dir.c(55) : error C2065: 'CSIDL_COMMON_TEMPLATES' : undeclared identifier dir.c(56) : error C2065: 'CSIDL_COMMON_VIDEO' : undeclared identifier dir.c(67) : error C2065: 'CSIDL_LOCAL_APPDATA' : undeclared identifier dir.c(68) : error C2065: 'CSIDL_MYDOCUMENTS' : undeclared identifier dir.c(69) : error C2065: 'CSIDL_MYMUSIC' : undeclared identifier dir.c(70) : error C2065: 'CSIDL_MYPICTURES' : undeclared identifier dir.c(71) : error C2065: 'CSIDL_MYVIDEO' : undeclared identifier dir.c(77) : error C2065: 'CSIDL_PROFILE' : undeclared identifier dir.c(81) : error C2065: 'CSIDL_PROGRAM_FILES' : undeclared identifier dir.c(84) : error C2065: 'CSIDL_PROGRAM_FILES_COMMON' : undeclared identifier dir.c(91) : error C2065: 'CSIDL_SYSTEM' : undeclared identifier dir.c(93) : error C2065: 'CSIDL_WINDOWS' : undeclared identifier NMAKE : fatal error U1077: 'cl' : return code '0x2' Stop. From wvucenic at netgate.net Sun May 1 18:25:11 2005 From: wvucenic at netgate.net (Wayne Vucenic) Date: Sun May 1 18:18:25 2005 Subject: [Win32utils-devel] win32-dir 0.1.0 compile problems In-Reply-To: <42753067.8060507@mktec.com> References: <42753067.8060507@mktec.com> Message-ID: <348370115.20050501152511@netgate.net> Hi Zach, Just a quick comment... > C:\WINNT\system32>>dumpbin /exports shell32.dll | grep SH > (yes i have unix tools) > and found that I don't have SHGetFolderPath. I have SHGetFolderPathA and > SHGetFolderPathW. I don't know anything about the specific problem you're encountering, but the results you got above are exactly what I'd expect. Almost all Win32 API calls that do anything with strings come in two flavors, xyzA (which deals with 8 bit ANSI strings) and xyzW (which deals with 16 bit Unicode strings). There is not actually an API call named just "xyz". In C/C++ there are preprocessor defines that translate xyz to xyzA or to xyzW, depending on whether the code is being compiled for Unicode. Hope this helps, Wayne Sunday, May 1, 2005, 12:39:19 PM, you wrote: > I tried to download/compile/install win32-dir, but I couldn't get it to > go. Over a private email Daniel Berger had me... > "Curious. What platform are you on exactly? Try > modifying the extconf.rb file. Add > 'have_library("SHFolder")' above > 'have_library("shell32")'. If that doesn't work, try > uncommenting the other two 'have_library' calls." > I did those and the below is the output I get from running 'ruby > extconf.rb' is... > C:\unzipped\WIN32-~2.0\WIN32-~1.0>ruby extconf.rb > checking for main() in shlwapi.lib... yes > checking for main() in SHFolder.lib... no > checking for main() in shell32.lib... yes > checking for main() in comctl32.lib... yes > checking for SHGetFolderPath()... no > creating Makefile > I then ran a: C:\WINNT\system32>>dumpbin /exports shell32.dll | grep SH > (yes i have unix tools) > and found that I don't have SHGetFolderPath. I have SHGetFolderPathA and > SHGetFolderPathW. > The actual compiles I got are listed below this email. I am running... > Windows 2000 Service Pack 4 > Visual Studio 6 > I get this problem at my home and at my office. Could this be easily > remedied by checking to see if SHGetFolderPath is an invalid pointer, > and if so checking for SHGetFolderPathA or SHGetFolderPathW ? Thanks, > Zach > ---- ERROR BELOW ---- > C:\unzipped\WIN32-~2.0\WIN32-~1.0>nmake > Microsoft (R) Program Maintenance Utility Version 6.00.9782.0 > Copyright (C) Microsoft Corp 1988-1998. All rights reserved. > cl -nologo -MD -Zi -O2b2xg- -G6 -I. > -Ic:/ruby/lib/ruby/1.8/i386-mswin32 > -Ic:/ruby/lib/ruby/1.8/i386-mswin32 -I. -I. -I./.. -I./../missing > -D_WIN32_WINN > T=0x0500 -D_WIN32_IE=0x0500 -c -Tcdir.c > dir.c > dir.c(36) : error C2065: 'CSIDL_ADMINTOOLS' : undeclared identifier > dir.c(40) : error C2065: 'CSIDL_CDBURN_AREA' : undeclared identifier > dir.c(41) : error C2065: 'CSIDL_COMMON_ADMINTOOLS' : undeclared identifier > dir.c(43) : error C2065: 'CSIDL_COMMON_APPDATA' : undeclared identifier > dir.c(48) : error C2065: 'CSIDL_COMMON_DOCUMENTS' : undeclared identifier > dir.c(50) : error C2065: 'CSIDL_COMMON_MUSIC' : undeclared identifier > dir.c(51) : error C2065: 'CSIDL_COMMON_PICTURES' : undeclared identifier > dir.c(55) : error C2065: 'CSIDL_COMMON_TEMPLATES' : undeclared identifier > dir.c(56) : error C2065: 'CSIDL_COMMON_VIDEO' : undeclared identifier > dir.c(67) : error C2065: 'CSIDL_LOCAL_APPDATA' : undeclared identifier > dir.c(68) : error C2065: 'CSIDL_MYDOCUMENTS' : undeclared identifier > dir.c(69) : error C2065: 'CSIDL_MYMUSIC' : undeclared identifier > dir.c(70) : error C2065: 'CSIDL_MYPICTURES' : undeclared identifier > dir.c(71) : error C2065: 'CSIDL_MYVIDEO' : undeclared identifier > dir.c(77) : error C2065: 'CSIDL_PROFILE' : undeclared identifier > dir.c(81) : error C2065: 'CSIDL_PROGRAM_FILES' : undeclared identifier > dir.c(84) : error C2065: 'CSIDL_PROGRAM_FILES_COMMON' : undeclared > identifier > dir.c(91) : error C2065: 'CSIDL_SYSTEM' : undeclared identifier > dir.c(93) : error C2065: 'CSIDL_WINDOWS' : undeclared identifier > NMAKE : fatal error U1077: 'cl' : return code '0x2' > Stop. > _______________________________________________ > win32utils-devel mailing list > win32utils-devel@rubyforge.org > http://rubyforge.org/mailman/listinfo/win32utils-devel From Daniel.Berger at qwest.com Mon May 2 10:25:12 2005 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Mon May 2 10:19:05 2005 Subject: [Win32utils-devel] win32-dir 0.1.0 compile problems Message-ID: <8FE83020B9E1A248A182A9B0A7B76E73015E6B72@itomae2km07.AD.QINTRA.COM> > -----Original Message----- > From: win32utils-devel-bounces@rubyforge.org > [mailto:win32utils-devel-bounces@rubyforge.org] On Behalf Of > Wayne Vucenic > Sent: Sunday, May 01, 2005 4:25 PM > To: Zach Dennis > Cc: Development and ideas for win32utils projects > Subject: Re: [Win32utils-devel] win32-dir 0.1.0 compile problems > > > Hi Zach, > > Just a quick comment... > > > C:\WINNT\system32>>dumpbin /exports shell32.dll | grep SH > (yes i have > > unix tools) > > > and found that I don't have SHGetFolderPath. I have > SHGetFolderPathA > > and SHGetFolderPathW. > > I don't know anything about the specific problem you're > encountering, but the results you got above are exactly what > I'd expect. Almost all Win32 API calls that do anything with > strings come in two flavors, xyzA (which deals with 8 bit > ANSI strings) and xyzW (which deals with 16 bit Unicode > strings). There is not actually an API call named just > "xyz". In C/C++ there are preprocessor defines that translate > xyz to xyzA or to xyzW, depending on whether the code is > being compiled for Unicode. > > Hope this helps, > > Wayne This isn't the issue. If SHGetFolderPath isn't found, then SHGetSpecialFolderPath is used instead. The real issue simply seems to be that some of these constants just aren't defined in the VC++ 6 header files. I couldn't tell this from the documentation, which only specifies a minimum OS, not a minimum version of VC++. I've hit this before back when I was using Win2k with VC++ 6 myself. There are three solutions. Two involve wrapping these values in #ifdef statements. The question is whether or not to simply leave them undefined, or to define them manually based on the values in the VC++ 7 header files if not found, which I could copy/paste. The third solution is for Zach to upgrade to a newer version of VC++. :) In any case I should have a new release out this week at some point. Zach (or anyone with VC++ 6), I'll need your help to confirm that it works. Regards, Dan From zdennis at mktec.com Mon May 2 10:27:29 2005 From: zdennis at mktec.com (Zach Dennis) Date: Mon May 2 10:21:11 2005 Subject: [Win32utils-devel] win32-dir 0.1.0 compile problems In-Reply-To: <8FE83020B9E1A248A182A9B0A7B76E73015E6B72@itomae2km07.AD.QINTRA.COM> References: <8FE83020B9E1A248A182A9B0A7B76E73015E6B72@itomae2km07.AD.QINTRA.COM> Message-ID: <427638D1.5050007@mktec.com> Berger, Daniel wrote: >>-----Original Message----- >>From: win32utils-devel-bounces@rubyforge.org >>[mailto:win32utils-devel-bounces@rubyforge.org] On Behalf Of >>Wayne Vucenic >>Sent: Sunday, May 01, 2005 4:25 PM >>To: Zach Dennis >>Cc: Development and ideas for win32utils projects >>Subject: Re: [Win32utils-devel] win32-dir 0.1.0 compile problems >> >> >>Hi Zach, >> >>Just a quick comment... >> >> >>>C:\WINNT\system32>>dumpbin /exports shell32.dll | grep SH >> >>(yes i have >> >>>unix tools) >> >>>and found that I don't have SHGetFolderPath. I have >> >>SHGetFolderPathA >> >>>and SHGetFolderPathW. >> >>I don't know anything about the specific problem you're >>encountering, but the results you got above are exactly what >>I'd expect. Almost all Win32 API calls that do anything with >>strings come in two flavors, xyzA (which deals with 8 bit >>ANSI strings) and xyzW (which deals with 16 bit Unicode >>strings). There is not actually an API call named just >>"xyz". In C/C++ there are preprocessor defines that translate >>xyz to xyzA or to xyzW, depending on whether the code is >>being compiled for Unicode. >> >>Hope this helps, >> >>Wayne > > > This isn't the issue. If SHGetFolderPath isn't found, then > SHGetSpecialFolderPath is used instead. > > The real issue simply seems to be that some of these constants just > aren't defined in the VC++ 6 header files. I couldn't tell this from > the documentation, which only specifies a minimum OS, not a minimum > version of VC++. I've hit this before back when I was using Win2k with > VC++ 6 myself. > > There are three solutions. Two involve wrapping these values in #ifdef > statements. The question is whether or not to simply leave them > undefined, or to define them manually based on the values in the VC++ 7 > header files if not found, which I could copy/paste. The third solution > is for Zach to upgrade to a newer version of VC++. :) I have the latest .NET Studio install now at work (as of this morning), but for my home, I can guarantee I won't be purchasing it unless it is company funded. =) > In any case I should have a new release out this week at some point. > Zach (or anyone with VC++ 6), I'll need your help to confirm that it > works. I'd be glad to help! Zach From Daniel.Berger at qwest.com Mon May 2 10:37:28 2005 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Mon May 2 10:31:20 2005 Subject: [Win32utils-devel] win32-changejournal 0.2.0-1 compile error Message-ID: <8FE83020B9E1A248A182A9B0A7B76E73015E6B73@itomae2km07.AD.QINTRA.COM> > -----Original Message----- > From: win32utils-devel-bounces@rubyforge.org > [mailto:win32utils-devel-bounces@rubyforge.org] On Behalf Of > Zach Dennis > Sent: Sunday, May 01, 2005 1:32 PM > To: Development and ideas for win32utils projects > Subject: [Win32utils-devel] win32-changejournal 0.2.0-1 compile error > > > I get the following error when trying to compile: > win32-changejournal-0.2.0-1 > on: > Windows 2000, Service Pack 4 > Microsoft Visual Studio 6 > > Any ideas? Thanks, > > Zach Again, it appears that several constants are simply not defined in the VC++ 6.0 header files. Unfortunately, it also appears that certain data structures, such as DELETE_USN_JOURNAL_DATA, are also not defined. That means that, unless someone has a better idea, there's nothing I can do about it except make a note in the README file. Regards, Dan From djberg96 at yahoo.com Mon May 2 23:38:34 2005 From: djberg96 at yahoo.com (Daniel Berger) Date: Mon May 2 23:32:25 2005 Subject: [Win32utils-devel] Possible win32-dir mods Message-ID: <20050503033834.38525.qmail@web50304.mail.yahoo.com> Hi Zach (or anyone with VC++ 6), I was hoping you would test a couple things for me. The first thing I would like you to try is replacing "#include " with "#include ". That, or try including both. If that doesn't do the trick, the next thing I'd like to try is commenting out all the rb_define_const lines that were undefined except CSIDL_ADMINTOOLS. Then put this somewhere near the top of dir.c: #ifndef CSIDL_ADMINTOOLS #define CSIDL_ADMINTOOLS 0x0030 #endif Then recompile. Assuming it works, then try "put Dir::ADMINTOOLS" and see if it prints out anything. If it doesn't print anything out, then I'll know it's not worth defining them manually. I'll just wrap the rb_define_const function calls. Thanks. Dan __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From timbyrd at pobox.com Tue May 3 03:03:29 2005 From: timbyrd at pobox.com (Timothy Byrd) Date: Tue May 3 03:01:10 2005 Subject: [Win32utils-devel] Symlinks for Windows References: <200505021421.j42ELCdS008629@rubyforge.org> Message-ID: <00b901c54fae$ff31e150$6401a8c0@IDEALISM> > Zach Dennis wrote: > >> I can see where confusion may play a part. I will second 'junction'. Any >> idea on the time, effort or level of difficulty on putting this in ruby? > ^^^^^^^^^^^^^^^^^^^^^^^^^ > > I mean putting this in a ruby extension. =) Back in mid-March, I'd posted code for creating junctions and getting the target of a junction. It's pure Ruby, but easy to translate to C. Here it is again. The source is 17k, but that's because it includes a pile of constants for implementing future file ops, and simple routines to convert between unicode and ascii. Hope this helps, -- Timothy -------------- next part -------------- A non-text attachment was scrubbed... Name: junction_sample.rb Type: application/octet-stream Size: 730 bytes Desc: not available Url : http://rubyforge.org/pipermail/win32utils-devel/attachments/20050503/b3c493b9/junction_sample.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: junction.rb Type: application/octet-stream Size: 17601 bytes Desc: not available Url : http://rubyforge.org/pipermail/win32utils-devel/attachments/20050503/b3c493b9/junction.obj From zdennis at mktec.com Tue May 3 19:49:06 2005 From: zdennis at mktec.com (Zach Dennis) Date: Tue May 3 19:45:21 2005 Subject: [Win32utils-devel] Possible win32-dir mods In-Reply-To: <20050503033834.38525.qmail@web50304.mail.yahoo.com> References: <20050503033834.38525.qmail@web50304.mail.yahoo.com> Message-ID: <42780DF2.2070301@mktec.com> Daniel Berger wrote: > Hi Zach (or anyone with VC++ 6), > > I was hoping you would test a couple things for me. > The first thing I would like you to try is replacing > "#include " with "#include ". > That, or try including both. With Visual Studio 6 I do not have a shfolder.h, although I do have a shlobj.h. (Although with Borland BC55 you do get shfolder.h). Instead in shlobj.h I have the following constants defined: #define CSIDL_DESKTOP 0x0000 #define CSIDL_INTERNET 0x0001 #define CSIDL_PROGRAMS 0x0002 #define CSIDL_CONTROLS 0x0003 #define CSIDL_PRINTERS 0x0004 #define CSIDL_PERSONAL 0x0005 #define CSIDL_FAVORITES 0x0006 #define CSIDL_STARTUP 0x0007 #define CSIDL_RECENT 0x0008 #define CSIDL_SENDTO 0x0009 #define CSIDL_BITBUCKET 0x000a #define CSIDL_STARTMENU 0x000b #define CSIDL_DESKTOPDIRECTORY 0x0010 #define CSIDL_DRIVES 0x0011 #define CSIDL_NETWORK 0x0012 #define CSIDL_NETHOOD 0x0013 #define CSIDL_FONTS 0x0014 #define CSIDL_TEMPLATES 0x0015 #define CSIDL_COMMON_STARTMENU 0x0016 #define CSIDL_COMMON_PROGRAMS 0X0017 #define CSIDL_COMMON_STARTUP 0x0018 #define CSIDL_COMMON_DESKTOPDIRECTORY 0x0019 #define CSIDL_APPDATA 0x001a #define CSIDL_PRINTHOOD 0x001b #define CSIDL_ALTSTARTUP 0x001d // DBCS #define CSIDL_COMMON_ALTSTARTUP 0x001e // DBCS #define CSIDL_COMMON_FAVORITES 0x001f #define CSIDL_INTERNET_CACHE 0x0020 #define CSIDL_COOKIES 0x0021 #define CSIDL_HISTORY 0x0022 > > If that doesn't do the trick, the next thing I'd like > to try is commenting out all the rb_define_const lines > that were undefined except CSIDL_ADMINTOOLS. Then put > this somewhere near the top of dir.c: > > #ifndef CSIDL_ADMINTOOLS > #define CSIDL_ADMINTOOLS 0x0030 > #endif The CSIDL_ADMINTOOLS returned nil, however I did the same with CSIDL_HISTORY and it worked. > I'll just wrap the > rb_define_const function calls. If you want me to aide in an of this grunt work just say, "hey help me with this grunt work you bloody Visual Studio 6 user, or upgrade!!" =) Zach From zdennis at mktec.com Tue May 3 19:51:00 2005 From: zdennis at mktec.com (Zach Dennis) Date: Tue May 3 19:47:12 2005 Subject: [Win32utils-devel] win32-changejournal 0.2.0-1 compile error In-Reply-To: <8FE83020B9E1A248A182A9B0A7B76E73015E6B73@itomae2km07.AD.QINTRA.COM> References: <8FE83020B9E1A248A182A9B0A7B76E73015E6B73@itomae2km07.AD.QINTRA.COM> Message-ID: <42780E64.5040104@mktec.com> Berger, Daniel wrote: > > Again, it appears that several constants are simply not defined in the > VC++ 6.0 header files. Unfortunately, it also appears that certain data > structures, such as DELETE_USN_JOURNAL_DATA, are also not defined. > > That means that, unless someone has a better idea, there's nothing I can > do about it except make a note in the README file. > If you compile the shared library on your box and email it to me, won't it most likely be able to run fine on my box? Is there a violation with distributing binaries instead of making users compile their own shared libraries? Zach From Daniel.Berger at qwest.com Wed May 4 10:32:13 2005 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Wed May 4 10:26:18 2005 Subject: [Win32utils-devel] win32-changejournal 0.2.0-1 compile error Message-ID: <8FE83020B9E1A248A182A9B0A7B76E73015E6B81@itomae2km07.AD.QINTRA.COM> > -----Original Message----- > From: win32utils-devel-bounces@rubyforge.org > [mailto:win32utils-devel-bounces@rubyforge.org] On Behalf Of > Zach Dennis > Sent: Tuesday, May 03, 2005 5:51 PM > To: Development and ideas for win32utils projects > Subject: Re: [Win32utils-devel] win32-changejournal 0.2.0-1 > compile error > > > Berger, Daniel wrote: > > > > Again, it appears that several constants are simply not > defined in the > > VC++ 6.0 header files. Unfortunately, it also appears that certain > > VC++ data > > structures, such as DELETE_USN_JOURNAL_DATA, are also not defined. > > > > That means that, unless someone has a better idea, there's > nothing I > > can do about it except make a note in the README file. > > > > If you compile the shared library on your box and email it to > me, won't > it most likely be able to run fine on my box? Is there a > violation with > distributing binaries instead of making users compile their > own shared > libraries? > > Zach No, that's perfectly fine. I'll email you the attached code tonight off list. Dan From zdennis at mktec.com Wed May 4 10:37:58 2005 From: zdennis at mktec.com (Zach Dennis) Date: Wed May 4 10:31:38 2005 Subject: [Win32utils-devel] win32-changejournal 0.2.0-1 compile error In-Reply-To: <8FE83020B9E1A248A182A9B0A7B76E73015E6B81@itomae2km07.AD.QINTRA.COM> References: <8FE83020B9E1A248A182A9B0A7B76E73015E6B81@itomae2km07.AD.QINTRA.COM> Message-ID: <4278DE46.1020901@mktec.com> Berger, Daniel wrote: >>-----Original Message----- >>From: win32utils-devel-bounces@rubyforge.org >>[mailto:win32utils-devel-bounces@rubyforge.org] On Behalf Of >>Zach Dennis >>If you compile the shared library on your box and email it to >>me, won't >>it most likely be able to run fine on my box? Is there a >>violation with >>distributing binaries instead of making users compile their >>own shared >>libraries? > > > No, that's perfectly fine. I'll email you the attached code tonight off > list. I think this would be worthwhile to have binaries released also, or even just a win32 installer which would install all of the binaries, so you dont have to commit each binary individually? Thanks Daniel, Zach From Daniel.Berger at qwest.com Wed May 4 10:43:10 2005 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Wed May 4 10:37:04 2005 Subject: [Win32utils-devel] New win32-dir Message-ID: <8FE83020B9E1A248A182A9B0A7B76E73015E6B82@itomae2km07.AD.QINTRA.COM> 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 wrapped it in a begin/rescue clause. Does that seem a reasonable approach? Regards, Dan PS - There are a few extra constants to boot (I dug them out of the header files). require "Win32API" module Win32 # SHGetFolderPath may not be defined # If not, use SHGetSpecialFolderPath instead begin SHGetFolderPath = Win32API.new("shell32","SHGetFolderPath","LLLLP","L") rescue RuntimeError SHGetSpecialFolderPath = Win32API.new("shell32","SHGetSpecialFolderPath", "LPLL","L") end CSIDL_DESKTOP = 0x0000 # CSIDL_INTERNET = 0x0001 # Internet Explorer (icon on desktop) CSIDL_PROGRAMS = 0x0002 # Start Menu\Programs CSIDL_CONTROLS = 0x0003 # My Computer\Control Panel CSIDL_PRINTERS = 0x0004 # My Computer\Printers CSIDL_PERSONAL = 0x0005 # My Documents CSIDL_FAVORITES = 0x0006 # \Favorites CSIDL_STARTUP = 0x0007 # Start Menu\Programs\Startup CSIDL_RECENT = 0x0008 # \Recent CSIDL_SENDTO = 0x0009 # \SendTo CSIDL_BITBUCKET = 0x000a # \Recycle Bin CSIDL_STARTMENU = 0x000b # \Start Menu CSIDL_MYDOCUMENTS = 0x000c # logical "My Documents" desktop icon CSIDL_MYMUSIC = 0x000d # "My Music" folder CSIDL_MYVIDEO = 0x000e # "My Videos" folder CSIDL_DESKTOPDIRECTORY = 0x0010 # \Desktop CSIDL_DRIVES = 0x0011 # My Computer CSIDL_NETWORK = 0x0012 # Network Neighborhood (My Network Places) CSIDL_NETHOOD = 0x0013 # \nethood CSIDL_FONTS = 0x0014 # windows\fonts CSIDL_TEMPLATES = 0x0015 CSIDL_COMMON_STARTMENU = 0x0016 # All Users\Start Menu CSIDL_COMMON_PROGRAMS = 0X0017 # All Users\Start Menu\Programs CSIDL_COMMON_STARTUP = 0x0018 # All Users\Startup CSIDL_COMMON_FAVORITES = 0x001f CSIDL_COMMON_DESKTOPDIRECTORY = 0x0019 # All Users\Desktop CSIDL_APPDATA = 0x001a # \Application Data CSIDL_PRINTHOOD = 0x001b # \PrintHood CSIDL_LOCAL_APPDATA = 0x001c # \Local Settings\Application Data CSIDL_ALTSTARTUP = 0x001d # non localized startup CSIDL_COMMON_ALTSTARTUP = 0x001e # non localized common startup CSIDL_INTERNET_CACHE = 0x0020 CSIDL_COOKIES = 0x0021 CSIDL_HISTORY = 0x0022 CSIDL_COMMON_APPDATA = 0x0023 # All Users\Application Data CSIDL_WINDOWS = 0x0024 # GetWindowsDirectory() CSIDL_SYSTEM = 0x0025 # GetSystemDirectory() CSIDL_PROGRAM_FILES = 0x0026 # C:\Program Files CSIDL_MYPICTURES = 0x0027 # C:\Program Files\My Pictures CSIDL_PROFILE = 0x0028 # USERPROFILE CSIDL_SYSTEMX86 = 0x0029 # x86 system directory on RISC CSIDL_PROGRAM_FILESX86 = 0x002a # x86 C:\Program Files on RISC CSIDL_PROGRAM_FILES_COMMON = 0x002b # C:\Program Files\Common CSIDL_PROGRAM_FILES_COMMONX86 = 0x002c # x86 Program Files\Common on RISC CSIDL_COMMON_TEMPLATES = 0x002d # All Users\Templates CSIDL_COMMON_DOCUMENTS = 0x002e # All Users\Documents CSIDL_CONNECTIONS = 0x0031 # Network and Dial-up Connections CSIDL_COMMON_MUSIC = 0x0035 # All Users\My Music CSIDL_COMMON_PICTURES = 0x0036 # All Users\My Pictures CSIDL_COMMON_VIDEO = 0x0037 # All Users\My Video CSIDL_RESOURCES = 0x0038 # Resource Direcotry CSIDL_RESOURCES_LOCALIZED = 0x0039 # Localized Resource Direcotry CSIDL_COMMON_OEM_LINKS = 0x003a # Links to All Users OEM specific apps # USERPROFILE\Local Settings\Application Data\Microsoft\CD Burning CSIDL_CDBURN_AREA = 0x003b # All Users\Start Menu\Programs\Administrative Tools CSIDL_COMMON_ADMINTOOLS = 0x002f # \Start Menu\Programs\Administrative Tools CSIDL_ADMINTOOLS = 0x0030 def cget(const) path = " " * 255 if SHGetFolderPath result = SHGetFolderPath.call(0, const, 0, 1, path) else result = SHGetSpecialFolderPath.call(0, path, const, 0) end if result != 0 path = nil else path.gsub!(/\000/, '') path.strip! end path end module_function :cget end class Dir include Win32 undef_method :cget # Not meant to be public DESKTOP = Win32.cget(CSIDL_DESKTOP) INTERNET = Win32.cget(CSIDL_INTERNET) PROGRAMS = Win32.cget(CSIDL_PROGRAMS) CONTROLS = Win32.cget(CSIDL_CONTROLS) PRINTERS = Win32.cget(CSIDL_PRINTERS) PERSONAL = Win32.cget(CSIDL_PERSONAL) FAVORITES = Win32.cget(CSIDL_FAVORITES) STARTUP = Win32.cget(CSIDL_STARTUP) RECENT = Win32.cget(CSIDL_RECENT) SENDTO = Win32.cget(CSIDL_SENDTO) BITBUCKET = Win32.cget(CSIDL_BITBUCKET) STARTMENU = Win32.cget(CSIDL_STARTMENU) MYDOCUMENTS = Win32.cget(CSIDL_MYDOCUMENTS) MYMUSIC = Win32.cget(CSIDL_MYMUSIC) MYVIDEO = Win32.cget(CSIDL_MYVIDEO) DESKTOPDIRECTORY = Win32.cget(CSIDL_DESKTOPDIRECTORY) DRIVES = Win32.cget(CSIDL_DRIVES) NETWORK = Win32.cget(CSIDL_NETWORK) NETHOOD = Win32.cget(CSIDL_NETHOOD) FONTS = Win32.cget(CSIDL_FONTS) TEMPLATES = Win32.cget(CSIDL_TEMPLATES) COMMON_STARTMENU = Win32.cget(CSIDL_COMMON_STARTMENU) COMMON_PROGRAMS = Win32.cget(CSIDL_COMMON_PROGRAMS) COMMON_STARTUP = Win32.cget(CSIDL_COMMON_STARTUP) COMMON_FAVORITES = Win32.cget(CSIDL_COMMON_FAVORITES) COMMON_DESKTOPDIRECTORY = Win32.cget(CSIDL_COMMON_DESKTOPDIRECTORY) APPDATA = Win32.cget(CSIDL_APPDATA) PRINTHOOD = Win32.cget(CSIDL_PRINTHOOD) LOCAL_APPDATA = Win32.cget(CSIDL_LOCAL_APPDATA) ALTSTARTUP = Win32.cget(CSIDL_ALTSTARTUP) COMMON_ALTSTARTUP = Win32.cget(CSIDL_COMMON_ALTSTARTUP) INTERNET_CACHE = Win32.cget(CSIDL_INTERNET_CACHE) COOKIES = Win32.cget(CSIDL_COOKIES) HISTORY = Win32.cget(CSIDL_HISTORY) COMMON_APPDATA = Win32.cget(CSIDL_COMMON_APPDATA) WINDOWS = Win32.cget(CSIDL_WINDOWS) SYSTEM = Win32.cget(CSIDL_SYSTEM) PROGRAM_FILES = Win32.cget(CSIDL_PROGRAM_FILES) MYPICTURES = Win32.cget(CSIDL_MYPICTURES) PROFILE = Win32.cget(CSIDL_PROFILE) SYSTEMX86 = Win32.cget(CSIDL_SYSTEMX86) PROGRAM_FILESX86 = Win32.cget(CSIDL_PROGRAM_FILESX86) PROGRAM_FILES_COMMON = Win32.cget(CSIDL_PROGRAM_FILES_COMMON) PROGRAM_FILES_COMMONX86 = Win32.cget(CSIDL_PROGRAM_FILES_COMMONX86) COMMON_TEMPLATES = Win32.cget(CSIDL_COMMON_TEMPLATES) COMMON_DOCUMENTS = Win32.cget(CSIDL_COMMON_DOCUMENTS) CONNECTIONS = Win32.cget(CSIDL_CONNECTIONS) COMMON_MUSIC = Win32.cget(CSIDL_COMMON_MUSIC) COMMON_PICTURES = Win32.cget(CSIDL_COMMON_PICTURES) COMMON_VIDEO = Win32.cget(CSIDL_COMMON_VIDEO) RESOURCES = Win32.cget(CSIDL_RESOURCES) RESOURCES_LOCALIZED = Win32.cget(CSIDL_RESOURCES_LOCALIZED) COMMON_OEM_LINKS = Win32.cget(CSIDL_COMMON_OEM_LINKS) # USERPROFILE\Local Settings\Application Data\Microsoft\CD Burning CDBURN_AREA = Win32.cget(CSIDL_CDBURN_AREA) # All Users\Start Menu\Programs\Administrative Tools COMMON_ADMINTOOLS = Win32.cget(CSIDL_COMMON_ADMINTOOLS) # \Start Menu\Programs\Administrative Tools ADMINTOOLS = Win32.cget(CSIDL_ADMINTOOLS) end From Daniel.Berger at qwest.com Wed May 4 10:44:55 2005 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Wed May 4 10:38:43 2005 Subject: [Win32utils-devel] win32-changejournal 0.2.0-1 compile error Message-ID: <8FE83020B9E1A248A182A9B0A7B76E73015E6B83@itomae2km07.AD.QINTRA.COM> > -----Original Message----- > From: win32utils-devel-bounces@rubyforge.org > [mailto:win32utils-devel-bounces@rubyforge.org] On Behalf Of > Zach Dennis > Sent: Wednesday, May 04, 2005 8:38 AM > To: Development and ideas for win32utils projects > Subject: Re: [Win32utils-devel] win32-changejournal 0.2.0-1 > compile error > > > Berger, Daniel wrote: > >>-----Original Message----- > >>From: win32utils-devel-bounces@rubyforge.org > >>[mailto:win32utils-devel-bounces@rubyforge.org] On Behalf Of > >>Zach Dennis > > >>If you compile the shared library on your box and email it to > >>me, won't > >>it most likely be able to run fine on my box? Is there a > >>violation with > >>distributing binaries instead of making users compile their > >>own shared > >>libraries? > > > > > > No, that's perfectly fine. I'll email you the attached > code tonight > > off list. > > I think this would be worthwhile to have binaries released > also, or even > just a win32 installer which would install all of the > binaries, so you > dont have to commit each binary individually? > > Thanks Daniel, > > Zach Ideally we would have some sort of "installer builder" that we could run with the flick of a switch every time we put out a new release of a package. Shanko? What say you? Can this be automated? Dan From sdate at everestkc.net Wed May 4 21:45:44 2005 From: sdate at everestkc.net (Shashank Date) Date: Wed May 4 21:39:41 2005 Subject: [Win32utils-devel] win32-changejournal 0.2.0-1 compile error In-Reply-To: <8FE83020B9E1A248A182A9B0A7B76E73015E6B83@itomae2km07.AD.QINTRA.COM> References: <8FE83020B9E1A248A182A9B0A7B76E73015E6B83@itomae2km07.AD.QINTRA.COM> Message-ID: <42797AC8.2030004@everestkc.net> Berger, Daniel wrote: >>-----Original Message----- >>From: win32utils-devel-bounces@rubyforge.org >>[mailto:win32utils-devel-bounces@rubyforge.org] On Behalf Of >>Zach Dennis >>Sent: Wednesday, May 04, 2005 8:38 AM >>To: Development and ideas for win32utils projects >>Subject: Re: [Win32utils-devel] win32-changejournal 0.2.0-1 >>compile error >> >> >>Berger, Daniel wrote: >> >> >>>>-----Original Message----- >>>>From: win32utils-devel-bounces@rubyforge.org >>>>[mailto:win32utils-devel-bounces@rubyforge.org] On Behalf Of >>>>Zach Dennis >>>> >>>> >>>>If you compile the shared library on your box and email it to >>>>me, won't >>>>it most likely be able to run fine on my box? Is there a >>>>violation with >>>>distributing binaries instead of making users compile their >>>>own shared >>>>libraries? >>>> >>>> >>>No, that's perfectly fine. I'll email you the attached >>> >>> >>code tonight >> >> >>>off list. >>> >>> >>I think this would be worthwhile to have binaries released >>also, or even >>just a win32 installer which would install all of the >>binaries, so you >>dont have to commit each binary individually? >> >>Thanks Daniel, >> >>Zach >> >> > >Ideally we would have some sort of "installer builder" that we could run >with the flick of a switch every time we put out a new release of a >package. > >Shanko? What say you? Can this be automated? > > Yes ! We will have to follow certain conventions (naming, version info, unit-test behaviours etc) which we are mostly doing anyway. In fact, I have got it to a point where all I do is 1. run the following script to nmake all modules and create the installer 2. run the script below that to test all the modules All we have to do is add error handling and email notification and we are ready to rock'n roll :-) #------------------------ # makeall.rb #------------------------ Dir['win32-*'].each{|dir| Dir.chdir(dir){ puts puts dir+":\n"+"-"*25 puts `nmake /NOLOGO clean` puts `ruby extconf.rb` puts `nmake /NOLOGO` # puts `nmake /NOLOGO site-install` } } Dir.chdir("installer") { puts `c:\\nsis\\makensis /V3 win32utils.nsi` } #------------------------ # ----------------------- # testall.rb # ----------------------- Dir['win32-*'].each{|dir| Dir.chdir(dir){ Dir.chdir("test") { puts puts dir+":\n"+"-"*25 Dir["tc_*.rb"].each{|tst| puts tst puts `ruby #{tst}` } } } } Let me know what you all think. -- shanko From zdennis at mktec.com Thu May 5 18:24:35 2005 From: zdennis at mktec.com (Zach Dennis) Date: Thu May 5 18:18:12 2005 Subject: [Win32utils-devel] Ruby code to create junctions on NTFS volumes. In-Reply-To: <007701c52875$40d283f0$6401a8c0@IDEALISM> References: <007701c52875$40d283f0$6401a8c0@IDEALISM> Message-ID: <427A9D23.1010209@mktec.com> Timothy Byrd wrote: > > Here is some Ruby code for creating junctions on NTFS volumes. > > These are the main routines: > > Dir.junction?(dir) => true if dir is a junction > > Dir.reparse_target(dir) => returns the target of a junction, or dir > > Dir.create_junction(junctName, existingTarget) => creates a junctName > junction pointing to existingTarget > > (also used (Dan's?) GetLastError code and did some simple wide/narrow > character conversion) > Timothy, I was able to test your code out tonight. It is very very awesome! This is a big help! Thank you so much! Daniel, Could this code get put into win32-dir ? Zach From Daniel.Berger at qwest.com Fri May 6 10:22:27 2005 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Fri May 6 10:16:18 2005 Subject: [Win32utils-devel] Ruby code to create junctions on NTFS volumes. Message-ID: <8FE83020B9E1A248A182A9B0A7B76E73015E6B8F@itomae2km07.AD.QINTRA.COM> > -----Original Message----- > From: win32utils-devel-bounces@rubyforge.org > [mailto:win32utils-devel-bounces@rubyforge.org] On Behalf Of > Zach Dennis > Sent: Thursday, May 05, 2005 4:25 PM > To: Development and ideas for win32utils projects > Subject: Re: [Win32utils-devel] Ruby code to create junctions > on NTFS volumes. > > > Timothy Byrd wrote: > > > > Here is some Ruby code for creating junctions on NTFS volumes. > > > > These are the main routines: > > > > Dir.junction?(dir) => true if dir is a junction > > > > Dir.reparse_target(dir) => returns the target of a junction, or dir > > > > Dir.create_junction(junctName, existingTarget) => creates a > junctName > > junction pointing to existingTarget > > > > (also used (Dan's?) GetLastError code and did some simple > wide/narrow > > character conversion) > > > > Timothy, I was able to test your code out tonight. It is very very > awesome! This is a big help! Thank you so much! > > Daniel, > > Could this code get put into win32-dir ? > > Zach I plan to. :) Dan From djberg96 at yahoo.com Sat May 14 01:00:22 2005 From: djberg96 at yahoo.com (Daniel Berger) Date: Sat May 14 00:53:53 2005 Subject: [Win32utils-devel] Problems with custom service and webrick Message-ID: <20050514050022.40781.qmail@web50307.mail.yahoo.com> Hi all, Windows XP Pro Ruby 1.8.2 I'm having a couple of problems with the following service. The first issue is that the code in service_start doesn't seem to fire off. The second problem is that any attempt to do 'require "webrick"' within webrick_daemon.rb causes the service to fail on start. Any ideas? # webrickctl.rb ############################################### # webrickctl.rb # # Control script for the Webrick Service ############################################### require "optparse" require "win32/service" include Win32 OPTIONS = {} ARGV.options do |opts| opts.on("-d", "--delete", "Delete the service"){ OPTIONS[:delete] = true } opts.on("-s", "--start", "Start the service"){ OPTIONS[:start] = true } opts.on("-x", "--stop", "Stop the service"){ OPTIONS[:stop] = true } opts.on("-i", "--install","Install the service"){ OPTIONS[:install] = true } opts.on("-p", "--port", "Port that Webrick shall use"){ |port| OPTIONS[:port] = port } opts.on("-m", "--home", "Home directory for app"){ |home| OPTIONS[:home] = home } opts.on("-r", "--docroot", "Document root directory"){ |root| OPTIONS[:docroot] = root } opts.on("-t", "--path", "Path to Ruby executable"){ |path| OPTIONS[:path] = path + ' ' } opts.on("-h", "--help", "Show this help message"){ puts opts; exit } opts.parse! end unless OPTIONS[:start] || OPTIONS[:stop] || OPTIONS[:install] || OPTIONS[:delete] STDERR.puts "Must specify start, stop, delete or install" exit! end path = OPTIONS[:path] || 'C:\ruby\bin\ruby ' port = OPTIONS[:port] || 8080 root = OPTIONS[:docroot] || 'C:\www\webroot' home = OPTIONS[:home] || 'C:\Progra~1\RubyServices\Webrick' prog = home + '\webrick_daemon.rb ' prog += "-p #{port} -r #{root} -m #{home}" full_path = path + prog unless File.exists?(home + '\webrick_daemon.rb') STDERR.puts "Error: webrick_daemon.rb not found in #{home}. Exiting..." exit! end service_name = 'WebrickSvc' display_name = 'Webrick' # Install the service if OPTIONS[:install] svc = Service.new svc.create_service{ |s| s.service_name = service_name s.display_name = display_name s.binary_path_name = 'c:\ruby\bin\ruby c:\progra~1\rubyservices\webrick\webrick_daemon.rb' } svc.close puts "#{display_name} service installed" end # Start the service if OPTIONS[:start] started = false if Service.status(service_name).current_state == "running" puts "#{service_name} is already running" else Service.start(service_name) while started == false s = Service.status(service_name) started = true if s.current_state == "running" break if started == true puts "One moment, " + s.current_state sleep 1 end puts "#{display_name} service started" end end # Stop the service if OPTIONS[:stop] stopped = false if Service.status(service_name).current_state == "stopped" puts "#{service_name} already stopped" else Service.stop(service_name) while stopped == false s = Service.status(service_name) stopped = true if s.current_state == "stopped" break if stopped == true puts "One moment, " + s.current_state sleep 1 end puts "#{display_name} service stopped" end end # Delete the service. Stop it first. if OPTIONS[:delete] Service.stop(service_name) stopped = false while stopped == false s = Service.status(service_name) stopped = true if s.current_state == "stopped" break if stopped == true puts "One moment, status is still " + Service.status(service_name).current_state sleep 1 end Service.delete(service_name) puts "#{display_name} service deleted" end # END webrickctl.rb # webrick_daemon.rb require "win32/service" include Win32 class WebrickDaemon < Daemon def initialize @log = "C:\\log.txt" end def service_start File.open(@log,"a+"){ |fh| fh.puts "Service started" } end def service_main while state == RUNNING File.open(@log, "a+"){ |fh| fh.puts "Service running" } sleep 5 end end def service_stop File.open(@log, "a+"){ |fh| fh.puts "Service stopped" } exit end end web_daemon = WebrickDaemon.new web_daemon.mainloop __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From phasis at nownuri.net Sat May 14 02:36:11 2005 From: phasis at nownuri.net (Park Heesob) Date: Sat May 14 02:29:44 2005 Subject: [Win32utils-devel] Problems with custom service and webrick References: <20050514050022.40781.qmail@web50307.mail.yahoo.com> Message-ID: <007f01c5584f$3845b400$f70d5bd2@2xnm9896kmqn5b9> Hi Dan, ----- Original Message ----- From: "Daniel Berger" To: Sent: Saturday, May 14, 2005 2:00 PM Subject: [Win32utils-devel] Problems with custom service and webrick > Hi all, > > Windows XP Pro > Ruby 1.8.2 > > I'm having a couple of problems with the following > service. The first issue is that the code in > service_start doesn't seem to fire off. The second > problem is that any attempt to do 'require "webrick"' > within webrick_daemon.rb causes the service to fail on > start. > > Any ideas? > First, "service_start" is not defined as event handler from the first. :) If you want service_start, call it in service_main like this: def service_main service_start while state == RUNNING File.open(@log, "a+"){ |fh| fh.puts "Service running" } sleep 5 end end Second, try load webrick befre loading win32/service like this: require "webrick.rb" require "win32/service" Regards, Park Heesob From djberg96 at gmail.com Sat May 14 09:11:33 2005 From: djberg96 at gmail.com (Daniel Berger) Date: Sat May 14 09:05:03 2005 Subject: [Win32utils-devel] Problems with custom service and webrick In-Reply-To: <007f01c5584f$3845b400$f70d5bd2@2xnm9896kmqn5b9> References: <20050514050022.40781.qmail@web50307.mail.yahoo.com> <007f01c5584f$3845b400$f70d5bd2@2xnm9896kmqn5b9> Message-ID: <6037b70c0505140611503e1a66@mail.gmail.com> On 5/14/05, Park Heesob wrote: > Hi Dan, > First, "service_start" is not defined as event handler from the first. :) Gah! I was too tired while working on this! Sorry. > Second, try load webrick befre loading win32/service like this: > require "webrick.rb" > require "win32/service" Hm...why should that matter? Dan From phasis at nownuri.net Sat May 14 10:02:56 2005 From: phasis at nownuri.net (Park Heesob) Date: Sat May 14 09:56:27 2005 Subject: [Win32utils-devel] Problems with custom service and webrick References: <20050514050022.40781.qmail@web50307.mail.yahoo.com><007f01c5584f$3845b400$f70d5bd2@2xnm9896kmqn5b9> <6037b70c0505140611503e1a66@mail.gmail.com> Message-ID: <006d01c5588d$a10e2920$e30d5bd2@2xnm9896kmqn5b9> Hi, ----- Original Message ----- From: "Daniel Berger" To: "Development and ideas for win32utils projects" Sent: Saturday, May 14, 2005 10:11 PM Subject: Re: [Win32utils-devel] Problems with custom service and webrick > On 5/14/05, Park Heesob wrote: >> Hi Dan, > >> First, "service_start" is not defined as event handler from the first. :) > > Gah! I was too tired while working on this! Sorry. > >> Second, try load webrick befre loading win32/service like this: >> require "webrick.rb" >> require "win32/service" > > Hm...why should that matter? > Don't ask me why :) Just trial and error. I guess it is related with Hash initialization. Regards, Park Heesob From djberg96 at gmail.com Mon May 16 11:26:05 2005 From: djberg96 at gmail.com (Daniel Berger) Date: Mon May 16 11:19:34 2005 Subject: [Win32utils-devel] Problems with custom service and webrick In-Reply-To: <011601c55925$e230acf0$f10d5bd2@2xnm9896kmqn5b9> References: <20050514050022.40781.qmail@web50307.mail.yahoo.com> <007f01c5584f$3845b400$f70d5bd2@2xnm9896kmqn5b9> <6037b70c0505140611503e1a66@mail.gmail.com> <006d01c5588d$a10e2920$e30d5bd2@2xnm9896kmqn5b9> <6037b70c05051414336c94cd23@mail.gmail.com> <011601c55925$e230acf0$f10d5bd2@2xnm9896kmqn5b9> Message-ID: <6037b70c0505160826c93346c@mail.gmail.com> On 5/15/05, Park Heesob wrote: > Hi, > > > > If you think you could hunt down the cause of that and fix it, that > > would be great. :) > > > I found something :) > > The error is due to line 1576 of service.c: > EventHookHash = rb_hash_new(); > > I guess the EventHookHash is freed during loading 'webrick' or other libraries. > > So, the EventHookHash initialization must be located at Daemon initialization(daemon_allocate function) like this: > static VALUE daemon_allocate(VALUE klass){ > EventHookHash = rb_hash_new(); > return Data_Wrap_Struct(klass, 0, 0, 0); > } > > In short words, move line 1576 to line 165 of service.c. > > Regards, > > Park Heesob Thank you very much! Dan PS - I meant to CC the devel list before and forgot. From Daniel.Berger at Qwest.com Mon May 16 13:01:25 2005 From: Daniel.Berger at Qwest.com (Berger, Daniel) Date: Mon May 16 12:54:56 2005 Subject: [Win32utils-devel] Add backtrace info in win32-service Message-ID: <8FE83020B9E1A248A182A9B0A7B76E73015E6BB9@itomae2km07.AD.QINTRA.COM> Hi all, I think it would greatly aid service debugging if we added Ruby's backtrace information if a Service.start fails. This would be lines 1251-1255: if(NULL == hSCService){ strcpy(error,ErrorDescription(GetLastError())); CloseServiceHandle(hSCManager); rb_raise(cServiceError,error); } I'm not sure exactly how to do it, though. Or do you think it should just be left up to developers to wrap Daemon.mainloop on their own? Regards, Dan From Daniel.Berger at qwest.com Mon May 16 14:35:13 2005 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Mon May 16 14:28:41 2005 Subject: [Win32utils-devel] ruby services Message-ID: <8FE83020B9E1A248A182A9B0A7B76E73015E6BBA@itomae2km07.AD.QINTRA.COM> Hi all, I've started a new project in the Win32 Utils CVS repository called "ruby-services" (in the toplevel directory, not under win32utils). The goal is to provide services for some of the more popular Ruby server programs out there. For the first service, I've wrapped WEBrick's HTTPServer. However, I would like to add other popular servers as well. Things like Instiki or Ruwiki. I also wouldn't mind seeing some custom built services, such as an XML-RPC service that folks could use to remotely admin Windows boxes from a Unix machine. Or whatever your minds can come up with. If you are interested in contributing a service, let me know and I'll give you commit access. Please take a look at the files included under ruby-services/webrick to see how I did things and use that as a baseline. You should create each service under its own directory, e.g. if you want to create a "foo" service, then it should go under ruby-services/foo. I'll be releasing the first version of ruby-services shortly. Regards, Dan From zdennis at mktec.com Wed May 18 17:52:28 2005 From: zdennis at mktec.com (Zach Dennis) Date: Wed May 18 17:45:42 2005 Subject: [Win32utils-devel] Next release of win32-dir? Message-ID: <428BB91C.2000909@mktec.com> Dan, Do you know when the next release of win32-dir is going to be available. I really would like to rely on it for the junction capability that Timothy Byrd posted. =) Thanks, Zach From zdennis at mktec.com Wed May 18 19:16:03 2005 From: zdennis at mktec.com (Zach Dennis) Date: Wed May 18 19:09:17 2005 Subject: [Win32utils-devel] Networking functionality? Message-ID: <428BCCB3.7010104@mktec.com> Is there (if not, can we get) the functionality to query for workstations in the local workgroup or domain? Zach From Daniel.Berger at qwest.com Thu May 19 10:25:08 2005 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Thu May 19 10:18:33 2005 Subject: [Win32utils-devel] Networking functionality? Message-ID: <8FE83020B9E1A248A182A9B0A7B76E73015E6BC8@itomae2km07.AD.QINTRA.COM> > -----Original Message----- > From: win32utils-devel-bounces@rubyforge.org > [mailto:win32utils-devel-bounces@rubyforge.org] On Behalf Of > Zach Dennis > Sent: Wednesday, May 18, 2005 5:16 PM > To: Development and ideas for win32utils projects > Subject: [Win32utils-devel] Networking functionality? > > > Is there (if not, can we get) the functionality to query for > workstations in the local workgroup or domain? > > Zach There's probably a way using win32ole + WMI. I'm not sure which of the classes you would use, though. I can see how to get domain information and host information, but I'm not sure how to query for hosts on a given domain. Regards, Dan From Daniel.Berger at qwest.com Thu May 19 10:26:44 2005 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Thu May 19 10:20:06 2005 Subject: [Win32utils-devel] Next release of win32-dir? Message-ID: <8FE83020B9E1A248A182A9B0A7B76E73015E6BC9@itomae2km07.AD.QINTRA.COM> > -----Original Message----- > From: win32utils-devel-bounces@rubyforge.org > [mailto:win32utils-devel-bounces@rubyforge.org] On Behalf Of > Zach Dennis > Sent: Wednesday, May 18, 2005 3:52 PM > To: Development and ideas for win32utils projects > Subject: [Win32utils-devel] Next release of win32-dir? > > > Dan, > > Do you know when the next release of win32-dir is going to be > available. > I really would like to rely on it for the junction capability that > Timothy Byrd posted. =) > > Thanks, > > Zach I keep putting it off and working on other stuff. I'm still waffling on pure Ruby versus C, actually. I know which one you would prefer. :) I'll declare Memorial Day weekend as the release date to force myself to put *something* out by then. :) Dan From phasis at nownuri.net Thu May 26 09:58:30 2005 From: phasis at nownuri.net (Park Heesob) Date: Thu May 26 09:51:40 2005 Subject: [Win32utils-devel] Networking functionality? References: <8FE83020B9E1A248A182A9B0A7B76E73015E6BC8@itomae2km07.AD.QINTRA.COM> Message-ID: <00c301c561fa$ff5c8960$eb0d5bd2@2xnm9896kmqn5b9> Hi, ----- Original Message ----- From: "Berger, Daniel" To: "Development and ideas for win32utils projects" Sent: Thursday, May 19, 2005 11:25 PM Subject: RE: [Win32utils-devel] Networking functionality? >> -----Original Message----- >> From: win32utils-devel-bounces@rubyforge.org >> [mailto:win32utils-devel-bounces@rubyforge.org] On Behalf Of >> Zach Dennis >> Sent: Wednesday, May 18, 2005 5:16 PM >> To: Development and ideas for win32utils projects >> Subject: [Win32utils-devel] Networking functionality? >> >> >> Is there (if not, can we get) the functionality to query for >> workstations in the local workgroup or domain? >> >> Zach > > There's probably a way using win32ole + WMI. I'm not sure which of the > classes you would use, though. I can see how to get domain information > and host information, but I'm not sure how to query for hosts on a given > domain. > I made up simple code for network browsing with Win32API. Try and make it more useful. Regards, Park Heesob =================================================== require "Win32API" NetServerEnum = Win32API.new('netapi32', 'NetServerEnum', 'PLPLPPLPP', 'L') Mbstowcs = Win32API.new('msvcrt', 'mbstowcs','PPL','L') Wcstombs = Win32API.new('msvcrt', 'wcstombs','PPL','L') Memcpy = Win32API.new('msvcrt', 'memcpy', 'PLL', 'P') Wcslen = Win32API.new('msvcrt', 'wcslen', 'P', 'L') WideCharToMultiByte = Win32API.new('kernel32', 'WideCharToMultiByte', 'LLPLPLPP', 'L') ServerInfo = Struct.new( "ServerInfo", :platform_id, :name, :version_major, :version_minor, :type, :comment ) SERVER_INFO_101_SIZE = 24 CP_ACP = 0 MAX_PREFERRED_LENGTH = -1 SV_TYPE_WORKSTATION = 0x00000001 SV_TYPE_SERVER = 0x00000002 SV_TYPE_SQLSERVER = 0x00000004 SV_TYPE_DOMAIN_CTRL = 0x00000008 SV_TYPE_DOMAIN_BAKCTRL = 0x00000010 SV_TYPE_TIME_SOURCE = 0x00000020 SV_TYPE_AFP = 0x00000040 SV_TYPE_NOVELL = 0x00000080 SV_TYPE_DOMAIN_MEMBER = 0x00000100 SV_TYPE_PRINTQ_SERVER = 0x00000200 SV_TYPE_DIALIN_SERVER = 0x00000400 SV_TYPE_XENIX_SERVER = 0x00000800 SV_TYPE_SERVER_UNIX = SV_TYPE_XENIX_SERVER SV_TYPE_NT = 0x00001000 SV_TYPE_WFW = 0x00002000 SV_TYPE_SERVER_MFPN = 0x00004000 SV_TYPE_SERVER_NT = 0x00008000 SV_TYPE_POTENTIAL_BROWSER = 0x00010000 SV_TYPE_BACKUP_BROWSER = 0x00020000 SV_TYPE_MASTER_BROWSER = 0x00040000 SV_TYPE_DOMAIN_MASTER = 0x00080000 SV_TYPE_SERVER_OSF = 0x00100000 SV_TYPE_SERVER_VMS = 0x00200000 SV_TYPE_WINDOWS = 0x00400000 SV_TYPE_DFS = 0x00800000 SV_TYPE_CLUSTER_NT = 0x01000000 SV_TYPE_DCE = 0x10000000 SV_TYPE_ALTERNATE_XPORT = 0x20000000 SV_TYPE_LOCAL_LIST_ONLY = 0x40000000 SV_TYPE_DOMAIN_ENUM = 0x80000000 SV_TYPE_ALL = 0xFFFFFFFF PLATFORM_ID_DOS = 300 PLATFORM_ID_OS2 = 400 PLATFORM_ID_NT = 500 PLATFORM_ID_OSF = 600 PLATFORM_ID_VMS = 700 def getserverinfo(domain=nil) if domain pdomain = "\0" * 512 Mbstowcs.Call(pdomain, domain + "\0", 512) domain = pdomain.strip + "\0\0" end pbufptr = "\0" * 4 pentriesread = "\0" * 4 ptotalentries = "\0" * 4 type = domain ? SV_TYPE_SERVER : SV_TYPE_DOMAIN_ENUM ret = NetServerEnum.Call(nil,101,pbufptr,MAX_PREFERRED_LENGTH,pentriesread,ptotalentries,type,domain,nil) if 0 != ret puts "Failed:#{ret}" nil end entriesread = pentriesread.unpack("L")[0] bufptr = "\0" * (SERVER_INFO_101_SIZE*entriesread) Memcpy.Call(bufptr,pbufptr.unpack("L")[0],SERVER_INFO_101_SIZE*entriesread) server_info = [] entriesread.times {|i| serverinfo = ServerInfo.new(*bufptr[i*SERVER_INFO_101_SIZE .. (i+1)*SERVER_INFO_101_SIZE].unpack("LLLLLL")) case serverinfo.platform_id when PLATFORM_ID_DOS serverinfo.platform_id = "DOS" when PLATFORM_ID_OS2 serverinfo.platform_id = "OS2" when PLATFORM_ID_NT serverinfo.platform_id = "NT" when PLATFORM_ID_OSF serverinfo.platform_id = "OSF" when PLATFORM_ID_VMS serverinfo.platform_id = "VMS" else serverinfo.platform_id = "UNKNOWN" end type = [] type.push("WORKSTATION" ) if serverinfo.type & SV_TYPE_WORKSTATION != 0 type.push("SERVER" ) if serverinfo.type & SV_TYPE_SERVER != 0 type.push("SQLSERVER" ) if serverinfo.type & SV_TYPE_SQLSERVER != 0 type.push("DOMAIN_CTRL" ) if serverinfo.type & SV_TYPE_DOMAIN_CTRL != 0 type.push("DOMAIN_BAKCTRL" ) if serverinfo.type & SV_TYPE_DOMAIN_BAKCTRL != 0 type.push("TIME_SOURCE" ) if serverinfo.type & SV_TYPE_TIME_SOURCE != 0 type.push("AFP" ) if serverinfo.type & SV_TYPE_AFP != 0 type.push("NOVELL" ) if serverinfo.type & SV_TYPE_NOVELL != 0 type.push("DOMAIN_MEMBER" ) if serverinfo.type & SV_TYPE_DOMAIN_MEMBER != 0 type.push("PRINTQ_SERVER" ) if serverinfo.type & SV_TYPE_PRINTQ_SERVER != 0 type.push("DIALIN_SERVER" ) if serverinfo.type & SV_TYPE_DIALIN_SERVER != 0 type.push("XENIX_SERVER" ) if serverinfo.type & SV_TYPE_XENIX_SERVER != 0 type.push("SERVER_UNIX" ) if serverinfo.type & SV_TYPE_SERVER_UNIX != 0 type.push("NT" ) if serverinfo.type & SV_TYPE_NT != 0 type.push("WFW" ) if serverinfo.type & SV_TYPE_WFW != 0 type.push("SERVER_MFPN" ) if serverinfo.type & SV_TYPE_SERVER_MFPN != 0 type.push("SERVER_NT" ) if serverinfo.type & SV_TYPE_SERVER_NT != 0 type.push("POTENTIAL_BROWSER") if serverinfo.type & SV_TYPE_POTENTIAL_BROWSER != 0 type.push("BACKUP_BROWSER" ) if serverinfo.type & SV_TYPE_BACKUP_BROWSER != 0 type.push("MASTER_BROWSER" ) if serverinfo.type & SV_TYPE_MASTER_BROWSER != 0 type.push("DOMAIN_MASTER" ) if serverinfo.type & SV_TYPE_DOMAIN_MASTER != 0 type.push("SERVER_OSF" ) if serverinfo.type & SV_TYPE_SERVER_OSF != 0 type.push("SERVER_VMS" ) if serverinfo.type & SV_TYPE_SERVER_VMS != 0 type.push("WINDOWS" ) if serverinfo.type & SV_TYPE_WINDOWS != 0 type.push("DFS" ) if serverinfo.type & SV_TYPE_DFS != 0 type.push("CLUSTER_NT" ) if serverinfo.type & SV_TYPE_CLUSTER_NT != 0 type.push("DCE" ) if serverinfo.type & SV_TYPE_DCE != 0 type.push("ALTERNATE_XPORT" ) if serverinfo.type & SV_TYPE_ALTERNATE_XPORT != 0 serverinfo.type = type.join(",") name = "\0" * 512 WideCharToMultiByte.Call(CP_ACP,0,serverinfo.name,-1,name,512,nil,nil) serverinfo.name = name.strip comment = "\0" * 512 WideCharToMultiByte.Call(CP_ACP,0,serverinfo.comment,-1,comment,512,nil,nil) serverinfo.comment = comment.strip server_info.push(serverinfo) } server_info end puts "\nDOMAIN LIST" getserverinfo.each {|s| puts "PlatForm:#{s.platform_id}\tName:#{s.name}\tVersion:#{s.version_major}.#{s.version_minor}\n\tType:#{s.type}" } puts "\nCOMPUTER LIST" getserverinfo("WORKGROUP").each {|s| puts "PlatForm:#{s.platform_id}\tName:#{s.name}\tVersion:#{s.version_major}.#{s.version_minor}\n\tType:#{s.type}\tComment:#{s.comment}" } puts "\nDOMAIN-COMPUTER LIST" # net view style output getserverinfo.each {|ss| puts "\nDOMAIN: #{ss.name}" getserverinfo(ss.name).each {|s| puts "\t\\\\" + s.name + "\t" + s.comment } } From zdennis at mktec.com Thu May 26 22:09:17 2005 From: zdennis at mktec.com (Zach Dennis) Date: Thu May 26 22:01:46 2005 Subject: [Win32utils-devel] Re: Open3.popen3 bug In-Reply-To: <8FE83020B9E1A248A182A9B0A7B76E7358B2A2@itomae2km07.AD.QINTRA.COM> References: <8FE83020B9E1A248A182A9B0A7B76E7358B2A2@itomae2km07.AD.QINTRA.COM> Message-ID: <4296814D.5080600@mktec.com> Berger, Daniel wrote: > >>-----Original Message----- >>From: win32utils-devel-bounces@rubyforge.org >>[mailto:win32utils-devel-bounces@rubyforge.org] On Behalf Of >>Nathaniel Talbott >>Sent: Wednesday, March 02, 2005 9:59 AM >>To: Development and ideas for win32utils projects >>Subject: Re: [Win32utils-devel] Re: Open3.popen3 bug >> >> >>On Tue, 1 Mar 2005 16:21:16 -0800 (PST), Daniel Berger >> wrote: >> >> >>>I cannot duplicate this error with MS V++ 7.0 on >>>Windows XP Pro, SP2. Can you please provide more information, >>>including your platform, SP number and compiler? >> >>Sure. My platform is Windows XP Pro, SP2. Ruby is an older >>version of the One-Click installer (ruby 1.8.2 (2004-06-29) >>[i386-mswin32]). I'm using the open3.so binary from the 0.0.2 >>win32-utils installer. >> >>It may be that I just need a Ruby upgrade, which is something >>that I know I need to get around to eventually. > > > Yes, I definitely recommend upgrading. If nothing else, the Win32OLE > library has some crucial bug fixes in the later release that I don't > think are in your version. > > Please upgrade and let us know if that fixes the problem. > I get the same problem that Nathaniel Talbott described on my Windows 2000, SP4 box with ruby 1.8.2 (2004-12-25) [i386-mswin32]. I have downloaded and installed latest open3.so file also, and compiled from source using VC6++. My guess is a VC version descrepancy? Zach From ntalbott at gmail.com Tue May 31 08:55:44 2005 From: ntalbott at gmail.com (Nathaniel Talbott) Date: Tue May 31 08:48:43 2005 Subject: [Win32utils-devel] Re: Open3.popen3 bug In-Reply-To: <4296814D.5080600@mktec.com> References: <8FE83020B9E1A248A182A9B0A7B76E7358B2A2@itomae2km07.AD.QINTRA.COM> <4296814D.5080600@mktec.com> Message-ID: On 5/26/05, Zach Dennis wrote: > I get the same problem that Nathaniel Talbott described on my Windows > 2000, SP4 box with ruby 1.8.2 (2004-12-25) [i386-mswin32]. > > I have downloaded and installed latest open3.so file also, and compiled > from source using VC6++. My guess is a VC version descrepancy? Could be, since I ended up recompiling everything (including Ruby) using VC7, which fixed it for me. -- Nathaniel <:((><