Al Tobey <tobert <at> gmail.com> writes: > > Here is the new patch. I did some additional testing and couldn't > get the same app to fail on that function again. It still works with > this new patch, so I'm assuming for now that it's correct. Anyways, > thanks again.
Hi Al, Almost got it this time :) You should be checking that pParameters is not NULL, not &This->createParms. Note that if This is not-NULL, &This->creatParms will be not null as well since you are just getting the address of a struct. Also on failure, according to MSDN, you shoudl be returning D3DERR_INVALIDCALL not OUTOFVIDEOMEMORY. Probably the following would be most correct: --- { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; if (This == NULL || pParameters == NULL) return D3DERR_INVALIDCALL; memcpy(pParameters, &This->createParms, sizeof(D3DDEVICE_CREATION_PARAMETERS)); return D3D_OK; } --- Regards, Aric