Commit Graph

62 Commits

Author SHA1 Message Date
Alexandre Julliard 0c631ebb23 kernel32: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-28 19:38:42 +02:00
Alexandre Julliard a9a08dbc3d libwine: Remove wine/library.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-08 16:26:17 +02:00
Sven Baars 47fe531729 kernel32: Free the right variable (Coverity).
Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-24 22:14:44 +02:00
Sven Baars 8ea62f2ed1 kernel32: Fix some string leaks (Coverity).
Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-24 22:14:44 +02:00
Carlos Rivera 70fdc36d29 kernel32: Remove obsolete comment.
Signed-off-by: Carlos Rivera <carlos@superkaos.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-24 11:16:13 +02:00
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