locked
Error on deploying brokered Windows Runtime Components

    Question

  • Hi,

    I downloaded broker winrt ap client-server sample from below link:-

    https://code.msdn.microsoft.com/windowsapps/Brokered-Windows-Runtime-9d64cada/view/Discussions

    The sample works fine on my local machine but when i deploy it on test device i see a following error:- "Unable to cast COM object of type 'Fabrikam.EnterpriseServer' to interface type 'Fabrikam.IFoo'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{96F6F9C8-253D-47F3-8D1E-55F9D5A42A10}' failed due to the following error: The specified module could not be found. (Exception from HRESULT: 0x8007007E). I performed similar steps on this test machine as done on local machine but still it fails. I do see SampleProxy.dll on dllhost on test device but still it doesn'twork. Can you please let me know how can I make it work on test machine? Thanks for any inputs!

    Monday, November 24, 2014 11:39 AM

All replies

  • Are you able to run the sample successfully on the test machine?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Monday, November 24, 2014 8:24 PM
    Moderator
  • I don't have Visual studio installed on the test machine. Basically this test machine is a windows 8.1 pro tablet. I tried on the several other win 8.1 tablets too but it fails with same error. I created my own test sample and it worked fine on my local machine. Again, when I deployed it on test device I got a similar error.

    I think there is some small setting missing to make this work.

    If you see the instructions in option 3 mentioned on this (http://msdn.microsoft.com/en-us/library/windows/apps/dn169426.aspx) link, you will notice that it asks you to add the dll (SampleProxy.dll in my case) to the client project and add following tag in the manifest but I am unable to add the dll to the client project as it is incompatible with win rt project.

    <Extensions> <!—Use your own GUIDs!!!-->
        <Extension Category="windows.activatableClass.proxyStub">
          <ProxyStub ClassId="1ecafeff-1ee1-504a-9af5-a68c6fb2b47d">
            <Path>SampleProxy.dll</Path>
            <Interface Name="IFoo" InterfaceId="F8D30778-9EAF-409C-BCCD-C8B24442B09B"/>
          </ProxyStub>      
        </Extension>
      </Extensions>

    Please help!

    Tuesday, November 25, 2014 1:39 AM
  • I think I am very close now. I realized that the proxy/stub project is not a Windows Runtime compatible. So I created a Windows Runtime Component using those proxy and stub. I added the reference to the newly created component to my client app and edited the manifest to point to the dll (as mentioned in the above link I mentioned). Now, when I run the sample on my local machine I see an error

    {"Requested Windows Runtime type 'EnterpriseServer.Fabrikam' is not registered.":"EnterpriseServer.Fabrikam"}

    What I need to register this WinRT component? regsvr32 doesn't help in registering it.

    Thanks for any help! I can do a demo sample for you if you want to test.


    • Edited by UpkarS Tuesday, November 25, 2014 10:35 AM
    Tuesday, November 25, 2014 10:06 AM
  • Yes, please provide a sample so I can test it.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Tuesday, November 25, 2014 1:31 PM
    Moderator
  • How can I send you the sample?

    Thanks for your help!

    Wednesday, November 26, 2014 5:48 AM