Esempio n. 1
0
        public unsafe void GetFunctionNamesForIUnknown()
        {
            TypeLibTests.LoadStdOle2(out ITypeLib typeLib);
            ITypeInfo typeInfo = typeLib.GetTypeInfoByName("IUnknown");

            ICollection <string> names = typeInfo.GetFunctionNames(0);

            names.Should().BeEquivalentTo("QueryInterface", "riid", "ppvObj");

            names = typeInfo.GetFunctionNames(1);
            names.Should().BeEquivalentTo("AddRef");

            names = typeInfo.GetFunctionNames(2);
            names.Should().BeEquivalentTo("Release");
        }