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
3b6ac300
Commit
3b6ac300
authored
Sep 10, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 11, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: Move some definitions to public header, use PSDK names.
parent
7044ac87
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
43 deletions
+39
-43
dpa.c
dlls/comctl32/dpa.c
+18
-27
dpa.c
dlls/comctl32/tests/dpa.c
+8
-16
commctrl.h
include/commctrl.h
+13
-0
No files found.
dlls/comctl32/dpa.c
View file @
3b6ac300
...
@@ -61,15 +61,6 @@ typedef struct _STREAMDATA
...
@@ -61,15 +61,6 @@ typedef struct _STREAMDATA
DWORD
dwItems
;
DWORD
dwItems
;
}
STREAMDATA
,
*
PSTREAMDATA
;
}
STREAMDATA
,
*
PSTREAMDATA
;
typedef
struct
_LOADDATA
{
INT
nCount
;
PVOID
ptr
;
}
LOADDATA
,
*
LPLOADDATA
;
typedef
HRESULT
(
CALLBACK
*
DPALOADPROC
)(
LPLOADDATA
,
IStream
*
,
LPARAM
);
/**************************************************************************
/**************************************************************************
* DPA_LoadStream [COMCTL32.9]
* DPA_LoadStream [COMCTL32.9]
*
*
...
@@ -79,29 +70,29 @@ typedef HRESULT (CALLBACK *DPALOADPROC)(LPLOADDATA,IStream*,LPARAM);
...
@@ -79,29 +70,29 @@ typedef HRESULT (CALLBACK *DPALOADPROC)(LPLOADDATA,IStream*,LPARAM);
* phDpa [O] pointer to a handle to a dynamic pointer array
* phDpa [O] pointer to a handle to a dynamic pointer array
* loadProc [I] pointer to a callback function
* loadProc [I] pointer to a callback function
* pStream [I] pointer to a stream
* pStream [I] pointer to a stream
*
lParam [I] application specific value
*
pData [I] pointer to callback data
*
*
* RETURNS
* RETURNS
* Success: TRUE
* Success: TRUE
* Failure: FALSE
* Failure: FALSE
*
*
* NOTES
* NOTES
* No more information available yet!
* No more information available yet!
*/
*/
HRESULT
WINAPI
DPA_LoadStream
(
HDPA
*
phDpa
,
DPALOADPROC
loadProc
,
HRESULT
WINAPI
DPA_LoadStream
(
HDPA
*
phDpa
,
PFNDPASTREAM
loadProc
,
IStream
*
pStream
,
LP
ARAM
lParam
)
IStream
*
pStream
,
LP
VOID
pData
)
{
{
HRESULT
errCode
;
HRESULT
errCode
;
LARGE_INTEGER
position
;
LARGE_INTEGER
position
;
ULARGE_INTEGER
newPosition
;
ULARGE_INTEGER
newPosition
;
STREAMDATA
streamData
;
STREAMDATA
streamData
;
LOADDATA
loadData
;
DPASTREAMINFO
streamInfo
;
ULONG
ulRead
;
ULONG
ulRead
;
HDPA
hDpa
;
HDPA
hDpa
;
PVOID
*
ptr
;
PVOID
*
ptr
;
FIXME
(
"phDpa=%p loadProc=%p pStream=%p
lParam=%lx
\n
"
,
FIXME
(
"phDpa=%p loadProc=%p pStream=%p
pData=%p
\n
"
,
phDpa
,
loadProc
,
pStream
,
lParam
);
phDpa
,
loadProc
,
pStream
,
pData
);
if
(
!
phDpa
||
!
loadProc
||
!
pStream
)
if
(
!
phDpa
||
!
loadProc
||
!
pStream
)
return
E_INVALIDARG
;
return
E_INVALIDARG
;
...
@@ -127,7 +118,7 @@ HRESULT WINAPI DPA_LoadStream (HDPA *phDpa, DPALOADPROC loadProc,
...
@@ -127,7 +118,7 @@ HRESULT WINAPI DPA_LoadStream (HDPA *phDpa, DPALOADPROC loadProc,
streamData
.
dwSize
,
streamData
.
dwData2
,
streamData
.
dwItems
);
streamData
.
dwSize
,
streamData
.
dwData2
,
streamData
.
dwItems
);
if
(
ulRead
<
sizeof
(
STREAMDATA
)
||
if
(
ulRead
<
sizeof
(
STREAMDATA
)
||
lParam
<
sizeof
(
STREAMDATA
)
||
(
DWORD
)
pData
<
sizeof
(
STREAMDATA
)
||
streamData
.
dwSize
<
sizeof
(
STREAMDATA
)
||
streamData
.
dwSize
<
sizeof
(
STREAMDATA
)
||
streamData
.
dwData2
<
1
)
{
streamData
.
dwData2
<
1
)
{
errCode
=
E_FAIL
;
errCode
=
E_FAIL
;
...
@@ -146,19 +137,19 @@ HRESULT WINAPI DPA_LoadStream (HDPA *phDpa, DPALOADPROC loadProc,
...
@@ -146,19 +137,19 @@ HRESULT WINAPI DPA_LoadStream (HDPA *phDpa, DPALOADPROC loadProc,
/* load data from the stream into the dpa */
/* load data from the stream into the dpa */
ptr
=
hDpa
->
ptrs
;
ptr
=
hDpa
->
ptrs
;
for
(
loadData
.
nCount
=
0
;
loadData
.
nCount
<
streamData
.
dwItems
;
loadData
.
nCount
++
)
{
for
(
streamInfo
.
iPos
=
0
;
streamInfo
.
iPos
<
streamData
.
dwItems
;
streamInfo
.
iPos
++
)
{
errCode
=
(
loadProc
)(
&
loadData
,
pStream
,
lParam
);
errCode
=
(
loadProc
)(
&
streamInfo
,
pStream
,
pData
);
if
(
errCode
!=
S_OK
)
{
if
(
errCode
!=
S_OK
)
{
errCode
=
S_FALSE
;
errCode
=
S_FALSE
;
break
;
break
;
}
}
*
ptr
=
loadData
.
ptr
;
*
ptr
=
streamInfo
.
pvItem
;
ptr
++
;
ptr
++
;
}
}
/* set the number of items */
/* set the number of items */
hDpa
->
nItemCount
=
loadData
.
nCount
;
hDpa
->
nItemCount
=
streamInfo
.
iPos
;
/* store the handle to the dpa */
/* store the handle to the dpa */
*
phDpa
=
hDpa
;
*
phDpa
=
hDpa
;
...
@@ -177,21 +168,21 @@ HRESULT WINAPI DPA_LoadStream (HDPA *phDpa, DPALOADPROC loadProc,
...
@@ -177,21 +168,21 @@ HRESULT WINAPI DPA_LoadStream (HDPA *phDpa, DPALOADPROC loadProc,
* hDpa [I] handle to a dynamic pointer array
* hDpa [I] handle to a dynamic pointer array
* loadProc [I] pointer to a callback function
* loadProc [I] pointer to a callback function
* pStream [I] pointer to a stream
* pStream [I] pointer to a stream
*
lParam [I] application specific value
*
pData [I] pointer to callback data
*
*
* RETURNS
* RETURNS
* Success: TRUE
* Success: TRUE
* Failure: FALSE
* Failure: FALSE
*
*
* NOTES
* NOTES
* No more information available yet!
* No more information available yet!
*/
*/
HRESULT
WINAPI
DPA_SaveStream
(
const
HDPA
hDpa
,
DPALOADPROC
loadProc
,
HRESULT
WINAPI
DPA_SaveStream
(
const
HDPA
hDpa
,
PFNDPASTREAM
loadProc
,
IStream
*
pStream
,
LP
ARAM
lParam
)
IStream
*
pStream
,
LP
VOID
pData
)
{
{
FIXME
(
"hDpa=%p loadProc=%p pStream=%p
lParam=%lx
\n
"
,
FIXME
(
"hDpa=%p loadProc=%p pStream=%p
pData=%p
\n
"
,
hDpa
,
loadProc
,
pStream
,
lParam
);
hDpa
,
loadProc
,
pStream
,
pData
);
return
E_FAIL
;
return
E_FAIL
;
}
}
...
...
dlls/comctl32/tests/dpa.c
View file @
3b6ac300
...
@@ -33,14 +33,6 @@
...
@@ -33,14 +33,6 @@
#define expect(expected, got) ok(got == expected, "Expected %d, got %d\n", expected, got)
#define expect(expected, got) ok(got == expected, "Expected %d, got %d\n", expected, got)
typedef
struct
_ITEMDATA
{
INT
iPos
;
PVOID
pvData
;
}
ITEMDATA
,
*
LPITEMDATA
;
typedef
HRESULT
(
CALLBACK
*
PFNDPASTM
)(
LPITEMDATA
,
IStream
*
,
LPARAM
);
static
HDPA
(
WINAPI
*
pDPA_Clone
)(
const
HDPA
,
const
HDPA
);
static
HDPA
(
WINAPI
*
pDPA_Clone
)(
const
HDPA
,
const
HDPA
);
static
HDPA
(
WINAPI
*
pDPA_Create
)(
INT
);
static
HDPA
(
WINAPI
*
pDPA_Create
)(
INT
);
static
HDPA
(
WINAPI
*
pDPA_CreateEx
)(
INT
,
HANDLE
);
static
HDPA
(
WINAPI
*
pDPA_CreateEx
)(
INT
,
HANDLE
);
...
@@ -53,9 +45,9 @@ static INT (WINAPI *pDPA_GetPtr)(const HDPA,INT);
...
@@ -53,9 +45,9 @@ static INT (WINAPI *pDPA_GetPtr)(const HDPA,INT);
static
INT
(
WINAPI
*
pDPA_GetPtrIndex
)(
const
HDPA
,
PVOID
);
static
INT
(
WINAPI
*
pDPA_GetPtrIndex
)(
const
HDPA
,
PVOID
);
static
BOOL
(
WINAPI
*
pDPA_Grow
)(
HDPA
,
INT
);
static
BOOL
(
WINAPI
*
pDPA_Grow
)(
HDPA
,
INT
);
static
INT
(
WINAPI
*
pDPA_InsertPtr
)(
const
HDPA
,
INT
,
PVOID
);
static
INT
(
WINAPI
*
pDPA_InsertPtr
)(
const
HDPA
,
INT
,
PVOID
);
static
HRESULT
(
WINAPI
*
pDPA_LoadStream
)(
HDPA
*
,
PFNDPASTM
,
IStream
*
,
LPARAM
);
static
HRESULT
(
WINAPI
*
pDPA_LoadStream
)(
HDPA
*
,
PFNDPAST
REA
M
,
IStream
*
,
LPARAM
);
static
BOOL
(
WINAPI
*
pDPA_Merge
)(
const
HDPA
,
const
HDPA
,
DWORD
,
PFNDPACOMPARE
,
PFNDPAMERGE
,
LPARAM
);
static
BOOL
(
WINAPI
*
pDPA_Merge
)(
const
HDPA
,
const
HDPA
,
DWORD
,
PFNDPACOMPARE
,
PFNDPAMERGE
,
LPARAM
);
static
HRESULT
(
WINAPI
*
pDPA_SaveStream
)(
HDPA
,
PFNDPASTM
,
IStream
*
,
LPARAM
);
static
HRESULT
(
WINAPI
*
pDPA_SaveStream
)(
HDPA
,
PFNDPAST
REA
M
,
IStream
*
,
LPARAM
);
static
INT
(
WINAPI
*
pDPA_Search
)(
HDPA
,
PVOID
,
INT
,
PFNDPACOMPARE
,
LPARAM
,
UINT
);
static
INT
(
WINAPI
*
pDPA_Search
)(
HDPA
,
PVOID
,
INT
,
PFNDPACOMPARE
,
LPARAM
,
UINT
);
static
BOOL
(
WINAPI
*
pDPA_SetPtr
)(
const
HDPA
,
INT
,
PVOID
);
static
BOOL
(
WINAPI
*
pDPA_SetPtr
)(
const
HDPA
,
INT
,
PVOID
);
static
BOOL
(
WINAPI
*
pDPA_Sort
)(
const
HDPA
,
PFNDPACOMPARE
,
LPARAM
);
static
BOOL
(
WINAPI
*
pDPA_Sort
)(
const
HDPA
,
PFNDPACOMPARE
,
LPARAM
);
...
@@ -140,29 +132,29 @@ static INT CALLBACK CB_EnumFirstThree(PVOID pItem, PVOID lp)
...
@@ -140,29 +132,29 @@ static INT CALLBACK CB_EnumFirstThree(PVOID pItem, PVOID lp)
return
pItem
!=
(
PVOID
)
3
;
return
pItem
!=
(
PVOID
)
3
;
}
}
static
HRESULT
CALLBACK
CB_Save
(
LPITEMDATA
pInfo
,
IStream
*
pStm
,
LPARAM
lp
)
static
HRESULT
CALLBACK
CB_Save
(
DPASTREAMINFO
*
pInfo
,
IStream
*
pStm
,
LPVOID
lp
)
{
{
HRESULT
hRes
;
HRESULT
hRes
;
ok
(
lp
==
0xdeadbeef
,
"lp=%ld
\n
"
,
lp
);
ok
(
lp
==
(
LPVOID
)
0xdeadbeef
,
"lp=%p
\n
"
,
lp
);
hRes
=
IStream_Write
(
pStm
,
&
pInfo
->
iPos
,
sizeof
(
INT
),
NULL
);
hRes
=
IStream_Write
(
pStm
,
&
pInfo
->
iPos
,
sizeof
(
INT
),
NULL
);
ok
(
hRes
==
S_OK
,
"hRes=0x%x
\n
"
,
hRes
);
ok
(
hRes
==
S_OK
,
"hRes=0x%x
\n
"
,
hRes
);
hRes
=
IStream_Write
(
pStm
,
&
pInfo
->
pv
Data
,
sizeof
(
PVOID
),
NULL
);
hRes
=
IStream_Write
(
pStm
,
&
pInfo
->
pv
Item
,
sizeof
(
PVOID
),
NULL
);
ok
(
hRes
==
S_OK
,
"hRes=0x%x
\n
"
,
hRes
);
ok
(
hRes
==
S_OK
,
"hRes=0x%x
\n
"
,
hRes
);
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
CALLBACK
CB_Load
(
LPITEMDATA
pInfo
,
IStream
*
pStm
,
LPARAM
lp
)
static
HRESULT
CALLBACK
CB_Load
(
DPASTREAMINFO
*
pInfo
,
IStream
*
pStm
,
LPVOID
lp
)
{
{
HRESULT
hRes
;
HRESULT
hRes
;
INT
iOldPos
;
INT
iOldPos
;
iOldPos
=
pInfo
->
iPos
;
iOldPos
=
pInfo
->
iPos
;
ok
(
lp
==
0xdeadbeef
,
"lp=%ld
\n
"
,
lp
);
ok
(
lp
==
(
LPVOID
)
0xdeadbeef
,
"lp=%p
\n
"
,
lp
);
hRes
=
IStream_Read
(
pStm
,
&
pInfo
->
iPos
,
sizeof
(
INT
),
NULL
);
hRes
=
IStream_Read
(
pStm
,
&
pInfo
->
iPos
,
sizeof
(
INT
),
NULL
);
ok
(
hRes
==
S_OK
,
"hRes=0x%x
\n
"
,
hRes
);
ok
(
hRes
==
S_OK
,
"hRes=0x%x
\n
"
,
hRes
);
ok
(
pInfo
->
iPos
==
iOldPos
,
"iPos=%d iOldPos=%d
\n
"
,
pInfo
->
iPos
,
iOldPos
);
ok
(
pInfo
->
iPos
==
iOldPos
,
"iPos=%d iOldPos=%d
\n
"
,
pInfo
->
iPos
,
iOldPos
);
hRes
=
IStream_Read
(
pStm
,
&
pInfo
->
pv
Data
,
sizeof
(
PVOID
),
NULL
);
hRes
=
IStream_Read
(
pStm
,
&
pInfo
->
pv
Item
,
sizeof
(
PVOID
),
NULL
);
ok
(
hRes
==
S_OK
,
"hRes=0x%x
\n
"
,
hRes
);
ok
(
hRes
==
S_OK
,
"hRes=0x%x
\n
"
,
hRes
);
return
S_OK
;
return
S_OK
;
}
}
...
...
include/commctrl.h
View file @
3b6ac300
...
@@ -5011,6 +5011,19 @@ void WINAPI DPA_DestroyCallback(HDPA, PFNDPAENUMCALLBACK, LPVOID);
...
@@ -5011,6 +5011,19 @@ void WINAPI DPA_DestroyCallback(HDPA, PFNDPAENUMCALLBACK, LPVOID);
INT
WINAPI
DPA_Search
(
HDPA
,
LPVOID
,
INT
,
PFNDPACOMPARE
,
LPARAM
,
UINT
);
INT
WINAPI
DPA_Search
(
HDPA
,
LPVOID
,
INT
,
PFNDPACOMPARE
,
LPARAM
,
UINT
);
BOOL
WINAPI
DPA_Merge
(
HDPA
,
HDPA
,
DWORD
,
PFNDPACOMPARE
,
PFNDPAMERGE
,
LPARAM
);
BOOL
WINAPI
DPA_Merge
(
HDPA
,
HDPA
,
DWORD
,
PFNDPACOMPARE
,
PFNDPAMERGE
,
LPARAM
);
/* save/load from stream */
typedef
struct
_DPASTREAMINFO
{
INT
iPos
;
/* item index */
LPVOID
pvItem
;
}
DPASTREAMINFO
;
struct
IStream
;
typedef
HRESULT
(
CALLBACK
*
PFNDPASTREAM
)(
DPASTREAMINFO
*
,
struct
IStream
*
,
LPVOID
);
HRESULT
WINAPI
DPA_LoadStream
(
HDPA
*
,
PFNDPASTREAM
,
struct
IStream
*
,
LPVOID
);
HRESULT
WINAPI
DPA_SaveStream
(
HDPA
,
PFNDPASTREAM
,
struct
IStream
*
,
LPVOID
);
BOOL
WINAPI
Str_SetPtrW
(
LPWSTR
*
,
LPCWSTR
);
BOOL
WINAPI
Str_SetPtrW
(
LPWSTR
*
,
LPCWSTR
);
/**************************************************************************
/**************************************************************************
...
...
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