hello jcl,
i've got a question: i want to use the sdk to create a dll which replaces a mesh of a given entity. the dll is to be used with a7. the mesh is created with D3DXCreateMeshFVF, the flags are set to D3DXMESH_MANAGED | D3DXMESH_32BIT and the vertex format is the one described in the manual (D3DFVF_TLSHADED). the mesh is then set to the entity via ent_setmesh(entity, mesh, 0, 0). this process works properly.
now, when i delete the mesh, i call mesh->Release() and ent_setmesh(entity, NULL, 0, 0). now, when i have multiple entities sharing the same mesh, i have to call that only for the last entity, obviously. but now, for the last entity, the dll crashes. i took out mesh->Release() and it didn't crash - one time. the next time i tried it crashed again. it also crashed when i just closed the engine window, even though i'm calling Release() for all meshes i created in DLL_PROCESS_DETACH. here again, it worked once by taking out ent_setmesh, crashed again, i took out the Release-stuff and it worked one time but then crashed.
could it be that the error comes from the mesh format, a different dx sdk version (i'm using april 08), or... well, i'm somehow stuck here because sometimes the crash happens in the engine (ent_setmesh) and sometimes in the dll (Release).
i'd be very grateful for any hint you might have.