On May 3, 10:11 am, a <***@gmail.com> wrote:
> I'm using SXS COM activation to use CoCreateInstance to create a COM
> exposed .Net class --- I get
> CoCreateInstance failed; HRESULT: 0X80131522
> Why might this be? --- I can't think how to debug this.
> Thanks in advance for any advice on debugging this issue.
Found the problem, recording here for posterity.
So, I got no help from sxstrace or fuslogvw.
The problem was this:
I was writing a simple C# class like this:
public class UiLauncher : IUiLauncher
private ExampleUi m_ui = null;
private IwpmExampleViewModel m_example_vm = null;
static extern IntPtr SetParent (IntPtr hWnd, IntPtr hParent);
public long Show(long parent, IwpmExampleViewModel vm)
Debug.Assert(0 != parent, "parent is 0");
Debug.Assert(null != vm, "vm is 0");
m_example_vm = vm;
m_ui = new ExampleUi(vm);
WindowInteropHelper wih = new WindowInteropHelper(m_ui);
IntPtr hWnd = wih.Handle;
IntPtr ipparent = new IntPtr(parent);
Note --- there is no namespace.
I hacked together (by copy / paste and change from some other example)
a manifest file to allow SXS that looked like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
Basically I got the clrClass attribute name wrong --- I had put in a
bogus namespace where none was needed so instead of
I should have just had