On 8/23/12 3:34 AM, Brian Raven wrote: >> -----Original Message----- >> From: activeperl-boun...@listserv.activestate.com [mailto:activeperl- >> boun...@listserv.activestate.com] On Behalf Of Philip Prindeville >> Sent: 22 August 2012 22:52 >> To: ActivePerl@listserv.ActiveState.com >> Subject: Known issues with Win32::OLE? >> >> I was originally going to check the list archives before posting, but I >> get a 403 from pipermail on the website, so can't do that. >> >> I'm running ActiveState perl (community version) on Win7-x64 updated, >> and wrote the following simple/stupid test program. >> >> #!/usr/bin/perl -w >> >> use strict; >> use warnings; >> >> sub obj_cb($) >> { >> my $obj = shift; >> my $class = Win32::OLE->QueryObjectType($obj); >> printf STDERR "%s=>%s\n", $obj, $class; } >> >> my $count = Win32::OLE->EnumAllObjects(\&obj_cb); >> >> printf STDERR "count=%d\n", $count; >> >> exit 1; >> >> and running it (both as myself and as Administrator) I get: >> >> count=0 >> >> Anyone have a simple/stupid program that detects whatever programs are >> present that are manipulable via OLE? >> >> I'm trying to get up to speed on Win32::OLE so I can write some test- >> automation tools to exercise our products' GUIs. > > I may be missing something, but if you want to test a GUI, wouldn't something > like Win32::GuiTest be more useful? > > > -- > Brian Raven
I could not get it to build on Win7-x64: C:\Users\philipp\Desktop\tests\Win32-GuiTest-1.60>vcvars32.bat Setting environment for using Microsoft Visual Studio 2010 x86 tools. C:\Users\philipp\Desktop\tests\Win32-GuiTest-1.60>perl makefile.pl Checking if your kit is complete... Looks good Writing Makefile for Win32::GuiTest Writing MYMETA.yml C:\Users\philipp\Desktop\tests\Win32-GuiTest-1.60>nmake Microsoft (R) Program Maintenance Utility Version 10.00.30319.01 Copyright (C) Microsoft Corporation. All rights reserved. cp lib/Win32/GuiTest/GuiTest.pc blib\lib\Win32\GuiTest\GuiTest.pc cp lib/Win32/GuiTest/Examples.pm blib\lib\Win32\GuiTest\Examples.pm cp lib/Win32/GuiTest.pm blib\lib\Win32\GuiTest.pm cp lib/Win32/GuiTest/Cmd.pm blib\lib\Win32\GuiTest\Cmd.pm C:\Perl64\bin\perl.exe -IC:\Perl64\lib -IC:\Perl64\lib C:\Perl64\lib\ExtUtils\xsubpp -typemap C:\Perl64\lib\ExtUtils\typemap -typemap perlobject.map -typemap typemap GuiTest.xs >xstmp.c && C:\Perl64\bin\perl.exe -MExtUtils::Command -e "mv" -- xstmp.c GuiTest.cpp cl -c -nologo -GF -W3 -MD -Zi -DNDEBUG -Ox -GL -fp:precise -DWIN32 -D_CONSOLE -DNO_STRICT -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -MD -Zi -DNDEBUG -Ox -GL -fp:precise -DVERSION=\"1.60\" -DXS_VERSION=\"1.60\" "-IC:\Perl64\lib\CORE" GuiTest.cpp GuiTest.cpp GuiTest.xs(264) : warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stdio.h(371) : see declaration of 'sprintf' GuiTest.xs(589) : warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stdio.h(371) : see declaration of 'sprintf' GuiTest.xs(1569) : warning C4996: 'strnicmp': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strnicmp. See online help for details. c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\string.h(248) : see declaration of 'strnicmp' GuiTest.xs(1753) : warning C4244: '=' : conversion from 'IV' to 'LONG', possible loss of data cl -c -nologo -GF -W3 -MD -Zi -DNDEBUG -Ox -GL -fp:precise -DWIN32 -D_CONSOLE -DNO_STRICT -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -MD -Zi -DNDEBUG -Ox -GL -fp:precise -DVERSION=\"1.60\" -DXS_VERSION=\"1.60\" "-IC:\Perl64\lib\CORE" DibSect.cpp DibSect.cpp DibSect.cpp(230) : warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\stdio.h(234) : see declaration of 'fopen' Running Mkbootstrap for Win32::GuiTest () C:\Perl64\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644 GuiTest.bs C:\Perl64\bin\perl.exe -MExtUtils::Mksymlists -e "Mksymlists('NAME'=>\"Win32::GuiTest\", 'DLBASE' => 'GuiTest', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);" link -out:blib\arch\auto\Win32\GuiTest\GuiTest.dll -dll -nologo -nodefaultlib -debug -opt:ref,icf -ltcg -libpath:"C:\Perl64\lib\CORE" -machine:AMD64 GuiTest.obj DibSect.obj C:\Perl64\lib\CORE\perl514.lib oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib -def:GuiTest.def GuiTest.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64' NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\link.EXE"' : return code '0x458' Stop. C:\Users\philipp\Desktop\tests\Win32-GuiTest-1.60> _______________________________________________ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs