Jeff Latimer lats@yless4u.com.au writes:
@@ -1157,7 +1157,10 @@ HDDEDATA WINAPI DdeClientTransaction(LPBYTE pData, DWORD cbData, HCONV hConv, HS /* Windows simply ignores hszItem and wFmt in this case */ if (pData == NULL) {
pConv->instance->lastError = DMLERR_INVALIDPARAMETER;
if (cbData == -1)
pConv->instance->lastError = DMLERR_INVALIDPARAMETER;
else
} pXAct = WDML_ClientQueueExecute(pConv, pData, cbData);pConv->instance->lastError = DMLERR_MEMORY_ERROR; return 0;
It would be cleaner to do the checks inside WDML_ClientQueueExecute since it already handles the cbData==-1 case differently.