I'm developing in C++ a Universal Windows Platform app. I have a working project in C++ which can communicate with smart cards. For this communication it uses the winscard.h library.
I'd like to use in the UWP app this functions provided by the winscard.h, but I can't compile it in the UWP. After some research I found that in this header file there is a condition:
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
So this is the reason the compiler doesn't found the methods. Going forward I wanted to change this WINAPI_FAMILY_PARTITION to the WINAPI_PARTITION_DESKTOP but I found nothing about this.
I set in the appxmanifest file the TargetDeviceFamily name to Windows.Desktop, but it doesn't help.
So, my questions are:
WINAPI_FAMILY_PARTITION?
If not:winscard.h lib in UWP app?The WINAPI_PARTITION_DESKTOP guard means the API is not supported for UWP apps. It is trivial to unblock the compiler, but it's not a good idea.
The correct way to do this is with the types in the Windows.Devices.SmartCards namespace. If there are features missing from that API, you can send feedback via UserVoice or the Feedback Hub.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With