win, clipboard, fix pointer
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
53a1aeac61
commit
0094d306a8
@ -358,6 +358,7 @@ static HRESULT STDMETHODCALLTYPE CliprdrStream_Read(IStream *This, void *pv, ULO
|
||||
{
|
||||
CopyMemory(pv, clipboard->req_fdata, clipboard->req_fsize);
|
||||
free(clipboard->req_fdata);
|
||||
clipboard->req_fdata = NULL;
|
||||
}
|
||||
|
||||
*pcbRead = clipboard->req_fsize;
|
||||
@ -569,6 +570,7 @@ static CliprdrStream *CliprdrStream_New(UINT32 connID, ULONG index, void *pData,
|
||||
|
||||
instance->m_lSize.QuadPart = *((LONGLONG *)clipboard->req_fdata);
|
||||
free(clipboard->req_fdata);
|
||||
clipboard->req_fdata = NULL;
|
||||
}
|
||||
else
|
||||
success = TRUE;
|
||||
@ -1444,7 +1446,7 @@ static UINT cliprdr_send_format_list(wfClipboard *clipboard, UINT32 connID)
|
||||
return rc;
|
||||
}
|
||||
|
||||
UINT wait_response_event(wfClipboard *clipboard, HANDLE event, void *data)
|
||||
UINT wait_response_event(wfClipboard *clipboard, HANDLE event, void **data)
|
||||
{
|
||||
UINT rc = ERROR_SUCCESS;
|
||||
clipboard->context->IsStopped = FALSE;
|
||||
@ -1474,7 +1476,7 @@ UINT wait_response_event(wfClipboard *clipboard, HANDLE event, void *data)
|
||||
rc = ERROR_INTERNAL_ERROR;
|
||||
}
|
||||
|
||||
if (data == NULL)
|
||||
if ((*data) == NULL)
|
||||
{
|
||||
rc = ERROR_INTERNAL_ERROR;
|
||||
}
|
||||
@ -1482,7 +1484,7 @@ UINT wait_response_event(wfClipboard *clipboard, HANDLE event, void *data)
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (data != NULL)
|
||||
if ((*data) != NULL)
|
||||
{
|
||||
if (!ResetEvent(event))
|
||||
{
|
||||
@ -1514,7 +1516,7 @@ static UINT cliprdr_send_data_request(UINT32 connID, wfClipboard *clipboard, UIN
|
||||
return rc;
|
||||
}
|
||||
|
||||
wait_response_event(clipboard, clipboard->response_data_event, clipboard->hmem);
|
||||
wait_response_event(clipboard, clipboard->response_data_event, &clipboard->hmem);
|
||||
}
|
||||
|
||||
UINT cliprdr_send_request_filecontents(wfClipboard *clipboard, UINT32 connID, const void *streamid, ULONG index,
|
||||
@ -1542,7 +1544,7 @@ UINT cliprdr_send_request_filecontents(wfClipboard *clipboard, UINT32 connID, co
|
||||
return rc;
|
||||
}
|
||||
|
||||
return wait_response_event(clipboard, clipboard->req_fevent, clipboard->req_fdata);
|
||||
return wait_response_event(clipboard, clipboard->req_fevent, (void**)&clipboard->req_fdata);
|
||||
}
|
||||
|
||||
static UINT cliprdr_send_response_filecontents(
|
||||
|
Loading…
x
Reference in New Issue
Block a user