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

oldstable
Jeff Latimer 2008-08-05 22:14:01 +10:00 committed by Alexandre Julliard
parent ec49e4179b
commit 04a59014f8
2 changed files with 10 additions and 4 deletions

View File

@ -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:

View File

@ -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);