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
9fd2d443
Commit
9fd2d443
authored
Oct 12, 2007
by
James Hawkins
Committed by
Alexandre Julliard
Oct 15, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Convert an HDDEDATA handle to a DDEPOKE structure for WM_DDE_POKE.
parent
88913f09
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
23 deletions
+27
-23
dde_client.c
dlls/user32/dde_client.c
+24
-17
dde.c
dlls/user32/tests/dde.c
+3
-6
No files found.
dlls/user32/dde_client.c
View file @
9fd2d443
...
...
@@ -697,8 +697,11 @@ static WDML_QUEUE_STATE WDML_HandleExecuteReply(WDML_CONV* pConv, MSG* msg, WDML
static
WDML_XACT
*
WDML_ClientQueuePoke
(
WDML_CONV
*
pConv
,
LPVOID
pData
,
DWORD
cbData
,
UINT
wFmt
,
HSZ
hszItem
)
{
WDML_XACT
*
pXAct
;
ATOM
atom
;
DDE_DATAHANDLE_HEAD
*
dh
;
WDML_XACT
*
pXAct
;
DDEPOKE
*
ddePoke
;
HGLOBAL
hglobal
;
ATOM
atom
;
TRACE
(
"XTYP_POKE transaction
\n
"
);
...
...
@@ -708,29 +711,33 @@ static WDML_XACT* WDML_ClientQueuePoke(WDML_CONV* pConv, LPVOID pData, DWORD cbD
pXAct
=
WDML_AllocTransaction
(
pConv
->
instance
,
WM_DDE_POKE
,
wFmt
,
hszItem
);
if
(
!
pXAct
)
{
GlobalDeleteAtom
(
atom
);
return
NULL
;
GlobalDeleteAtom
(
atom
);
return
NULL
;
}
if
(
cbData
==
(
DWORD
)
-
1
)
{
pXAct
->
hMem
=
(
HDDEDATA
)
pData
;
hglobal
=
(
HGLOBAL
)
pData
;
dh
=
(
DDE_DATAHANDLE_HEAD
*
)
GlobalLock
(
hglobal
);
cbData
=
GlobalSize
(
hglobal
)
-
sizeof
(
DDE_DATAHANDLE_HEAD
);
pData
=
(
LPVOID
)(
dh
+
1
);
GlobalUnlock
(
hglobal
);
}
else
{
DDEPOKE
*
ddePoke
;
pXAct
->
hMem
=
GlobalAlloc
(
GHND
|
GMEM_DDESHARE
,
sizeof
(
DDEPOKE
)
+
cbData
);
ddePoke
=
GlobalLock
(
pXAct
->
hMem
);
if
(
ddePoke
)
{
memcpy
(
ddePoke
->
Value
,
pData
,
cbData
);
ddePoke
->
fRelease
=
TRUE
;
ddePoke
->
cfFormat
=
wFmt
;
GlobalUnlock
(
pXAct
->
hMem
);
}
pXAct
->
hMem
=
GlobalAlloc
(
GHND
|
GMEM_DDESHARE
,
sizeof
(
DDEPOKE
)
+
cbData
);
ddePoke
=
GlobalLock
(
pXAct
->
hMem
);
if
(
!
ddePoke
)
{
pConv
->
instance
->
lastError
=
DMLERR_MEMORY_ERROR
;
return
NULL
;
}
ddePoke
->
unused
=
0
;
ddePoke
->
fRelease
=
TRUE
;
ddePoke
->
cfFormat
=
wFmt
;
memcpy
(
ddePoke
->
Value
,
pData
,
cbData
);
GlobalUnlock
(
pXAct
->
hMem
);
pXAct
->
lParam
=
PackDDElParam
(
WM_DDE_POKE
,
(
UINT_PTR
)
pXAct
->
hMem
,
atom
);
return
pXAct
;
...
...
dlls/user32/tests/dde.c
View file @
9fd2d443
...
...
@@ -171,12 +171,9 @@ static LRESULT WINAPI dde_server_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPA
poke
=
GlobalLock
((
HGLOBAL
)
lo
);
ok
(
poke
!=
NULL
,
"Expected non-NULL poke
\n
"
);
ok
(
poke
->
fReserved
==
0
,
"Expected 0, got %d
\n
"
,
poke
->
fReserved
);
if
(
msg_index
==
6
)
todo_wine
{
ok
(
poke
->
unused
==
0
,
"Expected 0, got %d
\n
"
,
poke
->
unused
);
ok
(
poke
->
fRelease
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
poke
->
fRelease
);
ok
(
poke
->
cfFormat
==
CF_TEXT
,
"Expected CF_TEXT, got %d
\n
"
,
poke
->
cfFormat
);
}
ok
(
poke
->
unused
==
0
,
"Expected 0, got %d
\n
"
,
poke
->
unused
);
ok
(
poke
->
fRelease
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
poke
->
fRelease
);
ok
(
poke
->
cfFormat
==
CF_TEXT
,
"Expected CF_TEXT, got %d
\n
"
,
poke
->
cfFormat
);
if
(
msg_index
==
5
)
ok
(
lstrcmpA
((
LPSTR
)
poke
->
Value
,
"poke data
\r\n
"
),
...
...
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