Commit 4971f2f6 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

ole32: Assign to structs instead of using memcpy.

parent 89c86dd9
......@@ -1365,7 +1365,7 @@ static HRESULT WINAPI OLEClipbrd_IDataObject_GetCanonicalFormatEtc(
if ( !pformatectIn || !pformatetcOut )
return E_INVALIDARG;
memcpy(pformatetcOut, pformatectIn, sizeof(FORMATETC));
*pformatetcOut = *pformatectIn;
return DATA_S_SAMEFORMATETC;
}
......
......@@ -2855,7 +2855,7 @@ HRESULT WINAPI CoGetTreatAsClass(REFCLSID clsidOld, LPCLSID clsidNew)
LONG len = sizeof(szClsidNew);
FIXME("(%s,%p)\n", debugstr_guid(clsidOld), clsidNew);
memcpy(clsidNew,clsidOld,sizeof(CLSID)); /* copy over old value */
*clsidNew = *clsidOld; /* copy over old value */
res = COM_OpenKeyForCLSID(clsidOld, wszTreatAs, KEY_READ, &hkey);
if (FAILED(res))
......
......@@ -1240,13 +1240,13 @@ static HRESULT WINAPI DataCache_GetClassID(
HRESULT hr = IStorage_Stat(cache_entry->storage, &statstg, STATFLAG_NONAME);
if (SUCCEEDED(hr))
{
memcpy(pClassID, &statstg.clsid, sizeof(*pClassID));
*pClassID = statstg.clsid;
return S_OK;
}
}
}
memcpy(pClassID, &CLSID_NULL, sizeof(*pClassID));
*pClassID = CLSID_NULL;
return S_OK;
}
......
......@@ -672,7 +672,7 @@ static HRESULT WINAPI DefaultHandler_GetUserClassID(
if (!pClsid)
return E_POINTER;
memcpy(pClsid, &This->clsid, sizeof(CLSID));
*pClsid = This->clsid;
return S_OK;
}
......@@ -1744,7 +1744,7 @@ static DefaultHandler* DefaultHandler_Construct(
/*
* Initialize the other data members of the class.
*/
memcpy(&This->clsid, clsid, sizeof(CLSID));
This->clsid = *clsid;
This->clientSite = NULL;
This->oleAdviseHolder = NULL;
This->dataAdviseHolder = NULL;
......
......@@ -250,7 +250,7 @@ static HRESULT WINAPI IErrorInfoImpl_GetGUID(
ErrorInfoImpl *This = impl_from_IErrorInfo(iface);
TRACE("(%p)->(count=%u)\n",This,This->ref);
if(!pGUID )return E_INVALIDARG;
memcpy(pGUID, &This->m_Guid, sizeof(GUID));
*pGUID = This->m_Guid;
return S_OK;
}
......@@ -354,7 +354,7 @@ static HRESULT WINAPI ICreateErrorInfoImpl_SetGUID(
{
ErrorInfoImpl *This = impl_from_ICreateErrorInfo(iface);
TRACE("(%p)->(%s)\n", This, debugstr_guid(rguid));
memcpy(&This->m_Guid, rguid, sizeof(GUID));
This->m_Guid = *rguid;
return S_OK;
}
......
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