Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
544c1e5c
Commit
544c1e5c
authored
Aug 05, 2008
by
Jeff Latimer
Committed by
Alexandre Julliard
Aug 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Add tests for for invalid DDE conditions.
parent
70ebae34
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
+49
-0
dde.c
dlls/user32/tests/dde.c
+49
-0
No files found.
dlls/user32/tests/dde.c
View file @
544c1e5c
...
@@ -1372,6 +1372,53 @@ todo_wine {
...
@@ -1372,6 +1372,53 @@ todo_wine {
DestroyWindow
(
hwnd_server
);
DestroyWindow
(
hwnd_server
);
}
}
static
void
test_initialisation
(
void
)
{
UINT
ret
;
DWORD
res
;
HDDEDATA
hdata
;
HSZ
server
,
topic
,
item
;
DWORD
client_pid
;
HCONV
conversation
;
/* Initialise without a valid server window. */
client_pid
=
0
;
ret
=
DdeInitializeA
(
&
client_pid
,
client_ddeml_callback
,
APPCMD_CLIENTONLY
,
0
);
ok
(
ret
==
DMLERR_NO_ERROR
,
"Expected DMLERR_NO_ERROR, got %d
\n
"
,
ret
);
server
=
DdeCreateStringHandleA
(
client_pid
,
"TestDDEService"
,
CP_WINANSI
);
topic
=
DdeCreateStringHandleA
(
client_pid
,
"TestDDETopic"
,
CP_WINANSI
);
DdeGetLastError
(
client_pid
);
/* There is no server window so no conversation can be extracted */
conversation
=
DdeConnect
(
client_pid
,
server
,
topic
,
NULL
);
ok
(
conversation
==
NULL
,
"Expected NULL conversation, %p
\n
"
,
conversation
);
ret
=
DdeGetLastError
(
client_pid
);
ok
(
ret
==
DMLERR_NO_CONV_ESTABLISHED
,
"Expected DMLERR_NO_CONV_ESTABLISHED, got %d
\n
"
,
ret
);
DdeFreeStringHandle
(
client_pid
,
server
);
item
=
DdeCreateStringHandleA
(
client_pid
,
"request"
,
CP_WINANSI
);
/* There is no converstation so an invalild parameter results */
res
=
0xdeadbeef
;
DdeGetLastError
(
client_pid
);
hdata
=
DdeClientTransaction
(
NULL
,
0
,
conversation
,
item
,
CF_TEXT
,
XTYP_REQUEST
,
default_timeout
,
&
res
);
ret
=
DdeGetLastError
(
client_pid
);
todo_wine
ok
(
ret
==
DMLERR_INVALIDPARAMETER
,
"Expected DMLERR_INVALIDPARAMETER, got %d
\n
"
,
ret
);
ok
(
res
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %08x
\n
"
,
res
);
DdeFreeStringHandle
(
client_pid
,
server
);
ret
=
DdeDisconnect
(
conversation
);
ok
(
ret
==
FALSE
,
"Expected FALSE, got %d
\n
"
,
ret
);
ret
=
DdeUninitialize
(
client_pid
);
ok
(
ret
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
ret
);
}
static
void
test_DdeCreateStringHandleW
(
DWORD
dde_inst
,
int
codepage
)
static
void
test_DdeCreateStringHandleW
(
DWORD
dde_inst
,
int
codepage
)
{
{
static
const
WCHAR
dde_string
[]
=
{
'D'
,
'D'
,
'E'
,
' '
,
'S'
,
't'
,
'r'
,
'i'
,
'n'
,
'g'
,
0
};
static
const
WCHAR
dde_string
[]
=
{
'D'
,
'D'
,
'E'
,
' '
,
'S'
,
't'
,
'r'
,
'i'
,
'n'
,
'g'
,
0
};
...
@@ -2088,6 +2135,8 @@ START_TEST(dde)
...
@@ -2088,6 +2135,8 @@ START_TEST(dde)
return
;
return
;
}
}
test_initialisation
();
ZeroMemory
(
&
startup
,
sizeof
(
STARTUPINFO
));
ZeroMemory
(
&
startup
,
sizeof
(
STARTUPINFO
));
sprintf
(
buffer
,
"%s dde ddeml"
,
argv
[
0
]);
sprintf
(
buffer
,
"%s dde ddeml"
,
argv
[
0
]);
startup
.
cb
=
sizeof
(
startup
);
startup
.
cb
=
sizeof
(
startup
);
...
...
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