reactos/rostests/dxtest/ddraw/Surface/caps_tests.h

2312 lines
388 KiB
C
Raw Normal View History

/*
* The following test cases have been generated automatically. Many of them might be
* redundant. Also some of them might fail on other other machines then the one I
* used (win xp, nvidea, 32 bit color deepth) - mbosma
*
*/
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 | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20106200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20107000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20184000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20184040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20184080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20184200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20185000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20186000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20186040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20186080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20186200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20187000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20204000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20204040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20204080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20204200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20205000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20206000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20206040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20206080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20206200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20207000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20284000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20284040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20284080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20284200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20285000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20286000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20286040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20286080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20286200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20287000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20304000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20304040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20304080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20304200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20305000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20306000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20306040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20306080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20306200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20307000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20384000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20384040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20384080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20384200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20385000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY", 0x20386000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY", 0x20386040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY", 0x20386080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY", 0x20386200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x20387000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24005000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24007000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24085000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24087000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24105000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24107000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24185000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24187000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24205000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24207000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24285000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24287000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24305000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24307000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24385000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x24387000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28004000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28004040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28004080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28004200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28005000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28006000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28006040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28006080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28006200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28007000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28084000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28084040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28084080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28084200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28085000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28086000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28086040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28086080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28086200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28087000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28104000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28104040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28104080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28104200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28105000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28106000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28106040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28106080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28106200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28107000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28184000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28184040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28184080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28184200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28185000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28186000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28186040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28186080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28186200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28187000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28204000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28204040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28204080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28204200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28205000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28206000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28206040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28206080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28206200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28207000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28284000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28284040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28284080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28284200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28285000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28286000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28286040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28286080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28286200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28287000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28304000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28304040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28304080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28304200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28305000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28306000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28306040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28306080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28306200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28307000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28384000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28384040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28384080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28384200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28385000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28386000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28386040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28386080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28386200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x28387000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c005000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c007000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c085000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c087000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c105000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c107000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c185000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c187000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c205000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c207000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c285000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c287000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c305000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c307000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c385000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x2c387000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_STANDARDVGAMODE", 0x40000000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40000040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40000080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40000200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40000800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40000840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40000880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40000a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40001000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40001800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_STANDARDVGAMODE", 0x40002000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40002040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40002080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40002200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40002800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40002840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40002880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40002a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40003000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40003800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40004000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40004040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40004080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40004200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40005000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40006000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40006040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40006080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40006200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40007000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40040800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40040840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40040880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40040a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40041800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40042800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40042840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40042880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40042a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40043800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE", 0x40080000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40080040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40080080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40080200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40080800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40080840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40080880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40080a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40081000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40081800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE", 0x40082000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40082040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40082080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40082200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40082800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40082840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40082880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40082a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40083000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40083800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40084000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40084040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40084080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40084200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40085000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40086000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40086040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40086080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40086200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40087000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x400c0800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x400c0840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x400c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x400c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x400c1800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x400c2800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x400c2840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x400c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x400c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x400c3800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE", 0x40100000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40100040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40100080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40100200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40100800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40100840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40100880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40100a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40101000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40101800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE", 0x40102000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40102040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40102080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40102200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40102800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40102840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40102880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40102a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40103000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40103800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40104000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40104040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40104080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40104200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40105000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40106000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40106040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40106080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40106200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40107000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40140800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40140840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40140880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40140a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40141800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40142800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40142840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40142880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40142a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40143800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE", 0x40180000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40180040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40180080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40180200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40180800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40180840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40180880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40180a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40181000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40181800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE", 0x40182000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40182040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40182080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40182200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40182800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40182840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40182880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40182a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40183000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40183800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40184000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40184040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40184080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40184200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40185000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40186000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40186040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40186080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40186200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40187000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x401c0800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x401c0840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x401c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x401c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x401c1800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x401c2800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x401c2840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x401c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x401c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x401c3800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE", 0x40200000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40200040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40200080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40200200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40200800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40200840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40200880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40200a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40201000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40201800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE", 0x40202000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40202040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40202080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40202200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40202800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40202840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40202880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40202a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40203000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40203800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40204000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40204040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40204080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40204200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40205000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40206000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40206040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40206080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40206200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40207000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40240800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40240840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40240880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40240a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40241800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40242800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40242840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40242880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40242a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40243800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE", 0x40280000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40280040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40280080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40280200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40280800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40280840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40280880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40280a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40281000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40281800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE", 0x40282000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40282040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40282080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40282200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40282800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40282840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40282880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40282a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40283000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40283800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40284000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40284040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40284080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40284200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40285000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40286000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40286040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40286080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40286200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40287000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x402c0800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x402c0840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x402c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x402c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x402c1800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x402c2800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x402c2840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x402c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x402c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x402c3800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE", 0x40300000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40300040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40300080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40300200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40300800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40300840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40300880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40300a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40301000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40301800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE", 0x40302000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40302040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40302080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40302200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40302800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40302840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40302880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40302a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40303000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40303800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40304000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40304040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40304080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40304200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40305000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40306000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40306040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40306080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40306200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40307000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40340800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40340840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40340880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40340a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40341800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40342800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40342840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40342880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40342a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40343800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE", 0x40380000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40380040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40380080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40380200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40380800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40380840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40380880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40380a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40381000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40381800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE", 0x40382000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE", 0x40382040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE", 0x40382080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE", 0x40382200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40382800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40382840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40382880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x40382a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x40383000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x40383800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40384000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40384040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40384080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40384200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40385000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40386000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40386040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40386080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x40386200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x40387000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x403c0800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x403c0840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x403c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x403c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x403c1800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x403c2800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x403c2840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x403c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY", 0x403c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x403c3800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44001000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44001800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44003000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44003800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44005000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44007000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44041800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44043800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44081000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44081800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44083000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44083800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44085000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44087000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x440c1800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x440c3800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44101000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44101800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44103000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44103800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44105000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44107000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44141800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44143800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44181000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44181800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44183000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44183800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44185000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44187000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x441c1800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x441c3800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44201000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44201800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44203000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44203800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44205000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44207000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44241800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44243800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44281000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44281800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44283000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44283800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44285000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44287000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x442c1800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x442c3800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44301000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44301800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44303000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44303800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44305000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44307000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44341800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44343800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44381000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44381800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE", 0x44383000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x44383800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44385000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x44387000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x443c1800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE", 0x443c3800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48000000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48000040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48000080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48000200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48000800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48000840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48000880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48000a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48001000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48001800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48002000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48002040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48002080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48002200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48002800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48002840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48002880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48002a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48003000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48003800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48004000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48004040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48004080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48004200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48005000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48006000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48006040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48006080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48006200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48007000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48040800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48040840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48040880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48040a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48041800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48042800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48042840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48042880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48042a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48043800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48080000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48080040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48080080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48080200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48080800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48080840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48080880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48080a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48081000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48081800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48082000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48082040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48082080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48082200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48082800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48082840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48082880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48082a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48083000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48083800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48084000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48084040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48084080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48084200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48085000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48086000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48086040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48086080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48086200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48087000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x480c0800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x480c0840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x480c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x480c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x480c1800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x480c2800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x480c2840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x480c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x480c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x480c3800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48100000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48100040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48100080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48100200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48100800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48100840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48100880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48100a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48101000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48101800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48102000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48102040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48102080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48102200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48102800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48102840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48102880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48102a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48103000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48103800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48104000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48104040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48104080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48104200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48105000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48106000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48106040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48106080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48106200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48107000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48140800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48140840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48140880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48140a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48141800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48142800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48142840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48142880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48142a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48143800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48180000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48180040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48180080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48180200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48180800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48180840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48180880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48180a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48181000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48181800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48182000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48182040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48182080, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48182200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48182800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48182840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48182880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48182a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48183000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48183800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48184000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48184040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48184080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48184200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48185000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48186000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48186040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48186080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48186200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48187000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x481c0800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x481c0840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x481c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x481c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x481c1800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x481c2800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x481c2840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x481c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x481c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x481c3800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48200000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48200040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48200080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48200200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48200800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48200840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48200880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48200a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48201000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48201800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48202000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48202040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48202080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48202200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48202800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48202840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48202880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48202a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48203000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48203800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48204000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48204040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48204080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48204200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48205000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48206000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48206040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48206080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48206200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48207000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48240800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48240840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48240880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48240a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48241800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48242800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48242840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48242880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48242a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48243800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48280000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48280040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48280080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48280200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48280800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48280840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48280880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48280a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48281000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48281800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48282000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48282040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48282080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48282200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48282800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48282840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48282880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48282a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48283000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48283800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48284000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48284040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48284080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48284200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48285000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48286000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48286040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48286080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48286200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48287000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x482c0800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x482c0840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x482c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x482c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x482c1800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x482c2800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x482c2840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x482c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x482c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x482c3800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48300000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48300040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48300080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48300200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48300800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48300840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48300880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48300a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48301000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48301800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48302000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48302040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48302080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48302200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48302800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48302840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48302880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48302a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48303000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48303800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48304000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48304040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48304080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48304200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48305000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48306000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48306040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48306080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48306200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48307000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48340800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48340840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48340880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48340a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48341800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48342800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48342840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48342880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48342a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48343800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48380000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48380040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48380080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48380200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48380800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48380840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48380880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48380a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48381000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48381800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48382000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48382040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48382080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOPORT", 0x48382200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48382800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48382840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48382880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x48382a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48383000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x48383800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48384000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48384040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48384080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48384200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48385000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48386000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48386040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48386080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48386200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x48387000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x483c0800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x483c0840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x483c0880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x483c0a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x483c1800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x483c2800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x483c2840, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x483c2880, DDERR_INVALIDPARAMS, DDERR_NOOVERLAYHW));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_VIDEOPORT", 0x483c2a00, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x483c3800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c001000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c001800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c003000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c003800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c005000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c007000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c041800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c043800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c081000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c081800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c083000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c083800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c085000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c087000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c0c1800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c0c3800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c101000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c101800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c103000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c103800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c105000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c107000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c141800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c143800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c181000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c181800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c183000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c183800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c185000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c187000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c1c1800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c1c3800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c201000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c201800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c203000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c203800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c205000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c207000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c241800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c243800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c281000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c281800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c283000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c283800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c285000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c287000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c2c1800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c2c3800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c301000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c301800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c303000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c303800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c305000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c307000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c341800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c343800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c381000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c381800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c383000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c383800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c385000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x4c387000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c3c1800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_OWNDC | DDSCAPS_STANDARDVGAMODE | DDSCAPS_SYSTEMMEMORY | DDSCAPS_TEXTURE | DDSCAPS_VIDEOPORT", 0x4c3c3800, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50004000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50004040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50004080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50004200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50005000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50006000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50006040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50006080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50006200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50007000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50084000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50084040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50084080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50084200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50085000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50086000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50086040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50086080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50086200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50087000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50104000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50104040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50104080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50104200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50105000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50106000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50106040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50106080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50106200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50107000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50184000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50184040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50184080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50184200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50185000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50186000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50186040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50186080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50186200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50187000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50204000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50204040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50204080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50204200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50205000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50206000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50206040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50206080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50206200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50207000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50284000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50284040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50284080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50284200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50285000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50286000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50286040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50286080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50286200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50287000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50304000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50304040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50304080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50304200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50305000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50306000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50306040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50306080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50306200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50307000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50384000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50384040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50384080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50384200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50385000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50386000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50386040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50386080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x50386200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x50387000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54005000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54007000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54085000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54087000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54105000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54107000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54185000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54187000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54205000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54207000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54285000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54287000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54305000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54307000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54385000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x54387000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58004000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58004040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58004080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58004200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58005000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58006000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58006040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58006080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58006200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58007000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58084000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58084040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58084080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58084200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58085000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58086000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58086040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58086080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58086200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58087000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58104000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58104040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58104080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58104200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58105000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58106000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58106040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58106080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58106200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58107000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58184000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58184040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58184080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58184200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58185000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58186000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58186040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58186080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58186200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58187000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58204000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58204040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58204080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58204200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58205000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58206000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58206040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58206080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58206200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58207000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58284000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58284040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58284080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58284200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58285000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58286000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58286040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58286080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58286200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58287000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58304000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58304040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58304080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58304200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58305000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58306000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58306040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58306080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58306200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58307000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58384000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58384040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58384080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58384200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58385000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58386000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58386040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58386080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58386200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x58387000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c005000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c007000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c085000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c087000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c105000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c107000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c185000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c187000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c205000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c207000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c285000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c287000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c305000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c307000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c385000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_LOCALVIDMEM | DDSCAPS_MODEX | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x5c387000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60004000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60004040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60004080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60004200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60005000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60006000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60006040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60006080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60006200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60007000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60084000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60084040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60084080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60084200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60085000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60086000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60086040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60086080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60086200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60087000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60104000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60104040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60104080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60104200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60105000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60106000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60106040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60106080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60106200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60107000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60184000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60184040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60184080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60184200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60185000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60186000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60186040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60186080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60186200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60187000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60204000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60204040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60204080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60204200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60205000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60206000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60206040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60206080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60206200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60207000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60284000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60284040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60284080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60284200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60285000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60286000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60286040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60286080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60286200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60287000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60304000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60304040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60304080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60304200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60305000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60306000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60306040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60306080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60306200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60307000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60384000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60384040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60384080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60384200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60385000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60386000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60386040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60386080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY", 0x60386200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x60387000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64005000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64007000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64085000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64087000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64105000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64107000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64185000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64187000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64205000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64207000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64285000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64287000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64305000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64307000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64385000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY", 0x64387000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68004000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68004040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68004080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68004200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68005000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68006000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68006040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68006080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68006200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68007000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68084000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68084040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68084080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68084200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68085000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68086000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68086040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68086080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68086200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68087000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68104000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68104040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68104080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68104200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68105000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68106000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68106040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68106080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68106200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68107000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68184000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68184040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68184080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68184200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68185000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68186000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68186040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68186080, DDERR_INVALIDPARAMS, DDERR_INVALIDPIXELFORMAT));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68186200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68187000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68204000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68204040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68204080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68204200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68205000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68206000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68206040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68206080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68206200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68207000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68284000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68284040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68284080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68284200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68285000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68286000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68286040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68286080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68286200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68287000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68304000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68304040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68304080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68304200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68305000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68306000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68306040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68306080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68306200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68307000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68384000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68384040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68384080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68384200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68385000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68386000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OFFSCREENPLAIN | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68386040, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_OVERLAY | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68386080, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_PRIMARYSURFACE | DDSCAPS_STANDARDVGAMODE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68386200, DDERR_PRIMARYSURFACEALREADYEXISTS, DDERR_INVALIDPARAMS));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x68387000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c005000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c007000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c085000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c087000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c105000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c107000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c185000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c187000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c205000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c207000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c285000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c287000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c305000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c307000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c385000, DDERR_INVALIDPARAMS, DD_OK));
TEST(TestCaps("DDSCAPS_3DDEVICE | DDSCAPS_ALLOCONLOAD | DDSCAPS_HWCODEC | DDSCAPS_LIVEVIDEO | DDSCAPS_MODEX | DDSCAPS_NONLOCALVIDMEM | DDSCAPS_STANDARDVGAMODE | DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_VIDEOPORT", 0x6c387000, DDERR_INVALIDPARAMS, DD_OK));