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
c743f9d0
Commit
c743f9d0
authored
Jan 24, 2009
by
Jeff Latimer
Committed by
Alexandre Julliard
Jan 26, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: DdeCreateStringHandle checks for an invalid instance Id and sets…
user32: DdeCreateStringHandle checks for an invalid instance Id and sets lastError for instances on that thread.
parent
77e0e9cc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
dde_misc.c
dlls/user32/dde_misc.c
+6
-2
dde.c
dlls/user32/tests/dde.c
+0
-4
No files found.
dlls/user32/dde_misc.c
View file @
c743f9d0
...
...
@@ -1128,7 +1128,9 @@ HSZ WINAPI DdeCreateStringHandleA(DWORD idInst, LPCSTR psz, INT codepage)
TRACE
(
"(%d,%s,%d)
\n
"
,
idInst
,
debugstr_a
(
psz
),
codepage
);
pInstance
=
WDML_GetInstance
(
idInst
);
if
(
pInstance
)
if
(
pInstance
==
NULL
)
WDML_SetAllLastError
(
DMLERR_INVALIDPARAMETER
);
else
{
if
(
codepage
==
0
)
codepage
=
CP_WINANSI
;
hsz
=
WDML_CreateString
(
pInstance
,
psz
,
codepage
);
...
...
@@ -1155,7 +1157,9 @@ HSZ WINAPI DdeCreateStringHandleW(DWORD idInst, LPCWSTR psz, INT codepage)
HSZ
hsz
=
0
;
pInstance
=
WDML_GetInstance
(
idInst
);
if
(
pInstance
)
if
(
pInstance
==
NULL
)
WDML_SetAllLastError
(
DMLERR_INVALIDPARAMETER
);
else
{
if
(
codepage
==
0
)
codepage
=
CP_WINUNICODE
;
hsz
=
WDML_CreateString
(
pInstance
,
psz
,
codepage
);
...
...
dlls/user32/tests/dde.c
View file @
c743f9d0
...
...
@@ -1569,18 +1569,14 @@ static void test_DdeCreateDataHandle(void)
item
=
DdeCreateStringHandleA
(
0
,
"item"
,
CP_WINANSI
);
ok
(
item
==
NULL
,
"Expected NULL hsz got %p
\n
"
,
item
);
err
=
DdeGetLastError
(
dde_inst
);
todo_wine
ok
(
err
==
DMLERR_INVALIDPARAMETER
,
"Expected DMLERR_INVALIDPARAMETER, got %d
\n
"
,
err
);
err
=
DdeGetLastError
(
dde_inst2
);
todo_wine
ok
(
err
==
DMLERR_INVALIDPARAMETER
,
"Expected DMLERR_INVALIDPARAMETER, got %d
\n
"
,
err
);
item
=
DdeCreateStringHandleW
(
0
,
item_str
,
CP_WINUNICODE
);
ok
(
item
==
NULL
,
"Expected NULL hsz got %p
\n
"
,
item
);
err
=
DdeGetLastError
(
dde_inst
);
todo_wine
ok
(
err
==
DMLERR_INVALIDPARAMETER
,
"Expected DMLERR_INVALIDPARAMETER, got %d
\n
"
,
err
);
err
=
DdeGetLastError
(
dde_inst2
);
todo_wine
ok
(
err
==
DMLERR_INVALIDPARAMETER
,
"Expected DMLERR_INVALIDPARAMETER, got %d
\n
"
,
err
);
item
=
DdeCreateStringHandleA
(
dde_inst
,
"item"
,
CP_WINANSI
);
...
...
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