Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gamecore_console: avoid importing timeGetDevCaps #3332

Merged
merged 1 commit into from
Jan 7, 2023

Conversation

jianye-chen
Copy link
Contributor

@jianye-chen jianye-chen commented Jan 7, 2023

Description

timeGetDevCaps is not available in WINAPI_FAMILY_GAMES and importing it in gamecore_console builds will crash the process at runtime due to DLL_NOT_FOUND.

See Windows 10 Software Development Kit (Win10SDK) for the API family available to Microsoft GDK gaming platform.

Testing

Existing tests do not cover the issue fixed by this PR.

The issue should be captured by the linker (and cause build failures) instead of automated tests. We should not link against OneCore.lib on gamecore_console as it provides the exports for the subset of Win32 APIs that are common to all Windows 10 devices.. Umbrella libraries are designed to ensure we restrict [our] code to Win32 APIs that are supported in the core OS. For gamecore_console, the umbrella library should be xgameplatform.lib.

The proper fix is to refactor our link dependencies on Windows platforms. That is however a riskier and more involved change, so this PR intends to address the immediate issue rendering msquic unusable on GDK gaming platform.

Documentation

N/A

it is not part of WINAPI_FAMILY_GAMES available to GDK platforms

The proper fix is to refactor our link dependencies on Windows platforms. That is however a risker and more involved change, so this PR intends to address the immediate issue rendering msquic unusable on GDK gaming platform.

Signed-off-by: Jianye Chen <jianyechen@microsoft.com>
@jianye-chen jianye-chen requested a review from a team as a code owner January 7, 2023 01:43
@nibanks
Copy link
Member

nibanks commented Jan 7, 2023

Existing tests do not cover the issue fixed by this PR.

The issue should be captured by the linker (and cause build failures) instead of automated tests. We should not link against OneCore.lib on gamecore_console as it provides the exports for the subset of Win32 APIs that are common to all Windows 10 devices.. Umbrella libraries are designed to ensure we restrict [our] code to Win32 APIs that are supported in the core OS. For gamecore_console, the umbrella library should be xgameplatform.lib.

The proper fix is to refactor our link dependencies on Windows platforms. That is however a riskier and more involved change, so this PR intends to address the immediate issue rendering msquic unusable on GDK gaming platform.

@jianye-chen thanks for the contribution. It would also be great if you could make a PR for what you suggest above too.

@nibanks nibanks merged commit 59acb51 into microsoft:main Jan 7, 2023
jianye-chen added a commit to jianye-chen/msquic that referenced this pull request Jan 9, 2023
jianye-chen added a commit to jianye-chen/msquic that referenced this pull request Jan 10, 2023
…es if possible (#2)

* Revert "gamecore_console: avoid importing timeGetDevCaps (microsoft#3332)"

This reverts commit 59acb51.

* gamecore_console: Windows 10 SDK 19041 or later

auto-detect windows sdk version available

* use OneCoreUap for uwp and OneCore for win32

* do not enforce sdk ver min

Signed-off-by: Jianye Chen <jianyechen@microsoft.com>
jianye-chen added a commit to jianye-chen/msquic that referenced this pull request Jan 10, 2023
nibanks pushed a commit that referenced this pull request Jan 24, 2023
it is not part of WINAPI_FAMILY_GAMES available to GDK platforms

The proper fix is to refactor our link dependencies on Windows platforms. That is however a risker and more involved change, so this PR intends to address the immediate issue rendering msquic unusable on GDK gaming platform.

Signed-off-by: Jianye Chen <jianyechen@microsoft.com>

Signed-off-by: Jianye Chen <jianyechen@microsoft.com>
nibanks added a commit that referenced this pull request Jan 24, 2023
* Use the new onebranch linux docker image (#3315)

* Address onebranch pipeline warnings (#3325)

* gamecore_console: avoid importing timeGetDevCaps (#3332)

it is not part of WINAPI_FAMILY_GAMES available to GDK platforms

The proper fix is to refactor our link dependencies on Windows platforms. That is however a risker and more involved change, so this PR intends to address the immediate issue rendering msquic unusable on GDK gaming platform.

Signed-off-by: Jianye Chen <jianyechen@microsoft.com>

Signed-off-by: Jianye Chen <jianyechen@microsoft.com>

* Adds Hashtable Restructuring (#3344)

* Adds Hashtable Restructuring

* Extra line in contract path

* Make compiler happy

* A bit of refactor

* Remove unnecessary declaration

* formatting

* Forgot to remove a few #ifdefs

* Updated PGO files

* Fix a tag

* Update src/platform/hashtable.c

* Update src/platform/hashtable.c

* Update src/platform/hashtable.c

* Rename CXPLAT_HASHTABLE_MAX_RESTRUCT_ATTEMPTS to CXPLAT_HASHTABLE_MAX_RESIZE_ATTEMPTS

Co-authored-by: Matt Olson <maolson@microsoft.com>

* gamecore_console: default to latest Windows SDK (#3343)

Signed-off-by: Jianye Chen <jianyechen@microsoft.com>

* Update Quic VNE and Version 2 constants. (#3324)

* gamecore_console: fix build with 10.0.20348.0 (#6) (#3348)

updated min. SDK to 10.0.20348.0 for SetThreadIdealProcessor

Signed-off-by: Jianye Chen <jianyechen@microsoft.com>

Signed-off-by: Jianye Chen <jianyechen@microsoft.com>

* Fix QUIC_SETTINGS param validation tests. (#3331)

* Fix credscan warnings (#3359)

* build: fix onebranch pipelines (#3360)

changed base image to ltsc2019/vse2019
installed additional SDK to the image
added pipeline parameter to specify the target branch

Signed-off-by: Jianye Chen <jianyechen@microsoft.com>

Signed-off-by: Jianye Chen <jianyechen@microsoft.com>

* Update patch version

* Use Ubuntu 20.04 to Build OpenSSL-Systemcrypto Variant (#3267)

* Fix/suppress some new clang/cppcheck warnings (#3064)

Signed-off-by: Jianye Chen <jianyechen@microsoft.com>
Co-authored-by: Yi Huang <huanyi@microsoft.com>
Co-authored-by: Jianye Chen <jianyechen@microsoft.com>
Co-authored-by: Matt Olson <maolson@microsoft.com>
Co-authored-by: Anthony Rossi <41394064+anrossi@users.noreply.github.com>
Co-authored-by: Lars Eggert <lars@eggert.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants