Рис. А.12. Окно DirectDraw Advanced Settings
При максимальном уровне отладки каждое приложение DirectDraw, запущенное в отладчике, выдает весьма обширный и подробный протокол. Вывод протокола снижает быстродействие программы, так что максимальный уровень не стоит держать включенным постоянно. С другой стороны, он сильно помогает в затяжной борьбе с DirectDraw. Чтобы показать, насколько подробная информация выдается при максимальном уровне отладки, я приведу отладочный протокол для небольшого полноэкранного приложения DirectDraw. Обратите внимание на то, что листинг раскрывает некоторые внутренние тонкости работы DirectDraw. Подробный отладочный протокол приведен в листинге А.1.
Листинг А.1. Подробный отладочный протокол DirectDraw
DDraw:====> ENTER: DLLMAIN(baaa12c0): Process Attach: fff00c89, tid=fff04bf1
DDraw:Thunk connects
DDraw:Signalling DDHELP that a new process has connected
DDraw:====> EXIT: DLLMAIN(baaa12c0): Process Attach: fff00c89
DDraw:createDC(R3D)
DDraw:Enumerating GUID aba52f41-f744-11cf-b4-52-00-00-1d-1b-41-26
DDraw: Driver Name = R3D
DDraw: Description = Righteous 3D DirectX II Driver
DDraw:DeleteDC 0x179e
DDraw:createDC(mm3dfx)
DDraw:Enumerating GUID 3a0cfd01-9320-11cf-ac-a1-00-a0-24-13-c2-e2
DDraw: Driver Name = mm3dfx
DDraw: Description = 3Dfx Interactive DirectX Driver
DDraw:DeleteDC 0x179e
DDraw:Only one Display device in the current system.
DDraw:DirectDrawCreate entered
DDraw: GUID *:00000000, LPLPDD:0064f870, pUnkOuter:00000000
DDraw:Registry already scanned, not doing it again
DDraw:full name = C:SAMPLEDEBUGSAMPLE.EXE
DDraw:name = SAMPLE.EXE
DDraw:DirectDrawCreate: pid = fff00c89
DDraw:Reading Registry
DDraw: ModeXOnly: 0
DDraw: EmulationOnly: 0
DDraw: ShowFrameRate: 0
DDraw: EnablePrintScreen: 0
DDraw: DisableMMX: 0
DDraw: DisableWiderSurfaces:0
DDraw: DisableNoSysLock:0
DDraw: ForceNoSysLock:0
DDraw:Signalling DDHELP to create a new DC
DDraw:createDC(display)
DDraw:DIRECTDRAW driver is wrong version, got 0x5250, expected 0x0100
DDraw:getDisplayMode:
DDraw: bpp=8, refresh=0
DDraw: dwHeight=600, dwWidth=800
DDraw: lStride=0
DDraw:Driver says nummodes=9
DDraw:Enum Display Settings says nummodes=9
DDraw:dwModeIndex = 1
DDraw:Masks for current mode are: 00000000 00000000 00000000
DDraw:DirectDrawObjectCreate: oldpdd == 00000000, reset=0
DDraw:DIRECTDRAW object passed in = 00000000
DDraw:oldpdd == 00000000, reset=0
DDraw:Driver Object: 2256 base bytes
DDraw:dwReserved3 of DDrawGbl is set to 0x0
DDraw:oldpdd == NULL || reset
DDraw:Driver can't blt
DDraw:pddd->lp16DD = 40cf0000
DDraw:Adding ModeX mode 320x200x8 (standard VGA flag is 0)
DDraw:Adding ModeX mode 320x240x8 (standard VGA flag is 0)
DDraw:Adding ModeX mode 320x200x8 (standard VGA flag is 1)
DDraw:All video memory heaps have been disabled. OS has no AGP support
DDraw:Current and Original Mode = 1
DDraw:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ MODE INDEX = 1
DDraw:DDHALInfo contains D3D pointers: 00000000 00000000
DDraw:createDC(display)
DDraw:NOT Setting DDCAPS_BANKSWITCHED
DDraw:DeleteDC 0x179e
DDraw:Taking the Win16 lock may not be necessary for VRAM locks
DDraw:DirectDrawObjectCreate: Returning global object 82dc11f8
DDraw:createDC(display)
DDraw:createDC(display)
DDraw:DeleteDC 0x175e
DDraw:DeleteDC 0x179e
DDraw:Primary's rect is 0, 0, 800, 600
DDraw:HELInit for DISPLAY Driver: Reference Count = 1
DDraw:createDC(display)
DDraw:DeleteDC 0x179e
DDraw:createDC(display)
DDraw:createDC(display)
DDraw:DeleteDC 0x175e
DDraw:DeleteDC 0x179e
DDraw:***New local allocated 82dc1b1c for global pdrv 82dc11f8
DDraw:New driver object created, interface ptr = 82dc1b84
DDraw: DirectDrawCreate succeeds, and returns ddraw pointer 82dc1b84
DDraw:New driver interface created, 82dc1bb0
DDraw:DD_AddRef, pid=fff00c89, obj=82dc1bb0
DDraw:DD_AddRef, Reference Count: Global = 2 Local = 2 Int = 1
DDraw:DD_Release, pid=fff00c89, obj=82dc1b84
DDraw:DD_Release, Ref Count: Global = 1 Local = 1 Interface = 0
DDraw:*********** ALLOWING MODE X AND VGA MODES
DDraw:DD_GetDeviceRect: display [0 0 800 600]
DDraw:Subclassing window 00000aac
DDraw:StartExclusiveMode
DDraw:******** invalidating all surfaces
DDraw:Enumerating mode 0. 640x480
DDraw:Enumerating mode 1. 800x600
DDraw:Enumerating mode 2. 1024x768
DDraw:Enumerating mode 3. 1280x1024