mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:54:13 +00:00
oleaut32: Added ITypeLib2_GetLibAttr implementation.
This commit is contained in:
parent
522a00e69a
commit
177d7aac3d
2 changed files with 39 additions and 4 deletions
|
@ -992,6 +992,7 @@ static void test_CreateTypeLib(void) {
|
|||
PARAMDESCEX paramdescex;
|
||||
TYPEDESC typedesc1, typedesc2;
|
||||
TYPEATTR *typeattr;
|
||||
TLIBATTR *libattr;
|
||||
HREFTYPE hreftype;
|
||||
int impltypeflags;
|
||||
HRESULT hres;
|
||||
|
@ -1010,6 +1011,21 @@ static void test_CreateTypeLib(void) {
|
|||
hres = CreateTypeLib2(SYS_WIN32, filenameW, &createtl);
|
||||
ok(hres == S_OK, "got %08x\n", hres);
|
||||
|
||||
hres = ICreateTypeLib_QueryInterface(createtl, &IID_ITypeLib, (void**)&tl);
|
||||
ok(hres == S_OK, "got %08x\n", hres);
|
||||
|
||||
hres = ITypeLib_GetLibAttr(tl, &libattr);
|
||||
ok(hres == S_OK, "got %08x\n", hres);
|
||||
|
||||
ok(libattr->syskind == SYS_WIN32, "syskind = %d\n", libattr->syskind);
|
||||
ok(libattr->wMajorVerNum == 0, "wMajorVer = %d\n", libattr->wMajorVerNum);
|
||||
ok(libattr->wMinorVerNum == 0, "wMinorVerNum = %d\n", libattr->wMinorVerNum);
|
||||
ok(libattr->wLibFlags == 0, "wLibFlags = %d\n", libattr->wLibFlags);
|
||||
|
||||
ITypeLib_ReleaseTLibAttr(tl, libattr);
|
||||
|
||||
ITypeLib_Release(tl);
|
||||
|
||||
hres = ICreateTypeLib_CreateTypeInfo(createtl, interface1W, TKIND_INTERFACE, &createti);
|
||||
ok(hres == S_OK, "got %08x\n", hres);
|
||||
|
||||
|
|
|
@ -4260,9 +4260,28 @@ static HRESULT WINAPI ITypeLib2_fnGetLibAttr(
|
|||
{
|
||||
ICreateTypeLib2Impl *This = impl_from_ITypeLib2(iface);
|
||||
|
||||
FIXME("(%p,%p), stub!\n", This, ppTLibAttr);
|
||||
TRACE("(%p,%p)\n", This, ppTLibAttr);
|
||||
|
||||
return E_OUTOFMEMORY;
|
||||
if(!ppTLibAttr)
|
||||
return E_INVALIDARG;
|
||||
|
||||
*ppTLibAttr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(TLIBATTR));
|
||||
if(!*ppTLibAttr)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
if(This->typelib_header.posguid != -1) {
|
||||
MSFT_GuidEntry *guid;
|
||||
|
||||
guid = (MSFT_GuidEntry*)&This->typelib_segment_data[MSFT_SEG_GUID][This->typelib_header.posguid];
|
||||
(*ppTLibAttr)->guid = guid->guid;
|
||||
}
|
||||
|
||||
(*ppTLibAttr)->lcid = This->typelib_header.lcid;
|
||||
(*ppTLibAttr)->syskind = This->typelib_header.varflags&0x3;
|
||||
(*ppTLibAttr)->wMajorVerNum = This->typelib_header.version&0xffff;
|
||||
(*ppTLibAttr)->wMinorVerNum = This->typelib_header.version>>16;
|
||||
(*ppTLibAttr)->wLibFlags = This->typelib_header.flags;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -4366,9 +4385,9 @@ static void WINAPI ITypeLib2_fnReleaseTLibAttr(
|
|||
ITypeLib2 * iface,
|
||||
TLIBATTR* pTLibAttr)
|
||||
{
|
||||
ICreateTypeLib2Impl *This = impl_from_ITypeLib2(iface);
|
||||
TRACE("(%p,%p)\n", iface, pTLibAttr);
|
||||
|
||||
FIXME("(%p,%p), stub!\n", This, pTLibAttr);
|
||||
HeapFree(GetProcessHeap(), 0, pTLibAttr);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
|
Loading…
Reference in a new issue