public class ScriptControlClass : IScriptControl, ScriptControl, DScriptControlSource_Event
{
public event DScriptControlSource_ErrorEventHandler DScriptControlSource_Event_Error;
public event DScriptControlSource_TimeoutEventHandler DScriptControlSource_Event_Timeout;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), TypeLibFunc((short) 0x40), DispId(-552)]
public virtual extern void _AboutBox();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x7d0)]
public virtual extern void AddCode([In, MarshalAs(UnmanagedType.BStr)] string Code);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x9c4)]
public virtual extern void AddObject([In, MarshalAs(UnmanagedType.BStr)] string Name, [In, MarshalAs(UnmanagedType.IDispatch)] object Object, [In] bool AddMembers = false);
[return: MarshalAs(UnmanagedType.Struct)]
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x7d1)]
public virtual extern object Eval([In, MarshalAs(UnmanagedType.BStr)] string Expression);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x7d2)]
public virtual extern void ExecuteStatement([In, MarshalAs(UnmanagedType.BStr)] string Statement);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x9c5)]
public virtual extern void Reset();
[return: MarshalAs(UnmanagedType.Struct)]
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x7d3)]
public virtual extern object Run([In, MarshalAs(UnmanagedType.BStr)] string ProcedureName, [In, ParamArray, MarshalAs(UnmanagedType.SafeArray, SafeArraySubType=VarEnum.VT_VARIANT)] params ref object[] Parameters);
[DispId(0x5e0)]
public virtual bool AllowUI { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x5e0)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x5e0)] set; }
[DispId(0x3e8)]
public virtual object CodeObject { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x3e8)] get; }
[DispId(0x5e3)]
public virtual MSScriptControl.Error Error { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x5e3), TypeLibFunc((short) 0x400)] get; }
[DispId(0x5dc)]
public virtual string Language { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x5dc)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x5dc)] set; }
[DispId(0x5e2)]
public virtual MSScriptControl.Modules Modules { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), TypeLibFunc((short) 0x400), DispId(0x5e2)] get; }
[DispId(0x5e0)]
public virtual bool MSScriptControl.IScriptControl.AllowUI { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x5e0)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x5e0)] set; }
[DispId(0x3e8)]
public virtual object MSScriptControl.IScriptControl.CodeObject { [return: MarshalAs(UnmanagedType.IDispatch)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x3e8)] get; }
[DispId(0x5e3)]
public virtual MSScriptControl.Error MSScriptControl.IScriptControl.Error { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x5e3), TypeLibFunc((short) 0x400)] get; }
[DispId(0x5dc)]
public virtual string MSScriptControl.IScriptControl.Language { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x5dc)] get; [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x5dc)] set; }
[DispId(0x5e2)]
public virtual MSScriptControl.Modules MSScriptControl.IScriptControl.Modules { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), TypeLibFunc((short) 0x400), DispId(0x5e2)] get; }
[DispId(0x3e9)]
public virtual MSScriptControl.Procedures MSScriptControl.IScriptControl.Procedures { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x3e9)] get; }
[DispId(0x5de)]
public virtual int MSScriptControl.IScriptControl.SitehWnd { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), TypeLibFunc((short) 0x400), DispId(0x5de)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x5de), TypeLibFunc((short) 0x400)] set; }
[DispId(0x5dd)]
public virtual ScriptControlStates MSScriptControl.IScriptControl.State { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x5dd), TypeLibFunc((short) 0x400)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x5dd), TypeLibFunc((short) 0x400)] set; }
[DispId(0x5df)]
public virtual int MSScriptControl.IScriptControl.Timeout { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x5df)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x5df)] set; }
[DispId(0x5e1)]
public virtual bool MSScriptControl.IScriptControl.UseSafeSubset { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x5e1)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x5e1)] set; }
[DispId(0x3e9)]
public virtual MSScriptControl.Procedures Procedures { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x3e9)] get; }
[DispId(0x5de)]
public virtual int SitehWnd { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), TypeLibFunc((short) 0x400), DispId(0x5de)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x5de), TypeLibFunc((short) 0x400)] set; }
[DispId(0x5dd)]
public virtual ScriptControlStates State { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x5dd), TypeLibFunc((short) 0x400)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x5dd), TypeLibFunc((short) 0x400)] set; }
[DispId(0x5df)]
public virtual int Timeout { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x5df)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x5df)] set; }
[DispId(0x5e1)]
public virtual bool UseSafeSubset { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x5e1)] get; [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x5e1)] set; }
}
为什么这么写?怎么查dispid和Guid
解释下这是什么意思
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), TypeLibFunc((short) 0x40), DispId(-552)]
谢谢!!!!!!!!!!!!!!!!!!!!!!!
看着好像是C#代码,
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), TypeLibFunc((short) 0x40), DispId(-552)]
这个应该叫“特性属性”?
.NET内核原生实现的函数,引用进类库里来
请问您知道怎么找到这些extern定义的方法的实现在哪儿吗?
c#代码
上面的代码中 dispid和Guid 都是和com打交道的时候要用到的
MarshalAs封装了一些对内存的操作 今天和非托管代码打交道的时候用到