Commit c8fb8c02 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

user32: Add a test that shows ddeml string handles use local atoms.

parent 8e90c609
......@@ -302,6 +302,7 @@ static void test_DdeCreateStringHandleW(DWORD dde_inst, int codepage)
HSZ str_handle;
WCHAR bufW[256];
char buf[256];
ATOM atom;
int ret;
str_handle = DdeCreateStringHandleW(dde_inst, dde_string, codepage);
......@@ -350,6 +351,29 @@ static void test_DdeCreateStringHandleW(DWORD dde_inst, int codepage)
ok(!lstrcmpW(dde_string, (LPCWSTR)buf), "DdeQueryStringW returned wrong string\n");
}
if (codepage == CP_WINANSI)
{
atom = FindAtomA((LPSTR)dde_string);
ok(atom != 0, "Expected a valid atom\n");
SetLastError(0xdeadbeef);
atom = GlobalFindAtomA((LPSTR)dde_string);
ok(atom == 0, "Expected 0, got %d\n", atom);
ok(GetLastError() == ERROR_FILE_NOT_FOUND,
"Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError());
}
else
{
atom = FindAtomW(dde_string);
ok(atom != 0, "Expected a valid atom\n");
SetLastError(0xdeadbeef);
atom = GlobalFindAtomW(dde_string);
ok(atom == 0, "Expected 0, got %d\n", atom);
ok(GetLastError() == ERROR_FILE_NOT_FOUND,
"Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError());
}
ok(DdeFreeStringHandle(dde_inst, str_handle), "DdeFreeStringHandle failed\n");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment