Differences From Artifact [752886f486]:
- File
src/OFWindowsRegistryKey.m
— part of check-in
[94f1f0f479]
at
2020-04-21 22:47:25
on branch trunk
— OFWindowsRegistryKey: Compatibility with Win XP
This requires a slight API change to OFWindowsRegistryKey, as the
previous API was depending on RegGetValueW(), which is not available on
Windows XP. (user: js, size: 8189) [annotate] [blame] [check-ins using]
To Artifact [bed1fd3ca5]:
- File src/OFWindowsRegistryKey.m — part of check-in [725eec4cfc] at 2020-04-22 22:19:48 on branch trunk — OFWindowsRegistryKey: Verify string types (user: js, size: 8403) [annotate] [blame] [check-ins using]
︙ | |||
22 23 24 25 26 27 28 29 30 31 32 33 34 35 | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | + | #include <windows.h> #import "OFCreateWindowsRegistryKeyFailedException.h" #import "OFDeleteWindowsRegistryKeyFailedException.h" #import "OFDeleteWindowsRegistryValueFailedException.h" #import "OFGetWindowsRegistryValueFailedException.h" #import "OFInvalidEncodingException.h" #import "OFInvalidFormatException.h" #import "OFOpenWindowsRegistryKeyFailedException.h" #import "OFOutOfRangeException.h" #import "OFSetWindowsRegistryValueFailedException.h" @interface OFWindowsRegistryKey () - (instancetype)of_initWithHKey: (HKEY)hKey |
︙ | |||
140 141 142 143 144 145 146 | 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | - + | } - (OFWindowsRegistryKey *) createSubkeyAtPath: (OFString *)path options: (DWORD)options securityAndAccessRights: (REGSAM)securityAndAccessRights securityAttributes: (LPSECURITY_ATTRIBUTES)securityAttributes |
︙ | |||
165 166 167 168 169 170 171 | 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 | - + | return [[[OFWindowsRegistryKey alloc] of_initWithHKey: subKey close: true] autorelease]; } - (OFData *)dataForValue: (OFString *)value |
︙ | |||
241 242 243 244 245 246 247 | 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 | - + + - + + + + | - (OFString *)stringForValue: (OFString *)value { return [self stringForValue: value type: NULL]; } - (OFString *)stringForValue: (OFString *)value |
︙ | |||
274 275 276 277 278 279 280 281 282 283 284 285 286 287 | 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 | + + + | length = i; break; } } ret = [[OFString alloc] initWithUTF16String: UTF16String length: length]; if (typeOut != NULL) *typeOut = type; objc_autoreleasePoolPop(pool); return [ret autorelease]; } - (void)setString: (OFString *)string |
︙ |