مشاركة عبر


أسلوب IHostAssemblyStore::ProvideAssembly

Gets a مرجع إلى an تجميع that ليس مشار إليها بواسطة the ICLRAssemblyReferenceList that هو returned من IHostAssemblyManager::GetNonHostStoreAssemblies. The وقت تشغيل اللغة العامة (CLR) calls ProvideAssembly for each تجميع that does not appear في the قائمة.

HRESULT ProvideAssembly (
    [in]  AssemblyBindInfo *pBindInfo,
    [out] UINT64           *pAssemblyId,
    [out] UINT64           *pHostContext,
    [out] IStream          **ppStmAssemblyImage,
    [out] IStream          **ppStmPDB
);

المعلمات

  • pBindInfo
    [في] A مؤشر إلى an AssemblyBindInfo مثيل that the مضيف uses to determine certain يربط characteristics, including the presence أو absence of أي تعيين الإصدار سياسة, و which تجميع to يربط to.

  • pAssemblyId
    [خارج] A مؤشر إلى a معرّف فريد for the requested تجميع for this IStream.

  • pHostContext
    [خارج] A مؤشر إلى مضيف-specific بيانات that هو used to determine the دليل of the requested تجميع without the need of a النظام الأساسي invoke يتصل. pHostContext corresponds إلى the HostContext خاصية of the مدارة Assembly فئة.

  • ppStmAssemblyImage
    [خارج] A مؤشر إلى the العنوان of an IStream that يحتوي على the portable تنفيذي (PE) نسخة to be تم تحميله, أو null if the تجميع could not be found.

  • ppStmPDB
    [خارج] A مؤشر إلى the العنوان of an IStream that يحتوي على the برنامج يصحح (PDB) معلومات, أو null if the .pdb ملف could not be found.

القيمة المُرجعة

hresult

الوصف

S_OK

ProvideAssembly returned successfully.

HOST_E_CLRNOTAVAILABLE

The CLR has not been تم تحميله في a عملية, أو the CLR هو in a الولاية in which it cannot تشغيل مدارة تعليمات برمجية أو عملية the يتصل successfully.

HOST_E_TIMEOUT

The يتصل timed خارج.

HOST_E_NOT_OWNER

The caller does not own the قفل.

HOST_E_ABANDONED

An حدث was canceled while a blocked مؤشر ترابط أو fiber was جارى الإنتظار تشغيل it.

E_FAIL

An مجهول catastrophic فشل occurred. عند إرجاع أسلوب E_FAIL، CLR هو لم تعد قابلة للاستخدام في العملية. المكالمات اللاحقة إلى المضيف للأساليب إرجاع HOST_E_CLRNOTAVAILABLE.

ERROR_FILE_NOT_FOUND

The requested تجميع could not be located.

error_insufficient_buffer

The احتياطي الحجم specified بواسطة pAssemblyId ليس قطر أيمن متوسط enough إلى تقييد the معرّف that the مضيف wants إلى return.

ملاحظات

The الهوية القيمة returned for pAssemblyId هو specified بواسطة the مضيف. Identifiers must be فريد within the مدة بقاء of a عملية. The CLR uses this القيمة كـ a معرّف فريد for the stream. It checks each القيمة against the قيم for pAssemblyId returned بواسطة غير ذلك calls إلى ProvideAssembly. If the مضيف إرجاع the same pAssemblyId القيمة for another IStream, the CLR checks whether the المحتويات of that stream have already been mapped. If so, the وقت التشغيل loads the موجود نسخ of the نسخة instead of mapping a جديد واحد.

المتطلبات

الأنظمة الأساسية: 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

راجع أيضًا:

المرجع

واجهة ICLRAssemblyReferenceList

واجهة IHostAssemblyManager

واجهة IHostAssemblyStore