Skip Menu |

This queue is for tickets about the Wx-ActiveX CPAN distribution.

Report information
The Basics
Id: 28887
Status: resolved
Priority: 0/
Queue: Wx-ActiveX

People
Owner: Nobody in particular
Requestors: EWILHELM [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: PAR Compatibility
The attached patch includes all of the changes made for dotReader. See the svn log for details. This includes the GetOLE fixup to be compatible with PAR, plus the 2.6 compatibility changes. http://svn.dotreader.com/deps/Wx-ActiveX/trunk (note, the nntp.perl.org dates are incorrect due to the mails having been imported from sourceforge (but sourceforge keeps breaking the archives so we don't use it any more)) References: http://www.nntp.perl.org/group/perl.wxperl.users/2007/06/msg3493.html http://www.nntp.perl.org/group/perl.wxperl.users/2007/06/msg4416.html http://www.nntp.perl.org/group/perl.wxperl.users/2007/07/msg5324.html
Subject: Wx-ActiveX.patch
Index: activex/wxactivex.cpp =================================================================== --- activex/wxactivex.cpp (revision 37) +++ activex/wxactivex.cpp (revision 129) @@ -304,7 +304,7 @@ void wxActiveX::CreateActiveX(REFCLSID clsid) { - SetTransparent(); + //SetTransparent(); HRESULT hret; @@ -1819,7 +1819,7 @@ void wxActiveX::OnPaint(wxPaintEvent& event) { - wxLogTrace(wxT("repainting activex win")); + wxLogTrace("%s", wxT("repainting activex win")); wxPaintDC dc(this); dc.BeginDrawing(); int w, h; @@ -1854,12 +1854,12 @@ { if (m_oleObjectHWND == NULL) { - wxLogTrace(wxT("no oleInPlaceObject")); + wxLogTrace("%s", wxT("no oleInPlaceObject")); event.Skip(); return; } - wxLogTrace(wxT("mouse event")); + wxLogTrace("%s", wxT("mouse event")); UINT msg = 0; WPARAM wParam = 0; LPARAM lParam = 0; @@ -1902,18 +1902,18 @@ wxString log; if (msg == 0) { - wxLogTrace(wxT("no message")); + wxLogTrace("%s", wxT("no message")); event.Skip(); return; }; if (!::SendMessage(m_oleObjectHWND, msg, wParam, lParam)) { - wxLogTrace(wxT("msg not delivered")); + wxLogTrace("%s", wxT("msg not delivered")); event.Skip(); return; }; - wxLogTrace(wxT("msg sent")); + wxLogTrace("%s", wxT("msg sent")); } long wxActiveX::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) Index: lib/Wx/ActiveX.pm =================================================================== --- lib/Wx/ActiveX.pm (revision 37) +++ lib/Wx/ActiveX.pm (revision 129) @@ -32,9 +32,10 @@ sub BEGIN { @ISA = qw(Wx::Window); - $VERSION = '0.05'; + $VERSION = '0.0501'; Wx::wx_boot( 'Wx::ActiveX', $VERSION ) ; $XS_NEW = \&new ; + no warnings 'redefine'; *new = \&PLnew ; } Index: Changes =================================================================== --- Changes (revision 37) +++ Changes (revision 129) @@ -1,5 +1,8 @@ Revision history for Perl extension Wx::ActiveX. +0.0501 09/2006 + - fixed GetOLE() to still find the library from inside a PAR + 0.05 08/2003 - Added compatibility with MingW. - Added method GetOLE(), that returns a Win32::OLE object of Index: README.txt =================================================================== --- README.txt (revision 37) +++ README.txt (revision 129) @@ -2,7 +2,7 @@ # Wx::ActiveX 0.05 # #################### - This is the source of wxAtiveX, including wxIE & Wx::ActiveX::Flash. + This is the source of wxActiveX, including wxIE & Wx::ActiveX::Flash. See POD for more... @@ -12,16 +12,16 @@ This will compile only for Win32, and was tested with VC++ 6 and MingW (GCC 3.2). - You will need wxPerl-0.15+ compiled against wxWindows-2.4+ too, and wxWindows source files compiled (like wxPerl). + You will need wxPerl-0.27+ compiled against wxWindows-2.6+ too, and wxWindows source files compiled (like wxPerl). ######### # BUILD # ######### - First, compile wxPerl-0.15+ and add the enverioment variables for wxWindows-2.4+: + First, compile wxPerl-0.27+ and add the environment variables for wxWindows-2.6+: - set WXWIN=C:\wxwindows\wxWindows-2.4.0 - set WXDIR=C:\wxwindows\wxWindows-2.4.0 + set WXWIN=C:\wxwidgets-2.6.3 + set WXDIR=C:\wxwidgets-2.6.3 Then build: @@ -34,6 +34,8 @@ # AUTHOR # ########## + Updates by Eric Wilhelm <ewilhelm at cpan dot org> for PAR compatibility and 2.6 API + Graciliano M. P. <gm@virtuasites.com.br> Thanks to wxWindows peoples and Mattia Barbon for wxPerl! ;-) @@ -41,7 +43,7 @@ Thanks to Justin Bradford <justin@maxwell.ucsf.edu> and Lindsay Mathieson <lmathieson@optusnet.com.au>, that wrote the C classes for wxActiveX and wxIEHtmlWin. - Thanks to Simon Flack <sf@flacks.net>, for the compatibility of Wx::ActiveX objetc with Win32::OLE and MingW tests. + Thanks to Simon Flack <sf@flacks.net>, for the compatibility of Wx::ActiveX object with Win32::OLE and MingW tests. Thanks for the interest of everybody. Index: ActiveX.xs =================================================================== --- ActiveX.xs (revision 37) +++ ActiveX.xs (revision 129) @@ -33,8 +33,6 @@ BOOT: INIT_PLI_HELPERS( wx_pli_helpers ); - wxClassInfo::CleanUpClasses(); - wxClassInfo::InitializeClasses(); #undef THIS @@ -203,7 +201,29 @@ IDispatch * pDispatch; ST(0) = &PL_sv_undef; - hmodule = LoadLibrary("OLE"); + hmodule = GetModuleHandle("OLE"); + + // if we didn't find it, try harder (fixes PAR issue) + // search code taken from AxWindow.xs --Eric + if (hmodule == 0) { + // Try to find using Dynaloader + AV* av_modules = get_av("DynaLoader::dl_modules", FALSE); + AV* av_librefs = get_av("DynaLoader::dl_librefs", FALSE); + if (av_modules && av_librefs) { + // Look at Win32::OLE package + for (I32 i = 0; i < av_len(av_modules); i++) { + SV** sv = av_fetch(av_modules, i, 0); + if (sv && SvPOK (*sv) && + strEQ(SvPV_nolen(*sv), "Win32::OLE")) { + // Tahe + sv = av_fetch(av_librefs, i, 0); + hmodule = (HMODULE) (sv && SvIOK (*sv) ? SvIV(*sv) : 0); + break; + } + } + } + } + if (hmodule != 0) { pCreatePerlObject = (MYPROC) GetProcAddress(hmodule, "CreatePerlObject"); if (pCreatePerlObject != 0) { @@ -216,7 +236,6 @@ ST(0) = (pCreatePerlObject)(aTHX_ stash, pDispatch, NULL); #endif } - FreeLibrary(hmodule); } }
Eric's fix incorporated in 0.07