问题
I was looking through Microsoft's port of OpenSSL on GitHub. One commit caught my eye, and it was Adding Win10 Universal Platform support. In the commit, a partition called WINAPI_FAMILY_ONECORE_APP
showed up. However, I'm not finding much about it when searching. There are two hits in English and 22 hits in Chinese (see below).
Following What’s new in Visual Studio Tools for Windows 10 Preview provides some quasi-bullet points with no explanations:
- new API partition WINAPI_FAMILY_ONECORE_APP
- ARM 64
- Universal CRT
- ...
I have two questions:
What is
WINAPI_FAMILY_ONECORE_APP
, and how is it intended to be used?Can I use
WINAPI_FAMILY_ONECORE_APP
to detect Aarch64/ARM64 on Windows 10 gadgets?
Here's Microsoft's use of it in OpenSSL (snipped from ssl/dtls1.h; the C++ comment was moved above the define for readability):
// winsock.h not present in WindowsPhone/WindowsStore, defining the expected struct here
#if defined(WINAPI_FAMILY) && ( WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP || WINAPI_FAMILY==WINAPI_FAMILY_PC_APP || WINAPI_FAMILY==WINAPI_FAMILY_ONECORE_APP)
struct next_timeout {
long tv_sec;
long tv_usec;
} next_timeout;
回答1:
I think this is API which are available to all windows platforms (mobile, PC, xbox, hololens, IoT).
Windows OneCore
Windows OneCore is a platform for any device—phone, tablet, desktop, or IoT. Windows 10 provides a set of API and DDI interfaces that are common to multiple editions of Windows 10. This set of interfaces is called OneCore. With OneCore, you can also be assured that drivers and apps that are created using OneCore interfaces will run on multiple devices.
来源:https://stackoverflow.com/questions/38288622/what-is-winapi-family-onecore-app