Commit Graph

57 Commits

Author SHA1 Message Date
Zebediah Figura 6e9d3d2014 kernel32: Implement deleting mapped sections.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-15 22:55:44 +02:00
Zebediah Figura d2b83336c7 kernel32: Implement registry mapping in WritePrivateProfileSection().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-15 22:55:44 +02:00
Zebediah Figura 3c1ebfdf82 kernel32: Implement registry mapping in GetPrivateProfileSectionNames().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-15 22:55:44 +02:00
Zebediah Figura 9ed6d24ed8 kernel32: Implement retrieving mapped sections.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-15 22:55:44 +02:00
Zebediah Figura 73fc0a18a6 kernel32: Implement registry mapping in WritePrivateProfileStringW().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-15 22:55:44 +02:00
Zebediah Figura 7c4f2d5342 kernel32: Implement registry mapping in GetPrivateProfileStringW().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=4096
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-15 22:55:44 +02:00
Zebediah Figura 50553b5db1 kernel32: Open the INI file in PROFILE_DeleteSection().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-29 09:24:40 +02:00
Zebediah Figura 17a3c0964d kernel32: Call PROFILE_DeleteSection directly from WritePrivateProfile* functions.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-29 09:24:35 +02:00
Zebediah Figura 9fa54bf690 kernel32: Open the INI file in PROFILE_GetSection.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-22 19:22:51 +02:00
Zebediah Figura 60f344852d kernel32: Get rid of the last parameter to PROFILE_CopyEntry().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-22 19:22:43 +02:00
Zebediah Figura e4b2482e53 kernel32: Simplify GetPrivateProfileStringW().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-22 19:22:36 +02:00
Alexandre Julliard 2ec3396122 kernel32: Avoid using wctype functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-01 10:30:17 +02:00
Alexandre Julliard e71ffcde30 kernel32: Avoid using memchrW().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-01 10:30:13 +02:00
Alexandre Julliard ce30db504b kernel32: Avoid using memrchrW().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-01 10:28:57 +02:00
Alexandre Julliard 30ad67dc14 kernel32: Reimplement Get/WritePrivateProfileStructW functions using exported APIs.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-01 10:27:53 +02:00
Huw Davies a94a21026d kernel32: Simplify is_not_current().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-15 19:23:44 +02:00
Claudio Fontana be678a52e1 kernel32: Allow empty profile section and key name strings.
Consider "" a normal section, and fix calculation for zero
length section name string and key name string.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=8036
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=18099
Signed-off-by: Claudio Fontana <claudio.fontana@gmail.com>
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-28 19:12:28 +01:00
Michael Stefaniuc fe70e0e58f kernel32: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 10:15:59 +02:00
Zhiyi Zhang aa16304c19 kernel32: Fix handling lines with only values in GetPrivateProfileSection.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-06 09:15:29 -06:00
Paul Graham 39899fd11a kernel32: Fix failure reporting in WritePrivateProfile* and add tests.
Conformance tests based on work by Fabian Maurer, with some adaptations.

Signed-off-by: Paul Graham <development@omega-software.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-01 22:24:58 +01:00
Michael Müller 132b5f86ce kernel32: Make WritePrivateProfileStringA hotpatchable.
Signed-off-by: Michael Müller <michael@fds-team.de>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
2015-10-05 22:27:13 +09:00
Frédéric Delanoy 6e472d8bc3 kernel32: Use BOOL type where appropriate. 2013-11-25 15:15:53 +01:00
Andrew Talbot 1973a808c2 kernel32: Remove unused variables. 2012-11-22 11:55:25 +01:00
Bruno Jesus 40f0145d00 kernel32: Avoid ini cache if file does not exist anymore. 2012-03-28 11:38:35 +02:00
Marcus Meissner db7ba0b230 kernel32: Avoid shadowing parameter "len". 2011-10-24 12:35:51 +02:00
Francois Gouget f3aabde8cb kernel32: Only get the Windows directory if PROFILE_Open() needs it. 2011-03-30 18:23:38 +02:00
Marcus Meissner a55399f5b6 kernel32: Check if buffer is NULL before derefencing it (Coverity). 2010-01-04 11:49:45 +01:00
Rob Shearman 47acaeaea8 kernel32: Fix uninitialised memory read in GetPrivateProfileStringA if GetPrivateProfileStringW returns 0.
The buffer that was passed into the function will remain
uninitialised. Fix reading from this by only reading retW characters
from bufferW and manually nul-terminating the string.
2009-11-29 16:42:10 +01:00
Alexandre Julliard 86c6021c71 kernel32: Reimplement GetPrivateProfileString16 on top of 32-bit functions and move it to file16.c. 2009-10-08 19:12:37 +02:00
Alexandre Julliard 362ecd06f6 kernel32: Fix handling of overflows in GetPrivateProfileSectionA. 2009-10-08 16:28:17 +02:00
Paul Vriens 9a10234ef2 kernel32: Fix creation of empty sections in ini files. 2009-04-02 16:28:30 +02:00
Alexandre Julliard 79cd9183e8 kernel32: Revert incorrect part of commit 7c3529f1cc. 2009-03-25 14:19:02 +01:00
James Hawkins 87847b47cd kernel32: Don't try to load an empty initialization file. 2009-03-24 11:37:01 +01:00
James Hawkins 7c3529f1cc kernel32: Handle writing empty sections and keys in WritePrivateProfileString. 2009-03-24 11:36:52 +01:00
James Hawkins f1308f9b40 kernel32: Set last error to ERROR_FILE_NOT_FOUND if lpAppName is NULL. 2009-03-24 11:36:03 +01:00
Michael Stefaniuc 9b2730eb88 kernel32: Remove superfluous pointer casts. 2009-03-11 13:03:31 +01:00
Michael Karcher abf9cd0993 kernel32: Free profile before reloading. 2009-02-18 14:58:27 +01:00
Austin English eb877e4421 kernel32: Add a stub for OpenProfileUserMapping. 2009-01-28 12:11:22 +01:00
Maarten Lankhorst 5f4275970e kernel32: Fix 64-bits error in profile. 2008-11-26 13:38:27 +01:00
Andrew Talbot 5ae5a68ed3 kernel32: Sign-compare warnings fix. 2008-10-15 14:01:53 +02:00
Erik Inge Bolsø e8754b8ea6 kernel32: Fix PROFILE_Load to handle mac line endings. 2008-09-23 13:07:40 +02:00
Michael Karcher fe09bc1a39 kernel32: Clean up PROFILE_isspaceW. 2008-09-15 11:43:13 +02:00
Michael Karcher 34aa6b7002 kernel32: Fix profile cache logic and don't cache new files. 2008-08-20 14:56:15 +02:00
Michael Karcher 33ca67dcab kernel32: Fix profile sharing mode.
Based on a patch from Austin English.
2008-08-18 17:15:56 +02:00
James Hawkins 978a931781 kernel32: Don't get the profile string if the buffer length is zero. 2008-07-18 11:31:59 +02:00
James Hawkins 3fb196fb57 kernel32: Return the default value if lpKeyName is empty. 2008-07-17 11:38:19 +02:00
James Hawkins 7e9df53f38 kernel32: Fix removing trailing spaces from lpDefault for GetPrivateProfileString. 2008-07-17 11:37:55 +02:00
Alexandre Julliard 284335229a kernel32: Don't require write access on profile file when only reading. 2008-05-22 12:15:37 +02:00
Alexandre Julliard 8b97263dae kernel32: Fix the profile file sharing modes.
Based on a patch by Louis Lenders.
2008-05-21 14:23:29 +02:00
Andrew Talbot 344e8acb8e kernel32: Fix a memory leak. 2007-09-27 19:25:06 +02:00