none
[UWP][CX]How to call CX code in DLL from Win32App C++ ?

    Question

  • Hello,

    I tried convert a win32 app to UWP by Project Centennial. So, I want call some functions in  C++ universal DLL project(CX) from my win32 app.

    I found a great article here . But it only work on DLL - C# universal DLL project, not work on DLL - C++ universal DLL project

    Please tell me know if you know anything!

    Thank.


    Tuesday, July 12, 2016 10:33 AM

All replies

  • Hello Michinin,

    May I know some details about why you want to use this dll in your desktop C++ app?

    When you search with this keyword "Using Windows 8* WinRT API from desktop applications", you will find "Using the Windows Runtime from a C++ Project". Which is related to this article in MSDN: How to: Activate and Use a Windows Runtime Component

    Which tells us about how you can use a desktop console app to consume the winrt library. And here is a video about it:

    The Windows Runtime Library (WRL)

    Hope this is helpful for you.

    Best regards,

    Barry


    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.
    Click HERE to participate the survey.

    Wednesday, July 13, 2016 7:57 AM
  • Hello Barry Wang,

    - Thanks for your reply, I research it ...

    - For your question: I deploy my apps on some Platform. So first, I deploy them on Win32 then convert to other platforms

    I have a few Libs to perform features in the app as LiveTile, PushNotification, In App Purchase, Ads ... They were wrote by C++/CX DLL

    Usually for Windows Platform, I create a universal project then add App code in W32 and link to the Libs.

    But currently, I see Project Centennial - It can convert direct file exe (win32app) to UWP. I did it and this tools is Ok, so I am looking for a way to call functions, api in file DLL (C++/CX universal app) from Win32 app.

    - Do you have any idea for this?

    Wednesday, July 13, 2016 11:02 AM
  • Hi Michinin,

    Centennial team is currently monitor Centennial related issues on Uservoice site, please post your issue there.

    Thank you for your understanding.


    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.
    Click HERE to participate the survey.

    Sunday, July 17, 2016 1:38 PM