Gets an array of assemblies with the specified szAssemblyName parameter, using the standard rules employed by the common language runtime (CLR) for resolving references.
HRESULT FindAssembliesByName ( [in] LPCWSTR szAppBase, [in] LPCWSTR szPrivateBin, [in] LPCWSTR szAssemblyName, [out] IUnknown *ppIUnk, [in] ULONG cMax, [out] ULONG *pcAssemblies );
Given an assembly name, the FindAssembliesByName method finds the assembly by following the standard rules for resolving assembly references. (For more information, see How the Runtime Locates Assemblies.) FindAssembliesByName allows the caller to configure various aspects of the assembly resolver context, such as application base and private search path.
The FindAssembliesByName method requires the CLR to be initialized in the process in order to invoke the assembly resolution logic. Therefore, you must call CoInitializeEE (passing COINITEE_DEFAULT) before calling FindAssembliesByName, and then follow with a call to CoUninitializeCor.
FindAssembliesByName returns an IMetaDataImport pointer to the file containing the assembly manifest for the assembly name that is passed in. If the given assembly name is not fully specified (for example, if it does not include a version), multiple assemblies might be returned.
FindAssembliesByName is commonly used by a compiler that attempts to find a referenced assembly at compile time.
Platforms: See .NET Framework System Requirements.
Library: Used as a resource in MsCorEE.dll
.NET Framework Versions: 4.5, 4, 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0, 1.1, 1.0