Commit Graph

2428 Commits

Author SHA1 Message Date
Bernhard Kölbl fdc2d415b0 oleaut32: Register a typelib's name if a documentation is not available.
Windows writes a typelib's name into the registry when the typelib
doesn't provide a documentation.

Signed-off-by: Bernhard Kölbl <besentv@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-21 22:02:57 +02:00
Bernhard Kölbl c159f5438a oleaut32: Allow the registration of 64bit typelibs from a 32bit context.
Windows allows the registration of 64bit typelibs from 32bit programs
even on a pure Win32 install.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51864
Signed-off-by: Bernhard Kölbl <besentv@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-21 22:01:46 +02:00
Robert Wilhelm b440573d2a oleaut32: Rescale result after overflow in VarDecAdd.
Signed-off-by: Robert Wilhelm <robert.wilhelm@gmx.net>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-18 17:06:45 +02:00
Alexandre Julliard 088a787a2c makefiles: Make -mno-cygwin the default.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-20 22:45:48 +02:00
Nikolay Sivov 82f71d8bbe oleaut32: Remove some local variables in Invoke() that don't improve readability.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-17 20:40:06 +02:00
Nikolay Sivov 93a4fd5887 oleaut32: Remove unnecessary initialization of retval arg slot in Invoke().
Whole argument buffer is already zero-initialized.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-17 20:33:36 +02:00
Nikolay Sivov 3b2db03d2d oleaut32: Use single local variable to access missing args array in Invoke().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-17 20:33:31 +02:00
Nikolay Sivov 5b04eacfa9 oleaut32/tests: Link to SafeArrayGetVartype() directly.
It was already available on XP.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-17 20:33:27 +02:00
Nikolay Sivov 3c7b0e8d85 oleaut32/tests: Remove unused variable.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-17 20:33:21 +02:00
Nikolay Sivov 2651677d49 oleaut32: Do not use static variable for disp params.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 21:24:37 +02:00
Nikolay Sivov e4451427d8 oleaut32: Fix uninitialized variable access in VarXor() for earlier failure paths (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 21:24:29 +02:00
Nikolay Sivov b560dbaebc oleaut32: Fully initialize VARIANT structure in VariantInit().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-24 17:41:49 +02:00
Nikolay Sivov 8ca5afa430 oleaut32/typelib: Remove explicit check already handled by the loop condition.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-20 17:34:56 +02:00
Nikolay Sivov f7d26b4244 oleaut32/tests: Add interface checks for font object.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-20 17:34:56 +02:00
Francois Gouget d07d4ef799 oleaut32: Allow longer regional settings values.
Only the first character matters but the extra ones should not prevent
it from being used.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-10 17:53:55 +02:00
Francois Gouget 2e302e8d8c oleaut32: Fix handling of hexadecimal/octal numbers in VarParseNumFromStr().
They are incompatible with decimal numbers and currencies.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-10 17:53:55 +02:00
Francois Gouget caf5ab5d65 oleaut32: Fix VarParseNumFromStr()'s handling of currency decimals.
They have no default, flag the value as a monetary amount, are
unaffected by the presence / absence of a currency symbol, and are
incompatible with hexadecimal / octal numbers.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-09 23:08:05 +02:00
Francois Gouget fc5e603cd3 oleaut32: Add support for longer currency symbols.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-09 23:08:02 +02:00
Francois Gouget 9e4524ffb0 oleaut32: Fix VarParseNumFromStr()'s handling of currency thousands separators.
They are have no default, are not allowed before the first digit, are
unaffected by the presence / absence of a currency symbol, can be mixed
with regular digit separators, are incompatible with hexadecimal and
octal numbers (as are regular digit separators), and mask trailing
spaces.
Also they don't match regular spaces when set to a non-breaking space.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-06 19:56:32 +02:00
Francois Gouget bf2e66cc3f oleaut32: The decimal point takes priority over the thousands separator.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-06 19:56:27 +02:00
Francois Gouget d8656b4767 oleaut32: Remove caching from VARIANT_GetLocalisedNumberChars().
GetLocaleInfoW() already caches the registry information and is fast
enough. This also avoids using out-of-date information after a
SetLocaleInfoW() call.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-05 20:43:28 +02:00
Francois Gouget a74e2871ab oleaut32/tests: Add more VarParseNumFromStr() hexadecimal/octal tests.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-27 10:58:24 +02:00
Francois Gouget fd0a55ce46 oleaut32/tests: Test VarParseNumFromStr()'s handling of LOCALE_SMON*.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-27 10:58:22 +02:00
Francois Gouget 6e8586ca1b oleaut32/tests: Use NUMPRS_HEX_OCT instead of hardcoding its value.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-26 19:42:25 +02:00
Francois Gouget b0a7a6527c oleaut32/tests: Show the input string when VarFormatCurrency() fails.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-23 16:43:50 +02:00
Francois Gouget c2aeb915f4 oleaut32: Fix VarParseNumFromStr()'s support for trailing thousands separator spaces.
If a trailing character is a thousands separator, VarParseNumFromStr()
only processes it if NUMPRS_THOUSANDS was specified; even if that
character is also a space and NUMPRS_TRAILING_WHITE was specified.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-22 13:15:12 +02:00
Francois Gouget de70f7289e oleaut32: VarParseNumFromStr() does not allow leading thousands separators.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-22 13:15:01 +02:00
Francois Gouget c50dff867d oleaut32: Setting sThousand to a non-breaking space also matches regular spaces.
As the test_VarParseNumFromStrMisc() tests show the converse is not
true.
Note also that the " 1 000" test was failing as expected because in
the French locale Wine was not recognizing regular spaces as thousands
separators. Now it does and Wine incorrectly allows them before the
first digit, just like it does for the English tests.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51450
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-22 13:14:59 +02:00
Francois Gouget 5c86b4d201 oleaut32/tests: Fix the Swiss franc and Moroccan dirham tests.
Windows <= 8.1 uses an obsolete currency symbol for the Swiss Franc and
Windows 8.1 incorrectly doubled the right-to-left mark in the Moroccan
dirham.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-21 17:44:34 +02:00
Francois Gouget bf9077cf97 oleaut32/tests: Remove unneeded casts in vartest.
The error codes are already defined with an HRESULT cast so there is
no need to cast them again.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-21 17:44:34 +02:00
Francois Gouget e02a7e579c oleaut32: VarParseNumFromStr() accepts trailing currency symbols.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51450
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-20 18:47:27 +02:00
Francois Gouget 4e34e7513d oleaut32: Fix VarParseNumFromStr()'s support for two-character currencies.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51452
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-20 18:47:22 +02:00
Francois Gouget 75cbc88ebc oleaut32/tests: Report the error when VarParseNumFromStr() fails.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-20 18:47:15 +02:00
Francois Gouget 7dc02dcd07 oleaut32: Update the SystemTimeToVariantTime() Y2K cutoff.
Old Windows versions used 29 as the Y2K cutoff, that is is they mapped
two digit years 00-29 to 2000-2029 and years 30-99 to 1930-1999.
But starting with Windows 10 1903 the cutoff is now 49 by default.
So update Wine to match the current Windows versions and adjust the
tests to work for both.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51453
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-20 13:19:49 +02:00
Francois Gouget c83b7a0f39 oleaut32: Update the VarDateFromStr() Y2K cutoff.
Old Windows versions used 29 as the Y2K cutoff, that is they mapped
two digit years 00-29 to 2000-2029 and years 30-99 to 1930-1999.
But starting with Windows 10 1903 the cutoff is now 49 by default.
So update Wine to match the current Windows versions and adjust the
tests to work for both.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51453
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-20 13:19:47 +02:00
Francois Gouget 5931cf0a30 oleaut32/tests: Use EQ_DOUBLE() in vartype too.
This simplifies the code and fixes support for negative values.
Also trim unnecessary spaces from the EXPECT_DBL() failure messages.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-20 13:19:44 +02:00
Francois Gouget 1e627d1187 oleaut32: Fix the Var*FromStr() prototypes.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:27:56 +02:00
Francois Gouget 54ee0e9bfd oleaut32/tests: Add more VarParseNumFromStr() tests.
Check how it handles currency signs and spaces before and after the
digits.
Check the combination of thousands separators, spaces and commas. Check
handling of regular vs. non-breaking spaces since the latter are often
used in some locales.
And check what happens in the French locale where spaces and thousands
separators are identical and the currency sign comes after the digits
and, quite often, a space.
Check handling of multi-character currency symbols.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:26:53 +02:00
Francois Gouget 627988565b oleaut32/tests: Allow testing VarParseNumFromStr() using Unicode strings.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-19 12:26:47 +02:00
Francois Gouget 6763ed84cf oleaut32: Fix a trace containing a null character.
printf("%c Hello\n", 0) works but not TRACE("%c Hello\n", 0) because the
string is formatted before printing.
Work around the issue with wine_dbgstr_w().

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-07 21:07:45 +02:00
Dmitry Timoshkov d3d6f94ab1 oleaut32: ICreateTypeInfo2::AddVarDesc() should handle failure of allocation and initialization of a variant description.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-01 22:34:31 +02:00
Alexandre Julliard bd6b53740c winecrt0: Add a default implementation for DllCanUnloadNow().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-30 22:59:50 +02:00
Nikolay Sivov 02d29c6a9d oleaut32: Fix Var*FromDec() prototypes.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-02 17:55:34 +01:00
Nikolay Sivov 25ec9d4c34 oleaut32: Fix VariantChangeType()/VariantChangeTypeEx() prototypes.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 10:13:04 +01:00
Nikolay Sivov a55f4f9fc4 oleaut32: Fix VariantCopy()/VariantCopyInd() prototypes.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 10:13:02 +01:00
Jacek Caban 22a1485c08 oleaut32: Use C locale in VARIANT_BstrFromReal.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50672
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-16 23:01:38 +01:00
Nikolay Sivov e3ef9b5426 oleaut32: Added ICreateTypeInfo2::DeleteFuncDesc().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-05 15:38:22 +01:00
Nikolay Sivov e26d6da8a9 oleaut32: Handle preformatted strings in VarFormatCurrency().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46709
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-05 15:38:22 +01:00
Nikolay Sivov 74f63545dc oleaut32/tests: Use wide strings in VarFormat* tests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-05 15:38:22 +01:00
Nikolay Sivov f1abfc6933 oleaut32/tests: Remove workarounds in VarFormat* tests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-05 15:38:21 +01:00