⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mscoree_tlb.pas

📁 East make Tray Icon in delphi
💻 PAS
📖 第 1 页 / 共 2 页
字号:

// *********************************************************************//
// Interface: ISequentialStream
// Flags:     (0)
// GUID:      {0C733A30-2A1C-11CE-ADE5-00AA0044773D}
// *********************************************************************//
  ISequentialStream = interface(IUnknown)
    ['{0C733A30-2A1C-11CE-ADE5-00AA0044773D}']
    function Read(out pv: Pointer; cb: LongWord; out pcbRead: LongWord): HResult; stdcall;
    function RemoteRead(out pv: Byte; cb: LongWord; out pcbRead: LongWord): HResult; stdcall;
    function Write(var pv: Pointer; cb: LongWord; out pcbWritten: LongWord): HResult; stdcall;
    function RemoteWrite(var pv: Byte; cb: LongWord; out pcbWritten: LongWord): HResult; stdcall;
  end;

// *********************************************************************//
// Interface: IStream
// Flags:     (0)
// GUID:      {0000000C-0000-0000-C000-000000000046}
// *********************************************************************//
  IStream = interface(ISequentialStream)
    ['{0000000C-0000-0000-C000-000000000046}']
    function Seek(dlibMove: _LARGE_INTEGER; dwOrigin: LongWord; out plibNewPosition: _ULARGE_INTEGER): HResult; stdcall;
    function RemoteSeek(dlibMove: _LARGE_INTEGER; dwOrigin: LongWord; 
                        out plibNewPosition: _ULARGE_INTEGER): HResult; stdcall;
    function SetSize(libNewSize: _ULARGE_INTEGER): HResult; stdcall;
    function CopyTo(const pstm: ISequentialStream; cb: _ULARGE_INTEGER; 
                    out pcbRead: _ULARGE_INTEGER; out pcbWritten: _ULARGE_INTEGER): HResult; stdcall;
    function RemoteCopyTo(const pstm: ISequentialStream; cb: _ULARGE_INTEGER; 
                          out pcbRead: _ULARGE_INTEGER; out pcbWritten: _ULARGE_INTEGER): HResult; stdcall;
    function Commit(grfCommitFlags: LongWord): HResult; stdcall;
    function Revert: HResult; stdcall;
    function LockRegion(libOffset: _ULARGE_INTEGER; cb: _ULARGE_INTEGER; dwLockType: LongWord): HResult; stdcall;
    function UnlockRegion(libOffset: _ULARGE_INTEGER; cb: _ULARGE_INTEGER; dwLockType: LongWord): HResult; stdcall;
    function Stat(out pstatstg: tagSTATSTG; grfStatFlag: LongWord): HResult; stdcall;
    function Clone(out ppstm: ISequentialStream): HResult; stdcall;
  end;

// *********************************************************************//
// Interface: ICorRuntimeHost
// Flags:     (0)
// GUID:      {CB2F6722-AB3A-11D2-9C40-00C04FA30A3E}
// *********************************************************************//
  ICorRuntimeHost = interface(IUnknown)
    ['{CB2F6722-AB3A-11D2-9C40-00C04FA30A3E}']
    function CreateLogicalThreadState: HResult; stdcall;
    function DeleteLogicalThreadState: HResult; stdcall;
    function SwitchInLogicalThreadState(var pFiberCookie: LongWord): HResult; stdcall;
    function SwitchOutLogicalThreadState(out pFiberCookie: PUINT1): HResult; stdcall;
    function LocksHeldByLogicalThread(out pCount: LongWord): HResult; stdcall;
    function MapFile(var hFile: Pointer; out hMapAddress: Pointer): HResult; stdcall;
    function GetConfiguration(out pConfiguration: ICorConfiguration): HResult; stdcall;
    function Start: HResult; stdcall;
    function Stop: HResult; stdcall;
    function CreateDomain(pwzFriendlyName: PWideChar; const pIdentityArray: IUnknown; 
                          out pAppDomain: IUnknown): HResult; stdcall;
    function GetDefaultDomain(out pAppDomain: IUnknown): HResult; stdcall;
    function EnumDomains(out hEnum: Pointer): HResult; stdcall;
    function NextDomain(hEnum: Pointer; out pAppDomain: IUnknown): HResult; stdcall;
    function CloseEnum(hEnum: Pointer): HResult; stdcall;
    function CreateDomainEx(pwzFriendlyName: PWideChar; const pSetup: IUnknown; 
                            const pEvidence: IUnknown; out pAppDomain: IUnknown): HResult; stdcall;
    function CreateDomainSetup(out pAppDomainSetup: IUnknown): HResult; stdcall;
    function CreateEvidence(out pEvidence: IUnknown): HResult; stdcall;
    function UnloadDomain(const pAppDomain: IUnknown): HResult; stdcall;
    function CurrentDomain(out pAppDomain: IUnknown): HResult; stdcall;
  end;

// *********************************************************************//
// Interface: IGCHost
// Flags:     (0)
// GUID:      {FAC34F6E-0DCD-47B5-8021-531BC5ECCA63}
// *********************************************************************//
  IGCHost = interface(IUnknown)
    ['{FAC34F6E-0DCD-47B5-8021-531BC5ECCA63}']
    function SetGCStartupLimits(SegmentSize: LongWord; MaxGen0Size: LongWord): HResult; stdcall;
    function Collect(Generation: Integer): HResult; stdcall;
    function GetStats(var pStats: _COR_GC_STATS): HResult; stdcall;
    function GetThreadStats(var pFiberCookie: LongWord; var pStats: _COR_GC_THREAD_STATS): HResult; stdcall;
    function SetVirtualMemLimit(sztMaxVirtualMemMB: ULONG_PTR): HResult; stdcall;
  end;

// *********************************************************************//
// Interface: ICorConfiguration
// Flags:     (0)
// GUID:      {5C2B07A5-1E98-11D3-872F-00C04F79ED0D}
// *********************************************************************//
  ICorConfiguration = interface(IUnknown)
    ['{5C2B07A5-1E98-11D3-872F-00C04F79ED0D}']
    function SetGCThreadControl(const pGCThreadControl: IGCThreadControl): HResult; stdcall;
    function SetGCHostControl(const pGCHostControl: IGCHostControl): HResult; stdcall;
    function SetDebuggerThreadControl(const pDebuggerThreadControl: IDebuggerThreadControl): HResult; stdcall;
    function AddDebuggerSpecialThread(dwSpecialThreadId: LongWord): HResult; stdcall;
  end;

// *********************************************************************//
// Interface: IGCThreadControl
// Flags:     (0)
// GUID:      {F31D1788-C397-4725-87A5-6AF3472C2791}
// *********************************************************************//
  IGCThreadControl = interface(IUnknown)
    ['{F31D1788-C397-4725-87A5-6AF3472C2791}']
    function ThreadIsBlockingForSuspension: HResult; stdcall;
    function SuspensionStarting: HResult; stdcall;
    function SuspensionEnding(Generation: LongWord): HResult; stdcall;
  end;

// *********************************************************************//
// Interface: IGCHostControl
// Flags:     (0)
// GUID:      {5513D564-8374-4CB9-AED9-0083F4160A1D}
// *********************************************************************//
  IGCHostControl = interface(IUnknown)
    ['{5513D564-8374-4CB9-AED9-0083F4160A1D}']
    function RequestVirtualMemLimit(sztMaxVirtualMemMB: ULONG_PTR; 
                                    var psztNewMaxVirtualMemMB: ULONG_PTR): HResult; stdcall;
  end;

// *********************************************************************//
// Interface: IDebuggerThreadControl
// Flags:     (0)
// GUID:      {23D86786-0BB5-4774-8FB5-E3522ADD6246}
// *********************************************************************//
  IDebuggerThreadControl = interface(IUnknown)
    ['{23D86786-0BB5-4774-8FB5-E3522ADD6246}']
    function ThreadIsBlockingForDebugger: HResult; stdcall;
    function ReleaseAllRuntimeThreads: HResult; stdcall;
    function StartBlockingForDebugger(dwUnused: LongWord): HResult; stdcall;
  end;

// *********************************************************************//
// Interface: IValidator
// Flags:     (0)
// GUID:      {63DF8730-DC81-4062-84A2-1FF943F59FAC}
// *********************************************************************//
  IValidator = interface(IUnknown)
    ['{63DF8730-DC81-4062-84A2-1FF943F59FAC}']
    function Validate(const veh: IVEHandler; const pAppDomain: IUnknown; ulFlags: LongWord; 
                      ulMaxError: LongWord; Token: LongWord; fileName: PWideChar; var pe: Byte; 
                      ulSize: LongWord): HResult; stdcall;
    function FormatEventInfo(hVECode: HResult; Context: tag_VerError; msg: PWideChar; 
                             ulMaxLength: LongWord; psa: PSafeArray): HResult; stdcall;
  end;

// *********************************************************************//
// Interface: IDebuggerInfo
// Flags:     (0)
// GUID:      {BF24142D-A47D-4D24-A66D-8C2141944E44}
// *********************************************************************//
  IDebuggerInfo = interface(IUnknown)
    ['{BF24142D-A47D-4D24-A66D-8C2141944E44}']
    function IsDebuggerAttached(out pbAttached: Integer): HResult; stdcall;
  end;

// *********************************************************************//
// Interface: IVEHandler
// Flags:     (0)
// GUID:      {856CA1B2-7DAB-11D3-ACEC-00C04F86C309}
// *********************************************************************//
  IVEHandler = interface(IUnknown)
    ['{856CA1B2-7DAB-11D3-ACEC-00C04F86C309}']
    function VEHandler(VECode: HResult; Context: tag_VerError; psa: PSafeArray): HResult; stdcall;
    function SetReporterFtn(lFnPtr: Int64): HResult; stdcall;
  end;

// *********************************************************************//
// The Class CoComCallUnmarshal provides a Create and CreateRemote method to          
// create instances of the default interface IMarshal exposed by              
// the CoClass ComCallUnmarshal. The functions are intended to be used by             
// clients wishing to automate the CoClass objects exposed by the         
// server of this typelibrary.                                            
// *********************************************************************//
  CoComCallUnmarshal = class
    class function Create: IMarshal;
    class function CreateRemote(const MachineName: string): IMarshal;
  end;

// *********************************************************************//
// The Class CoCorRuntimeHost provides a Create and CreateRemote method to          
// create instances of the default interface ICorRuntimeHost exposed by              
// the CoClass CorRuntimeHost. The functions are intended to be used by             
// clients wishing to automate the CoClass objects exposed by the         
// server of this typelibrary.                                            
// *********************************************************************//
  CoCorRuntimeHost = class
    class function Create: ICorRuntimeHost;
    class function CreateRemote(const MachineName: string): ICorRuntimeHost;
  end;

implementation

uses ComObj;

class function CoComCallUnmarshal.Create: IMarshal;
begin
  Result := CreateComObject(CLASS_ComCallUnmarshal) as IMarshal;
end;

class function CoComCallUnmarshal.CreateRemote(const MachineName: string): IMarshal;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_ComCallUnmarshal) as IMarshal;
end;

class function CoCorRuntimeHost.Create: ICorRuntimeHost;
begin
  Result := CreateComObject(CLASS_CorRuntimeHost) as ICorRuntimeHost;
end;

class function CoCorRuntimeHost.CreateRemote(const MachineName: string): ICorRuntimeHost;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_CorRuntimeHost) as ICorRuntimeHost;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -