Skip to content

Commit 8e7cff6

Browse files
committed
WinSDK: add some more constants to the overlay
The WinReg.h constants for the register hives are not imported through the clang importer due to the complicated casting. Duplicate the values to allow usage in Swift.
1 parent e8c3927 commit 8e7cff6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

stdlib/public/Windows/WinSDK.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,18 @@ public let DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2: DPI_AWARENESS_CONTEXT =
9090
public let DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED: DPI_AWARENESS_CONTEXT =
9191
DPI_AWARENESS_CONTEXT(bitPattern: -5)!
9292

93+
// winreg.h
94+
public let HKEY_CLASSES_ROOT: HKEY = HKEY(bitPattern: 0x80000000)!
95+
public let HKEY_CURRENT_USER: HKEY = HKEY(bitPattern: 0x80000001)!
96+
public let HKEY_LOCAL_MACHINE: HKEY = HKEY(bitPattern: 0x80000002)!
97+
public let HKEY_USERS: HKEY = HKEY(bitPattern: 0x80000003)!
98+
public let HKEY_PERFORMANCE_DATA: HKEY = HKEY(bitPattern: 0x80000004)!
99+
public let HKEY_PERFORMANCE_TEXT: HKEY = HKEY(bitPattern: 0x80000050)!
100+
public let HKEY_PERFORMANCE_NLSTEXT: HKEY = HKEY(bitPattern: 0x80000060)!
101+
public let HKEY_CURRENT_CONFIG: HKEY = HKEY(bitPattern: 0x80000005)!
102+
public let HKEY_DYN_DATA: HKEY = HKEY(bitPattern: 0x80000006)!
103+
public let HKEY_CURRENT_USER_LOCAL_SETTINGS: HKEY = HKEY(bitPattern: 0x80000007)!
104+
93105
// Swift Convenience
94106
public extension FILETIME {
95107
var time_t: time_t {

0 commit comments

Comments
 (0)