Pelles C forum

Pelles C => Bug reports => Topic started by: algernon_77 on August 16, 2020, 11:24:09 am

Title: STDMETHODIMP_(ULONG) breaks the function browser
Post by: algernon_77 on August 16, 2020, 11:24:09 am
Hello!

Today I was tinkering with a Shell context menu example from the forum and I noticed that STDMETHODIMP_(ULONG) seems to break the function browser.
Replaced it with ULONG STDMETHODCALLTYPE and all is peachy. I'm on W7 x64 with Pelle 10.
Example below:

Code: [Select]
STDMETHODIMP_(ULONG) CClassFactory_AddRef ( IClassFactory *this )
{
    ClassFactoryStruct * pCF = (ClassFactoryStruct*)this;
    return ++pCF->m_ulRef;
}

STDMETHODIMP_(ULONG) CClassFactory_Release ( IClassFactory *this )
{
    ClassFactoryStruct * pCF = (ClassFactoryStruct*)this;
    if ( --pCF->m_ulRef == 0 )
    {
        free(this);
        --g_uiRefThisDll;
        return 0;
    }
    return pCF->m_ulRef;
}

Regards!
Title: Re: STDMETHODIMP_(ULONG) breaks the function browser
Post by: Pelle on August 23, 2020, 09:22:42 pm
I will look at this when I have some more time...