مشاركة عبر


دالة CorBindToRuntimeHost

Enables hosts إلى تحميل a specified الإصدار of the وقت تشغيل اللغة العامة (CLR) في a عملية.

لقد تم مهمل هذه دالة في .NET Framework الإصدار 4.

HRESULT CorBindToRuntimeHost (
    [in] LPCWSTR       pwszVersion, 
    [in] LPCWSTR       pwszBuildFlavor, 
    [in] LPCWSTR       pwszHostConfigFile, 
    [in] VOID*         pReserved, 
    [in] DWORD         startupFlags, 
    [in] REFCLSID      rclsid, 
    [in] REFIID        riid, 
    [out] LPVOID FAR  *ppv
);

المعلمات

  • pwszVersion
    [في] A سلسلة that describes the الإصدار of the CLR you want إلى تحميل.

    A الإصدار رقم في the .NET Framework consists of الرابع parts separated بواسطة periods: رئيسي.ثانوي.بنية.المراجعة. The سلسلة passed كـ pwszVersion must يبدأ مع the حرف "v" followed بواسطة the أول three parts of the الإصدار رقم (for مثال, "v1.0.1529").

    Some versions of the CLR are installed مع a سياسة كشف that specifies توافق مع السابق versions of the CLR. بواسطة الافتراضي, the بدء التشغيل shim evaluates pwszVersion against سياسة statements و loads the latest الإصدار of the وقت التشغيل that هو متوافق مع the الإصدار being requested. A مضيف can force the shim إلى تخطي سياسة evaluation و تحميل the exact الإصدار specified في pwszVersion بواسطة passing a القيمة of STARTUP_LOADER_SAFEMODE for the startupFlags معلمة.

    If pwszVersion هو null, the أسلوب does not تحميل أي الإصدار of the CLR. Instead, it إرجاع CLR_E_SHIM_RUNTIMELOAD, which indicates that it فشل إلى تحميل the وقت التشغيل.

  • pwszBuildFlavor
    [في] A سلسلة that specifies whether إلى تحميل the الخادم أو the workstation بنية of the CLR. صالح قيم are svr و wks. The الخادم بنية هو الأمثل إلى يستفيد of multiple processors for garbage collections, و the workstation بنية هو الأمثل for العميل applications running تشغيل a مفرد-processor آلة.

    If pwszBuildFlavoris set to null, the workstation build is loaded. When running on a single-processor machine, the workstation build is always loaded, even if pwszBuildFlavoris set to svr. However, if pwszBuildFlavoris set to svr and concurrent garbage collection is specified (see the description of the startupFlags parameter), the server build is loaded.

    ملاحظةملاحظة

    مجموعة البيانات المهملة المتزامنة غير معتمدة في التطبيقات التي تشغل محاكي WOW64 x86 على أنظمة 64 بت التي تقوم بتطبيق هندسة Intel ‏‫Itanium (معروف سابقاً بـ IA-64).لمزيد من المعلومات حول استخدام WOW64 على انظمة windows 64 بت راجع تطبيقات 32-بت المفعلة ..

      

  • pwszHostConfigFile
    [في] The اسم of a مضيف ملف تكوين that specifies the الإصدار of the CLR إلى تحميل. If the اسم الملف does not تضمين a fully qualified مسار, the ملف هو assumed إلى be في the same الدليل كـ the تنفيذي that هو making the يتصل.

  • pReserved
    [في] محفوظ للقابلية للتوسعة المستقبلية.

  • startupFlags
    [في] مجموعة من الإشارات التي تتحكم المتزامنة تجميع البيانات المهملة، رمز محايدة للمجال، والسلوك pwszVersionالمعلمة. The الافتراضي هو مفرد مجال if لا يؤشر هو التعيين. يتم اعتماد قيم التالية:

    • STARTUP_CONCURRENT_GC: يحدد هذا المتزامن تجميع البيانات المهملة يجب استخدامها. If the caller asks for the الخادم بنية و specifies concurrent garbage مجموعة تشغيل a مفرد-processor آلة, the workstation بنية و non-concurrent garbage مجموعة are used instead.

    • STARTUP_LOADER_OPTIMIZATION_SINGLE_DOMAIN: تعين أنه لا يوجد تجميعات تم تحميلها كمجال-محايد.

    • STARTUP_LOADER_OPTIMIZATION_MULTI_DOMAIN: تعين أن الجميع تجميعات التي تم تحميلها كمجال-محايد.

    • STARTUP_LOADER_OPTIMIZATION_MULTI_DOMAIN_HOST: تعين أنه يتم تم تحميله الجميع قوي المسمى كـ semblies كـ محايدة للمجال.

    • STARTUP_LOADER_SAFEMODE: Specifies that the exact الإصدار of the CLR passed في pwszVersion will be تم تحميله. لا يتم تقييم سياسة الرقاقة إلى تحديد أحدث الإصدار متوافق.

  • rclsid
    [في] The CLSID of the coclass that implements the واجهة you are looking for. Supported قيم are CLSID_CorRuntimeHost أو null.

  • riid
    [في] The IID of the واجهة you are requesting. Supported قيم for the initial يطرح المنتج of the وقت التشغيل are IID_ICorRuntimeHost أو null.

  • ppv
    [خارج] An واجهة مؤشر إلى the الإصدار of the وقت التشغيل that was تم تحميله.

المتطلبات

الأنظمة الأساسية: See متطلبات النظام إطار عمل .NET.

**Header:**MSCorEE.idl

المكتبة: MSCorEE.dll

.NET Framework Versions: 4, 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0, 1.1, 1.0

راجع أيضًا:

المرجع

دالة CorBindToCurrentRuntime

دالة CorBindToRuntime

دالة CorBindToRuntimeByCfg

دالة CorBindToRuntimeEx

واجهة ICorRuntimeHost

موارد أخرى

.NET Framework 1.1 و 2.0 استضافة العمومية الثابتة وظائف