locked
Porting an old sdk in native c++ to windows store

    Question

  • Hi,

    We have an SDK that uses scanners in windows written in C++ under VC 2010. It is using MFC and other externals libraries.

    One of our clients wants to move to windows store app , and work with our SDK. I am trying to connect from windows store app to our SDK using marshalling but currently without success. 

    when trying to call one of  the dll`s function I get the error:

    "An exception of type 'System.DllNotFoundException' occurred in App3.exe but was not handled in user code"

    I tried to add the dll to the project but without success. What is the best way to do it?

    Another way is using com object but I undersetand this is also not supported.

    Any clue will be appreciate.

    Thanks

    Yaron

    Tuesday, January 13, 2015 6:13 PM

Answers

  • Hi,

    Windows 8.1 lets device manufacturers create a Windows Store device app that serves as a companion to their device. In windows 8.1, there are some API you can use to manage devices:

    http://msdn.microsoft.com/en-us/library/windows/hardware/dn265141(v=vs.85).aspx

    Also, you can create Brokered Windows Runtime Components and their Proxy Stubs, which enables side-loaded modern applications to communicate with pre-existing desktop components. There is a sample:

    https://visualstudiogallery.msdn.microsoft.com/527286e4-b06a-4234-adde-d313c9c3c23e

    But that is only used for side-loading windows store app. If you publish this app to store, you may not pass the WACK certification.

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

    Thursday, January 15, 2015 8:11 AM

All replies

  • Hi,

    You cannot directly load the SDK into windows store app. There is only a part of Win32 API can be used in Windows Store app. Please check the link:
    Win32 API
    http://msdn.microsoft.com/en-us/library/windows/desktop/br205757.aspx

    I recommend you can create a windows runtime component and then migrate your C++ native codes to C++/CX. And then load the component to your app:

    http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh441572.aspx

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

    Wednesday, January 14, 2015 8:32 AM
  • Hi Anne,

    Thank you for the answer.

    The problem is part of our code is using 3rd part libraries that we do not have the source code for , so we can

    not recompile them. 

    We also connect to windows desktop devices to use camera`s and scanner`s is this possible to do from a windows runtime component?

    And third , I was thinking to use something like inter process communication. "Brokered Windows Runtime Components for side-loaded Windows Store apps" , http://msdn.microsoft.com/en-us/library/windows/apps/dn630195.aspx.

    Do you think this might be the a solution , until I can replace the third party libraries with our own code?

    Also - I understand that MFC, (like , CString and CDialog) are not supported in windows store?

    Wednesday, January 14, 2015 2:52 PM
  • Hi,

    Windows 8.1 lets device manufacturers create a Windows Store device app that serves as a companion to their device. In windows 8.1, there are some API you can use to manage devices:

    http://msdn.microsoft.com/en-us/library/windows/hardware/dn265141(v=vs.85).aspx

    Also, you can create Brokered Windows Runtime Components and their Proxy Stubs, which enables side-loaded modern applications to communicate with pre-existing desktop components. There is a sample:

    https://visualstudiogallery.msdn.microsoft.com/527286e4-b06a-4234-adde-d313c9c3c23e

    But that is only used for side-loading windows store app. If you publish this app to store, you may not pass the WACK certification.

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

    Thursday, January 15, 2015 8:11 AM