CopyBank problems (image2mem)

BlitzPlus Forums/BlitzPlus Programming/CopyBank problems (image2mem)

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Alrighty... so, we've got this here code below that's acting up. It works on one machine (an older laptop) and not on another (a gaming PC equipped with a 8800GTS). We figure it's a legacy issue or something, but we're wondering what you guys think.

The code is part of a larger blending code that we use for our intro. The code works for two of three images, and then decides to die in here on the last line, CopyBank. Ideas?

Thanks ahead of time, all help is greatly appreciated!

Function image2mem(video.video, image)
	video\image =image
	video\width =ImageWidth (image)
	video\height=ImageHeight(image)
	video\buffer=ImageBuffer(image)
	
	LockBuffer video\buffer
	
	video\format=LockedFormat(video\buffer)
	video\pitch =LockedPitch (video\buffer)
	video\pixels=LockedPixels(video\buffer)
	video\size=video\pitch*video\height

	UnlockBuffer video\buffer

	If video\bank<>0 Then FreeBank video\bank
	video\bank=CreateBank(video\size)

	CopyBank video\pixels,0,video\bank,0,video\size	;where the error happens!
End Function