Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[rt.cpan.org #43574] Could't use default event source if it begins with underscore character

3 views
Skip to first unread message

patcat via RT

unread,
May 5, 2012, 6:10:10 AM5/5/12
to libw...@perl.org
Sat May 05 06:10:07 2012: Request 43574 was acted upon.
Transaction: Correspondence added by patcat88
Queue: Win32-OLE
Subject: Could't use default event source if it begins with underscore character
Broken in: 0.1709
Severity: Important
Owner: Nobody
Requestors: ern...@eis.ru
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=43574 >


On Tue Feb 24 07:17:28 2009, Erny wrote:
> 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.

patcat via RT

unread,
May 5, 2012, 6:17:44 AM5/5/12
to libw...@perl.org
Sat May 05 06:17:42 2012: Request 43574 was acted upon.
Transaction: Correspondence added by patcat88
Queue: Win32-OLE
Subject: Could't use default event source if it begins with underscore character
Broken in: 0.1709
Severity: Important
Owner: Nobody
Requestors: ern...@eis.ru
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=43574 >


I switched to "if (isalpha(pszItf[0]))" to "if (pszItf[0] != '{')" to
fix the bug.

patcat via RT

unread,
May 5, 2012, 2:08:35 PM5/5/12
to libw...@perl.org
Sat May 05 14:08:34 2012: Request 43574 was acted upon.
Transaction: Correspondence added by patcat88
Queue: Win32-OLE
Subject: Could't use default event source if it begins with underscore character
Broken in: 0.1709
Severity: Important
Owner: Nobody
Requestors: ern...@eis.ru
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=43574 >


Any place function StartsWithAlpha is used should be examined for the
same bug.
0 new messages