1 /* ****************************************************************************
3 * Copyright (c) Microsoft Corporation.
5 * This source code is subject to terms and conditions of the Microsoft Public License. A
6 * copy of the license can be found in the License.html file at the root of this distribution. If
7 * you cannot locate the Microsoft Public License, please send an email to
8 * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound
9 * by the terms of the Microsoft Public License.
11 * You must not remove this notice, or any other, from this software.
14 * ***************************************************************************/
15 using System; using Microsoft;
18 #if !SILVERLIGHT // ComObject
20 using System.Runtime.InteropServices;
21 using ComTypes = System.Runtime.InteropServices.ComTypes;
24 namespace System.Dynamic {
26 namespace Microsoft.Scripting {
31 InterfaceType(ComInterfaceType.InterfaceIsIDispatch),
32 Guid("00020400-0000-0000-C000-000000000046")
34 internal interface IDispatchForReflection {
39 InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
40 Guid("00020400-0000-0000-C000-000000000046"),
42 internal interface IDispatch {
45 int TryGetTypeInfoCount(out uint pctinfo);
48 int TryGetTypeInfo(uint iTInfo, int lcid, out IntPtr info);
53 [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPWStr, SizeParamIndex = 2)]
58 [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.I4, SizeParamIndex = 2)]
66 ComTypes.INVOKEKIND wFlags,
67 ref ComTypes.DISPPARAMS pDispParams,
69 out ComTypes.EXCEPINFO pExcepInfo,
74 /// Layout of the IDispatch vtable
76 internal enum IDispatchMethodIndices {
77 IUnknown_QueryInterface,
81 IDispatch_GetTypeInfoCount ,
82 IDispatch_GetTypeInfo,
83 IDispatch_GetIDsOfNames,
89 InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
90 Guid("B196B283-BAB4-101A-B69C-00AA00341D07")
92 internal interface IProvideClassInfo {
93 void GetClassInfo(out IntPtr info);