Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
38f16107
Commit
38f16107
authored
Jun 26, 2013
by
André Hentschel
Committed by
Alexandre Julliard
Jun 27, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32/tests: Don't use autoheader styled defines in safearray.
parent
4e0e066c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
safearray.c
dlls/oleaut32/tests/safearray.c
+11
-12
No files found.
dlls/oleaut32/tests/safearray.c
View file @
38f16107
...
...
@@ -52,13 +52,10 @@ static SAFEARRAY* (WINAPI *pSafeArrayCreateVector)(VARTYPE,LONG,ULONG);
#define GETPTR(func) p##func = (void*)GetProcAddress(hOleaut32, #func)
/* Is a given function exported from oleaut32? */
#define HAVE_FUNC(func) ((void*)GetProcAddress(hOleaut32, #func) != NULL)
/* Have I8/UI8 data type? */
#define HAVE_OLEAUT32_I8 HAVE_FUNC(VarI8FromI1)
/* Have INT_PTR/UINT_PTR type? */
static
BOOL
HAVE_OLEAUT32_INT_PTR
;
/* Has I8/UI8 data type? */
static
BOOL
has_i8
;
/* Has INT_PTR/UINT_PTR type? */
static
BOOL
has_int_ptr
;
#define START_REF_COUNT 1
#define RECORD_SIZE 64
...
...
@@ -179,14 +176,14 @@ static DWORD SAFEARRAY_GetVTSize(VARTYPE vt)
case
VT_R8
:
return
sizeof
(
LONG64
);
case
VT_I8
:
case
VT_UI8
:
if
(
HAVE_OLEAUT32_I
8
)
if
(
has_i
8
)
return
sizeof
(
LONG64
);
break
;
case
VT_INT
:
case
VT_UINT
:
return
sizeof
(
INT
);
case
VT_INT_PTR
:
case
VT_UINT_PTR
:
if
(
HAVE_OLEAUT32_INT_PTR
)
if
(
has_int_ptr
)
return
sizeof
(
UINT_PTR
);
break
;
case
VT_CY
:
return
sizeof
(
CY
);
...
...
@@ -212,13 +209,13 @@ static void check_for_VT_INT_PTR(void)
if
(
a
)
{
HRESULT
hres
;
trace
(
"VT_INT_PTR is supported
\n
"
);
HAVE_OLEAUT32_INT_PTR
=
TRUE
;
has_int_ptr
=
TRUE
;
hres
=
SafeArrayDestroy
(
a
);
ok
(
hres
==
S_OK
,
"got 0x%08x
\n
"
,
hres
);
}
else
{
trace
(
"VT_INT_PTR is not supported
\n
"
);
HAVE_OLEAUT32_INT_PTR
=
FALSE
;
has_int_ptr
=
FALSE
;
}
}
...
...
@@ -459,7 +456,7 @@ static void test_safearray(void)
ok
(
hres
==
S_OK
,
"SAD failed with hres %x
\n
"
,
hres
);
for
(
i
=
0
;
i
<
sizeof
(
vttypes
)
/
sizeof
(
vttypes
[
0
]);
i
++
)
{
if
((
i
==
VT_I8
||
i
==
VT_UI8
)
&&
HAVE_OLEAUT32_I
8
)
if
((
i
==
VT_I8
||
i
==
VT_UI8
)
&&
has_i
8
)
{
vttypes
[
i
].
elemsize
=
sizeof
(
LONG64
);
}
...
...
@@ -1786,6 +1783,8 @@ START_TEST(safearray)
{
hOleaut32
=
GetModuleHandleA
(
"oleaut32.dll"
);
has_i8
=
GetProcAddress
(
hOleaut32
,
"VarI8FromI1"
)
!=
NULL
;
GETPTR
(
SafeArrayAllocDescriptorEx
);
GETPTR
(
SafeArrayCopyData
);
GETPTR
(
SafeArrayGetIID
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment