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
92ed7c50
Commit
92ed7c50
authored
Jan 10, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 10, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Add missing methods to test IRecordInfo implementation.
parent
7215eb24
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
134 additions
and
39 deletions
+134
-39
safearray.c
dlls/oleaut32/tests/safearray.c
+134
-39
No files found.
dlls/oleaut32/tests/safearray.c
View file @
92ed7c50
...
@@ -83,32 +83,33 @@ typedef struct IRecordInfoImpl
...
@@ -83,32 +83,33 @@ typedef struct IRecordInfoImpl
DWORD
clearCalled
;
DWORD
clearCalled
;
}
IRecordInfoImpl
;
}
IRecordInfoImpl
;
static
const
IRecordInfoVtbl
IRecordInfoImpl_VTable
;
static
inline
IRecordInfoImpl
*
impl_from_IRecordInfo
(
IRecordInfo
*
iface
)
static
inline
IRecordInfoImpl
*
impl_from_IRecordInfo
(
IRecordInfo
*
iface
)
{
{
return
CONTAINING_RECORD
(
iface
,
IRecordInfoImpl
,
IRecordInfo_iface
);
return
CONTAINING_RECORD
(
iface
,
IRecordInfoImpl
,
IRecordInfo_iface
);
}
}
static
IRecordInfoImpl
*
IRecordInfoImpl_Construct
(
void
)
static
HRESULT
WINAPI
RecordInfo_QueryInterface
(
IRecordInfo
*
iface
,
REFIID
riid
,
void
**
obj
)
{
{
IRecordInfoImpl
*
rec
;
*
obj
=
NULL
;
rec
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
IRecordInfoImpl
));
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
rec
->
IRecordInfo_iface
.
lpVtbl
=
&
IRecordInfoImpl_VTable
;
IsEqualIID
(
riid
,
&
IID_IRecordInfo
))
rec
->
ref
=
START_REF_COUNT
;
{
rec
->
clearCalled
=
0
;
*
obj
=
iface
;
rec
->
sizeCalled
=
0
;
IRecordInfo_AddRef
(
iface
);
return
rec
;
return
S_OK
;
}
return
E_NOINTERFACE
;
}
}
static
ULONG
CALLBACK
IRecordInfoImpl
_AddRef
(
IRecordInfo
*
iface
)
static
ULONG
WINAPI
RecordInfo
_AddRef
(
IRecordInfo
*
iface
)
{
{
IRecordInfoImpl
*
This
=
impl_from_IRecordInfo
(
iface
);
IRecordInfoImpl
*
This
=
impl_from_IRecordInfo
(
iface
);
return
InterlockedIncrement
(
&
This
->
ref
);
return
InterlockedIncrement
(
&
This
->
ref
);
}
}
static
ULONG
CALLBACK
IRecordInfoImpl
_Release
(
IRecordInfo
*
iface
)
static
ULONG
WINAPI
RecordInfo
_Release
(
IRecordInfo
*
iface
)
{
{
IRecordInfoImpl
*
This
=
impl_from_IRecordInfo
(
iface
);
IRecordInfoImpl
*
This
=
impl_from_IRecordInfo
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
...
@@ -119,16 +120,40 @@ static ULONG CALLBACK IRecordInfoImpl_Release(IRecordInfo *iface)
...
@@ -119,16 +120,40 @@ static ULONG CALLBACK IRecordInfoImpl_Release(IRecordInfo *iface)
return
ref
;
return
ref
;
}
}
static
HRESULT
WINAPI
RecordInfo_RecordInit
(
IRecordInfo
*
iface
,
PVOID
pvNew
)
{
ok
(
0
,
"enexpected call
\n
"
);
return
E_NOTIMPL
;
}
static
BOOL
fail_GetSize
;
/* Whether to fail the GetSize call */
static
BOOL
fail_GetSize
;
/* Whether to fail the GetSize call */
static
HRESULT
CALLBACK
IRecordInfoImpl
_RecordClear
(
IRecordInfo
*
iface
,
PVOID
pvExisting
)
static
HRESULT
WINAPI
RecordInfo
_RecordClear
(
IRecordInfo
*
iface
,
PVOID
pvExisting
)
{
{
IRecordInfoImpl
*
This
=
impl_from_IRecordInfo
(
iface
);
IRecordInfoImpl
*
This
=
impl_from_IRecordInfo
(
iface
);
This
->
clearCalled
++
;
This
->
clearCalled
++
;
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
CALLBACK
IRecordInfoImpl_GetSize
(
IRecordInfo
*
iface
,
ULONG
*
size
)
static
HRESULT
WINAPI
RecordInfo_RecordCopy
(
IRecordInfo
*
iface
,
PVOID
pvExisting
,
PVOID
pvNew
)
{
ok
(
0
,
"unexpected call
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
RecordInfo_GetGuid
(
IRecordInfo
*
iface
,
GUID
*
pguid
)
{
ok
(
0
,
"unexpected call
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
RecordInfo_GetName
(
IRecordInfo
*
iface
,
BSTR
*
pbstrName
)
{
ok
(
0
,
"unexpected call
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
RecordInfo_GetSize
(
IRecordInfo
*
iface
,
ULONG
*
size
)
{
{
IRecordInfoImpl
*
This
=
impl_from_IRecordInfo
(
iface
);
IRecordInfoImpl
*
This
=
impl_from_IRecordInfo
(
iface
);
This
->
sizeCalled
++
;
This
->
sizeCalled
++
;
...
@@ -141,37 +166,107 @@ static HRESULT CALLBACK IRecordInfoImpl_GetSize(IRecordInfo *iface, ULONG* size)
...
@@ -141,37 +166,107 @@ static HRESULT CALLBACK IRecordInfoImpl_GetSize(IRecordInfo *iface, ULONG* size)
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
CALLBACK
IRecordInfoImpl_Dummy
(
IRecordInfo
*
iface
)
static
HRESULT
WINAPI
RecordInfo_GetTypeInfo
(
IRecordInfo
*
iface
,
ITypeInfo
**
ppTypeInfo
)
{
{
trace
(
"Called an unexpected IRecordInfo method - please report!
\n
"
);
ok
(
0
,
"unexpected call
\n
"
);
/* Quit because we'll just crash anyway */
return
E_NOTIMPL
;
fflush
(
NULL
);
exit
(
255
);
}
}
static
const
IRecordInfoVtbl
IRecordInfoImpl_VTable
=
static
HRESULT
WINAPI
RecordInfo_GetField
(
IRecordInfo
*
iface
,
PVOID
pvData
,
LPCOLESTR
szFieldName
,
VARIANT
*
pvarField
)
{
{
(
PVOID
)
IRecordInfoImpl_Dummy
,
ok
(
0
,
"unexpected call
\n
"
);
IRecordInfoImpl_AddRef
,
return
E_NOTIMPL
;
IRecordInfoImpl_Release
,
}
(
PVOID
)
IRecordInfoImpl_Dummy
,
IRecordInfoImpl_RecordClear
,
static
HRESULT
WINAPI
RecordInfo_GetFieldNoCopy
(
IRecordInfo
*
iface
,
PVOID
pvData
,
(
PVOID
)
IRecordInfoImpl_Dummy
,
LPCOLESTR
szFieldName
,
VARIANT
*
pvarField
,
PVOID
*
ppvDataCArray
)
(
PVOID
)
IRecordInfoImpl_Dummy
,
{
(
PVOID
)
IRecordInfoImpl_Dummy
,
ok
(
0
,
"unexpected call
\n
"
);
IRecordInfoImpl_GetSize
,
return
E_NOTIMPL
;
(
PVOID
)
IRecordInfoImpl_Dummy
,
}
(
PVOID
)
IRecordInfoImpl_Dummy
,
(
PVOID
)
IRecordInfoImpl_Dummy
,
static
HRESULT
WINAPI
RecordInfo_PutField
(
IRecordInfo
*
iface
,
ULONG
wFlags
,
PVOID
pvData
,
(
PVOID
)
IRecordInfoImpl_Dummy
,
LPCOLESTR
szFieldName
,
VARIANT
*
pvarField
)
(
PVOID
)
IRecordInfoImpl_Dummy
,
{
(
PVOID
)
IRecordInfoImpl_Dummy
,
ok
(
0
,
"unexpected call
\n
"
);
(
PVOID
)
IRecordInfoImpl_Dummy
,
return
E_NOTIMPL
;
(
PVOID
)
IRecordInfoImpl_Dummy
,
}
(
PVOID
)
IRecordInfoImpl_Dummy
,
(
PVOID
)
IRecordInfoImpl_Dummy
static
HRESULT
WINAPI
RecordInfo_PutFieldNoCopy
(
IRecordInfo
*
iface
,
ULONG
wFlags
,
PVOID
pvData
,
LPCOLESTR
szFieldName
,
VARIANT
*
pvarField
)
{
ok
(
0
,
"unexpected call
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
RecordInfo_GetFieldNames
(
IRecordInfo
*
iface
,
ULONG
*
pcNames
,
BSTR
*
rgBstrNames
)
{
ok
(
0
,
"unexpected call
\n
"
);
return
E_NOTIMPL
;
}
static
BOOL
WINAPI
RecordInfo_IsMatchingType
(
IRecordInfo
*
iface
,
IRecordInfo
*
info2
)
{
ok
(
0
,
"unexpected call
\n
"
);
return
E_NOTIMPL
;
}
static
PVOID
WINAPI
RecordInfo_RecordCreate
(
IRecordInfo
*
iface
)
{
ok
(
0
,
"unexpected call
\n
"
);
return
NULL
;
}
static
HRESULT
WINAPI
RecordInfo_RecordCreateCopy
(
IRecordInfo
*
iface
,
PVOID
pvSource
,
PVOID
*
ppvDest
)
{
ok
(
0
,
"unexpected call
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
RecordInfo_RecordDestroy
(
IRecordInfo
*
iface
,
PVOID
pvRecord
)
{
ok
(
0
,
"unexpected call
\n
"
);
return
E_NOTIMPL
;
}
static
const
IRecordInfoVtbl
RecordInfoVtbl
=
{
RecordInfo_QueryInterface
,
RecordInfo_AddRef
,
RecordInfo_Release
,
RecordInfo_RecordInit
,
RecordInfo_RecordClear
,
RecordInfo_RecordCopy
,
RecordInfo_GetGuid
,
RecordInfo_GetName
,
RecordInfo_GetSize
,
RecordInfo_GetTypeInfo
,
RecordInfo_GetField
,
RecordInfo_GetFieldNoCopy
,
RecordInfo_PutField
,
RecordInfo_PutFieldNoCopy
,
RecordInfo_GetFieldNames
,
RecordInfo_IsMatchingType
,
RecordInfo_RecordCreate
,
RecordInfo_RecordCreateCopy
,
RecordInfo_RecordDestroy
};
};
static
IRecordInfoImpl
*
IRecordInfoImpl_Construct
(
void
)
{
IRecordInfoImpl
*
rec
;
rec
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
IRecordInfoImpl
));
rec
->
IRecordInfo_iface
.
lpVtbl
=
&
RecordInfoVtbl
;
rec
->
ref
=
START_REF_COUNT
;
rec
->
clearCalled
=
0
;
rec
->
sizeCalled
=
0
;
return
rec
;
}
static
DWORD
SAFEARRAY_GetVTSize
(
VARTYPE
vt
)
static
DWORD
SAFEARRAY_GetVTSize
(
VARTYPE
vt
)
{
{
switch
(
vt
)
switch
(
vt
)
...
...
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