[Patch] dlls/oleaut32/typelib.c - fix kazaalite

Dmitry Timoshkov dmitry at baikal.ru
Thu Jul 10 21:46:51 CDT 2003


"Stefan Jones" <cretin at gentoo.org> wrote:

> On upgrading to Wine 20030618/20030709 I found that kazaa lite will no longer
> work

...

> The following patch reversal fixes it:
> ( it undoes Dmitry's patch )

If you could confirm that after your patch attached program while loading
native olepro32.dll and msvbvm60.dll still prints the following:

Loading: "olepro32.dll"
LoadTypeLib() = 00000000
GetLibAttr() = 00000000
ITypeLib2_Release() = 0
Loading: "msvbvm60.dll"
LoadTypeLib() = 00000000
GetLibAttr() = 00000000
ITypeLib2_Release() = 0

then your patch is OK.

-- 
Dmitry.
-------------- next part --------------
#define COBJMACROS

#include <windows.h>
#include <oleauto.h>
#include <stdio.h>

void load_type_lib(LPCWSTR type_lib)
{
    ITypeLib *iface;
    TLIBATTR *pTLibAttr;
    HRESULT hResult;
    ULONG ref_count;
    DWORD dwWritten;

    printf("Loading: \"%ws\"\n", type_lib);

    hResult = LoadTypeLib(type_lib, &iface);
    printf("LoadTypeLib() = %08lx\n", hResult);

    if (hResult) return;

    //hResult = iface->lpVtbl->GetLibAttr(iface, &pTLibAttr);
    hResult = ITypeLib2_GetLibAttr(iface, &pTLibAttr);
    printf("GetLibAttr() = %08lx\n", hResult);

//    fflush(stdout);
//    WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), pTLibAttr, sizeof(*pTLibAttr), &dwWritten, NULL);
//    printf("\n\n");

    //iface->lpVtbl->ReleaseTLibAttr(iface, pTLibAttr);
    ITypeLib2_ReleaseTLibAttr(iface, pTLibAttr);

    //ref_count = iface->lpVtbl->Release(iface);
    ref_count = ITypeLib2_Release(iface);
    printf("ITypeLib2_Release() = %lu\n", ref_count);
}

int main(void)
{
    load_type_lib(L"olepro32.dll");
    load_type_lib(L"msvbvm60.dll");
    return 0;
}


More information about the wine-devel mailing list