object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileImpl));
if (!object)
- {
- ERR("Out of memory\n");
return DXFILEERR_BADALLOC;
- }
object->IDirectXFile_iface.lpVtbl = &IDirectXFile_Vtbl;
object->ref = 1;
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileBinaryImpl));
if (!object)
- {
- ERR("Out of memory\n");
return DXFILEERR_BADALLOC;
- }
object->IDirectXFileBinary_iface.lpVtbl = &IDirectXFileBinary_Vtbl;
object->ref = 1;
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileDataImpl));
if (!object)
- {
- ERR("Out of memory\n");
return DXFILEERR_BADALLOC;
- }
object->IDirectXFileData_iface.lpVtbl = &IDirectXFileData_Vtbl;
object->ref = 1;
if (!pGuid)
return DXFILEERR_BADVALUE;
- memcpy(pGuid, &This->pobj->class_id, 16);
+ *pGuid = This->pobj->class_id;
return DXFILE_OK;
}
if (!pguid)
return DXFILEERR_BADVALUE;
- memcpy(&guid, &This->pobj->type, 16);
+ guid = This->pobj->type;
*pguid = &guid;
return DXFILE_OK;
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileDataReferenceImpl));
if (!object)
- {
- ERR("Out of memory\n");
return DXFILEERR_BADALLOC;
- }
object->IDirectXFileDataReference_iface.lpVtbl = &IDirectXFileDataReference_Vtbl;
object->ref = 1;
if (!pGuid)
return DXFILEERR_BADVALUE;
- memcpy(pGuid, &This->ptarget->class_id, 16);
+ *pGuid = This->ptarget->class_id;
return DXFILE_OK;
}
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileEnumObjectImpl));
if (!object)
- {
- ERR("Out of memory\n");
return DXFILEERR_BADALLOC;
- }
object->IDirectXFileEnumObject_iface.lpVtbl = &IDirectXFileEnumObject_Vtbl;
object->ref = 1;
object->pobj = HeapAlloc(GetProcessHeap(), 0, sizeof(xobject)*MAX_SUBOBJECTS);
if (!object->pobj)
{
- ERR("Out of memory\n");
hr = DXFILEERR_BADALLOC;
goto error;
}
object->pstrings = HeapAlloc(GetProcessHeap(), 0, MAX_STRINGS_BUFFER);
if (!object->pstrings)
{
- ERR("Out of memory\n");
hr = DXFILEERR_BADALLOC;
goto error;
}
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileSaveObjectImpl));
if (!object)
- {
- ERR("Out of memory\n");
return DXFILEERR_BADALLOC;
- }
object->IDirectXFileSaveObject_iface.lpVtbl = &IDirectXFileSaveObject_Vtbl;
object->ref = 1;