Commit 49e119f9 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

Move the test strings into their own array and convert them to unicode

using a for loop. This lets us later print the offending string when a test fails. Fix the MSVC compilation error (XXXe183) and warnings (put suffixes as in 0L & 1.0F, signed/unsigned warnings, s/-2147483648/0x80000000L/). Uncomment the DateFromStr tests and fill in the todo fields where appropriate. Define an NB_OLE_STRINGS macro and use it to make sure all the arrays have the right number of fields. In the *FromStr loops, fill the return field with a dummy value (42) before calling the conversion function. This way a test no longer depends on whether the previous test failed or not! If a test is expected to fail, then retval is meaningless -> omit it from the result arrays. If a test actually fails or was expected to fail, then there is no point in checking retval. Improve error reporting. Pass the printf-style format directly to ok, remove the unnecessary sprintfs.
parent 800cb96b
......@@ -33,11 +33,12 @@
*
* NOTES
* - The Variant structure in Windows has a non-named union. This means
* the member of the union are accessible simply by doing pVariant->pfltVal.
* With gcc it is not possible to have non-named union so it has been named
* 'u'. So it's members are accessible using this name like so
* pVariant->u.pfltVal. So if this program is compiled in Windows
* the references to 'u' will need to be take out of this file.
* the member of the union are accessible simply by doing
* pVariant->pfltVal. With gcc it is not possible to have non-named
* union so it has been named 'u'. So it's members are accessible
* using this name like so pVariant->u.pfltVal. So if this program is
* compiled in Windows the references to 'u' will need to be take out
* of this file.
*
* - Also the printf is a little different so the format specifiers may
* need to be tweaked if this file is compile in Windows.
......@@ -48,8 +49,9 @@
*
* - The VarDateFromStr is not implemented yet.
*
* - The date and floating point format may not be the exact same format has the one in
* windows depending on what the Internatinal setting are in windows.
* - The date and floating point format may not be the exact same
* format has the one inwindows depending on what the Internatinal
* setting are in windows.
*
*/
......@@ -345,1258 +347,1317 @@ static const char *strfromr8[] = {
"-1.987654e+09",
};
/* These are the strings we use for the XxxFromStr tests.
* The arrays that follow define the expected results for each type.
*/
static char* _pTestStrA[] = {
"-2",
"-1",
"-0.51",
"-0.5",
"-0.49",
"-0.0",
"0.0",
"0.49",
"0.5",
"0.51",
"1",
"127",
"128",
"129",
"255",
"256",
"257",
"32767",
"32768",
"-32768",
"-32769",
"16777216",
"16777217",
"-16777216",
"16777217",
"2147483647",
"2147483648",
"-2147483647",
"-2147483648",
"",
" ",
"1F",
"1G",
" 1 ",
" 1 2 ",
"1,2,3",
"1 2 3",
"1,2, 3",
"1;2;3",
"1.2.3",
"0.",
".0",
"0.1E12",
"2.4,E1",
" +3.2,E1",
"4E2.5",
" 2E+2",
"1 E+2",
".",
".E2",
"1000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
"00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
"100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001",
"65535",
"65535.5",
"65536",
"4294967295",
"4294967296",
"1 January 99",
"December 31, 2078",
"January 1, 1900",
"January 2 1900",
"11.11.1999",
"11/11/1999",
" 11 / 11 / 1999",
"11/11/1999:11:11:1134",
"11/11/1999 11:11:11:1",
"\t1999/\t11/21 11 :11:11am",
"11/11/1999 11:11:11Am",
"11/11/1999 11:11:11PM",
"11/11/199911:11:11PM",
"11/11/1999 0:0:11am",
"11/11/1999 11,11:11am",
"11/11/1999 11:11:11am",
"11/11/1999 11/11:11am",
"11/11/1999 11:11AM",
"11/11/1999 1AM",
"11/11/1999 0AM",
"11/11/1999 11:11:11",
"11/13/1999 0AM",
"13/13/1999 0AM",
"13/11/1999 0AM",
"11/33/1999 0AM",
"11/11/1999 AM",
"1/1/0 0AM",
"1/1/-1 0AM",
"1999 January 3 9AM",
"1 January 1999 11AM",
"4AM 11/11/1999",
"4:22 11/11/1999 AM",
" 1 1 /11/1999",
"11-11/1999 11:11:11.12AM",
"1999 January 3, 9AM",
"December, 31, 2078",
"December, 31, 2078,",
"December, 31 2078",
"11/99",
"11-1999",
"true",
"True",
"TRue",
"TRUE",
" TRUE",
"FALSE ",
"False",
"JustSomeText",
"Just Some Text",
"1.5",
"2.5",
"3.5",
"4.5",
};
#define NB_OLE_STRINGS (sizeof(_pTestStrA)/sizeof(*_pTestStrA))
static const struct _strret_date {
HRESULT error;
DATE retval;
DWORD error;
BOOL todo;
} strrets_DATE[] = {
{ -2.000000, 0x80020005 },
{ -2.000000, 0x80020005 },
{ -2.000000, 0x80020005 },
{ -2.000000, 0x80020005 },
{ -2.000000, 0x80020005 },
{ -2.000000, 0x80020005 },
{ 0.000000, 0 },
{ 0.034028, 0 },
{ 0.003472, 0 },
{ 0.035417, 0 },
{ 0.035417, 0x80020005 },
{ 0.035417, 0x80020005 },
{ 0.035417, 0x80020005 },
{ 0.035417, 0x80020005 },
{ 0.035417, 0x80020005 },
{ 0.035417, 0x80020005 },
{ 0.035417, 0x80020005 },
{ 0.035417, 0x80020005 },
{ 0.035417, 0x80020005 },
{ 0.035417, 0x80020005 },
{ 0.035417, 0x80020005 },
{ 0.035417, 0x80020005 },
{ 0.035417, 0x80020005 },
{ 0.035417, 0x80020005 },
{ 0.035417, 0x80020005 },
{ 0.035417, 0x80020005 },
{ 0.035417, 0x80020005 },
{ 0.035417, 0x80020005 },
{ 0.035417, 0x80020005 },
{ 0.035417, 0x80020005 },
{ 0.035417, 0x80020005 },
{ 0.035417, 0x80020005 },
{ 0.035417, 0x80020005 },
{ 0.035417, 0x80020005 },
{ 35797.000000, 0 },
{ 37623.000000, 0 },
{ 37623.000000, 0 },
{ 37623.000000, 0 },
{ 37623.000000, 0x80020005 },
{ 0.043090, 0 },
{ 0.043090, 0x80020005 },
{ 0.043090, 0x80020005 },
{ 0.043090, 0x80020005 },
{ 0.043090, 0x80020005 },
{ 0.043090, 0x80020005 },
{ 0.043090, 0x80020005 },
{ 0.043090, 0x80020005 },
{ 0.043090, 0x80020005 },
{ 0.043090, 0x80020005 },
{ 0.043090, 0x80020005 },
{ 0.043090, 0x80020005 },
{ 0.043090, 0x80020005 },
{ 0.043090, 0x80020005 },
{ 0.043090, 0x80020005 },
{ 0.043090, 0x80020005 },
{ 0.043090, 0x80020005 },
{ 0.043090, 0x80020005 },
{ 0.043090, 0x80020005 },
{ 0.043090, 0x80020005 },
{ 0.043090, 0x80020005 },
{ 36161.000000, 0 },
{ 65380.000000, 0 },
{ 2.000000, 0 },
{ 3.000000, 0 },
{ 3.000000, 0x80020005 },
{ 36475.000000, 0 },
{ 36475.000000, 0 },
{ 36475.000000, 0x80020005 },
{ 36475.000000, 0x80020005 },
{ 36485.466100, 0 },
{ 36475.466100, 0 },
{ 36475.966100, 0 },
{ 36475.966100, 0x80020005 },
{ 36475.000127, 0 },
{ 36475.000127, 0x80020005 },
{ 36475.466100, 0 },
{ 36475.466100, 0x80020005 },
{ 36475.465972, 0 },
{ 36475.041667, 0 },
{ 36475.000000, 0 },
{ 36475.466100, 0 },
{ 36477.000000, 0 },
{ 36477.000000, 0x80020005 },
{ 36477.000000, 0 },
{ 36477.000000, 0x80020005 },
{ 36477.000000, 0x80020005 },
{ 36526.000000, 0 },
{ 36526.000000, 0x80020005 },
{ 36163.375000, 0 },
{ 36161.458333, 0 },
{ 36475.166667, 0 },
{ 36475.166667, 0x80020005 },
{ 36475.166667, 0x80020005 },
{ 36475.166667, 0x80020005 },
{ 36475.166667, 0x80020005 },
{ 65380.000000, 0 },
{ 65380.000000, 0x80020005 },
{ 65380.000000, 0 },
{ 36465.000000, 0 },
{ 36465.000000, 0 },
{ 36465.000000, 0x80020005 },
{ 36465.000000, 0x80020005 },
{ 36465.000000, 0x80020005 },
{ 36465.000000, 0x80020005 },
{ 36465.000000, 0x80020005 },
{ 36465.000000, 0x80020005 },
{ 36465.000000, 0x80020005 },
{ 36465.000000, 0x80020005 },
{ 36465.000000, 0x80020005 },
{ 36465.000000, 0x80020005 },
{ 0.045139, 0 },
{ 0.086806, 0 },
{ 0.128472, 0 },
{ 0.170139, 0 },
{ 0.170139, 0x80020005 },
{ 0.170139, 0x80020005 },
{ 0.170139, 0x80020005 },
{ 0.170139, 0x80020005 },
{ 0.170139, 0x80020005 },
{ 0.170139, 0x80020005 },
BOOL todo_rc;
BOOL todo_val;
} strrets_DATE[NB_OLE_STRINGS] = {
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 0.000000, 1 },
{ 0, 0.034028, 1 },
{ 0, 0.003472, 1 },
{ 0, 0.035417, 1 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005, 0, 1 },
{ 0x80020005, 0, 1 },
{ 0x80020005 },
{ 0x80020005, 0, 1 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 35797.000000, 1 },
{ 0, 37623.000000 },
{ 0, 37623.000000 },
{ 0, 37623.000000 },
{ 0x80020005, 0, 1 },
{ 0, 0.043090, 0, 1 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005, 0, 1 },
{ 0x80020005, 0, 1 },
{ 0x80020005 },
{ 0x80020005, 0, 1 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 36161.000000, 1 },
{ 0, 65380.000000 },
{ 0, 2.000000 },
{ 0, 3.000000 },
{ 0x80020005, 0, 1 },
{ 0, 36475.000000 },
{ 0, 36475.000000 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 36485.466100, 1 },
{ 0, 36475.466100, 0, 1 },
{ 0, 36475.966100, 0, 1 },
{ 0x80020005, 0, 1 },
{ 0, 36475.000127, 0, 1 },
{ 0x80020005 },
{ 0, 36475.466100, 0, 1 },
{ 0x80020005 },
{ 0, 36475.465972, 0, 1 },
{ 0, 36475.041667, 1 },
{ 0, 36475.000000, 1 },
{ 0, 36475.466100, 0, 1 },
{ 0, 36477.000000, 1 },
{ 0x80020005 },
{ 0, 36477.000000, 1 },
{ 0x80020005 },
{ 0x80020005, 0, 1 },
{ 0, 36526.000000, 1 },
{ 0x80020005 },
{ 0, 36163.375000, 1 },
{ 0, 36161.458333, 1 },
{ 0, 36475.166667, 1 },
{ 0x80020005, 0, 1 },
{ 0x80020005 },
{ 0x80020005, 0, 1 },
{ 0x80020005 },
{ 0, 65380.000000 },
{ 0x80020005, 0, 1 },
{ 0, 65380.000000 },
{ 0, 36465.000000, 1 },
{ 0, 36465.000000, 1 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 0.045139, 1 },
{ 0, 0.086806, 1 },
{ 0, 0.128472, 1 },
{ 0, 0.170139, 1 },
};
static const struct _strret_b {
HRESULT error;
BOOL retval;
DWORD error;
} strrets_B[] = {
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_FALSE, 0 },
{ VARIANT_FALSE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_FALSE, 0 },
{ VARIANT_FALSE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_FALSE, 0 },
{ VARIANT_FALSE, 0x80020005 },
{ VARIANT_FALSE, 0x80020005 },
{ VARIANT_FALSE, 0x80020005 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
{ VARIANT_TRUE, 0x80020005 },
} strrets_B[NB_OLE_STRINGS] = {
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_FALSE },
{ 0, VARIANT_FALSE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, VARIANT_TRUE },
{ 0x80020005 },
{ 0, VARIANT_TRUE },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, VARIANT_FALSE },
{ 0, VARIANT_FALSE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0x80020005 },
{ 0, VARIANT_TRUE },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0x80020005 },
{ 0x80020005 },
{ 0, VARIANT_FALSE },
{ 0x80020005 },
{ 0x80020005 },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
{ 0, VARIANT_TRUE },
};
static const struct _strret_r8 {
HRESULT error;
DOUBLE retval;
DWORD error;
} strrets_R8[] = {
{ -2.000000, 0 },
{ -1.000000, 0 },
{ -0.510000, 0 },
{ -0.500000, 0 },
{ -0.490000, 0 },
{ 0.000000, 0 },
{ 0.000000, 0 },
{ 0.490000, 0 },
{ 0.500000, 0 },
{ 0.510000, 0 },
{ 1.000000, 0 },
{ 127.000000, 0 },
{ 128.000000, 0 },
{ 129.000000, 0 },
{ 255.000000, 0 },
{ 256.000000, 0 },
{ 257.000000, 0 },
{ 32767.000000, 0 },
{ 32768.000000, 0 },
{ -32768.000000, 0 },
{ -32769.000000, 0 },
{ 16777216.000000, 0 },
{ 16777217.000000, 0 },
{ -16777216.000000, 0 },
{ 16777217.000000, 0 },
{ 2147483647.000000, 0 },
{ 2147483648.000000, 0 },
{ -2147483647.000000, 0 },
{ -2147483648.000000, 0 },
{ -2147483648.000000, 0x80020005 },
{ -2147483648.000000, 0x80020005 },
{ -2147483648.000000, 0x80020005 },
{ -2147483648.000000, 0x80020005 },
{ 1.000000, 0 },
{ 1.000000, 0x80020005 },
{ 123.000000, 0 },
{ 123.000000, 0x80020005 },
{ 123.000000, 0x80020005 },
{ 123.000000, 0x80020005 },
{ 123.000000, 0x80020005 },
{ 0.000000, 0 },
{ 0.000000, 0 },
{ 100000000000.000000, 0 },
{ 24.000000, 0 },
{ 32.000000, 0 },
{ 32.000000, 0x80020005 },
{ 200.000000, 0 },
{ 200.000000, 0x80020005 },
{ 200.000000, 0x80020005 },
{ 200.000000, 0x80020005 },
{ 1000000000000000100000000000000000000000000000000000000000000000.000000, 0 },
{ 1.000000, 0 },
{ 1.000000, 0 },
{ 99999999999999997000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000, 0 },
{ 1.000000, 0 },
{ 65535.000000, 0 },
{ 65535.500000, 0 },
{ 65536.000000, 0 },
{ 4294967295.000000, 0 },
{ 4294967296.000000, 0 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 1.500000, 0 },
{ 2.500000, 0 },
{ 3.500000, 0 },
{ 4.500000, 0 },
{ 4.500000, 0x80020005 },
{ 4.500000, 0x80020005 },
{ 4.500000, 0x80020005 },
{ 4.500000, 0x80020005 },
{ 4.500000, 0x80020005 },
{ 4.500000, 0x80020005 },
} strrets_R8[NB_OLE_STRINGS] = {
{ 0, -2.000000 },
{ 0, -1.000000 },
{ 0, -0.510000 },
{ 0, -0.500000 },
{ 0, -0.490000 },
{ 0, 0.000000 },
{ 0, 0.000000 },
{ 0, 0.490000 },
{ 0, 0.500000 },
{ 0, 0.510000 },
{ 0, 1.000000 },
{ 0, 127.000000 },
{ 0, 128.000000 },
{ 0, 129.000000 },
{ 0, 255.000000 },
{ 0, 256.000000 },
{ 0, 257.000000 },
{ 0, 32767.000000 },
{ 0, 32768.000000 },
{ 0, -32768.000000 },
{ 0, -32769.000000 },
{ 0, 16777216.000000 },
{ 0, 16777217.000000 },
{ 0, -16777216.000000 },
{ 0, 16777217.000000 },
{ 0, 2147483647.000000 },
{ 0, 2147483648.000000 },
{ 0, -2147483647.000000 },
{ 0, -2147483648.000000 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 1.000000 },
{ 0x80020005 },
{ 0, 123.000000 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 0.000000 },
{ 0, 0.000000 },
{ 0, 100000000000.000000 },
{ 0, 24.000000 },
{ 0, 32.000000 },
{ 0x80020005 },
{ 0, 200.000000 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 1e63 },
{ 0, 1.000000 },
{ 0, 1.000000 },
{ 0, 99999999999999997e183 },
{ 0, 1.000000 },
{ 0, 65535.000000 },
{ 0, 65535.500000 },
{ 0, 65536.000000 },
{ 0, 4294967295.000000 },
{ 0, 4294967296.000000 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 1.500000 },
{ 0, 2.500000 },
{ 0, 3.500000 },
{ 0, 4.500000 },
};
static const struct _strret_r4 {
HRESULT error;
FLOAT retval;
DWORD error;
} strrets_R4[] = {
{ -2.000000, 0 },
{ -1.000000, 0 },
{ -0.510000, 0 },
{ -0.500000, 0 },
{ -0.490000, 0 },
{ 0.000000, 0 },
{ 0.000000, 0 },
{ 0.490000, 0 },
{ 0.500000, 0 },
{ 0.510000, 0 },
{ 1.000000, 0 },
{ 127.000000, 0 },
{ 128.000000, 0 },
{ 129.000000, 0 },
{ 255.000000, 0 },
{ 256.000000, 0 },
{ 257.000000, 0 },
{ 32767.000000, 0 },
{ 32768.000000, 0 },
{ -32768.000000, 0 },
{ -32769.000000, 0 },
{ 16777216.000000, 0 },
{ 16777216.000000, 0 },
{ -16777216.000000, 0 },
{ 16777216.000000, 0 },
{ 2147483648.000000, 0 },
{ 2147483648.000000, 0 },
{ -2147483648.000000, 0 },
{ -2147483648.000000, 0 },
{ -2147483648.000000, 0x80020005 },
{ -2147483648.000000, 0x80020005 },
{ -2147483648.000000, 0x80020005 },
{ -2147483648.000000, 0x80020005 },
{ 1.000000, 0 },
{ 1.000000, 0x80020005 },
{ 123.000000, 0 },
{ 123.000000, 0x80020005 },
{ 123.000000, 0x80020005 },
{ 123.000000, 0x80020005 },
{ 123.000000, 0x80020005 },
{ 0.000000, 0 },
{ 0.000000, 0 },
{ 99999997952.000000, 0 },
{ 24.000000, 0 },
{ 32.000000, 0 },
{ 32.000000, 0x80020005 },
{ 200.000000, 0 },
{ 200.000000, 0x80020005 },
{ 200.000000, 0x80020005 },
{ 200.000000, 0x80020005 },
{ 200.000000, 0x8002000A },
{ 1.000000, 0 },
{ 1.000000, 0 },
{ 1.000000, 0x8002000A },
{ 1.000000, 0 },
{ 65535.000000, 0 },
{ 65535.500000, 0 },
{ 65536.000000, 0 },
{ 4294967296.000000, 0 },
{ 4294967296.000000, 0 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 4294967296.000000, 0x80020005 },
{ 1.500000, 0 },
{ 2.500000, 0 },
{ 3.500000, 0 },
{ 4.500000, 0 },
{ 4.500000, 0x80020005 },
{ 4.500000, 0x80020005 },
{ 4.500000, 0x80020005 },
{ 4.500000, 0x80020005 },
{ 4.500000, 0x80020005 },
{ 4.500000, 0x80020005 },
} strrets_R4[NB_OLE_STRINGS] = {
{ 0, -2.000000F },
{ 0, -1.000000F },
{ 0, -0.510000F },
{ 0, -0.500000F },
{ 0, -0.490000F },
{ 0, 0.000000F },
{ 0, 0.000000F },
{ 0, 0.490000F },
{ 0, 0.500000F },
{ 0, 0.510000F },
{ 0, 1.000000F },
{ 0, 127.000000F },
{ 0, 128.000000F },
{ 0, 129.000000F },
{ 0, 255.000000F },
{ 0, 256.000000F },
{ 0, 257.000000F },
{ 0, 32767.000000F },
{ 0, 32768.000000F },
{ 0, -32768.000000F },
{ 0, -32769.000000F },
{ 0, 16777216.000000F },
{ 0, 16777216.000000F },
{ 0, -16777216.000000F },
{ 0, 16777216.000000F },
{ 0, 2147483648.000000F },
{ 0, 2147483648.000000F },
{ 0, -2147483648.000000F },
{ 0, -2147483648.000000F },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 1.000000F },
{ 0x80020005 },
{ 0, 123.000000F },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 0.000000F },
{ 0, 0.000000F },
{ 0, 99999997952.000000F },
{ 0, 24.000000F },
{ 0, 32.000000F },
{ 0x80020005 },
{ 0, 200.000000F },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x8002000A },
{ 0, 1.000000F },
{ 0, 1.000000F },
{ 0x8002000A },
{ 0, 1.000000F },
{ 0, 65535.000000F },
{ 0, 65535.500000F },
{ 0, 65536.000000F },
{ 0, 4294967296.000000F },
{ 0, 4294967296.000000F },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 1.500000F },
{ 0, 2.500000F },
{ 0, 3.500000F },
{ 0, 4.500000F },
};
static const struct _strret_i4 {
HRESULT error;
LONG retval;
DWORD error;
} strrets_I4[] = {
{ -2, 0 },
{ -1, 0 },
{ -1, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 1, 0 },
{ 1, 0 },
{ 127, 0 },
{ 128, 0 },
{ 129, 0 },
{ 255, 0 },
{ 256, 0 },
{ 257, 0 },
{ 32767, 0 },
{ 32768, 0 },
{ -32768, 0 },
{ -32769, 0 },
{ 16777216, 0 },
{ 16777217, 0 },
{ -16777216, 0 },
{ 16777217, 0 },
{ 2147483647, 0 },
{ 2147483647, 0x8002000A },
{ -2147483647, 0 },
{ -2147483648, 0 },
{ -2147483648, 0x80020005 },
{ -2147483648, 0x80020005 },
{ -2147483648, 0x80020005 },
{ -2147483648, 0x80020005 },
{ 1, 0 },
{ 1, 0x80020005 },
{ 123, 0 },
{ 123, 0x80020005 },
{ 123, 0x80020005 },
{ 123, 0x80020005 },
{ 123, 0x80020005 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0x8002000A },
{ 24, 0 },
{ 32, 0 },
{ 32, 0x80020005 },
{ 200, 0 },
{ 200, 0x80020005 },
{ 200, 0x80020005 },
{ 200, 0x80020005 },
{ 200, 0x8002000A },
{ 1, 0 },
{ 1, 0 },
{ 1, 0x8002000A },
{ 1, 0 },
{ 65535, 0 },
{ 65536, 0 },
{ 65536, 0 },
{ 65536, 0x8002000A },
{ 65536, 0x8002000A },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 65536, 0x80020005 },
{ 2, 0 },
{ 2, 0 },
{ 4, 0 },
{ 4, 0 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
} strrets_I4[NB_OLE_STRINGS] = {
{ 0, -2L },
{ 0, -1L },
{ 0, -1L },
{ 0, 0L },
{ 0, 0L },
{ 0, 0L },
{ 0, 0L },
{ 0, 0L },
{ 0, 0L },
{ 0, 1L },
{ 0, 1L },
{ 0, 127L },
{ 0, 128L },
{ 0, 129L },
{ 0, 255L },
{ 0, 256L },
{ 0, 257L },
{ 0, 32767L },
{ 0, 32768L },
{ 0, -32768L },
{ 0, -32769L },
{ 0, 16777216L },
{ 0, 16777217L },
{ 0, -16777216L },
{ 0, 16777217L },
{ 0, 2147483647L },
{ 0x8002000A },
{ 0, -2147483647L },
{ 0, 0x80000000L },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 1L },
{ 0x80020005 },
{ 0, 123L },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 0L },
{ 0, 0L },
{ 0x8002000A },
{ 0, 24L },
{ 0, 32L },
{ 0x80020005 },
{ 0, 200L },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x8002000A },
{ 0, 1L },
{ 0, 1L },
{ 0x8002000A },
{ 0, 1L },
{ 0, 65535L },
{ 0, 65536L },
{ 0, 65536L },
{ 0x8002000A },
{ 0x8002000A },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 2L },
{ 0, 2L },
{ 0, 4L },
{ 0, 4L },
};
static const struct _strret_i2 {
HRESULT error;
SHORT retval;
DWORD error;
} strrets_I2[] = {
{ -2, 0 },
{ -1, 0 },
{ -1, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 1, 0 },
{ 1, 0 },
{ 127, 0 },
{ 128, 0 },
{ 129, 0 },
{ 255, 0 },
{ 256, 0 },
{ 257, 0 },
{ 32767, 0 },
{ 32767, 0x8002000A },
{ -32768, 0 },
{ -32768, 0x8002000A },
{ -32768, 0x8002000A },
{ -32768, 0x8002000A },
{ -32768, 0x8002000A },
{ -32768, 0x8002000A },
{ -32768, 0x8002000A },
{ -32768, 0x8002000A },
{ -32768, 0x8002000A },
{ -32768, 0x8002000A },
{ -32768, 0x80020005 },
{ -32768, 0x80020005 },
{ -32768, 0x80020005 },
{ -32768, 0x80020005 },
{ 1, 0 },
{ 1, 0x80020005 },
{ 123, 0 },
{ 123, 0x80020005 },
{ 123, 0x80020005 },
{ 123, 0x80020005 },
{ 123, 0x80020005 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0x8002000A },
{ 24, 0 },
{ 32, 0 },
{ 32, 0x80020005 },
{ 200, 0 },
{ 200, 0x80020005 },
{ 200, 0x80020005 },
{ 200, 0x80020005 },
{ 200, 0x8002000A },
{ 1, 0 },
{ 1, 0 },
{ 1, 0x8002000A },
{ 1, 0 },
{ 1, 0x8002000A },
{ 1, 0x8002000A },
{ 1, 0x8002000A },
{ 1, 0x8002000A },
{ 1, 0x8002000A },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 2, 0 },
{ 2, 0 },
{ 4, 0 },
{ 4, 0 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
} strrets_I2[NB_OLE_STRINGS] = {
{ 0, -2 },
{ 0, -1 },
{ 0, -1 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 1 },
{ 0, 1 },
{ 0, 127 },
{ 0, 128 },
{ 0, 129 },
{ 0, 255 },
{ 0, 256 },
{ 0, 257 },
{ 0, 32767 },
{ 0x8002000A },
{ 0, -32768 },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 1 },
{ 0x80020005 },
{ 0, 123 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 0 },
{ 0, 0 },
{ 0x8002000A },
{ 0, 24 },
{ 0, 32 },
{ 0x80020005 },
{ 0, 200 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x8002000A },
{ 0, 1 },
{ 0, 1 },
{ 0x8002000A },
{ 0, 1 },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 2 },
{ 0, 2 },
{ 0, 4 },
{ 0, 4 },
};
static const struct _strret_i1 {
HRESULT error;
CHAR retval;
DWORD error;
} strrets_I1[] = {
{ -2, 0 },
{ -1, 0 },
{ -1, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 1, 0 },
{ 1, 0 },
{ 127, 0 },
{ 127, 0x8002000A },
{ 127, 0x8002000A },
{ 127, 0x8002000A },
{ 127, 0x8002000A },
{ 127, 0x8002000A },
{ 127, 0x8002000A },
{ 127, 0x8002000A },
{ 127, 0x8002000A },
{ 127, 0x8002000A },
{ 127, 0x8002000A },
{ 127, 0x8002000A },
{ 127, 0x8002000A },
{ 127, 0x8002000A },
{ 127, 0x8002000A },
{ 127, 0x8002000A },
{ 127, 0x8002000A },
{ 127, 0x8002000A },
{ 127, 0x80020005 },
{ 127, 0x80020005 },
{ 127, 0x80020005 },
{ 127, 0x80020005 },
{ 1, 0 },
{ 1, 0x80020005 },
{ 123, 0 },
{ 123, 0x80020005 },
{ 123, 0x80020005 },
{ 123, 0x80020005 },
{ 123, 0x80020005 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0x8002000A },
{ 24, 0 },
{ 32, 0 },
{ 32, 0x80020005 },
{ 32, 0x8002000A },
{ 32, 0x80020005 },
{ 32, 0x80020005 },
{ 32, 0x80020005 },
{ 32, 0x8002000A },
{ 1, 0 },
{ 1, 0 },
{ 1, 0x8002000A },
{ 1, 0 },
{ 1, 0x8002000A },
{ 1, 0x8002000A },
{ 1, 0x8002000A },
{ 1, 0x8002000A },
{ 1, 0x8002000A },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 2, 0 },
{ 2, 0 },
{ 4, 0 },
{ 4, 0 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
} strrets_I1[NB_OLE_STRINGS] = {
{ 0, -2 },
{ 0, -1 },
{ 0, -1 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 1 },
{ 0, 1 },
{ 0, 127 },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 1 },
{ 0x80020005 },
{ 0, 123 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 0 },
{ 0, 0 },
{ 0x8002000A },
{ 0, 24 },
{ 0, 32 },
{ 0x80020005 },
{ 0x8002000A },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x8002000A },
{ 0, 1 },
{ 0, 1 },
{ 0x8002000A },
{ 0, 1 },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 2 },
{ 0, 2 },
{ 0, 4 },
{ 0, 4 },
};
static const struct _strret_u1 {
HRESULT error;
BYTE retval;
DWORD error;
} strrets_U1[] = {
{ 0, 0x8002000A },
{ 0, 0x8002000A },
{ 0, 0x8002000A },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 1, 0 },
{ 1, 0 },
{ 0x7F, 0 },
{ 0x80, 0 },
{ 0x81, 0 },
{ 0xFF, 0 },
{ 0xFF, 0x8002000A },
{ 0xFF, 0x8002000A },
{ 0xFF, 0x8002000A },
{ 0xFF, 0x8002000A },
{ 0xFF, 0x8002000A },
{ 0xFF, 0x8002000A },
{ 0xFF, 0x8002000A },
{ 0xFF, 0x8002000A },
{ 0xFF, 0x8002000A },
{ 0xFF, 0x8002000A },
{ 0xFF, 0x8002000A },
{ 0xFF, 0x8002000A },
{ 0xFF, 0x8002000A },
{ 0xFF, 0x8002000A },
{ 0xFF, 0x80020005 },
{ 0xFF, 0x80020005 },
{ 0xFF, 0x80020005 },
{ 0xFF, 0x80020005 },
{ 1, 0 },
{ 1, 0x80020005 },
{ 0x7B, 0 },
{ 0x7B, 0x80020005 },
{ 0x7B, 0x80020005 },
{ 0x7B, 0x80020005 },
{ 0x7B, 0x80020005 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0x8002000A },
{ 0x18, 0 },
{ 0x20, 0 },
{ 0x20, 0x80020005 },
{ 0xC8, 0 },
{ 0xC8, 0x80020005 },
{ 0xC8, 0x80020005 },
{ 0xC8, 0x80020005 },
{ 0xC8, 0x8002000A },
{ 1, 0 },
{ 1, 0 },
{ 1, 0x8002000A },
{ 1, 0 },
{ 1, 0x8002000A },
{ 1, 0x8002000A },
{ 1, 0x8002000A },
{ 1, 0x8002000A },
{ 1, 0x8002000A },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 1, 0x80020005 },
{ 2, 0 },
{ 2, 0 },
{ 4, 0 },
{ 4, 0 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
} strrets_U1[NB_OLE_STRINGS] = {
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 1 },
{ 0, 1 },
{ 0, 0x7F },
{ 0, 0x80 },
{ 0, 0x81 },
{ 0, 0xFF },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 1 },
{ 0x80020005 },
{ 0, 0x7B },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 0 },
{ 0, 0 },
{ 0x8002000A },
{ 0, 0x18 },
{ 0, 0x20 },
{ 0x80020005 },
{ 0, 0xC8 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x8002000A },
{ 0, 1 },
{ 0, 1 },
{ 0x8002000A },
{ 0, 1 },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 2 },
{ 0, 2 },
{ 0, 4 },
{ 0, 4 },
};
static const struct _strret_U2 {
HRESULT error;
WORD retval;
DWORD error;
} strrets_U2[] = {
{ 0, 0x8002000A },
{ 0, 0x8002000A },
{ 0, 0x8002000A },
} strrets_U2[NB_OLE_STRINGS] = {
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 1, 0 },
{ 1, 0 },
{ 127, 0 },
{ 128, 0 },
{ 129, 0 },
{ 255, 0 },
{ 256, 0 },
{ 257, 0 },
{ 32767, 0 },
{ 32768, 0 },
{ 32768, 0x8002000A },
{ 32768, 0x8002000A },
{ 32768, 0x8002000A },
{ 32768, 0x8002000A },
{ 32768, 0x8002000A },
{ 32768, 0x8002000A },
{ 32768, 0x8002000A },
{ 32768, 0x8002000A },
{ 32768, 0x8002000A },
{ 32768, 0x8002000A },
{ 32768, 0x80020005 },
{ 32768, 0x80020005 },
{ 32768, 0x80020005 },
{ 32768, 0x80020005 },
{ 1, 0 },
{ 1, 0x80020005 },
{ 123, 0 },
{ 123, 0x80020005 },
{ 123, 0x80020005 },
{ 123, 0x80020005 },
{ 123, 0x80020005 },
{ 0, 1 },
{ 0, 1 },
{ 0, 127 },
{ 0, 128 },
{ 0, 129 },
{ 0, 255 },
{ 0, 256 },
{ 0, 257 },
{ 0, 32767 },
{ 0, 32768 },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 1 },
{ 0x80020005 },
{ 0, 123 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0x8002000A },
{ 24, 0 },
{ 32, 0 },
{ 32, 0x80020005 },
{ 200, 0 },
{ 200, 0x80020005 },
{ 200, 0x80020005 },
{ 200, 0x80020005 },
{ 200, 0x8002000A },
{ 1, 0 },
{ 1, 0 },
{ 1, 0x8002000A },
{ 1, 0 },
{ 65535, 0 },
{ 65535, 0x8002000A },
{ 65535, 0x8002000A },
{ 65535, 0x8002000A },
{ 65535, 0x8002000A },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 65535, 0x80020005 },
{ 2, 0 },
{ 2, 0 },
{ 4, 0 },
{ 4, 0 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
{ 0x8002000A },
{ 0, 24 },
{ 0, 32 },
{ 0x80020005 },
{ 0, 200 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x8002000A },
{ 0, 1 },
{ 0, 1 },
{ 0x8002000A },
{ 0, 1 },
{ 0, 65535 },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 2 },
{ 0, 2 },
{ 0, 4 },
{ 0, 4 },
};
static const struct _strret_U4 {
HRESULT error;
DWORD retval;
DWORD error;
} strrets_U4[] = {
{ 0, 0x8002000A },
{ 0, 0x8002000A },
{ 0, 0x8002000A },
} strrets_U4[NB_OLE_STRINGS] = {
{ 0x8002000A },
{ 0x8002000A },
{ 0x8002000A },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 1, 0 },
{ 1, 0 },
{ 127, 0 },
{ 128, 0 },
{ 129, 0 },
{ 255, 0 },
{ 256, 0 },
{ 257, 0 },
{ 32767, 0 },
{ 32768, 0 },
{ 32768, 0x8002000A },
{ 32768, 0x8002000A },
{ 16777216, 0 },
{ 16777217, 0 },
{ 16777217, 0x8002000A },
{ 16777217, 0 },
{ 2147483647, 0 },
{ 2147483648U, 0 },
{ 2147483648U, 0x8002000A },
{ 2147483648U, 0x8002000A },
{ 2147483648U, 0x80020005 },
{ 2147483648U, 0x80020005 },
{ 2147483648U, 0x80020005 },
{ 2147483648U, 0x80020005 },
{ 1, 0 },
{ 1, 0x80020005 },
{ 123, 0 },
{ 123, 0x80020005 },
{ 123, 0x80020005 },
{ 123, 0x80020005 },
{ 123, 0x80020005 },
{ 0, 1 },
{ 0, 1 },
{ 0, 127 },
{ 0, 128 },
{ 0, 129 },
{ 0, 255 },
{ 0, 256 },
{ 0, 257 },
{ 0, 32767 },
{ 0, 32768 },
{ 0x8002000A },
{ 0x8002000A },
{ 0, 16777216 },
{ 0, 16777217 },
{ 0x8002000A },
{ 0, 16777217 },
{ 0, 2147483647 },
{ 0, 2147483648U },
{ 0x8002000A },
{ 0x8002000A },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 1 },
{ 0x80020005 },
{ 0, 123 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0x8002000A },
{ 24, 0 },
{ 32, 0 },
{ 32, 0x80020005 },
{ 200, 0 },
{ 200, 0x80020005 },
{ 200, 0x80020005 },
{ 200, 0x80020005 },
{ 200, 0x8002000A },
{ 1, 0 },
{ 1, 0 },
{ 1, 0x8002000A },
{ 1, 0 },
{ 65535, 0 },
{ 65536, 0 },
{ 65536, 0 },
{ 4294967295U, 0 },
{ 4294967295U, 0x8002000A },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 4294967295U, 0x80020005 },
{ 2, 0 },
{ 2, 0 },
{ 4, 0 },
{ 4, 0 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
{ 4, 0x80020005 },
{ 0x8002000A },
{ 0, 24 },
{ 0, 32 },
{ 0x80020005 },
{ 0, 200 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x8002000A },
{ 0, 1 },
{ 0, 1 },
{ 0x8002000A },
{ 0, 1 },
{ 0, 65535 },
{ 0, 65536 },
{ 0, 65536 },
{ 0, 4294967295U },
{ 0x8002000A },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0x80020005 },
{ 0, 2 },
{ 0, 2 },
{ 0, 4 },
{ 0, 4 },
};
START_TEST(vartest)
......@@ -1607,6 +1668,7 @@ START_TEST(vartest)
VARIANTARG vd;
VARIANTARG ve;
HRESULT rc;
int theInt = 0;
int* pInt = &theInt;
VARIANT_BOOL b = 0;
......@@ -1630,139 +1692,11 @@ START_TEST(vartest)
BSTR bstr = NULL;
int off, i = 0;
int nOlePtrs = 120;
OLECHAR* pOleChar[120];
char msg[200];
pOleChar[0] = AtoW( "-2" );
pOleChar[1] = AtoW( "-1" );
pOleChar[2] = AtoW( "-0.51" );
pOleChar[3] = AtoW( "-0.5" );
pOleChar[4] = AtoW( "-0.49" );
pOleChar[5] = AtoW( "-0.0" );
pOleChar[6] = AtoW( "0.0" );
pOleChar[7] = AtoW( "0.49" );
pOleChar[8] = AtoW( "0.5" );
pOleChar[9] = AtoW( "0.51" );
pOleChar[10] = AtoW( "1" );
pOleChar[11] = AtoW( "127" );
pOleChar[12] = AtoW( "128" );
pOleChar[13] = AtoW( "129" );
pOleChar[14] = AtoW( "255" );
pOleChar[15] = AtoW( "256" );
pOleChar[16] = AtoW( "257" );
pOleChar[17] = AtoW( "32767" );
pOleChar[18] = AtoW( "32768" );
pOleChar[19] = AtoW( "-32768" );
pOleChar[20] = AtoW( "-32769" );
pOleChar[21] = AtoW( "16777216" );
pOleChar[22] = AtoW( "16777217" );
pOleChar[23] = AtoW( "-16777216" );
pOleChar[24] = AtoW( "16777217" );
pOleChar[25] = AtoW( "2147483647" );
pOleChar[26] = AtoW( "2147483648" );
pOleChar[27] = AtoW( "-2147483647" );
pOleChar[28] = AtoW( "-2147483648" );
pOleChar[29] = AtoW( "" );
pOleChar[30] = AtoW( " " );
pOleChar[31] = AtoW( "1F" );
pOleChar[32] = AtoW( "1G" );
pOleChar[33] = AtoW( " 1 " );
pOleChar[34] = AtoW( " 1 2 " );
pOleChar[35] = AtoW( "1,2,3" );
pOleChar[36] = AtoW( "1 2 3" );
pOleChar[37] = AtoW( "1,2, 3" );
pOleChar[38] = AtoW( "1;2;3" );
pOleChar[39] = AtoW( "1.2.3" );
pOleChar[40] = AtoW( "0." );
pOleChar[41] = AtoW( ".0" );
pOleChar[42] = AtoW( "0.1E12" );
pOleChar[43] = AtoW( "2.4,E1" );
pOleChar[44] = AtoW( " +3.2,E1" );
pOleChar[45] = AtoW( "4E2.5" );
pOleChar[46] = AtoW( " 2E+2" );
pOleChar[47] = AtoW( "1 E+2" );
pOleChar[48] = AtoW( "." );
pOleChar[49] = AtoW( ".E2" );
pOleChar[50] = AtoW( "1000000000000000000000000000000000000000000000000000000000000000" );
pOleChar[51] = AtoW( "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001" );
pOleChar[52] = AtoW( "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001" );
pOleChar[53] = AtoW( "100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001" );
pOleChar[54] = AtoW( "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001" );
pOleChar[55] = AtoW( "65535" );
pOleChar[56] = AtoW( "65535.5" );
pOleChar[57] = AtoW( "65536" );
pOleChar[58] = AtoW( "4294967295" );
pOleChar[59] = AtoW( "4294967296" );
pOleChar[60] = AtoW( "1 January 99" );
pOleChar[61] = AtoW( "December 31, 2078" );
pOleChar[62] = AtoW( "January 1, 1900" );
pOleChar[63] = AtoW( "January 2 1900" );
pOleChar[64] = AtoW( "11.11.1999" );
pOleChar[65] = AtoW( "11/11/1999" );
pOleChar[66] = AtoW( " 11 / 11 / 1999" );
pOleChar[67] = AtoW( "11/11/1999:11:11:1134" );
pOleChar[68] = AtoW( "11/11/1999 11:11:11:1" );
pOleChar[69] = AtoW( "\t1999/\t11/21 11 :11:11am" );
pOleChar[70] = AtoW( "11/11/1999 11:11:11Am" );
pOleChar[71] = AtoW( "11/11/1999 11:11:11PM" );
pOleChar[72] = AtoW( "11/11/199911:11:11PM" );
pOleChar[73] = AtoW( "11/11/1999 0:0:11am" );
pOleChar[74] = AtoW( "11/11/1999 11,11:11am" );
pOleChar[75] = AtoW( "11/11/1999 11:11:11am" );
pOleChar[76] = AtoW( "11/11/1999 11/11:11am" );
pOleChar[77] = AtoW( "11/11/1999 11:11AM" );
pOleChar[78] = AtoW( "11/11/1999 1AM" );
pOleChar[79] = AtoW( "11/11/1999 0AM" );
pOleChar[80] = AtoW( "11/11/1999 11:11:11" );
pOleChar[81] = AtoW( "11/13/1999 0AM" );
pOleChar[82] = AtoW( "13/13/1999 0AM" );
pOleChar[83] = AtoW( "13/11/1999 0AM" );
pOleChar[84] = AtoW( "11/33/1999 0AM" );
pOleChar[85] = AtoW( "11/11/1999 AM" );
pOleChar[86] = AtoW( "1/1/0 0AM" );
pOleChar[87] = AtoW( "1/1/-1 0AM" );
pOleChar[88] = AtoW( "1999 January 3 9AM" );
pOleChar[89] = AtoW( "1 January 1999 11AM" );
pOleChar[90] = AtoW( "4AM 11/11/1999" );
pOleChar[91] = AtoW( "4:22 11/11/1999 AM" );
pOleChar[92] = AtoW( " 1 1 /11/1999" );
pOleChar[93] = AtoW( "11-11/1999 11:11:11.12AM" );
pOleChar[94] = AtoW( "1999 January 3, 9AM" );
pOleChar[95] = AtoW( "December, 31, 2078" );
pOleChar[96] = AtoW( "December, 31, 2078," );
pOleChar[97] = AtoW( "December, 31 2078" );
pOleChar[98] = AtoW( "11/99" );
pOleChar[99] = AtoW( "11-1999" );
pOleChar[100] = AtoW( "true" );
pOleChar[101] = AtoW( "True" );
pOleChar[102] = AtoW( "TRue" );
pOleChar[103] = AtoW( "TRUE" );
pOleChar[104] = AtoW( " TRUE" );
pOleChar[105] = AtoW( "FALSE " );
pOleChar[106] = AtoW( "False" );
pOleChar[107] = AtoW( "JustSomeText" );
pOleChar[108] = AtoW( "Just Some Text" );
pOleChar[109] = AtoW( "" );
pOleChar[110] = AtoW( "1.5" );
pOleChar[111] = AtoW( "2.5" );
pOleChar[112] = AtoW( "3.5" );
pOleChar[113] = AtoW( "4.5" );
pOleChar[114] = AtoW( "" );
pOleChar[115] = AtoW( "" );
pOleChar[116] = AtoW( "" );
pOleChar[117] = AtoW( "" );
pOleChar[118] = AtoW( "" );
pOleChar[119] = AtoW( "" );
OLECHAR* pOleChar[NB_OLE_STRINGS];
for (i=0; i<NB_OLE_STRINGS;i++) {
pOleChar[i]=AtoW(_pTestStrA[i]);
}
/* Start testing the Low-Level API ( the coercions )
*/
......@@ -1845,14 +1779,18 @@ START_TEST(vartest)
ok(S_OK == VarUI1FromBool( VARIANT_FALSE, pByte ), XOK);
ok(*pByte == 0, "false should be converted to 0");
for( i = 0; i < nOlePtrs; i ++ )
for (i = 0; i < NB_OLE_STRINGS; i++)
{
char msg[200];
sprintf(msg,"offset %d was expecting return code %lx\n",i,strrets_U1[i].error);
ok(strrets_U1[i].error == VarUI1FromStr( pOleChar[i], 0, 0, pByte ), msg);
sprintf(msg,"offset %d was expecting return value %02x\n",i,strrets_U1[i].retval);
ok(strrets_U1[i].retval == *pByte,msg);
*pByte= 42;
rc=VarUI1FromStr( pOleChar[i], 0, 0, pByte );
ok(rc == strrets_U1[i].error,
"VarUI1FromStr([%d]=\"%s\") rc=%lx instead of %lx",
i,_pTestStrA[i],rc,strrets_U1[i].error);
if (rc == 0 && strrets_U1[i].error == 0) {
ok(*pByte == strrets_U1[i].retval,
"VarUI1FromStr([%d]=\"%s\") got %02x instead of %02x",
i,_pTestStrA[i],*pByte,strrets_U1[i].retval);
}
}
/* unsigned short from ... */
......@@ -1916,14 +1854,18 @@ START_TEST(vartest)
ok(S_OK == VarUI2FromBool( VARIANT_FALSE, pUShort ), XOK);
ok(*pUShort == 0,"FALSE should be 0");
for( i = 0; i < nOlePtrs; i ++ )
for (i = 0; i < NB_OLE_STRINGS; i++)
{
char msg[200];
sprintf(msg,"offset %d, expecting error 0x%lx\n",i,strrets_U2[i].error);
ok(strrets_U2[i].error == VarUI2FromStr( pOleChar[i], 0, 0, pUShort ), msg);
sprintf(msg,"offset %d, expecting retval 0x%x\n",i,strrets_U2[i].retval);
ok(strrets_U2[i].retval == *pUShort, msg);
*pUShort=42;
rc=VarUI2FromStr( pOleChar[i], 0, 0, pUShort );
ok(rc == strrets_U2[i].error,
"VarUI2FromStr([%d]=\"%s\") rc=%lx instead of %lx",
i,_pTestStrA[i],rc,strrets_U2[i].error);
if (rc == 0 && strrets_U2[i].error == 0) {
ok(*pUShort == strrets_U2[i].retval,
"VarUI2FromStr([%d]=\"%s\") got %u instead of %u",
i,_pTestStrA[i],*pUShort,strrets_U2[i].retval);
}
}
/* unsigned long from ...
......@@ -1990,16 +1932,18 @@ START_TEST(vartest)
ok(S_OK == VarUI4FromBool( VARIANT_FALSE, pULong ), XOK);
ok(*pULong == 0, "FALSE should be 0");
for( i = 0; i < nOlePtrs; i ++ )
for (i = 0; i < NB_OLE_STRINGS; i++)
{
char msg[200];
sprintf(msg,"offset %d should return 0x%lx\n",i,
strrets_U4[i].error);
ok(strrets_U4[i].error == VarUI4FromStr( pOleChar[i], 0, 0, pULong ), msg);
sprintf(msg,"offset %d should have retval 0x%lx\n",i,
strrets_U4[i].retval);
ok(*pULong == strrets_U4[i].retval,msg);
*pULong=42;
rc=VarUI4FromStr( pOleChar[i], 0, 0, pULong );
ok(rc == strrets_U4[i].error,
"VarUI4FromStr([%d]=\"%s\") rc=%lx instead of %lx",
i,_pTestStrA[i],rc,strrets_U4[i].error);
if (rc == 0 && strrets_U4[i].error == 0) {
ok(*pULong == strrets_U4[i].retval,
"VarUI4FromStr([%d]=\"%s\") got %lu instead of %lu",
i,_pTestStrA[i],*pULong,strrets_U4[i].retval);
}
}
/* CHAR from ...
......@@ -2041,14 +1985,18 @@ START_TEST(vartest)
ok(S_OK == VarI1FromDate( -69.66, pChar ), XOK);
ok(*pChar == -70, "-69.66 should be -70");
for( i = 0; i < nOlePtrs; i ++ )
for (i = 0; i < NB_OLE_STRINGS; i++)
{
char msg[200];
sprintf(msg,"offset %d should return 0x%lx\n",i,strrets_I1[i].error);
ok(strrets_I1[i].error == VarI1FromStr( pOleChar[i], 0, 0, pChar ), msg);
sprintf(msg,"offset %d should have retval %d\n",i,strrets_I1[i].retval);
ok(strrets_I1[i].retval == *pChar, msg);
*pChar=42;
rc=VarI1FromStr( pOleChar[i], 0, 0, pChar );
ok(rc == strrets_I1[i].error,
"VarI1FromStr([%d]=\"%s\") rc=%lx instead of %lx",
i,_pTestStrA[i],rc,strrets_I1[i].error);
if (rc == 0 && strrets_I1[i].error == 0) {
ok(*pChar == strrets_I1[i].retval,
"VarI1FromStr([%d]=\"%s\") got %d instead of %d",
i,_pTestStrA[i],*pChar,strrets_I1[i].retval);
}
}
/* short from ...
......@@ -2080,13 +2028,18 @@ START_TEST(vartest)
ok(S_OK == VarI2FromDate( -69.66, pShort ), XOK);
ok(*pShort == -70, "should be -70");
for( i = 0; i < nOlePtrs; i ++ )
for (i = 0; i < NB_OLE_STRINGS; i++)
{
char msg[200];
sprintf(msg,"offset %d, expected return 0x%lx",i,strrets_I2[i].error);
ok(strrets_I2[i].error == VarI2FromStr( pOleChar[i], 0, 0, pShort ), msg);
sprintf(msg,"offset %d, expect retval %d",i,strrets_I2[i].retval);
ok(strrets_I2[i].retval == *pShort,msg);
*pShort=42;
rc=VarI2FromStr( pOleChar[i], 0, 0, pShort );
ok(rc == strrets_I2[i].error,
"VarI2FromStr([%d]=\"%s\") rc=%lx instead of %lx",
i,_pTestStrA[i],rc,strrets_I2[i].error);
if (rc == 0 && strrets_I2[i].error == 0) {
ok(*pShort == strrets_I2[i].retval,
"VarI2FromStr([%d]=\"%s\") got %d instead of %d",
i,_pTestStrA[i],*pShort,strrets_I2[i].retval);
}
}
/* long from ...
......@@ -2113,20 +2066,24 @@ START_TEST(vartest)
ok(S_OK == VarI4FromR8( -2147483647.0, pLong ), XOK);
ok(*pLong == -2147483647,"should be -2147483647");
ok(S_OK == VarI4FromR8( -2147483648.0, pLong ), XOK);
ok(*pLong == -2147483648,"should be -2147483648");
ok(*pLong == 0x80000000L,"should be -2147483648");
ok(DISP_E_OVERFLOW == VarI4FromR8( -2147483649.0, pLong ), XOV);
ok(*pLong == -2147483648,"should still be -2147483648");
ok(*pLong == 0x80000000L,"should still be -2147483648");
ok(DISP_E_OVERFLOW == VarI4FromDate( -2147483649.0, pLong ), XOV);
ok(*pLong == -2147483648,"should still be -2147483648");
ok(*pLong == 0x80000000L,"should still be -2147483648");
for( i = 0; i < nOlePtrs; i ++ )
for (i = 0; i < NB_OLE_STRINGS; i++)
{
char msg[200];
sprintf(msg,"offset %d, should have retcode %lx",i,strrets_I4[i].error);
ok(strrets_I4[i].error == VarI4FromStr( pOleChar[i], 0, 0, pLong ), msg);
sprintf(msg,"offset %d, should have retval %ld",i,strrets_I4[i].retval);
ok(strrets_I4[i].retval == *pLong,msg);
*pLong=42;
rc=VarI4FromStr( pOleChar[i], 0, 0, pLong );
ok(rc == strrets_I4[i].error,
"VarI4FromStr([%d]=\"%s\") rc=%lx instead of %lx",
i,_pTestStrA[i],rc,strrets_I4[i].error);
if (rc == 0 && strrets_I4[i].error == 0) {
ok(*pLong == strrets_I4[i].retval,
"VarI4FromStr([%d]=\"%s\") got %ld instead of %ld",
i,_pTestStrA[i],*pLong,strrets_I4[i].retval);
}
}
/* float from ...
......@@ -2162,14 +2119,18 @@ START_TEST(vartest)
ok(*pFloat == 167772177736353110000000000000000000000.000000,
"should be 167772177736353110000000000000000000000.000000");
for( i = 0; i < nOlePtrs; i ++ )
for (i = 0; i < NB_OLE_STRINGS; i++)
{
char msg[200];
sprintf(msg,"offset %d, retcode should be 0x%08lx",i,strrets_R4[i].error);
ok(strrets_R4[i].error == VarR4FromStr( pOleChar[i], 0, 0, pFloat ), msg);
sprintf(msg,"offset %d, retval should be %f",i,strrets_R4[i].retval);
ok(strrets_R4[i].retval == *pFloat,msg);
*pFloat=42.0;
rc=VarR4FromStr( pOleChar[i], 0, 0, pFloat );
ok(rc == strrets_R4[i].error,
"VarR4FromStr([%d]=\"%s\") rc=%lx instead of %lx",
i,_pTestStrA[i],rc,strrets_R4[i].error);
if (rc == 0 && strrets_R4[i].error == 0) {
ok(*pFloat == strrets_R4[i].retval,
"VarR4FromStr([%d]=\"%s\") got %f instead of %f",
i,_pTestStrA[i],*pFloat,strrets_R4[i].retval);
}
}
/* double from ...
......@@ -2178,14 +2139,18 @@ START_TEST(vartest)
ok(S_OK == VarR8FromDate( 900719925474099.0, pDouble ), XOK);
ok(*pDouble == 900719925474099.000000,"should be 900719925474099.000000\n");
for( i = 0; i < nOlePtrs; i ++ )
for (i = 0; i < NB_OLE_STRINGS; i++)
{
char msg[200];
sprintf(msg,"offset %d, retcode should be 0x%lx",i,strrets_R8[i].error);
ok(strrets_R8[i].error == VarR8FromStr( pOleChar[i], 0, 0, pDouble ), msg);
sprintf(msg,"offset %d, retval should be %g",i,strrets_R8[i].retval);
ok(strrets_R8[i].retval == *pDouble,msg);
*pDouble=42.0;
rc=VarR8FromStr( pOleChar[i], 0, 0, pDouble );
ok(rc == strrets_R8[i].error,
"VarR8FromStr([%d]=\"%s\") rc=%lx instead of %lx",
i,_pTestStrA[i],rc,strrets_R8[i].error);
if (rc == 0 && strrets_R8[i].error == 0) {
ok(*pDouble == strrets_R8[i].retval,
"VarR8FromStr([%d]=\"%s\") got %g instead of %g",
i,_pTestStrA[i],*pDouble,strrets_R8[i].retval);
}
}
/* date from ...
......@@ -2222,19 +2187,37 @@ START_TEST(vartest)
/* Need some parsing function in Linux to emulate this...
* Still in progess.
*/
#ifdef FIXED_DATE_FUNCTIONS
for( i = 0; i < nOlePtrs; i ++ )
for (i = 0; i < NB_OLE_STRINGS; i++)
{
char msg[200];
DWORD retcode;
retcode = VarDateFromStr( pOleChar[i], 0, 0, pDouble );
sprintf(msg,"offset %d, string %s, retcode should be 0x%lx, but was 0x%lx",i,WtoA(pOleChar[i]),strrets_DATE[i].error,retcode);
ok(strrets_DATE[i].error == retcode, msg);
sprintf(msg,"offset %d, retval %g ",i,strrets_DATE[i].retval);
ok(*pDouble == strrets_DATE[i].retval,msg);
*pDouble=42.0;
rc=VarDateFromStr( pOleChar[i], 0, 0, pDouble );
if (strrets_DATE[i].todo_rc) {
todo_wine {
ok(rc == strrets_DATE[i].error,
"VarDateFromStr([%d]=\"%s\") rc= %lx instead of %lx",
i,_pTestStrA[i],rc,strrets_DATE[i].error);
}
} else {
ok(rc == strrets_DATE[i].error,
"VarDateFromStr([%d]=\"%s\") rc= %lx instead of %lx",
i,_pTestStrA[i],rc,strrets_DATE[i].error);
}
if (strrets_DATE[i].todo_rc || strrets_DATE[i].todo_val) {
todo_wine {
if (rc == 0 && strrets_DATE[i].error == 0) {
ok(*pDouble == strrets_DATE[i].retval,
"VarDateFromStr([%d]=\"%s\") got %g instead of %g",
i,_pTestStrA[i],*pDouble,strrets_DATE[i].retval);
}
}
} else {
if (rc == 0 && strrets_DATE[i].error == 0) {
ok(*pDouble == strrets_DATE[i].retval,
"VarDateFromStr([%d]=\"%s\") got %g instead of %g",
i,_pTestStrA[i],*pDouble,strrets_DATE[i].retval);
}
}
}
#endif
/* bool from ...
*/
trace( "\n\n======== Testing VarBoolFromXXX ========\n");
......@@ -2277,14 +2260,18 @@ START_TEST(vartest)
ok(VARIANT_TRUE == *pBool, "expected TRUE");
for( i = 0; i < nOlePtrs; i ++ )
for (i = 0; i < NB_OLE_STRINGS; i++)
{
char msg[200];
sprintf(msg,"offset %d, retcode should be 0x%lx",i,strrets_B[i].error);
ok(strrets_B[i].error == VarBoolFromStr( pOleChar[i], 0, 0, pBool ), msg);
sprintf(msg,"offset %d, retval should be 0x%x",i,strrets_B[i].retval);
ok(strrets_B[i].retval == *pBool,msg);
*pBool=42;
rc=VarBoolFromStr( pOleChar[i], 0, 0, pBool );
ok(rc == strrets_B[i].error,
"VarBoolFromStr([%d]=\"%s\") rc=%lx instead of %lx",
i,_pTestStrA[i],rc,strrets_B[i].error);
if (rc == 0 && strrets_B[i].error == 0) {
ok(*pBool == strrets_B[i].retval,
"VarBoolFromStr([%d]=\"%s\") got %x instead of %x",
i,_pTestStrA[i],*pBool,strrets_B[i].retval);
}
}
ok(S_OK == VarI1FromBool( VARIANT_TRUE, pByte ), XOK);
......@@ -2317,14 +2304,18 @@ START_TEST(vartest)
d += ((i%9)+1) * pow( 10, i );
ok(S_OK == VarBstrFromR8( d, 0, 0, &bstr ), XOK);
sprintf(msg,"d is %g, should be cvt. to %s, but return val is %s",d,strfromr8[off],WtoA(bstr));
sprintf(xval,"\"%s\"",strfromr8[off]);
ok(!strcmp(xval,WtoA(bstr)),msg);off++;
ok(!strcmp(xval,WtoA(bstr)),
"d is %g, should be cvt. to %s, but return val is %s",
d,strfromr8[off],WtoA(bstr));
off++;
ok(S_OK == VarBstrFromR8( -d, 0, 0, &bstr ), XOK);
sprintf(msg,"d is %g, should be cvt. to %s, but return val is %s",-d,strfromr8[off],WtoA(bstr));
sprintf(xval,"\"%s\"",strfromr8[off]);
ok(!strcmp(xval,WtoA(bstr)),msg);off++;
ok(!strcmp(xval,WtoA(bstr)),
"d is %g, should be cvt. to %s, but return val is %s",
-d,strfromr8[off],WtoA(bstr));
off++;
}
d=0;
for( i=0; i<20; i++ )
......@@ -2334,17 +2325,23 @@ START_TEST(vartest)
*/
d += ((i%9)+1) * pow( 10, (i*-1) );
ok(S_OK == VarBstrFromR8( d, 0, 0, &bstr ), XOK);
sprintf(msg,"d is %g, should be cvt. to %s, but return val is %s",d,strfromr8[off],WtoA(bstr));
sprintf(xval,"\"%s\"",strfromr8[off]);
ok(!strcmp(xval,WtoA(bstr)),msg);off++;
ok(!strcmp(xval,WtoA(bstr)),
"d is %g, should be cvt. to %s, but return val is %s",
d,strfromr8[off],WtoA(bstr));
off++;
ok(S_OK == VarBstrFromR8( d-1, 0, 0, &bstr ), XOK);
sprintf(msg,"d is %g, should be cvt. to %s, but return val is %s",d-1,strfromr8[off],WtoA(bstr));
sprintf(xval,"\"%s\"",strfromr8[off]);
ok(!strcmp(xval,WtoA(bstr)),msg);off++;
ok(!strcmp(xval,WtoA(bstr)),
"d is %g, should be cvt. to %s, but return val is %s",
d-1,strfromr8[off],WtoA(bstr));
off++;
ok(S_OK == VarBstrFromR8( -d, 0, 0, &bstr ), XOK);
sprintf(msg,"d is %g, should be cvt. to %s, but return val is %s",-d,strfromr8[off],WtoA(bstr));
sprintf(xval,"\"%s\"",strfromr8[off]);
ok(!strcmp(xval,WtoA(bstr)),msg);off++;
ok(!strcmp(xval,WtoA(bstr)),
"d is %g, should be cvt. to %s, but return val is %s",
-d,strfromr8[off],WtoA(bstr));
off++;
}
d=0;
......@@ -2358,13 +2355,17 @@ START_TEST(vartest)
*/
d += ((i%9)+1) * pow( 10, (i*-1) );
ok(S_OK == VarBstrFromR8( d, 0, 0, &bstr ), XOK);
sprintf(msg,"d is %g, should be cvt. to %s, but return val is %s",d,strfromr8[off],WtoA(bstr));
sprintf(xval,"\"%s\"",strfromr8[off]);
ok(!strcmp(xval,WtoA(bstr)),msg);off++;
ok(!strcmp(xval,WtoA(bstr)),
"d is %g, should be cvt. to %s, but return val is %s",
d,strfromr8[off],WtoA(bstr));
off++;
ok(S_OK == VarBstrFromR8( -d, 0, 0, &bstr ), XOK);
sprintf(msg,"d is %g, should be cvt. to %s, but return val is %s",-d,strfromr8[off],WtoA(bstr));
sprintf(xval,"\"%s\"",strfromr8[off]);
ok(!strcmp(xval,WtoA(bstr)),msg);off++;
ok(!strcmp(xval,WtoA(bstr)),
"d is %g, should be cvt. to %s, but return val is %s",
-d,strfromr8[off],WtoA(bstr));
off++;
}
......@@ -2377,13 +2378,17 @@ START_TEST(vartest)
*/
d += ((i%9)+1) * pow( 10, i );
ok(S_OK == VarBstrFromR4( (float)d, 0, 0, &bstr ), XOK);
sprintf(msg,"d is %g, should be cvt. to %s, but return val is %s",d,strfromr8[off],WtoA(bstr));
sprintf(xval,"\"%s\"",strfromr8[off]);
ok(!strcmp(xval,WtoA(bstr)),msg);off++;
ok(!strcmp(xval,WtoA(bstr)),
"d is %g, should be cvt. to %s, but return val is %s",
d,strfromr8[off],WtoA(bstr));
off++;
ok(S_OK == VarBstrFromR4( (float)-d, 0, 0, &bstr ), XOK);
sprintf(msg,"d is %g, should be cvt. to %s, but return val is %s",-d,strfromr8[off],WtoA(bstr));
sprintf(xval,"\"%s\"",strfromr8[off]);
ok(!strcmp(xval,WtoA(bstr)),msg);off++;
ok(!strcmp(xval,WtoA(bstr)),
"d is %g, should be cvt. to %s, but return val is %s",
-d,strfromr8[off],WtoA(bstr));
off++;
}
d=0;
for( i=0; i<10; i++ )
......@@ -2393,17 +2398,23 @@ START_TEST(vartest)
*/
d += ((i%9)+1) * pow( 10, (i*-1) );
ok(S_OK == VarBstrFromR4( (float)d, 0, 0, &bstr ), XOK);
sprintf(msg,"d is %g, should be cvt. to %s, but return val is %s",d,strfromr8[off],WtoA(bstr));
sprintf(xval,"\"%s\"",strfromr8[off]);
ok(!strcmp(xval,WtoA(bstr)),msg);off++;
ok(!strcmp(xval,WtoA(bstr)),
"d is %g, should be cvt. to %s, but return val is %s",
d,strfromr8[off],WtoA(bstr));
off++;
ok(S_OK == VarBstrFromR4( (float)d-1, 0, 0, &bstr ), XOK);
sprintf(msg,"d is %g, should be cvt. to %s, but return val is %s",d-1,strfromr8[off],WtoA(bstr));
sprintf(xval,"\"%s\"",strfromr8[off]);
ok(!strcmp(xval,WtoA(bstr)),msg);off++;
ok(!strcmp(xval,WtoA(bstr)),
"d is %g, should be cvt. to %s, but return val is %s",
d-1,strfromr8[off],WtoA(bstr));
off++;
ok(S_OK == VarBstrFromR4( (float)-d, 0, 0, &bstr ), XOK);
sprintf(msg,"d is %g, should be cvt. to %s, but return val is %s",-d,strfromr8[off],WtoA(bstr));
sprintf(xval,"\"%s\"",strfromr8[off]);
ok(!strcmp(xval,WtoA(bstr)),msg);off++;
ok(!strcmp(xval,WtoA(bstr)),
"d is %g, should be cvt. to %s, but return val is %s",
-d,strfromr8[off],WtoA(bstr));
off++;
}
d=0;
......@@ -2417,13 +2428,17 @@ START_TEST(vartest)
*/
d += ((i%9)+1) * pow( 10, (i*-1) );
ok(S_OK == VarBstrFromR4( (float)d, 0, 0, &bstr ), XOK);
sprintf(msg,"d is %g, should be cvt. to %s, but return val is %s",d,strfromr8[off],WtoA(bstr));
sprintf(xval,"\"%s\"",strfromr8[off]);
ok(!strcmp(xval,WtoA(bstr)),msg);off++;
ok(!strcmp(xval,WtoA(bstr)),
"d is %g, should be cvt. to %s, but return val is %s",
d,strfromr8[off],WtoA(bstr));
off++;
ok(S_OK == VarBstrFromR4( (float)-d, 0, 0, &bstr ), XOK);
sprintf(msg,"d is %g, should be cvt. to %s, but return val is %s",-d,strfromr8[off],WtoA(bstr));
sprintf(xval,"\"%s\"",strfromr8[off]);
ok(!strcmp(xval,WtoA(bstr)),msg);off++;
ok(!strcmp(xval,WtoA(bstr)),
"d is %g, should be cvt. to %s, but return val is %s",
-d,strfromr8[off],WtoA(bstr));
off++;
}
ok(S_OK == VarBstrFromBool( 0x00, 0, 0, &bstr ), XOK);
......@@ -2433,44 +2448,44 @@ START_TEST(vartest)
ok(S_OK == VarBstrFromDate( 0.0, 0, 0, &bstr ), XOK);
todo_wine {
sprintf(msg,"should be '12:00:00 AM', but is %s\n",WtoA(bstr));
ok(!strcmp(WtoA(bstr),"\"12:00:00 AM\""),msg);
ok(!strcmp(WtoA(bstr),"\"12:00:00 AM\""),
"should be '12:00:00 AM', but is %s\n",WtoA(bstr));
}
ok(S_OK == VarBstrFromDate( 3.34, 0, 0, &bstr ), XOK);
todo_wine {
sprintf(msg,"should be '1/2/1900 8:09:36 AM', but is %s\n",WtoA(bstr));
ok(!strcmp(WtoA(bstr),"\"1/2/1900 8:09:36 AM\""),msg);
ok(!strcmp(WtoA(bstr),"\"1/2/1900 8:09:36 AM\""),
"should be '1/2/1900 8:09:36 AM', but is %s\n",WtoA(bstr));
}
ok(S_OK == VarBstrFromDate( 3339.34, 0, 0, &bstr ), XOK);
todo_wine {
sprintf(msg,"should be '2/20/1909 8:09:36 AM', but is %s\n",WtoA(bstr));
ok(!strcmp(WtoA(bstr),"\"2/20/1909 8:09:36 AM\""),msg);
ok(!strcmp(WtoA(bstr),"\"2/20/1909 8:09:36 AM\""),
"should be '2/20/1909 8:09:36 AM', but is %s\n",WtoA(bstr));
}
ok(S_OK == VarBstrFromDate( 365.00, 0, 0, &bstr ), XOK);
todo_wine {
sprintf(msg,"should be '12/30/1900', but is %s\n",WtoA(bstr));
ok(!strcmp(WtoA(bstr),"\"12/30/1900\""),msg);
ok(!strcmp(WtoA(bstr),"\"12/30/1900\""),
"should be '12/30/1900', but is %s\n",WtoA(bstr));
}
ok(S_OK == VarBstrFromDate( 365.25, 0, 0, &bstr ), XOK);
todo_wine {
sprintf(msg,"should be '12/30/1900 6:00:00 AM', but is %s\n",WtoA(bstr));
ok(!strcmp(WtoA(bstr),"\"12/30/1900 6:00:00 AM\""),msg);
ok(!strcmp(WtoA(bstr),"\"12/30/1900 6:00:00 AM\""),
"should be '12/30/1900 6:00:00 AM', but is %s\n",WtoA(bstr));
}
ok(S_OK == VarBstrFromDate( 1461.0, 0, 0, &bstr ), XOK);
todo_wine {
sprintf(msg,"should be '12/31/1903', but is %s\n",WtoA(bstr));
ok(!strcmp(WtoA(bstr),"\"12/31/1903\""),msg);
ok(!strcmp(WtoA(bstr),"\"12/31/1903\""),
"should be '12/31/1903', but is %s\n",WtoA(bstr));
}
ok(S_OK == VarBstrFromDate( 1461.5, 0, 0, &bstr ), XOK);
todo_wine {
sprintf(msg,"should be '12/31/1903 12:00:00 PM', but is %s\n",WtoA(bstr));
ok(!strcmp(WtoA(bstr),"\"12/31/1903 12:00:00 PM\""),msg);
ok(!strcmp(WtoA(bstr),"\"12/31/1903 12:00:00 PM\""),
"should be '12/31/1903 12:00:00 PM', but is %s\n",WtoA(bstr));
}
/* Test variant API...
......@@ -2573,27 +2588,27 @@ START_TEST(vartest)
V_VT(&va) = vartypes[i].ind;
d = 4.123;
V_UNION(&va,dblVal) = d;
res = VariantCopyInd( &vb, &va );
sprintf(msg,"vt %d, return value %lx, expected was %lx",vartypes[i].ind,res,vartypes[i].vcind1);
ok(vartypes[i].vcind1 == res, msg);
rc = VariantCopyInd( &vb, &va );
sprintf(msg,"vt %d, return value %lx, expected was %lx",vartypes[i].ind,rc,vartypes[i].vcind1);
ok(vartypes[i].vcind1 == rc, msg);
V_VT(&va) = vartypes[i].ind | VT_BYREF;
d = 4.123;
V_UNION(&va,pdblVal) = &d;
res = VariantCopyInd( &vb, &va );
sprintf(msg,"vt %d, return value %lx, expected was %lx",vartypes[i].ind,res,vartypes[i].vcind2);
ok(vartypes[i].vcind2 == res, msg);
rc = VariantCopyInd( &vb, &va );
sprintf(msg,"vt %d, return value %lx, expected was %lx",vartypes[i].ind,rc,vartypes[i].vcind2);
ok(vartypes[i].vcind2 == rc, msg);
V_VT(&va) = VT_R8;
d = 4.123;
V_UNION(&va,dblVal) = d;
res = VariantChangeTypeEx( &vb, &va, 0, 0, i );
sprintf(msg,"vt %d, return value %lx, expected was %lx",vartypes[i].ind,res,vartypes[i].vcex1);
ok(vartypes[i].vcex1 == res, msg);
rc = VariantChangeTypeEx( &vb, &va, 0, 0, i );
sprintf(msg,"vt %d, return value %lx, expected was %lx",vartypes[i].ind,rc,vartypes[i].vcex1);
ok(vartypes[i].vcex1 == rc, msg);
V_VT(&va) = VT_R8;
d = 4.123;
V_UNION(&va,dblVal) = d;
res = VariantChangeTypeEx( &vb, &va, 0, 0, i | VT_BYREF );
sprintf(msg,"vt %d, return value %lx, expected was %lx",vartypes[i].ind,res,vartypes[i].vcex1);
ok(vartypes[i].vcex2 == res, msg);
rc = VariantChangeTypeEx( &vb, &va, 0, 0, i | VT_BYREF );
sprintf(msg,"vt %d, return value %lx, expected was %lx",vartypes[i].ind,rc,vartypes[i].vcex1);
ok(vartypes[i].vcex2 == rc, msg);
V_VT(&va) = 99;
d = 4.123;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment