I must have a bad day to day, another error located at a COM call...
The code generates an exception (you see where and witch), why? (.images is an array of LPDIRECTDRAWSURFACEs)
; 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)
Use a debugger. EDI is most likely 0.
no, edi can't be 0. If that would be the case, the exception would have came earlier in the PROC.