I must have a bad day to day, another error located at a COM call...

; get pointer to the object
mov eax, [edi].images[ecx] ;=EXCEPTION_ACCESS_VIOLATION

; and use it to find the interface structure
mov edx, [eax]
; and then call that method
invoke vf(edx,IDirectDrawSurface,SetColorKey), DDCKEY_SRCBLT, addr color_key

The code generates an exception (you see where and witch), why? (.images is an array of LPDIRECTDRAWSURFACEs)
Posted on 2002-07-15 13:03:51 by scientica
Use a debugger. EDI is most likely 0.
Posted on 2002-07-15 13:38:17 by grv575
no, edi can't be 0. If that would be the case, the exception would have came earlier in the PROC.
Posted on 2002-07-15 13:42:17 by scientica