Looking mostly good, but some problems below.
On Tue, Jun 03, 2014 at 08:50:46PM +0200, guillaume.charifi@sfr.fr wrote:
- hr = LoadTypeLibEx(testTLBNameW, REGKIND_NONE, &ptLib);
- if(hr == S_OK) {
ITypeLib_Release(ptLib);
win_skip("test_tlb.tlb is on the path or registered, skipping typelib dependency tests\n");
return;
- }
This fails when I run the tests in my source tree:
[aeikum@aeikum tests]$ pwd /home/aeikum/wine/dlls/oleaut32/tests
typelib.c:5434: Test failed: test_tlb.tlb is on the path or registered, skipping typelib dependency tests Makefile:345: recipe for target 'typelib.ok' failed make: *** [typelib.ok] Error 1
/* Search in resource table */
if(1) {
Why is this if-statement here?
static const WCHAR TYPELIBW[] = {'T','Y','P','E','L','I','B',0};
struct search_res_tlb_param *param = heap_alloc(sizeof(*param));
Why aren't you allocating this on the stack?
param->guid = (GUID *)TLB_get_guid_null(ref_type->pImpTLInfo->guid);
EnumResourceNamesW(NULL, TYPELIBW, search_res_tlb, (LONG_PTR)param);
pTLib = param->pTLib;
result = param->result;
If search_res_tlb() is never run, I think (result == 0 == S_OK). You should initialize it to some failure condition before calling EnumResourceNames.
Andrew