ole32: Assign to structs instead of using CopyMemory.
This commit is contained in:
parent
892c31e4db
commit
c2599478b6
|
@ -2811,7 +2811,7 @@ HRESULT WINAPI PropVariantCopy(PROPVARIANT *pvarDest, /* [out] */
|
||||||
return hr;
|
return hr;
|
||||||
|
|
||||||
/* this will deal with most cases */
|
/* this will deal with most cases */
|
||||||
CopyMemory(pvarDest, pvarSrc, sizeof(*pvarDest));
|
*pvarDest = *pvarSrc;
|
||||||
|
|
||||||
switch(pvarSrc->vt)
|
switch(pvarSrc->vt)
|
||||||
{
|
{
|
||||||
|
@ -2825,7 +2825,7 @@ HRESULT WINAPI PropVariantCopy(PROPVARIANT *pvarDest, /* [out] */
|
||||||
break;
|
break;
|
||||||
case VT_CLSID:
|
case VT_CLSID:
|
||||||
pvarDest->u.puuid = CoTaskMemAlloc(sizeof(CLSID));
|
pvarDest->u.puuid = CoTaskMemAlloc(sizeof(CLSID));
|
||||||
CopyMemory(pvarDest->u.puuid, pvarSrc->u.puuid, sizeof(CLSID));
|
*pvarDest->u.puuid = *pvarSrc->u.puuid;
|
||||||
break;
|
break;
|
||||||
case VT_LPSTR:
|
case VT_LPSTR:
|
||||||
len = strlen(pvarSrc->u.pszVal);
|
len = strlen(pvarSrc->u.pszVal);
|
||||||
|
|
Loading…
Reference in New Issue