home *** CD-ROM | disk | FTP | other *** search
- /**************************************************************************************
- ** **
- ** Mscoree.idl - interface definitions for mscoree.dll **
- ** **
- ** Copyright (c) 1996-2000 Microsoft Corporation. All Rights Reserved. **
- ** **
- **************************************************************************************/
-
- //
- // Interface descriptions
- //
- import "unknwn.idl";
- import "gchost.idl";
- import "ivalidator.idl";
-
- // LIBID mscoree
- cpp_quote("extern const GUID __declspec(selectany) LIBID_mscoree = {0x5477469e,0x83b1,0x11d2,{0x8b,0x49,0x00,0xa0,0xc9,0xb7,0xc9,0xc4}};")
-
- // CLSID CorRuntimeHost : uuid(CB2F6723-AB3A-11d2-9C40-00C04FA30A3E)
- cpp_quote("extern const GUID __declspec(selectany) CLSID_CorRuntimeHost = { 0xcb2f6723, 0xab3a, 0x11d2, { 0x9c, 0x40, 0x00, 0xc0, 0x4f, 0xa3, 0x0a, 0x3e } };")
-
- // CLSID ComCallUnmarshall
- cpp_quote("extern const GUID __declspec(selectany) CLSID_ComCallUnmarshal = {0x3F281000,0xE95A,0x11d2,{0x88,0x6B,0x00,0xC0,0x4F,0x86,0x9F,0x04}};")
-
- // IID IObjectHandle : uuid(C460E2B4-E199-412a-8456-84DC3E4838C3)
- cpp_quote("extern const GUID __declspec(selectany) IID_IObjectHandle = { 0xc460e2b4, 0xe199, 0x412a, { 0x84, 0x56, 0x84, 0xdc, 0x3e, 0x48, 0x38, 0xc3 } };")
-
-
- // IID IManagedObject : uuid(C3FCC19E-A970-11d2-8B5A-00A0C9B7C9C4)
- cpp_quote("extern const GUID __declspec(selectany) IID_IManagedObject = { 0xc3fcc19e, 0xa970, 0x11d2, { 0x8b, 0x5a, 0x00, 0xa0, 0xc9, 0xb7, 0xc9, 0xc4 } };")
-
- // IID ICorRuntimeHost : uuid(CB2F6722-AB3A-11d2-9C40-00C04FA30A3E)
- cpp_quote("extern const GUID __declspec(selectany) IID_ICorRuntimeHost = { 0xcb2f6722, 0xab3a, 0x11d2, { 0x9c, 0x40, 0x00, 0xc0, 0x4f, 0xa3, 0x0a, 0x3e } };")
-
- // IID ICorThreadpool : uuid(84680D3A-B2C1-46e8-ACC2-DBC0A359159A)
- cpp_quote("extern const GUID __declspec(selectany) IID_ICorThreadpool = { 0x84680D3A, 0xB2C1, 0x46e8, {0xAC, 0xC2, 0xDB, 0xC0, 0xA3, 0x59, 0x15, 0x9A } };")
-
- #pragma midl_echo("STDAPI GetCORSystemDirectory(LPWSTR pbuffer, DWORD cchBuffer, DWORD* dwlength);")
- #pragma midl_echo("STDAPI GetCORVersion(LPWSTR pbuffer, DWORD cchBuffer, DWORD* dwlength);")
- #pragma midl_echo("STDAPI CorBindToRuntime(LPWSTR pwszVersion, LPWSTR pwszBuildFlavor, REFCLSID rclsid, REFIID riid, LPVOID FAR *ppv);")
- #pragma midl_echo("STDAPI CorBindToCurrentRuntime(LPCWSTR pwszFileName, REFCLSID rclsid, REFIID riid, LPVOID FAR *ppv);")
- #pragma midl_echo("STDAPI RunDll32ShimW(HWND hwnd, HINSTANCE hinst, LPWSTR lpszCmdLine, int nCmdShow);")
- #pragma midl_echo("STDAPI LoadLibraryShim(LPCWSTR szDllName, LPCWSTR szVersion, LPVOID pvReserved, HMODULE *phModDll);")
- #pragma midl_echo("STDAPI GetRealProcAddress(LPCSTR pwszProcName, VOID** ppv);")
- #pragma midl_echo("void STDMETHODCALLTYPE CorExitProcess();")
-
- typedef enum {
- STARTUP_CONCURRENT_GC = 0x1
- } STARTUP_FLAGS;
-
- //*****************************************************************************
- // Interface for Object Handles
- //*****************************************************************************
- [
- object,
- oleautomation,
- uuid(C460E2B4-E199-412a-8456-84DC3E4838C3),
- helpstring("Object Handle Interface"),
- pointer_default(unique)
- ]
- interface IObjectHandle : IUnknown
- {
- HRESULT Unwrap([out, retval] VARIANT *ppv);
- };
-
-
-
-
- //*****************************************************************************
- // Interface for Setting runtime configuration
- //*****************************************************************************
- // {5C2B07A7-1E98-11d3-872F-00C04F79ED0D}
- //cpp_quote("extern const GUID __declspec(selectany) IID_AppDomainBinding= { 0x5c2b07a7, 0x1e98, 0x11d3, { 0x87, 0x2f, 0x00, 0xc0, 0x4f, 0x79, 0xed, 0x0d } };")
- [
- uuid(5C2B07A7-1E98-11d3-872F-00C04F79ED0D),
- version(1.0),
- helpstring("Application Domain call back"),
- pointer_default(unique),
- local
- ]
- interface IAppDomainBinding : IUnknown
- {
- // TODO: this should return a AppDomain interface
- // The event is invoked everytime a domain is created
- HRESULT OnAppDomain([in] IUnknown* pAppdomain);
- }
-
-
- //*****************************************************************************
- // Interface for participating in the scheduling of threads that would
- // otherwise be blocked for a GC
- //*****************************************************************************
- [
- uuid(F31D1788-C397-4725-87A5-6AF3472C2791),
- version(1.0),
- helpstring("Control over threads blocked in GC"),
- pointer_default(unique),
- local
- ]
- interface IGCThreadControl : IUnknown
- {
- // Notification that the thread making the call is about to block, perhaps for
- // a GC or other suspension. This gives the host an opportunity to re-schedule
- // the thread for unmanaged tasks.
- HRESULT ThreadIsBlockingForSuspension();
-
- // Notification that the runtime is beginning a thread suspension for a GC or
- // other suspension. Do not reschedule this thread!
- HRESULT SuspensionStarting();
-
- // Notification that the runtime is resuming threads after a GC or other
- // suspension. Do not reschedule this thread!
- HRESULT SuspensionEnding(DWORD Generation);
- }
-
- //*****************************************************************************
- // Interface for accessing threadpool
- //*****************************************************************************
- typedef VOID (__stdcall *WAITORTIMERCALLBACK)(PVOID, BOOL);
- typedef DWORD (__stdcall *LPTHREAD_START_ROUTINE)(LPVOID lpThreadParameter);
- cpp_quote("#ifdef UNDER_CE")
- typedef VOID (*LPOVERLAPPED_COMPLETION_ROUTINE)(DWORD dwErrorCode,
- DWORD dwNumberOfBytesTransfered,
- LPVOID lpOverlapped);
- cpp_quote("#endif // UNDER_CE")
- [
- uuid(84680D3A-B2C1-46e8-ACC2-DBC0A359159A),
- version(1.0),
- helpstring("Threadpool interface"),
- pointer_default(unique),
- local
- ]
- interface ICorThreadpool : IUnknown
- {
- HRESULT CorRegisterWaitForSingleObject([in] HANDLE* phNewWaitObject,
- [in] HANDLE hWaitObject,
- [in] WAITORTIMERCALLBACK Callback,
- [in] PVOID Context,
- [in] ULONG timeout,
- [in] BOOL executeOnlyOnce,
- [out] BOOL* result );
-
- HRESULT CorUnregisterWait([in] HANDLE hWaitObject,[in] HANDLE CompletionEvent,[out] BOOL* result);
-
- HRESULT CorQueueUserWorkItem([in] LPTHREAD_START_ROUTINE Function,
- [in] PVOID Context,
- [in] BOOL executeOnlyOnce,
- [out] BOOL* result );
-
-
- HRESULT CorCreateTimer([in] HANDLE* phNewTimer,
- [in] WAITORTIMERCALLBACK Callback,
- [in] PVOID Parameter,
- [in] DWORD DueTime,
- [in] DWORD Period,
- [out] BOOL* result);
-
- HRESULT CorChangeTimer([in] HANDLE Timer, [in] ULONG DueTime, [in] ULONG Period, [out] BOOL* result);
-
- HRESULT CorDeleteTimer([in] HANDLE Timer, [in] HANDLE CompletionEvent, [out] BOOL* result);
-
- HRESULT CorBindIoCompletionCallback([in] HANDLE fileHandle, [in] LPOVERLAPPED_COMPLETION_ROUTINE callback);
- }
-
- [
- uuid(23D86786-0BB5-4774-8FB5-E3522ADD6246),
- version(1.0),
- helpstring("Control over threads blocked in debugging services"),
- pointer_default(unique),
- local
- ]
- interface IDebuggerThreadControl : IUnknown
- {
- // Notification that the thread making the call is about to
- // block within the debugging services. This gives the host
- // an opportunity to perform another action while the thread
- // blocks. This will always be called on a Runtime thread.
- HRESULT ThreadIsBlockingForDebugger();
-
- // Notification that the debugging services is about to
- // release all threads it has blocked. This will never be
- // called on a Runtime thread. If the host has a Runtime
- // thread blocked in ThreadIsBlockingForDebugger() then it
- // should release it now.
- HRESULT ReleaseAllRuntimeThreads();
- }
-
- // {5C2B07A5-1E98-11d3-872F-00C04F79ED0D}
- //cpp_quote("extern const GUID __declspec(selectany) IID_ICorConfiguration = { 0x5c2b07a5, 0x1e98, 0x11d3, { 0x87, 0x2f, 0x00, 0xc0, 0x4f, 0x79, 0xed, 0x0d } };")
- [
- uuid(5C2B07A5-1E98-11d3-872F-00C04F79ED0D),
- version(1.0),
- helpstring("Com+ Configuration Interface"),
- pointer_default(unique),
- local
- ]
- interface ICorConfiguration : IUnknown
- {
- // The event is invoked everytime a domain is created
- HRESULT SetAppDomainLoadEvent([in] IAppDomainBinding* pAppStartEvent);
-
- // Set the callback for scheduling threads for non-runtime tasks when they
- // would otherwise be blocked for a GC.
- HRESULT SetGCThreadControl([in] IGCThreadControl* pGCThreadControl);
-
- // Set the callback interface that the debugging services will
- // call as Runtime threads are blocked and un-blocked for
- // debugging.
- HRESULT SetDebuggerThreadControl([in] IDebuggerThreadControl* pDebuggerThreadControl);
-
- // The host may indicate to the debugging services that a
- // particular thread should be allowed to continue to execute
- // while the debugger has an application stopped during
- // managed/unmanaged debugging scenarios. The specified thread
- // will not be allowed to run managed code, or to enter the
- // Runtime in any way. An example of such a thread would be an
- // in-process thread to support legacy script debuggers.
- HRESULT AddDebuggerSpecialThread([in] DWORD dwSpecialThreadId);
- }
-
- //*****************************************************************************
- // Interface for hosting mscoree
- //*****************************************************************************
- typedef void* HDOMAINENUM;
-
- [
- uuid(CB2F6722-AB3A-11d2-9C40-00C04FA30A3E),
- version(1.0),
- helpstring("Com+ Runtime Hosting Interface"),
- pointer_default(unique),
- local
- ]
- interface ICorRuntimeHost : IUnknown
- {
-
- //=================================================================
- //
- // Depricated methods.
-
- HRESULT VerifyClassesInModule(
- [in] DWORD BaseAddress); // Base Address of the file to verify.
-
- HRESULT CreateFiberInfo();
- HRESULT DeleteFiber();
- HRESULT SwitchFiberIn(
- [in] DWORD *pFiberCookie); // [in] Cookie that indicates the fiber to use.
-
- HRESULT SwitchFiberOut(
- [out] DWORD **pFiberCookie); // [out] Cookie that indicates the fiber being switched out.
-
- HRESULT MapFile(
- [in] ULONG hFile, // [in] HANDLE for file
- [out] HMODULE* hMapAddress); // [out] HINSTANCE for mapped file
-
- //=================================================================
- //
- // New hosting methods
- //
- // Returns an object for configuring the runtime prior to
- // it starting. If the runtime has been initialized this
- // routine returns an error. See ICorConfiguration.
- HRESULT GetConfiguration([out] ICorConfiguration** pConfiguration);
-
- // Starts the runtime. This is equivalent to CoInitializeCor();
- HRESULT Start();
-
- // Terminates the runtime, This is equivalent CoUninitializeCor();
- HRESULT Stop();
-
- // Creates a domain in the runtime. The identity array is
- // a pointer to an array TYPE containing IIdentity objects defining
- // the security identity. The policy array is a pointer to an array
- // TYPE containing Context policies that added on in addition to the
- // basic policies for a AppDomain.
- HRESULT CreateDomain([in] LPWSTR pwzFriendlyName, // Optional
- [in] IUnknown* pIdentityArray, // Optional
- [in] IUnknown* pPolicyArray, // Optional
- [out] IUnknown** pAppDomain);
-
- // Creates a domain in the runtime. A proxy controls a single
- // domain. But provides more control over the domain.
- HRESULT CreateDomainProxy([in] LPWSTR pwzFriendlyName, // Optional
- [in] IUnknown* pIdentityArray, // Optional
- [in] IUnknown* pPolicyArray, // Optional
- [out] IUnknown** pDomainProxy);
-
- // Returns the default domain.
- HRESULT GetDefaultDomain([out] IUnknown** pAppDomain);
-
-
- // Enumerate currently existing domains.
- HRESULT EnumDomains([out] HDOMAINENUM *hEnum);
-
- // Returns S_FALSE when there are no more domains. A domain
- // is passed out only when S_OK is returned.
- HRESULT NextDomain([in] HDOMAINENUM hEnum,
- [out] IUnknown** pAppDomain);
-
- // Resets the enumeration back to the beginning of the
- // list
- HRESULT ResetDomainEnum([in] HDOMAINENUM hEnum);
-
- // Close the enumeration releasing resources
- HRESULT CloseEnum([in] HDOMAINENUM hEnum);
-
- // Verifies an assembly. This allows an assembly to be checked prior
- // to adding it to a domain. The assembly is not mapped into any
- // Assembly
- HRESULT VerifyAssembly([in, size_is(cbModule)] BYTE* pbModule, // Base Address of the file to verify.
- [in] DWORD cbModule,
- [in, size_is(errorSize)] LONG* errors,
- [in] DWORD errorSize,
- [out] DWORD* errorCount);
-
- // Verifies an assembly. This allows an assembly to be checked prior
- // to adding it to a domain. The assembly is loaded into the default
- // Domain and returned.
- HRESULT VerifyAssemblyFile([in] LPWSTR,
- [in, size_is(errorSize)] LONG* errors,
- [in] DWORD errorSize,
- [out] DWORD* errorCount);
-
- };
-
-
- //*****************************************************************************
- // mscoree typelib definition
- //*****************************************************************************
-
- [
- uuid(5477469e-83b1-11d2-8b49-00a0c9b7c9c4),
- version(1.0),
- helpstring("Com+ Runtime Execution Engine 1.0 Type Library")
- ]
- library mscoree
- {
- importlib("stdole32.tlb");
- //*****************************************************************************
- // Interface for controlling a managed object
- //*****************************************************************************
- [
- object,
- oleautomation,
- uuid(C3FCC19E-A970-11d2-8B5A-00A0C9B7C9C4),
- helpstring("Managed Object Interface"),
- pointer_default(unique)
- ]
- interface IManagedObject : IUnknown
- {
- HRESULT GetSerializedBuffer( [out] BSTR *pBSTR);
- };
-
-
- [
- uuid(3F281000-E95A-11d2-886B-00C04F869F04),
- helpstring("Com Call Wrapper Unmarshalling Class")
- ]
- coclass ComCallUnmarshal
- {
- [default] interface IMarshal;
- };
-
- [
- uuid(CB2F6723-AB3A-11d2-9C40-00C04FA30A3E),
- helpstring("Cor Runtime Hosting Class")
- ]
- coclass CorRuntimeHost
- {
- [default] interface ICorRuntimeHost;
- interface IGCHost;
- interface IValidator;
- };
-
- };
-