Test/win32ole

[email protected]$G$9!%e(B

e$B!!e(Bmswin32 e$B$G$Ne(B test/win32ole
e$B$,<B9TCf$K0[>o=*N;$9$k$N$G$9$,!$$I$J$+e(B
e$B$??4Ev$?$j$O$"$j$^$9$G$7$g$&$+!%e(B

test_invokeverb(TestInvokeVerb): E
test_ole_methods(TestMyDict): .
from c:/ko1/src/ruby/trunk/lib/test/unit/testcase.rb:75:in `run’
from c:/ko1/src/ruby/trunk/lib/test/unit/ui/console/testrunner.rb:67:in
test_on_event3(TestWIN32OLE_EVENT): .
test_initialize(TestWIN32OLE_METHOD): .
test_size_params(TestWIN32OLE_METHOD): .
test_retval?(TestWIN32OLE_PARAM): .
test_minor_version(TestWIN32OLE_TYPE): .
test_name(TestWIN32OLE_TYPE): .
test_ole_methods(TestWIN32OLE_TYPE): .
test_ole_type(TestWIN32OLE_TYPE): .
test_ole_typelib(TestWIN32OLE_TYPE): .
test_progid(TestWIN32OLE_TYPE):

e$B!!:!=h$G;$^$j$^$9!%%G%P%C%,!Je(BVCe$B!K$Oe(B win32ole.c e$B$Ne(B
2019 e$B9TL$Ne(B
atof() e$B$G;
$^[email protected]$C$F$k$s$G$9$,!%e(B

e$B!!<+J,$N4D6-$,e(B Vista [email protected]$+$i$+$b$7$l$^$;$s!%e(BVC 8
e$B$G$9!Je(Bruby 1.9.0
(2007-08-21 patchlevel 0)
[i386-mswin32_80]e$B!K!%B>$KI,MW$J>pJs$,$"$le(B
e$B$P$4;XE&$/[email protected]$5$$!%e(B

e$B=uED$G$9!#e(B

In message “[ruby-dev:31576] test/win32ole”
on 07/08/22, SASADA Koichi [email protected] writes:

e$B!!e(Bmswin32 e$B$G$Ne(B test/win32ole e$B$,<B9TCf$K0[>o=*N;$9$k$N$G$9$,!$$I$J$+e(B
e$B$??4Ev$?$j$O$"$j$^$9$G$7$g$&$+!%e(B

(snip)

test_progid(TestWIN32OLE_TYPE):

e$B!!:!=h$G;$^$j$^$9!%%G%P%C%,!Je(BVCe$B!K$Oe(B win32ole.c e$B$Ne(B 2019 e$B9TL$Ne(B
atof() e$B$G;
$^[email protected]$C$F$k$s$G$9$,!%e(B

e$B!!<+J,$N4D6-$,e(B Vista [email protected]$+$i$+$b$7$l$^$;$s!%e(BVC 8 e$B$G$9!Je(Bruby 1.9.0
(2007-08-21 patchlevel 0) [i386-mswin32_80]e$B!K!%B>$KI,MW$J>pJs$,$"$le(B
e$B$P$4;XE&$/[email protected]$5$$!%e(B

e$B<j85$Ke(BVistae$B$N4D6-$,L5$$$N$G!"$5$C$Q$j$o$+$i$J$$$N$G$9$,e(B…e$B!#e(B

Windows XP e$B$Ge(B [email protected]$H:F8=$7$^$;$s$G$7$?!#e(B(ruby 1.9.0
(2007-08-22 patchlevel 0) [i386-mswin32_71])

atofe$B$N$"$?$j$C$F!"%l%8%9%H%j$N>pJs$rFI$s$G$$$k$s$G$9$1$I!"e(B
e$B%l%8%9%H%j$N>pJse(B([email protected](B)e$B$,e(BVistae$B$GJQ$o$C$F$7$^$C$?$N$G$7$g$&$+!)e(B
e$B%l%8%9%H%j$N>pJs$H$7$Fe(B

HKEY_CLASSES_ROOT\TypeLib{CLSID}\2.0

e$B$H$$$&$h$&$J>pJs$,3JG<$5$l$F$$$k$3$H$rA[Dj$7$F$$$^$9!#e(B
Vistae$B$G$O$I$&$J$C$F$$$k$+$o$+$j$^$9$+!)e(B
(e$B<B:]$Ne(BCLSIDe$B$O!"e(B{0000001-0000-0000-0000-000000000001}e$B$_$?$$$K$J$C$F$^$9!#e(B)

atofe$B$N$"$?$j$O!"e(BHKEY_CLASSES_ROOTe$BFb$Ne(BTypeLibe$BFb$Ne(BCLSIDe$BFb$Ne(B
Version(e$B>e$NNc$G$$$&$He(B2.0)e$B$NCf$N0lHVBg$-$$$N$rC5$9=hM}$r$7$F$$$^$9!#e(B

e$B$"$H!"e(Bwin32ole.ce$B$Ne(Breg_enum_keye$B4X?t$Ge(B
char buf[BUFSIZ]e$B!(e(B
[email protected]@$7$F$k$s$G$9$1$I!"e(BBUFSIZe$B$,e(BVistae$B!"e([email protected]$H$$$/$D$+$o$+$j$^$9$+!)e(B

[email protected]}$9$k$H!"$H$j$"$($:!"CN$j$?$$>pJs$H$7$F<!$Ne(B2e$B$D$r$*4j$$$G$-$^$9$+!)e(B
(1) Vistae$B$N%l%8%9%H%j>pJs$,e(B
HKEY_CLASSES_ROOT\TypeLib{CLSID}\2.0
e$B$N$h$&[email protected]$K$J$C$F$$$k$N$+$I$&$+!)e(B
(2) BUFSIZe$B$NCMe(B

Vistae$B$O$^[email protected]?($C$?$3$H$,$J$$e(B

e$B=uED2m5*e(B

[email protected]$G$9!%e(B

Masaki S. wrote:

[email protected]}$9$k$H!"$H$j$"$($:!"CN$j$?$$>pJs$H$7$F<!$Ne(B2e$B$D$r$*4j$$$G$-$^$9$+!)e(B
(1) Vistae$B$N%l%8%9%H%j>pJs$,e(B
HKEY_CLASSES_ROOT\TypeLib{CLSID}\2.0
e$B$N$h$&[email protected]$K$J$C$F$$$k$N$+$I$&$+!)e(B

[email protected]!<!<$C$HD/$a$F$_$?$H$3$m!$e(B"a.0"
e$B$H$$$&$N$,$"$j$^$7$?!%$3$l$O$I$&e(B
e$B$G$7$g$&$+!%e(B

(2) BUFSIZe$B$NCMe(B

t.c(1) : error C2065: ‘BUFSIZ’ : e$BDj5A$5$l$F$$$J$$<1JL;R$G$9!#e(B

e$B!!$J$s$+I,MW$J%X%C%@$H$+$"$j$^$9!)e(B

e$B$3$s$K$A$O!"$J$+$`$ie(B(e$B$&e(B)e$B$G$9!#e(B

In message “[ruby-dev:31597] Re: test/win32ole”
on Aug.22,2007 21:58:57, [email protected] wrote:
| > (2) BUFSIZe$B$NCMe(B
|
| > t.c(1) : error C2065: ‘BUFSIZ’ : e$BDj5A$5$l$F$$$J$$<1JL;R$G$9!#e(B
|
| e$B!!$J$s$+I,MW$J%X%C%@$H$+$"$j$^$9!)e(B

BUFSIZe$B$Oe(Bstdio.he$B$GDj5A$5$l$k%^%/%m$G$9!#e(B
(JIS X 3010-1993 7.9.1)

VC8e$B$G$Oe(B512e$B$C$9$M!#[email protected]$+$iJQ$o$C$F$^$;$s!#e(B

e$B$=$l$G$O!#e(B

e$B=uED$G$9!#e(B

In message “[ruby-dev:31597] Re: test/win32ole”
on 07/08/22, SASADA Koichi [email protected] writes:

Masaki S. wrote:

[email protected]}$9$k$H!"$H$j$"$($:!"CN$j$?$$>pJs$H$7$F<!$Ne(B2e$B$D$r$*4j$$$G$-$^$9$+!)e(B
(1) Vistae$B$N%l%8%9%H%j>pJs$,e(B
HKEY_CLASSES_ROOT\TypeLib{CLSID}\2.0
e$B$N$h$&[email protected]$K$J$C$F$$$k$N$+$I$&$+!)e(B

[email protected]!<!<$C$HD/$a$F$_$?$H$3$m!$e(B"a.0" e$B$H$$$&$N$,$"$j$^$7$?!%$3$l$O$I$&e(B
e$B$G$7$g$&$+!%e(B

e$B$H$j$"$($:!“e(BHKEY_CLASSES_ROOT e$B$H$+e(B
TypeLibe$B$H$+$O$”$k$C$F$3$H$G$9$M!#e(B
a.0e$B$H$$$&$N$OA[Dj$7$F$^$;$s$G$7$?!#e(B
e$B$G$b!“e(Batof(“a.0”)e$B$G0[>o=*N;$9$k$H$O;W$($J$$$7e(B…e$B!#e(B
e$B$R$g$C$H$7$?$iL5Cc6lCc7e?t$NB?$$e(B(BUFSIZe$B$r>e2s$k$/$i$$$Ne(B)
Versione$B$,$”$C$?$j!"A4A30c$&>pJs$,F~$C$F$$$?$j$9$k$N$+$He(B
e$BA[A|$7$F$$$?$N$G$9$,e(B…e$B!#e(B

(2) BUFSIZe$B$NCMe(B

t.c(1) : error C2065: ‘BUFSIZ’ : e$BDj5A$5$l$F$$$J$$<1JL;R$G$9!#e(B

e$B!!$J$s$+I,MW$J%X%C%@$H$+$"$j$^$9!)e(B

#include <stdio.h>
e$B$7$F$b$i$($^$9$+!)e(B

e$B$5$C$Q$j$o$+$i$J$$e(B…e$B!#e(B

e$B=uED2m5*e(B

artone$B$G$9!#e(B

e$B$(!<$H!"e(B

test_progid(TestWIN32OLE_TYPE):

e$B!!:!=h$G;$^$j$^$9!%%G%P%C%,!Je(BVCe$B!K$Oe(B win32ole.c e$B$Ne(B 2019 e$B9TL$Ne(B
atof() e$B$G;
$^[email protected]$C$F$k$s$G$9$,!%e(B
e$B$H$$$&$3$H$J$N$G!“JL$N$H$3$m$G%9%?%C%/$r2u$7$F!”$J$s$+$*$+$7$/$J$C$F$$$ke(B
e$B!Je(Btest_on_evente$B$b!“e(Btest_progide$B$HF1$8$/!”$=$N1F6A!K$N$G$O$J$$$G$7$g$&$+!#e(B
e$B$"$H!"$3$NLdBj$H$O4X78$J$5$=$&$G$9$,!"e(B1.8.6e$B$N%=!<%9$r8+$F5$IU$$$?$N$O!"e(B
reg_get_val(hkey, subkey)
HKEY hkey;
const char *subkey;
{
char buf[BUFSIZ];
LONG size_buf = sizeof(buf);
LONG err = RegQueryValue(hkey, subkey, buf, &size_buf);
if (err == ERROR_SUCCESS) {
return rb_str_new2(buf);
}
return Qnil;
}
e$B$O$^$:$=$&$G$9!#e(B
e$B$H$$$&$N$O!"e(BRegQueryValuee$B$Ne([email protected]@$r4]!90zMQ$7$^$9$,!"e(B

If the data has the REG_SZ, REG_MULTI_SZ or REG_EXPAND_SZ type, the
string
may not have been stored with the proper null-terminating characters.
For example, if the string data is 12 characters and the buffer is
larger than that, the function will add the null character and the size
of the data returned is 13sizeof(TCHAR) bytes. However, if the buffer
is 12
sizeof(TCHAR) bytes, the data is stored successfully but does not
include a terminating null.

e$B$G!“J8;zNsD9$,$T$C$?$je(BBUFSIZe$B$N>l9g!”=C<e([email protected]_Dj$;$:$K!"e(BERROR_SUCCESS
e$B$,JV$k$H$J$C$F$$$^$9!#$=$N0lJ}$G!"e(Bnulle$B$r%3%T!<$7$?>l9g$K$O!"e(B&size_bufe$B$Ke(B
e$B$Oe(Bnulle$B$NJ,$bF~$k$N$G!"e(Breturn rb_str_new(buf, size_buf);
e$B$H$9$k$o$1$K$be(B
e$B$$$+$J$$$G$9$M!#e(B
char buf[BUFSIZ + 1];
buf[BUFSIZ] = 0;
e$B$H$7$F$
$$$F!"e(Brb_str_new2(buf);
e$B$+$J!#e(B


arton [email protected]

[email protected]$G$9!%e(B

Masaki S. wrote:

e$B$H$j$"$($:!“e(BHKEY_CLASSES_ROOT e$B$H$+e(B TypeLibe$B$H$+$O$”$k$C$F$3$H$G$9$M!#e(B
a.0e$B$H$$$&$N$OA[Dj$7$F$^$;$s$G$7$?!#e(B
e$B$G$b!“e(Batof(“a.0”)e$B$G0[>o=*N;$9$k$H$O;W$($J$$$7e(B…e$B!#e(B
e$B$R$g$C$H$7$?$iL5Cc6lCc7e?t$NB?$$e(B(BUFSIZe$B$r>e2s$k$/$i$$$Ne(B)
Versione$B$,$”$C$?$j!"A4A30c$&>pJs$,F~$C$F$$$?$j$9$k$N$+$He(B
e$BA[A|$7$F$$$?$N$G$9$,e(B…e$B!#e(B

e$B!!$=$s$JJQ$J$N$O$J$$$h$&$K;W$$$^$9!%e(B

e$B!!:#EY!$5!2q$r:n$C$F0l=o$K%G%P%C%0$7$^$7$g$&$+!%e(B

e$B=uED$G$9!#e(B

In message “[ruby-dev:31610] Re: test/win32ole”
on 07/08/23, SASADA Koichi [email protected] writes:

e$B$R$g$C$H$7$?$iL5Cc6lCc7e?t$NB?$$e(B(BUFSIZe$B$r>e2s$k$/$i$$$Ne(B)
Versione$B$,$"$C$?$j!"A4A30c$&>pJs$,F~$C$F$$$?$j$9$k$N$+$He(B
e$BA[A|$7$F$$$?$N$G$9$,e(B…e$B!#e(B

e$B!!$=$s$JJQ$J$N$O$J$$$h$&$K;W$$$^$9!%e(B

e$B$=$&$G$9$+!#$h$/$$?$ie(B progide$B$N%F%9%H$G;$^$C$F$$$k$_$?$$e(B
e$B$G$9$1$I!"e(Batofe$B$N=hM}$O!"e(BWIN32OLE_TYPE#progide$B$G$Oe(B
e$B8F$P$l$J$$$s$G$9!#e(B
WIN32OLE_EVENT.newe$B$NCf$G8F$P$l$F$k$N$G!"e(Btest_win32ole_type.rb
e$B$Ne(Bsetupe$B$N$H$3$m$G2?EY$b8F$P$l$F$k$s$G$9!#e(B
e$BB>$N%F%9%H$,DL$C$F$$$k$H$3$m$r8+$k$H!"e(B
e$B$d$C$Q$je(Batofe$B$,D>@$NLdBj$G$OL5$5$=$&$G$9$M!#e(B

e$B!!:#EY!$5!2q$r:n$C$F0l=o$K%G%P%C%0$7$^$7$g$&$+!%e(B

e$B$=$&$G$9$M!#$=$&$*$C$7$c$C$F$/[email protected]$5$k$H?46/$$$G$9!#e(B

e$B=uEDe(B e$B2m5*e(B

e$B=uED$G$9!#e(B

In message “[ruby-dev:31612] Re: test/win32ole”
on 07/08/23, arton [email protected] writes:

e$B$(!<$H!"e(B

test_progid(TestWIN32OLE_TYPE):

e$B!!:!=h$G;$^$j$^$9!%%G%P%C%,!Je(BVCe$B!K$Oe(B win32ole.c e$B$Ne(B 2019 e$B9TL$Ne(B
atof() e$B$G;
$^[email protected]$C$F$k$s$G$9$,!%e(B
e$B$H$$$&$3$H$J$N$G!“JL$N$H$3$m$G%9%?%C%/$r2u$7$F!”$J$s$+$*$+$7$/$J$C$F$$$ke(B
e$B!Je(Btest_on_evente$B$b!“e(Btest_progide$B$HF1$8$/!”$=$N1F6A!K$N$G$O$J$$$G$7$g$&$+!#e(B

[email protected]$,9b$=$&$G$9$M!#e(B

e$B$G!“J8;zNsD9$,$T$C$?$je(BBUFSIZe$B$N>l9g!”=*C<e([email protected]_Dj$;$:$K!"e(BERROR_SUCCESS
e$B$,JV$k$H$J$C$F$$$^$9!#$=$N0lJ}$G!"e(Bnulle$B$r%3%T!<$7$?>l9g$K$O!"e(B&size_bufe$B$Ke(B
e$B$Oe(Bnulle$B$NJ,$bF~$k$N$G!"e(Breturn rb_str_new(buf, size_buf); e$B$H$9$k$o$1$K$be(B
e$B$$$+$J$$$G$9$M!#e(B

e$B$(!<!#$=$&[email protected]$C$?$s$G$9$+!#e(B
e$B$F$C$-$je(B ERROR_MORE_DATA [email protected]$H$P$+$j;W$C$F$^$7$?!#e(B

char buf[BUFSIZ + 1];
buf[BUFSIZ] = 0;
e$B$H$7$F$*$$$F!"e(Brb_str_new2(buf);
e$B$+$J!#e(B

ERROR_MORE_DATAe$B$N>l9g$r9MN8$7$F!"e(B
buf
e$B$8$c$J$/$Fe(B1e$B2se(BNULLe$B$K$7$Fe(BRegQueryValuee$B$rEO$7$FI,MW$J%5%$%:$re(B
e$B<[email protected]$7$F!"e(Bbufe$B$re(BALLOCe$B$7$F$b$&0lEY8F$V$H$$$&$N$,NI$$$+$J$H;W$$$^$9!#e(B

e$B$H$$$&$+!“e(BRegQueryValuee$B$,2<[email protected][email protected]$1$K;D$C$F$$$k$_$?$$e(B
e$B$J$N$G!“e(BRegQueryValueExe$B$G=q$-BX$($h$&$H$7$F$$$F!”$J$s$+e(B
e$B$&$^$/$$$+$J$/$F!”:rF|$O;[email protected]$l$K$J$C$F$7$^$$$^$7$?!#e(B

e$B=uEDe(B e$B2m5*e(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs