1802 {
1804 static OLECHAR helpfileW[] = {
'C',
':',
'\\',
'b',
'o',
'g',
'u',
's',
'.',
'h',
'l',
'p',0};
1805 static OLECHAR interface1W[] = {
'i',
'n',
't',
'e',
'r',
'f',
'a',
'c',
'e',
'1',0};
1806 static OLECHAR interface2W[] = {
'i',
'n',
't',
'e',
'r',
'f',
'a',
'c',
'e',
'2',0};
1807 static OLECHAR interface3W[] = {
'i',
'n',
't',
'e',
'r',
'f',
'a',
'c',
'e',
'3',0};
1808 static OLECHAR dualW[] = {
'd',
'u',
'a',
'l',0};
1809 static OLECHAR coclassW[] = {
'c',
'o',
'c',
'l',
'a',
's',
's',0};
1810 static const WCHAR defaultW[] = {
'd',
'e',
'f',
'a',
'u',
'l',
't',0x3213,0};
1811 static OLECHAR func1W[] = {
'f',
'u',
'n',
'c',
'1',0};
1812 static OLECHAR func2W[] = {
'f',
'u',
'n',
'c',
'2',0};
1813 static OLECHAR prop1W[] = {
'P',
'r',
'o',
'p',
'1',0};
1814 static OLECHAR param1W[] = {
'p',
'a',
'r',
'a',
'm',
'1',0};
1815 static OLECHAR param2W[] = {
'p',
'a',
'r',
'a',
'm',
'2',0};
1816 static OLECHAR asdfW[] = {
'A',
's',
'd',
'f',0};
1817 static OLECHAR aliasW[] = {
'a',
'l',
'i',
'a',
's',0};
1818 static OLECHAR invokeW[] = {
'I',
'n',
'v',
'o',
'k',
'e',0};
1819 static OLECHAR *names1[] = {func1W, param1W, param2W};
1820 static OLECHAR *names2[] = {func2W, param1W, param2W};
1821 static OLECHAR *propname[] = {prop1W, param1W};
1822 static const GUID tlcustguid = {0xbf611abe,0x5b38,0x11df,{0x91,0x5c,0x08,0x02,0x79,0x79,0x94,0x69}};
1823 static const GUID custguid = {0xbf611abe,0x5b38,0x11df,{0x91,0x5c,0x08,0x02,0x79,0x79,0x94,0x70}};
1824 static const GUID bogusguid = {0xbf611abe,0x5b38,0x11df,{0x91,0x5c,0x08,0x02,0x79,0x79,0x94,0x71}};
1825 static const GUID interfaceguid = {0x3b9ff02f,0x9675,0x4861,{0xb7,0x81,0xce,0xae,0xa4,0x78,0x2a,0xcc}};
1826 static const GUID interface2guid = {0x3b9ff02f,0x9675,0x4861,{0xb7,0x81,0xce,0xae,0xa4,0x78,0x2a,0xcd}};
1827
1839 MEMBERID memids[2];
1840 FUNCDESC funcdesc, *pfuncdesc;
1841 ELEMDESC elemdesc[5], *edesc;
1842 PARAMDESCEX paramdescex;
1843 TYPEDESC typedesc1, typedesc2;
1844 TYPEATTR *typeattr;
1845 TLIBATTR *libattr;
1846 HREFTYPE hreftype;
1849 int impltypeflags;
1850 unsigned int cnames;
1854 TYPEKIND kind;
1855 DESCKIND desckind;
1856 BINDPTR bindptr;
1857 char nameA[16];
1859
1860 switch(sys){
1862 trace(
"testing SYS_WIN32\n");
1864 alignment = sizeof(void*);
1865 break;
1867 trace(
"testing SYS_WIN64\n");
1869 alignment = 4;
1870 break;
1871 default:
1872 return;
1873 }
1874
1875 trace(
"CreateTypeLib tests\n");
1876
1879
1882
1885 ok(typeattr->cbSizeVft == 3 *
sizeof(
void*),
"Got wrong cbSizeVft: %u\n", typeattr->cbSizeVft);
1886 ITypeInfo_ReleaseTypeAttr(
unknown, typeattr);
1887
1890
1893
1896
1897 hres = ICreateTypeLib2_QueryInterface(createtl, &IID_ITypeLib, (
void**)&tl);
1899
1900 hres = ITypeLib_GetTypeInfo(tl, 0,
NULL);
1902
1903 hres = ITypeLib_GetTypeInfoType(tl, 0, &kind);
1905
1906 hres = ITypeLib_GetTypeInfoType(tl, 0,
NULL);
1908
1909 hres = ITypeLib_GetTypeInfoType(tl, 0,
NULL);
1911
1912 hres = ITypeLib_GetLibAttr(tl,
NULL);
1914
1915 hres = ITypeLib_GetLibAttr(tl, &libattr);
1917
1918 ok(libattr->syskind == sys,
"syskind = %d\n", libattr->syskind);
1919 ok(libattr->wMajorVerNum == 0,
"wMajorVer = %d\n", libattr->wMajorVerNum);
1920 ok(libattr->wMinorVerNum == 0,
"wMinorVerNum = %d\n", libattr->wMinorVerNum);
1921 ok(libattr->wLibFlags == 0,
"wLibFlags = %d\n", libattr->wLibFlags);
1922
1923 ITypeLib_ReleaseTLibAttr(tl, libattr);
1924
1926 hres = ITypeLib_GetDocumentation(tl, -1, &
name, &docstring, &helpcontext, &
helpfile);
1929 ok(docstring ==
NULL,
"docstring != NULL\n");
1930 ok(helpcontext == 0,
"helpcontext != 0\n");
1932
1935
1938
1939 hres = ICreateTypeLib2_SetHelpFileName(createtl, helpfileW);
1941
1944
1949
1952
1954 V_I4(&cust_data) = 1;
1955 hres = ICreateTypeLib2_SetCustData(createtl, &tlcustguid, &cust_data);
1957
1958 hres = ITypeLib_QueryInterface(tl, &IID_ITypeLib2, (
void**)&tl2);
1960
1962 V_I4(&cust_data) = 0;
1963 hres = ITypeLib2_GetCustData(tl2, &tlcustguid, &cust_data);
1965 ok(
V_VT(&cust_data) ==
VT_I4,
"V_VT(&cust_data) = %d\n",
V_VT(&cust_data));
1966 ok(
V_I4(&cust_data) == 1,
"V_I4(&cust_data) = %d\n",
V_I4(&cust_data));
1967
1968 ITypeLib2_Release(tl2);
1969
1970
1973
1976
1979
1982
1983 hres = ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo, (
void**)&interface1);
1985
1989
1991
1992 ITypeLib_Release(tl);
1993
1996 hres = ITypeInfo_GetDocumentation(interface1, -1, &
name, &docstring, &helpcontext, &
helpfile);
1999 ok(docstring ==
NULL,
"docstring != NULL\n");
2000 ok(helpcontext == 0,
"helpcontext != 0\n");
2002
2005
2008
2009 hres = ITypeInfo_GetRefTypeInfo(interface1, 0,
NULL);
2011
2012
2013 hres = ICreateTypeInfo_LayOut(createti);
2015
2016 hres = ICreateTypeInfo_SetGuid(createti, &interfaceguid);
2018
2019 hres = ICreateTypeInfo_AddRefTypeInfo(createti,
NULL, &hreftype);
2021
2024
2025 hres = ICreateTypeInfo_AddRefTypeInfo(createti,
unknown, &hreftype);
2028 skip(
"Skipping some tests\n");
2029 return;
2030 }
2031
2032 hres = ICreateTypeInfo_AddImplType(createti, 1, hreftype);
2034
2035 hres = ICreateTypeInfo_AddImplType(createti, 0, hreftype);
2037
2038 hres = ITypeInfo_GetRefTypeOfImplType(interface1, 0, &hreftype);
2040 ok(hreftype == 3,
"hreftype = %d\n", hreftype);
2041
2042 hres = ITypeInfo_GetRefTypeInfo(interface1, hreftype, &ti);
2044
2045 hres = ITypeInfo_GetTypeAttr(ti, &typeattr);
2047 ok(typeattr->cbSizeVft == 3 *
ptr_size,
"retrieved IUnknown gave wrong cbSizeVft: %u\n", typeattr->cbSizeVft);
2048 ITypeInfo_ReleaseTypeAttr(ti, typeattr);
2049
2050 ITypeInfo_Release(ti);
2051
2052 hres = ITypeInfo_GetRefTypeOfImplType(interface1, -1, &hreftype);
2054
2055 ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo2, (void**)&ti2);
2056
2057 memset(&funcdesc, 0,
sizeof(FUNCDESC));
2058 funcdesc.funckind = FUNC_PUREVIRTUAL;
2059 funcdesc.invkind = INVOKE_PROPERTYGET;
2061 funcdesc.elemdescFunc.tdesc.vt =
VT_BSTR;
2062 U(funcdesc.elemdescFunc).idldesc.wIDLFlags = IDLFLAG_NONE;
2063
2064 hres = ICreateTypeInfo_AddFuncDesc(createti, 0,
NULL);
2066
2067 hres = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc);
2069
2070 hres = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc);
2072
2073 hres = ITypeInfo2_GetFuncDesc(ti2, 0,
NULL);
2075
2076 hres = ITypeInfo2_GetFuncDesc(ti2, 1, &pfuncdesc);
2078
2079 hres = ITypeInfo2_GetFuncDesc(ti2, 0, &pfuncdesc);
2081
2082 ok(pfuncdesc->memid == 0,
"got %x\n", pfuncdesc->memid);
2083 ok(pfuncdesc->lprgscode ==
NULL,
"got %p\n", pfuncdesc->lprgscode);
2084 ok(pfuncdesc->lprgelemdescParam ==
NULL,
"got %p\n", pfuncdesc->lprgelemdescParam);
2085 ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL,
"got 0x%x\n", pfuncdesc->funckind);
2086 ok(pfuncdesc->invkind == INVOKE_PROPERTYGET,
"got 0x%x\n", pfuncdesc->invkind);
2087 ok(pfuncdesc->callconv ==
CC_STDCALL,
"got 0x%x\n", pfuncdesc->callconv);
2088 ok(pfuncdesc->cParams == 0,
"got %d\n", pfuncdesc->cParams);
2089 ok(pfuncdesc->cParamsOpt == 0,
"got %d\n", pfuncdesc->cParamsOpt);
2090 ok(pfuncdesc->oVft == 3 *
ptr_size,
"got %d\n", pfuncdesc->oVft);
2091 ok(pfuncdesc->cScodes == 0,
"got %d\n", pfuncdesc->cScodes);
2092 ok(pfuncdesc->elemdescFunc.tdesc.vt ==
VT_BSTR,
"got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
2093 ok(pfuncdesc->wFuncFlags == 0,
"got 0x%x\n", pfuncdesc->wFuncFlags);
2094
2095 ITypeInfo2_ReleaseFuncDesc(ti2, pfuncdesc);
2096
2097 hres = ICreateTypeInfo_SetFuncHelpContext(createti, 0, 0xabcdefab);
2099
2100 funcdesc.invkind = INVOKE_PROPERTYPUT;
2101 hres = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc);
2103
2104 funcdesc.invkind = INVOKE_PROPERTYPUTREF;
2105 hres = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc);
2107
2108 elemdesc[0].tdesc.vt =
VT_BSTR;
2109 U(elemdesc[0]).idldesc.dwReserved = 0;
2110 U(elemdesc[0]).idldesc.wIDLFlags = IDLFLAG_FIN;
2111
2112 funcdesc.lprgelemdescParam = elemdesc;
2113 funcdesc.invkind = INVOKE_PROPERTYPUT;
2114 funcdesc.cParams = 1;
2115 funcdesc.elemdescFunc.tdesc.vt =
VT_VOID;
2116
2117 hres = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc);
2119
2120 hres = ICreateTypeInfo_SetFuncHelpContext(createti, 1, 0xabcdefab);
2122
2123 hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 0, propname, 0);
2125
2126 hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 0,
NULL, 1);
2128
2129 hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 0, propname, 1);
2131
2132 hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 1, propname, 1);
2134
2135 hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 1, propname, 2);
2137
2138 hres = ITypeInfo2_GetFuncDesc(ti2, 1, &pfuncdesc);
2140
2141 ok(pfuncdesc->memid == 0,
"got %x\n", pfuncdesc->memid);
2142 ok(pfuncdesc->lprgscode ==
NULL,
"got %p\n", pfuncdesc->lprgscode);
2143 ok(pfuncdesc->lprgelemdescParam !=
NULL,
"got %p\n", pfuncdesc->lprgelemdescParam);
2144 ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL,
"got 0x%x\n", pfuncdesc->funckind);
2145 ok(pfuncdesc->invkind == INVOKE_PROPERTYPUT,
"got 0x%x\n", pfuncdesc->invkind);
2146 ok(pfuncdesc->callconv ==
CC_STDCALL,
"got 0x%x\n", pfuncdesc->callconv);
2147 ok(pfuncdesc->cParams == 1,
"got %d\n", pfuncdesc->cParams);
2148 ok(pfuncdesc->cParamsOpt == 0,
"got %d\n", pfuncdesc->cParamsOpt);
2149 ok(pfuncdesc->oVft == 4 *
ptr_size,
"got %d\n", pfuncdesc->oVft);
2150 ok(pfuncdesc->cScodes == 0,
"got %d\n", pfuncdesc->cScodes);
2151 ok(pfuncdesc->elemdescFunc.tdesc.vt ==
VT_VOID,
"got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
2152 ok(pfuncdesc->wFuncFlags == 0,
"got 0x%x\n", pfuncdesc->wFuncFlags);
2153
2154 edesc = pfuncdesc->lprgelemdescParam;
2155 ok(edesc->tdesc.vt ==
VT_BSTR,
"got: %d\n", edesc->tdesc.vt);
2156 ok(
U(*edesc).idldesc.wIDLFlags == IDLFLAG_FIN,
"got: %x\n",
U(*edesc).idldesc.wIDLFlags);
2157
2158 ITypeInfo2_ReleaseFuncDesc(ti2, pfuncdesc);
2159
2160
2161 funcdesc.invkind = INVOKE_PROPERTYPUTREF;
2162 hres = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc);
2164
2165 hres = ICreateTypeInfo_SetFuncHelpContext(createti, 0, 0xabcdefab);
2167
2168 hres = ICreateTypeInfo_SetFuncHelpContext(createti, 0, 0x201);
2170
2171 funcdesc.memid = 1;
2172 funcdesc.lprgelemdescParam =
NULL;
2173 funcdesc.invkind = INVOKE_FUNC;
2174 funcdesc.cParams = 0;
2175 funcdesc.cScodes = 1;
2176 funcdesc.lprgscode =
NULL;
2177 hres = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc);
2179
2180 hres = ITypeInfo2_GetFuncDesc(ti2, 1, &pfuncdesc);
2182
2183 ok(pfuncdesc->memid == 1,
"got %d\n", pfuncdesc->memid);
2184 ok(pfuncdesc->lprgscode ==
NULL,
"got %p\n", pfuncdesc->lprgscode);
2185 ok(pfuncdesc->lprgelemdescParam ==
NULL,
"got %p\n", pfuncdesc->lprgelemdescParam);
2186 ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL,
"got 0x%x\n", pfuncdesc->funckind);
2187 ok(pfuncdesc->invkind == INVOKE_FUNC,
"got 0x%x\n", pfuncdesc->invkind);
2188 ok(pfuncdesc->callconv ==
CC_STDCALL,
"got 0x%x\n", pfuncdesc->callconv);
2189 ok(pfuncdesc->cParams == 0,
"got %d\n", pfuncdesc->cParams);
2190 ok(pfuncdesc->cParamsOpt == 0,
"got %d\n", pfuncdesc->cParamsOpt);
2191 ok(pfuncdesc->oVft == 4 *
ptr_size,
"got %d\n", pfuncdesc->oVft);
2192 ok(pfuncdesc->cScodes == 0,
"got %d\n", pfuncdesc->cScodes);
2193 ok(pfuncdesc->elemdescFunc.tdesc.vt ==
VT_VOID,
"got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
2194 ok(pfuncdesc->wFuncFlags == 0,
"got 0x%x\n", pfuncdesc->wFuncFlags);
2195
2196 ITypeInfo2_ReleaseFuncDesc(ti2, pfuncdesc);
2197
2199 hres = ICreateTypeInfo_AddFuncDesc(createti, 1, &funcdesc);
2201
2202 elemdesc[0].tdesc.vt =
VT_PTR;
2203 U(elemdesc[0].tdesc).lptdesc = &typedesc1;
2205 funcdesc.cParams = 1;
2206 funcdesc.lprgelemdescParam = elemdesc;
2207 hres = ICreateTypeInfo_AddFuncDesc(createti, 4, &funcdesc);
2209
2210 hres = ITypeInfo2_GetFuncDesc(ti2, 4, &pfuncdesc);
2212
2213 ok(pfuncdesc->memid == 0x60010004,
"got %x\n", pfuncdesc->memid);
2214 ok(pfuncdesc->lprgscode ==
NULL,
"got %p\n", pfuncdesc->lprgscode);
2215 ok(pfuncdesc->lprgelemdescParam !=
NULL,
"got %p\n", pfuncdesc->lprgelemdescParam);
2216 ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL,
"got 0x%x\n", pfuncdesc->funckind);
2217 ok(pfuncdesc->invkind == INVOKE_FUNC,
"got 0x%x\n", pfuncdesc->invkind);
2218 ok(pfuncdesc->callconv ==
CC_STDCALL,
"got 0x%x\n", pfuncdesc->callconv);
2219 ok(pfuncdesc->cParams == 1,
"got %d\n", pfuncdesc->cParams);
2220 ok(pfuncdesc->cParamsOpt == 0,
"got %d\n", pfuncdesc->cParamsOpt);
2221 ok(pfuncdesc->oVft == 7 *
ptr_size,
"got %d\n", pfuncdesc->oVft);
2222 ok(pfuncdesc->cScodes == 0,
"got %d\n", pfuncdesc->cScodes);
2223 ok(pfuncdesc->elemdescFunc.tdesc.vt ==
VT_VOID,
"got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
2224 ok(pfuncdesc->wFuncFlags == 0,
"got 0x%x\n", pfuncdesc->wFuncFlags);
2225
2226 edesc = pfuncdesc->lprgelemdescParam;
2227 ok(edesc->tdesc.vt ==
VT_PTR,
"got: %d\n", edesc->tdesc.vt);
2228 ok(
U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FIN,
"got: 0x%x\n",
U(*edesc).paramdesc.wParamFlags);
2229 ok(
U(*edesc).paramdesc.pparamdescex ==
NULL,
"got: %p\n",
U(*edesc).paramdesc.pparamdescex);
2230 ok(
U(edesc->tdesc).lptdesc !=
NULL,
"got: %p\n",
U(edesc->tdesc).lptdesc);
2231 ok(
U(edesc->tdesc).lptdesc->vt ==
VT_BSTR,
"got: %d\n",
U(edesc->tdesc).lptdesc->vt);
2232
2233 ITypeInfo2_ReleaseFuncDesc(ti2, pfuncdesc);
2234
2235 U(elemdesc[0].tdesc).lptdesc = &typedesc2;
2237 U(typedesc2).lptdesc = &typedesc1;
2238 hres = ICreateTypeInfo_AddFuncDesc(createti, 4, &funcdesc);
2240
2241 hres = ITypeInfo2_GetFuncDesc(ti2, 4, &pfuncdesc);
2243
2244 ok(pfuncdesc->memid == 0x60010007,
"got %x\n", pfuncdesc->memid);
2245 ok(pfuncdesc->lprgscode ==
NULL,
"got %p\n", pfuncdesc->lprgscode);
2246 ok(pfuncdesc->lprgelemdescParam !=
NULL,
"got %p\n", pfuncdesc->lprgelemdescParam);
2247 ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL,
"got 0x%x\n", pfuncdesc->funckind);
2248 ok(pfuncdesc->invkind == INVOKE_FUNC,
"got 0x%x\n", pfuncdesc->invkind);
2249 ok(pfuncdesc->callconv ==
CC_STDCALL,
"got 0x%x\n", pfuncdesc->callconv);
2250 ok(pfuncdesc->cParams == 1,
"got %d\n", pfuncdesc->cParams);
2251 ok(pfuncdesc->cParamsOpt == 0,
"got %d\n", pfuncdesc->cParamsOpt);
2252 ok(pfuncdesc->oVft == 7 *
ptr_size,
"got %d\n", pfuncdesc->oVft);
2253 ok(pfuncdesc->cScodes == 0,
"got %d\n", pfuncdesc->cScodes);
2254 ok(pfuncdesc->elemdescFunc.tdesc.vt ==
VT_VOID,
"got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
2255 ok(pfuncdesc->wFuncFlags == 0,
"got 0x%x\n", pfuncdesc->wFuncFlags);
2256
2257 edesc = pfuncdesc->lprgelemdescParam;
2258 ok(edesc->tdesc.vt ==
VT_PTR,
"got: %d\n", edesc->tdesc.vt);
2259 ok(
U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FIN,
"got: 0x%x\n",
U(*edesc).paramdesc.wParamFlags);
2260 ok(
U(*edesc).paramdesc.pparamdescex ==
NULL,
"got: %p\n",
U(*edesc).paramdesc.pparamdescex);
2261 ok(
U(edesc->tdesc).lptdesc !=
NULL,
"got: %p\n",
U(edesc->tdesc).lptdesc);
2262 ok(
U(edesc->tdesc).lptdesc->vt ==
VT_PTR,
"got: %d\n",
U(edesc->tdesc).lptdesc->vt);
2263 ok(
U(*
U(edesc->tdesc).lptdesc).lptdesc !=
NULL,
"got: %p\n",
U(*
U(edesc->tdesc).lptdesc).lptdesc);
2264 ok(
U(*
U(edesc->tdesc).lptdesc).lptdesc->vt ==
VT_BSTR,
"got: %d\n",
U(*
U(edesc->tdesc).lptdesc).lptdesc->vt);
2265
2266 ITypeInfo2_ReleaseFuncDesc(ti2, pfuncdesc);
2267
2268 elemdesc[0].tdesc.vt =
VT_INT;
2269 U(elemdesc[0]).paramdesc.wParamFlags = PARAMFLAG_FHASDEFAULT;
2270 U(elemdesc[0]).paramdesc.pparamdescex = ¶mdescex;
2272 V_INT(¶mdescex.varDefaultValue) = 0x123;
2273 hres = ICreateTypeInfo_AddFuncDesc(createti, 3, &funcdesc);
2275
2276 hres = ITypeInfo2_GetFuncDesc(ti2, 3, &pfuncdesc);
2278
2279 ok(pfuncdesc->memid == 0x60010003,
"got %x\n", pfuncdesc->memid);
2280 ok(pfuncdesc->lprgscode ==
NULL,
"got %p\n", pfuncdesc->lprgscode);
2281 ok(pfuncdesc->lprgelemdescParam !=
NULL,
"got %p\n", pfuncdesc->lprgelemdescParam);
2282 ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL,
"got 0x%x\n", pfuncdesc->funckind);
2283 ok(pfuncdesc->invkind == INVOKE_FUNC,
"got 0x%x\n", pfuncdesc->invkind);
2284 ok(pfuncdesc->callconv ==
CC_STDCALL,
"got 0x%x\n", pfuncdesc->callconv);
2285 ok(pfuncdesc->cParams == 1,
"got %d\n", pfuncdesc->cParams);
2286 ok(pfuncdesc->cParamsOpt == 0,
"got %d\n", pfuncdesc->cParamsOpt);
2287 ok(pfuncdesc->oVft == 6 *
ptr_size,
"got %d\n", pfuncdesc->oVft);
2288 ok(pfuncdesc->cScodes == 0,
"got %d\n", pfuncdesc->cScodes);
2289 ok(pfuncdesc->elemdescFunc.tdesc.vt ==
VT_VOID,
"got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
2290 ok(pfuncdesc->wFuncFlags == 0,
"got 0x%x\n", pfuncdesc->wFuncFlags);
2291
2292 edesc = pfuncdesc->lprgelemdescParam;
2293 ok(edesc->tdesc.vt ==
VT_INT,
"got: %d\n", edesc->tdesc.vt);
2294 ok(
U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT,
"got: 0x%x\n",
U(*edesc).paramdesc.wParamFlags);
2295 ok(
U(*edesc).paramdesc.pparamdescex !=
NULL,
"got: %p\n",
U(*edesc).paramdesc.pparamdescex);
2296 ok(
U(*edesc).paramdesc.pparamdescex->cBytes ==
sizeof(PARAMDESCEX),
"got: %d\n",
2297 U(*edesc).paramdesc.pparamdescex->cBytes);
2298 ok(
V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue) ==
VT_I4,
"got: %d\n",
2299 V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue));
2300 ok(
V_I4(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue) == 0x123,
"got: 0x%x\n",
2301 V_I4(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue));
2302
2303 ITypeInfo2_ReleaseFuncDesc(ti2, pfuncdesc);
2304
2305 U(elemdesc[0]).idldesc.dwReserved = 0;
2306 U(elemdesc[0]).idldesc.wIDLFlags = IDLFLAG_FIN;
2307 elemdesc[1].tdesc.vt =
VT_UI2;
2308 U(elemdesc[1]).paramdesc.wParamFlags = PARAMFLAG_FHASDEFAULT;
2309 U(elemdesc[1]).paramdesc.pparamdescex = ¶mdescex;
2311 V_UI2(¶mdescex.varDefaultValue) = 0xffff;
2312 funcdesc.cParams = 2;
2313 hres = ICreateTypeInfo_AddFuncDesc(createti, 3, &funcdesc);
2315
2316 hres = ITypeInfo2_GetFuncDesc(ti2, 3, &pfuncdesc);
2318
2319 ok(pfuncdesc->memid == 0x60010009,
"got %x\n", pfuncdesc->memid);
2320 ok(pfuncdesc->lprgscode ==
NULL,
"got %p\n", pfuncdesc->lprgscode);
2321 ok(pfuncdesc->lprgelemdescParam !=
NULL,
"got %p\n", pfuncdesc->lprgelemdescParam);
2322 ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL,
"got 0x%x\n", pfuncdesc->funckind);
2323 ok(pfuncdesc->invkind == INVOKE_FUNC,
"got 0x%x\n", pfuncdesc->invkind);
2324 ok(pfuncdesc->callconv ==
CC_STDCALL,
"got 0x%x\n", pfuncdesc->callconv);
2325 ok(pfuncdesc->cParams == 2,
"got %d\n", pfuncdesc->cParams);
2326 ok(pfuncdesc->cParamsOpt == 0,
"got %d\n", pfuncdesc->cParamsOpt);
2327 ok(pfuncdesc->oVft == 6 *
ptr_size,
"got %d\n", pfuncdesc->oVft);
2328 ok(pfuncdesc->cScodes == 0,
"got %d\n", pfuncdesc->cScodes);
2329 ok(pfuncdesc->elemdescFunc.tdesc.vt ==
VT_VOID,
"got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
2330 ok(pfuncdesc->wFuncFlags == 0,
"got 0x%x\n", pfuncdesc->wFuncFlags);
2331
2332 edesc = pfuncdesc->lprgelemdescParam;
2333 ok(edesc->tdesc.vt ==
VT_INT,
"got: %d\n", edesc->tdesc.vt);
2334 ok(
U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FIN,
"got: 0x%x\n",
U(*edesc).paramdesc.wParamFlags);
2335 ok(
U(*edesc).paramdesc.pparamdescex ==
NULL,
"got: %p\n",
U(*edesc).paramdesc.pparamdescex);
2336
2337 edesc = pfuncdesc->lprgelemdescParam + 1;
2338 ok(edesc->tdesc.vt ==
VT_UI2,
"got: %d\n", edesc->tdesc.vt);
2339 ok(
U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT,
"got: 0x%x\n",
U(*edesc).paramdesc.wParamFlags);
2340 ok(
U(*edesc).paramdesc.pparamdescex !=
NULL,
"got: %p\n",
U(*edesc).paramdesc.pparamdescex);
2341 ok(
U(*edesc).paramdesc.pparamdescex->cBytes ==
sizeof(PARAMDESCEX),
"got: %d\n",
2342 U(*edesc).paramdesc.pparamdescex->cBytes);
2343 ok(
V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue) ==
VT_UI2,
"got: %d\n",
2344 V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue));
2345 ok(
V_UI2(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue) == 0xFFFF,
"got: 0x%x\n",
2346 V_UI2(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue));
2347
2348 ITypeInfo2_ReleaseFuncDesc(ti2, pfuncdesc);
2349
2350 U(elemdesc[0]).paramdesc.wParamFlags = PARAMFLAG_FHASDEFAULT;
2351 U(elemdesc[0]).paramdesc.pparamdescex = ¶mdescex;
2352 elemdesc[1].tdesc.vt =
VT_INT;
2354 V_INT(¶mdescex.varDefaultValue) = 0xffffffff;
2355 hres = ICreateTypeInfo_AddFuncDesc(createti, 3, &funcdesc);
2357
2358 elemdesc[0].tdesc.vt =
VT_BSTR;
2359 elemdesc[1].tdesc.vt =
VT_BSTR;
2362 hres = ICreateTypeInfo_AddFuncDesc(createti, 3, &funcdesc);
2365
2368
2369 hres = ITypeInfo2_GetFuncDesc(ti2, 3, &pfuncdesc);
2371
2372 ok(pfuncdesc->memid == 0x6001000b,
"got %x\n", pfuncdesc->memid);
2373 ok(pfuncdesc->lprgscode ==
NULL,
"got %p\n", pfuncdesc->lprgscode);
2374 ok(pfuncdesc->lprgelemdescParam !=
NULL,
"got %p\n", pfuncdesc->lprgelemdescParam);
2375 ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL,
"got 0x%x\n", pfuncdesc->funckind);
2376 ok(pfuncdesc->invkind == INVOKE_FUNC,
"got 0x%x\n", pfuncdesc->invkind);
2377 ok(pfuncdesc->callconv ==
CC_STDCALL,
"got 0x%x\n", pfuncdesc->callconv);
2378 ok(pfuncdesc->cParams == 2,
"got %d\n", pfuncdesc->cParams);
2379 ok(pfuncdesc->cParamsOpt == 0,
"got %d\n", pfuncdesc->cParamsOpt);
2380 ok(pfuncdesc->oVft == 6 *
ptr_size,
"got %d\n", pfuncdesc->oVft);
2381 ok(pfuncdesc->cScodes == 0,
"got %d\n", pfuncdesc->cScodes);
2382 ok(pfuncdesc->elemdescFunc.tdesc.vt ==
VT_VOID,
"got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
2383 ok(pfuncdesc->wFuncFlags == 0,
"got 0x%x\n", pfuncdesc->wFuncFlags);
2384
2385 edesc = pfuncdesc->lprgelemdescParam;
2386 ok(edesc->tdesc.vt ==
VT_BSTR,
"got: %d\n", edesc->tdesc.vt);
2387 ok(
U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT,
"got: 0x%x\n",
U(*edesc).paramdesc.wParamFlags);
2388 ok(
U(*edesc).paramdesc.pparamdescex !=
NULL,
"got: %p\n",
U(*edesc).paramdesc.pparamdescex);
2389 ok(
U(*edesc).paramdesc.pparamdescex->cBytes ==
sizeof(PARAMDESCEX),
"got: %d\n",
2390 U(*edesc).paramdesc.pparamdescex->cBytes);
2391 ok(
V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue) ==
VT_BSTR,
"got: %d\n",
2392 V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue));
2394 "got: %s\n",
2396
2397 edesc = pfuncdesc->lprgelemdescParam + 1;
2398 ok(edesc->tdesc.vt ==
VT_BSTR,
"got: %d\n", edesc->tdesc.vt);
2399 ok(
U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT,
"got: 0x%x\n",
U(*edesc).paramdesc.wParamFlags);
2400 ok(
U(*edesc).paramdesc.pparamdescex !=
NULL,
"got: %p\n",
U(*edesc).paramdesc.pparamdescex);
2401 ok(
U(*edesc).paramdesc.pparamdescex->cBytes ==
sizeof(PARAMDESCEX),
"got: %d\n",
2402 U(*edesc).paramdesc.pparamdescex->cBytes);
2403 ok(
V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue) ==
VT_BSTR,
"got: %d\n",
2404 V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue));
2406 "got: %s\n",
2408
2409 ITypeInfo2_ReleaseFuncDesc(ti2, pfuncdesc);
2410
2412 U(elemdesc[0].tdesc).hreftype = hreftype;
2413 U(elemdesc[0]).paramdesc.pparamdescex = ¶mdescex;
2414 U(elemdesc[0]).paramdesc.wParamFlags = PARAMFLAG_FHASDEFAULT;
2416 V_INT(¶mdescex.varDefaultValue) = 0x789;
2417
2418 funcdesc.lprgelemdescParam = elemdesc;
2419 funcdesc.invkind = INVOKE_FUNC;
2420 funcdesc.cParams = 1;
2421 funcdesc.elemdescFunc.tdesc.vt =
VT_VOID;
2422
2423 hres = ICreateTypeInfo_AddFuncDesc(createti, 5, &funcdesc);
2425
2426 hres = ITypeInfo2_GetFuncDesc(ti2, 5, &pfuncdesc);
2428
2429 ok(pfuncdesc->memid == 0x60010005,
"got %x\n", pfuncdesc->memid);
2430 ok(pfuncdesc->lprgscode ==
NULL,
"got %p\n", pfuncdesc->lprgscode);
2431 ok(pfuncdesc->lprgelemdescParam !=
NULL,
"got %p\n", pfuncdesc->lprgelemdescParam);
2432 ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL,
"got 0x%x\n", pfuncdesc->funckind);
2433 ok(pfuncdesc->invkind == INVOKE_FUNC,
"got 0x%x\n", pfuncdesc->invkind);
2434 ok(pfuncdesc->callconv ==
CC_STDCALL,
"got 0x%x\n", pfuncdesc->callconv);
2435 ok(pfuncdesc->cParams == 1,
"got %d\n", pfuncdesc->cParams);
2436 ok(pfuncdesc->cParamsOpt == 0,
"got %d\n", pfuncdesc->cParamsOpt);
2437 ok(pfuncdesc->oVft == 8 *
ptr_size,
"got %d\n", pfuncdesc->oVft);
2438 ok(pfuncdesc->cScodes == 0,
"got %d\n", pfuncdesc->cScodes);
2439 ok(pfuncdesc->elemdescFunc.tdesc.vt ==
VT_VOID,
"got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
2440 ok(pfuncdesc->wFuncFlags == 0,
"got 0x%x\n", pfuncdesc->wFuncFlags);
2441
2442 edesc = pfuncdesc->lprgelemdescParam;
2443 ok(
U(*edesc).paramdesc.pparamdescex !=
NULL,
"got: %p\n",
U(*edesc).paramdesc.pparamdescex);
2444 ok(
U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT,
2445 "got: 0x%x\n",
U(*edesc).paramdesc.wParamFlags);
2447 ok(
U(edesc->tdesc).hreftype == hreftype,
"got: 0x%x\n",
U(edesc->tdesc).hreftype);
2448 ok(
V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue) ==
VT_INT,
"got: %d\n",
2449 V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue));
2450 ok(
V_INT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue) == 0x789,
"got: %d\n",
2451 V_INT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue));
2452
2453 ITypeInfo2_ReleaseFuncDesc(ti2, pfuncdesc);
2454
2456 U(elemdesc[0]).paramdesc.pparamdescex = ¶mdescex;
2457 U(elemdesc[0]).paramdesc.wParamFlags = PARAMFLAG_FHASDEFAULT;
2459 V_INT(¶mdescex.varDefaultValue) = 3;
2460
2461 funcdesc.lprgelemdescParam = elemdesc;
2462 funcdesc.invkind = INVOKE_FUNC;
2463 funcdesc.cParams = 1;
2465
2466 hres = ICreateTypeInfo_AddFuncDesc(createti, 6, &funcdesc);
2468
2469 hres = ITypeInfo2_GetFuncDesc(ti2, 6, &pfuncdesc);
2471
2472 ok(pfuncdesc->memid == 0x60010006,
"got %x\n", pfuncdesc->memid);
2473 ok(pfuncdesc->lprgscode ==
NULL,
"got %p\n", pfuncdesc->lprgscode);
2474 ok(pfuncdesc->lprgelemdescParam !=
NULL,
"got %p\n", pfuncdesc->lprgelemdescParam);
2475 ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL,
"got 0x%x\n", pfuncdesc->funckind);
2476 ok(pfuncdesc->invkind == INVOKE_FUNC,
"got 0x%x\n", pfuncdesc->invkind);
2477 ok(pfuncdesc->callconv ==
CC_STDCALL,
"got 0x%x\n", pfuncdesc->callconv);
2478 ok(pfuncdesc->cParams == 1,
"got %d\n", pfuncdesc->cParams);
2479 ok(pfuncdesc->cParamsOpt == 0,
"got %d\n", pfuncdesc->cParamsOpt);
2480 ok(pfuncdesc->oVft == 9 *
ptr_size,
"got %d\n", pfuncdesc->oVft);
2481 ok(pfuncdesc->cScodes == 0,
"got %d\n", pfuncdesc->cScodes);
2482 ok(pfuncdesc->elemdescFunc.tdesc.vt ==
VT_VARIANT,
"got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
2483 ok(pfuncdesc->wFuncFlags == 0,
"got 0x%x\n", pfuncdesc->wFuncFlags);
2484
2485 edesc = pfuncdesc->lprgelemdescParam;
2486 ok(
U(*edesc).paramdesc.pparamdescex !=
NULL,
"got: %p\n",
U(*edesc).paramdesc.pparamdescex);
2487 ok(
U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT,
2488 "got: 0x%x\n",
U(*edesc).paramdesc.wParamFlags);
2489 ok(edesc->tdesc.vt ==
VT_VARIANT,
"got: %d\n", edesc->tdesc.vt);
2490 ok(
V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue) ==
VT_INT,
"got: %d\n",
2491 V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue));
2492 ok(
V_INT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue) == 3,
"got: %d\n",
2493 V_INT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue));
2494
2495 ITypeInfo2_ReleaseFuncDesc(ti2, pfuncdesc);
2496
2497 hres = ITypeInfo_GetDocumentation(interface1, 0, &
name, &docstring, &helpcontext, &
helpfile);
2500 ok(docstring ==
NULL,
"docstring != NULL\n");
2501 ok(helpcontext == 0x201,
"helpcontext != 0x201\n");
2503
2505
2506 hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 1000,
NULL, 1);
2508
2509 hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 1000, names1, 1);
2511
2512 hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 0, names1, 2);
2514
2515 hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 0, names2, 1);
2517
2518 hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 0, names1, 1);
2520
2524
2526
2527 hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 3, names2, 3);
2529
2530 hres = ICreateTypeInfo_SetFuncAndParamNames(createti, 3, names1, 3);
2532
2533 ITypeInfo2_Release(ti2);
2534 ICreateTypeInfo_Release(createti);
2535
2538
2541
2542 hres = ICreateTypeInfo_SetGuid(createti, &interface2guid);
2544
2545 hres = ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo, (
void**)&interface2);
2547
2548 hres = ITypeInfo_GetRefTypeOfImplType(interface2, 0, &hreftype);
2550
2551 hres = ICreateTypeInfo_AddRefTypeInfo(createti, interface1, &hreftype);
2553
2554 hres = ITypeInfo_GetRefTypeInfo(interface2, 0, &ti);
2556 ok(ti == interface1,
"Received and added interfaces are different\n");
2557
2558 ITypeInfo_Release(ti);
2559
2560 hres = ICreateTypeInfo_AddImplType(createti, 0, hreftype);
2562
2563 hres = ITypeInfo_GetRefTypeOfImplType(interface2, 0, &hreftype);
2565 ok(hreftype == 2,
"hreftype = %d\n", hreftype);
2566
2567 hres = ITypeInfo_GetRefTypeOfImplType(interface2, -1, &hreftype);
2569
2570 hres = ICreateTypeInfo_SetImplTypeFlags(createti, 0, IMPLTYPEFLAG_FDEFAULT);
2572
2573 hres = ITypeInfo_GetImplTypeFlags(interface2, 0, &impltypeflags);
2575 ok(impltypeflags == 0,
"impltypeflags = %x\n", impltypeflags);
2576
2577 hres = ITypeInfo_GetImplTypeFlags(interface2, 1, &impltypeflags);
2579
2580 funcdesc.elemdescFunc.tdesc.vt =
VT_VOID;
2581 funcdesc.oVft = 0xaaac;
2582 hres = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc);
2585 funcdesc.oVft = 0xaab0;
2586 hres = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc);
2587 }
2589 funcdesc.oVft = 0xaaa8;
2590 hres = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc);
2592
2593 hres = ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo, (
void**)&ti2);
2595
2596 hres = ITypeInfo2_GetFuncDesc(ti2, 0, &pfuncdesc);
2598
2599 ok(pfuncdesc->memid == 0x60020000,
"got %x\n", pfuncdesc->memid);
2600 ok(pfuncdesc->lprgscode ==
NULL,
"got %p\n", pfuncdesc->lprgscode);
2601 ok(pfuncdesc->lprgelemdescParam !=
NULL,
"got %p\n", pfuncdesc->lprgelemdescParam);
2602 ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL,
"got 0x%x\n", pfuncdesc->funckind);
2603 ok(pfuncdesc->invkind == INVOKE_FUNC,
"got 0x%x\n", pfuncdesc->invkind);
2604 ok(pfuncdesc->callconv ==
CC_STDCALL,
"got 0x%x\n", pfuncdesc->callconv);
2605 ok(pfuncdesc->cParams == 1,
"got %d\n", pfuncdesc->cParams);
2606 ok(pfuncdesc->cParamsOpt == 0,
"got %d\n", pfuncdesc->cParamsOpt);
2607 ok(pfuncdesc->oVft == (
short)0xaaa8,
"got %d\n", pfuncdesc->oVft);
2608 ok(pfuncdesc->cScodes == 0,
"got %d\n", pfuncdesc->cScodes);
2609 ok(pfuncdesc->elemdescFunc.tdesc.vt ==
VT_VOID,
"got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
2610 ok(pfuncdesc->wFuncFlags == 0,
"got 0x%x\n", pfuncdesc->wFuncFlags);
2611
2612 ITypeInfo2_ReleaseFuncDesc(ti2, pfuncdesc);
2613 ITypeInfo2_Release(ti2);
2614
2615 funcdesc.oVft = 0;
2616
2617 ICreateTypeInfo_Release(createti);
2618
2620
2623
2624 hres = ICreateTypeInfo_QueryInterface(createti, &IID_ICreateTypeInfo2, (
void**)&createti2);
2626
2627 hres = ICreateTypeInfo2_QueryInterface(createti2, &IID_ITypeInfo2, (
void**)&ti2);
2629
2632
2633 hres = ITypeInfo2_GetCustData(ti2, &custguid,
NULL);
2635
2636 hres = ITypeInfo2_GetCustData(ti2, &custguid, &cust_data);
2638
2639 hres = ICreateTypeInfo2_SetCustData(createti2,
NULL,
NULL);
2641
2642 hres = ICreateTypeInfo2_SetCustData(createti2, &custguid,
NULL);
2644
2645 hres = ICreateTypeInfo2_SetCustData(createti2, &custguid, &cust_data);
2647
2649 V_I4(&cust_data) = 0xdeadbeef;
2650
2651 hres = ICreateTypeInfo2_SetCustData(createti2, &custguid, &cust_data);
2653
2654 V_I4(&cust_data) = 0;
2656
2657 hres = ITypeInfo2_GetCustData(ti2, &custguid, &cust_data);
2659
2661 ok(
V_I4(&cust_data) == 0xdeadbeef,
"got 0x%08x\n",
V_I4(&cust_data));
2662
2664 V_I4(&cust_data) = 12345678;
2665
2666 hres = ICreateTypeInfo2_SetCustData(createti2, &custguid, &cust_data);
2668
2669 V_I4(&cust_data) = 0;
2671
2672 hres = ITypeInfo2_GetCustData(ti2, &custguid, &cust_data);
2674
2676 ok(
V_I4(&cust_data) == 12345678,
"got 0x%08x\n",
V_I4(&cust_data));
2677
2680
2681 hres = ICreateTypeInfo2_SetCustData(createti2, &custguid, &cust_data);
2683
2685 V_I4(&cust_data) = 0;
2687
2688 hres = ITypeInfo2_GetCustData(ti2, &custguid, &cust_data);
2690
2694
2696 V_UI4(&cust_data) = 17;
2697
2698 hres = ITypeInfo2_GetCustData(ti2, &bogusguid, &cust_data);
2700
2702
2703 ITypeInfo2_Release(ti2);
2704 ICreateTypeInfo2_Release(createti2);
2705 ICreateTypeInfo_Release(createti);
2706
2707 hres = ICreateTypeLib2_CreateTypeInfo(createtl, coclassW,
TKIND_COCLASS, &createti);
2709
2710 hres = ICreateTypeInfo_AddRefTypeInfo(createti, interface1, &hreftype);
2712
2713 hres = ICreateTypeInfo_AddImplType(createti, 0, hreftype);
2715
2716 hres = ICreateTypeInfo_AddImplType(createti, 0, hreftype);
2718
2719 hres = ICreateTypeInfo_AddRefTypeInfo(createti,
unknown, &hreftype);
2721
2722 hres = ICreateTypeInfo_AddImplType(createti, 1, hreftype);
2724
2725 hres = ICreateTypeInfo_AddImplType(createti, 1, hreftype);
2727
2728 hres = ICreateTypeInfo_AddImplType(createti, 2, hreftype);
2730
2731 hres = ICreateTypeInfo_SetImplTypeFlags(createti, 0, IMPLTYPEFLAG_FDEFAULT);
2733
2734 hres = ICreateTypeInfo_SetImplTypeFlags(createti, 1, IMPLTYPEFLAG_FRESTRICTED);
2736
2737 hres = ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo, (
void**)&ti);
2739
2740 hres = ITypeInfo_GetImplTypeFlags(ti, 0,
NULL);
2742
2743 hres = ITypeInfo_GetImplTypeFlags(ti, 0, &impltypeflags);
2745 ok(impltypeflags == IMPLTYPEFLAG_FDEFAULT,
"impltypeflags = %x\n", impltypeflags);
2746
2747 hres = ITypeInfo_GetImplTypeFlags(ti, 1, &impltypeflags);
2749 ok(impltypeflags == IMPLTYPEFLAG_FRESTRICTED,
"impltypeflags = %x\n", impltypeflags);
2750
2751 hres = ITypeInfo_GetImplTypeFlags(ti, 2, &impltypeflags);
2753 ok(impltypeflags == 0,
"impltypeflags = %x\n", impltypeflags);
2754
2755 hres = ITypeInfo_GetRefTypeOfImplType(ti, 0, &hreftype);
2757 ok(hreftype == 0,
"hreftype = %d\n", hreftype);
2758
2759 hres = ITypeInfo_GetRefTypeOfImplType(ti, 1, &hreftype);
2761 ok(hreftype == 1,
"hreftype = %d\n", hreftype);
2762
2763 hres = ITypeInfo_GetRefTypeOfImplType(ti, 2, &hreftype);
2765 ok(hreftype == 1,
"hreftype = %d\n", hreftype);
2766
2767 hres = ITypeInfo_GetRefTypeOfImplType(ti, -1, &hreftype);
2769
2770 ITypeInfo_Release(ti);
2771
2772 ICreateTypeInfo_Release(createti);
2773
2776
2777 hres = ICreateTypeInfo_SetTypeFlags(createti, TYPEFLAG_FDUAL);
2779
2780 hres = ICreateTypeInfo_AddFuncDesc(createti, 0, &funcdesc);
2782
2783 hres = ICreateTypeInfo_AddRefTypeInfo(createti,
dispatch, &hreftype);
2785
2786 hres = ICreateTypeInfo_AddImplType(createti, 0, hreftype);
2788
2789 hres = ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo, (
void**)&dual);
2791
2792 hres = ITypeInfo_GetTypeAttr(dual, &typeattr);
2794 ok(typeattr->cbSizeInstance ==
ptr_size,
"cbSizeInstance = %d\n", typeattr->cbSizeInstance);
2795 ok(typeattr->typekind == 3,
"typekind = %d\n", typeattr->typekind);
2796 ok(typeattr->cFuncs == 1,
"cFuncs = %d\n", typeattr->cFuncs);
2797 ok(typeattr->cVars == 0,
"cVars = %d\n", typeattr->cVars);
2798 ok(typeattr->cImplTypes == 1,
"cImplTypes = %d\n", typeattr->cImplTypes);
2799 ok(typeattr->cbSizeVft == 8 *
ptr_size,
"cbSizeVft = %d\n", typeattr->cbSizeVft);
2800 ok(typeattr->cbAlignment == 4,
"cbAlignment = %d\n", typeattr->cbAlignment);
2801 ok(typeattr->wTypeFlags == (TYPEFLAG_FDISPATCHABLE|TYPEFLAG_FDUAL),
"wTypeFlags = %d\n", typeattr->wTypeFlags);
2802 ok(typeattr->wMajorVerNum == 0,
"wMajorVerNum = %d\n", typeattr->wMajorVerNum);
2803 ok(typeattr->wMinorVerNum == 0,
"wMinorVerNum = %d\n", typeattr->wMinorVerNum);
2804
2805 ITypeInfo_ReleaseTypeAttr(dual, typeattr);
2806
2807 hres = ITypeInfo_GetRefTypeOfImplType(dual, -1, &hreftype);
2809 ok(hreftype == -2,
"got %08x\n", hreftype);
2810
2811 hres = ITypeInfo_GetRefTypeInfo(dual, -2, &ti);
2813
2814 hres = ITypeInfo_GetTypeAttr(ti, &typeattr);
2816 ok(typeattr->cbSizeInstance ==
ptr_size,
"cbSizeInstance = %d\n", typeattr->cbSizeInstance);
2817 ok(typeattr->typekind == 4,
"typekind = %d\n", typeattr->typekind);
2818 ok(typeattr->cFuncs == 8,
"cFuncs = %d\n", typeattr->cFuncs);
2819 ok(typeattr->cVars == 0,
"cVars = %d\n", typeattr->cVars);
2820 ok(typeattr->cImplTypes == 1,
"cImplTypes = %d\n", typeattr->cImplTypes);
2821 ok(typeattr->cbSizeVft == 7 *
sizeof(
void *),
"cbSizeVft = %d\n", typeattr->cbSizeVft);
2822 ok(typeattr->cbAlignment == 4,
"cbAlignment = %d\n", typeattr->cbAlignment);
2823 ok(typeattr->wTypeFlags == (TYPEFLAG_FDISPATCHABLE|TYPEFLAG_FDUAL),
"wTypeFlags = %d\n", typeattr->wTypeFlags);
2824 ok(typeattr->wMajorVerNum == 0,
"wMajorVerNum = %d\n", typeattr->wMajorVerNum);
2825 ok(typeattr->wMinorVerNum == 0,
"wMinorVerNum = %d\n", typeattr->wMinorVerNum);
2826
2827 ITypeInfo_ReleaseTypeAttr(ti, typeattr);
2828
2829 ITypeInfo_Release(ti);
2830
2831 hres = ICreateTypeInfo_SetTypeDescAlias(createti, &typedesc1);
2833
2834 ICreateTypeInfo_Release(createti);
2835
2836 hres = ITypeInfo_GetTypeAttr(interface1, &typeattr);
2838 ok(typeattr->cbSizeInstance ==
ptr_size,
"cbSizeInstance = %d\n", typeattr->cbSizeInstance);
2839 ok(typeattr->typekind == 3,
"typekind = %d\n", typeattr->typekind);
2840 ok(typeattr->cFuncs == 13,
"cFuncs = %d\n", typeattr->cFuncs);
2841 ok(typeattr->cVars == 0,
"cVars = %d\n", typeattr->cVars);
2842 ok(typeattr->cImplTypes == 1,
"cImplTypes = %d\n", typeattr->cImplTypes);
2843 ok(typeattr->cbSizeVft == 16 *
ptr_size,
"cbSizeVft = %d\n", typeattr->cbSizeVft);
2844 ok(typeattr->cbAlignment == 4,
"cbAlignment = %d\n", typeattr->cbAlignment);
2845 ok(typeattr->wTypeFlags == 0,
"wTypeFlags = %d\n", typeattr->wTypeFlags);
2846 ok(typeattr->wMajorVerNum == 0,
"wMajorVerNum = %d\n", typeattr->wMajorVerNum);
2847 ok(typeattr->wMinorVerNum == 0,
"wMinorVerNum = %d\n", typeattr->wMinorVerNum);
2848
2849 ITypeInfo_ReleaseTypeAttr(interface1, typeattr);
2850
2851 hres = ITypeInfo_GetTypeAttr(interface2, &typeattr);
2853 ok(typeattr->cbSizeInstance ==
ptr_size,
"cbSizeInstance = %d\n", typeattr->cbSizeInstance);
2854 ok(typeattr->typekind == 3,
"typekind = %d\n", typeattr->typekind);
2855 ok(typeattr->cFuncs == 2,
"cFuncs = %d\n", typeattr->cFuncs);
2856 ok(typeattr->cVars == 0,
"cVars = %d\n", typeattr->cVars);
2857 ok(typeattr->cImplTypes == 1,
"cImplTypes = %d\n", typeattr->cImplTypes);
2858 ok((sys ==
SYS_WIN32 && typeattr->cbSizeVft == 0xaab0) ||
2859 (sys ==
SYS_WIN64 && typeattr->cbSizeVft == 0xaab8),
2860 "cbSizeVft = 0x%x\n", typeattr->cbSizeVft);
2861 ok(typeattr->cbAlignment == 4,
"cbAlignment = %d\n", typeattr->cbAlignment);
2862 ok(typeattr->wTypeFlags == 0,
"wTypeFlags = %d\n", typeattr->wTypeFlags);
2863 ok(typeattr->wMajorVerNum == 0,
"wMajorVerNum = %d\n", typeattr->wMajorVerNum);
2864 ok(typeattr->wMinorVerNum == 0,
"wMinorVerNum = %d\n", typeattr->wMinorVerNum);
2865
2866 ITypeInfo_ReleaseTypeAttr(interface2, typeattr);
2867
2868 ok(ITypeInfo_Release(interface2)==0,
"Object should be freed\n");
2869 ok(ITypeInfo_Release(interface1)==0,
"Object should be freed\n");
2870 ok(ITypeInfo_Release(dual)==0,
"Object should be freed\n");
2871
2872 hres = ICreateTypeLib2_CreateTypeInfo(createtl, aliasW,
TKIND_ALIAS, &createti);
2874
2875 hres = ICreateTypeInfo_QueryInterface(createti, &IID_ITypeInfo, (
void**)&interface1);
2877
2878 if(0){
2879
2880
2881 hres = ITypeInfo_GetTypeAttr(interface1, &typeattr);
2883 ok(typeattr->cbSizeInstance == 0xffffffb4,
"cbSizeInstance = %d\n", typeattr->cbSizeInstance);
2884 ok(typeattr->typekind ==
TKIND_ALIAS,
"typekind = %d\n", typeattr->typekind);
2885 ok(typeattr->cFuncs == 0,
"cFuncs = %d\n", typeattr->cFuncs);
2886 ok(typeattr->cVars == 0,
"cVars = %d\n", typeattr->cVars);
2887 ok(typeattr->cImplTypes == 0,
"cImplTypes = %d\n", typeattr->cImplTypes);
2888 ok(typeattr->cbSizeVft == 0,
"cbSizeVft = %d\n", typeattr->cbSizeVft);
2889 ok(typeattr->cbAlignment == 0,
"cbAlignment = %d\n", typeattr->cbAlignment);
2890 ok(typeattr->wTypeFlags == 0,
"wTypeFlags = %d\n", typeattr->wTypeFlags);
2891 ok(typeattr->wMajorVerNum == 0,
"wMajorVerNum = %d\n", typeattr->wMajorVerNum);
2892 ok(typeattr->wMinorVerNum == 0,
"wMinorVerNum = %d\n", typeattr->wMinorVerNum);
2893 ok(typeattr->tdescAlias.vt ==
VT_EMPTY,
"Got wrong tdescAlias.vt: %u\n", typeattr->tdescAlias.vt);
2894 ITypeInfo_ReleaseTypeAttr(interface1, typeattr);
2895 }
2896
2897 hres = ICreateTypeInfo_SetTypeDescAlias(createti,
NULL);
2899
2900 typedesc1.vt =
VT_I1;
2901 hres = ICreateTypeInfo_SetTypeDescAlias(createti, &typedesc1);
2903
2904 hres = ITypeInfo_GetTypeAttr(interface1, &typeattr);
2906 ok(typeattr->cbSizeInstance == 1,
"cbSizeInstance = %d\n", typeattr->cbSizeInstance);
2907 ok(typeattr->typekind ==
TKIND_ALIAS,
"typekind = %d\n", typeattr->typekind);
2908 ok(typeattr->cFuncs == 0,
"cFuncs = %d\n", typeattr->cFuncs);
2909 ok(typeattr->cVars == 0,
"cVars = %d\n", typeattr->cVars);
2910 ok(typeattr->cImplTypes == 0,
"cImplTypes = %d\n", typeattr->cImplTypes);
2911 ok(typeattr->cbSizeVft == 0,
"cbSizeVft = %d\n", typeattr->cbSizeVft);
2912 ok(typeattr->cbAlignment == 1,
"cbAlignment = %d\n", typeattr->cbAlignment);
2913 ok(typeattr->wTypeFlags == 0,
"wTypeFlags = %d\n", typeattr->wTypeFlags);
2914 ok(typeattr->wMajorVerNum == 0,
"wMajorVerNum = %d\n", typeattr->wMajorVerNum);
2915 ok(typeattr->wMinorVerNum == 0,
"wMinorVerNum = %d\n", typeattr->wMinorVerNum);
2916 ok(typeattr->tdescAlias.vt ==
VT_I1,
"Got wrong tdescAlias.vt: %u\n", typeattr->tdescAlias.vt);
2917 ITypeInfo_ReleaseTypeAttr(interface1, typeattr);
2918
2919 typedesc1.vt =
VT_R8;
2920 hres = ICreateTypeInfo_SetTypeDescAlias(createti, &typedesc1);
2922
2923 hres = ITypeInfo_GetTypeAttr(interface1, &typeattr);
2925 ok(typeattr->cbSizeInstance == 8,
"cbSizeInstance = %d\n", typeattr->cbSizeInstance);
2926 ok(typeattr->typekind ==
TKIND_ALIAS,
"typekind = %d\n", typeattr->typekind);
2927 ok(typeattr->cFuncs == 0,
"cFuncs = %d\n", typeattr->cFuncs);
2928 ok(typeattr->cVars == 0,
"cVars = %d\n", typeattr->cVars);
2929 ok(typeattr->cImplTypes == 0,
"cImplTypes = %d\n", typeattr->cImplTypes);
2930 ok(typeattr->cbSizeVft == 0,
"cbSizeVft = %d\n", typeattr->cbSizeVft);
2931 ok(typeattr->cbAlignment == 4,
"cbAlignment = %d\n", typeattr->cbAlignment);
2932 ok(typeattr->wTypeFlags == 0,
"wTypeFlags = %d\n", typeattr->wTypeFlags);
2933 ok(typeattr->wMajorVerNum == 0,
"wMajorVerNum = %d\n", typeattr->wMajorVerNum);
2934 ok(typeattr->wMinorVerNum == 0,
"wMinorVerNum = %d\n", typeattr->wMinorVerNum);
2935 ok(typeattr->tdescAlias.vt ==
VT_R8,
"Got wrong tdescAlias.vt: %u\n", typeattr->tdescAlias.vt);
2936 ITypeInfo_ReleaseTypeAttr(interface1, typeattr);
2937
2938 ITypeInfo_Release(interface1);
2939 ICreateTypeInfo_Release(createti);
2940
2941 hres = ICreateTypeLib2_SaveAllChanges(createtl);
2943
2944 ok(ICreateTypeLib2_Release(createtl)==0,
"Object should be freed\n");
2945
2946 ok(ITypeInfo_Release(
dispatch)==0,
"Object should be freed\n");
2947 ok(ITypeInfo_Release(
unknown)==0,
"Object should be freed\n");
2948 ok(ITypeLib_Release(
stdole)==0,
"Object should be freed\n");
2949
2952
2953 hres = ITypeLib_GetLibAttr(tl, &libattr);
2955 ok(libattr->syskind == sys,
"syskind = %d\n", libattr->syskind);
2956 ok(libattr->wMajorVerNum == 0,
"wMajorVer = %d\n", libattr->wMajorVerNum);
2957 ok(libattr->wMinorVerNum == 0,
"wMinorVerNum = %d\n", libattr->wMinorVerNum);
2959 ITypeLib_ReleaseTLibAttr(tl, libattr);
2960
2961 found = 2;
2962 memset(tinfos, 0,
sizeof(tinfos));
2963 memids[0] = 0xdeadbeef;
2964 memids[1] = 0xdeadbeef;
2965 hres = ITypeLib_FindName(tl, param1W, 0, tinfos, memids, &found);
2967 ok(found == 0,
"got wrong count: %u\n", found);
2968 ok(tinfos[0] ==
NULL,
"got invalid typeinfo[0]\n");
2969 ok(tinfos[1] ==
NULL,
"got invalid typeinfo[1]\n");
2970 ok(memids[0] == 0xdeadbeef,
"got invalid memid[0]\n");
2971 ok(memids[1] == 0xdeadbeef,
"got invalid memid[1]\n");
2972
2973 found = 2;
2974 memset(tinfos, 0,
sizeof(tinfos));
2975 memids[0] = 0xdeadbeef;
2976 memids[1] = 0xdeadbeef;
2977 hres = ITypeLib_FindName(tl, func1W, 0, tinfos, memids, &found);
2979 ok(found == 1,
"got wrong count: %u\n", found);
2980 ok(tinfos[0] !=
NULL,
"got invalid typeinfo[0]\n");
2981 ok(tinfos[1] ==
NULL,
"got invalid typeinfo[1]\n");
2982 ok(memids[0] == 0,
"got invalid memid[0]\n");
2983 ok(memids[1] == 0xdeadbeef,
"got invalid memid[1]\n");
2984 if(tinfos[0])
2985 ITypeInfo_Release(tinfos[0]);
2986
2987 found = 2;
2988 memset(tinfos, 0,
sizeof(tinfos));
2989 memids[0] = 0xdeadbeef;
2990 memids[1] = 0xdeadbeef;
2991 hres = ITypeLib_FindName(tl, interface1W, 0, tinfos, memids, &found);
2993 ok(found == 1,
"got wrong count: %u\n", found);
2994 ok(tinfos[0] !=
NULL,
"got invalid typeinfo[0]\n");
2995 ok(tinfos[1] ==
NULL,
"got invalid typeinfo[1]\n");
2996 ok(memids[0] ==
MEMBERID_NIL,
"got invalid memid[0]: %x\n", memids[0]);
2997 ok(memids[1] == 0xdeadbeef,
"got invalid memid[1]\n");
2998 if(tinfos[0])
2999 ITypeInfo_Release(tinfos[0]);
3000
3001 hres = ITypeLib_GetDocumentation(tl, -1, &
name, &docstring, &helpcontext, &
helpfile);
3006 ok(helpcontext == 0,
"got wrong helpcontext: 0x%x\n", helpcontext);
3011
3012 hres = ITypeLib_GetDocumentation(tl, 0, &
name, &docstring, &helpcontext, &
helpfile);
3014 ok(
memcmp(interface1W,
name,
sizeof(interface1W)) == 0,
"got wrong typeinfo name: %s\n",
3017 ok(helpcontext == 0,
"got wrong helpcontext: 0x%x\n", helpcontext);
3022
3023 hres = ITypeLib_QueryInterface(tl, &IID_ITypeLib2, (
void**)&tl2);
3026 V_I4(&cust_data) = 0;
3027 hres = ITypeLib2_GetCustData(tl2, &tlcustguid, &cust_data);
3029 ok(
V_VT(&cust_data) ==
VT_I4,
"V_VT(&cust_data) = %d\n",
V_VT(&cust_data));
3030 ok(
V_I4(&cust_data) == 1,
"V_I4(&cust_data) = %d\n",
V_I4(&cust_data));
3031 ITypeLib2_Release(tl2);
3032
3033 hres = ITypeLib_GetTypeInfo(tl, 0, &ti);
3035
3036 hres = ITypeInfo_GetTypeAttr(ti, &typeattr);
3038 ok(typeattr->cbSizeInstance ==
sizeof(
void*),
"cbSizeInstance = %d\n", typeattr->cbSizeInstance);
3039 ok(typeattr->typekind ==
TKIND_INTERFACE,
"typekind = %d\n", typeattr->typekind);
3040 ok(typeattr->cFuncs == 13,
"cFuncs = %d\n", typeattr->cFuncs);
3041 ok(typeattr->cVars == 0,
"cVars = %d\n", typeattr->cVars);
3042 ok(typeattr->cImplTypes == 1,
"cImplTypes = %d\n", typeattr->cImplTypes);
3044 ok(typeattr->cbSizeVft == 16 *
sizeof(
void*),
"cbSizeVft = %d\n", typeattr->cbSizeVft);
3045 ok(typeattr->cbAlignment == alignment,
"cbAlignment = %d\n", typeattr->cbAlignment);
3046 ok(typeattr->wTypeFlags == 0,
"wTypeFlags = %d\n", typeattr->wTypeFlags);
3047 ok(typeattr->wMajorVerNum == 0,
"wMajorVerNum = %d\n", typeattr->wMajorVerNum);
3048 ok(typeattr->wMinorVerNum == 0,
"wMinorVerNum = %d\n", typeattr->wMinorVerNum);
3049 ITypeInfo_ReleaseTypeAttr(ti, typeattr);
3050
3051 hres = ITypeInfo_GetRefTypeOfImplType(ti, 0, &hreftype);
3053 ok(hreftype == 3,
"hreftype = %d\n", hreftype);
3054
3055 hres = ITypeInfo_GetRefTypeInfo(ti, hreftype, &
unknown);
3057
3061 ITypeInfo_ReleaseTypeAttr(
unknown, typeattr);
3062
3064
3065 hres = ITypeInfo_GetFuncDesc(ti, 0, &pfuncdesc);
3067 ok(pfuncdesc->memid == 0,
"got %x\n", pfuncdesc->memid);
3068 ok(pfuncdesc->lprgscode ==
NULL,
"got %p\n", pfuncdesc->lprgscode);
3069 ok(pfuncdesc->lprgelemdescParam !=
NULL,
"got %p\n", pfuncdesc->lprgelemdescParam);
3070 ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL,
"got 0x%x\n", pfuncdesc->funckind);
3071 ok(pfuncdesc->invkind == INVOKE_PROPERTYPUTREF,
"got 0x%x\n", pfuncdesc->invkind);
3072 ok(pfuncdesc->callconv ==
CC_STDCALL,
"got 0x%x\n", pfuncdesc->callconv);
3073 ok(pfuncdesc->cParams == 1,
"got %d\n", pfuncdesc->cParams);
3074 ok(pfuncdesc->cParamsOpt == 0,
"got %d\n", pfuncdesc->cParamsOpt);
3075 ok(pfuncdesc->cScodes == 0,
"got %d\n", pfuncdesc->cScodes);
3076 ok(pfuncdesc->elemdescFunc.tdesc.vt ==
VT_VOID,
"got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
3077 ok(pfuncdesc->wFuncFlags == 0,
"got 0x%x\n", pfuncdesc->wFuncFlags);
3078 edesc = pfuncdesc->lprgelemdescParam;
3079 ok(edesc->tdesc.vt ==
VT_BSTR,
"got: %d\n", edesc->tdesc.vt);
3080 ok(
U(*edesc).idldesc.wIDLFlags == IDLFLAG_FIN,
"got: %x\n",
U(*edesc).idldesc.wIDLFlags);
3081
3082 hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &
name, &docstring, &helpcontext, &
helpfile);
3086 ok(helpcontext == 0x201,
"got helpcontext: 0x%x\n", helpcontext);
3090
3091 hres = ITypeInfo_GetNames(ti, pfuncdesc->memid,
NULL, 0, &cnames);
3093
3094 cnames = 8;
3095 hres = ITypeInfo_GetNames(ti, pfuncdesc->memid,
names, 0, &cnames);
3097 ok(cnames == 0,
"got: %u\n", cnames);
3098
3101 ok(cnames == 1,
"got: %u\n", cnames);
3104
3105 ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
3106
3107 hres = ITypeInfo_GetFuncDesc(ti, 1, &pfuncdesc);
3109 ok(pfuncdesc->memid == 0x60010001,
"got %x\n", pfuncdesc->memid);
3110 ok(pfuncdesc->lprgscode ==
NULL,
"got %p\n", pfuncdesc->lprgscode);
3111 ok(pfuncdesc->lprgelemdescParam ==
NULL,
"got %p\n", pfuncdesc->lprgelemdescParam);
3112 ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL,
"got 0x%x\n", pfuncdesc->funckind);
3113 ok(pfuncdesc->invkind == INVOKE_FUNC,
"got 0x%x\n", pfuncdesc->invkind);
3114 ok(pfuncdesc->callconv ==
CC_STDCALL,
"got 0x%x\n", pfuncdesc->callconv);
3115 ok(pfuncdesc->cParams == 0,
"got %d\n", pfuncdesc->cParams);
3116 ok(pfuncdesc->cParamsOpt == 0,
"got %d\n", pfuncdesc->cParamsOpt);
3117 ok(pfuncdesc->oVft == 4 *
sizeof(
void*),
"got %d\n", pfuncdesc->oVft);
3118 ok(pfuncdesc->cScodes == 0,
"got %d\n", pfuncdesc->cScodes);
3119 ok(pfuncdesc->elemdescFunc.tdesc.vt ==
VT_VOID,
"got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
3120 ok(pfuncdesc->wFuncFlags == 0,
"got 0x%x\n", pfuncdesc->wFuncFlags);
3121
3122 hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &
name, &docstring, &helpcontext, &
helpfile);
3126 ok(helpcontext == 0,
"got helpcontext: 0x%x\n", helpcontext);
3129 ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
3130
3131 hres = ITypeInfo_GetFuncDesc(ti, 2, &pfuncdesc);
3133 ok(pfuncdesc->memid == 0x1,
"got %x\n", pfuncdesc->memid);
3134 ok(pfuncdesc->lprgscode ==
NULL,
"got %p\n", pfuncdesc->lprgscode);
3135 ok(pfuncdesc->lprgelemdescParam ==
NULL,
"got %p\n", pfuncdesc->lprgelemdescParam);
3136 ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL,
"got 0x%x\n", pfuncdesc->funckind);
3137 ok(pfuncdesc->invkind == INVOKE_FUNC,
"got 0x%x\n", pfuncdesc->invkind);
3138 ok(pfuncdesc->callconv ==
CC_STDCALL,
"got 0x%x\n", pfuncdesc->callconv);
3139 ok(pfuncdesc->cParams == 0,
"got %d\n", pfuncdesc->cParams);
3140 ok(pfuncdesc->cParamsOpt == 0,
"got %d\n", pfuncdesc->cParamsOpt);
3141 ok(pfuncdesc->oVft == 5 *
sizeof(
void*),
"got %d\n", pfuncdesc->oVft);
3142 ok(pfuncdesc->cScodes == 0,
"got %d\n", pfuncdesc->cScodes);
3143 ok(pfuncdesc->elemdescFunc.tdesc.vt ==
VT_VOID,
"got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
3144 ok(pfuncdesc->wFuncFlags == 0,
"got 0x%x\n", pfuncdesc->wFuncFlags);
3145
3146 hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &
name, &docstring, &helpcontext, &
helpfile);
3150 ok(helpcontext == 0,
"got helpcontext: 0x%x\n", helpcontext);
3153 ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
3154
3155 hres = ITypeInfo_GetFuncDesc(ti, 3, &pfuncdesc);
3157 ok(pfuncdesc->memid == 0x6001000b,
"got %x\n", pfuncdesc->memid);
3158 ok(pfuncdesc->lprgscode ==
NULL,
"got %p\n", pfuncdesc->lprgscode);
3159 ok(pfuncdesc->lprgelemdescParam !=
NULL,
"got %p\n", pfuncdesc->lprgelemdescParam);
3160 ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL,
"got 0x%x\n", pfuncdesc->funckind);
3161 ok(pfuncdesc->invkind == INVOKE_FUNC,
"got 0x%x\n", pfuncdesc->invkind);
3162 ok(pfuncdesc->callconv ==
CC_STDCALL,
"got 0x%x\n", pfuncdesc->callconv);
3163 ok(pfuncdesc->cParams == 2,
"got %d\n", pfuncdesc->cParams);
3164 ok(pfuncdesc->cParamsOpt == 0,
"got %d\n", pfuncdesc->cParamsOpt);
3165 ok(pfuncdesc->oVft == 6 *
sizeof(
void*),
"got %d\n", pfuncdesc->oVft);
3166 ok(pfuncdesc->cScodes == 0,
"got %d\n", pfuncdesc->cScodes);
3167 ok(pfuncdesc->elemdescFunc.tdesc.vt ==
VT_VOID,
"got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
3168 ok(pfuncdesc->wFuncFlags == 0,
"got 0x%x\n", pfuncdesc->wFuncFlags);
3169
3170 edesc = pfuncdesc->lprgelemdescParam;
3171 ok(edesc->tdesc.vt ==
VT_BSTR,
"got: %d\n", edesc->tdesc.vt);
3172 ok(
U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT,
"got: 0x%x\n",
U(*edesc).paramdesc.wParamFlags);
3173 ok(
U(*edesc).paramdesc.pparamdescex !=
NULL,
"got: %p\n",
U(*edesc).paramdesc.pparamdescex);
3174 ok(
U(*edesc).paramdesc.pparamdescex->cBytes ==
sizeof(PARAMDESCEX),
"got: %d\n",
3175 U(*edesc).paramdesc.pparamdescex->cBytes);
3176 ok(
V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue) ==
VT_BSTR,
"got: %d\n",
3177 V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue));
3179 "got: %s\n",
3181
3182 edesc = pfuncdesc->lprgelemdescParam + 1;
3183 ok(edesc->tdesc.vt ==
VT_BSTR,
"got: %d\n", edesc->tdesc.vt);
3184 ok(
U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT,
"got: 0x%x\n",
U(*edesc).paramdesc.wParamFlags);
3185 ok(
U(*edesc).paramdesc.pparamdescex !=
NULL,
"got: %p\n",
U(*edesc).paramdesc.pparamdescex);
3186 ok(
U(*edesc).paramdesc.pparamdescex->cBytes ==
sizeof(PARAMDESCEX),
"got: %d\n",
3187 U(*edesc).paramdesc.pparamdescex->cBytes);
3188 ok(
V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue) ==
VT_BSTR,
"got: %d\n",
3189 V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue));
3191 "got: %s\n",
3193
3194 hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &
name, &docstring, &helpcontext, &
helpfile);
3198 ok(helpcontext == 0,
"got helpcontext: 0x%x\n", helpcontext);
3202
3205 ok(cnames == 3,
"got: %u\n", cnames);
3212 ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
3213
3214 hres = ITypeInfo_GetFuncDesc(ti, 4, &pfuncdesc);
3216 ok(pfuncdesc->memid == 0x6001000c,
"got %x\n", pfuncdesc->memid);
3217 ok(pfuncdesc->lprgscode ==
NULL,
"got %p\n", pfuncdesc->lprgscode);
3218 ok(pfuncdesc->lprgelemdescParam !=
NULL,
"got %p\n", pfuncdesc->lprgelemdescParam);
3219 ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL,
"got 0x%x\n", pfuncdesc->funckind);
3220 ok(pfuncdesc->invkind == INVOKE_FUNC,
"got 0x%x\n", pfuncdesc->invkind);
3221 ok(pfuncdesc->callconv ==
CC_STDCALL,
"got 0x%x\n", pfuncdesc->callconv);
3222 ok(pfuncdesc->cParams == 2,
"got %d\n", pfuncdesc->cParams);
3223 ok(pfuncdesc->cParamsOpt == 0,
"got %d\n", pfuncdesc->cParamsOpt);
3224 ok(pfuncdesc->oVft == 7 *
sizeof(
void*),
"got %d\n", pfuncdesc->oVft);
3225 ok(pfuncdesc->cScodes == 0,
"got %d\n", pfuncdesc->cScodes);
3226 ok(pfuncdesc->elemdescFunc.tdesc.vt ==
VT_VOID,
"got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
3227 ok(pfuncdesc->wFuncFlags == 0,
"got 0x%x\n", pfuncdesc->wFuncFlags);
3228
3229 edesc = pfuncdesc->lprgelemdescParam;
3230 ok(edesc->tdesc.vt ==
VT_INT,
"got: %d\n", edesc->tdesc.vt);
3231 ok(
U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT,
"got: 0x%x\n",
U(*edesc).paramdesc.wParamFlags);
3232 ok(
U(*edesc).paramdesc.pparamdescex !=
NULL,
"got: %p\n",
U(*edesc).paramdesc.pparamdescex);
3233 ok(
U(*edesc).paramdesc.pparamdescex->cBytes ==
sizeof(PARAMDESCEX),
"got: %d\n",
3234 U(*edesc).paramdesc.pparamdescex->cBytes);
3235 ok(
V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue) ==
VT_I4,
"got: %d\n",
3236 V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue));
3237 ok(
V_I4(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue) == 0xFFFFFFFF,
3238 "got: 0x%x\n",
V_I4(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue));
3239
3240 edesc = pfuncdesc->lprgelemdescParam + 1;
3241 ok(edesc->tdesc.vt ==
VT_INT,
"got: %d\n", edesc->tdesc.vt);
3242 ok(
U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT,
"got: 0x%x\n",
U(*edesc).paramdesc.wParamFlags);
3243 ok(
U(*edesc).paramdesc.pparamdescex !=
NULL,
"got: %p\n",
U(*edesc).paramdesc.pparamdescex);
3244 ok(
U(*edesc).paramdesc.pparamdescex->cBytes ==
sizeof(PARAMDESCEX),
"got: %d\n",
3245 U(*edesc).paramdesc.pparamdescex->cBytes);
3246 ok(
V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue) ==
VT_I4,
"got: %d\n",
3247 V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue));
3248 ok(
V_I4(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue) == 0xFFFFFFFF,
3249 "got: 0x%x\n",
V_I4(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue));
3250
3251 hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &
name, &docstring, &helpcontext, &
helpfile);
3255 ok(helpcontext == 0,
"got helpcontext: 0x%x\n", helpcontext);
3258 ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
3259
3260 hres = ITypeInfo_GetFuncDesc(ti, 5, &pfuncdesc);
3262 ok(pfuncdesc->memid == 0x60010005,
"got %x\n", pfuncdesc->memid);
3263 ok(pfuncdesc->lprgscode ==
NULL,
"got %p\n", pfuncdesc->lprgscode);
3264 ok(pfuncdesc->lprgelemdescParam !=
NULL,
"got %p\n", pfuncdesc->lprgelemdescParam);
3265 ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL,
"got 0x%x\n", pfuncdesc->funckind);
3266 ok(pfuncdesc->invkind == INVOKE_FUNC,
"got 0x%x\n", pfuncdesc->invkind);
3267 ok(pfuncdesc->callconv ==
CC_STDCALL,
"got 0x%x\n", pfuncdesc->callconv);
3268 ok(pfuncdesc->cParams == 1,
"got %d\n", pfuncdesc->cParams);
3269 ok(pfuncdesc->cParamsOpt == 0,
"got %d\n", pfuncdesc->cParamsOpt);
3270 ok(pfuncdesc->oVft == 8 *
sizeof(
void*),
"got %d\n", pfuncdesc->oVft);
3271 ok(pfuncdesc->cScodes == 0,
"got %d\n", pfuncdesc->cScodes);
3272 ok(pfuncdesc->elemdescFunc.tdesc.vt ==
VT_VOID,
"got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
3273 ok(pfuncdesc->wFuncFlags == 0,
"got 0x%x\n", pfuncdesc->wFuncFlags);
3274
3275 edesc = pfuncdesc->lprgelemdescParam;
3276 ok(
U(*edesc).paramdesc.pparamdescex !=
NULL,
"got: %p\n",
U(*edesc).paramdesc.pparamdescex);
3277 ok(
U(*edesc).paramdesc.pparamdescex->cBytes ==
sizeof(PARAMDESCEX),
"got: %d\n",
3278 U(*edesc).paramdesc.pparamdescex->cBytes);
3279 ok(
V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue) ==
VT_INT,
"got: %d\n",
3280 V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue));
3281 ok(
V_UI2(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue) == 0x789,
"got: 0x%x\n",
3282 V_UI2(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue));
3283 ok(
U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT,
3284 "got: 0x%x\n",
U(*edesc).paramdesc.wParamFlags);
3286 ok(
U(edesc->tdesc).hreftype == hreftype,
"got: 0x%x\n",
U(edesc->tdesc).hreftype);
3287
3288 hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &
name, &docstring, &helpcontext, &
helpfile);
3292 ok(helpcontext == 0,
"got helpcontext: 0x%x\n", helpcontext);
3295 ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
3296
3297 hres = ITypeInfo_GetFuncDesc(ti, 6, &pfuncdesc);
3299 ok(pfuncdesc->memid == 0x60010006,
"got %x\n", pfuncdesc->memid);
3300 ok(pfuncdesc->lprgscode ==
NULL,
"got %p\n", pfuncdesc->lprgscode);
3301 ok(pfuncdesc->lprgelemdescParam !=
NULL,
"got %p\n", pfuncdesc->lprgelemdescParam);
3302 ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL,
"got 0x%x\n", pfuncdesc->funckind);
3303 ok(pfuncdesc->invkind == INVOKE_FUNC,
"got 0x%x\n", pfuncdesc->invkind);
3304 ok(pfuncdesc->callconv ==
CC_STDCALL,
"got 0x%x\n", pfuncdesc->callconv);
3305 ok(pfuncdesc->cParams == 1,
"got %d\n", pfuncdesc->cParams);
3306 ok(pfuncdesc->cParamsOpt == 0,
"got %d\n", pfuncdesc->cParamsOpt);
3307 ok(pfuncdesc->oVft == 9 *
sizeof(
void*),
"got %d\n", pfuncdesc->oVft);
3308 ok(pfuncdesc->cScodes == 0,
"got %d\n", pfuncdesc->cScodes);
3309 ok(pfuncdesc->elemdescFunc.tdesc.vt ==
VT_VARIANT,
"got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
3310 ok(pfuncdesc->wFuncFlags == 0,
"got 0x%x\n", pfuncdesc->wFuncFlags);
3311
3312 edesc = pfuncdesc->lprgelemdescParam;
3313 ok(
U(*edesc).paramdesc.pparamdescex !=
NULL,
"got: %p\n",
U(*edesc).paramdesc.pparamdescex);
3314 ok(
U(*edesc).paramdesc.pparamdescex->cBytes ==
sizeof(PARAMDESCEX),
"got: %d\n",
3315 U(*edesc).paramdesc.pparamdescex->cBytes);
3316 ok(
V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue) ==
VT_INT,
"got: %d\n",
3317 V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue));
3318 ok(
V_UI2(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue) == 0x3,
"got: 0x%x\n",
3319 V_UI2(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue));
3320 ok(
U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT,
3321 "got: 0x%x\n",
U(*edesc).paramdesc.wParamFlags);
3322 ok(edesc->tdesc.vt ==
VT_VARIANT,
"got: %d\n", edesc->tdesc.vt);
3323 ok(
U(edesc->tdesc).hreftype == 0,
"got: 0x%x\n",
U(edesc->tdesc).hreftype);
3324
3325 hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &
name, &docstring, &helpcontext, &
helpfile);
3329 ok(helpcontext == 0,
"got helpcontext: 0x%x\n", helpcontext);
3332 ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
3333
3334 hres = ITypeInfo_GetFuncDesc(ti, 7, &pfuncdesc);
3336 ok(pfuncdesc->memid == 0x60010009,
"got %x\n", pfuncdesc->memid);
3337 ok(pfuncdesc->lprgscode ==
NULL,
"got %p\n", pfuncdesc->lprgscode);
3338 ok(pfuncdesc->lprgelemdescParam !=
NULL,
"got %p\n", pfuncdesc->lprgelemdescParam);
3339 ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL,
"got 0x%x\n", pfuncdesc->funckind);
3340 ok(pfuncdesc->invkind == INVOKE_FUNC,
"got 0x%x\n", pfuncdesc->invkind);
3341 ok(pfuncdesc->callconv ==
CC_STDCALL,
"got 0x%x\n", pfuncdesc->callconv);
3342 ok(pfuncdesc->cParams == 2,
"got %d\n", pfuncdesc->cParams);
3343 ok(pfuncdesc->cParamsOpt == 0,
"got %d\n", pfuncdesc->cParamsOpt);
3344 ok(pfuncdesc->oVft == 10 *
sizeof(
void*),
"got %d\n", pfuncdesc->oVft);
3345 ok(pfuncdesc->cScodes == 0,
"got %d\n", pfuncdesc->cScodes);
3346 ok(pfuncdesc->elemdescFunc.tdesc.vt ==
VT_VOID,
"got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
3347 ok(pfuncdesc->wFuncFlags == 0,
"got 0x%x\n", pfuncdesc->wFuncFlags);
3348
3349 edesc = pfuncdesc->lprgelemdescParam;
3350 ok(edesc->tdesc.vt ==
VT_INT,
"got: %d\n", edesc->tdesc.vt);
3351 ok(
U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FIN,
"got: 0x%x\n",
U(*edesc).paramdesc.wParamFlags);
3352 ok(
U(*edesc).paramdesc.pparamdescex ==
NULL,
"got: %p\n",
U(*edesc).paramdesc.pparamdescex);
3353
3354 edesc = pfuncdesc->lprgelemdescParam + 1;
3355 ok(edesc->tdesc.vt ==
VT_UI2,
"got: %d\n", edesc->tdesc.vt);
3356 ok(
U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT,
"got: 0x%x\n",
U(*edesc).paramdesc.wParamFlags);
3357 ok(
U(*edesc).paramdesc.pparamdescex !=
NULL,
"got: %p\n",
U(*edesc).paramdesc.pparamdescex);
3358 ok(
U(*edesc).paramdesc.pparamdescex->cBytes ==
sizeof(PARAMDESCEX),
"got: %d\n",
3359 U(*edesc).paramdesc.pparamdescex->cBytes);
3360 ok(
V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue) ==
VT_UI2,
"got: %d\n",
3361 V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue));
3362 ok(
V_UI2(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue) == 0xFFFF,
"got: 0x%x\n",
3363 V_UI2(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue));
3364
3365 hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &
name, &docstring, &helpcontext, &
helpfile);
3369 ok(helpcontext == 0,
"got helpcontext: 0x%x\n", helpcontext);
3372 ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
3373
3374 hres = ITypeInfo_GetFuncDesc(ti, 8, &pfuncdesc);
3376 ok(pfuncdesc->memid == 0x60010003,
"got %x\n", pfuncdesc->memid);
3377 ok(pfuncdesc->lprgscode ==
NULL,
"got %p\n", pfuncdesc->lprgscode);
3378 ok(pfuncdesc->lprgelemdescParam !=
NULL,
"got %p\n", pfuncdesc->lprgelemdescParam);
3379 ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL,
"got 0x%x\n", pfuncdesc->funckind);
3380 ok(pfuncdesc->invkind == INVOKE_FUNC,
"got 0x%x\n", pfuncdesc->invkind);
3381 ok(pfuncdesc->callconv ==
CC_STDCALL,
"got 0x%x\n", pfuncdesc->callconv);
3382 ok(pfuncdesc->cParams == 1,
"got %d\n", pfuncdesc->cParams);
3383 ok(pfuncdesc->cParamsOpt == 0,
"got %d\n", pfuncdesc->cParamsOpt);
3384 ok(pfuncdesc->oVft == 11 *
sizeof(
void*),
"got %d\n", pfuncdesc->oVft);
3385 ok(pfuncdesc->cScodes == 0,
"got %d\n", pfuncdesc->cScodes);
3386 ok(pfuncdesc->elemdescFunc.tdesc.vt ==
VT_VOID,
"got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
3387 ok(pfuncdesc->wFuncFlags == 0,
"got 0x%x\n", pfuncdesc->wFuncFlags);
3388
3389 edesc = pfuncdesc->lprgelemdescParam;
3390 ok(edesc->tdesc.vt ==
VT_INT,
"got: %d\n", edesc->tdesc.vt);
3391 ok(
U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT,
"got: 0x%x\n",
U(*edesc).paramdesc.wParamFlags);
3392 ok(
U(*edesc).paramdesc.pparamdescex !=
NULL,
"got: %p\n",
U(*edesc).paramdesc.pparamdescex);
3393 ok(
U(*edesc).paramdesc.pparamdescex->cBytes ==
sizeof(PARAMDESCEX),
"got: %d\n",
3394 U(*edesc).paramdesc.pparamdescex->cBytes);
3395 ok(
V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue) ==
VT_I4,
"got: %d\n",
3396 V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue));
3397 ok(
V_I4(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue) == 0x123,
"got: 0x%x\n",
3398 V_I4(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue));
3399
3400 hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &
name, &docstring, &helpcontext, &
helpfile);
3404 ok(helpcontext == 0,
"got helpcontext: 0x%x\n", helpcontext);
3407 ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
3408
3409 hres = ITypeInfo_GetFuncDesc(ti, 9, &pfuncdesc);
3411 ok(pfuncdesc->memid == 0,
"got %x\n", pfuncdesc->memid);
3412 ok(pfuncdesc->lprgscode ==
NULL,
"got %p\n", pfuncdesc->lprgscode);
3413 ok(pfuncdesc->lprgelemdescParam ==
NULL,
"got %p\n", pfuncdesc->lprgelemdescParam);
3414 ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL,
"got 0x%x\n", pfuncdesc->funckind);
3415 ok(pfuncdesc->invkind == INVOKE_PROPERTYGET,
"got 0x%x\n", pfuncdesc->invkind);
3416 ok(pfuncdesc->callconv ==
CC_STDCALL,
"got 0x%x\n", pfuncdesc->callconv);
3417 ok(pfuncdesc->cParams == 0,
"got %d\n", pfuncdesc->cParams);
3418 ok(pfuncdesc->cParamsOpt == 0,
"got %d\n", pfuncdesc->cParamsOpt);
3419 ok(pfuncdesc->oVft == 12 *
sizeof(
void*),
"got %d\n", pfuncdesc->oVft);
3420 ok(pfuncdesc->cScodes == 0,
"got %d\n", pfuncdesc->cScodes);
3421 ok(pfuncdesc->elemdescFunc.tdesc.vt ==
VT_BSTR,
"got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
3422 ok(pfuncdesc->wFuncFlags == 0,
"got 0x%x\n", pfuncdesc->wFuncFlags);
3423
3424 hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &
name, &docstring, &helpcontext, &
helpfile);
3428 ok(helpcontext == 0x201,
"got helpcontext: 0x%x\n", helpcontext);
3432
3435 ok(cnames == 1,
"got: %u\n", cnames);
3438 ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
3439
3440 hres = ITypeInfo_GetFuncDesc(ti, 10, &pfuncdesc);
3442 ok(pfuncdesc->memid == 0x60010007,
"got %x\n", pfuncdesc->memid);
3443 ok(pfuncdesc->lprgscode ==
NULL,
"got %p\n", pfuncdesc->lprgscode);
3444 ok(pfuncdesc->lprgelemdescParam !=
NULL,
"got %p\n", pfuncdesc->lprgelemdescParam);
3445 ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL,
"got 0x%x\n", pfuncdesc->funckind);
3446 ok(pfuncdesc->invkind == INVOKE_FUNC,
"got 0x%x\n", pfuncdesc->invkind);
3447 ok(pfuncdesc->callconv ==
CC_STDCALL,
"got 0x%x\n", pfuncdesc->callconv);
3448 ok(pfuncdesc->cParams == 1,
"got %d\n", pfuncdesc->cParams);
3449 ok(pfuncdesc->cParamsOpt == 0,
"got %d\n", pfuncdesc->cParamsOpt);
3450 ok(pfuncdesc->oVft == 13 *
sizeof(
void*),
"got %d\n", pfuncdesc->oVft);
3451 ok(pfuncdesc->cScodes == 0,
"got %d\n", pfuncdesc->cScodes);
3452 ok(pfuncdesc->elemdescFunc.tdesc.vt ==
VT_VOID,
"got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
3453 ok(pfuncdesc->wFuncFlags == 0,
"got 0x%x\n", pfuncdesc->wFuncFlags);
3454
3455 edesc = pfuncdesc->lprgelemdescParam;
3456 ok(edesc->tdesc.vt ==
VT_PTR,
"got: %d\n", edesc->tdesc.vt);
3457 ok(
U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FIN,
"got: 0x%x\n",
U(*edesc).paramdesc.wParamFlags);
3458 ok(
U(*edesc).paramdesc.pparamdescex ==
NULL,
"got: %p\n",
U(*edesc).paramdesc.pparamdescex);
3459 ok(
U(edesc->tdesc).lptdesc !=
NULL,
"got: %p\n",
U(edesc->tdesc).lptdesc);
3460 ok(
U(edesc->tdesc).lptdesc->vt ==
VT_PTR,
"got: %d\n",
U(edesc->tdesc).lptdesc->vt);
3461 ok(
U(*
U(edesc->tdesc).lptdesc).lptdesc !=
NULL,
"got: %p\n",
U(*
U(edesc->tdesc).lptdesc).lptdesc);
3462 ok(
U(*
U(edesc->tdesc).lptdesc).lptdesc->vt ==
VT_BSTR,
"got: %d\n",
U(*
U(edesc->tdesc).lptdesc).lptdesc->vt);
3463
3464 hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &
name, &docstring, &helpcontext, &
helpfile);
3468 ok(helpcontext == 0,
"got helpcontext: 0x%x\n", helpcontext);
3471 ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
3472
3473 hres = ITypeInfo_GetFuncDesc(ti, 11, &pfuncdesc);
3475 ok(pfuncdesc->memid == 0x60010004,
"got %x\n", pfuncdesc->memid);
3476 ok(pfuncdesc->lprgscode ==
NULL,
"got %p\n", pfuncdesc->lprgscode);
3477 ok(pfuncdesc->lprgelemdescParam !=
NULL,
"got %p\n", pfuncdesc->lprgelemdescParam);
3478 ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL,
"got 0x%x\n", pfuncdesc->funckind);
3479 ok(pfuncdesc->invkind == INVOKE_FUNC,
"got 0x%x\n", pfuncdesc->invkind);
3480 ok(pfuncdesc->callconv ==
CC_STDCALL,
"got 0x%x\n", pfuncdesc->callconv);
3481 ok(pfuncdesc->cParams == 1,
"got %d\n", pfuncdesc->cParams);
3482 ok(pfuncdesc->cParamsOpt == 0,
"got %d\n", pfuncdesc->cParamsOpt);
3483 ok(pfuncdesc->oVft == 14 *
sizeof(
void*),
"got %d\n", pfuncdesc->oVft);
3484 ok(pfuncdesc->cScodes == 0,
"got %d\n", pfuncdesc->cScodes);
3485 ok(pfuncdesc->elemdescFunc.tdesc.vt ==
VT_VOID,
"got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
3486 ok(pfuncdesc->wFuncFlags == 0,
"got 0x%x\n", pfuncdesc->wFuncFlags);
3487
3488 edesc = pfuncdesc->lprgelemdescParam;
3489 ok(edesc->tdesc.vt ==
VT_PTR,
"got: %d\n", edesc->tdesc.vt);
3490 ok(
U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FIN,
"got: 0x%x\n",
U(*edesc).paramdesc.wParamFlags);
3491 ok(
U(*edesc).paramdesc.pparamdescex ==
NULL,
"got: %p\n",
U(*edesc).paramdesc.pparamdescex);
3492 ok(
U(edesc->tdesc).lptdesc !=
NULL,
"got: %p\n",
U(edesc->tdesc).lptdesc);
3493 ok(
U(edesc->tdesc).lptdesc->vt ==
VT_BSTR,
"got: %d\n",
U(edesc->tdesc).lptdesc->vt);
3494
3495 hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &
name, &docstring, &helpcontext, &
helpfile);
3499 ok(helpcontext == 0,
"got helpcontext: 0x%x\n", helpcontext);
3502 ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
3503
3504 hres = ITypeInfo_GetFuncDesc(ti, 12, &pfuncdesc);
3506 ok(pfuncdesc->memid == 0,
"got %x\n", pfuncdesc->memid);
3507 ok(pfuncdesc->lprgscode ==
NULL,
"got %p\n", pfuncdesc->lprgscode);
3508 ok(pfuncdesc->lprgelemdescParam !=
NULL,
"got %p\n", pfuncdesc->lprgelemdescParam);
3509 ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL,
"got 0x%x\n", pfuncdesc->funckind);
3510 ok(pfuncdesc->invkind == INVOKE_PROPERTYPUT,
"got 0x%x\n", pfuncdesc->invkind);
3511 ok(pfuncdesc->callconv ==
CC_STDCALL,
"got 0x%x\n", pfuncdesc->callconv);
3512 ok(pfuncdesc->cParams == 1,
"got %d\n", pfuncdesc->cParams);
3513 ok(pfuncdesc->cParamsOpt == 0,
"got %d\n", pfuncdesc->cParamsOpt);
3514 ok(pfuncdesc->oVft == 15 *
sizeof(
void*),
"got %d\n", pfuncdesc->oVft);
3515 ok(pfuncdesc->cScodes == 0,
"got %d\n", pfuncdesc->cScodes);
3516 ok(pfuncdesc->elemdescFunc.tdesc.vt ==
VT_VOID,
"got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
3517 ok(pfuncdesc->wFuncFlags == 0,
"got 0x%x\n", pfuncdesc->wFuncFlags);
3518
3519 edesc = pfuncdesc->lprgelemdescParam;
3520 ok(edesc->tdesc.vt ==
VT_BSTR,
"got: %d\n", edesc->tdesc.vt);
3521 ok(
U(*edesc).idldesc.wIDLFlags == IDLFLAG_FIN,
"got: %x\n",
U(*edesc).idldesc.wIDLFlags);
3522
3523 hres = ITypeInfo_GetDocumentation(ti, pfuncdesc->memid, &
name, &docstring, &helpcontext, &
helpfile);
3527 ok(helpcontext == 0x201,
"got helpcontext: 0x%x\n", helpcontext);
3531
3534 ok(cnames == 1,
"got: %u\n", cnames);
3537 ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
3538
3539 hres = ITypeInfo_GetFuncDesc(ti, 13, &pfuncdesc);
3541
3542 ok(ITypeInfo_Release(ti) == 0,
"Object should be freed\n");
3543
3544 hres = ITypeLib_GetTypeInfo(tl, 1, &ti);
3546
3547 hres = ITypeInfo_GetTypeAttr(ti, &typeattr);
3549 ok(typeattr->cbSizeInstance ==
sizeof(
void*),
"cbSizeInstance = %d\n", typeattr->cbSizeInstance);
3550 ok(typeattr->typekind ==
TKIND_INTERFACE,
"typekind = %d\n", typeattr->typekind);
3551 ok(typeattr->cFuncs == 2,
"cFuncs = %d\n", typeattr->cFuncs);
3552 ok(typeattr->cVars == 0,
"cVars = %d\n", typeattr->cVars);
3553 ok(typeattr->cImplTypes == 1,
"cImplTypes = %d\n", typeattr->cImplTypes);
3554 ok(typeattr->cbSizeVft == 0xaab8 || typeattr->cbSizeVft == 0xaab0 ||
3555 typeattr->cbSizeVft == 0x5560, "cbSizeVft = 0x%x\n", typeattr->cbSizeVft);
3556 ok(typeattr->cbAlignment == alignment,
"cbAlignment = %d\n", typeattr->cbAlignment);
3557 ok(typeattr->wTypeFlags == 0,
"wTypeFlags = %d\n", typeattr->wTypeFlags);
3558 ok(typeattr->wMajorVerNum == 0,
"wMajorVerNum = %d\n", typeattr->wMajorVerNum);
3559 ok(typeattr->wMinorVerNum == 0,
"wMinorVerNum = %d\n", typeattr->wMinorVerNum);
3560 ITypeInfo_ReleaseTypeAttr(ti, typeattr);
3561
3562 hres = ITypeInfo_GetRefTypeOfImplType(ti, 0, &hreftype);
3564
3565 hres = ITypeInfo_GetFuncDesc(ti, 0, &pfuncdesc);
3567 ok(pfuncdesc->memid == 0x60020000,
"got %x\n", pfuncdesc->memid);
3568 ok(pfuncdesc->lprgscode ==
NULL,
"got %p\n", pfuncdesc->lprgscode);
3569 ok(pfuncdesc->lprgelemdescParam !=
NULL,
"got %p\n", pfuncdesc->lprgelemdescParam);
3570 ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL,
"got 0x%x\n", pfuncdesc->funckind);
3571 ok(pfuncdesc->invkind == INVOKE_FUNC,
"got 0x%x\n", pfuncdesc->invkind);
3572 ok(pfuncdesc->callconv ==
CC_STDCALL,
"got 0x%x\n", pfuncdesc->callconv);
3573 ok(pfuncdesc->cParams == 1,
"got %d\n", pfuncdesc->cParams);
3574 ok(pfuncdesc->cParamsOpt == 0,
"got %d\n", pfuncdesc->cParamsOpt);
3575 ok(pfuncdesc->oVft == (
short)(0xaaa8 *
sizeof(
void *) /
ptr_size),
"got %x\n", pfuncdesc->oVft);
3576 ok(pfuncdesc->cScodes == 0,
"got %d\n", pfuncdesc->cScodes);
3577 ok(pfuncdesc->elemdescFunc.tdesc.vt ==
VT_VOID,
"got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
3578 ok(pfuncdesc->wFuncFlags == 0,
"got 0x%x\n", pfuncdesc->wFuncFlags);
3579
3580 edesc = pfuncdesc->lprgelemdescParam;
3581 ok(edesc->tdesc.vt ==
VT_VARIANT,
"got: %d\n", edesc->tdesc.vt);
3582 ok(
U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT,
3583 "got: 0x%x\n",
U(*edesc).paramdesc.wParamFlags);
3584 ok(
U(*edesc).paramdesc.pparamdescex !=
NULL,
"got: %p\n",
U(*edesc).paramdesc.pparamdescex);
3585 ok(
U(*edesc).paramdesc.pparamdescex->cBytes ==
sizeof(PARAMDESCEX),
"got: %d\n",
3586 U(*edesc).paramdesc.pparamdescex->cBytes);
3587 ok(
V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue) ==
VT_INT,
"got: %d\n",
3588 V_VT(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue));
3589 ok(
V_UI2(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue) == 0x3,
"got: 0x%x\n",
3590 V_UI2(&
U(*edesc).paramdesc.pparamdescex->varDefaultValue));
3591 ok(
U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT,
3592 "got: 0x%x\n",
U(*edesc).paramdesc.wParamFlags);
3593 ok(
U(edesc->tdesc).lptdesc ==
NULL,
"got: %p\n",
U(edesc->tdesc).lptdesc);
3594 ok(
U(edesc->tdesc).hreftype == 0,
"got: %d\n",
U(edesc->tdesc).hreftype);
3595 ITypeInfo_ReleaseFuncDesc(ti, pfuncdesc);
3596
3597 hres = ITypeInfo_GetFuncDesc(ti, 1, &pfuncdesc);
3599 ok(pfuncdesc->memid == 0x60020001,
"got %x\n", pfuncdesc->memid);
3600 ok(pfuncdesc->lprgscode ==
NULL,
"got %p\n", pfuncdesc->lprgscode);
3601 ok(pfuncdesc->lprgelemdescParam !=
NULL,
"got %p\n", pfuncdesc->lprgelemdescParam);
3602 ok(pfuncdesc->funckind == FUNC_PUREVIRTUAL,
"got 0x%x\n", pfuncdesc->funckind);
3603 ok(pfuncdesc->invkind == INVOKE_FUNC,
"got 0x%x\n", pfuncdesc->invkind);
3604 ok(pfuncdesc->callconv ==
CC_STDCALL,
"got 0x%x\n", pfuncdesc->callconv);
3605 ok(pfuncdesc->cParams == 1,
"got %d\n", pfuncdesc->cParams);
3606 ok(pfuncdesc->cParamsOpt == 0,
"got %d\n", pfuncdesc->cParamsOpt);
3607 ok(pfuncdesc->oVft == (
short)((sys ==
SYS_WIN64 ? 0xaab0 : 0xaaac) *
sizeof(
void *) /
ptr_size),
"got %x\n", pfuncdesc->oVft);
3608 ok(pfuncdesc->cScodes == 0,
"got %d\n", pfuncdesc->cScodes);
3609 ok(pfuncdesc->elemdescFunc.tdesc.vt ==
VT_VOID,
"got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
3610 ok(pfuncdesc->wFuncFlags == 0,
"got 0x%x\n", pfuncdesc->wFuncFlags);
3611
3612 edesc = pfuncdesc->lprgelemdescParam;
3613 ok(edesc->tdesc.vt ==
VT_VARIANT,
"got: %d\n", edesc->tdesc.vt);
3614 ok(
U(*edesc).paramdesc.wParamFlags == PARAMFLAG_FHASDEFAULT,
3615 "got: 0x%x\n",
U(*edesc).paramdesc.wParamFlags);
3616 ok(
U(*edesc).paramdesc.pparamdescex !=
NULL,
"got: %p\n",
U(*edesc).paramdesc.pparamdescex);