The old wrap around technique when blitting in DOS (using memcpy) does not work in DirectDraw, instead, you have to blit the main area, then do two more blits to fill in the empty spaces above and to the side of the main blit, then you need to blit a forth surface to fill in the empty corner.
Also, make sure you clip the blits to the screen correctly, or your system may hang or get VERY slow, causing alot of INVALID_PARAM errors when using ->bltfast().
How ive done it..
I have made my own function called BlitFastClip() which automatically clips the blit to the screen no matter what co-ordinates I throw at it. This is very useful, as it eliminates excess calculations when bliting backgrounds and sprites.
Check out the FoxBear sample code in your DX3SDK package. It has the code to scroll backgrounds horizontally. All you have to do is modify the code so it will scroll vertical as well.