Can anyone tell me why the statements in bold will not execute?
Code:
...
RESULT EFFECTS_API ConstructParticleSystem(HANDLE emitter,INT numParts, UpdateFunction* uFunc, HANDLE texture, HANDLE attach, DWORD param, HANDLE* PSys)
{
	RESULT r;
	IEmitter* em = NULL;
	GetObjectPointer(mod, emitter, OBJ_EMITTER, (CObject**)&em);
	if(em == NULL)
		return INVALIDEMITTER;
	if(em->EmitterType == IEmitter::_3D)
...
em is never set to NULL. Also, the parameter "emitter" in the function call shown is not preserved (it should be 0x440d001b, and it becomes 0x0000000a). The only reason I can imagine that this is happening is that, since this is in a DLL, it is getting loaded incorrectly... I have cleaned, and rebuilt several times, as well as rebuilding all of the DLLs that use this one. I can only imagine that somehow, some memory is getting overwritten, somehow...

Z.