ReactOS  0.4.15-dev-3439-g2693a26
caps_tests.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

 TEST (TestCaps("0", 0x0, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_OFFSCREENPLAIN", 0x40, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_OVERLAY", 0x80, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_PRIMARYSURFACE", 0x200, DD_OK, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_SYSTEMMEMORY", 0x800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0xa00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_TEXTURE", 0x1000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x1800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE", 0x2000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN", 0x2040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY", 0x2080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_PRIMARYSURFACE", 0x2200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY", 0x2800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x2840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_TEXTURE", 0x3000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x3800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_VIDEOMEMORY", 0x4000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x4040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x4080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x4200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x5000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY", 0x6000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x6040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x6080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x6200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x7000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x40800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x40840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x40880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x40a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x41800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x42800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x42840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x42880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x42a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x43800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO", 0x80000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN", 0x80040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY", 0x80080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE", 0x80200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY", 0x80800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x80840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x80880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x80a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE", 0x81000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x81800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO", 0x82000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN", 0x82040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY", 0x82080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE", 0x82200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY", 0x82800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x82840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x82880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x82a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE", 0x83000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x83800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_VIDEOMEMORY", 0x84000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x84040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x84080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x84200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x85000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_VIDEOMEMORY", 0x86000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x86040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x86080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x86200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x87000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0xc0800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0xc0840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0xc0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0xc0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0xc1800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0xc2800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0xc2840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0xc2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0xc2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0xc3800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC", 0x100000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN", 0x100040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY", 0x100080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE", 0x100200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_SYSTEMMEMORY", 0x100800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x100840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x100880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x100a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_TEXTURE", 0x101000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x101800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC", 0x102000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN", 0x102040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY", 0x102080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE", 0x102200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_SYSTEMMEMORY", 0x102800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x102840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x102880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x102a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_TEXTURE", 0x103000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x103800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_VIDEOMEMORY", 0x104000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x104040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x104080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x104200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x105000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_VIDEOMEMORY", 0x106000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x106040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x106080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x106200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x107000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x140800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x140840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x140880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x140a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x141800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x142800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x142840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x142880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x142a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x143800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO", 0x180000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN", 0x180040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY", 0x180080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE", 0x180200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY", 0x180800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x180840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x180880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x180a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE", 0x181000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x181800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO", 0x182000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN", 0x182040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY", 0x182080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE", 0x182200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY", 0x182800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x182840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x182880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x182a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE", 0x183000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x183800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_VIDEOMEMORY", 0x184000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x184040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x184080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x184200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x185000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_VIDEOMEMORY", 0x186000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x186040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x186080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x186200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x187000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x1c0800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x1c0840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x1c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x1c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x1c1800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x1c2800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x1c2840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x1c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x1c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x1c3800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_MODEX", 0x200000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN", 0x200040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY", 0x200080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE", 0x200200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY", 0x200800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x200840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x200880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x200a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x201000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x201800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX", 0x202000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN", 0x202040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY", 0x202080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE", 0x202200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY", 0x202800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x202840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x202880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x202a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x203000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x203800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x204000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x204040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x204080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x204200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x205000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x206000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x206040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x206080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x206200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x207000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x240800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x240840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x240880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x240a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x241800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x242800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x242840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x242880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x242a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x243800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX", 0x280000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN", 0x280040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY", 0x280080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE", 0x280200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY", 0x280800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x280840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x280880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x280a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x281000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x281800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX", 0x282000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN", 0x282040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY", 0x282080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE", 0x282200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY", 0x282800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x282840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x282880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x282a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x283000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x283800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x284000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x284040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x284080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x284200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x285000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x286000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x286040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x286080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x286200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x287000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x2c0800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x2c0840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x2c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x2c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x2c1800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x2c2800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x2c2840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x2c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x2c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x2c3800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX", 0x300000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN", 0x300040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY", 0x300080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE", 0x300200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY", 0x300800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x300840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x300880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x300a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x301000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x301800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX", 0x302000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN", 0x302040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY", 0x302080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE", 0x302200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY", 0x302800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x302840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x302880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x302a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x303000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x303800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x304000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x304040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x304080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x304200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x305000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x306000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x306040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x306080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x306200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x307000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x340800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x340840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x340880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x340a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x341800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x342800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x342840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x342880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x342a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x343800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX", 0x380000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN", 0x380040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY", 0x380080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE", 0x380200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY", 0x380800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x380840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x380880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x380a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x381000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x381800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX", 0x382000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN", 0x382040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY", 0x382080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE", 0x382200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY", 0x382800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY", 0x382840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY", 0x382880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x382a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x383000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x383800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x384000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x384040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x384080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x384200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x385000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x386000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x386040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x386080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x386200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x387000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x3c0800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x3c0840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x3c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x3c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x3c1800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x3c2800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x3c2840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY", 0x3c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY", 0x3c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x3c3800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_TEXTURE", 0x4001000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4001800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_TEXTURE", 0x4003000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4003800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4005000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4007000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4041800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4043800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE", 0x4081000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4081800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE", 0x4083000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4083800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4085000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4087000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40c1800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40c3800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_TEXTURE", 0x4101000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4101800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_TEXTURE", 0x4103000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4103800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4105000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4107000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4141800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4143800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE", 0x4181000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4181800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE", 0x4183000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4183800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4185000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4187000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x41c1800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x41c3800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x4201000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4201800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x4203000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4203800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4205000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4207000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4241800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4243800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x4281000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4281800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x4283000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4283800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4285000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4287000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x42c1800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x42c3800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x4301000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4301800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x4303000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4303800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4305000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4307000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4341800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4343800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x4381000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4381800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE", 0x4383000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x4383800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4385000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x4387000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x43c1800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x43c3800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_VIDEOPORT", 0x8000000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8000040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8000080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8000200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8000800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8000840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8000880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8000a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8001000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8001800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_VIDEOPORT", 0x8002000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8002040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8002080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8002200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8002800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8002840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8002880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8002a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8003000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8003800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8004000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8004040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8004080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8004200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8005000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8006000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8006040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8006080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8006200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8007000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8040800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8040840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8040880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8040a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8041800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8042800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8042840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8042880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8042a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8043800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_VIDEOPORT", 0x8080000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8080040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8080080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8080200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8080800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8080840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8080880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8080a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8081000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8081800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_VIDEOPORT", 0x8082000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8082040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8082080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8082200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8082800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8082840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8082880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8082a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8083000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8083800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8084000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8084040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8084080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8084200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8085000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8086000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8086040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8086080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8086200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8087000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x80c0800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x80c0840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x80c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x80c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x80c1800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x80c2800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x80c2840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x80c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x80c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x80c3800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_VIDEOPORT", 0x8100000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8100040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8100080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8100200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8100800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8100840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8100880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8100a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8101000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8101800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_VIDEOPORT", 0x8102000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8102040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8102080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8102200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8102800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8102840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8102880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8102a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8103000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8103800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8104000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8104040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8104080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8104200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8105000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8106000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8106040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8106080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8106200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8107000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8140800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8140840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8140880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8140a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8141800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8142800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8142840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8142880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8142a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8143800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_VIDEOPORT", 0x8180000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8180040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8180080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8180200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8180800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8180840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8180880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8180a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8181000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8181800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_VIDEOPORT", 0x8182000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8182040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8182080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8182200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8182800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8182840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8182880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8182a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8183000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8183800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8184000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8184040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8184080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8184200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8185000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8186000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8186040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8186080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8186200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8187000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x81c0800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x81c0840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x81c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x81c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x81c1800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x81c2800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x81c2840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x81c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x81c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x81c3800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_VIDEOPORT", 0x8200000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8200040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8200080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8200200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8200800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8200840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8200880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8200a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8201000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8201800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_VIDEOPORT", 0x8202000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8202040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8202080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8202200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8202800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8202840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8202880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8202a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8203000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8203800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8204000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8204040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8204080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8204200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8205000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8206000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8206040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8206080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8206200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8207000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8240800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8240840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8240880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8240a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8241800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8242800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8242840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8242880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8242a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8243800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_VIDEOPORT", 0x8280000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8280040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8280080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8280200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8280800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8280840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8280880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8280a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8281000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8281800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_VIDEOPORT", 0x8282000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8282040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8282080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8282200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8282800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8282840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8282880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8282a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8283000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8283800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8284000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8284040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8284080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8284200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8285000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8286000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8286040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8286080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8286200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8287000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x82c0800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x82c0840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x82c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x82c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x82c1800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x82c2800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x82c2840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x82c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x82c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x82c3800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_VIDEOPORT", 0x8300000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8300040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8300080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8300200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8300800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8300840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8300880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8300a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8301000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8301800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_VIDEOPORT", 0x8302000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8302040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8302080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8302200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8302800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8302840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8302880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8302a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8303000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8303800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8304000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8304040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8304080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8304200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8305000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8306000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8306040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8306080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8306200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8307000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8340800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8340840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8340880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8340a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8341800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8342800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8342840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8342880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8342a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8343800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_VIDEOPORT", 0x8380000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8380040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8380080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8380200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8380800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8380840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8380880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8380a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8381000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8381800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_VIDEOPORT", 0x8382000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOPORT", 0x8382040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOPORT", 0x8382080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOPORT", 0x8382200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8382800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8382840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8382880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x8382a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8383000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x8383800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8384000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8384040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8384080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8384200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8385000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8386000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8386040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8386080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8386200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x8387000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x83c0800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x83c0840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x83c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x83c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x83c1800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x83c2800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x83c2840, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x83c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x83c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x83c3800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc001000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc001800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc003000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc003800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc005000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc007000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc041800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc043800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc081000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc081800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc083000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc083800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc085000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc087000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc0c1800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc0c3800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc101000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc101800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc103000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc103800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc105000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc107000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc141800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc143800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc181000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc181800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc183000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc183800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc185000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc187000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc1c1800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc1c3800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc201000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc201800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc203000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc203800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc205000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc207000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc241800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc243800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc281000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc281800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc283000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc283800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc285000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc287000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc2c1800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc2c3800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc301000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc301800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc303000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc303800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc305000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc307000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc341800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc343800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc381000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc381800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc383000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc383800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc385000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0xc387000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc3c1800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0xc3c3800, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x10004000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10004040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10004080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10004200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10005000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x10006000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10006040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10006080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10006200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10007000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x10084000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10084040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10084080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10084200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10085000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x10086000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10086040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10086080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10086200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10087000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x10104000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10104040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10104080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10104200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10105000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x10106000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10106040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10106080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10106200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10107000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x10184000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10184040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10184080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10184200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10185000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x10186000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10186040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10186080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10186200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10187000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x10204000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10204040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10204080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10204200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10205000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x10206000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10206040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10206080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10206200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10207000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x10284000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10284040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10284080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10284200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10285000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x10286000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10286040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10286080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10286200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10287000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x10304000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10304040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10304080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10304200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10305000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x10306000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10306040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10306080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10306200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10307000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x10384000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10384040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10384080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10384200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10385000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY", 0x10386000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x10386040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x10386080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x10386200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x10387000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14005000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14007000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14085000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14087000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14105000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14107000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14185000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14187000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14205000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14207000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14285000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14287000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14305000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14307000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14385000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x14387000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18004000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18004040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18004080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18004200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18005000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18006000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18006040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18006080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18006200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18007000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18084000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18084040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18084080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18084200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18085000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18086000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18086040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18086080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18086200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18087000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18104000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18104040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18104080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18104200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18105000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18106000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18106040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18106080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18106200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18107000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18184000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18184040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18184080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18184200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18185000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18186000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18186040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18186080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18186200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18187000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18204000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18204040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18204080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18204200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18205000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18206000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18206040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18206080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18206200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18207000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18284000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18284040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18284080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18284200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18285000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18286000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18286040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18286080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18286200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18287000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18304000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18304040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18304080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18304200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18305000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18306000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18306040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18306080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18306200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18307000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18384000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18384040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18384080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18384200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18385000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18386000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18386040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18386080, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18386200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x18387000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c005000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c007000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c085000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c087000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c105000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c107000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c185000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c187000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c205000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c207000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c285000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c287000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c305000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c307000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c385000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x1c387000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20004000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20004040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20004080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20004200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20005000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20006000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20006040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20006080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20006200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20007000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20084000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20084040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20084080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20084200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20085000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20086000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20086040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20086080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20086200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20087000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20104000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20104040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20104080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20104200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS))
 
 TEST (TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20105000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20106000, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20106040, DDERR_INVALIDPARAMS, DD_OK))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20106080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT))
 
 TEST (TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM |