Commit 04a59014 authored by Jeff Latimer's avatar Jeff Latimer Committed by Alexandre Julliard

user32: DdeQueryString returns a NULL str if there is no handle.

parent ec49e417
......@@ -348,8 +348,8 @@ UINT WDML_Initialize(LPDWORD pidInst, PFNCALLBACK pfnCallback,
UINT ret;
WNDCLASSEXW wndclass;
TRACE("(%p,%p,0x%x,%d)\n",
pidInst, pfnCallback, afCmd, ulRes);
TRACE("(%p,%p,0x%x,%d,0x%x)\n",
pidInst, pfnCallback, afCmd, ulRes, bUnicode);
if (ulRes)
{
......@@ -999,6 +999,14 @@ static int WDML_QueryString(WDML_INSTANCE* pInstance, HSZ hsz, LPVOID ptr, DWORD
cchMax = MAX_BUFFER_LEN;
}
/* if there is no input windows returns a NULL string */
if (hsz == NULL)
{
CHAR *t_ptr = ptr;
*t_ptr = '\0';
return 1;
}
switch (codepage)
{
case CP_WINANSI:
......
......@@ -654,7 +654,6 @@ static HDDEDATA CALLBACK server_ddeml_callback(UINT uType, UINT uFmt, HCONV hcon
if (msg_index == 5)
{
todo_wine
{
ok(!lstrcmpA(str, ""), "Expected empty string, got %s\n", str);
ok(size == 1, "Expected 1, got %d\n", size);
......@@ -696,7 +695,6 @@ static HDDEDATA CALLBACK server_ddeml_callback(UINT uType, UINT uFmt, HCONV hcon
size = DdeQueryStringA(server_pid, hsz2, str, MAX_PATH, CP_WINANSI);
if (msg_index == 7)
{
todo_wine
{
ok(!lstrcmpA(str, ""), "Expected empty string, got %s\n", str);
ok(size == 1, "Expected 1, got %d\n", size);
......
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