Skip Menu |
 

This queue is for tickets about the Win32-OLE CPAN distribution.

Report information
The Basics
Id: 43574
Status: open
Priority: 0/
Queue: Win32-OLE

People
Owner: Nobody in particular
Requestors: ernest [...] eis.ru
Cc:
AdminCc:

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



Subject: Could't use default event source if it begins with underscore character
Download (untitled) / with headers
text/plain 778b
If default event source name begins with underscore character (as autocreated by Visual Studio) than events not arrive. Patch for this bug: 4405,4406c4409,4415 < if (isalpha(pszItf[0])) < hr = FindIID(aTHX_ pObj, pszItf, &iid, &pTypeInfo, cp, lcid); --- Show quoted text
> //PE: > if (pszItf[0]=='{') { > OLECHAR Buffer[OLE_BUF_SIZ]; > OLECHAR *pBuffer = GetWideChar(aTHX_ itf,
Buffer, OLE_BUF_SIZ, cp); Show quoted text
> hr = IIDFromString(pBuffer, &iid); > ReleaseBuffer(aTHX_ pBuffer, Buffer); > }
4408,4411c4417 < OLECHAR Buffer[OLE_BUF_SIZ]; < OLECHAR *pBuffer = GetWideChar(aTHX_ itf, Buffer, OLE_BUF_SIZ, cp); < hr = IIDFromString(pBuffer, &iid); < ReleaseBuffer(aTHX_ pBuffer, Buffer); --- Show quoted text
> hr = FindIID(aTHX_ pObj, pszItf, &iid,
&pTypeInfo, cp, lcid);
From: bulk88 [...] hotmail.com
Download (untitled) / with headers
text/plain 1024b
On Tue Feb 24 07:17:28 2009, Erny wrote: Show quoted text
> If default event source name begins with underscore character (as > autocreated by Visual Studio) than events not arrive. > > Patch for this bug: > > 4405,4406c4409,4415 > < if (isalpha(pszItf[0])) > < hr = FindIID(aTHX_ pObj, pszItf, &iid, &pTypeInfo, cp, > lcid); > ---
> > //PE: > > if (pszItf[0]=='{') { > > OLECHAR Buffer[OLE_BUF_SIZ]; > > OLECHAR *pBuffer = GetWideChar(aTHX_ itf,
> Buffer, OLE_BUF_SIZ, cp);
> > hr = IIDFromString(pBuffer, &iid); > > ReleaseBuffer(aTHX_ pBuffer, Buffer); > > }
> 4408,4411c4417 > < OLECHAR Buffer[OLE_BUF_SIZ]; > < OLECHAR *pBuffer = GetWideChar(aTHX_ itf, Buffer, > OLE_BUF_SIZ, cp); > < hr = IIDFromString(pBuffer, &iid); > < ReleaseBuffer(aTHX_ pBuffer, Buffer); > ---
> > hr = FindIID(aTHX_ pObj, pszItf, &iid,
> &pTypeInfo, cp, lcid);
Yep, this is a bug. I encountered it just now. You can't use WithEvents on interface that beings with '_'. 3 years for a bug with a patch is too long.
From: bulk88 [...] hotmail.com
I switched to "if (isalpha(pszItf[0]))" to "if (pszItf[0] != '{')" to fix the bug.
From: bulk88 [...] hotmail.com
Any place function StartsWithAlpha is used should be examined for the same bug.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.