Unfortunately I've never actually had to use those before. I'll look them up. Which one would be best in this case?
On Thu, 2004-07-08 at 15:39, Mike McCormack wrote:
You probably want to use a Windows method to allocate memory here, such as HeapAlloc() or CoTaskMemAlloc, as the caller is not going to use free() to free the memory...
Mike
Andrei Barbu wrote:
Changelog:
Fixes a memory access fault inside of D3D8_GetCreationParameters.
...
HRESULT WINAPI IDirect3DDevice8Impl_GetCreationParameters(LPDIRECT3DDEVICE8 iface, D3DDEVICE_CREATION_PARAMETERS *pParameters) { ICOM_THIS(IDirect3DDevice8Impl,iface); TRACE("(%p) copying to %p\n", This, pParameters);
- pParameters = (D3DDEVICE_CREATION_PARAMETERS*) malloc( sizeof( D3DDEVICE_CREATION_PARAMETERS )); memcpy(pParameters, &This->CreateParms, sizeof(D3DDEVICE_CREATION_PARAMETERS)); return D3D_OK;
}