Can a SilverLight component instantiate a registration-free COM-visible .NET object -


we trying load in silverlight 5.0 component running in ie com-visible .net object registration-free using activation context api. http://msdn.microsoft.com/en-us/library/ms973913.aspx

the silverlight component runnning trusted application in browser described in http://msdn.microsoft.com/en-us/library/gg192793(v=vs.95).aspx.

the object can loaded in stand-alone test application using activation context api manifest formed. in siverlight running inside browser, component loader dll (loaded appdata/locallow) creates , activates activation context fails load com-visible .net object dll appdata/locallow. result "the file not found".

does have experience silverlight/com in similar setup?

tia

i filed ticket microsoft , suggested solution workaround actual activation context bug.

 //create own activation context pointing manifest  actctx actctx;  ulong_ptr pctxcookie;  //initialize actctx manifest name , path  ....  handle hactctx = createactctx(&actctx);  activateactctx(hactctx, &pctxcookie);  ....  //surround every call createinstance null activation context, otherwise error on deactivateactctx!!!  ulong_ptr cookie; //do not reuse pctxcookie!!!  activateactctx(null, &cookie); hresult hr = classa.createinstance(__uuidof(sxsnet::sxsclass));  deactivateactctx(0, cookie); //deactivate null context  ...  //deactivate , deallocate actual manifest based activation context  deactivateactctx(0, pctxcookie);  releaseactctx(hactctx); 

the solution not work. problem solution null context forces binding registered version of .net assembly not 1 using isolated context. there bug in registration-free com when invoking .net assemblies because of binding search logic not in manifest location @ @ gac , bin path of process.

according microsoft:

this error occurs because fusion probing failing .net assembly managed com component defined , implemented. .net runtime probes files relative exeuctable path or global assembly cache. reg-free managed com interop ignores root manifest path.

i hope helps in future.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -