Usando assemblyresolve para manipular conjuntos ausentes em c #

Eu estou seguindo o método 3 emhttp://support.microsoft.com/kb/837908 carregar assemblies dinamicamente em c #. No entanto, o código não está funcionando para mim. Na seção seguinte do código, o autor carrega o assembly ausente somente se o nome do assembly ausente for um dos assemblies referenciados pelo aplicativo.

Quando eu executo isso sob depuração, a função está sendo chamada, mas o assembly ausente não está em qualquer um desses assemblies referenciados e, portanto, não é definido no meu caso. Alguma idéia porque isso está ocorrendo? Não tenho certeza se essa DLL é C # ou C ++ nativo. Isso pode ser porque as dlls do C ++ não podem ser carregadas dessa maneira? Então, por que essa função sendo chamada para um assembly C ++ ausente? Quaisquer explicações apreciadas. Se isso não funcionar para assemblies C ++ referenciados em C #, quais são as alternativas?

private Assembly MyResolveEventHandler(object sender,ResolveEventArgs args)
{
    //This handler is called only when the common language runtime tries to bind to the assembly and fails.

    //Retrieve the list of referenced assemblies in an array of AssemblyName.
    Assembly MyAssembly,objExecutingAssemblies;
    string strTempAssmbPath="";

    objExecutingAssemblies=Assembly.GetExecutingAssembly();
    AssemblyName [] arrReferencedAssmbNames=objExecutingAssemblies.GetReferencedAssemblies();

    //Loop through the array of referenced assembly names.
    foreach(AssemblyName strAssmbName in arrReferencedAssmbNames)
    {
        //Check for the assembly names that have raised the "AssemblyResolve" event.
        if(strAssmbName.FullName.Substring(0, strAssmbName.FullName.IndexOf(","))==args.Name.Substring(0, args.Name.IndexOf(",")))
        {
            //Build the path of the assembly from where it has to be loaded.                
            strTempAssmbPath="C:\\Myassemblies\\"+args.Name.Substring(0,args.Name.IndexOf(","))+".dll";
            break;
        }

    }
    //Load the assembly from the specified path.                    
    MyAssembly = Assembly.LoadFrom(strTempAssmbPath);                   

    //Return the loaded assembly.
    return MyAssembly;          
}

questionAnswers(1)

yourAnswerToTheQuestion