What is WINAPI_FAMILY_ONECORE_APP?

2019-02-26 04:59发布

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:


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;

enter image description here

1条回答
我命由我不由天
2楼-- · 2019-02-26 05:39

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.

查看更多
登录 后发表回答