Commit 1b2dc823 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

oledlg: Assign to structs instead of using memcpy.

parent 612e4c2b
......@@ -377,7 +377,7 @@ static BOOL UIINSERTOBJECTDLG_PopulateObjectTypes(InsertObjectDlgInfo* pdlgInfo)
if (ERROR_SUCCESS == RegQueryValueW(hkey, NULL, keydesc, &len))
{
CLSID* lpclsid = HeapAlloc(GetProcessHeap(), 0, sizeof(CLSID));
memcpy(lpclsid, &clsid, sizeof(CLSID));
*lpclsid = clsid;
len = SendMessageW(pdlgInfo->hwndObjTypeLB, LB_ADDSTRING, 0, (LPARAM)keydesc);
SendMessageW(pdlgInfo->hwndObjTypeLB, LB_SETITEMDATA, (WPARAM)len, (LPARAM)lpclsid);
......@@ -453,7 +453,7 @@ static BOOL UIINSERTOBJECTDLG_OnOpen(InsertObjectDlgInfo* pdlgInfo)
{
CLSID* clsid = (CLSID*) SendMessageA(pdlgInfo->hwndObjTypeLB,
LB_GETITEMDATA, (WPARAM)index, 0);
memcpy(&pdlgInfo->lpOleUIInsertObject->clsid, clsid, sizeof(CLSID));
pdlgInfo->lpOleUIInsertObject->clsid = *clsid;
if (pdlgInfo->lpOleUIInsertObject->dwFlags & IOF_CREATENEWOBJECT)
{
......
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