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
7266da3e
Commit
7266da3e
authored
Feb 01, 2005
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Feb 01, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle CBR_BLOCK in EXECUTE and ADVISE DDE transactions.
parent
e70f3e85
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
29 deletions
+47
-29
client.c
dlls/user/dde/client.c
+3
-1
dde_private.h
dlls/user/dde/dde_private.h
+1
-1
misc.c
dlls/user/dde/misc.c
+12
-6
server.c
dlls/user/dde/server.c
+31
-21
No files found.
dlls/user/dde/client.c
View file @
7266da3e
...
...
@@ -166,7 +166,7 @@ HCONV WINAPI DdeConnect(DWORD idInst, HSZ hszService, HSZ hszTopic,
hwndClient
=
CreateWindowA
(
WDML_szClientConvClassA
,
NULL
,
WS_POPUP
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
}
SetWindowLong
A
(
hwndClient
,
GWL_WDML_INSTANCE
,
(
DWORD
)
pInstance
);
SetWindowLong
PtrW
(
hwndClient
,
GWL_WDML_INSTANCE
,
(
LONG_PTR
)
pInstance
);
if
(
hszService
)
{
...
...
@@ -1271,6 +1271,8 @@ static LRESULT CALLBACK WDML_ClientProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPA
WDML_CONV
*
pConv
=
NULL
;
HSZ
hszSrv
,
hszTpc
;
TRACE
(
"%p %04x %08x %08lx
\n
"
,
hwnd
,
iMsg
,
wParam
,
lParam
);
if
(
iMsg
==
WM_DDE_ACK
&&
/* in the initial WM_INITIATE sendmessage */
((
pConv
=
WDML_GetConvFromWnd
(
hwnd
))
==
NULL
||
pConv
->
wStatus
==
XST_INIT1
))
...
...
dlls/user/dde/dde_private.h
View file @
7266da3e
...
...
@@ -173,7 +173,7 @@ extern CRITICAL_SECTION WDML_CritSect; /* protection for instance list */
/* header for the DDE Data objects */
typedef
struct
tagDDE_DATAHANDLE_HEAD
{
short
cfFormat
;
WORD
cfFormat
;
WORD
bAppOwned
;
}
DDE_DATAHANDLE_HEAD
;
...
...
dlls/user/dde/misc.c
View file @
7266da3e
...
...
@@ -1277,9 +1277,13 @@ HDDEDATA WINAPI DdeCreateDataHandle(DWORD idInst, LPBYTE pSrc, DWORD cb, DWORD c
DDE_DATAHANDLE_HEAD
*
pDdh
;
WCHAR
psz
[
MAX_BUFFER_LEN
];
GetAtomNameW
(
HSZ2ATOM
(
hszItem
),
psz
,
MAX_BUFFER_LEN
);
if
(
!
GetAtomNameW
(
HSZ2ATOM
(
hszItem
),
psz
,
MAX_BUFFER_LEN
))
{
psz
[
0
]
=
HSZ2ATOM
(
hszItem
);
psz
[
1
]
=
0
;
}
TRACE
(
"(%ld,%p,cb %ld, cbOff %ld,%p <%s>,
%
x,%x)
\n
"
,
TRACE
(
"(%ld,%p,cb %ld, cbOff %ld,%p <%s>,
fmt %04
x,%x)
\n
"
,
idInst
,
pSrc
,
cb
,
cbOff
,
hszItem
,
debugstr_w
(
psz
),
wFmt
,
afCmd
);
if
(
afCmd
!=
0
&&
afCmd
!=
HDATA_APPOWNED
)
...
...
@@ -1309,6 +1313,7 @@ HDDEDATA WINAPI DdeCreateDataHandle(DWORD idInst, LPBYTE pSrc, DWORD cb, DWORD c
}
GlobalUnlock
(
hMem
);
TRACE
(
"=> %p
\n
"
,
hMem
);
return
(
HDDEDATA
)
hMem
;
}
...
...
@@ -1416,7 +1421,7 @@ LPBYTE WINAPI DdeAccessData(HDDEDATA hData, LPDWORD pcbDataSize)
{
*
pcbDataSize
=
GlobalSize
(
hMem
)
-
sizeof
(
DDE_DATAHANDLE_HEAD
);
}
TRACE
(
"=> %p (%lu)
\n
"
,
pDdh
+
1
,
GlobalSize
(
hMem
)
-
sizeof
(
DDE_DATAHANDLE_HEAD
)
);
TRACE
(
"=> %p (%lu)
fmt %04x
\n
"
,
pDdh
+
1
,
GlobalSize
(
hMem
)
-
sizeof
(
DDE_DATAHANDLE_HEAD
),
pDdh
->
cfFormat
);
return
(
LPBYTE
)(
pDdh
+
1
);
}
...
...
@@ -1491,8 +1496,8 @@ HDDEDATA WDML_Global2DataHandle(HGLOBAL hMem, WINE_DDEHEAD* p)
switch
(
pDd
->
cfFormat
)
{
default:
FIXME
(
"Unsupported format (%
d) for data... assum
ing raw information
\n
"
,
pDd
->
cfFormat
);
FIXME
(
"Unsupported format (%
04x) for data %p, pass
ing raw information
\n
"
,
pDd
->
cfFormat
,
hMem
);
/* fall thru */
case
0
:
case
CF_TEXT
:
...
...
@@ -1550,7 +1555,8 @@ HGLOBAL WDML_DataHandle2Global(HDDEDATA hDdeData, BOOL fResponse, BOOL fRelease,
switch
(
pDdh
->
cfFormat
)
{
default:
FIXME
(
"Unsupported format (%d) for data... passing raw information
\n
"
,
pDdh
->
cfFormat
);
FIXME
(
"Unsupported format (%04x) for data %p, passing raw information
\n
"
,
pDdh
->
cfFormat
,
hDdeData
);
/* fall thru */
case
0
:
case
CF_TEXT
:
...
...
dlls/user/dde/server.c
View file @
7266da3e
...
...
@@ -562,7 +562,7 @@ static WDML_XACT* WDML_ServerQueueRequest(WDML_CONV* pConv, LPARAM lParam)
static
WDML_QUEUE_STATE
WDML_ServerHandleRequest
(
WDML_CONV
*
pConv
,
WDML_XACT
*
pXAct
)
{
HDDEDATA
hDdeData
=
0
;
WDML_QUEUE_STATE
ret
=
WDML_QS_HANDLED
;
BOOL
fAck
=
TRUE
;
if
(
!
(
pConv
->
instance
->
CBFflags
&
CBF_FAIL_REQUESTS
))
{
...
...
@@ -574,12 +574,13 @@ static WDML_QUEUE_STATE WDML_ServerHandleRequest(WDML_CONV* pConv, WDML_XACT* pX
switch
((
ULONG_PTR
)
hDdeData
)
{
case
0
:
WDML_PostAck
(
pConv
,
WDML_SERVER_SIDE
,
0
,
FALSE
,
FALSE
,
pXAct
->
atom
,
pXAct
->
lParam
,
WM_DDE_REQUEST
)
;
TRACE
(
"No data returned from the Callback
\n
"
);
fAck
=
FALSE
;
break
;
case
(
ULONG_PTR
)
CBR_BLOCK
:
ret
=
WDML_QS_BLOCK
;
break
;
ret
urn
WDML_QS_BLOCK
;
default:
{
HGLOBAL
hMem
=
WDML_DataHandle2Global
(
hDdeData
,
TRUE
,
FALSE
,
FALSE
,
FALSE
);
...
...
@@ -589,12 +590,17 @@ static WDML_QUEUE_STATE WDML_ServerHandleRequest(WDML_CONV* pConv, WDML_XACT* pX
{
DdeFreeDataHandle
(
hDdeData
);
GlobalFree
(
hMem
);
fAck
=
FALSE
;
}
}
break
;
}
WDML_PostAck
(
pConv
,
WDML_SERVER_SIDE
,
0
,
FALSE
,
fAck
,
pXAct
->
atom
,
pXAct
->
lParam
,
WM_DDE_REQUEST
);
WDML_DecHSZ
(
pConv
->
instance
,
pXAct
->
hszItem
);
return
ret
;
return
WDML_QS_HANDLED
;
}
/******************************************************************
...
...
@@ -633,8 +639,8 @@ static WDML_QUEUE_STATE WDML_ServerHandleAdvise(WDML_CONV* pConv, WDML_XACT* pXA
UINT
uType
;
WDML_LINK
*
pLink
;
DDEADVISE
*
pDdeAdvise
;
HDDEDATA
hDdeData
;
BOOL
fAck
;
HDDEDATA
hDdeData
=
0
;
BOOL
fAck
=
TRUE
;
pDdeAdvise
=
(
DDEADVISE
*
)
GlobalLock
(
pXAct
->
hMem
);
uType
=
XTYP_ADVSTART
|
...
...
@@ -646,15 +652,18 @@ static WDML_QUEUE_STATE WDML_ServerHandleAdvise(WDML_CONV* pConv, WDML_XACT* pXA
hDdeData
=
WDML_InvokeCallback
(
pConv
->
instance
,
XTYP_ADVSTART
,
pDdeAdvise
->
cfFormat
,
(
HCONV
)
pConv
,
pConv
->
hszTopic
,
pXAct
->
hszItem
,
0
,
0
,
0
);
}
else
{
hDdeData
=
0
;
}
if
((
UINT
)
hDdeData
)
switch
((
ULONG_PTR
)
hDdeData
)
{
fAck
=
TRUE
;
case
0
:
TRACE
(
"No data returned from the Callback
\n
"
);
fAck
=
FALSE
;
break
;
case
(
ULONG_PTR
)
CBR_BLOCK
:
return
WDML_QS_BLOCK
;
default:
/* billx: first to see if the link is already created. */
pLink
=
WDML_FindLink
(
pConv
->
instance
,
(
HCONV
)
pConv
,
WDML_SERVER_SIDE
,
pXAct
->
hszItem
,
TRUE
,
pDdeAdvise
->
cfFormat
);
...
...
@@ -670,11 +679,7 @@ static WDML_QUEUE_STATE WDML_ServerHandleAdvise(WDML_CONV* pConv, WDML_XACT* pXA
WDML_AddLink
(
pConv
->
instance
,
(
HCONV
)
pConv
,
WDML_SERVER_SIDE
,
uType
,
pXAct
->
hszItem
,
pDdeAdvise
->
cfFormat
);
}
}
else
{
TRACE
(
"No data returned from the Callback
\n
"
);
fAck
=
FALSE
;
break
;
}
GlobalUnlock
(
pXAct
->
hMem
);
...
...
@@ -792,8 +797,11 @@ static WDML_QUEUE_STATE WDML_ServerHandleExecute(WDML_CONV* pConv, WDML_XACT* pX
pConv
->
hszTopic
,
0
,
hDdeData
,
0L
,
0L
);
}
switch
((
U
INT
)
hDdeData
)
switch
((
U
LONG_PTR
)
hDdeData
)
{
case
(
ULONG_PTR
)
CBR_BLOCK
:
return
WDML_QS_BLOCK
;
case
DDE_FACK
:
fAck
=
TRUE
;
break
;
...
...
@@ -801,7 +809,7 @@ static WDML_QUEUE_STATE WDML_ServerHandleExecute(WDML_CONV* pConv, WDML_XACT* pX
fBusy
=
TRUE
;
break
;
default:
WARN
(
"Bad result code
\n
"
);
FIXME
(
"Unsupported returned value %p
\n
"
,
hDdeData
);
/* fall through */
case
DDE_FNOTPROCESSED
:
break
;
...
...
@@ -985,6 +993,8 @@ static LRESULT CALLBACK WDML_ServerConvProc(HWND hwndServer, UINT iMsg, WPARAM w
WDML_CONV
*
pConv
;
WDML_XACT
*
pXAct
=
NULL
;
TRACE
(
"%p %04x %08x %08lx
\n
"
,
hwndServer
,
iMsg
,
wParam
,
lParam
);
if
(
iMsg
==
WM_DESTROY
)
{
EnterCriticalSection
(
&
WDML_CritSect
);
...
...
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