im trying to get just 1 pixels color from a surface in DX7 should i use the

getlockedpixel

or getlockedarray

DX4VB says getlockedarray is faster but im guessing that this is because you normally want to look at more that one pixel so my guess is getlockedpixel

also

VB Code:
  1. Sub ProcessMemory
  2. Dim Colour as Long
  3. Dim rArea as RECT
  4. Dim ddsd as DDSURFACEDESC2
  5.  
  6. rArea.Bottom=480:rArea.Right=640
  7.  
  8. MainSurf.Lock rArea,ddsd, DDLOCK_WAIT,0
  9. 'We now have access to the memory. From now until the Unlock you are treading
  10. 'on thin ice......
  11.  
  12. 'These are our two commands.
  13. Colour=Mainsurf.GetLockedPixel(100,120)
  14. Mainsurf.SetLockedPixel(100,120,Colour+10)
  15.  
  16. MainSurf.Unlock rArea
  17.  
  18. End Sub

the rectangle rArea in this procedure, when you use it in the mainsurf.lock statement is just locking the part of the surface that is in the rectangle right ?

last of all,
at the end of mainsurf.lock what is the ,0 for?

thanks for all your help