Techwiki:Win32k/GRAPHICS DEVICE

From ReactOS Wiki
Revision as of 04:35, 12 August 2009 by ThePhysicist (talk | contribs)
Jump to: navigation, search

Windows XP version of GRAPHICS_DEVICE, tag is 'Ggdv' aka GDITAG_GDEVICE.

typedef struct _GRAPHICS_DEVICE
{
   WCHAR            szNtDeviceName[CCHDEVICENAME/2];  // 000
   WCHAR            szWinDeviceName[CCHDEVICENAME/2]; // 020
   PGRAPHICS_DEVICE pNextGraphicsDevice;              // 040
   PGRAPHICS_DEVICE pVgaDevice;                       // 044
   PDEVICE_OBJECT   DeviceObject;                     // 048
   HANDLE           pDeviceHandle;                    // 04C
   DWORD            hkClassDriverConfig;              // 050
   DWORD            StateFlags;                       // 054
   DWORD            cbdevmodeInfo;                    // 058
   PVOID            devmodeInfo;                      // 05C
   DWORD            cbdevmodeInfo1;                   // 060
   PVOID            devmodeInfo1;                     // 064
   LPWSTR           pwszDeviceNames;                  // 068 tag is 'Gdrs' = GDITAG_DRVSUP
   LPWSTR           pwszDescription;                  // 06C tag is 'Gdrs' = GDITAG_DRVSUP
   DWORD            dwUnknown                         // 070
   PVOID            pUnknown;                         // 074 tag is 'Ggdv' = GDITAG_GDEVICE
   PFILE_OBJECT     FileObject;                       // 078
   DWORD            ProtocolType;                     // 07C
} GRAPHICS_DEVICE, *PGRAPHICS_DEVICE;

szNtDeviceName

Name of the device, for example "\\Device\\Video". A registry entry with this name is present under the HKLM\HARDWARE\DEVICEMAP\VIDEO registry key. This entry is of type REG_SZ and contains the registry path for the display settings (for example "\Registry\Machine\System\CurrentControlSet\Control\Video\{19D0ECD0-F5D9-4A4B-8005-36253C8D799D}\0000").

szWinDeviceName

L"\\\\.\\DISPLAY1" or L"\\\\.\\DISPLAY2", == DISPLAY_DEVICE.DeviceName. This is what a caller would pass to NtGdiOpenDCW.

StateFlags

== DISPLAY_DEVICE.StateFlags
can be one of
#define DISPLAY_DEVICE_ATTACHED_TO_DESKTOP 0x00000001
#define DISPLAY_DEVICE_MULTI_DRIVER        0x00000002
#define DISPLAY_DEVICE_PRIMARY_DEVICE      0x00000004
#define DISPLAY_DEVICE_MIRRORING_DRIVER    0x00000008
#define DISPLAY_DEVICE_VGA_COMPATIBLE      0x00000010
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
#define DISPLAY_DEVICE_REMOVABLE           0x00000020
#endif // (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
#define DISPLAY_DEVICE_MODESPRUNED         0x08000000
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
#define DISPLAY_DEVICE_REMOTE              0x04000000
#define DISPLAY_DEVICE_DISCONNECT          0x02000000
#endif
#define DISPLAY_DEVICE_TS_COMPATIBLE       0x00200000
#if (_WIN32_WINNT >= _WIN32_WINNT_LONGHORN)
#define DISPLAY_DEVICE_UNSAFE_MODES_ON     0x00080000
#endif
/* Child device state */
#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
#define DISPLAY_DEVICE_ACTIVE              0x00000001
#define DISPLAY_DEVICE_ATTACHED            0x00000002
#endif // (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)


cbdevmodeInfo1

Copy of devmodeInfo?

pDeviceString

DISPLAY_DEVICE.DeviceString, like "nv4disp"