Commit graph

2491 commits

Author SHA1 Message Date
Jacek Caban e68d6c1674 include: Don't force named VARIANT members when __STDC__ is defined. 2023-07-06 20:54:30 +02:00
Jacek Caban 28f3128d24 oleaut32: Use macros to access variant members. 2023-07-06 20:54:30 +02:00
Jacek Caban b6c5bae7cc oleaut32: Don't use __tagBRECORD type. 2023-07-06 20:54:30 +02:00
Jacek Caban b87e96200c oleaut32/tests: Don't use __tagBRECORD type. 2023-07-06 20:54:30 +02:00
Alexandre Julliard 9b67373cbc oleaut32: Fix a typo introduced by last change.
Introduced in 36963b6d27.
2023-07-05 17:03:30 +02:00
Alistair Leslie-Hughes 84b101c580 oleaut32: Remove DECLSPEC_HIDDEN usage. 2023-07-05 11:19:15 +02:00
Alexandre Julliard 34ab144f04 oleaut32/tests: Use nameless unions/structs. 2023-07-04 13:07:18 +02:00
Alexandre Julliard 374d74e843 oleaut32: Use nameless unions/structs. 2023-07-04 13:07:18 +02:00
Alexandre Julliard 36963b6d27 oleaut32: Get rid of the DECIMAL access macros. 2023-07-04 13:07:18 +02:00
Alistair Leslie-Hughes d8cd320db6 oleaut32: Changed default return value to match prefix default. 2023-06-30 17:39:49 +02:00
Alistair Leslie-Hughes a6415ba85e oleaut32: Fix OaBuildVersion return for available windows versions.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54257
2023-06-30 17:39:34 +02:00
Nikolay Sivov 05aa740787 oleaut32: Trace typelib guid in GetRecordInfoFromGuids(). 2023-06-20 20:27:38 +02:00
Nikolay Sivov fb083f4f37 oleaut32/recinfo: Use CoTaskMem* allocations for the record data. 2023-06-20 20:27:37 +02:00
Nikolay Sivov d9d665705e oleaut32/recinfo: Use CRT allocation functions. 2023-06-20 20:27:36 +02:00
Rémi Bernon 76e7f030fe oleaut32: Allocate a full pointer when unmarshalling byref arrays.
Instead of the 4 bytes array wire size returned by get_type_size,
which will truncate the pointer on 64-bit.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54562
2023-02-27 10:59:19 +01:00
Rémi Bernon 3e82dc30e2 oleaut32/tests: Test VARIANT_UserUnmarshal allocation sizes. 2023-02-27 10:59:19 +01:00
Jason Millard 72b86f967e oleaut32: Fix VarAbs function for BSTR with positive values. 2023-02-15 10:19:59 +01:00
Jacek Caban 23f0df4201 oleaut32: Remove overflow check for VT_R4 and VT_R8 in VarAbs. 2023-02-15 10:19:57 +01:00
Zebediah Figura bf859fb09b oleaut32: Manually construct a stub buffer for dispinterfaces.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53926
2023-02-08 09:00:15 +01:00
Alexandre Julliard 680d17b453 oleaut32: Fix A<->W conversion when storing names in typelibs.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52873
2022-12-13 13:20:19 +01:00
Alexandre Julliard 7ae24a04b5 oleaut32: Fix printf format warnings on ARM platforms. 2022-12-08 18:11:23 +01:00
Alexandre Julliard 3de15569fe include: Use proper dllimports for OLE functions. 2022-12-07 13:51:37 +01:00
Nikolay Sivov 7f01fdb6d4 oleaut32/safearray: Fix an error code when trying to redim fixed arrays.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-11-23 17:59:47 +01:00
Alex Henrie 88e3c7323a oleaut32: Use standard C functions for memory allocation in olefont.c. 2022-11-18 14:04:28 +01:00
Nikolay Sivov 41f456f3a4 oleaut32/tests: Add a test for VT_NULL input for VarFormatDateTime().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-11-17 09:57:45 +01:00
Eric Pouech fe5989bbd2 oleaut32/tests: Fix test failing on UTF-8 locale.
Method decriptor's strings are internally stored in ANSI, and
potentially converted from Unicode using current code page.

Test was expecting loss in Unicode to ANSI conversion.
Adapt test to also support loss-less conversion (that's the case
when code page is UTF-8).

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52873
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2022-10-20 18:29:03 +02:00
Alexandre Julliard dbaa642717 Revert "oleaut32/tests: Get_test_recordinfo shouldn't point into a specific VARIANT.".
This reverts commit 27f417eb93.
It breaks the tests.
2022-09-27 09:16:16 +02:00
Alexandre Julliard 02ce1008b7 Revert "oleaut32: Dereference VT_RECORD|VT_BYREF in place.".
This reverts commit 28e0d8ff3b.
It breaks the tests.
2022-09-27 09:16:05 +02:00
Kevin Puetz 28e0d8ff3b oleaut32: Dereference VT_RECORD|VT_BYREF in place.
VariantCopyInd allows pvargDest == pvargSrc in order to dereference in place
To avoid confusing the source values and a partially-written destination,
wine's implementation makes a shallow copy and uses that as pSrc.

However, the call to VARIANT_CopyIRecordInfo did not use this,
leading to it copying from the zeroed-out memory it just allocated.
2022-09-26 11:36:50 +02:00
Kevin Puetz 27f417eb93 oleaut32/tests: Get_test_recordinfo shouldn't point into a specific VARIANT.
In many cases (in particular when VariantCopy has been used),
multiple VARIANT structs which contain the same type of record
will share the same instance of IRecordInfo, just adding refcounts.

RecordClear should not be aware of where the data it's clearing came from,
and certainly should not be modifying someone else's VARIANT::brecVal.
This seems to have been intended as a way to make tests more sensitive to
use-after-free, by overwriting the source pointer with NULL after
clearing the pointed-to record.

To preserve that sensitivity (if it was indeed the goal), replace the
hardcoded "0xdeadbeef is valid" check with a "validsrc" address that
get_test_recordinfo initially agrees to pretend points to a valid record,
but will stop accepting after a call to RecordClear.
2022-09-26 11:36:50 +02:00
Alexandre Julliard 43e5f9e4bf oleaut32: Check that the 32/64 syskind matches when getting a typelib from the cache.
Fixes test failures on 64-bit.
2022-09-12 12:46:30 +02:00
Alexandre Julliard 524cc6339c oleaut32: Avoid spurious debug traces when FIXMEs are disabled. 2022-09-12 12:46:25 +02:00
David Kahurani 9af3a79b96 oleaut32: Handle DATE in string form in VarFormat.
Testing has proven that coercion functions should reject the value which
indicates that this is handled as a special case in VarFormat

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=13778
Signed-off-by: David Kahurani <k.kahurani@gmail.com>
2022-07-06 20:32:39 +02:00
Rémi Bernon 197c24092a oleaut32/tests: Workaround use after free warnings.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-15 11:53:29 +02:00
Alexandre Julliard c8fd783179 oleaut32: Use the locale leading zero flag instead of hardcoding it.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-03 10:33:21 +02:00
Drew Ronneberg 75f6f22d5b oleaut32: Remove obsolete -D_OLEAUT32_ from Makefile.in.
Signed-off-by: Drew Ronneberg <drew_ronneberg@yahoo.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-02 11:35:53 +02:00
Francois Gouget 7d2eecd341 oleaut32/tests: The EUR abbreviation is not recognized as a currency.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-27 17:23:53 +02:00
Francois Gouget cf33a13d35 oleau32/tests: Show that spaces are not allowed before exponents.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-27 17:23:48 +02:00
Eric Pouech 4782bc3c1a oleaut32/tests: Simplify printf for 64 bit integers.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-12 21:39:42 +02:00
Eric Pouech f438e285d3 oleaut32/tests: Simplify test by using long long constants.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-12 21:39:42 +02:00
Alexandre Julliard 917d430698 oleaut32: Silence error message for unknown languages.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-01 20:30:57 +02:00
Alexandre Julliard 62cd33e6b0 kernelbase: Reimplement LOCALE_*CURRNAME/CURRENCY in GetLocaleInfoW/Ex using the locale.nls data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-29 08:36:41 +02:00
Eric Pouech 497cb25e5b oleaut32/tests: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-15 12:48:11 +01:00
Eric Pouech 91475415b7 oleaut32/tests: Use correct integral type.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-15 12:48:10 +01:00
Eric Pouech 3f7ef33e5b oleaut32/tests: Ensure (re)definition of EXPECTRES for all integer types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-14 18:30:28 +01:00
Eric Pouech 734a8ea204 oleaut32/tests: Convert UI8Copy to existing integer test scheme.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-14 18:30:27 +01:00
Eric Pouech df0eaf5882 oleaut32/tests: Convert UI8 to existing integer test scheme.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-14 18:30:27 +01:00
Eric Pouech c53980950b oleau32/tests: Convert I8Copy to existing integer test scheme.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-11 19:23:28 +01:00
Eric Pouech b2135d514e oleaut32/tests: Convert I8 to current integer test scheme.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-11 19:23:28 +01:00
Eric Pouech baf2b29d23 oleaut32/tests: Get rid of EXPECTI864 macro.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-11 19:23:28 +01:00