--- /dev/null
+[Version]
+Signature="$ReactOS$"
+
+[AddReg]
+
+; Internet Explorer
+HKLM,"SOFTWARE\Microsoft\Internet Explorer","Build",,"62800"
+HKLM,"SOFTWARE\Microsoft\Internet Explorer","Version",,"6.0.2800.3959"
+HKLM,"SOFTWARE\Microsoft\Internet Explorer","W2kVersion",,"6.0.2800.3959"
+
+HKLM,"SOFTWARE\Classes\Applications\iexplore.exe","",0x00000000,""
+HKLM,"SOFTWARE\Classes\Applications\iexplore.exe\shell\open\command","",0x00000000,"""%programfiles%\Internet Explorer\iexplore.exe"" %1"
+
+HKLM,"SOFTWARE\Classes\ftp","",0x00000000,"URL:File Transfer Protocol"
+HKLM,"SOFTWARE\Classes\ftp\Source Filter","",0x00000000,"{E436EBB6-524F-11CE-9F53-0020AF0BA770}"
+HKLM,"SOFTWARE\Classes\ftp\URL Protocol","",0x00000000,""
+HKLM,"SOFTWARE\Classes\ftp\shell\open\command","",0x00000000,"""%programfiles%\Internet Explorer\iexplore.exe"" %1"
+
+HKLM,"SOFTWARE\Classes\gopher","",0x00000000,"URL:Gopher Protocol"
+HKLM,"SOFTWARE\Classes\gopher\Source Filter","",0x00000000,"{E436EBB6-524F-11CE-9F53-0020AF0BA770}"
+HKLM,"SOFTWARE\Classes\gopher\URL Protocol","",0x00000000,""
+;see http
+;HKLM,"SOFTWARE\Classes\gopher\shell\open\command","",0x00000000,"""%programfiles%\Internet Explorer\iexplore.exe"" -nohome"
+HKLM,"SOFTWARE\Classes\gopher\shell\open\command","",0x00000000,"""%programfiles%\Internet Explorer\iexplore.exe"" %1"
+
+HKLM,"SOFTWARE\Classes\http","",0x00000000,"URL:HyperText Transfer Protocol"
+HKLM,"SOFTWARE\Classes\http\DefaultIcon","",0x00000000,"%systemroot%\system32\url.dll,0"
+HKLM,"SOFTWARE\Classes\http\Source Filter","",0x00000000,"{E436EBB6-524F-11CE-9F53-0020AF0BA770}"
+HKLM,"SOFTWARE\Classes\http\URL Protocol","",0x00000000,""
+HKLM,"SOFTWARE\Classes\http\shell\open\command","",0x00000000,"""%programfiles%\Internet Explorer\iexplore.exe"" %1"
+;TODO : iexplore should use DDE
+;HKLM,"SOFTWARE\Classes\http\shell\open\ddeexec","",0x00000000,"""%1"",,-1,0,,,,"
+;HKLM,"SOFTWARE\Classes\http\shell\open\ddeexec","NoActivateHandler",0x00000000,""
+;HKLM,"SOFTWARE\Classes\http\shell\open\ddeexec\Application","",0x00000000,"IExplore"
+;HKLM,"SOFTWARE\Classes\http\shell\open\ddeexec\Topic","",0x00000000,"WWW_OpenURL"
+
+HKLM,"SOFTWARE\Classes\https","",0x00000000,"URL:HyperText Transfer Protocol with Privacy"
+HKLM,"SOFTWARE\Classes\https\DefaultIcon","",0x00000000,"%systemroot%\system32\url.dll,0"
+HKLM,"SOFTWARE\Classes\https\Source Filter","",0x00000000,"{E436EBB6-524F-11CE-9F53-0020AF0BA770}"
+HKLM,"SOFTWARE\Classes\https\URL Protocol","",0x00000000,""
+;see http
+;HKLM,"SOFTWARE\Classes\https\shell\open\command","",0x00000000,"""%programfiles%\Internet Explorer\iexplore.exe"" -nohome"
+HKLM,"SOFTWARE\Classes\https\shell\open\command","",0x00000000,"""%programfiles%\Internet Explorer\iexplore.exe"" %1"
+
+; Register system default web browser
+HKLM,"SOFTWARE\Clients\StartMenuInternet","",0x00000000,"IEXPLORE.EXE"
+HKLM,"SOFTWARE\Clients\StartMenuInternet\IEXPLORE.EXE","",0x00000000,"Internet Explorer"
+HKLM,"SOFTWARE\Clients\StartMenuInternet\IEXPLORE.EXE\DefaultIcon","",0x00000000,"%programfiles%\Internet Explorer\iexplore.exe,-7"
+HKLM,"SOFTWARE\Clients\StartMenuInternet\IEXPLORE.EXE\shell\open\command","",0x00000000,"%programfiles%\Internet Explorer\iexplore.exe"
+
+; DirectX
++HKLM,"SOFTWARE\Microsoft\DirectX","InstalledVersion",0x00000001, 0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x00
+HKLM,"SOFTWARE\Microsoft\DirectX","Version",0x00000000,"4.09.00.0904"
+
+; RPC
+HKLM,"SOFTWARE\Microsoft\Rpc",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Rpc\NetBios",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Rpc","DCOM Protocols",0x00010002,"ncacn_ip_tcp"
+HKLM,"SOFTWARE\Microsoft\Rpc\ClientProtocols","ncacn_np",0x00000000,"rpcrt4.dll"
+HKLM,"SOFTWARE\Microsoft\Rpc\NameService","DefaultSyntax",2,"3"
+HKLM,"SOFTWARE\Microsoft\Rpc\NameService","Endpoint",2,"\pipe\locator"
+HKLM,"SOFTWARE\Microsoft\Rpc\NameService","NetworkAddress",2,"\\."
+HKLM,"SOFTWARE\Microsoft\Rpc\NameService","Protocol",2,"ncacn_np"
+HKLM,"SOFTWARE\Microsoft\Rpc\NameService","ServerNetworkAddress",2,"\\."
+HKLM,"SOFTWARE\Microsoft\Rpc\SecurityService","1",2,"secur32.dll"
+HKLM,"SOFTWARE\Microsoft\Rpc\SecurityService","10",2,"secur32.dll"
+HKLM,"SOFTWARE\Microsoft\Rpc\SecurityService","14",2,"schannel.dll"
+HKLM,"SOFTWARE\Microsoft\Rpc\SecurityService","16",2,"secur32.dll"
+HKLM,"SOFTWARE\Microsoft\Rpc\SecurityService","18",2,"secur32.dll"
+HKLM,"SOFTWARE\Microsoft\Rpc\SecurityService","68",2,"netlogon.dll"
+HKLM,"SOFTWARE\Microsoft\Rpc\SecurityService","9",2,"secur32.dll"
+
+HKLM,"SOFTWARE\Microsoft\Secure",,0x00000012
+
+; WBem
+HKLM,"SOFTWARE\Microsoft\wbem\ess",,0x00000012
+HKLM,"SOFTWARE\Microsoft\wbem\Transports",,0x00000012
+HKLM,"SOFTWARE\Microsoft\wbem\Scripting",,0x00000012
+HKLM,"SOFTWARE\Microsoft\wbem","Installation Directory",0x00020000,"%SystemRoot%\system32\wbem"
+HKLM,"SOFTWARE\Microsoft\wbem","MOF Self-Install Directory",0x00020000,"%SystemRoot%\system32\wbem\mof"
+
+; HTML Help
+HKLM,"SOFTWARE\Microsoft\Active Setup\Installed Components\{de5aed00-a4bf-11d1-9948-00c04f98bbc9}",,2,"HTML Help"
+HKLM,"SOFTWARE\Microsoft\Active Setup\Installed Components\{de5aed00-a4bf-11d1-9948-00c04f98bbc9}","ComponentID",2,"HTMLHelp"
+HKLM,"SOFTWARE\Microsoft\Active Setup\Installed Components\{de5aed00-a4bf-11d1-9948-00c04f98bbc9}","IsInstalled",2,1
+HKLM,"SOFTWARE\Microsoft\Active Setup\Installed Components\{de5aed00-a4bf-11d1-9948-00c04f98bbc9}","Locale",2,"*"
+HKLM,"SOFTWARE\Microsoft\Active Setup\Installed Components\{de5aed00-a4bf-11d1-9948-00c04f98bbc9}","Version",2,"4,74,9273,0"
+
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion","DevicePath",0x00020002,"%SystemRoot%\inf"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion","MediaPathUnexpanded",0x00020000,"%SystemRoot%\Media"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Applets",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Control Panel\Cpls",,0x00000012
+; Cursors Schemes
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Control Panel\Cursors\Schemes","ReactOS Default",0x00020000,""",,,,,,,,,,,,,"""
+
+; Common shell folders
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\DefragPath",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\DefragPath","",0x00020000,"%systemroot%\system32\dfrg.msc %c:"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\BackupPath",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\BackupPath","",0x00020000,"%SystemRoot%\system32\ntbackup.exe"
+
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Run",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Setup",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Setup","DriverCachePath",0x00020002,"%SystemRoot%\Driver Cache"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDlls",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\ShellServiceObjectDelayLoad",,0x00000012
+
+; FIXME - usetup doesn't handle extra paths
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce","",0x00000000,"cmd /c md ""%programfiles%\Internet Explorer\"" && move %windir%\iexplore.exe ""%programfiles%\Internet Explorer\"" && ""%programfiles%\Internet Explorer\iexplore.exe"" /RegServer"
+; Create .NET Framework InstallRoot key, reg_sz & full path
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce","InstallRoot.NET",0x00000000,"cmd /c reg add HKLM\SOFTWARE\Microsoft\.NETFramework /v InstallRoot /t REG_SZ /d %SystemRoot%\Microsoft.NET\Framework\"
+
+HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons",,0x00000012
+HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu",,0x00000012
+HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu","{208D2C60-3AEA-1069-A2D7-08002B30309D}",0x00010001,0x00000000
+HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Bitbucket",,0x00000012
+HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Bitbucket\Volume",,0x00000012
+
+; CMD Settings
+HKLM,"SOFTWARE\Microsoft\Command Processor","AutoRun",0x00020000,""
+
+; Uninstall Application list
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall",,0x00000012
+
+; Version Information
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","CurrentVersion",0x00000000,"5.2"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","CSDVersion",0x00000000,"Service Pack 2"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","CurrentBuildNumber",0x00000000,"3790"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","InstallDate",0x00010003,0
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","ProductName",2,"ReactOS"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","RegDone",0x00000002,""
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","RegisteredOrganization",2,""
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","RegisteredOwner",2,""
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","SoftwareType",2,"System"
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Accessibility",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Compatibility",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Compatibility32",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Network",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Network\Shared Parameters",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Network\SMAddOns",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Network\UMAddOns",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Network\World Full Access Shared Parameters",,0x00000012
+
+; INI File Mappings
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping",,0x00000012
+
+; Global Console settings
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\Nls","00000409",2,""
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont","0",2,"Lucida Console"
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\drivers.desc",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontMapper",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\IME Compatibility",,0x00000012
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\IMM","LoadIMM",0x00010003,0
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\IMM","LoadCTFIME",0x00010003,0
+
+; DOS Device ports
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports","COM1:",2,"9600,n,8,1"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports","COM2:",2,"9600,n,8,1"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports","COM3:",2,"9600,n,8,1"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports","COM4:",2,"9600,n,8,1"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports","FILE:",2,""
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports","LPT1:",2,""
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports","LPT2:",2,""
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports","LPT3:",2,""
+
+; Image File Execution Options (NtGlobalFlag with FLG_SHOW_LDR_SNAPS set for loadlib.exe)
+HKLM,"Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\loadlib.exe","GlobalFlag",0x00010001,0x00000002
+;HKLM,"Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\loaddll.exe","GlobalFlag",0x00010001,0x00000002
+;HKLM,"Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\soffice.exe","GlobalFlag",0x00010001,0x00000002
+;HKLM,"Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\tlstest.exe","GlobalFlag",0x00010001,0x00000002
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32","midimapper",0x00000000,"midimap.dll"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32","wavemapper",0x00000000,"msacm32.drv"
+;HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32","wave",0x00000000,"sndblst.dll"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32","midi",0x00000000,"beepmidi.dll"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32","msacm.msadpcm",0x00000000,"msadp32.acm"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32","msacm.msg711",0x00000000,"msg711.acm"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32","msacm.msgsm610",0x00000000,"msgsm32.acm"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32","msacm.imaadpcm",0x00000000,"imaadp32.acm"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32","msacm.winemp3",0x00000000,"winemp3.acm"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32","vidc.cvid",0x00000000,"iccvid.dll"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32","vidc.mrle",0x00000000,"msrle32.dll"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32","vidc.msvc",0x00000000,"msvidc32.dll"
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI32","AVIVideo",0x00000002,"mciavi32.dll"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI32","CDAudio",0x00000002,"mcicda.dll"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI32","Sequencer",0x00000002,"mciseq.dll"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI32","WaveAudio",0x00000002,"mciwave.dll"
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","aifc",0x00000002,"MPEGVideo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","asf",0x00000002,"MPEGVideo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","asx",0x00000002,"MPEGVideo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","au",0x00000002,"MPEGVideo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","avi",0x00000002,"AVIVideo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","cda",0x00000002,"CDAudio"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","lsf",0x00000002,"MPEGVideo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","lsx",0x00000002,"MPEGVideo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","m1v",0x00000002,"MPEGVideo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","m3u",0x00000002,"MPEGVideo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","mid",0x00000002,"Sequencer"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","midi",0x00000002,"Sequencer"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","mp2",0x00000002,"MPEGVideo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","mp2v",0x00000002,"MPEGVideo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","mp3",0x00000002,"MPEGVideo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","mpa",0x00000002,"MPEGVideo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","mpe",0x00000002,"MPEGVideo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","mpeg",0x00000002,"MPEGVideo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","mpg",0x00000002,"MPEGVideo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","mpv",0x00000002,"MPEGVideo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","mpv2",0x00000002,"MPEGVideo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","rmi",0x00000002,"MPEGVideo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","rmi",0x00000002,"Sequencer"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","snd",0x00000002,"MPEGVideo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","wav",0x00000002,"WaveAudio"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","wax",0x00000002,"MPEGVideo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","wm",0x00000002,"MPEGVideo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","wma",0x00000002,"MPEGVideo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","wmp",0x00000002,"MPEGVideo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","wmv",0x00000002,"MPEGVideo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","wmx",0x00000002,"MPEGVideo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","wvx",0x00000002,"MPEGVideo"
+
+; User Profile List
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList","ProfilesDirectory",0x00020000,"%SystemDrive%\Documents and Settings"
+
+; Font substitutes
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes",,0x00000012
+
+; win32k GRE initialization
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\GRE_Initialize",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\GRE_Initialize","MS Shell Dlg",0x00000002,"Microsoft Sans Serif"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\GRE_Initialize","FIXEDFON.FON",0x00000002,"vgafix.fon"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\GRE_Initialize","FONTS.FON",0x00000002,"vgasys.fon"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\GRE_Initialize","OEMFONT.FON",0x00000002,"vgaoem.fon"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\GRE_Initialize","DisableRemoteFontBootCache",0x00010001,0x00000000
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\GRE_Initialize","LastBootTimeFontCacheState",0x00010001,0x00000002
+
+; Certificates
+; RapidSSL CA
+HKLM,"SOFTWARE\Microsoft\SystemCertificates\CA\Certificates\C039A3269EE4B8E82D00C53FA797B5A19E836F47","Blob",0x00000001,\
+ 0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xD9,0x03,0x00,0x00,0x30,0x82,0x03,0xD5,\
+ 0x30,0x82,0x02,0xBD,0xA0,0x03,0x02,0x01,0x02,0x02,0x03,0x02,0x36,0xD1,0x30,0x0D,\
+ 0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x30,0x42,0x31,\
+ 0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x16,0x30,0x14,\
+ 0x06,0x03,0x55,0x04,0x0A,0x13,0x0D,0x47,0x65,0x6F,0x54,0x72,0x75,0x73,0x74,0x20,\
+ 0x49,0x6E,0x63,0x2E,0x31,0x1B,0x30,0x19,0x06,0x03,0x55,0x04,0x03,0x13,0x12,0x47,\
+ 0x65,0x6F,0x54,0x72,0x75,0x73,0x74,0x20,0x47,0x6C,0x6F,0x62,0x61,0x6C,0x20,0x43,\
+ 0x41,0x30,0x1E,0x17,0x0D,0x31,0x30,0x30,0x32,0x31,0x39,0x32,0x32,0x34,0x35,0x30,\
+ 0x35,0x5A,0x17,0x0D,0x32,0x30,0x30,0x32,0x31,0x38,0x32,0x32,0x34,0x35,0x30,0x35,\
+ 0x5A,0x30,0x3C,0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,\
+ 0x31,0x17,0x30,0x15,0x06,0x03,0x55,0x04,0x0A,0x13,0x0E,0x47,0x65,0x6F,0x54,0x72,\
+ 0x75,0x73,0x74,0x2C,0x20,0x49,0x6E,0x63,0x2E,0x31,0x14,0x30,0x12,0x06,0x03,0x55,\
+ 0x04,0x03,0x13,0x0B,0x52,0x61,0x70,0x69,0x64,0x53,0x53,0x4C,0x20,0x43,0x41,0x30,\
+ 0x82,0x01,0x22,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x01,\
+ 0x05,0x00,0x03,0x82,0x01,0x0F,0x00,0x30,0x82,0x01,0x0A,0x02,0x82,0x01,0x01,0x00,\
+ 0xC7,0x71,0xF8,0x56,0xC7,0x1E,0xD9,0xCC,0xB5,0xAD,0xF6,0xB4,0x97,0xA3,0xFB,0xA1,\
+ 0xE6,0x0B,0x50,0x5F,0x50,0xAA,0x3A,0xDA,0x0F,0xFC,0x3D,0x29,0x24,0x43,0xC6,0x10,\
+ 0x29,0xC1,0xFC,0x55,0x40,0x72,0xEE,0xBD,0xEA,0xDF,0x9F,0xB6,0x41,0xF4,0x48,0x4B,\
+ 0xC8,0x6E,0xFE,0x4F,0x57,0x12,0x8B,0x5B,0xFA,0x92,0xDD,0x5E,0xE8,0xAD,0xF3,0xF0,\
+ 0x1B,0xB1,0x7B,0x4D,0xFB,0xCF,0xFD,0xD1,0xE5,0xF8,0xE3,0xDC,0xE7,0xF5,0x73,0x7F,\
+ 0xDF,0x01,0x49,0xCF,0x8C,0x56,0xC1,0xBD,0x37,0xE3,0x5B,0xBE,0xB5,0x4F,0x8B,0x8B,\
+ 0xF0,0xDA,0x4F,0xC7,0xE3,0xDD,0x55,0x47,0x69,0xDF,0xF2,0x5B,0x7B,0x07,0x4F,0x3D,\
+ 0xE5,0xAC,0x21,0xC1,0xC8,0x1D,0x7A,0xE8,0xE7,0xF6,0x0F,0xA1,0xAA,0xF5,0x6F,0xDE,\
+ 0xA8,0x65,0x4F,0x10,0x89,0x9C,0x03,0xF3,0x89,0x7A,0xA5,0x5E,0x01,0x72,0x33,0xED,\
+ 0xA9,0xE9,0x5A,0x1E,0x79,0xF3,0x87,0xC8,0xDF,0xC8,0xC5,0xFC,0x37,0xC8,0x9A,0x9A,\
+ 0xD7,0xB8,0x76,0xCC,0xB0,0x3E,0xE7,0xFD,0xE6,0x54,0xEA,0xDF,0x5F,0x52,0x41,0x78,\
+ 0x59,0x57,0xAD,0xF1,0x12,0xD6,0x7F,0xBC,0xD5,0x9F,0x70,0xD3,0x05,0x6C,0xFA,0xA3,\
+ 0x7D,0x67,0x58,0xDD,0x26,0x62,0x1D,0x31,0x92,0x0C,0x79,0x79,0x1C,0x8E,0xCF,0xCA,\
+ 0x7B,0xC1,0x66,0xAF,0xA8,0x74,0x48,0xFB,0x8E,0x82,0xC2,0x9E,0x2C,0x99,0x5C,0x7B,\
+ 0x2D,0x5D,0x9B,0xBC,0x5B,0x57,0x9E,0x7C,0x3A,0x7A,0x13,0xAD,0xF2,0xA3,0x18,0x5B,\
+ 0x2B,0x59,0x0F,0xCD,0x5C,0x3A,0xEB,0x68,0x33,0xC6,0x28,0x1D,0x82,0xD1,0x50,0x8B,\
+ 0x02,0x03,0x01,0x00,0x01,0xA3,0x81,0xD9,0x30,0x81,0xD6,0x30,0x0E,0x06,0x03,0x55,\
+ 0x1D,0x0F,0x01,0x01,0xFF,0x04,0x04,0x03,0x02,0x01,0x06,0x30,0x1D,0x06,0x03,0x55,\
+ 0x1D,0x0E,0x04,0x16,0x04,0x14,0x6B,0x69,0x3D,0x6A,0x18,0x42,0x4A,0xDD,0x8F,0x02,\
+ 0x65,0x39,0xFD,0x35,0x24,0x86,0x78,0x91,0x16,0x30,0x30,0x1F,0x06,0x03,0x55,0x1D,\
+ 0x23,0x04,0x18,0x30,0x16,0x80,0x14,0xC0,0x7A,0x98,0x68,0x8D,0x89,0xFB,0xAB,0x05,\
+ 0x64,0x0C,0x11,0x7D,0xAA,0x7D,0x65,0xB8,0xCA,0xCC,0x4E,0x30,0x12,0x06,0x03,0x55,\
+ 0x1D,0x13,0x01,0x01,0xFF,0x04,0x08,0x30,0x06,0x01,0x01,0xFF,0x02,0x01,0x00,0x30,\
+ 0x3A,0x06,0x03,0x55,0x1D,0x1F,0x04,0x33,0x30,0x31,0x30,0x2F,0xA0,0x2D,0xA0,0x2B,\
+ 0x86,0x29,0x68,0x74,0x74,0x70,0x3A,0x2F,0x2F,0x63,0x72,0x6C,0x2E,0x67,0x65,0x6F,\
+ 0x74,0x72,0x75,0x73,0x74,0x2E,0x63,0x6F,0x6D,0x2F,0x63,0x72,0x6C,0x73,0x2F,0x67,\
+ 0x74,0x67,0x6C,0x6F,0x62,0x61,0x6C,0x2E,0x63,0x72,0x6C,0x30,0x34,0x06,0x08,0x2B,\
+ 0x06,0x01,0x05,0x05,0x07,0x01,0x01,0x04,0x28,0x30,0x26,0x30,0x24,0x06,0x08,0x2B,\
+ 0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x86,0x18,0x68,0x74,0x74,0x70,0x3A,0x2F,0x2F,\
+ 0x6F,0x63,0x73,0x70,0x2E,0x67,0x65,0x6F,0x74,0x72,0x75,0x73,0x74,0x2E,0x63,0x6F,\
+ 0x6D,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,\
+ 0x03,0x82,0x01,0x01,0x00,0xAB,0xBC,0xBC,0x0A,0x5D,0x18,0x94,0xE3,0xC1,0xB1,0xC3,\
+ 0xA8,0x4C,0x55,0xD6,0xBE,0xB4,0x98,0xF1,0xEE,0x3C,0x1C,0xCD,0xCF,0xF3,0x24,0x24,\
+ 0x5C,0x96,0x03,0x27,0x58,0xFC,0x36,0xAE,0xA2,0x2F,0x8F,0xF1,0xFE,0xDA,0x2B,0x02,\
+ 0xC3,0x33,0xBD,0xC8,0xDD,0x48,0x22,0x2B,0x60,0x0F,0xA5,0x03,0x10,0xFD,0x77,0xF8,\
+ 0xD0,0xED,0x96,0x67,0x4F,0xFD,0xEA,0x47,0x20,0x70,0x54,0xDC,0xA9,0x0C,0x55,0x7E,\
+ 0xE1,0x96,0x25,0x8A,0xD9,0xB5,0xDA,0x57,0x4A,0xBE,0x8D,0x8E,0x49,0x43,0x63,0xA5,\
+ 0x6C,0x4E,0x27,0x87,0x25,0xEB,0x5B,0x6D,0xFE,0xA2,0x7F,0x38,0x28,0xE0,0x36,0xAB,\
+ 0xAD,0x39,0xA5,0xA5,0x62,0xC4,0xB7,0x5C,0x58,0x2C,0xAA,0x5D,0x01,0x60,0xA6,0x62,\
+ 0x67,0xA3,0xC0,0xC7,0x62,0x23,0xF4,0xE7,0x6C,0x46,0xEE,0xB5,0xD3,0x80,0x6A,0x22,\
+ 0x13,0xD2,0x2D,0x3F,0x74,0x4F,0xEA,0xAF,0x8C,0x5F,0xB4,0x38,0x9C,0xDB,0xAE,0xCE,\
+ 0xAF,0x84,0x1E,0xA6,0xF6,0x34,0x51,0x59,0x79,0xD3,0xE3,0x75,0xDC,0xBC,0xD7,0xF3,\
+ 0x73,0xDF,0x92,0xEC,0xD2,0x20,0x59,0x6F,0x9C,0xFB,0x95,0xF8,0x92,0x76,0x18,0x0A,\
+ 0x7C,0x0F,0x2C,0xA6,0xCA,0xDE,0x8A,0x62,0x7B,0xD8,0xF3,0xCE,0x5F,0x68,0xBD,0x8F,\
+ 0x3E,0xC1,0x74,0xBB,0x15,0x72,0x3A,0x16,0x83,0xA9,0x0B,0xE6,0x4D,0x99,0x9C,0xD8,\
+ 0x57,0xEC,0xA8,0x01,0x51,0xC7,0x6F,0x57,0x34,0x5E,0xAB,0x4A,0x2C,0x42,0xF6,0x4F,\
+ 0x1C,0x89,0x78,0xDE,0x26,0x4E,0xF5,0x6F,0x93,0x4C,0x15,0x6B,0x27,0x56,0x4D,0x00,\
+ 0x54,0x6C,0x7A,0xB7,0xB7
+; GeoTrustGlobal CA
+HKLM,"SOFTWARE\Microsoft\SystemCertificates\CA\Certificates\7359755C6DF9A0ABC3060BCE369564C8EC4542A3","Blob",0x00000001,\
+ 0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x81,0x03,0x00,0x00,0x30,0x82,0x03,0x7D,\
+ 0x30,0x82,0x02,0xE6,0xA0,0x03,0x02,0x01,0x02,0x02,0x03,0x12,0xBB,0xE6,0x30,0x0D,\
+ 0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x30,0x4E,0x31,\
+ 0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x10,0x30,0x0E,\
+ 0x06,0x03,0x55,0x04,0x0A,0x13,0x07,0x45,0x71,0x75,0x69,0x66,0x61,0x78,0x31,0x2D,\
+ 0x30,0x2B,0x06,0x03,0x55,0x04,0x0B,0x13,0x24,0x45,0x71,0x75,0x69,0x66,0x61,0x78,\
+ 0x20,0x53,0x65,0x63,0x75,0x72,0x65,0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,\
+ 0x61,0x74,0x65,0x20,0x41,0x75,0x74,0x68,0x6F,0x72,0x69,0x74,0x79,0x30,0x1E,0x17,\
+ 0x0D,0x30,0x32,0x30,0x35,0x32,0x31,0x30,0x34,0x30,0x30,0x30,0x30,0x5A,0x17,0x0D,\
+ 0x31,0x38,0x30,0x38,0x32,0x31,0x30,0x34,0x30,0x30,0x30,0x30,0x5A,0x30,0x42,0x31,\
+ 0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x16,0x30,0x14,\
+ 0x06,0x03,0x55,0x04,0x0A,0x13,0x0D,0x47,0x65,0x6F,0x54,0x72,0x75,0x73,0x74,0x20,\
+ 0x49,0x6E,0x63,0x2E,0x31,0x1B,0x30,0x19,0x06,0x03,0x55,0x04,0x03,0x13,0x12,0x47,\
+ 0x65,0x6F,0x54,0x72,0x75,0x73,0x74,0x20,0x47,0x6C,0x6F,0x62,0x61,0x6C,0x20,0x43,\
+ 0x41,0x30,0x82,0x01,0x22,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,\
+ 0x01,0x01,0x05,0x00,0x03,0x82,0x01,0x0F,0x00,0x30,0x82,0x01,0x0A,0x02,0x82,0x01,\
+ 0x01,0x00,0xDA,0xCC,0x18,0x63,0x30,0xFD,0xF4,0x17,0x23,0x1A,0x56,0x7E,0x5B,0xDF,\
+ 0x3C,0x6C,0x38,0xE4,0x71,0xB7,0x78,0x91,0xD4,0xBC,0xA1,0xD8,0x4C,0xF8,0xA8,0x43,\
+ 0xB6,0x03,0xE9,0x4D,0x21,0x07,0x08,0x88,0xDA,0x58,0x2F,0x66,0x39,0x29,0xBD,0x05,\
+ 0x78,0x8B,0x9D,0x38,0xE8,0x05,0xB7,0x6A,0x7E,0x71,0xA4,0xE6,0xC4,0x60,0xA6,0xB0,\
+ 0xEF,0x80,0xE4,0x89,0x28,0x0F,0x9E,0x25,0xD6,0xED,0x83,0xF3,0xAD,0xA6,0x91,0xC7,\
+ 0x98,0xC9,0x42,0x18,0x35,0x14,0x9D,0xAD,0x98,0x46,0x92,0x2E,0x4F,0xCA,0xF1,0x87,\
+ 0x43,0xC1,0x16,0x95,0x57,0x2D,0x50,0xEF,0x89,0x2D,0x80,0x7A,0x57,0xAD,0xF2,0xEE,\
+ 0x5F,0x6B,0xD2,0x00,0x8D,0xB9,0x14,0xF8,0x14,0x15,0x35,0xD9,0xC0,0x46,0xA3,0x7B,\
+ 0x72,0xC8,0x91,0xBF,0xC9,0x55,0x2B,0xCD,0xD0,0x97,0x3E,0x9C,0x26,0x64,0xCC,0xDF,\
+ 0xCE,0x83,0x19,0x71,0xCA,0x4E,0xE6,0xD4,0xD5,0x7B,0xA9,0x19,0xCD,0x55,0xDE,0xC8,\
+ 0xEC,0xD2,0x5E,0x38,0x53,0xE5,0x5C,0x4F,0x8C,0x2D,0xFE,0x50,0x23,0x36,0xFC,0x66,\
+ 0xE6,0xCB,0x8E,0xA4,0x39,0x19,0x00,0xB7,0x95,0x02,0x39,0x91,0x0B,0x0E,0xFE,0x38,\
+ 0x2E,0xD1,0x1D,0x05,0x9A,0xF6,0x4D,0x3E,0x6F,0x0F,0x07,0x1D,0xAF,0x2C,0x1E,0x8F,\
+ 0x60,0x39,0xE2,0xFA,0x36,0x53,0x13,0x39,0xD4,0x5E,0x26,0x2B,0xDB,0x3D,0xA8,0x14,\
+ 0xBD,0x32,0xEB,0x18,0x03,0x28,0x52,0x04,0x71,0xE5,0xAB,0x33,0x3D,0xE1,0x38,0xBB,\
+ 0x07,0x36,0x84,0x62,0x9C,0x79,0xEA,0x16,0x30,0xF4,0x5F,0xC0,0x2B,0xE8,0x71,0x6B,\
+ 0xE4,0xF9,0x02,0x03,0x01,0x00,0x01,0xA3,0x81,0xF0,0x30,0x81,0xED,0x30,0x1F,0x06,\
+ 0x03,0x55,0x1D,0x23,0x04,0x18,0x30,0x16,0x80,0x14,0x48,0xE6,0x68,0xF9,0x2B,0xD2,\
+ 0xB2,0x95,0xD7,0x47,0xD8,0x23,0x20,0x10,0x4F,0x33,0x98,0x90,0x9F,0xD4,0x30,0x1D,\
+ 0x06,0x03,0x55,0x1D,0x0E,0x04,0x16,0x04,0x14,0xC0,0x7A,0x98,0x68,0x8D,0x89,0xFB,\
+ 0xAB,0x05,0x64,0x0C,0x11,0x7D,0xAA,0x7D,0x65,0xB8,0xCA,0xCC,0x4E,0x30,0x0F,0x06,\
+ 0x03,0x55,0x1D,0x13,0x01,0x01,0xFF,0x04,0x05,0x30,0x03,0x01,0x01,0xFF,0x30,0x0E,\
+ 0x06,0x03,0x55,0x1D,0x0F,0x01,0x01,0xFF,0x04,0x04,0x03,0x02,0x01,0x06,0x30,0x3A,\
+ 0x06,0x03,0x55,0x1D,0x1F,0x04,0x33,0x30,0x31,0x30,0x2F,0xA0,0x2D,0xA0,0x2B,0x86,\
+ 0x29,0x68,0x74,0x74,0x70,0x3A,0x2F,0x2F,0x63,0x72,0x6C,0x2E,0x67,0x65,0x6F,0x74,\
+ 0x72,0x75,0x73,0x74,0x2E,0x63,0x6F,0x6D,0x2F,0x63,0x72,0x6C,0x73,0x2F,0x73,0x65,\
+ 0x63,0x75,0x72,0x65,0x63,0x61,0x2E,0x63,0x72,0x6C,0x30,0x4E,0x06,0x03,0x55,0x1D,\
+ 0x20,0x04,0x47,0x30,0x45,0x30,0x43,0x06,0x04,0x55,0x1D,0x20,0x00,0x30,0x3B,0x30,\
+ 0x39,0x06,0x08,0x2B,0x06,0x01,0x05,0x05,0x07,0x02,0x01,0x16,0x2D,0x68,0x74,0x74,\
+ 0x70,0x73,0x3A,0x2F,0x2F,0x77,0x77,0x77,0x2E,0x67,0x65,0x6F,0x74,0x72,0x75,0x73,\
+ 0x74,0x2E,0x63,0x6F,0x6D,0x2F,0x72,0x65,0x73,0x6F,0x75,0x72,0x63,0x65,0x73,0x2F,\
+ 0x72,0x65,0x70,0x6F,0x73,0x69,0x74,0x6F,0x72,0x79,0x30,0x0D,0x06,0x09,0x2A,0x86,\
+ 0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0x76,0xE1,0x12,\
+ 0x6E,0x4E,0x4B,0x16,0x12,0x86,0x30,0x06,0xB2,0x81,0x08,0xCF,0xF0,0x08,0xC7,0xC7,\
+ 0x71,0x7E,0x66,0xEE,0xC2,0xED,0xD4,0x3B,0x1F,0xFF,0xF0,0xF0,0xC8,0x4E,0xD6,0x43,\
+ 0x38,0xB0,0xB9,0x30,0x7D,0x18,0xD0,0x55,0x83,0xA2,0x6A,0xCB,0x36,0x11,0x9C,0xE8,\
+ 0x48,0x66,0xA3,0x6D,0x7F,0xB8,0x13,0xD4,0x47,0xFE,0x8B,0x5A,0x5C,0x73,0xFC,0xAE,\
+ 0xD9,0x1B,0x32,0x19,0x38,0xAB,0x97,0x34,0x14,0xAA,0x96,0xD2,0xEB,0xA3,0x1C,0x14,\
+ 0x08,0x49,0xB6,0xBB,0xE5,0x91,0xEF,0x83,0x36,0xEB,0x1D,0x56,0x6F,0xCA,0xDA,0xBC,\
+ 0x73,0x63,0x90,0xE4,0x7F,0x7B,0x3E,0x22,0xCB,0x3D,0x07,0xED,0x5F,0x38,0x74,0x9C,\
+ 0xE3,0x03,0x50,0x4E,0xA1,0xAF,0x98,0xEE,0x61,0xF2,0x84,0x3F,0x12
+; Equifax Secure CA (root)
+HKLM,"SOFTWARE\Microsoft\SystemCertificates\AuthRoot\Certificates\D23209AD23D314232174E40D7F9D62139786633A","Blob",0x00000001,\
+ 0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x24,0x03,0x00,0x00,0x30,0x82,0x03,0x20,\
+ 0x30,0x82,0x02,0x89,0xA0,0x03,0x02,0x01,0x02,0x02,0x04,0x35,0xDE,0xF4,0xCF,0x30,\
+ 0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x30,0x4E,\
+ 0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x10,0x30,\
+ 0x0E,0x06,0x03,0x55,0x04,0x0A,0x13,0x07,0x45,0x71,0x75,0x69,0x66,0x61,0x78,0x31,\
+ 0x2D,0x30,0x2B,0x06,0x03,0x55,0x04,0x0B,0x13,0x24,0x45,0x71,0x75,0x69,0x66,0x61,\
+ 0x78,0x20,0x53,0x65,0x63,0x75,0x72,0x65,0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,\
+ 0x63,0x61,0x74,0x65,0x20,0x41,0x75,0x74,0x68,0x6F,0x72,0x69,0x74,0x79,0x30,0x1E,\
+ 0x17,0x0D,0x39,0x38,0x30,0x38,0x32,0x32,0x31,0x36,0x34,0x31,0x35,0x31,0x5A,0x17,\
+ 0x0D,0x31,0x38,0x30,0x38,0x32,0x32,0x31,0x36,0x34,0x31,0x35,0x31,0x5A,0x30,0x4E,\
+ 0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x10,0x30,\
+ 0x0E,0x06,0x03,0x55,0x04,0x0A,0x13,0x07,0x45,0x71,0x75,0x69,0x66,0x61,0x78,0x31,\
+ 0x2D,0x30,0x2B,0x06,0x03,0x55,0x04,0x0B,0x13,0x24,0x45,0x71,0x75,0x69,0x66,0x61,\
+ 0x78,0x20,0x53,0x65,0x63,0x75,0x72,0x65,0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,\
+ 0x63,0x61,0x74,0x65,0x20,0x41,0x75,0x74,0x68,0x6F,0x72,0x69,0x74,0x79,0x30,0x81,\
+ 0x9F,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x01,0x05,0x00,\
+ 0x03,0x81,0x8D,0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xC1,0x5D,0xB1,0x58,0x67,\
+ 0x08,0x62,0xEE,0xA0,0x9A,0x2D,0x1F,0x08,0x6D,0x91,0x14,0x68,0x98,0x0A,0x1E,0xFE,\
+ 0xDA,0x04,0x6F,0x13,0x84,0x62,0x21,0xC3,0xD1,0x7C,0xCE,0x9F,0x05,0xE0,0xB8,0x01,\
+ 0xF0,0x4E,0x34,0xEC,0xE2,0x8A,0x95,0x04,0x64,0xAC,0xF1,0x6B,0x53,0x5F,0x05,0xB3,\
+ 0xCB,0x67,0x80,0xBF,0x42,0x02,0x8E,0xFE,0xDD,0x01,0x09,0xEC,0xE1,0x00,0x14,0x4F,\
+ 0xFC,0xFB,0xF0,0x0C,0xDD,0x43,0xBA,0x5B,0x2B,0xE1,0x1F,0x80,0x70,0x99,0x15,0x57,\
+ 0x93,0x16,0xF1,0x0F,0x97,0x6A,0xB7,0xC2,0x68,0x23,0x1C,0xCC,0x4D,0x59,0x30,0xAC,\
+ 0x51,0x1E,0x3B,0xAF,0x2B,0xD6,0xEE,0x63,0x45,0x7B,0xC5,0xD9,0x5F,0x50,0xD2,0xE3,\
+ 0x50,0x0F,0x3A,0x88,0xE7,0xBF,0x14,0xFD,0xE0,0xC7,0xB9,0x02,0x03,0x01,0x00,0x01,\
+ 0xA3,0x82,0x01,0x09,0x30,0x82,0x01,0x05,0x30,0x70,0x06,0x03,0x55,0x1D,0x1F,0x04,\
+ 0x69,0x30,0x67,0x30,0x65,0xA0,0x63,0xA0,0x61,0xA4,0x5F,0x30,0x5D,0x31,0x0B,0x30,\
+ 0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x10,0x30,0x0E,0x06,0x03,\
+ 0x55,0x04,0x0A,0x13,0x07,0x45,0x71,0x75,0x69,0x66,0x61,0x78,0x31,0x2D,0x30,0x2B,\
+ 0x06,0x03,0x55,0x04,0x0B,0x13,0x24,0x45,0x71,0x75,0x69,0x66,0x61,0x78,0x20,0x53,\
+ 0x65,0x63,0x75,0x72,0x65,0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,\
+ 0x65,0x20,0x41,0x75,0x74,0x68,0x6F,0x72,0x69,0x74,0x79,0x31,0x0D,0x30,0x0B,0x06,\
+ 0x03,0x55,0x04,0x03,0x13,0x04,0x43,0x52,0x4C,0x31,0x30,0x1A,0x06,0x03,0x55,0x1D,\
+ 0x10,0x04,0x13,0x30,0x11,0x81,0x0F,0x32,0x30,0x31,0x38,0x30,0x38,0x32,0x32,0x31,\
+ 0x36,0x34,0x31,0x35,0x31,0x5A,0x30,0x0B,0x06,0x03,0x55,0x1D,0x0F,0x04,0x04,0x03,\
+ 0x02,0x01,0x06,0x30,0x1F,0x06,0x03,0x55,0x1D,0x23,0x04,0x18,0x30,0x16,0x80,0x14,\
+ 0x48,0xE6,0x68,0xF9,0x2B,0xD2,0xB2,0x95,0xD7,0x47,0xD8,0x23,0x20,0x10,0x4F,0x33,\
+ 0x98,0x90,0x9F,0xD4,0x30,0x1D,0x06,0x03,0x55,0x1D,0x0E,0x04,0x16,0x04,0x14,0x48,\
+ 0xE6,0x68,0xF9,0x2B,0xD2,0xB2,0x95,0xD7,0x47,0xD8,0x23,0x20,0x10,0x4F,0x33,0x98,\
+ 0x90,0x9F,0xD4,0x30,0x0C,0x06,0x03,0x55,0x1D,0x13,0x04,0x05,0x30,0x03,0x01,0x01,\
+ 0xFF,0x30,0x1A,0x06,0x09,0x2A,0x86,0x48,0x86,0xF6,0x7D,0x07,0x41,0x00,0x04,0x0D,\
+ 0x30,0x0B,0x1B,0x05,0x56,0x33,0x2E,0x30,0x63,0x03,0x02,0x06,0xC0,0x30,0x0D,0x06,\
+ 0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,\
+ 0x58,0xCE,0x29,0xEA,0xFC,0xF7,0xDE,0xB5,0xCE,0x02,0xB9,0x17,0xB5,0x85,0xD1,0xB9,\
+ 0xE3,0xE0,0x95,0xCC,0x25,0x31,0x0D,0x00,0xA6,0x92,0x6E,0x7F,0xB6,0x92,0x63,0x9E,\
+ 0x50,0x95,0xD1,0x9A,0x6F,0xE4,0x11,0xDE,0x63,0x85,0x6E,0x98,0xEE,0xA8,0xFF,0x5A,\
+ 0xC8,0xD3,0x55,0xB2,0x66,0x71,0x57,0xDE,0xC0,0x21,0xEB,0x3D,0x2A,0xA7,0x23,0x49,\
+ 0x01,0x04,0x86,0x42,0x7B,0xFC,0xEE,0x7F,0xA2,0x16,0x52,0xB5,0x67,0x67,0xD3,0x40,\
+ 0xDB,0x3B,0x26,0x58,0xB2,0x28,0x77,0x3D,0xAE,0x14,0x77,0x61,0xD6,0xFA,0x2A,0x66,\
+ 0x27,0xA0,0x0D,0xFA,0xA7,0x73,0x5C,0xEA,0x70,0xF1,0x94,0x21,0x65,0x44,0x5F,0xFA,\
+ 0xFC,0xEF,0x29,0x68,0xA9,0xA2,0x87,0x79,0xEF,0x79,0xEF,0x4F,0xAC,0x07,0x77,0x38
+
+
+; Time zone settings
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones","IndexMapping",0x00010000,\
+ "409", "4",\
+ "1009", "4",\
+ "2809", "20",\
+ "80a", "30",\
+ "440a", "30",\
+ "480a", "30",\
+ "4c0a", "30",\
+ "140a", "30",\
+ "100a", "33",\
+ "c0c", "35",\
+ "2009", "35",\
+ "240a", "45",\
+ "280a", "45",\
+ "300a", "45",\
+ "180a", "45",\
+ "500a", "50",\
+ "2409", "50",\
+ "1c0a", "50",\
+ "2c09", "50",\
+ "200a", "55",\
+ "3c0a", "55",\
+ "400a", "55",\
+ "340a", "56",\
+ "416", "65",\
+ "2c0a", "70",\
+ "380a", "70",\
+ "438", "85",\
+ "48f", "85",\
+ "809", "85",\
+ "816", "85",\
+ "1809", "85",\
+ "40f", "90",\
+ "1801", "90",\
+ "41c", "95",\
+ "405", "95",\
+ "40e", "95",\
+ "424", "95",\
+ "41b", "95",\
+ "81a", "95",\
+ "c1a", "95",\
+ "415", "100",\
+ "1401", "100",\
+ "41a", "100",\
+ "42f", "100",\
+ "140c", "100",\
+ "180c", "100",\
+ "1c01", "100",\
+ "403", "105",\
+ "406", "105",\
+ "813", "105",\
+ "827", "105",\
+ "40a", "105",\
+ "40c", "105",\
+ "42d", "105",\
+ "80c", "105",\
+ "c0a", "105",\
+ "490", "105",\
+ "407", "110",\
+ "410", "110",\
+ "413", "110",\
+ "414", "110",\
+ "417", "110",\
+ "807", "110",\
+ "810", "110",\
+ "814", "110",\
+ "1007", "110",\
+ "1407", "110",\
+ "41d", "110",\
+ "c07", "110",\
+ "100c", "110",\
+ "1001", "115",\
+ "2801", "115",\
+ "3001", "115",\
+ "43e", "115",\
+ "2c01", "115",\
+ "423", "115",\
+ "c01", "120",\
+ "425", "125",\
+ "426", "125",\
+ "40b", "125",\
+ "81d", "125",\
+ "422", "125",\
+ "402", "125",\
+ "427", "125",\
+ "408", "130",\
+ "41f", "130",\
+ "418", "130",\
+ "40d", "135",\
+ "436", "140",\
+ "3009", "140",\
+ "1c09", "140",\
+ "419", "145",\
+ "401", "150",\
+ "4001", "150",\
+ "3c01", "150",\
+ "3401", "150",\
+ "441", "155",\
+ "801", "158",\
+ "2401", "158",\
+ "429", "160",\
+ "2001", "165",\
+ "3801", "165",\
+ "42b", "170",\
+ "420", "185",\
+ "439", "190",\
+ "445", "190",\
+ "421", "205",\
+ "41e", "205",\
+ "42a", "205",\
+ "804", "210",\
+ "c04", "210",\
+ "1404", "210",\
+ "83e", "210",\
+ "1004", "215",\
+ "404", "220",\
+ "3409", "220",\
+ "412", "230",\
+ "812", "230",\
+ "411", "235",\
+ "c09", "255",\
+ "1409", "290"
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Dateline Standard Time","Display",0x00000000,"(GMT-12:00) International Date Line West"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Dateline Standard Time","Dlt",0x00000000,"Dateline Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Dateline Standard Time","Std",0x00000000,"Dateline Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Dateline Standard Time","Index",0x00010001,0
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Dateline Standard Time","TZI",0x00000001,\
+0xd0,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Samoa Standard Time","Display",0x00000000,"(GMT-11:00) Midway Island, Samoa"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Samoa Standard Time","Dlt",0x00000000,"Samoa Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Samoa Standard Time","Std",0x00000000,"Samoa Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Samoa Standard Time","Index",0x00010001,1
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Samoa Standard Time","TZI",0x00000001,\
+0x94,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Hawaiian Standard Time","Display",0x00000000,"(GMT-10:00) Hawaii"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Hawaiian Standard Time","Dlt",0x00000000,"Hawaiian Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Hawaiian Standard Time","Std",0x00000000,"Hawaiian Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Hawaiian Standard Time","Index",0x00010001,2
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Hawaiian Standard Time","TZI",0x00000001,\
+0x58,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Alaskan Standard Time","Display",0x00000000,"(GMT-09:00) Alaska"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Alaskan Standard Time","Dlt",0x00000000,"Alaskan Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Alaskan Standard Time","Std",0x00000000,"Alaskan Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Alaskan Standard Time","Index",0x00010001,3
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Alaskan Standard Time","TZI",0x00000001,\
+0x1c,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0b,0x00,0x00,0x00,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Pacific Standard Time","Display",0x00000000,"(GMT-08:00) Pacific Time (US & Canada)"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Pacific Standard Time","Dlt",0x00000000,"Pacific Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Pacific Standard Time","Std",0x00000000,"Pacific Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Pacific Standard Time","Index",0x00010001,4
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Pacific Standard Time","TZI",0x00000001,\
+0xe0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0b,0x00,0x00,0x00,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mountain Standard Time","Display",0x00000000,"(GMT-07:00) Mountain Time (US & Canada)"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mountain Standard Time","Dlt",0x00000000,"Mountain Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mountain Standard Time","Std",0x00000000,"Mountain Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mountain Standard Time","Index",0x00010001,10
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mountain Standard Time","TZI",0x00000001,\
+0xa4,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0b,0x00,0x00,0x00,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mountain Standard Time (Mexico)","Display",0x00000000,"(GMT-07:00) Chihuahua, La Paz, Mazatlan"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mountain Standard Time (Mexico)","Dlt",0x00000000,"Mountain Daylight Time (Mexico)"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mountain Standard Time (Mexico)","Std",0x00000000,"Mountain Standard Time (Mexico)"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mountain Standard Time (Mexico)","Index",0x00010001,13
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mountain Standard Time (Mexico)","TZI",0x00000001,\
+0xa4,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\US Mountain Standard Time","Display",0x00000000,"(GMT-07:00) Arizona"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\US Mountain Standard Time","Dlt",0x00000000,"US Mountain Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\US Mountain Standard Time","Std",0x00000000,"US Mountain Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\US Mountain Standard Time","Index",0x00010001,15
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\US Mountain Standard Time","TZI",0x00000001,\
+0xa4,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Standard Time","Display",0x00000000,"(GMT-06:00) Central Time (US & Canada)"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Standard Time","Dlt",0x00000000,"Central Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Standard Time","Std",0x00000000,"Central Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Standard Time","Index",0x00010001,20
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Standard Time","TZI",0x00000001,\
+0x68,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0b,0x00,0x00,0x00,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Canada Central Standard Time","Display",0x00000000,"(GMT-06:00) Saskatchewan"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Canada Central Standard Time","Dlt",0x00000000,"Canada Central Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Canada Central Standard Time","Std",0x00000000,"Canada Central Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Canada Central Standard Time","Index",0x00010001,25
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Canada Central Standard Time","TZI",0x00000001,\
+0x68,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Standard Time (Mexico)","Display",0x00000000,"(GMT-06:00) Guadalajara, Mexico City, Monterrey"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Standard Time (Mexico)","Dlt",0x00000000,"Central Daylight Time (Mexico)"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Standard Time (Mexico)","Std",0x00000000,"Central Standard Time (Mexico)"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Standard Time (Mexico)","Index",0x00010001,30
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Standard Time (Mexico)","TZI",0x00000001,\
+0x68,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central America Standard Time","Display",0x00000000,"(GMT-06:00) Central America"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central America Standard Time","Dlt",0x00000000,"Central America Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central America Standard Time","Std",0x00000000,"Central America Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central America Standard Time","Index",0x00010001,33
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central America Standard Time","TZI",0x00000001,\
+0x68,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Eastern Standard Time","Display",0x00000000,"(GMT-05:00) Eastern Time (US & Canada)"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Eastern Standard Time","Dlt",0x00000000,"Eastern Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Eastern Standard Time","Std",0x00000000,"Eastern Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Eastern Standard Time","Index",0x00010001,35
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Eastern Standard Time","TZI",0x00000001,\
+0x2c,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0b,0x00,0x00,0x00,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\US Eastern Standard Time","Display",0x00000000,"(GMT-05:00) Indiana (East)"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\US Eastern Standard Time","Dlt",0x00000000,"US Eastern Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\US Eastern Standard Time","Std",0x00000000,"US Eastern Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\US Eastern Standard Time","Index",0x00010001,40
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\US Eastern Standard Time","TZI",0x00000001,\
+0x2c,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Pacific Standard Time","Display",0x00000000,"(GMT-05:00) Bogota, Lima, Quito, Rio Branco"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Pacific Standard Time","Dlt",0x00000000,"SA Pacific Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Pacific Standard Time","Std",0x00000000,"SA Pacific Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Pacific Standard Time","Index",0x00010001,45
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Pacific Standard Time","TZI",0x00000001,\
+0x2c,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Atlantic Standard Time","Display",0x00000000,"(GMT-04:00) Atlantic Time (Canada)"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Atlantic Standard Time","Dlt",0x00000000,"Atlantic Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Atlantic Standard Time","Std",0x00000000,"Atlantic Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Atlantic Standard Time","Index",0x00010001,50
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Atlantic Standard Time","TZI",0x00000001,\
+0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0b,0x00,0x00,0x00,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Western Standard Time","Display",0x00000000,"(GMT-04:00) La Paz"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Western Standard Time","Dlt",0x00000000,"SA Western Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Western Standard Time","Std",0x00000000,"SA Western Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Western Standard Time","Index",0x00010001,55
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Western Standard Time","TZI",0x00000001,\
+0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Pacific SA Standard Time","Display",0x00000000,"(GMT-04:00) Santiago"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Pacific SA Standard Time","Dlt",0x00000000,"Pacific SA Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Pacific SA Standard Time","Std",0x00000000,"Pacific SA Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Pacific SA Standard Time","Index",0x00010001,56
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Pacific SA Standard Time","TZI",0x00000001,\
+0xf0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x03,0x00,0x06,0x00,0x02,0x00,0x17,0x00,0x3b,0x00,0x3b,0x00,0xe7,0x03,\
+0x00,0x00,0x0a,0x00,0x06,0x00,0x02,0x00,0x17,0x00,0x3b,0x00,0x3b,0x00,0xe7,0x03
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Newfoundland Standard Time","Display",0x00000000,"(GMT-03:30) Newfoundland"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Newfoundland Standard Time","Dlt",0x00000000,"Newfoundland Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Newfoundland Standard Time","Std",0x00000000,"Newfoundland Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Newfoundland Standard Time","Index",0x00010001,60
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Newfoundland Standard Time","TZI",0x00000001,\
+0xd2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0b,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. South America Standard Time","Display",0x00000000,"(GMT-03:00) Brasilia"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. South America Standard Time","Dlt",0x00000000,"E. South America Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. South America Standard Time","Std",0x00000000,"E. South America Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. South America Standard Time","Index",0x00010001,65
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. South America Standard Time","TZI",0x00000001,\
+0xb4,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x02,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x0b,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Eastern Standard Time","Display",0x00000000,"(GMT-03:00) Buenos Aires, Georgetown"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Eastern Standard Time","Dlt",0x00000000,"SA Eastern Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Eastern Standard Time","Std",0x00000000,"SA Eastern Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Eastern Standard Time","Index",0x00010001,70
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SA Eastern Standard Time","TZI",0x00000001,\
+0xb4,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Greenland Standard Time","Display",0x00000000,"(GMT-03:00) Greenland"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Greenland Standard Time","Dlt",0x00000000,"Greenland Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Greenland Standard Time","Std",0x00000000,"Greenland Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Greenland Standard Time","Index",0x00010001,73
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Greenland Standard Time","TZI",0x00000001,\
+0xb4,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mid-Atlantic Standard Time","Display",0x00000000,"(GMT-02:00) Mid-Atlantic"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mid-Atlantic Standard Time","Dlt",0x00000000,"Mid-Atlantic Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mid-Atlantic Standard Time","Std",0x00000000,"Mid-Atlantic Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mid-Atlantic Standard Time","Index",0x00010001,75
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Mid-Atlantic Standard Time","TZI",0x00000001,\
+0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x09,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Azores Standard Time","Display",0x00000000,"(GMT-01:00) Azores"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Azores Standard Time","Dlt",0x00000000,"Azores Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Azores Standard Time","Std",0x00000000,"Azores Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Azores Standard Time","Index",0x00010001,80
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Azores Standard Time","TZI",0x00000001,\
+0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Cape Verde Standard Time","Display",0x00000000,"(GMT-01:00) Cape Verde Is."
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Cape Verde Standard Time","Dlt",0x00000000,"Cape Verde Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Cape Verde Standard Time","Std",0x00000000,"Cape Verde Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Cape Verde Standard Time","Index",0x00010001,83
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Cape Verde Standard Time","TZI",0x00000001,\
+0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\GMT Standard Time","Display",0x00000000,"(GMT) Greenwich Mean Time: Dublin, Edinburgh, Lisbon, London"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\GMT Standard Time","Dlt",0x00000000,"GMT Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\GMT Standard Time","Std",0x00000000,"GMT Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\GMT Standard Time","Index",0x00010001,85
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\GMT Standard Time","TZI",0x00000001,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Greenwich Standard Time","Display",0x00000000,"(GMT) Casablanca, Monrovia, Reykjavik"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Greenwich Standard Time","Dlt",0x00000000,"Greenwich Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Greenwich Standard Time","Std",0x00000000,"Greenwich Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Greenwich Standard Time","Index",0x00010001,90
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Greenwich Standard Time","TZI",0x00000001,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Europe Standard Time","Display",0x00000000,"(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Europe Standard Time","Dlt",0x00000000,"Central Europe Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Europe Standard Time","Std",0x00000000,"Central Europe Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Europe Standard Time","Index",0x00010001,95
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Europe Standard Time","TZI",0x00000001,\
+0xc4,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central European Standard Time","Display",0x00000000,"(GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central European Standard Time","Dlt",0x00000000,"Central European Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central European Standard Time","Std",0x00000000,"Central European Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central European Standard Time","Index",0x00010001,100
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central European Standard Time","TZI",0x00000001,\
+0xc4,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Romance Standard Time","Display",0x00000000,"(GMT+01:00) Brussels, Copenhagen, Madrid, Paris"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Romance Standard Time","Dlt",0x00000000,"Romance Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Romance Standard Time","Std",0x00000000,"Romance Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Romance Standard Time","Index",0x00010001,105
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Romance Standard Time","TZI",0x00000001,\
+0xc4,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\W. Europe Standard Time","Display",0x00000000,"(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\W. Europe Standard Time","Dlt",0x00000000,"W. Europe Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\W. Europe Standard Time","Std",0x00000000,"W. Europe Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\W. Europe Standard Time","Index",0x00010001,110
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\W. Europe Standard Time","TZI",0x00000001,\
+0xc4,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Europe Standard Time","Display",0x00000000,"(GMT+02:00) Minsk"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Europe Standard Time","Dlt",0x00000000,"E. Europe Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Europe Standard Time","Std",0x00000000,"E. Europe Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Europe Standard Time","Index",0x00010001,115
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Europe Standard Time","TZI",0x00000001,\
+0x88,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Egypt Standard Time","Display",0x00000000,"(GMT+02:00) Cairo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Egypt Standard Time","Dlt",0x00000000,"Egypt Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Egypt Standard Time","Std",0x00000000,"Egypt Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Egypt Standard Time","Index",0x00010001,120
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Egypt Standard Time","TZI",0x00000001,\
+0x88,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x09,0x00,0x04,0x00,0x05,0x00,0x17,0x00,0x3b,0x00,0x3b,0x00,0x00,0x00,\
+0x00,0x00,0x04,0x00,0x04,0x00,0x05,0x00,0x17,0x00,0x3b,0x00,0x3b,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\FLE Standard Time","Display",0x00000000,"(GMT+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\FLE Standard Time","Dlt",0x00000000,"FLE Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\FLE Standard Time","Std",0x00000000,"FLE Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\FLE Standard Time","Index",0x00010001,125
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\FLE Standard Time","TZI",0x00000001,\
+0x88,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\GTB Standard Time","Display",0x00000000,"(GMT+02:00) Athens, Bucharest, Istanbul"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\GTB Standard Time","Dlt",0x00000000,"GTB Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\GTB Standard Time","Std",0x00000000,"GTB Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\GTB Standard Time","Index",0x00010001,130
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\GTB Standard Time","TZI",0x00000001,\
+0x88,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Israel Standard Time","Display",0x00000000,"(GMT+02:00) Jerusalem"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Israel Standard Time","Dlt",0x00000000,"Israel Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Israel Standard Time","Std",0x00000000,"Israel Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Israel Standard Time","Index",0x00010001,135
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Israel Standard Time","TZI",0x00000001,\
+0x88,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x05,0x00,0x05,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x03,0x00,0x05,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\South Africa Standard Time","Display",0x00000000,"(GMT+02:00) Harare, Pretoria"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\South Africa Standard Time","Dlt",0x00000000,"South Africa Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\South Africa Standard Time","Std",0x00000000,"South Africa Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\South Africa Standard Time","Index",0x00010001,140
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\South Africa Standard Time","TZI",0x00000001,\
+0x88,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Kaliningrad Standard Time","Display",0x00000000,"(GMT+03:00) Kaliningrad"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Kaliningrad Standard Time","Dlt",0x00000000,"Kaliningrad Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Kaliningrad Standard Time","Std",0x00000000,"Kaliningrad Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Kaliningrad Standard Time","Index",0x00010001,143
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Kaliningrad Standard Time","TZI",0x00000001,\
+0x4c,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Russian Standard Time","Display",0x00000000,"(GMT+04:00) Moscow, St. Petersburg, Volgograd"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Russian Standard Time","Dlt",0x00000000,"Russian Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Russian Standard Time","Std",0x00000000,"Russian Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Russian Standard Time","Index",0x00010001,145
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Russian Standard Time","TZI",0x00000001,\
+0x10,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arab Standard Time","Display",0x00000000,"(GMT+03:00) Kuwait, Riyadh"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arab Standard Time","Dlt",0x00000000,"Arab Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arab Standard Time","Std",0x00000000,"Arab Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arab Standard Time","Index",0x00010001,150
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arab Standard Time","TZI",0x00000001,\
+0x4c,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Africa Standard Time","Display",0x00000000,"(GMT+03:00) Nairobi"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Africa Standard Time","Dlt",0x00000000,"E. Africa Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Africa Standard Time","Std",0x00000000,"E. Africa Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Africa Standard Time","Index",0x00010001,155
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Africa Standard Time","TZI",0x00000001,\
+0x4c,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arabic Standard Time","Display",0x00000000,"(GMT+03:00) Baghdad"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arabic Standard Time","Dlt",0x00000000,"Arabic Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arabic Standard Time","Std",0x00000000,"Arabic Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arabic Standard Time","Index",0x00010001,158
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arabic Standard Time","TZI",0x00000001,\
+0x4c,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x01,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Iran Standard Time","Display",0x00000000,"(GMT+03:30) Tehran"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Iran Standard Time","Dlt",0x00000000,"Iran Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Iran Standard Time","Std",0x00000000,"Iran Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Iran Standard Time","Index",0x00010001,160
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Iran Standard Time","TZI",0x00000001,\
+0x2e,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arabian Standard Time","Display",0x00000000,"(GMT+04:00) Abu Dhabi, Muscat"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arabian Standard Time","Dlt",0x00000000,"Arabian Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arabian Standard Time","Std",0x00000000,"Arabian Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arabian Standard Time","Index",0x00010001,165
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Arabian Standard Time","TZI",0x00000001,\
+0x10,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Caucasus Standard Time","Display",0x00000000,"(GMT+04:00) Caucasus Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Caucasus Standard Time","Dlt",0x00000000,"Caucasus Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Caucasus Standard Time","Std",0x00000000,"Caucasus Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Caucasus Standard Time","Index",0x00010001,170
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Caucasus Standard Time","TZI",0x00000001,\
+0x10,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Afghanistan Standard Time","Display",0x00000000,"(GMT+04:30) Kabul"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Afghanistan Standard Time","Dlt",0x00000000,"Afghanistan Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Afghanistan Standard Time","Std",0x00000000,"Afghanistan Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Afghanistan Standard Time","Index",0x00010001,175
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Afghanistan Standard Time","TZI",0x00000001,\
+0xf2,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Ekaterinburg Standard Time","Display",0x00000000,"(GMT+06:00) Ekaterinburg"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Ekaterinburg Standard Time","Dlt",0x00000000,"Ekaterinburg Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Ekaterinburg Standard Time","Std",0x00000000,"Ekaterinburg Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Ekaterinburg Standard Time","Index",0x00010001,180
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Ekaterinburg Standard Time","TZI",0x00000001,\
+0x98,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\West Asia Standard Time","Display",0x00000000,"(GMT+05:00) Islamabad, Karachi, Tashkent"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\West Asia Standard Time","Dlt",0x00000000,"West Asia Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\West Asia Standard Time","Std",0x00000000,"West Asia Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\West Asia Standard Time","Index",0x00010001,185
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\West Asia Standard Time","TZI",0x00000001,\
+0xd4,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\India Standard Time","Display",0x00000000,"(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\India Standard Time","Dlt",0x00000000,"India Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\India Standard Time","Std",0x00000000,"India Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\India Standard Time","Index",0x00010001,190
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\India Standard Time","TZI",0x00000001,\
+0xb6,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Nepal Standard Time","Display",0x00000000,"(GMT+05:45) Kathmandu"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Nepal Standard Time","Dlt",0x00000000,"Nepal Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Nepal Standard Time","Std",0x00000000,"Nepal Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Nepal Standard Time","Index",0x00010001,193
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Nepal Standard Time","TZI",0x00000001,\
+0xa7,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Sri Lanka Standard Time","Display",0x00000000,"(GMT+05:30) Sri Jayawardenepura"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Sri Lanka Standard Time","Dlt",0x00000000,"Sri Lanka Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Sri Lanka Standard Time","Std",0x00000000,"Sri Lanka Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Sri Lanka Standard Time","Index",0x00010001,194
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Sri Lanka Standard Time","TZI",0x00000001,\
+0xb6,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Asia Standard Time","Display",0x00000000,"(GMT+06:00) Astana, Dhaka"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Asia Standard Time","Dlt",0x00000000,"Central Asia Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Asia Standard Time","Std",0x00000000,"Central Asia Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Asia Standard Time","Index",0x00010001,195
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Asia Standard Time","TZI",0x00000001,\
+0x98,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\N. Central Asia Standard Time","Display",0x00000000,"(GMT+07:00) Novosibirsk, Omsk"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\N. Central Asia Standard Time","Dlt",0x00000000,"N. Central Asia Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\N. Central Asia Standard Time","Std",0x00000000,"N. Central Asia Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\N. Central Asia Standard Time","Index",0x00010001,201
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\N. Central Asia Standard Time","TZI",0x00000001,\
+0x5c,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Myanmar Standard Time","Display",0x00000000,"(GMT+06:30) Yangon (Rangoon)"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Myanmar Standard Time","Dlt",0x00000000,"Myanmar Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Myanmar Standard Time","Std",0x00000000,"Myanmar Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Myanmar Standard Time","Index",0x00010001,203
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Myanmar Standard Time","TZI",0x00000001,\
+0x7a,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SE Asia Standard Time","Display",0x00000000,"(GMT+07:00) Bangkok, Hanoi, Jakarta"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SE Asia Standard Time","Dlt",0x00000000,"SE Asia Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SE Asia Standard Time","Std",0x00000000,"SE Asia Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SE Asia Standard Time","Index",0x00010001,205
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\SE Asia Standard Time","TZI",0x00000001,\
+0x5c,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\North Asia Standard Time","Display",0x00000000,"(GMT+08:00) Krasnoyarsk"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\North Asia Standard Time","Dlt",0x00000000,"North Asia Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\North Asia Standard Time","Std",0x00000000,"North Asia Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\North Asia Standard Time","Index",0x00010001,207
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\North Asia Standard Time","TZI",0x00000001,\
+0x20,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\China Standard Time","Display",0x00000000,"(GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\China Standard Time","Dlt",0x00000000,"China Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\China Standard Time","Std",0x00000000,"China Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\China Standard Time","Index",0x00010001,210
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\China Standard Time","TZI",0x00000001,\
+0x20,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Singapore Standard Time","Display",0x00000000,"(GMT+08:00) Kuala Lumpur, Singapore"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Singapore Standard Time","Dlt",0x00000000,"Singapore Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Singapore Standard Time","Std",0x00000000,"Singapore Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Singapore Standard Time","Index",0x00010001,215
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Singapore Standard Time","TZI",0x00000001,\
+0x20,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Taipei Standard Time","Display",0x00000000,"(GMT+08:00) Taipei"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Taipei Standard Time","Dlt",0x00000000,"Taipei Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Taipei Standard Time","Std",0x00000000,"Taipei Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Taipei Standard Time","Index",0x00010001,220
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Taipei Standard Time","TZI",0x00000001,\
+0x20,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\W. Australia Standard Time","Display",0x00000000,"(GMT+08:00) Perth"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\W. Australia Standard Time","Dlt",0x00000000,"W. Australia Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\W. Australia Standard Time","Std",0x00000000,"W. Australia Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\W. Australia Standard Time","Index",0x00010001,225
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\W. Australia Standard Time","TZI",0x00000001,\
+0x20,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Ulaanbaatar Standard Time","Display",0x00000000,"(GMT+08:00) Ulaanbaatar"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Ulaanbaatar Standard Time","Dlt",0x00000000,"Ulaanbaatar Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Ulaanbaatar Standard Time","Std",0x00000000,"Ulaanbaatar Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Ulaanbaatar Standard Time","Index",0x00010001,226
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Ulaanbaatar Standard Time","TZI",0x00000001,\
+0x20,0xfe,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\North Asia East Standard Time","Display",0x00000000,"(GMT+09:00) Irkutsk"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\North Asia East Standard Time","Dlt",0x00000000,"North Asia East Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\North Asia East Standard Time","Std",0x00000000,"North Asia East Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\North Asia East Standard Time","Index",0x00010001,227
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\North Asia East Standard Time","TZI",0x00000001,\
+0xe4,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Korea Standard Time","Display",0x00000000,"(GMT+09:00) Seoul"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Korea Standard Time","Dlt",0x00000000,"Korea Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Korea Standard Time","Std",0x00000000,"Korea Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Korea Standard Time","Index",0x00010001,230
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Korea Standard Time","TZI",0x00000001,\
+0xe4,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tokyo Standard Time","Display",0x00000000,"(GMT+09:00) Osaka, Sapporo, Tokyo"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tokyo Standard Time","Dlt",0x00000000,"Tokyo Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tokyo Standard Time","Std",0x00000000,"Tokyo Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tokyo Standard Time","Index",0x00010001,235
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tokyo Standard Time","TZI",0x00000001,\
+0xe4,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Yakutsk Standard Time","Display",0x00000000,"(GMT+10:00) Yakutsk"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Yakutsk Standard Time","Dlt",0x00000000,"Yakutsk Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Yakutsk Standard Time","Std",0x00000000,"Yakutsk Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Yakutsk Standard Time","Index",0x00010001,240
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Yakutsk Standard Time","TZI",0x00000001,\
+0xa8,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\AUS Central Standard Time","Display",0x00000002,"(GMT+09:30) Darwin"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\AUS Central Standard Time","Dlt",0x00000002,"AUS Central Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\AUS Central Standard Time","Std",0x00000002,"AUS Central Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\AUS Central Standard Time","Index",0x00010001,245
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\AUS Central Standard Time","TZI",0x00000001,\
+0xc6,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Cen. Australia Standard Time","Display",0x00000000,"(GMT+09:30) Adelaide"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Cen. Australia Standard Time","Dlt",0x00000000,"Cen. Australia Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Cen. Australia Standard Time","Std",0x00000000,"Cen. Australia Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Cen. Australia Standard Time","Index",0x00010001,250
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Cen. Australia Standard Time","TZI",0x00000001,\
+0xc6,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\AUS Eastern Standard Time","Display",0x00000000,"(GMT+10:00) Canberra, Melbourne, Sydney"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\AUS Eastern Standard Time","Dlt",0x00000000,"AUS Eastern Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\AUS Eastern Standard Time","Std",0x00000000,"AUS Eastern Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\AUS Eastern Standard Time","Index",0x00010001,255
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\AUS Eastern Standard Time","TZI",0x00000001,\
+0xa8,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Australia Standard Time","Display",0x00000000,"(GMT+10:00) Brisbane"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Australia Standard Time","Dlt",0x00000000,"E. Australia Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Australia Standard Time","Std",0x00000000,"E. Australia Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Australia Standard Time","Index",0x00010001,260
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\E. Australia Standard Time","TZI",0x00000001,\
+0xa8,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tasmania Standard Time","Display",0x00000000,"(GMT+10:00) Hobart"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tasmania Standard Time","Dlt",0x00000000,"Tasmania Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tasmania Standard Time","Std",0x00000000,"Tasmania Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tasmania Standard Time","Index",0x00010001,265
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tasmania Standard Time","TZI",0x00000001,\
+0xa8,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x03,0x00,0x00,0x00,0x05,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x0a,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Vladivostok Standard Time","Display",0x00000000,"(GMT+11:00) Vladivostok"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Vladivostok Standard Time","Dlt",0x00000000,"Vladivostok Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Vladivostok Standard Time","Std",0x00000000,"Vladivostok Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Vladivostok Standard Time","Index",0x00010001,270
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Vladivostok Standard Time","TZI",0x00000001,\
+0x6c,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\West Pacific Standard Time","Display",0x00000000,"(GMT+10:00) Guam, Port Moresby"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\West Pacific Standard Time","Dlt",0x00000000,"West Pacific Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\West Pacific Standard Time","Std",0x00000000,"West Pacific Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\West Pacific Standard Time","Index",0x00010001,275
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\West Pacific Standard Time","TZI",0x00000001,\
+0xa8,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Pacific Standard Time","Display",0x00000000,"(GMT+11:00) Solomon Is., New Caledonia"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Pacific Standard Time","Dlt",0x00000000,"Central Pacific Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Pacific Standard Time","Std",0x00000000,"Central Pacific Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Pacific Standard Time","Index",0x00010001,280
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Central Pacific Standard Time","TZI",0x00000001,\
+0x6c,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Magadan Standard Time","Display",0x00000000,"(GMT+12:00) Magadan"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Magadan Standard Time","Dlt",0x00000000,"Magadan Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Magadan Standard Time","Std",0x00000000,"Magadan Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Magadan Standard Time","Index",0x00010001,283
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Magadan Standard Time","TZI",0x00000001,\
+0x30,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Fiji Standard Time","Display",0x00000000,"(GMT+12:00) Fiji, Kamchatka, Marshall Is."
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Fiji Standard Time","Dlt",0x00000000,"Fiji Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Fiji Standard Time","Std",0x00000000,"Fiji Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Fiji Standard Time","Index",0x00010001,285
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Fiji Standard Time","TZI",0x00000001,\
+0x30,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\New Zealand Standard Time","Display",0x00000000,"(GMT+12:00) Auckland, Wellington"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\New Zealand Standard Time","Dlt",0x00000000,"New Zealand Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\New Zealand Standard Time","Std",0x00000000,"New Zealand Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\New Zealand Standard Time","Index",0x00010001,290
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\New Zealand Standard Time","TZI",0x00000001,\
+0x30,0xfd,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x09,0x00,0x00,0x00,0x05,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tonga Standard Time","Display",0x00000000,"(GMT+13:00) Nuku'alofa"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tonga Standard Time","Dlt",0x00000000,"Tonga Daylight Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tonga Standard Time","Std",0x00000000,"Tonga Standard Time"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tonga Standard Time","Index",0x00010001,300
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Tonga Standard Time","TZI",0x00000001,\
+0xf4,0xfc,0xff,0xff,0x00,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+
+; Available file systems
+HKLM,"SOFTWARE\ReactOS\ReactOS\CurrentVersion\IFS","FAT",0x00000000,"ufat.dll"
+HKLM,"SOFTWARE\ReactOS\ReactOS\CurrentVersion\IFS","FAT32",0x00000000,"ufat.dll"
+HKLM,"SOFTWARE\ReactOS\ReactOS\CurrentVersion\IFS","FATX",0x00000000,"ufatx.dll"
+
+; Winlogon settings
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","ConsoleShell",0x00020000,"%SystemRoot%\system32\cmd.exe"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","Shell",0x00020000,"%SystemRoot%\explorer.exe"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","Userinit",0x00020000,"%SystemRoot%\system32\userinit.exe"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","AutoAdminLogon",0x00000000,"1"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","DefaultDomain",0x00000000,""
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","DefaultUserName",0x00000000,""
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","DefaultPassword",0x00000000,""
+
+; Time Zone Servers
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers","1",0x00000000,"pool.ntp.org"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers","2",0x00000000,"asia.pool.ntp.org"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers","3",0x00000000,"europe.pool.ntp.org"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers","4",0x00000000,"north-america.pool.ntp.org"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers","5",0x00000000,"oceania.pool.ntp.org"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers","6",0x00000000,"south-america.pool.ntp.org"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers","7",0x00000000,"time.windows.com"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers","8",0x00000000,"time.nist.gov"
+
+; Telephony
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Locations","DisableCallWaiting",0x00010003,3
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Locations","DisableCallWaiting0",2,"*70,"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Locations","DisableCallWaiting1",2,"70#,"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Locations","DisableCallWaiting2",2,"1170,"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\tapi3",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Terminal Manager",,0x00000012
+
+; Country Codes
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List","CountryListVersion",0x00010001,0x00000019
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\1","CountryCode",0x00010001,0x00000001
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\1","Name",0x00000000,"%COUNTRY_US%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\106","CountryCode",0x00010001,0x0000006A
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\106","Name",0x00000000,"%COUNTRY_VG%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\107","CountryCode",0x00010001,0x0000006B
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\107","Name",0x00000000,"%COUNTRY_CA%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\109","CountryCode",0x00010001,0x0000006D
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\109","Name",0x00000000,"%COUNTRY_DM%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\110","CountryCode",0x00010001,0x0000006E
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\110","Name",0x00000000,"%COUNTRY_DO%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\20","CountryCode",0x00010001,0x00000014
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\20","Name",0x00000000,"%COUNTRY_EG%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\268","CountryCode",0x00010001,0x0000010c
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\268","Name",0x00000000,"%COUNTRY_SZ%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\27","CountryCode",0x00010001,0x0000001b
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\27","Name",0x00000000,"%COUNTRY_ZA%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\30","CountryCode",0x00010001,0x0000001e
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\30","Name",0x00000000,"%COUNTRY_GR%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\31","CountryCode",0x00010001,0x0000001f
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\31","Name",0x00000000,"%COUNTRY_NL%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\32","CountryCode",0x00010001,0x00000020
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\32","Name",0x00000000,"%COUNTRY_BE%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\33","CountryCode",0x00010001,0x00000021
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\33","Name",0x00000000,"%COUNTRY_FR%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\34","CountryCode",0x00010001,0x00000022
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\34","Name",0x00000000,"%COUNTRY_ES%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\351","CountryCode",0x00010001,0x0000015f
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\351","Name",0x00000000,"%COUNTRY_PT%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\352","CountryCode",0x00010001,0x00000160
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\352","Name",0x00000000,"%COUNTRY_LU%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\353","CountryCode",0x00010001,0x00000161
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\353","Name",0x00000000,"%COUNTRY_IE%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\354","CountryCode",0x00010001,0x00000162
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\354","Name",0x00000000,"%COUNTRY_IS%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\355","CountryCode",0x00010001,0x00000163
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\355","Name",0x00000000,"%COUNTRY_AL%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\358","CountryCode",0x00010001,0x00000166
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\358","Name",0x00000000,"%COUNTRY_FI%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\359","CountryCode",0x00010001,0x00000167
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\359","Name",0x00000000,"%COUNTRY_BG%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\36","CountryCode",0x00010001,0x00000024
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\36","Name",0x00000000,"%COUNTRY_HU%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\370","CountryCode",0x00010001,0x00000172
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\370","Name",0x00000000,"%COUNTRY_LT%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\371","CountryCode",0x00010001,0x00000173
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\371","Name",0x00000000,"%COUNTRY_LV%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\372","CountryCode",0x00010001,0x00000174
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\372","Name",0x00000000,"%COUNTRY_EE%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\373","CountryCode",0x00010001,0x00000175
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\373","Name",0x00000000,"%COUNTRY_MD%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\374","CountryCode",0x00010001,0x00000176
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\374","Name",0x00000000,"%COUNTRY_AM%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\380","CountryCode",0x00010001,0x0000017c
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\380","Name",0x00000000,"%COUNTRY_UA%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\381","CountryCode",0x00010001,0x0000017d
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\381","Name",0x00000000,"%COUNTRY_RS%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\385","CountryCode",0x00010001,0x00000181
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\385","Name",0x00000000,"%COUNTRY_HR%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\386","CountryCode",0x00010001,0x00000182
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\386","Name",0x00000000,"%COUNTRY_SI%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\387","CountryCode",0x00010001,0x00000183
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\387","Name",0x00000000,"%COUNTRY_BA%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\39","CountryCode",0x00010001,0x00000027
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\39","Name",0x00000000,"%COUNTRY_IT%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\40","CountryCode",0x00010001,0x00000028
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\40","Name",0x00000000,"%COUNTRY_RO%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\41","CountryCode",0x00010001,0x00000029
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\41","Name",0x00000000,"%COUNTRY_CH%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\420","CountryCode",0x00010001,0x000001a4
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\420","Name",0x00000000,"%COUNTRY_CZ%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\421","CountryCode",0x00010001,0x000001a5
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\421","Name",0x00000000,"%COUNTRY_SK%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\423","CountryCode",0x00010001,0x000001a7
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\423","Name",0x00000000,"%COUNTRY_LI%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\43","CountryCode",0x00010001,0x0000002b
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\43","Name",0x00000000,"%COUNTRY_AT%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\44","CountryCode",0x00010001,0x0000002c
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\44","Name",0x00000000,"%COUNTRY_UK%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\45","CountryCode",0x00010001,0x0000002D
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\45","Name",0x00000000,"%COUNTRY_DK%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\46","CountryCode",0x00010001,0x0000002e
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\46","Name",0x00000000,"%COUNTRY_SE%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\47","CountryCode",0x00010001,0x0000002f
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\47","Name",0x00000000,"%COUNTRY_NO%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\48","CountryCode",0x00010001,0x00000030
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\48","Name",0x00000000,"%COUNTRY_PL%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\49","CountryCode",0x00010001,0x00000031
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\49","Name",0x00000000,"%COUNTRY_DE%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\52","CountryCode",0x00010001,0x00000034
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\52","Name",0x00000000,"%COUNTRY_MX%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\54","CountryCode",0x00010001,0x00000036
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\54","Name",0x00000000,"%COUNTRY_AR%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\55","CountryCode",0x00010001,0x00000037
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\55","Name",0x00000000,"%COUNTRY_BR%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\56","CountryCode",0x00010001,0x00000038
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\56","Name",0x00000000,"%COUNTRY_CL%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\57","CountryCode",0x00010001,0x00000039
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\57","Name",0x00000000,"%COUNTRY_CO%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\58","CountryCode",0x00010001,0x0000003a
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\58","Name",0x00000000,"%COUNTRY_VE%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\60","CountryCode",0x00010001,0x0000003c
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\60","Name",0x00000000,"%COUNTRY_MY%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\61","CountryCode",0x00010001,0x0000003d
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\61","Name",0x00000000,"%COUNTRY_AU%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\62","CountryCode",0x00010001,0x0000003e
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\62","Name",0x00000000,"%COUNTRY_ID%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\63","CountryCode",0x00010001,0x0000003f
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\63","Name",0x00000000,"%COUNTRY_PH%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\64","CountryCode",0x00010001,0x00000040
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\64","Name",0x00000000,"%COUNTRY_NZ%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\66","CountryCode",0x00010001,0x00000042
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\66","Name",0x00000000,"%COUNTRY_TH%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\7","CountryCode",0x00010001,0x00000007
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\7","Name",0x00000000,"%COUNTRY_RU%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\705","CountryCode",0x00010001,0x000002C1
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\705","Name",0x00000000,"%COUNTRY_KZ%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\708","CountryCode",0x00010001,0x000002C4
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\708","Name",0x00000000,"%COUNTRY_TJ%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\81","CountryCode",0x00010001,0x00000051
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\81","Name",0x00000000,"%COUNTRY_JP%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\82","CountryCode",0x00010001,0x00000052
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\82","Name",0x00000000,"%COUNTRY_KR%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\850","CountryCode",0x00010001,0x00000352
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\850","Name",0x00000000,"%COUNTRY_KP%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\86","CountryCode",0x00010001,0x00000056
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\86","Name",0x00000000,"%COUNTRY_CN%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\886","CountryCode",0x00010001,0x00000376
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\886","Name",0x00000000,"%COUNTRY_TW%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\90","CountryCode",0x00010001,0x0000005a
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\90","Name",0x00000000,"%COUNTRY_TR%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\91","CountryCode",0x00010001,0x0000005b
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\91","Name",0x00000000,"%COUNTRY_IN%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\93","CountryCode",0x00010001,0x0000005d
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\93","Name",0x00000000,"%COUNTRY_AF%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\960","CountryCode",0x00010001,0x000003c0
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\960","Name",0x00000000,"%COUNTRY_MV%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\964","CountryCode",0x00010001,0x000003c4
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\964","Name",0x00000000,"%COUNTRY_IQ%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\966","CountryCode",0x00010001,0x000003c6
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\966","Name",0x00000000,"%COUNTRY_SA%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\971","CountryCode",0x00010001,0x000003cb
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\971","Name",0x00000000,"%COUNTRY_AE%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\972","CountryCode",0x00010001,0x000003cc
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\972","Name",0x00000000,"%COUNTRY_IL%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\974","CountryCode",0x00010001,0x000003ce
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\974","Name",0x00000000,"%COUNTRY_QA%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\976","CountryCode",0x00010001,0x000003d0
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\976","Name",0x00000000,"%COUNTRY_MN%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\977","CountryCode",0x00010001,0x000003d1
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\977","Name",0x00000000,"%COUNTRY_NP%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\98","CountryCode",0x00010001,0x00000062
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\98","Name",0x00000000,"%COUNTRY_IR%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\993","CountryCode",0x00010001,0x000003e1
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\993","Name",0x00000000,"%COUNTRY_TM%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\994","CountryCode",0x00010001,0x000003e2
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\994","Name",0x00000000,"%COUNTRY_AZ%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\995","CountryCode",0x00010001,0x000003e3
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\995","Name",0x00000000,"%COUNTRY_GE%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\996","CountryCode",0x00010001,0x000003e4
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\996","Name",0x00000000,"%COUNTRY_KG%"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\998","CountryCode",0x00010001,0x000003e6
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\998","Name",0x00000000,"%COUNTRY_UZ%"
+
+; PowerCfg
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg","LastID",0x00000002,"0"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg","DiskSpinDownMax",0x00000002,"3600"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg","DiskSpinDownMin",0x00000002,"3"
+
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\GlobalPowerPolicy","Policies",0x00030003,\
+01,00,00,00,01,00,00,00,01,00,00,00,03,00,00,00
+
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\PowerPolicies\0","Policies",0x00030003,\
+01,00,00,00,02,00,00,00,04,00,00,00,02,00,00,00,02,00,00,00,00,00,00,00,84,03,00,00,00,00,00,00,84,03,00,00,32,\
+32,00,00,02,00,00,00,04,00,00,C0,00,00,00,00,02,00,00,00,04,00,00,C0,00,00,00,00
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\PowerPolicies\1","Policies",0x00030003,\
+01,00,00,00,02,00,00,00,03,00,00,00,03,00,00,00,03,00,00,00,60,09,00,00,2C,01,00,00,80,25,00,00,F4,1A,00,00,32,\
+32,00,00,02,00,00,00,04,00,00,C0,00,00,00,00,02,00,00,00,04,00,00,C0,00,00,00,00
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\PowerPolicies\2","Policies",0x00030003,\
+01,00,00,00,02,00,00,00,03,00,00,00,02,00,00,00,02,00,00,00,00,00,00,00,84,03,00,00,00,00,00,00,9C,18,00,00,32,\
+32,00,00,02,00,00,00,04,00,00,C0,00,00,00,00,02,00,00,00,04,00,00,C0,00,00,00,00
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\PowerPolicies\3","Policies",0x00030003,\
+01,00,00,00,02,00,00,00,04,00,00,00,02,00,00,00,02,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,5A,\
+5A,00,00,02,00,00,00,04,00,00,C0,00,00,00,00,02,00,00,00,04,00,00,C0,00,00,00,00
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\PowerPolicies\4","Policies",0x00030003,\
+01,00,00,00,02,00,00,00,04,00,00,00,02,00,00,00,02,00,00,00,00,00,00,00,08,07,00,00,00,00,00,00,04,29,00,00,5A,\
+5A,00,00,02,00,00,00,04,00,00,C0,00,00,00,00,02,00,00,00,04,00,00,C0,00,00,00,00
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\PowerPolicies\5","Policies",0x00030003,\
+01,00,00,00,02,00,00,00,04,00,00,00,03,00,00,00,03,00,00,00,DC,05,00,00,B4,00,00,00,DC,05,00,00,98,0D,00,00,32,\
+0A,00,00,02,00,00,00,04,00,00,C0,00,00,00,00,02,00,00,00,04,00,00,C0,00,00,00,00
+
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\ProcessorPolicies\0","Policies",0x00030001,\
+01,00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,03,00,00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,28,32,00,00,02,00,\
+00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,28,3C,00,00,03,00,00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,28,50,00,00,\
+01,00,00,00,01,00,00,00,03,00,00,00,00,00,00,00,03,00,00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,0A,14,00,00,02,00,\
+00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,14,28,00,00,03,00,00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,14,46,00,00,\
+01,00,00,00
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\ProcessorPolicies\1","Policies",0x00030001,\
+01,00,00,00,01,00,00,00,03,00,00,00,00,00,00,00,03,00,00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,28,32,00,00,02,00,\
+00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,28,3C,00,00,03,00,00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,28,50,00,00,\
+01,00,00,00,01,00,00,00,03,00,00,00,00,00,00,00,03,00,00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,0A,14,00,00,02,00,\
+00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,14,28,00,00,03,00,00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,14,46,00,00,\
+01,00,00,00
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\ProcessorPolicies\2","Policies",0x00030001,\
+01,00,00,00,01,00,00,00,03,00,00,00,00,00,00,00,03,00,00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,28,32,00,00,02,00,\
+00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,28,3C,00,00,03,00,00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,28,50,00,00,\
+01,00,00,00,01,00,00,00,02,00,00,00,00,00,00,00,03,00,00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,0A,14,00,00,02,00,\
+00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,14,28,00,00,03,00,00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,14,46,00,00,\
+01,00,00,00
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\ProcessorPolicies\3","Policies",0x00030001,\
+01,00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,03,00,00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,28,32,00,00,02,00,\
+00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,28,3C,00,00,03,00,00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,28,50,00,00,\
+01,00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,03,00,00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,0A,14,00,00,02,00,\
+00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,14,28,00,00,03,00,00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,14,50,00,00,\
+01,00,00,00
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\ProcessorPolicies\4","Policies",0x00030001,\
+01,00,00,00,01,00,00,00,03,00,00,00,00,00,00,00,03,00,00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,28,32,00,00,02,00,\
+00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,28,3C,00,00,03,00,00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,28,50,00,00,\
+01,00,00,00,01,00,00,00,03,00,00,00,00,00,00,00,03,00,00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,0A,14,00,00,02,00,\
+00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,14,28,00,00,03,00,00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,14,46,00,00,\
+01,00,00,00
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\ProcessorPolicies\5","Policies",0x00030001,\
+01,00,00,00,01,00,00,00,03,00,00,00,00,00,00,00,03,00,00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,28,32,00,00,02,00,\
+00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,28,3C,00,00,02,00,00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,28,50,00,00,\
+01,00,00,00,01,00,00,00,02,00,00,00,00,00,00,00,03,00,00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,0A,14,00,00,02,00,\
+00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,14,28,00,00,02,00,00,00,A0,86,01,00,A0,86,01,00,A0,86,01,00,14,41,00,00,\
+01,00,00,00
+
+; deskadp.dll shell extension
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\Device\shellex\PropertySheetHandlers\Display Adapter CPL Extension","",0x00000000,"{42071712-76d4-11d1-8b24-00a0c9068ff3}"
+
+; deskmon.dll shell extension
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\Device\shellex\PropertySheetHandlers\Display Monitor CPL Extension","",0x00000000,"{42071713-76d4-11d1-8b24-00a0c9068ff3}"
+
+HKLM,"SOFTWARE\Microsoft\Ole","EnableDCOM",0x00000000,"Y"
+HKLM,"SOFTWARE\Microsoft\Ole","EnableRemoteConnect",0x00000000,"N"
+
+; Keyboard layout switcher
+;HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Run","kbswitch",0x00000000,"kbswitch.exe"
+
+; SvcHost services
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\SvcHost",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\SvcHost", "netsvcs",0x00010000,"DHCP","BITS"
+
+; Win32 config
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows","AppInit_DLLs",0x00000000,""
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows","DeviceNotSelectedTimeout",0x00000000,"15"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows","GDIProcessHandleQuota",0x00010001,0x2710
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows","Spooler",0x00000000,"yes"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows","swapdisk",0x00000000,""
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows","TransmissionRetryTimeout",0x00000000,"90"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows","USERProcessHandleQuota",0x00010001,0x2710
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows","DesktopHeapLogging",0x00010001,0x1
+
+;-------------------------------- STRINGS -------------------------------
+
+[Strings]
+COUNTRY_AD="Andorra"
+COUNTRY_AE="United Arab Emirates"
+COUNTRY_AF="Afghanistan"
+COUNTRY_AG="Antigua and Barbuda"
+COUNTRY_AI="Anguilla"
+COUNTRY_AL="Albania"
+COUNTRY_AM="Armenia"
+COUNTRY_AO="Angola"
+COUNTRY_AQ="Antarctica"
+COUNTRY_AR="Argentina"
+COUNTRY_AS="American Samoa"
+COUNTRY_AT="Austria"
+COUNTRY_AU="Australia"
+COUNTRY_AW="Aruba"
+COUNTRY_AX="Åland Islands"
+COUNTRY_AZ="Azerbaijan"
+COUNTRY_BA="Bosnia and Herzegovina"
+COUNTRY_BB="Barbados"
+COUNTRY_BD="Bangladesh"
+COUNTRY_BE="Belgium"
+COUNTRY_BF="Burkina Faso"
+COUNTRY_BG="Bulgaria"
+COUNTRY_BH="Bahrain"
+COUNTRY_BI="Burundi"
+COUNTRY_BJ="Benin"
+COUNTRY_BL="Saint Barthélemy"
+COUNTRY_BM="Bermuda"
+COUNTRY_BN="Brunei Darussalam"
+COUNTRY_BO="Bolivia, Plurinational State of"
+COUNTRY_BQ="Bonaire, Saint Eustatius and Saba"
+COUNTRY_BR="Brazil"
+COUNTRY_BS="Bahamas"
+COUNTRY_BT="Bhutan"
+COUNTRY_BV="Bouvet Island"
+COUNTRY_BW="Botswana"
+COUNTRY_BY="Belarus"
+COUNTRY_BZ="Belize"
+COUNTRY_CA="Canada"
+COUNTRY_CC="Cocos (Keeling) Islands"
+COUNTRY_CD="Congo, the Democratic Republic of the"
+COUNTRY_CF="Central African Republic"
+COUNTRY_CG="Congo"
+COUNTRY_CH="Switzerland"
+COUNTRY_CI="Côte d'Ivoire"
+COUNTRY_CK="Cook Islands"
+COUNTRY_CL="Chile"
+COUNTRY_CM="Cameroon"
+COUNTRY_CN="China"
+COUNTRY_CO="Colombia"
+COUNTRY_CR="Costa Rica"
+COUNTRY_CU="Cuba"
+COUNTRY_CV="Cape Verde"
+COUNTRY_CW="Curaçao"
+COUNTRY_CX="Christmas Island"
+COUNTRY_CY="Cyprus"
+COUNTRY_CZ="Czech Republic"
+COUNTRY_DE="Germany"
+COUNTRY_DJ="Djibouti"
+COUNTRY_DK="Denmark"
+COUNTRY_DM="Dominica"
+COUNTRY_DO="Dominican Republic"
+COUNTRY_DZ="Algeria"
+COUNTRY_EC="Ecuador"
+COUNTRY_EE="Estonia"
+COUNTRY_EG="Egypt"
+COUNTRY_EH="Western Sahara"
+COUNTRY_ER="Eritrea"
+COUNTRY_ES="Spain"
+COUNTRY_ET="Ethiopia"
+COUNTRY_FI="Finland"
+COUNTRY_FJ="Fiji"
+COUNTRY_FK="Falkland Islands (Malvinas)"
+COUNTRY_FM="Micronesia, Federated States of"
+COUNTRY_FO="Faroe Islands"
+COUNTRY_FR="France"
+COUNTRY_GA="Gabon"
+COUNTRY_GD="Grenada"
+COUNTRY_GE="Georgia"
+COUNTRY_GF="French Guiana"
+COUNTRY_GG="Guernsey"
+COUNTRY_GH="Ghana"
+COUNTRY_GI="Gibraltar"
+COUNTRY_GL="Greenland"
+COUNTRY_GM="Gambia"
+COUNTRY_GN="Guinea"
+COUNTRY_GP="Guadeloupe"
+COUNTRY_GQ="Equatorial Guinea"
+COUNTRY_GR="Greece"
+COUNTRY_GS="South Georgia and the South Sandwich Islands"
+COUNTRY_GT="Guatemala"
+COUNTRY_GU="Guam"
+COUNTRY_GW="Guinea-Bissau"
+COUNTRY_GY="Guyana"
+COUNTRY_HK="Hong Kong"
+COUNTRY_HM="Heard Island and McDonald Islands"
+COUNTRY_HN="Honduras"
+COUNTRY_HR="Croatia"
+COUNTRY_HT="Haiti"
+COUNTRY_HU="Hungary"
+COUNTRY_ID="Indonesia"
+COUNTRY_IE="Ireland"
+COUNTRY_IL="Israel"
+COUNTRY_IM="Isle of Man"
+COUNTRY_IN="India"
+COUNTRY_IO="British Indian Ocean Territory"
+COUNTRY_IQ="Iraq"
+COUNTRY_IR="Iran, Islamic Republic of"
+COUNTRY_IS="Iceland"
+COUNTRY_IT="Italy"
+COUNTRY_JE="Jersey"
+COUNTRY_JM="Jamaica"
+COUNTRY_JO="Jordan"
+COUNTRY_JP="Japan"
+COUNTRY_KE="Kenya"
+COUNTRY_KG="Kyrgyzstan"
+COUNTRY_KH="Cambodia"
+COUNTRY_KI="Kiribati"
+COUNTRY_KM="Comoros"
+COUNTRY_KN="Saint Kitts and Nevis"
+COUNTRY_KP="Korea, Democratic People's Republic of"
+COUNTRY_KR="Korea, Republic of"
+COUNTRY_KW="Kuwait"
+COUNTRY_KY="Cayman Islands"
+COUNTRY_KZ="Kazakhstan"
+COUNTRY_LA="Lao People's Democratic Republic"
+COUNTRY_LB="Lebanon"
+COUNTRY_LC="Saint Lucia"
+COUNTRY_LI="Liechtenstein"
+COUNTRY_LK="Sri Lanka"
+COUNTRY_LR="Liberia"
+COUNTRY_LS="Lesotho"
+COUNTRY_LT="Lithuania"
+COUNTRY_LU="Luxembourg"
+COUNTRY_LV="Latvia"
+COUNTRY_LY="Libyan Arab Jamahiriya"
+COUNTRY_MA="Morocco"
+COUNTRY_MC="Monaco"
+COUNTRY_MD="Moldova, Republic of"
+COUNTRY_ME="Montenegro"
+COUNTRY_MF="Saint Martin (French part)"
+COUNTRY_MG="Madagascar"
+COUNTRY_MH="Marshall Islands"
+COUNTRY_MK="Macedonia, the former Yugoslav Republic of"
+COUNTRY_ML="Mali"
+COUNTRY_MM="Myanmar"
+COUNTRY_MN="Mongolia"
+COUNTRY_MO="Macao"
+COUNTRY_MP="Northern Mariana Islands"
+COUNTRY_MQ="Martinique"
+COUNTRY_MR="Mauritania"
+COUNTRY_MS="Montserrat"
+COUNTRY_MT="Malta"
+COUNTRY_MU="Mauritius"
+COUNTRY_MV="Maldives"
+COUNTRY_MW="Malawi"
+COUNTRY_MX="Mexico"
+COUNTRY_MY="Malaysia"
+COUNTRY_MZ="Mozambique"
+COUNTRY_NA="Namibia"
+COUNTRY_NC="New Caledonia"
+COUNTRY_NE="Niger"
+COUNTRY_NF="Norfolk Island"
+COUNTRY_NG="Nigeria"
+COUNTRY_NI="Nicaragua"
+COUNTRY_NL="Netherlands"
+COUNTRY_NO="Norway"
+COUNTRY_NP="Nepal"
+COUNTRY_NR="Nauru"
+COUNTRY_NU="Niue"
+COUNTRY_NZ="New Zealand"
+COUNTRY_OM="Oman"
+COUNTRY_PA="Panama"
+COUNTRY_PE="Peru"
+COUNTRY_PF="French Polynesia"
+COUNTRY_PG="Papua New Guinea"
+COUNTRY_PH="Philippines"
+COUNTRY_PK="Pakistan"
+COUNTRY_PL="Poland"
+COUNTRY_PM="Saint Pierre and Miquelon"
+COUNTRY_PN="Pitcairn"
+COUNTRY_PR="Puerto Rico"
+COUNTRY_PS="Palestinian Territory, Occupied"
+COUNTRY_PT="Portugal"
+COUNTRY_PW="Palau"
+COUNTRY_PY="Paraguay"
+COUNTRY_QA="Qatar"
+COUNTRY_RE="Réunion"
+COUNTRY_RO="Romania"
+COUNTRY_RS="Serbia"
+COUNTRY_RU="Russian Federation"
+COUNTRY_RW="Rwanda"
+COUNTRY_SA="Saudi Arabia"
+COUNTRY_SB="Solomon Islands"
+COUNTRY_SC="Seychelles"
+COUNTRY_SD="Sudan"
+COUNTRY_SE="Sweden"
+COUNTRY_SG="Singapore"
+COUNTRY_SH="Saint Helena, Ascension and Tristan da Cunha"
+COUNTRY_SI="Slovenia"
+COUNTRY_SJ="Svalbard and Jan Mayen"
+COUNTRY_SK="Slovakia"
+COUNTRY_SL="Sierra Leone"
+COUNTRY_SM="San Marino"
+COUNTRY_SN="Senegal"
+COUNTRY_SO="Somalia"
+COUNTRY_SR="Suriname"
+COUNTRY_ST="Sao Tome and Principe"
+COUNTRY_SV="El Salvador"
+COUNTRY_SX="Sint Maarten (Dutch part)"
+COUNTRY_SY="Syrian Arab Republic"
+COUNTRY_SZ="Swaziland"
+COUNTRY_TC="Turks and Caicos Islands"
+COUNTRY_TD="Chad"
+COUNTRY_TF="French Southern Territories"
+COUNTRY_TG="Togo"
+COUNTRY_TH="Thailand"
+COUNTRY_TJ="Tajikistan"
+COUNTRY_TK="Tokelau"
+COUNTRY_TL="Timor-Leste"
+COUNTRY_TM="Turkmenistan"
+COUNTRY_TN="Tunisia"
+COUNTRY_TO="Tonga"
+COUNTRY_TR="Turkey"
+COUNTRY_TT="Trinidad and Tobago"
+COUNTRY_TV="Tuvalu"
+COUNTRY_TW="Taiwan, Province of China"
+COUNTRY_TZ="Tanzania, United Republic of"
+COUNTRY_UA="Ukraine"
+COUNTRY_UG="Uganda"
+COUNTRY_UK="United Kingdom"
+COUNTRY_UM="United States Minor Outlying Islands"
+COUNTRY_US="United States of America"
+COUNTRY_UY="Uruguay"
+COUNTRY_UZ="Uzbekistan"
+COUNTRY_VA="Holy See (Vatican City State)"
+COUNTRY_VC="Saint Vincent and the Grenadines"
+COUNTRY_VE="Venezuela, Bolivarian Republic of"
+COUNTRY_VG="Virgin Islands, British"
+COUNTRY_VI="Virgin Islands, U.S."
+COUNTRY_VN="Vietnam"
+COUNTRY_VU="Vanuatu"
+COUNTRY_WF="Wallis and Futuna"
+COUNTRY_WS="Samoa"
+COUNTRY_YE="Yemen"
+COUNTRY_YT="Mayotte"
+COUNTRY_ZA="South Africa"
+COUNTRY_ZM="Zambia"
+COUNTRY_ZW="Zimbabwe"
+
+
+; LANG_GERMAN SUBLANG_NEUTRAL
+[Strings.0007]
+COUNTRY_AE="Vereinigte Arabische Emirate"
+COUNTRY_AG="Antigua und Barbuda"
+COUNTRY_AL="Albanien"
+COUNTRY_AM="Armenien"
+COUNTRY_AQ="Antarktis"
+COUNTRY_AR="Argentinien"
+COUNTRY_AS="Amerikanisch Samoa"
+COUNTRY_AT="Österreich"
+COUNTRY_AU="Australien"
+COUNTRY_AX="Åland Inseln"
+COUNTRY_AZ="Aserbaidschan"
+COUNTRY_BA="Bosnien und Herzegowina"
+COUNTRY_BE="Belgien"
+COUNTRY_BG="Bulgarien"
+COUNTRY_BO="Bolivien, Plurinationaler Staat"
+COUNTRY_BQ="Bonaire, Saint Eustatius und Saba"
+COUNTRY_BR="Brasilien"
+COUNTRY_BV="Bouvetinsel"
+COUNTRY_BY="Weißrussland"
+COUNTRY_CA="Kanada"
+COUNTRY_CC="Kokosinseln"
+COUNTRY_CD="Kongo, Demokratische Republic"
+COUNTRY_CF="Zentralafrikanische Republik"
+COUNTRY_CG="Kongo"
+COUNTRY_CH="Schweiz"
+COUNTRY_CI="Elfenbeinküste"
+COUNTRY_CK="Cookinseln"
+COUNTRY_CM="Kamerun"
+COUNTRY_CO="Kolumbien"
+COUNTRY_CU="Kuba"
+COUNTRY_CV="Kap Verde"
+COUNTRY_CW="Curaçao"
+COUNTRY_CX="Weihnachtsinsel"
+COUNTRY_CY="Zypern"
+COUNTRY_CZ="Tschechien"
+COUNTRY_DE="Deutschland"
+COUNTRY_DJ="Dschibuti"
+COUNTRY_DK="Dänemark"
+COUNTRY_DO="Dominikanische Republik"
+COUNTRY_DZ="Algerien"
+COUNTRY_EE="Estland"
+COUNTRY_EG="Ägypten"
+COUNTRY_EH="Westsahara"
+COUNTRY_ES="Spanien"
+COUNTRY_ET="Äthiopien"
+COUNTRY_FI="Finnland"
+COUNTRY_FJ="Fidschi"
+COUNTRY_FK="Falklandinseln (Malwinen)"
+COUNTRY_FM="Mikronesien, Föderierte Staateb von"
+COUNTRY_FO="Färöer Inseln"
+COUNTRY_FR="Frankreich"
+COUNTRY_GA="Gabun"
+COUNTRY_GE="Georgien"
+COUNTRY_GF="Französisch Guayana"
+COUNTRY_GL="Grönland"
+COUNTRY_GQ="Äquatorial Guinea"
+COUNTRY_GR="Griechenland"
+COUNTRY_GS="Südgeorgien und die Südlichen Sandwichinseln"
+COUNTRY_GY="Guayana"
+COUNTRY_HM="Heard und McDonaldinseln"
+COUNTRY_HR="Kroatien"
+COUNTRY_HU="Ungarn"
+COUNTRY_ID="Indonesien"
+COUNTRY_IE="Irland"
+COUNTRY_IN="Indien"
+COUNTRY_IO="Britisches Territorium im Indischen Ozean"
+COUNTRY_IQ="Irak"
+COUNTRY_IR="Iran, Islamische Republik"
+COUNTRY_IS="Island"
+COUNTRY_IT="Italien"
+COUNTRY_JM="Jamaika"
+COUNTRY_JO="Jordanien"
+COUNTRY_KE="Kenia"
+COUNTRY_KG="Kirgistan"
+COUNTRY_KH="Kambodscha"
+COUNTRY_KM="Komoren"
+COUNTRY_KN="Saint Kitts und Nevis"
+COUNTRY_KP="Korea, Demokratische Volksrepublik"
+COUNTRY_KR="Korea, Republik"
+COUNTRY_KY="Kaymaninseln"
+COUNTRY_KZ="Kasachstan"
+COUNTRY_LA="Laos, Demokratische Volksrepublik"
+COUNTRY_LB="Libanon"
+COUNTRY_LT="Litauen"
+COUNTRY_LU="Luxemburg"
+COUNTRY_LV="Lettland"
+COUNTRY_LY="Libyen"
+COUNTRY_MA="Morokko"
+COUNTRY_MD="Moldau, Republik"
+COUNTRY_MF="Saint Martin (Französischer Teil)"
+COUNTRY_MG="Madagaskar"
+COUNTRY_MH="Marshallinseln"
+COUNTRY_MK="Mazedonien, Ehemalige Jugoslawische Republik"
+COUNTRY_MN="Mongolei"
+COUNTRY_MP="Nördliche Marianen"
+COUNTRY_MR="Mauretanien"
+COUNTRY_MV="Malediven"
+COUNTRY_MX="Mexiko"
+COUNTRY_MZ="Mosambik"
+COUNTRY_NC="Neukaledonien"
+COUNTRY_NF="Norfolkinsel"
+COUNTRY_NI="Nikaragua"
+COUNTRY_NL="Niederlande"
+COUNTRY_NO="Norwegen"
+COUNTRY_NZ="Neuseeland"
+COUNTRY_PF="Französisch Polynesien"
+COUNTRY_PG="Papua-Neuguinea"
+COUNTRY_PH="Philippinen"
+COUNTRY_PL="Polen"
+COUNTRY_PM="Saint Pierre und Miquelon"
+COUNTRY_PN="Pitcairn"
+COUNTRY_PS="Palästinensische Autonomiegebiete"
+COUNTRY_QA="Katar"
+COUNTRY_RO="Rumänien"
+COUNTRY_RS="Serbien"
+COUNTRY_RU="Russische Föderation"
+COUNTRY_RW="Ruanda"
+COUNTRY_SA="Saudi Arabien"
+COUNTRY_SB="Solomon-Inseln"
+COUNTRY_SC="Seychellen"
+COUNTRY_SE="Schweden"
+COUNTRY_SG="Singapur"
+COUNTRY_SH="Saint Helena, Ascension und Tristan da Cunha"
+COUNTRY_SI="Slowenien"
+COUNTRY_SJ="Spitzbergen"
+COUNTRY_SK="Slowakei"
+COUNTRY_ST="Sao Tome und Principe"
+COUNTRY_SX="Sint Maarten (Niederländischer Teil)"
+COUNTRY_SY="Syrien"
+COUNTRY_SZ="Swasiland"
+COUNTRY_TC="Turks- und Caicosinseln"
+COUNTRY_TD="Tschad"
+COUNTRY_TF="Französische Süd- und Antarktisgebiete"
+COUNTRY_TJ="Tadschikistan"
+COUNTRY_TL="Osttimor"
+COUNTRY_TN="Tunisien"
+COUNTRY_TR="Türkei"
+COUNTRY_TT="Trinidad und Tobago"
+COUNTRY_TW="Taiwan, Provinz"
+COUNTRY_TZ="Tansania, Vereinigte Republik"
+COUNTRY_UK="Vereinigtes Königreich von Großbritannien und Nordirland"
+COUNTRY_UM="United States Minor Outlying Islands"
+COUNTRY_US="Vereinigte Staaten von Amerika"
+COUNTRY_UZ="Usbekistan"
+COUNTRY_VA="Heiliger Stuhl (Vatikanstadt)"
+COUNTRY_VC="Saint Vincent und die Grenadinen"
+COUNTRY_VE="Venezuela, Bolivarische Republik"
+COUNTRY_VG="Jungferninseln, Britische"
+COUNTRY_VI="Jungferninseln, Amerikanische"
+COUNTRY_WF="Wallis und Futuna"
+COUNTRY_YE="Jemen"
+COUNTRY_ZA="Südafrika"
+COUNTRY_ZM="Sambia"
+COUNTRY_ZW="Simbabwe"
+
+
+; LANG_ROMANIAN SUBLANG_NEUTRAL
+[Strings.0018]
+COUNTRY_AD="Andorra, Principatul"
+COUNTRY_AE="Arabe Unite, Emiratele"
+COUNTRY_AF="Afghanistan, Republica Islamică"
+COUNTRY_AG="Antigua și Barbuda"
+COUNTRY_AI="Anguilla"
+COUNTRY_AL="Albania, Republica"
+COUNTRY_AM="Armenia, Republica"
+COUNTRY_AO="Angola, Republica"
+COUNTRY_AQ="Antarctica"
+COUNTRY_AR="Argentina, Republica"
+COUNTRY_AS="Americană, Samoa"
+COUNTRY_AT="Austria, Republica"
+COUNTRY_AU="Australia"
+COUNTRY_AW="Aruba"
+COUNTRY_AX="Åland, Insulele"
+COUNTRY_AZ="Azerbaidjan, Republica"
+COUNTRY_BA="Bosnia și Herzegovina"
+COUNTRY_BB="Barbados"
+COUNTRY_BD="Bangladeș, Republica Populară"
+COUNTRY_BE="Belgiei, Regatul"
+COUNTRY_BF="Burkina Faso"
+COUNTRY_BG="Bulgaria, Republica"
+COUNTRY_BH="Bahreinului, Regatul"
+COUNTRY_BI="Burundi, Republica"
+COUNTRY_BJ="Benin", Republica
+COUNTRY_BL="Barthélemy, Saint"
+COUNTRY_BM="Bermuda, Insulele"
+COUNTRY_BN="Brunei, Domiciliul Păcii, Statul"
+COUNTRY_BO="Boliviei, Statul plurinațional al"
+COUNTRY_BQ="Bonaire, Insula"
+COUNTRY_BR="Braziliei, Republica Federativă a"
+COUNTRY_BS="Bahamas"
+COUNTRY_BT="Bhutan, Regatul"
+COUNTRY_BV="Bouvet, Insula"
+COUNTRY_BW="Botswana, Republica"
+COUNTRY_BY="Belarus, Republica"
+COUNTRY_BZ="Belize"
+COUNTRY_CA="Canada"
+COUNTRY_CC="Cocos (Keeling), Insulele"
+COUNTRY_CD="Congo, Republica Democrată"
+COUNTRY_CF="Centrafricană, Republica"
+COUNTRY_CG="Congo, Republica"
+COUNTRY_CH="Elvețiană, Confederația"
+COUNTRY_CI="Coasta de Fildeș, Republica"
+COUNTRY_CK="Cook, Insulele"
+COUNTRY_CL="Chile, Republica"
+COUNTRY_CM="Camerunului, Republica"
+COUNTRY_CN="Chineză, Republica Populară"
+COUNTRY_CO="Columbia, Republica"
+COUNTRY_CR="Costa Rica, Republica"
+COUNTRY_CU="Cuba, Republica"
+COUNTRY_CV="Capului Verde, Republica"
+COUNTRY_CW="Curaçao"
+COUNTRY_CX="Crăciunului, Insula"
+COUNTRY_CY="Ciprului, Republica"
+COUNTRY_CZ="Cehă, Republica"
+COUNTRY_DE="Germania, Republica Federală"
+COUNTRY_DJ="Djibouti, Republica"
+COUNTRY_DK="Danemarcei, Regatul"
+COUNTRY_DM="Dominica"
+COUNTRY_DO="Dominicană, Republica"
+COUNTRY_DZ="Algeriană Democrată și Populară, Republica"
+COUNTRY_EC="Ecuador, Republica"
+COUNTRY_EE="Estoniei, Republica"
+COUNTRY_EG="Egipt"
+COUNTRY_EH="Sahara Occidentală"
+COUNTRY_ER="Eritreea, Statul"
+COUNTRY_ES="Spaniei, Regatul"
+COUNTRY_ET="Etiopiei, Republica Federală Democrată a"
+COUNTRY_FI="Finlandei, Republica"
+COUNTRY_FJ="Fiji, Republica Insulelor"
+COUNTRY_FK="Falkland, Insulele (Malvine)"
+COUNTRY_FM="Microneziei, Statele Federate ale"
+COUNTRY_FO="Feroe, Insulele"
+COUNTRY_FR="Franceză, Republica"
+COUNTRY_GA="Gaboneză, Republica"
+COUNTRY_GD="Grenada"
+COUNTRY_GE="Georgia (Gruzia)"
+COUNTRY_GF="Guiana Franceză"
+COUNTRY_GG="Guernsey"
+COUNTRY_GH="Ghana, Republica"
+COUNTRY_GI="Gibraltar"
+COUNTRY_GL="Groenlanda"
+COUNTRY_GM="Gambiei, Republica"
+COUNTRY_GN="Guineea, Republica"
+COUNTRY_GP="Guadelupa"
+COUNTRY_GQ="Guinea Ecuatorială, Republica"
+COUNTRY_GR="Grecia (Republica Elenă)"
+COUNTRY_GS="Georgia de Sud și Insulele Sandwich de Sud"
+COUNTRY_GT="Guatemala, Republica"
+COUNTRY_GU="Guam"
+COUNTRY_GW="Guineea-Bissau, Republica"
+COUNTRY_GY="Guyana, Republica Cooperativă"
+COUNTRY_HK="Hong Kong"
+COUNTRY_HM="Heard și Insulele McDonald, Insula"
+COUNTRY_HN="Honduras, Republica"
+COUNTRY_HR="Croația, Republica"
+COUNTRY_HT="Haiti, Republica"
+COUNTRY_HU="Ungară, Republica"
+COUNTRY_ID="Indonezia, Republica"
+COUNTRY_IE="Irlanda, Republica"
+COUNTRY_IL="Israel, Statul"
+COUNTRY_IM="Man, Insula"
+COUNTRY_IN="India, Republica"
+COUNTRY_IO="Britanic din Oceanul Indian, Teritoriul"
+COUNTRY_IQ="Irak, Republica"
+COUNTRY_IR="Iran, Republica Islamică"
+COUNTRY_IS="Islanda"
+COUNTRY_IT="Italiană, Republica"
+COUNTRY_JE="Jersey, Insula"
+COUNTRY_JM="Jamaica"
+COUNTRY_JO="Iordaniei, Regatul Hașemit al"
+COUNTRY_JP="Japonia"
+COUNTRY_KE="Kenya, Republica"
+COUNTRY_KG="Kîrgîză, Republica"
+COUNTRY_KH="Cambodgiei, Regatul"
+COUNTRY_KI="Kiribati, Republica"
+COUNTRY_KM="Comorelor, Uniunea"
+COUNTRY_KN="Cristofor și Nevis, Federația Sfântul"
+COUNTRY_KP="Coreeană, Republica Populară Democrată"
+COUNTRY_KR="Coreea, Republica"
+COUNTRY_KW="Kuweit, Statul"
+COUNTRY_KY="Cayman, Insulele"
+COUNTRY_KZ="Kazahstan, Republica"
+COUNTRY_LA="Lao, Republica Populară Democrată"
+COUNTRY_LB="Libaneză, Republica"
+COUNTRY_LC="Lucia, Sfânta"
+COUNTRY_LI="Liechtenstein, Principatul"
+COUNTRY_LK="Sri Lanka"
+COUNTRY_LR="Liberia, Republica"
+COUNTRY_LS="Lesotho, Regatul"
+COUNTRY_LT="Lituania, Republica"
+COUNTRY_LU="Luxemburg, Marele Ducat de"
+COUNTRY_LV="Letonia, Republica"
+COUNTRY_LY="Libia, Republica"
+COUNTRY_MA="Maroc, Regatul"
+COUNTRY_MC="Monaco, Principatul"
+COUNTRY_MD="Moldova, Republica"
+COUNTRY_ME="Muntenegru"
+COUNTRY_MF="Sfântul Martin (partea Franceză)"
+COUNTRY_MG="Madagascar, Republica"
+COUNTRY_MH="Marshall, Insulele"
+COUNTRY_MK="Macedonia, Republica"
+COUNTRY_ML="Mali, Republica"
+COUNTRY_MM="Myanmar, Uniunea"
+COUNTRY_MN="Mongolia"
+COUNTRY_MO="Macao a R.P. Chineze, Regiunea administrativă specială"
+COUNTRY_MP="Mariane de Nord, Comunitatea Insulelor"
+COUNTRY_MQ="Martinica, Regiunea"
+COUNTRY_MR="Mauritaniei, Republica Islamică a"
+COUNTRY_MS="Montserrat, Teritoriul Insulei"
+COUNTRY_MT="Malta, Republica"
+COUNTRY_MU="Mauritius, Republica"
+COUNTRY_MV="Maldives, Republica"
+COUNTRY_MW="Malawi, Republica"
+COUNTRY_MX="Mexicane, Statele Unite"
+COUNTRY_MY="Malaysia"
+COUNTRY_MZ="Mozambic, Republica"
+COUNTRY_NA="Namibia, Republica"
+COUNTRY_NC="Caledonie, Noua"
+COUNTRY_NE="Niger, Republica"
+COUNTRY_NF="Norfolk, Insula"
+COUNTRY_NG="Nigeria, Republica Federală"
+COUNTRY_NI="Nicaragua, Republica"
+COUNTRY_NL="Olandei, Regatul (Țărilor de Jos)"
+COUNTRY_NO="Norvegiei, Regatul"
+COUNTRY_NP="Nepal, Republica Federală Democrată"
+COUNTRY_NR="Nauru, Republica"
+COUNTRY_NU="Niue, Insula"
+COUNTRY_NZ="Noua Zeelandă (Aoteroa)"
+COUNTRY_OM="Oman, Sultanatul"
+COUNTRY_PA="Panama, Republica"
+COUNTRY_PE="Peru, Republica"
+COUNTRY_PF="Polinezia Franceză"
+COUNTRY_PG="Papua Noua Guinee"
+COUNTRY_PH="Filipinelor, Republica"
+COUNTRY_PK="Pakistan, Republica Islamică"
+COUNTRY_PL="Polonă, Republica"
+COUNTRY_PM="Saint Pierre și Miquelon"
+COUNTRY_PN="Pitcairn, Insula"
+COUNTRY_PR="Puerto Rico, Statul liber asociat"
+COUNTRY_PS="Palestiniene, Teritoriile"
+COUNTRY_PT="Portugheză, Republica"
+COUNTRY_PW="Palau, Republica"
+COUNTRY_PY="Paraguay, Republica"
+COUNTRY_QA="Qatar, Statul"
+COUNTRY_RE="Réunion, Regiunea"
+COUNTRY_RO="România"
+COUNTRY_RS="Serbia, Republica"
+COUNTRY_RU="Rusă, Federația"
+COUNTRY_RW="Rwanda, Republica"
+COUNTRY_SA="Arabiei Saudite, Regatul"
+COUNTRY_SB="Solomon, Insulele"
+COUNTRY_SC="Seychelles, Republica"
+COUNTRY_SD="Sudan, Republica"
+COUNTRY_SE="Suediei, Regatul"
+COUNTRY_SG="Singapore, Republica"
+COUNTRY_SH="Sfânta Elena, Ascension și Tristan da Cunha"
+COUNTRY_SI="Slovenia, Republica"
+COUNTRY_SJ="Svalbard și Jan Mayen"
+COUNTRY_SK="Slovacă, Republica"
+COUNTRY_SL="Sierra Leone"
+COUNTRY_SM="San Marino, Republica"
+COUNTRY_SN="Senegal, Republica"
+COUNTRY_SO="Somalia"
+COUNTRY_SR="Surinam, Republica"
+COUNTRY_ST="Sao Tome și Principe"
+COUNTRY_SV="El Salvador, Republica"
+COUNTRY_SX="Sfântul Martin (Antilele Olandeze), Insula"
+COUNTRY_SY="Siriană, Republica Arabă"
+COUNTRY_SZ="Swaziland, Regatul"
+COUNTRY_TC="Turks și Caicos, Insulele"
+COUNTRY_TD="Ciad, Republica"
+COUNTRY_TF="Franceze Australe și Antarctice, Teritoriile"
+COUNTRY_TG="Togoleză, Republica"
+COUNTRY_TH="Thailandei, Regatul"
+COUNTRY_TJ="Tajikistan, Republica"
+COUNTRY_TK="Tokelau, Insulele"
+COUNTRY_TL="Timorul de Est, Republica Democrată"
+COUNTRY_TM="Turkmenistan, Republica"
+COUNTRY_TN="Tunisiană, Republica"
+COUNTRY_TO="Tonga, Regatul"
+COUNTRY_TR="Turcia, Republica"
+COUNTRY_TT="Trinidad și Tobago, Republica"
+COUNTRY_TV="Tuvalu"
+COUNTRY_TW="Taiwan, Provincia Chineză"
+COUNTRY_TZ="Tanzaniei, Republica Unită a"
+COUNTRY_UA="Ucraina"
+COUNTRY_UG="Uganda, Republica"
+COUNTRY_UK="Regatul Unit al Marii Britanii"
+COUNTRY_UM="Statelor Unite, Insulele Minore Îndepărtate ale"
+COUNTRY_US="Statele Unite ale Americii"
+COUNTRY_UY="Uruguay, Republica Orientală"
+COUNTRY_UZ="Uzbekistan, Republica"
+COUNTRY_VA="Sfântul Scaun (Statul Cetății Vaticanului)"
+COUNTRY_VC="Sfântul Vicențiu și Grenadine"
+COUNTRY_VE="Venezuelei, Republica bolivariană a"
+COUNTRY_VG="Virgine Britanice, Insulele"
+COUNTRY_VI="Virgine Americane, Insulele"
+COUNTRY_VN="Vietnam, Republica Socialistă"
+COUNTRY_VU="Vanuatu, Republica"
+COUNTRY_WF="Wallis și Futuna"
+COUNTRY_WS="Samoa, Statul Independent"
+COUNTRY_YE="Yemen, Republica"
+COUNTRY_YT="Mayotte, Teritoriul"
+COUNTRY_ZA="Africa de Sud, Republica"
+COUNTRY_ZM="Zambia, Republica"
+COUNTRY_ZW="Zimbabwe, Republica"
+
+
+; LANG_RUSSIAN SUBLANG_NEUTRAL
+[Strings.0019]
+COUNTRY_AD="Андорра"
+COUNTRY_AE="Объединённые Арабские Эмираты"
+COUNTRY_AF="Афганистан"
+COUNTRY_AG="Антигуа и Барбуда"
+COUNTRY_AI="Ангилья"
+COUNTRY_AL="Албания"
+COUNTRY_AM="Армения"
+COUNTRY_AO="Ангола"
+COUNTRY_AQ="Антарктида"
+COUNTRY_AR="Аргентина"
+COUNTRY_AS="Американское Самоа"
+COUNTRY_AT="Австрия"
+COUNTRY_AU="Австралия"
+COUNTRY_AW="Аруба"
+COUNTRY_AX="Аландские острова"
+COUNTRY_AZ="Азербайджан"
+COUNTRY_BA="Босния и Герцеговина"
+COUNTRY_BB="Барбадос"
+COUNTRY_BD="Бангладеш"
+COUNTRY_BE="Бельгия"
+COUNTRY_BF="Буркина Фасо"
+COUNTRY_BG="Болгария"
+COUNTRY_BH="Бахрейн"
+COUNTRY_BI="Бурунди"
+COUNTRY_BJ="Бенин"
+COUNTRY_BL="Сен-Бартелеми"
+COUNTRY_BM="Бермуды"
+COUNTRY_BN="Бруней"
+COUNTRY_BO="Боливия"
+COUNTRY_BQ="Бонайре, Синт-Эстатиус и Саба"
+COUNTRY_BR="Бразилия"
+COUNTRY_BS="Багамы"
+COUNTRY_BT="Бутан"
+COUNTRY_BV="Буве"
+COUNTRY_BW="Ботсвана"
+COUNTRY_BY="Беларусь"
+COUNTRY_BZ="Белиз"
+COUNTRY_CA="Канада"
+COUNTRY_CC="Кокосовые (Килинг) острова"
+COUNTRY_CD="Конго, Демократическая Республика"
+COUNTRY_CF="Центральноафриканская Республика"
+COUNTRY_CG="Конго"
+COUNTRY_CH="Швейцария"
+COUNTRY_CI="Кот-д’Ивуар"
+COUNTRY_CK="Острова Кука"
+COUNTRY_CL="Чили"
+COUNTRY_CM="Камерун"
+COUNTRY_CN="Китай"
+COUNTRY_CO="Колумбия"
+COUNTRY_CR="Коста-Рика"
+COUNTRY_CU="Куба"
+COUNTRY_CV="Кабо-Верде"
+COUNTRY_CW="Кюрасао"
+COUNTRY_CX="Остров Рождества"
+COUNTRY_CY="Кипр"
+COUNTRY_CZ="Чехия"
+COUNTRY_DE="Германия"
+COUNTRY_DJ="Джибути"
+COUNTRY_DK="Дания"
+COUNTRY_DM="Доминика"
+COUNTRY_DO="Доминиканская Республика"
+COUNTRY_DZ="Алжир"
+COUNTRY_EC="Эквадор"
+COUNTRY_EE="Эстония"
+COUNTRY_EG="Египет"
+COUNTRY_EH="Западная Сахара"
+COUNTRY_ER="Эритрея"
+COUNTRY_ES="Испания"
+COUNTRY_ET="Эфиопия"
+COUNTRY_FI="Финляндия"
+COUNTRY_FJ="Фиджи"
+COUNTRY_FK="Фолклендские (Мальвинские) острова"
+COUNTRY_FM="Микронезия, Федеративные Штаты"
+COUNTRY_FO="Фарерские острова"
+COUNTRY_FR="Франция"
+COUNTRY_GA="Габон"
+COUNTRY_GD="Гренада"
+COUNTRY_GE="Грузия"
+COUNTRY_GF="Французская Гвиана"
+COUNTRY_GG="Гернси"
+COUNTRY_GH="Гана"
+COUNTRY_GI="Гибралтар"
+COUNTRY_GL="Гренландия"
+COUNTRY_GM="Гамбия"
+COUNTRY_GN="Гвинея"
+COUNTRY_GP="Гваделупа"
+COUNTRY_GQ="Экваториальная Гвинея"
+COUNTRY_GR="Греция"
+COUNTRY_GS="Южная Георгия и Южные Сандвичевы острова"
+COUNTRY_GT="Гватемала"
+COUNTRY_GU="Гуам"
+COUNTRY_GW="Гвинея-Бисау"
+COUNTRY_GY="Гайана"
+COUNTRY_HK="Гонконг"
+COUNTRY_HM="Остров Херд и Острова Макдональд"
+COUNTRY_HN="Гондурас"
+COUNTRY_HR="Хорватия"
+COUNTRY_HT="Гаити"
+COUNTRY_HU="Венгрия"
+COUNTRY_ID="Индонезия"
+COUNTRY_IE="Ирландия"
+COUNTRY_IL="Израиль"
+COUNTRY_IM="Остров Мэн"
+COUNTRY_IN="Индия"
+COUNTRY_IO="Британская территория в Индийском океане"
+COUNTRY_IQ="Ирак"
+COUNTRY_IR="Иран"
+COUNTRY_IS="Исландия"
+COUNTRY_IT="Италия"
+COUNTRY_JE="Джерси"
+COUNTRY_JM="Ямайка"
+COUNTRY_JO="Иордания"
+COUNTRY_JP="Япония"
+COUNTRY_KE="Кения"
+COUNTRY_KG="Киргизия"
+COUNTRY_KH="Камбоджа"
+COUNTRY_KI="Кирибати"
+COUNTRY_KM="Коморы"
+COUNTRY_KN="Сент-Китс и Невис"
+COUNTRY_KP="Корея, Народно-Демократическая Республика"
+COUNTRY_KR="Корея, Республика"
+COUNTRY_KW="Кувейт"
+COUNTRY_KY="Каймановы острова"
+COUNTRY_KZ="Казахстан"
+COUNTRY_LA="Лаос"
+COUNTRY_LB="Ливан"
+COUNTRY_LC="Сент-Люсия"
+COUNTRY_LI="Лихтенштейн"
+COUNTRY_LK="Шри-Ланка"
+COUNTRY_LR="Либерия"
+COUNTRY_LS="Лесото"
+COUNTRY_LT="Литва"
+COUNTRY_LU="Люксембург"
+COUNTRY_LV="Латвия"
+COUNTRY_LY="Ливия"
+COUNTRY_MA="Марокко"
+COUNTRY_MC="Монако"
+COUNTRY_MD="Молдова"
+COUNTRY_ME="Черногория"
+COUNTRY_MF="Сен-Мартен"
+COUNTRY_MG="Мадагаскар"
+COUNTRY_MH="Маршалловы Острова"
+COUNTRY_MK="Македония"
+COUNTRY_ML="Мали"
+COUNTRY_MM="Мьянма"
+COUNTRY_MN="Монголия"
+COUNTRY_MO="Макао"
+COUNTRY_MP="Северные Марианские острова"
+COUNTRY_MQ="Мартиника"
+COUNTRY_MR="Мавритания"
+COUNTRY_MS="Монтсеррат"
+COUNTRY_MT="Мальта"
+COUNTRY_MU="Маврикий"
+COUNTRY_MV="Мальдивы"
+COUNTRY_MW="Малави"
+COUNTRY_MX="Мексика"
+COUNTRY_MY="Малайзия"
+COUNTRY_MZ="Мозамбик"
+COUNTRY_NA="Намибия"
+COUNTRY_NC="Новая Каледония"
+COUNTRY_NE="Нигер"
+COUNTRY_NF="Остров Норфолк"
+COUNTRY_NG="Нигерия"
+COUNTRY_NI="Никарагуа"
+COUNTRY_NL="Нидерланды"
+COUNTRY_NO="Норвегия"
+COUNTRY_NP="Непал"
+COUNTRY_NR="Науру"
+COUNTRY_NU="Ниуэ"
+COUNTRY_NZ="Новая Зеландия"
+COUNTRY_OM="Оман"
+COUNTRY_PA="Панама"
+COUNTRY_PE="Перу"
+COUNTRY_PF="Французская Полинезия"
+COUNTRY_PG="Папуа — Новая Гвинея"
+COUNTRY_PH="Филиппины"
+COUNTRY_PK="Пакистан"
+COUNTRY_PL="Польша"
+COUNTRY_PM="Сен-Пьер и Микелон"
+COUNTRY_PN="Питкэрн"
+COUNTRY_PR="Пуэрто-Рико"
+COUNTRY_PS="Палестинская территория"
+COUNTRY_PT="Португалия"
+COUNTRY_PW="Палау"
+COUNTRY_PY="Парагвай"
+COUNTRY_QA="Катар"
+COUNTRY_RE="Реюньон"
+COUNTRY_RO="Румыния"
+COUNTRY_RS="Сербия"
+COUNTRY_RU="Россия"
+COUNTRY_RW="Руанда"
+COUNTRY_SA="Саудовская Аравия"
+COUNTRY_SB="Соломоновы Острова"
+COUNTRY_SC="Сейшелы"
+COUNTRY_SD="Судан"
+COUNTRY_SE="Швеция"
+COUNTRY_SG="Сингапур"
+COUNTRY_SH="Святая Елена"
+COUNTRY_SI="Словения"
+COUNTRY_SJ="Шпицберген и Ян-Майен"
+COUNTRY_SK="Словакия"
+COUNTRY_SL="Сьерра-Леоне"
+COUNTRY_SM="Сан-Марино"
+COUNTRY_SN="Сенегал"
+COUNTRY_SO="Сомали"
+COUNTRY_SR="Суринам"
+COUNTRY_ST="Сан-Томе и Принсипи"
+COUNTRY_SV="Сальвадор"
+COUNTRY_SX="Синт-Мартен"
+COUNTRY_SY="Сирия"
+COUNTRY_SZ="Свазиленд"
+COUNTRY_TC="Острова Тёркс и Кайкос"
+COUNTRY_TD="Чад"
+COUNTRY_TF="Французские Южные территории"
+COUNTRY_TG="Того"
+COUNTRY_TH="Таиланд"
+COUNTRY_TJ="Таджикистан"
+COUNTRY_TK="Токелау"
+COUNTRY_TL="Восточный Тимор"
+COUNTRY_TM="Туркменистан"
+COUNTRY_TN="Тунис"
+COUNTRY_TO="Тонга"
+COUNTRY_TR="Турция"
+COUNTRY_TT="Тринидад и Тобаго"
+COUNTRY_TV="Тувалу"
+COUNTRY_TW="Тайвань"
+COUNTRY_TZ="Танзания"
+COUNTRY_UA="Украина"
+COUNTRY_UG="Уганда"
+COUNTRY_UK="Великобритания"
+COUNTRY_UM="Внешние малые острова США"
+COUNTRY_US="Соединённые Штаты Америки"
+COUNTRY_UY="Уругвай"
+COUNTRY_UZ="Узбекистан"
+COUNTRY_VA="Ватикан"
+COUNTRY_VC="Сент-Винсент и Гренадины"
+COUNTRY_VE="Венесуэла"
+COUNTRY_VG="Виргинские острова, Британские"
+COUNTRY_VI="Виргинские острова, Американские"
+COUNTRY_VN="Вьетнам"
+COUNTRY_VU="Вануату"
+COUNTRY_WF="Уоллис и Футуна"
+COUNTRY_WS="Самоа"
+COUNTRY_YE="Йемен"
+COUNTRY_YT="Майотта"
+COUNTRY_ZA="Южно-Африканская Республика"
+COUNTRY_ZM="Замбия"
+COUNTRY_ZW="Зимбабве"
+
+
+; LANG_UKRAINIAN SUBLANG_NEUTRAL
+[Strings.0022]
+COUNTRY_AD="Андорра"
+COUNTRY_AE="Об'єднані Арабські Емірати"
+COUNTRY_AF="Афганістан"
+COUNTRY_AG="Антигуа і Барбуда"
+COUNTRY_AI="Ангілья"
+COUNTRY_AL="Албанія"
+COUNTRY_AM="Вірменія"
+COUNTRY_AO="Ангола"
+COUNTRY_AQ="Антарктида"
+COUNTRY_AR="Аргентина"
+COUNTRY_AS="Американське Самоа"
+COUNTRY_AT="Австрія"
+COUNTRY_AU="Австралія"
+COUNTRY_AW="Аруба"
+COUNTRY_AX="Аландські острови"
+COUNTRY_AZ="Азербайджан"
+COUNTRY_BA="Боснія і Герцоговина"
+COUNTRY_BB="Барбадос"
+COUNTRY_BD="Бангладеш"
+COUNTRY_BE="Бельгія"
+COUNTRY_BF="Буркіна-Фасо"
+COUNTRY_BG="Болгарія"
+COUNTRY_BH="Бахрейн"
+COUNTRY_BI="Бурунді"
+COUNTRY_BJ="Бенін"
+COUNTRY_BL="Сен-Бартельмі"
+COUNTRY_BM="Бермудські острови"
+COUNTRY_BN="Бруней-Даруссалам"
+COUNTRY_BO="Болівія, Багатонаціональна держава"
+COUNTRY_BQ="Бонер, Сінт-Естатіус і Саба"
+COUNTRY_BR="Бразилія"
+COUNTRY_BS="Багамські острови"
+COUNTRY_BT="Бутан"
+COUNTRY_BV="Острів Буве"
+COUNTRY_BW="Ботсвана"
+COUNTRY_BY="Білорусь"
+COUNTRY_BZ="Беліз"
+COUNTRY_CA="Канада"
+COUNTRY_CC="Кокосові (Кілінг) острови"
+COUNTRY_CD="Конго, Демократична Республіка"
+COUNTRY_CF="Центрально-Африканська Республіка"
+COUNTRY_CG="Конго"
+COUNTRY_CH="Швейцарія"
+COUNTRY_CI="Кот-д'Івуар"
+COUNTRY_CK="Острови Кука"
+COUNTRY_CL="Чилі"
+COUNTRY_CM="Камерун"
+COUNTRY_CN="Китай"
+COUNTRY_CO="Колумбія"
+COUNTRY_CR="Коста-Ріка"
+COUNTRY_CU="Куба"
+COUNTRY_CV="Кабо-Верде"
+COUNTRY_CW="Кюрасао"
+COUNTRY_CX="Острів Різдва"
+COUNTRY_CY="Кіпр"
+COUNTRY_CZ="Чеська Республіка"
+COUNTRY_DE="Німеччина"
+COUNTRY_DJ="Джибуті"
+COUNTRY_DK="Данія"
+COUNTRY_DM="Домініка"
+COUNTRY_DO="Домініканська Республіка"
+COUNTRY_DZ="Алжир"
+COUNTRY_EC="Еквадор"
+COUNTRY_EE="Естонія"
+COUNTRY_EG="Єгипт"
+COUNTRY_EH="Західна Сахара"
+COUNTRY_ER="Еритрея"
+COUNTRY_ES="Іспанія"
+COUNTRY_ET="Ефіопія"
+COUNTRY_FI="Фінляндія"
+COUNTRY_FJ="Фіджі"
+COUNTRY_FK="Фолклендські (Мальвінські) острови"
+COUNTRY_FM="Мікронезія, Федеративні Штати"
+COUNTRY_FO="Фарерські острови"
+COUNTRY_FR="Франція"
+COUNTRY_GA="Габон"
+COUNTRY_GD="Гренада"
+COUNTRY_GE="Грузія"
+COUNTRY_GF="Французька Гвіана"
+COUNTRY_GG="Гернсі"
+COUNTRY_GH="Гана"
+COUNTRY_GI="Гібралтар"
+COUNTRY_GL="Гренландія"
+COUNTRY_GM="Гамбія"
+COUNTRY_GN="Гвінея"
+COUNTRY_GP="Гваделупа"
+COUNTRY_GQ="Екваторіальна Гвінея"
+COUNTRY_GR="Греція"
+COUNTRY_GS="Південна Джорджія та Південні Сандвічеві острови"
+COUNTRY_GT="Гватемала"
+COUNTRY_GU="Гуам"
+COUNTRY_GW="Гвінея-Бісау"
+COUNTRY_GY="Гайана"
+COUNTRY_HK="Гонконг"
+COUNTRY_HM="Острів Херд і острови Макдональд"
+COUNTRY_HN="Гондурас"
+COUNTRY_HR="Хорватія"
+COUNTRY_HT="Гаїті"
+COUNTRY_HU="Угорщина"
+COUNTRY_ID="Індонезія"
+COUNTRY_IE="Ірландія"
+COUNTRY_IL="Ізраїль"
+COUNTRY_IM="Острів Мен"
+COUNTRY_IN="Індія"
+COUNTRY_IO="Британські Території в Індійському Океані"
+COUNTRY_IQ="Ірак"
+COUNTRY_IR="Іран, Ісламська Республіка"
+COUNTRY_IS="Ісландія"
+COUNTRY_IT="Італія"
+COUNTRY_JE="Джерсі"
+COUNTRY_JM="Ямайка"
+COUNTRY_JO="Йорданія"
+COUNTRY_JP="Японія"
+COUNTRY_KE="Кенія"
+COUNTRY_KG="Киргизстан"
+COUNTRY_KH="Камбоджа"
+COUNTRY_KI="Кірібаті"
+COUNTRY_KM="Коморські острови"
+COUNTRY_KN="Сент-Кітс і Невіс"
+COUNTRY_KP="Корея, Народна Демократична Республіка"
+COUNTRY_KR="Корея, Республіка"
+COUNTRY_KW="Кувейт"
+COUNTRY_KY="Кайманові острови"
+COUNTRY_KZ="Казахстан"
+COUNTRY_LA="Лаоська Народна Демократична Республіка"
+COUNTRY_LB="Ліван"
+COUNTRY_LC="Сент-Люсія"
+COUNTRY_LI="Ліхтенштейн"
+COUNTRY_LK="Шрі-Ланка"
+COUNTRY_LR="Ліберія"
+COUNTRY_LS="Лесото"
+COUNTRY_LT="Литва"
+COUNTRY_LU="Люксембург"
+COUNTRY_LV="латвія"
+COUNTRY_LY="Лівійська Арабська Джамахірія"
+COUNTRY_MA="Марокко"
+COUNTRY_MC="Монако"
+COUNTRY_MD="Молдова, Республіка"
+COUNTRY_ME="Чорногорія"
+COUNTRY_MF="Сен-Мартен (Французька частина)"
+COUNTRY_MG="Мадагаскар"
+COUNTRY_MH="Маршаллові острови"
+COUNTRY_MK="Македонія, колишня Югославська Республіка"
+COUNTRY_ML="Малі"
+COUNTRY_MM="М'янма"
+COUNTRY_MN="Монголія"
+COUNTRY_MO="Макао"
+COUNTRY_MP="Північні Маріанські острови"
+COUNTRY_MQ="Мартініка"
+COUNTRY_MR="Мавританія"
+COUNTRY_MS="Монтсеррат"
+COUNTRY_MT="Мальта"
+COUNTRY_MU="Маврикій"
+COUNTRY_MV="Мальдіви"
+COUNTRY_MW="Малаві"
+COUNTRY_MX="Мексика"
+COUNTRY_MY="Малайзія"
+COUNTRY_MZ="Мозамбік"
+COUNTRY_NA="Намібія"
+COUNTRY_NC="New Caledonia"
+COUNTRY_NE="Нігер"
+COUNTRY_NF="Острів Норфолк"
+COUNTRY_NG="Нігерія"
+COUNTRY_NI="Нікарагуа"
+COUNTRY_NL="Нідерланди"
+COUNTRY_NO="Норвегія"
+COUNTRY_NP="Непал"
+COUNTRY_NR="Науру"
+COUNTRY_NU="Ніуе"
+COUNTRY_NZ="Нова Зеландія"
+COUNTRY_OM="Оман"
+COUNTRY_PA="Панама"
+COUNTRY_PE="Перу"
+COUNTRY_PF="Французька Полінезія"
+COUNTRY_PG="Папуа Нова Гвінея"
+COUNTRY_PH="Філіппіни"
+COUNTRY_PK="Пакистан"
+COUNTRY_PL="Польща"
+COUNTRY_PM="Сен-П'єр і Мікелон"
+COUNTRY_PN="Піткерн"
+COUNTRY_PR="Пуерто-Ріко"
+COUNTRY_PS="Палестинські території, окуповані"
+COUNTRY_PT="Португалія"
+COUNTRY_PW="Палау"
+COUNTRY_PY="Парагвай"
+COUNTRY_QA="Катар"
+COUNTRY_RE="Реюньйон"
+COUNTRY_RO="Румунія"
+COUNTRY_RS="Сербія"
+COUNTRY_RU="Російська Федерація"
+COUNTRY_RW="Руанда"
+COUNTRY_SA="Саудівська Аравія"
+COUNTRY_SB="Соломонові Острови"
+COUNTRY_SC="Сейшельські острови"
+COUNTRY_SD="Судан"
+COUNTRY_SE="Швеція"
+COUNTRY_SG="Сінгапур"
+COUNTRY_SH="Острови Святої Єлени, Вознесіння і Трістан-да-Кунья"
+COUNTRY_SI="Словенія"
+COUNTRY_SJ="Шпіцберген та Ян-Майєн"
+COUNTRY_SK="Словакія"
+COUNTRY_SL="Сьєрра-Леоне"
+COUNTRY_SM="Сан-Маріно"
+COUNTRY_SN="Сенегал"
+COUNTRY_SO="Сомалі"
+COUNTRY_SR="Суринам"
+COUNTRY_ST="Сан-Томе і Принсіпі"
+COUNTRY_SV="Сальвадор"
+COUNTRY_SX="Сен-Мартен (Голландська частина)"
+COUNTRY_SY="Сирійська Арабська Республіка"
+COUNTRY_SZ="Свазіленд"
+COUNTRY_TC="Острови Теркс і Кайкос"
+COUNTRY_TD="Чад"
+COUNTRY_TF="Французькі південні території"
+COUNTRY_TG="Того"
+COUNTRY_TH="Таїланд"
+COUNTRY_TJ="Таджикистан"
+COUNTRY_TK="Токелау"
+COUNTRY_TL="Східний Тимор"
+COUNTRY_TM="Туркменістан"
+COUNTRY_TN="Туніс"
+COUNTRY_TO="Тонга"
+COUNTRY_TR="Туреччина"
+COUNTRY_TT="Тринідад і Тобаго"
+COUNTRY_TV="Тувалу"
+COUNTRY_TW="Тайвань, провінція Китаю"
+COUNTRY_TZ="Танзанія, Об'єднана Республіка"
+COUNTRY_UA="Україна"
+COUNTRY_UG="Уганда"
+COUNTRY_UK="Сполучене Королівство Великої Британії та Північної Ірландії"
+COUNTRY_UM="Зовнішні малі острови США"
+COUNTRY_US="Сполучені Штати Америки"
+COUNTRY_UY="Уругвай"
+COUNTRY_UZ="Узбекистан"
+COUNTRY_VA="Святійший Престол (Держава Ватикан)"
+COUNTRY_VC="Сент-Вінсент і Гренадіни"
+COUNTRY_VE="Венесуела, Боліваріанська Республіка"
+COUNTRY_VG="Віргінські острови, Британські"
+COUNTRY_VI="Віргінські острови, США"
+COUNTRY_VN="В'єтнам"
+COUNTRY_VU="Вануату"
+COUNTRY_WF="Уолліс і Футуна"
+COUNTRY_WS="Самоа"
+COUNTRY_YE="Ємен"
+COUNTRY_YT="Майотта"
+COUNTRY_ZA="Південна Африка"
+COUNTRY_ZM="Замбія"
+COUNTRY_ZW="Зімбабве"
+
+; EOF
--- /dev/null
- IntDestroyMenuObject(Menu, TRUE, TRUE);
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS Win32k subsystem
+ * PURPOSE: Windows
+ * FILE: subsystems/win32/win32k/ntuser/window.c
+ * PROGRAMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
+ */
+
+#include <win32k.h>
+DBG_DEFAULT_CHANNEL(UserWnd);
+
+INT gNestedWindowLimit = 50;
+
+/* HELPER FUNCTIONS ***********************************************************/
+
+BOOL FASTCALL UserUpdateUiState(PWND Wnd, WPARAM wParam)
+{
+ WORD Action = LOWORD(wParam);
+ WORD Flags = HIWORD(wParam);
+
+ if (Flags & ~(UISF_HIDEFOCUS | UISF_HIDEACCEL | UISF_ACTIVE))
+ {
+ EngSetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ switch (Action)
+ {
+ case UIS_INITIALIZE:
+ EngSetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+
+ case UIS_SET:
+ if (Flags & UISF_HIDEFOCUS)
+ Wnd->HideFocus = TRUE;
+ if (Flags & UISF_HIDEACCEL)
+ Wnd->HideAccel = TRUE;
+ break;
+
+ case UIS_CLEAR:
+ if (Flags & UISF_HIDEFOCUS)
+ Wnd->HideFocus = FALSE;
+ if (Flags & UISF_HIDEACCEL)
+ Wnd->HideAccel = FALSE;
+ break;
+ }
+
+ return TRUE;
+}
+
+PWND FASTCALL IntGetWindowObject(HWND hWnd)
+{
+ PWND Window;
+
+ if (!hWnd) return NULL;
+
+ Window = UserGetWindowObject(hWnd);
+ if (Window)
+ Window->head.cLockObj++;
+
+ return Window;
+}
+
+PWND FASTCALL VerifyWnd(PWND pWnd)
+{
+ HWND hWnd;
+ UINT State, State2;
+
+ if (!pWnd) return NULL;
+
+ _SEH2_TRY
+ {
+ hWnd = UserHMGetHandle(pWnd);
+ State = pWnd->state;
+ State2 = pWnd->state2;
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ _SEH2_YIELD(return NULL);
+ }
+ _SEH2_END
+
+ if ( UserObjectInDestroy(hWnd) ||
+ State & WNDS_DESTROYED ||
+ State2 & WNDS2_INDESTROY )
+ return NULL;
+
+ return pWnd;
+}
+
+PWND FASTCALL ValidateHwndNoErr(HWND hWnd)
+{
+ if (hWnd) return (PWND)UserGetObjectNoErr(gHandleTable, hWnd, TYPE_WINDOW);
+ return NULL;
+}
+
+/* Temp HACK */
+PWND FASTCALL UserGetWindowObject(HWND hWnd)
+{
+ PWND Window;
+
+ if (!hWnd)
+ {
+ EngSetLastError(ERROR_INVALID_WINDOW_HANDLE);
+ return NULL;
+ }
+
+ Window = (PWND)UserGetObject(gHandleTable, hWnd, TYPE_WINDOW);
+ if (!Window || 0 != (Window->state & WNDS_DESTROYED))
+ {
+ EngSetLastError(ERROR_INVALID_WINDOW_HANDLE);
+ return NULL;
+ }
+
+ return Window;
+}
+
+ULONG FASTCALL
+IntSetStyle( PWND pwnd, ULONG set_bits, ULONG clear_bits )
+{
+ ULONG styleOld, styleNew;
+ styleOld = pwnd->style;
+ styleNew = (pwnd->style | set_bits) & ~clear_bits;
+ if (styleNew == styleOld) return styleNew;
+ pwnd->style = styleNew;
+ if ((styleOld ^ styleNew) & WS_VISIBLE) // State Change.
+ {
+ if (styleOld & WS_VISIBLE) pwnd->head.pti->cVisWindows--;
+ if (styleNew & WS_VISIBLE) pwnd->head.pti->cVisWindows++;
+ DceResetActiveDCEs( pwnd );
+ }
+ return styleOld;
+}
+
+/*
+ * IntIsWindow
+ *
+ * The function determines whether the specified window handle identifies
+ * an existing window.
+ *
+ * Parameters
+ * hWnd
+ * Handle to the window to test.
+ *
+ * Return Value
+ * If the window handle identifies an existing window, the return value
+ * is TRUE. If the window handle does not identify an existing window,
+ * the return value is FALSE.
+ */
+
+BOOL FASTCALL
+IntIsWindow(HWND hWnd)
+{
+ PWND Window;
+
+ if (!(Window = UserGetWindowObject(hWnd)))
+ {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+BOOL FASTCALL
+IntIsWindowVisible(PWND Wnd)
+{
+ PWND Temp = Wnd;
+ for (;;)
+ {
+ if (!Temp) return TRUE;
+ if (!(Temp->style & WS_VISIBLE)) break;
+ if (Temp->style & WS_MINIMIZE && Temp != Wnd) break;
+ if (Temp->fnid == FNID_DESKTOP) return TRUE;
+ Temp = Temp->spwndParent;
+ }
+ return FALSE;
+}
+
+PWND FASTCALL
+IntGetParent(PWND Wnd)
+{
+ if (Wnd->style & WS_POPUP)
+ {
+ return Wnd->spwndOwner;
+ }
+ else if (Wnd->style & WS_CHILD)
+ {
+ return Wnd->spwndParent;
+ }
+
+ return NULL;
+}
+
+BOOL
+FASTCALL
+IntEnableWindow( HWND hWnd, BOOL bEnable )
+{
+ BOOL Update;
+ PWND pWnd;
+ UINT bIsDisabled;
+
+ if(!(pWnd = UserGetWindowObject(hWnd)))
+ {
+ return FALSE;
+ }
+
+ /* check if updating is needed */
+ bIsDisabled = !!(pWnd->style & WS_DISABLED);
+ Update = bIsDisabled;
+
+ if (bEnable)
+ {
+ IntSetStyle( pWnd, 0, WS_DISABLED );
+ }
+ else
+ {
+ Update = !bIsDisabled;
+
+ co_IntSendMessage( hWnd, WM_CANCELMODE, 0, 0);
+
+ /* Remove keyboard focus from that window if it had focus */
+ if (hWnd == IntGetThreadFocusWindow())
+ {
+ TRACE("IntEnableWindow SF NULL\n");
+ co_UserSetFocus(NULL);
+ }
+ IntSetStyle( pWnd, WS_DISABLED, 0 );
+ }
+
+ if (Update)
+ {
+ IntNotifyWinEvent(EVENT_OBJECT_STATECHANGE, pWnd, OBJID_WINDOW, CHILDID_SELF, 0);
+ co_IntSendMessage(hWnd, WM_ENABLE, (LPARAM)bEnable, 0);
+ }
+ // Return nonzero if it was disabled, or zero if it wasn't:
+ return bIsDisabled;
+}
+
+/*
+ * IntWinListChildren
+ *
+ * Compile a list of all child window handles from given window.
+ *
+ * Remarks
+ * This function is similar to Wine WIN_ListChildren. The caller
+ * must free the returned list with ExFreePool.
+ */
+
+HWND* FASTCALL
+IntWinListChildren(PWND Window)
+{
+ PWND Child;
+ HWND *List;
+ UINT Index, NumChildren = 0;
+
+ if (!Window) return NULL;
+
+ for (Child = Window->spwndChild; Child; Child = Child->spwndNext)
+ ++NumChildren;
+
+ List = ExAllocatePoolWithTag(PagedPool, (NumChildren + 1) * sizeof(HWND), USERTAG_WINDOWLIST);
+ if(!List)
+ {
+ ERR("Failed to allocate memory for children array\n");
+ EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
+ return NULL;
+ }
+ for (Child = Window->spwndChild, Index = 0;
+ Child != NULL;
+ Child = Child->spwndNext, ++Index)
+ List[Index] = Child->head.h;
+ List[Index] = NULL;
+
+ return List;
+}
+
+PWND FASTCALL
+IntGetNonChildAncestor(PWND pWnd)
+{
+ while(pWnd && (pWnd->style & (WS_CHILD | WS_POPUP)) == WS_CHILD)
+ pWnd = pWnd->spwndParent;
+ return pWnd;
+}
+
+BOOL FASTCALL
+IntIsTopLevelWindow(PWND pWnd)
+{
+ if ( pWnd->spwndParent &&
+ pWnd->spwndParent == co_GetDesktopWindow(pWnd) ) return TRUE;
+ return FALSE;
+}
+
+BOOL FASTCALL
+IntValidateOwnerDepth(PWND Wnd, PWND Owner)
+{
+ INT Depth = 1;
+ for (;;)
+ {
+ if ( !Owner ) return gNestedWindowLimit >= Depth;
+ if (Owner == Wnd) break;
+ Owner = Owner->spwndOwner;
+ Depth++;
+ }
+ return FALSE;
+}
+
+HWND FASTCALL
+IntGetWindow(HWND hWnd,
+ UINT uCmd)
+{
+ PWND Wnd, FoundWnd;
+ HWND Ret = NULL;
+
+ Wnd = ValidateHwndNoErr(hWnd);
+ if (!Wnd)
+ return NULL;
+
+ FoundWnd = NULL;
+ switch (uCmd)
+ {
+ case GW_OWNER:
+ if (Wnd->spwndOwner != NULL)
+ FoundWnd = Wnd->spwndOwner;
+ break;
+
+ case GW_HWNDFIRST:
+ if(Wnd->spwndParent != NULL)
+ {
+ FoundWnd = Wnd->spwndParent;
+ if (FoundWnd->spwndChild != NULL)
+ FoundWnd = FoundWnd->spwndChild;
+ }
+ break;
+ case GW_HWNDNEXT:
+ if (Wnd->spwndNext != NULL)
+ FoundWnd = Wnd->spwndNext;
+ break;
+
+ case GW_HWNDPREV:
+ if (Wnd->spwndPrev != NULL)
+ FoundWnd = Wnd->spwndPrev;
+ break;
+
+ case GW_CHILD:
+ if (Wnd->spwndChild != NULL)
+ FoundWnd = Wnd->spwndChild;
+ break;
+
+ case GW_HWNDLAST:
+ FoundWnd = Wnd;
+ while ( FoundWnd->spwndNext != NULL)
+ FoundWnd = FoundWnd->spwndNext;
+ break;
+
+ default:
+ Wnd = NULL;
+ break;
+ }
+
+ if (FoundWnd != NULL)
+ Ret = UserHMGetHandle(FoundWnd);
+ return Ret;
+}
+
+/***********************************************************************
+ * IntSendDestroyMsg
+ */
+static void IntSendDestroyMsg(HWND hWnd)
+{
+
+ PWND Window;
+#if 0 /* FIXME */
+
+ GUITHREADINFO info;
+
+ if (GetGUIThreadInfo(GetCurrentThreadId(), &info))
+ {
+ if (hWnd == info.hwndCaret)
+ {
+ DestroyCaret();
+ }
+ }
+#endif
+
+ Window = UserGetWindowObject(hWnd);
+ if (Window)
+ {
+// USER_REFERENCE_ENTRY Ref;
+// UserRefObjectCo(Window, &Ref);
+
+ if (!Window->spwndOwner && !IntGetParent(Window))
+ {
+ co_IntShellHookNotify(HSHELL_WINDOWDESTROYED, (WPARAM) hWnd, 0);
+ }
+
+// UserDerefObjectCo(Window);
+ }
+
+ /* The window could already be destroyed here */
+
+ /*
+ * Send the WM_DESTROY to the window.
+ */
+
+ co_IntSendMessage(hWnd, WM_DESTROY, 0, 0);
+
+ /*
+ * This WM_DESTROY message can trigger re-entrant calls to DestroyWindow
+ * make sure that the window still exists when we come back.
+ */
+#if 0 /* FIXME */
+
+ if (IsWindow(Wnd))
+ {
+ HWND* pWndArray;
+ int i;
+
+ if (!(pWndArray = WIN_ListChildren( hwnd )))
+ return;
+
+ /* start from the end (FIXME: is this needed?) */
+ for (i = 0; pWndArray[i]; i++)
+ ;
+
+ while (--i >= 0)
+ {
+ if (IsWindow( pWndArray[i] ))
+ WIN_SendDestroyMsg( pWndArray[i] );
+ }
+ HeapFree(GetProcessHeap(), 0, pWndArray);
+ }
+ else
+ {
+ TRACE("destroyed itself while in WM_DESTROY!\n");
+ }
+#endif
+}
+
+static VOID
+UserFreeWindowInfo(PTHREADINFO ti, PWND Wnd)
+{
+ PCLIENTINFO ClientInfo = GetWin32ClientInfo();
+
+ if (!Wnd) return;
+
+ if (ClientInfo->CallbackWnd.pWnd == DesktopHeapAddressToUser(Wnd))
+ {
+ ClientInfo->CallbackWnd.hWnd = NULL;
+ ClientInfo->CallbackWnd.pWnd = NULL;
+ }
+
+ if (Wnd->strName.Buffer != NULL)
+ {
+ Wnd->strName.Length = 0;
+ Wnd->strName.MaximumLength = 0;
+ DesktopHeapFree(Wnd->head.rpdesk,
+ Wnd->strName.Buffer);
+ Wnd->strName.Buffer = NULL;
+ }
+
+// DesktopHeapFree(Wnd->head.rpdesk, Wnd);
+// WindowObject->hWnd = NULL;
+}
+
+/***********************************************************************
+ * IntDestroyWindow
+ *
+ * Destroy storage associated to a window. "Internals" p.358
+ *
+ * This is the "functional" DestroyWindows function ei. all stuff
+ * done in CreateWindow is undone here and not in DestroyWindow:-P
+
+ */
+static LRESULT co_UserFreeWindow(PWND Window,
+ PPROCESSINFO ProcessData,
+ PTHREADINFO ThreadData,
+ BOOLEAN SendMessages)
+{
+ HWND *Children;
+ HWND *ChildHandle;
+ PWND Child;
+ PMENU Menu;
+ BOOLEAN BelongsToThreadData;
+
+ ASSERT(Window);
+
+ if(Window->state2 & WNDS2_INDESTROY)
+ {
+ TRACE("Tried to call IntDestroyWindow() twice\n");
+ return 0;
+ }
+ Window->state2 |= WNDS2_INDESTROY;
+ Window->style &= ~WS_VISIBLE;
+ Window->head.pti->cVisWindows--;
+
+ IntNotifyWinEvent(EVENT_OBJECT_DESTROY, Window, OBJID_WINDOW, CHILDID_SELF, 0);
+
+ /* remove the window already at this point from the thread window list so we
+ don't get into trouble when destroying the thread windows while we're still
+ in IntDestroyWindow() */
+ RemoveEntryList(&Window->ThreadListEntry);
+
+ BelongsToThreadData = IntWndBelongsToThread(Window, ThreadData);
+
+ IntDeRegisterShellHookWindow(Window->head.h);
+
+ if(SendMessages)
+ {
+ /* Send destroy messages */
+ IntSendDestroyMsg(Window->head.h);
+ }
+
+ /* free child windows */
+ Children = IntWinListChildren(Window);
+ if (Children)
+ {
+ for (ChildHandle = Children; *ChildHandle; ++ChildHandle)
+ {
+ if ((Child = IntGetWindowObject(*ChildHandle)))
+ {
+ if(!IntWndBelongsToThread(Child, ThreadData))
+ {
+ /* send WM_DESTROY messages to windows not belonging to the same thread */
+ IntSendDestroyMsg(Child->head.h);
+ }
+ else
+ co_UserFreeWindow(Child, ProcessData, ThreadData, SendMessages);
+
+ UserDereferenceObject(Child);
+ }
+ }
+ ExFreePoolWithTag(Children, USERTAG_WINDOWLIST);
+ }
+
+ if(SendMessages)
+ {
+ /*
+ * Clear the update region to make sure no WM_PAINT messages will be
+ * generated for this window while processing the WM_NCDESTROY.
+ */
+ co_UserRedrawWindow(Window, NULL, 0,
+ RDW_VALIDATE | RDW_NOFRAME | RDW_NOERASE |
+ RDW_NOINTERNALPAINT | RDW_NOCHILDREN);
+ if(BelongsToThreadData)
+ co_IntSendMessage(Window->head.h, WM_NCDESTROY, 0, 0);
+ }
+
+ DestroyTimersForWindow(ThreadData, Window);
+
+ /* Unregister hot keys */
+ UnregisterWindowHotKeys (Window);
+
+ /* flush the message queue */
+ MsqRemoveWindowMessagesFromQueue(Window);
+
+ /* from now on no messages can be sent to this window anymore */
+ Window->state |= WNDS_DESTROYED;
+ Window->fnid |= FNID_FREED;
+
+ /* don't remove the WINDOWSTATUS_DESTROYING bit */
+
+ /* reset shell window handles */
+ if(ThreadData->rpdesk)
+ {
+ if (Window->head.h == ThreadData->rpdesk->rpwinstaParent->ShellWindow)
+ ThreadData->rpdesk->rpwinstaParent->ShellWindow = NULL;
+
+ if (Window->head.h == ThreadData->rpdesk->rpwinstaParent->ShellListView)
+ ThreadData->rpdesk->rpwinstaParent->ShellListView = NULL;
+ }
+
+ /* FIXME: do we need to fake QS_MOUSEMOVE wakebit? */
+
+#if 0 /* FIXME */
+
+ WinPosCheckInternalPos(Window->head.h);
+ if (Window->head.h == GetCapture())
+ {
+ ReleaseCapture();
+ }
+
+ /* free resources associated with the window */
+ TIMER_RemoveWindowTimers(Window->head.h);
+#endif
+
+ if ( ((Window->style & (WS_CHILD|WS_POPUP)) != WS_CHILD) &&
+ Window->IDMenu &&
+ (Menu = UserGetMenuObject((HMENU)Window->IDMenu)))
+ {
- IntDestroyMenuObject(Menu, TRUE, TRUE);
++ IntDestroyMenuObject(Menu, TRUE);
+ Window->IDMenu = 0;
+ }
+
+ if(Window->SystemMenu
+ && (Menu = UserGetMenuObject(Window->SystemMenu)))
+ {
- VOID FASTCALL
- co_DestroyThreadWindows(struct _ETHREAD *Thread)
- {
- PTHREADINFO WThread;
- PLIST_ENTRY Current;
- PWND Wnd;
- USER_REFERENCE_ENTRY Ref;
- WThread = (PTHREADINFO)Thread->Tcb.Win32Thread;
-
- while (!IsListEmpty(&WThread->WindowListHead))
- {
- Current = WThread->WindowListHead.Flink;
- Wnd = CONTAINING_RECORD(Current, WND, ThreadListEntry);
-
- TRACE("thread cleanup: while destroy wnds, wnd=%p\n", Wnd);
-
- /* Window removes itself from the list */
-
- /*
- * FIXME: It is critical that the window removes itself! If now, we will loop
- * here forever...
- */
-
- //ASSERT(co_UserDestroyWindow(Wnd));
-
- UserRefObjectCo(Wnd, &Ref); // FIXME: Temp HACK??
- if (!co_UserDestroyWindow(Wnd))
- {
- ERR("Unable to destroy window %p at thread cleanup... This is _VERY_ bad!\n", Wnd);
- }
- UserDerefObjectCo(Wnd); // FIXME: Temp HACK??
- }
- }
-
++ IntDestroyMenuObject(Menu, TRUE);
+ Window->SystemMenu = (HMENU)0;
+ }
+
+ DceFreeWindowDCE(Window); /* Always do this to catch orphaned DCs */
+#if 0 /* FIXME */
+
+ WINPROC_FreeProc(Window->winproc, WIN_PROC_WINDOW);
+ CLASS_RemoveWindow(Window->Class);
+#endif
+
+ IntUnlinkWindow(Window);
+
+ if (Window->PropListItems)
+ {
+ IntRemoveWindowProp(Window);
+ TRACE("Window->PropListItems %d\n",Window->PropListItems);
+ ASSERT(Window->PropListItems==0);
+ }
+
+ UserReferenceObject(Window);
+ UserDeleteObject(Window->head.h, TYPE_WINDOW);
+
+ IntDestroyScrollBars(Window);
+
+ /* dereference the class */
+ IntDereferenceClass(Window->pcls,
+ Window->head.pti->pDeskInfo,
+ Window->head.pti->ppi);
+ Window->pcls = NULL;
+
+ if(Window->hrgnClip)
+ {
+ IntGdiSetRegionOwner(Window->hrgnClip, GDI_OBJ_HMGR_POWNED);
+ GreDeleteObject(Window->hrgnClip);
+ Window->hrgnClip = NULL;
+ }
+ Window->head.pti->cWindows--;
+
+// ASSERT(Window != NULL);
+ UserFreeWindowInfo(Window->head.pti, Window);
+
+ UserDereferenceObject(Window);
+
+ UserClipboardFreeWindow(Window);
+
+ return 0;
+}
+
+//
+// Same as User32:IntGetWndProc.
+//
+WNDPROC FASTCALL
+IntGetWindowProc(PWND pWnd,
+ BOOL Ansi)
+{
+ INT i;
+ PCLS Class;
+ WNDPROC gcpd, Ret = 0;
+
+ ASSERT(UserIsEnteredExclusive() == TRUE);
+
+ Class = pWnd->pcls;
+
+ if (pWnd->state & WNDS_SERVERSIDEWINDOWPROC)
+ {
+ for ( i = FNID_FIRST; i <= FNID_SWITCH; i++)
+ {
+ if (GETPFNSERVER(i) == pWnd->lpfnWndProc)
+ {
+ if (Ansi)
+ Ret = GETPFNCLIENTA(i);
+ else
+ Ret = GETPFNCLIENTW(i);
+ }
+ }
+ return Ret;
+ }
+
+ if (Class->fnid == FNID_EDIT)
+ Ret = pWnd->lpfnWndProc;
+ else
+ {
+ Ret = pWnd->lpfnWndProc;
+
+ if (Class->fnid <= FNID_GHOST && Class->fnid >= FNID_BUTTON)
+ {
+ if (Ansi)
+ {
+ if (GETPFNCLIENTW(Class->fnid) == pWnd->lpfnWndProc)
+ Ret = GETPFNCLIENTA(Class->fnid);
+ }
+ else
+ {
+ if (GETPFNCLIENTA(Class->fnid) == pWnd->lpfnWndProc)
+ Ret = GETPFNCLIENTW(Class->fnid);
+ }
+ }
+ if ( Ret != pWnd->lpfnWndProc)
+ return Ret;
+ }
+ if ( Ansi == !!(pWnd->state & WNDS_ANSIWINDOWPROC) )
+ return Ret;
+
+ gcpd = (WNDPROC)UserGetCPD(
+ pWnd,
+ (Ansi ? UserGetCPDA2U : UserGetCPDU2A )|UserGetCPDWindow,
+ (ULONG_PTR)Ret);
+
+ return (gcpd ? gcpd : Ret);
+}
+
+static WNDPROC
+IntSetWindowProc(PWND pWnd,
+ WNDPROC NewWndProc,
+ BOOL Ansi)
+{
+ INT i;
+ PCALLPROCDATA CallProc;
+ PCLS Class;
+ WNDPROC Ret, chWndProc = NULL;
+
+ // Retrieve previous window proc.
+ Ret = IntGetWindowProc(pWnd, Ansi);
+
+ Class = pWnd->pcls;
+
+ if (IsCallProcHandle(NewWndProc))
+ {
+ CallProc = UserGetObject(gHandleTable, NewWndProc, TYPE_CALLPROC);
+ if (CallProc)
+ { // Reset new WndProc.
+ NewWndProc = CallProc->pfnClientPrevious;
+ // Reset Ansi from CallProc handle. This is expected with wine "deftest".
+ Ansi = !!(CallProc->wType & UserGetCPDU2A);
+ }
+ }
+ // Switch from Client Side call to Server Side call if match. Ref: "deftest".
+ for ( i = FNID_FIRST; i <= FNID_SWITCH; i++)
+ {
+ if (GETPFNCLIENTW(i) == NewWndProc)
+ {
+ chWndProc = GETPFNSERVER(i);
+ break;
+ }
+ if (GETPFNCLIENTA(i) == NewWndProc)
+ {
+ chWndProc = GETPFNSERVER(i);
+ break;
+ }
+ }
+ // If match, set/reset to Server Side and clear ansi.
+ if (chWndProc)
+ {
+ pWnd->lpfnWndProc = chWndProc;
+ pWnd->Unicode = TRUE;
+ pWnd->state &= ~WNDS_ANSIWINDOWPROC;
+ pWnd->state |= WNDS_SERVERSIDEWINDOWPROC;
+ }
+ else
+ {
+ pWnd->Unicode = !Ansi;
+ // Handle the state change in here.
+ if (Ansi)
+ pWnd->state |= WNDS_ANSIWINDOWPROC;
+ else
+ pWnd->state &= ~WNDS_ANSIWINDOWPROC;
+
+ if (pWnd->state & WNDS_SERVERSIDEWINDOWPROC)
+ pWnd->state &= ~WNDS_SERVERSIDEWINDOWPROC;
+
+ if (!NewWndProc) NewWndProc = pWnd->lpfnWndProc;
+
+ if (Class->fnid <= FNID_GHOST && Class->fnid >= FNID_BUTTON)
+ {
+ if (Ansi)
+ {
+ if (GETPFNCLIENTW(Class->fnid) == NewWndProc)
+ chWndProc = GETPFNCLIENTA(Class->fnid);
+ }
+ else
+ {
+ if (GETPFNCLIENTA(Class->fnid) == NewWndProc)
+ chWndProc = GETPFNCLIENTW(Class->fnid);
+ }
+ }
+ // Now set the new window proc.
+ pWnd->lpfnWndProc = (chWndProc ? chWndProc : NewWndProc);
+ }
+ return Ret;
+}
+
+static BOOL FASTCALL
+IntSetMenu(
+ PWND Wnd,
+ HMENU Menu,
+ BOOL *Changed)
+{
+ PMENU OldMenu, NewMenu = NULL;
+
+ if ((Wnd->style & (WS_CHILD | WS_POPUP)) == WS_CHILD)
+ {
+ ERR("SetMenu: Invalid handle 0x%p!\n",UserHMGetHandle(Wnd));
+ EngSetLastError(ERROR_INVALID_WINDOW_HANDLE);
+ return FALSE;
+ }
+
+ *Changed = (Wnd->IDMenu != (UINT) Menu);
+ if (! *Changed)
+ {
+ return TRUE;
+ }
+
+ if (Wnd->IDMenu)
+ {
+ OldMenu = IntGetMenuObject((HMENU) Wnd->IDMenu);
+ ASSERT(NULL == OldMenu || OldMenu->hWnd == Wnd->head.h);
+ }
+ else
+ {
+ OldMenu = NULL;
+ }
+
+ if (NULL != Menu)
+ {
+ NewMenu = IntGetMenuObject(Menu);
+ if (NULL == NewMenu)
+ {
+ if (NULL != OldMenu)
+ {
+ IntReleaseMenuObject(OldMenu);
+ }
+ EngSetLastError(ERROR_INVALID_MENU_HANDLE);
+ return FALSE;
+ }
+ if (NULL != NewMenu->hWnd)
+ {
+ /* Can't use the same menu for two windows */
+ if (NULL != OldMenu)
+ {
+ IntReleaseMenuObject(OldMenu);
+ }
+ EngSetLastError(ERROR_INVALID_MENU_HANDLE);
+ return FALSE;
+ }
+
+ }
+
+ Wnd->IDMenu = (UINT) Menu;
+ if (NULL != NewMenu)
+ {
+ NewMenu->hWnd = Wnd->head.h;
+ IntReleaseMenuObject(NewMenu);
+ }
+ if (NULL != OldMenu)
+ {
+ OldMenu->hWnd = NULL;
+ IntReleaseMenuObject(OldMenu);
+ }
+
+ return TRUE;
+}
+
+
+/* INTERNAL ******************************************************************/
+
+
- CallProc = CreateCallProc(NULL, pWnd->lpfnWndProc, pWnd->Unicode , pWnd->head.pti->ppi);
+BOOL FASTCALL
+IntIsChildWindow(PWND Parent, PWND BaseWindow)
+{
+ PWND Window;
+
+ Window = BaseWindow;
+ while (Window && ((Window->style & (WS_POPUP|WS_CHILD)) == WS_CHILD))
+ {
+ if (Window == Parent)
+ {
+ return(TRUE);
+ }
+
+ Window = Window->spwndParent;
+ }
+
+ return(FALSE);
+}
+
+/*
+ Link the window into siblings list
+ children and parent are kept in place.
+*/
+VOID FASTCALL
+IntLinkWindow(
+ PWND Wnd,
+ PWND WndInsertAfter /* set to NULL if top sibling */
+)
+{
+ if ((Wnd->spwndPrev = WndInsertAfter))
+ {
+ /* link after WndInsertAfter */
+ if ((Wnd->spwndNext = WndInsertAfter->spwndNext))
+ Wnd->spwndNext->spwndPrev = Wnd;
+
+ Wnd->spwndPrev->spwndNext = Wnd;
+ }
+ else
+ {
+ /* link at top */
+ if ((Wnd->spwndNext = Wnd->spwndParent->spwndChild))
+ Wnd->spwndNext->spwndPrev = Wnd;
+
+ Wnd->spwndParent->spwndChild = Wnd;
+ }
+}
+
+/*
+ Note: Wnd->spwndParent can be null if it is the desktop.
+*/
+VOID FASTCALL IntLinkHwnd(PWND Wnd, HWND hWndPrev)
+{
+ if (hWndPrev == HWND_NOTOPMOST)
+ {
+ if (!(Wnd->ExStyle & WS_EX_TOPMOST) &&
+ (Wnd->ExStyle2 & WS_EX2_LINKED)) return; /* nothing to do */
+ Wnd->ExStyle &= ~WS_EX_TOPMOST;
+ hWndPrev = HWND_TOP; /* fallback to the HWND_TOP case */
+ }
+
+ IntUnlinkWindow(Wnd); /* unlink it from the previous location */
+
+ if (hWndPrev == HWND_BOTTOM)
+ {
+ /* Link in the bottom of the list */
+ PWND WndInsertAfter;
+
+ WndInsertAfter = Wnd->spwndParent->spwndChild;
+ while( WndInsertAfter && WndInsertAfter->spwndNext)
+ WndInsertAfter = WndInsertAfter->spwndNext;
+
+ IntLinkWindow(Wnd, WndInsertAfter);
+ Wnd->ExStyle &= ~WS_EX_TOPMOST;
+ }
+ else if (hWndPrev == HWND_TOPMOST)
+ {
+ /* Link in the top of the list */
+ IntLinkWindow(Wnd, NULL);
+
+ Wnd->ExStyle |= WS_EX_TOPMOST;
+ }
+ else if (hWndPrev == HWND_TOP)
+ {
+ /* Link it after the last topmost window */
+ PWND WndInsertBefore;
+
+ WndInsertBefore = Wnd->spwndParent->spwndChild;
+
+ if (!(Wnd->ExStyle & WS_EX_TOPMOST)) /* put it above the first non-topmost window */
+ {
+ while (WndInsertBefore != NULL && WndInsertBefore->spwndNext != NULL)
+ {
+ if (!(WndInsertBefore->ExStyle & WS_EX_TOPMOST)) break;
+ if (WndInsertBefore == Wnd->spwndOwner) /* keep it above owner */
+ {
+ Wnd->ExStyle |= WS_EX_TOPMOST;
+ break;
+ }
+ WndInsertBefore = WndInsertBefore->spwndNext;
+ }
+ }
+
+ IntLinkWindow(Wnd, WndInsertBefore ? WndInsertBefore->spwndPrev : NULL);
+ }
+ else
+ {
+ /* Link it after hWndPrev */
+ PWND WndInsertAfter;
+
+ WndInsertAfter = UserGetWindowObject(hWndPrev);
+ /* Are we called with an erroneous handle */
+ if(WndInsertAfter == NULL)
+ {
+ /* Link in a default position */
+ IntLinkHwnd(Wnd, HWND_TOP);
+ return;
+ }
+
+ IntLinkWindow(Wnd, WndInsertAfter);
+
+ /* Fix the WS_EX_TOPMOST flag */
+ if (!(WndInsertAfter->ExStyle & WS_EX_TOPMOST))
+ {
+ Wnd->ExStyle &= ~WS_EX_TOPMOST;
+ }
+ else
+ {
+ if(WndInsertAfter->spwndNext &&
+ WndInsertAfter->spwndNext->ExStyle & WS_EX_TOPMOST)
+ {
+ Wnd->ExStyle |= WS_EX_TOPMOST;
+ }
+ }
+ }
+ Wnd->ExStyle2 |= WS_EX2_LINKED;
+}
+
+VOID FASTCALL
+IntProcessOwnerSwap(PWND Wnd, PWND WndNewOwner, PWND WndOldOwner)
+{
+ if (WndOldOwner)
+ {
+ if (Wnd->head.pti != WndOldOwner->head.pti)
+ {
+ if (!WndNewOwner ||
+ Wnd->head.pti == WndNewOwner->head.pti ||
+ WndOldOwner->head.pti != WndNewOwner->head.pti )
+ {
+ //ERR("ProcessOwnerSwap Old out.\n");
+ UserAttachThreadInput(Wnd->head.pti, WndOldOwner->head.pti, FALSE);
+ }
+ }
+ }
+ if (WndNewOwner)
+ {
+ if (Wnd->head.pti != WndNewOwner->head.pti)
+ {
+ if (!WndOldOwner ||
+ WndOldOwner->head.pti != WndNewOwner->head.pti )
+ {
+ //ERR("ProcessOwnerSwap New in.\n");
+ UserAttachThreadInput(Wnd->head.pti, WndNewOwner->head.pti, TRUE);
+ }
+ }
+ }
+ // FIXME: System Tray checks.
+}
+
+HWND FASTCALL
+IntSetOwner(HWND hWnd, HWND hWndNewOwner)
+{
+ PWND Wnd, WndOldOwner, WndNewOwner;
+ HWND ret;
+
+ Wnd = IntGetWindowObject(hWnd);
+ if(!Wnd)
+ return NULL;
+
+ WndOldOwner = Wnd->spwndOwner;
+
+ ret = WndOldOwner ? UserHMGetHandle(WndOldOwner) : 0;
+ WndNewOwner = UserGetWindowObject(hWndNewOwner);
+
+ if (!WndNewOwner && hWndNewOwner)
+ {
+ EngSetLastError(ERROR_INVALID_PARAMETER);
+ ret = NULL;
+ goto Error;
+ }
+
+ /* if parent belongs to a different thread and the window isn't */
+ /* top-level, attach the two threads */
+ IntProcessOwnerSwap(Wnd, WndNewOwner, WndOldOwner);
+
+ if (IntValidateOwnerDepth(Wnd, WndNewOwner))
+ {
+ if (WndNewOwner)
+ {
+ Wnd->spwndOwner= WndNewOwner;
+ }
+ else
+ {
+ Wnd->spwndOwner = NULL;
+ }
+ }
+ else
+ {
+ IntProcessOwnerSwap(Wnd, WndOldOwner, WndNewOwner);
+ EngSetLastError(ERROR_INVALID_PARAMETER);
+ ret = NULL;
+ }
+Error:
+ UserDereferenceObject(Wnd);
+ return ret;
+}
+
+PWND FASTCALL
+co_IntSetParent(PWND Wnd, PWND WndNewParent)
+{
+ PWND WndOldParent, pWndExam;
+ BOOL WasVisible;
+ POINT pt;
+ int swFlags = SWP_NOSIZE|SWP_NOZORDER;
+
+ ASSERT(Wnd);
+ ASSERT(WndNewParent);
+ ASSERT_REFS_CO(Wnd);
+ ASSERT_REFS_CO(WndNewParent);
+
+ if (Wnd == Wnd->head.rpdesk->spwndMessage)
+ {
+ EngSetLastError(ERROR_ACCESS_DENIED);
+ return( NULL);
+ }
+
+ /* Some applications try to set a child as a parent */
+ if (IntIsChildWindow(Wnd, WndNewParent))
+ {
+ TRACE("IntSetParent try to set a child as a parent.\n");
+ EngSetLastError( ERROR_INVALID_PARAMETER );
+ return NULL;
+ }
+
+ pWndExam = WndNewParent; // Load parent Window to examine.
+ // Now test for set parent to parent hit.
+ while (pWndExam)
+ {
+ if (Wnd == pWndExam)
+ {
+ TRACE("IntSetParent Failed Test for set parent to parent!\n");
+ EngSetLastError(ERROR_INVALID_PARAMETER);
+ return NULL;
+ }
+ pWndExam = pWndExam->spwndParent;
+ }
+
+ /*
+ * Windows hides the window first, then shows it again
+ * including the WM_SHOWWINDOW messages and all
+ */
+ WasVisible = co_WinPosShowWindow(Wnd, SW_HIDE);
+
+ /* Window must belong to current process */
+ if (Wnd->head.pti->ppi != PsGetCurrentProcessWin32Process())
+ {
+ ERR("IntSetParent Window must belong to current process!\n");
+ return NULL;
+ }
+
+ WndOldParent = Wnd->spwndParent;
+
+ if ( WndOldParent &&
+ WndOldParent->ExStyle & WS_EX_LAYOUTRTL)
+ pt.x = Wnd->rcWindow.right;
+ else
+ pt.x = Wnd->rcWindow.left;
+ pt.y = Wnd->rcWindow.top;
+
+ IntScreenToClient(WndOldParent, &pt);
+
+ if (WndOldParent) UserReferenceObject(WndOldParent); /* Caller must deref */
+
+ if (WndNewParent != WndOldParent)
+ {
+ /* Unlink the window from the siblings list */
+ IntUnlinkWindow(Wnd);
+ Wnd->ExStyle2 &= ~WS_EX2_LINKED;
+
+ /* Set the new parent */
+ Wnd->spwndParent = WndNewParent;
+
+ if ( Wnd->style & WS_CHILD &&
+ Wnd->spwndOwner &&
+ Wnd->spwndOwner->ExStyle & WS_EX_TOPMOST )
+ {
+ ERR("SetParent Top Most from Pop up!\n");
+ Wnd->ExStyle |= WS_EX_TOPMOST;
+ }
+
+ /* Link the window with its new siblings */
+ IntLinkHwnd( Wnd,
+ ((0 == (Wnd->ExStyle & WS_EX_TOPMOST) &&
+ WndNewParent == UserGetDesktopWindow() ) ? HWND_TOP : HWND_TOPMOST ) );
+
+ }
+
+ if ( WndNewParent == co_GetDesktopWindow(Wnd) &&
+ !(Wnd->style & WS_CLIPSIBLINGS) )
+ {
+ Wnd->style |= WS_CLIPSIBLINGS;
+ DceResetActiveDCEs(Wnd);
+ }
+
+ /* if parent belongs to a different thread and the window isn't */
+ /* top-level, attach the two threads */
+ if ((Wnd->style & (WS_CHILD|WS_POPUP)) == WS_CHILD)
+ {
+ if ( Wnd->spwndParent != co_GetDesktopWindow(Wnd))
+ {
+ if (Wnd->head.pti != WndOldParent->head.pti)
+ {
+ //ERR("SetParent Old out.\n");
+ UserAttachThreadInput(Wnd->head.pti, WndOldParent->head.pti, FALSE);
+ }
+ }
+ if ( WndNewParent != co_GetDesktopWindow(Wnd))
+ {
+ if (Wnd->head.pti != WndNewParent->head.pti)
+ {
+ //ERR("SetParent New in.\n");
+ UserAttachThreadInput(Wnd->head.pti, WndNewParent->head.pti, TRUE);
+ }
+ }
+ }
+
+ if (WndOldParent == UserGetMessageWindow() || WndNewParent == UserGetMessageWindow())
+ swFlags |= SWP_NOACTIVATE;
+
+ IntNotifyWinEvent(EVENT_OBJECT_PARENTCHANGE, Wnd ,OBJID_WINDOW, CHILDID_SELF, WEF_SETBYWNDPTI);
+ /*
+ * SetParent additionally needs to make hwnd the top window
+ * in the z-order and send the expected WM_WINDOWPOSCHANGING and
+ * WM_WINDOWPOSCHANGED notification messages.
+ */
+ //ERR("IntSetParent SetWindowPos 1\n");
+ co_WinPosSetWindowPos( Wnd,
+ (0 == (Wnd->ExStyle & WS_EX_TOPMOST) ? HWND_TOP : HWND_TOPMOST),
+ pt.x, pt.y, 0, 0, swFlags);
+ //ERR("IntSetParent SetWindowPos 2 X %d Y %d\n",pt.x, pt.y);
+ if (WasVisible) co_WinPosShowWindow(Wnd, SW_SHOWNORMAL);
+
+ return WndOldParent;
+}
+
+HWND FASTCALL
+co_UserSetParent(HWND hWndChild, HWND hWndNewParent)
+{
+ PWND Wnd = NULL, WndParent = NULL, WndOldParent;
+ HWND hWndOldParent = NULL;
+ USER_REFERENCE_ENTRY Ref, ParentRef;
+
+ if (IntIsBroadcastHwnd(hWndChild) || IntIsBroadcastHwnd(hWndNewParent))
+ {
+ EngSetLastError(ERROR_INVALID_PARAMETER);
+ return( NULL);
+ }
+
+ if (hWndChild == IntGetDesktopWindow())
+ {
+ ERR("UserSetParent Access Denied!\n");
+ EngSetLastError(ERROR_ACCESS_DENIED);
+ return( NULL);
+ }
+
+ if (hWndNewParent)
+ {
+ if (!(WndParent = UserGetWindowObject(hWndNewParent)))
+ {
+ ERR("UserSetParent Bad New Parent!\n");
+ return( NULL);
+ }
+ }
+ else
+ {
+ if (!(WndParent = UserGetWindowObject(IntGetDesktopWindow())))
+ {
+ return( NULL);
+ }
+ }
+
+ if (!(Wnd = UserGetWindowObject(hWndChild)))
+ {
+ ERR("UserSetParent Bad Child!\n");
+ return( NULL);
+ }
+
+ UserRefObjectCo(Wnd, &Ref);
+ UserRefObjectCo(WndParent, &ParentRef);
+ //ERR("Enter co_IntSetParent\n");
+ WndOldParent = co_IntSetParent(Wnd, WndParent);
+ //ERR("Leave co_IntSetParent\n");
+ UserDerefObjectCo(WndParent);
+ UserDerefObjectCo(Wnd);
+
+ if (WndOldParent)
+ {
+ hWndOldParent = WndOldParent->head.h;
+ UserDereferenceObject(WndOldParent);
+ }
+
+ return( hWndOldParent);
+}
+
+/* Unlink the window from siblings. children and parent are kept in place. */
+VOID FASTCALL
+IntUnlinkWindow(PWND Wnd)
+{
+ if (Wnd->spwndNext)
+ Wnd->spwndNext->spwndPrev = Wnd->spwndPrev;
+
+ if (Wnd->spwndPrev)
+ Wnd->spwndPrev->spwndNext = Wnd->spwndNext;
+
+ if (Wnd->spwndParent && Wnd->spwndParent->spwndChild == Wnd)
+ Wnd->spwndParent->spwndChild = Wnd->spwndNext;
+
+ Wnd->spwndPrev = Wnd->spwndNext = NULL;
+}
+
+/* FUNCTIONS *****************************************************************/
+
+/*
+ * As best as I can figure, this function is used by EnumWindows,
+ * EnumChildWindows, EnumDesktopWindows, & EnumThreadWindows.
+ *
+ * It's supposed to build a list of HWNDs to return to the caller.
+ * We can figure out what kind of list by what parameters are
+ * passed to us.
+ */
+/*
+ * @implemented
+ */
+NTSTATUS
+APIENTRY
+NtUserBuildHwndList(
+ HDESK hDesktop,
+ HWND hwndParent,
+ BOOLEAN bChildren,
+ ULONG dwThreadId,
+ ULONG lParam,
+ HWND* pWnd,
+ ULONG* pBufSize)
+{
+ NTSTATUS Status;
+ ULONG dwCount = 0;
+
+ if (pBufSize == 0)
+ return ERROR_INVALID_PARAMETER;
+
+ if (hwndParent || !dwThreadId)
+ {
+ PDESKTOP Desktop;
+ PWND Parent, Window;
+
+ if(!hwndParent)
+ {
+ if(hDesktop == NULL && !(Desktop = IntGetActiveDesktop()))
+ {
+ return ERROR_INVALID_HANDLE;
+ }
+
+ if(hDesktop)
+ {
+ Status = IntValidateDesktopHandle(hDesktop,
+ UserMode,
+ 0,
+ &Desktop);
+ if(!NT_SUCCESS(Status))
+ {
+ return ERROR_INVALID_HANDLE;
+ }
+ }
+ hwndParent = Desktop->DesktopWindow;
+ }
+ else
+ {
+ hDesktop = 0;
+ }
+
+ if((Parent = UserGetWindowObject(hwndParent)) &&
+ (Window = Parent->spwndChild))
+ {
+ BOOL bGoDown = TRUE;
+
+ Status = STATUS_SUCCESS;
+ while(TRUE)
+ {
+ if (bGoDown)
+ {
+ if(dwCount++ < *pBufSize && pWnd)
+ {
+ _SEH2_TRY
+ {
+ ProbeForWrite(pWnd, sizeof(HWND), 1);
+ *pWnd = Window->head.h;
+ pWnd++;
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ Status = _SEH2_GetExceptionCode();
+ }
+ _SEH2_END
+ if(!NT_SUCCESS(Status))
+ {
+ SetLastNtError(Status);
+ break;
+ }
+ }
+ if (Window->spwndChild && bChildren)
+ {
+ Window = Window->spwndChild;
+ continue;
+ }
+ bGoDown = FALSE;
+ }
+ if (Window->spwndNext)
+ {
+ Window = Window->spwndNext;
+ bGoDown = TRUE;
+ continue;
+ }
+ Window = Window->spwndParent;
+ if (Window == Parent)
+ {
+ break;
+ }
+ }
+ }
+
+ if(hDesktop)
+ {
+ ObDereferenceObject(Desktop);
+ }
+ }
+ else // Build EnumThreadWindows list!
+ {
+ PETHREAD Thread;
+ PTHREADINFO W32Thread;
+ PLIST_ENTRY Current;
+ PWND Window;
+
+ Status = PsLookupThreadByThreadId((HANDLE)dwThreadId, &Thread);
+ if (!NT_SUCCESS(Status))
+ {
+ ERR("Thread Id is not valid!\n");
+ return ERROR_INVALID_PARAMETER;
+ }
+ if (!(W32Thread = (PTHREADINFO)Thread->Tcb.Win32Thread))
+ {
+ ObDereferenceObject(Thread);
+ ERR("Thread is not initialized!\n");
+ return ERROR_INVALID_PARAMETER;
+ }
+
+ Current = W32Thread->WindowListHead.Flink;
+ while (Current != &(W32Thread->WindowListHead))
+ {
+ Window = CONTAINING_RECORD(Current, WND, ThreadListEntry);
+ ASSERT(Window);
+
+ if (dwCount < *pBufSize && pWnd)
+ {
+ _SEH2_TRY
+ {
+ ProbeForWrite(pWnd, sizeof(HWND), 1);
+ *pWnd = Window->head.h;
+ pWnd++;
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ Status = _SEH2_GetExceptionCode();
+ }
+ _SEH2_END
+ if (!NT_SUCCESS(Status))
+ {
+ ERR("Failure to build window list!\n");
+ SetLastNtError(Status);
+ break;
+ }
+ }
+ dwCount++;
+ Current = Window->ThreadListEntry.Flink;
+ }
+
+ ObDereferenceObject(Thread);
+ }
+
+ *pBufSize = dwCount;
+ return STATUS_SUCCESS;
+}
+
+static void IntSendParentNotify( PWND pWindow, UINT msg )
+{
+ if ( (pWindow->style & (WS_CHILD | WS_POPUP)) == WS_CHILD &&
+ !(pWindow->style & WS_EX_NOPARENTNOTIFY))
+ {
+ if (pWindow->spwndParent && pWindow->spwndParent != UserGetDesktopWindow())
+ {
+ USER_REFERENCE_ENTRY Ref;
+ UserRefObjectCo(pWindow->spwndParent, &Ref);
+ co_IntSendMessage( pWindow->spwndParent->head.h,
+ WM_PARENTNOTIFY,
+ MAKEWPARAM( msg, pWindow->IDMenu),
+ (LPARAM)pWindow->head.h );
+ UserDerefObjectCo(pWindow->spwndParent);
+ }
+ }
+}
+
+void FASTCALL
+IntFixWindowCoordinates(CREATESTRUCTW* Cs, PWND ParentWindow, DWORD* dwShowMode)
+{
+#define IS_DEFAULT(x) ((x) == CW_USEDEFAULT || (x) == (SHORT)0x8000)
+
+ /* default positioning for overlapped windows */
+ if(!(Cs->style & (WS_POPUP | WS_CHILD)))
+ {
+ PMONITOR pMonitor;
+ PRTL_USER_PROCESS_PARAMETERS ProcessParams;
+
+ pMonitor = UserGetPrimaryMonitor();
+
+ /* Check if we don't have a monitor attached yet */
+ if(pMonitor == NULL)
+ {
+ Cs->x = Cs->y = 0;
+ Cs->cx = 800;
+ Cs->cy = 600;
+ return;
+ }
+
+ ProcessParams = PsGetCurrentProcess()->Peb->ProcessParameters;
+
+ if (IS_DEFAULT(Cs->x))
+ {
+ if (!IS_DEFAULT(Cs->y)) *dwShowMode = Cs->y;
+
+ if(ProcessParams->WindowFlags & STARTF_USEPOSITION)
+ {
+ Cs->x = ProcessParams->StartingX;
+ Cs->y = ProcessParams->StartingY;
+ }
+ else
+ {
+ Cs->x = pMonitor->cWndStack * (UserGetSystemMetrics(SM_CXSIZE) + UserGetSystemMetrics(SM_CXFRAME));
+ Cs->y = pMonitor->cWndStack * (UserGetSystemMetrics(SM_CYSIZE) + UserGetSystemMetrics(SM_CYFRAME));
+ if (Cs->x > ((pMonitor->rcWork.right - pMonitor->rcWork.left) / 4) ||
+ Cs->y > ((pMonitor->rcWork.bottom - pMonitor->rcWork.top) / 4))
+ {
+ /* reset counter and position */
+ Cs->x = 0;
+ Cs->y = 0;
+ pMonitor->cWndStack = 0;
+ }
+ pMonitor->cWndStack++;
+ }
+ }
+
+ if (IS_DEFAULT(Cs->cx))
+ {
+ if (ProcessParams->WindowFlags & STARTF_USEPOSITION)
+ {
+ Cs->cx = ProcessParams->CountX;
+ Cs->cy = ProcessParams->CountY;
+ }
+ else
+ {
+ Cs->cx = (pMonitor->rcWork.right - pMonitor->rcWork.left) * 3 / 4;
+ Cs->cy = (pMonitor->rcWork.bottom - pMonitor->rcWork.top) * 3 / 4;
+ }
+ }
+ /* neither x nor cx are default. Check the y values .
+ * In the trace we see Outlook and Outlook Express using
+ * cy set to CW_USEDEFAULT when opening the address book.
+ */
+ else if (IS_DEFAULT(Cs->cy))
+ {
+ TRACE("Strange use of CW_USEDEFAULT in nHeight\n");
+ Cs->cy = (pMonitor->rcWork.bottom - pMonitor->rcWork.top) * 3 / 4;
+ }
+ }
+ else
+ {
+ /* if CW_USEDEFAULT is set for non-overlapped windows, both values are set to zero */
+ if(IS_DEFAULT(Cs->x))
+ {
+ Cs->x = 0;
+ Cs->y = 0;
+ }
+ if(IS_DEFAULT(Cs->cx))
+ {
+ Cs->cx = 0;
+ Cs->cy = 0;
+ }
+ }
+
+#undef IS_DEFAULT
+}
+
+/* Allocates and initializes a window */
+PWND FASTCALL IntCreateWindow(CREATESTRUCTW* Cs,
+ PLARGE_STRING WindowName,
+ PCLS Class,
+ PWND ParentWindow,
+ PWND OwnerWindow,
+ PVOID acbiBuffer,
+ PDESKTOP pdeskCreated)
+{
+ PWND pWnd = NULL;
+ HWND hWnd;
+ PTHREADINFO pti = NULL;
+ BOOL MenuChanged;
+ BOOL bUnicodeWindow;
+
+ pti = pdeskCreated ? gptiDesktopThread : GetW32ThreadInfo();
+
+ if (!(Cs->dwExStyle & WS_EX_LAYOUTRTL))
+ { // Need both here for wine win.c test_CreateWindow.
+ //if (Cs->hwndParent && ParentWindow)
+ if (ParentWindow) // It breaks more tests..... WIP.
+ {
+ if ( (Cs->style & (WS_CHILD|WS_POPUP)) == WS_CHILD &&
+ ParentWindow->ExStyle & WS_EX_LAYOUTRTL &&
+ !(ParentWindow->ExStyle & WS_EX_NOINHERITLAYOUT) )
+ Cs->dwExStyle |= WS_EX_LAYOUTRTL;
+ }
+ else
+ { /*
+ * Note from MSDN <http://msdn.microsoft.com/en-us/library/aa913269.aspx>:
+ *
+ * Dialog boxes and message boxes do not inherit layout, so you must
+ * set the layout explicitly.
+ */
+ if ( Class->fnid != FNID_DIALOG )
+ {
+ if (pti->ppi->dwLayout & LAYOUT_RTL)
+ {
+ Cs->dwExStyle |= WS_EX_LAYOUTRTL;
+ }
+ }
+ }
+ }
+
+ /* Automatically add WS_EX_WINDOWEDGE */
+ if ((Cs->dwExStyle & WS_EX_DLGMODALFRAME) ||
+ ((!(Cs->dwExStyle & WS_EX_STATICEDGE)) &&
+ (Cs->style & (WS_DLGFRAME | WS_THICKFRAME))))
+ Cs->dwExStyle |= WS_EX_WINDOWEDGE;
+ else
+ Cs->dwExStyle &= ~WS_EX_WINDOWEDGE;
+
+ /* Is it a unicode window? */
+ bUnicodeWindow =!(Cs->dwExStyle & WS_EX_SETANSICREATOR);
+ Cs->dwExStyle &= ~WS_EX_SETANSICREATOR;
+
+ /* Allocate the new window */
+ pWnd = (PWND) UserCreateObject( gHandleTable,
+ pdeskCreated ? pdeskCreated : pti->rpdesk,
+ pti,
+ (PHANDLE)&hWnd,
+ TYPE_WINDOW,
+ sizeof(WND) + Class->cbwndExtra);
+
+ if (!pWnd)
+ {
+ goto AllocError;
+ }
+
+ TRACE("Created window object with handle %p\n", hWnd);
+
+ if (pdeskCreated && pdeskCreated->DesktopWindow == NULL )
+ { /* HACK: Helper for win32csr/desktopbg.c */
+ /* If there is no desktop window yet, we must be creating it */
+ TRACE("CreateWindow setting desktop.\n");
+ pdeskCreated->DesktopWindow = hWnd;
+ pdeskCreated->pDeskInfo->spwnd = pWnd;
+ }
+
+ /*
+ * Fill out the structure describing it.
+ */
+ /* Remember, pWnd->head is setup in object.c ... */
+ pWnd->spwndParent = ParentWindow;
+ pWnd->spwndOwner = OwnerWindow;
+ pWnd->fnid = 0;
+ pWnd->spwndLastActive = pWnd;
+ pWnd->state2 |= WNDS2_WIN40COMPAT; // FIXME!!!
+ pWnd->pcls = Class;
+ pWnd->hModule = Cs->hInstance;
+ pWnd->style = Cs->style & ~WS_VISIBLE;
+ pWnd->ExStyle = Cs->dwExStyle;
+ pWnd->cbwndExtra = pWnd->pcls->cbwndExtra;
+ pWnd->pActCtx = acbiBuffer;
+ pWnd->InternalPos.MaxPos.x = pWnd->InternalPos.MaxPos.y = -1;
+ pWnd->InternalPos.IconPos.x = pWnd->InternalPos.IconPos.y = -1;
+
+ if (pWnd->spwndParent != NULL && Cs->hwndParent != 0)
+ {
+ pWnd->HideFocus = pWnd->spwndParent->HideFocus;
+ pWnd->HideAccel = pWnd->spwndParent->HideAccel;
+ }
+
+ pWnd->head.pti->cWindows++;
+
+ if (Class->hIcon && !Class->hIconSm)
+ {
+ Class->hIconSmIntern = co_IntCopyImage( Class->hIcon, IMAGE_ICON,
+ UserGetSystemMetrics( SM_CXSMICON ),
+ UserGetSystemMetrics( SM_CYSMICON ), 0 );
+ TRACE("IntCreateWindow hIconSmIntern %p\n",Class->hIconSmIntern);
+ Class->CSF_flags |= CSF_CACHEDSMICON;
+ }
+
+ if (pWnd->pcls->CSF_flags & CSF_SERVERSIDEPROC)
+ pWnd->state |= WNDS_SERVERSIDEWINDOWPROC;
+
+ /* BugBoy Comments: Comment below say that System classes are always created
+ as UNICODE. In windows, creating a window with the ANSI version of CreateWindow
+ sets the window to ansi as verified by testing with IsUnicodeWindow API.
+
+ No where can I see in code or through testing does the window change back
+ to ANSI after being created as UNICODE in ROS. I didnt do more testing to
+ see what problems this would cause. */
+
+ // Set WndProc from Class.
+ pWnd->lpfnWndProc = pWnd->pcls->lpfnWndProc;
+
+ // GetWindowProc, test for non server side default classes and set WndProc.
+ if ( pWnd->pcls->fnid <= FNID_GHOST && pWnd->pcls->fnid >= FNID_BUTTON )
+ {
+ if (bUnicodeWindow)
+ {
+ if (GETPFNCLIENTA(pWnd->pcls->fnid) == pWnd->lpfnWndProc)
+ pWnd->lpfnWndProc = GETPFNCLIENTW(pWnd->pcls->fnid);
+ }
+ else
+ {
+ if (GETPFNCLIENTW(pWnd->pcls->fnid) == pWnd->lpfnWndProc)
+ pWnd->lpfnWndProc = GETPFNCLIENTA(pWnd->pcls->fnid);
+ }
+ }
+
+ // If not an Unicode caller, set Ansi creator bit.
+ if (!bUnicodeWindow) pWnd->state |= WNDS_ANSICREATOR;
+
+ // Clone Class Ansi/Unicode proc type.
+ if (pWnd->pcls->CSF_flags & CSF_ANSIPROC)
+ {
+ pWnd->state |= WNDS_ANSIWINDOWPROC;
+ pWnd->Unicode = FALSE;
+ }
+ else
+ { /*
+ * It seems there can be both an Ansi creator and Unicode Class Window
+ * WndProc, unless the following overriding conditions occur:
+ */
+ if ( !bUnicodeWindow &&
+ ( Class->atomClassName == gpsi->atomSysClass[ICLS_BUTTON] ||
+ Class->atomClassName == gpsi->atomSysClass[ICLS_COMBOBOX] ||
+ Class->atomClassName == gpsi->atomSysClass[ICLS_COMBOLBOX] ||
+ Class->atomClassName == gpsi->atomSysClass[ICLS_DIALOG] ||
+ Class->atomClassName == gpsi->atomSysClass[ICLS_EDIT] ||
+ Class->atomClassName == gpsi->atomSysClass[ICLS_IME] ||
+ Class->atomClassName == gpsi->atomSysClass[ICLS_LISTBOX] ||
+ Class->atomClassName == gpsi->atomSysClass[ICLS_MDICLIENT] ||
+ Class->atomClassName == gpsi->atomSysClass[ICLS_STATIC] ) )
+ { // Override Class and set the window Ansi WndProc.
+ pWnd->state |= WNDS_ANSIWINDOWPROC;
+ pWnd->Unicode = FALSE;
+ }
+ else
+ { // Set the window Unicode WndProc.
+ pWnd->state &= ~WNDS_ANSIWINDOWPROC;
+ pWnd->Unicode = TRUE;
+ }
+ }
+
+ /* BugBoy Comments: if the window being created is a edit control, ATOM 0xCxxx,
+ then my testing shows that windows (2k and XP) creates a CallProc for it immediately
+ Dont understand why it does this. */
+ if (Class->atomClassName == gpsi->atomSysClass[ICLS_EDIT])
+ {
+ PCALLPROCDATA CallProc;
- if (hMenu && !ValidateHandle(hMenu, TYPE_MENU))
++ CallProc = CreateCallProc(pWnd->head.rpdesk, pWnd->lpfnWndProc, pWnd->Unicode , pWnd->head.pti->ppi);
+
+ if (!CallProc)
+ {
+ EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
+ ERR("Warning: Unable to create CallProc for edit control. Control may not operate correctly! hwnd %p\n", hWnd);
+ }
+ else
+ {
+ UserAddCallProcToClass(pWnd->pcls, CallProc);
+ }
+ }
+
+ InitializeListHead(&pWnd->PropListHead);
+ pWnd->PropListItems = 0;
+
+ if ( WindowName->Buffer != NULL && WindowName->Length > 0 )
+ {
+ pWnd->strName.Buffer = DesktopHeapAlloc(pWnd->head.rpdesk,
+ WindowName->Length + sizeof(UNICODE_NULL));
+ if (pWnd->strName.Buffer == NULL)
+ {
+ goto AllocError;
+ }
+
+ RtlCopyMemory(pWnd->strName.Buffer, WindowName->Buffer, WindowName->Length);
+ pWnd->strName.Buffer[WindowName->Length / sizeof(WCHAR)] = L'\0';
+ pWnd->strName.Length = WindowName->Length;
+ pWnd->strName.MaximumLength = WindowName->Length + sizeof(UNICODE_NULL);
+ }
+
+ /* Correct the window style. */
+ if ((pWnd->style & (WS_CHILD | WS_POPUP)) != WS_CHILD)
+ {
+ pWnd->style |= WS_CLIPSIBLINGS;
+ if (!(pWnd->style & WS_POPUP))
+ {
+ pWnd->style |= WS_CAPTION;
+ }
+ }
+
+ /* WS_EX_WINDOWEDGE depends on some other styles */
+ if (pWnd->ExStyle & WS_EX_DLGMODALFRAME)
+ pWnd->ExStyle |= WS_EX_WINDOWEDGE;
+ else if (pWnd->style & (WS_DLGFRAME | WS_THICKFRAME))
+ {
+ if (!((pWnd->ExStyle & WS_EX_STATICEDGE) &&
+ (pWnd->style & (WS_CHILD | WS_POPUP))))
+ pWnd->ExStyle |= WS_EX_WINDOWEDGE;
+ }
+ else
+ pWnd->ExStyle &= ~WS_EX_WINDOWEDGE;
+
+ if (!(pWnd->style & (WS_CHILD | WS_POPUP)))
+ pWnd->state |= WNDS_SENDSIZEMOVEMSGS;
+
+ /* Set the window menu */
+ if ((Cs->style & (WS_CHILD | WS_POPUP)) != WS_CHILD)
+ {
+ if (Cs->hMenu)
+ {
+ IntSetMenu(pWnd, Cs->hMenu, &MenuChanged);
+ }
+ else if (pWnd->pcls->lpszMenuName) // Take it from the parent.
+ {
+ UNICODE_STRING MenuName;
+ HMENU hMenu;
+
+ if (IS_INTRESOURCE(pWnd->pcls->lpszMenuName))
+ {
+ MenuName.Length = 0;
+ MenuName.MaximumLength = 0;
+ MenuName.Buffer = pWnd->pcls->lpszMenuName;
+ }
+ else
+ {
+ RtlInitUnicodeString( &MenuName, pWnd->pcls->lpszMenuName);
+ }
+ hMenu = co_IntCallLoadMenu( pWnd->pcls->hModule, &MenuName);
+ if (hMenu) IntSetMenu(pWnd, hMenu, &MenuChanged);
+ }
+ }
+ else // Not a child
+ pWnd->IDMenu = (UINT) Cs->hMenu;
+
+
+ if ( ParentWindow &&
+ ParentWindow != ParentWindow->head.rpdesk->spwndMessage &&
+ ParentWindow != ParentWindow->head.rpdesk->pDeskInfo->spwnd )
+ {
+ PWND Owner = IntGetNonChildAncestor(ParentWindow);
+
+ if (!IntValidateOwnerDepth(pWnd, Owner))
+ {
+ EngSetLastError(ERROR_INVALID_PARAMETER);
+ goto Error;
+ }
+ if ( pWnd->spwndOwner &&
+ pWnd->spwndOwner->ExStyle & WS_EX_TOPMOST )
+ {
+ pWnd->ExStyle |= WS_EX_TOPMOST;
+ }
+ if ( pWnd->spwndOwner &&
+ Class->atomClassName != gpsi->atomSysClass[ICLS_IME] &&
+ pti != pWnd->spwndOwner->head.pti)
+ {
+ //ERR("CreateWindow Owner in.\n");
+ UserAttachThreadInput(pti, pWnd->spwndOwner->head.pti, TRUE);
+ }
+ }
+
+ /* Insert the window into the thread's window list. */
+ InsertTailList (&pti->WindowListHead, &pWnd->ThreadListEntry);
+
+ /* Handle "CS_CLASSDC", it is tested first. */
+ if ( (pWnd->pcls->style & CS_CLASSDC) && !(pWnd->pcls->pdce) )
+ { /* One DCE per class to have CLASS. */
+ pWnd->pcls->pdce = DceAllocDCE( pWnd, DCE_CLASS_DC );
+ }
+ else if ( pWnd->pcls->style & CS_OWNDC)
+ { /* Allocate a DCE for this window. */
+ DceAllocDCE(pWnd, DCE_WINDOW_DC);
+ }
+
+ return pWnd;
+
+AllocError:
+ ERR("IntCreateWindow Allocation Error.\n");
+ SetLastNtError(STATUS_INSUFFICIENT_RESOURCES);
+Error:
+ if(pWnd)
+ UserDereferenceObject(pWnd);
+ return NULL;
+}
+
+/*
+ * @implemented
+ */
+PWND FASTCALL
+co_UserCreateWindowEx(CREATESTRUCTW* Cs,
+ PUNICODE_STRING ClassName,
+ PLARGE_STRING WindowName,
+ PVOID acbiBuffer)
+{
+ ULONG style;
+ PWND Window = NULL, ParentWindow = NULL, OwnerWindow;
+ HWND hWnd, hWndParent, hWndOwner, hwndInsertAfter;
+ PWINSTATION_OBJECT WinSta;
+ PCLS Class = NULL;
+ SIZE Size;
+ POINT MaxSize, MaxPos, MinTrack, MaxTrack;
+ CBT_CREATEWNDW * pCbtCreate;
+ LRESULT Result;
+ USER_REFERENCE_ENTRY ParentRef, Ref;
+ PTHREADINFO pti;
+ DWORD dwShowMode = SW_SHOW;
+ CREATESTRUCTW *pCsw = NULL;
+ PVOID pszClass = NULL, pszName = NULL;
+ PWND ret = NULL;
+
+ /* Get the current window station and reference it */
+ pti = GetW32ThreadInfo();
+ if (pti == NULL || pti->rpdesk == NULL)
+ {
+ ERR("Thread is not attached to a desktop! Cannot create window!\n");
+ return NULL; // There is nothing to cleanup.
+ }
+ WinSta = pti->rpdesk->rpwinstaParent;
+ ObReferenceObjectByPointer(WinSta, KernelMode, ExWindowStationObjectType, 0);
+
+ pCsw = NULL;
+ pCbtCreate = NULL;
+
+ /* Get the class and reference it */
+ Class = IntGetAndReferenceClass(ClassName, Cs->hInstance, FALSE);
+ if(!Class)
+ {
+ ERR("Failed to find class %wZ\n", ClassName);
+ goto cleanup;
+ }
+
+ /* Now find the parent and the owner window */
+ hWndParent = pti->rpdesk->pDeskInfo->spwnd->head.h;
+ hWndOwner = NULL;
+
+ if (Cs->hwndParent == HWND_MESSAGE)
+ {
+ Cs->hwndParent = hWndParent = pti->rpdesk->spwndMessage->head.h;
+ }
+ else if (Cs->hwndParent)
+ {
+ if ((Cs->style & (WS_CHILD|WS_POPUP)) != WS_CHILD)
+ hWndOwner = Cs->hwndParent;
+ else
+ hWndParent = Cs->hwndParent;
+ }
+ else if ((Cs->style & (WS_CHILD|WS_POPUP)) == WS_CHILD)
+ {
+ ERR("Cannot create a child window without a parrent!\n");
+ EngSetLastError(ERROR_TLW_WITH_WSCHILD);
+ goto cleanup; /* WS_CHILD needs a parent, but WS_POPUP doesn't */
+ }
+
+ ParentWindow = hWndParent ? UserGetWindowObject(hWndParent): NULL;
+ OwnerWindow = hWndOwner ? UserGetWindowObject(hWndOwner): NULL;
+
+ /* FIXME: Is this correct? */
+ if(OwnerWindow)
+ OwnerWindow = UserGetAncestor(OwnerWindow, GA_ROOT);
+
+ /* Fix the position and the size of the window */
+ if (ParentWindow)
+ {
+ UserRefObjectCo(ParentWindow, &ParentRef);
+ IntFixWindowCoordinates(Cs, ParentWindow, &dwShowMode);
+ }
+
+ /* Allocate and initialize the new window */
+ Window = IntCreateWindow(Cs,
+ WindowName,
+ Class,
+ ParentWindow,
+ OwnerWindow,
+ acbiBuffer,
+ NULL);
+ if(!Window)
+ {
+ ERR("IntCreateWindow failed!\n");
+ goto cleanup;
+ }
+
+ hWnd = UserHMGetHandle(Window);
+ hwndInsertAfter = HWND_TOP;
+
+ UserRefObjectCo(Window, &Ref);
+ UserDereferenceObject(Window);
+ ObDereferenceObject(WinSta);
+
+ //// Check for a hook to eliminate overhead. ////
+ if ( ISITHOOKED(WH_CBT) || (pti->rpdesk->pDeskInfo->fsHooks & HOOKID_TO_FLAG(WH_CBT)) )
+ {
+ // Allocate the calling structures Justin Case this goes Global.
+ pCsw = ExAllocatePoolWithTag(NonPagedPool, sizeof(CREATESTRUCTW), TAG_HOOK);
+ pCbtCreate = ExAllocatePoolWithTag(NonPagedPool, sizeof(CBT_CREATEWNDW), TAG_HOOK);
+ if (!pCsw || !pCbtCreate)
+ {
+ ERR("UserHeapAlloc() failed!\n");
+ goto cleanup;
+ }
+
+ /* Fill the new CREATESTRUCTW */
+ RtlCopyMemory(pCsw, Cs, sizeof(CREATESTRUCTW));
+ pCsw->style = Window->style; /* HCBT_CREATEWND needs the real window style */
+
+ // Based on the assumption this is from "unicode source" user32, ReactOS, answer is yes.
+ if (!IS_ATOM(ClassName->Buffer))
+ {
+ if (Window->state & WNDS_ANSICREATOR)
+ {
+ ANSI_STRING AnsiString;
+ AnsiString.MaximumLength = (USHORT)RtlUnicodeStringToAnsiSize(ClassName)+sizeof(CHAR);
+ pszClass = UserHeapAlloc(AnsiString.MaximumLength);
+ if (!pszClass)
+ {
+ ERR("UserHeapAlloc() failed!\n");
+ goto cleanup;
+ }
+ RtlZeroMemory(pszClass, AnsiString.MaximumLength);
+ AnsiString.Buffer = (PCHAR)pszClass;
+ RtlUnicodeStringToAnsiString(&AnsiString, ClassName, FALSE);
+ }
+ else
+ {
+ UNICODE_STRING UnicodeString;
+ UnicodeString.MaximumLength = ClassName->Length + sizeof(UNICODE_NULL);
+ pszClass = UserHeapAlloc(UnicodeString.MaximumLength);
+ if (!pszClass)
+ {
+ ERR("UserHeapAlloc() failed!\n");
+ goto cleanup;
+ }
+ RtlZeroMemory(pszClass, UnicodeString.MaximumLength);
+ UnicodeString.Buffer = (PWSTR)pszClass;
+ RtlCopyUnicodeString(&UnicodeString, ClassName);
+ }
+ pCsw->lpszClass = UserHeapAddressToUser(pszClass);
+ }
+ if (WindowName->Length)
+ {
+ UNICODE_STRING Name;
+ Name.Buffer = WindowName->Buffer;
+ Name.Length = (USHORT)min(WindowName->Length, MAXUSHORT); // FIXME: LARGE_STRING truncated
+ Name.MaximumLength = (USHORT)min(WindowName->MaximumLength, MAXUSHORT);
+
+ if (Window->state & WNDS_ANSICREATOR)
+ {
+ ANSI_STRING AnsiString;
+ AnsiString.MaximumLength = (USHORT)RtlUnicodeStringToAnsiSize(&Name) + sizeof(CHAR);
+ pszName = UserHeapAlloc(AnsiString.MaximumLength);
+ if (!pszName)
+ {
+ ERR("UserHeapAlloc() failed!\n");
+ goto cleanup;
+ }
+ RtlZeroMemory(pszName, AnsiString.MaximumLength);
+ AnsiString.Buffer = (PCHAR)pszName;
+ RtlUnicodeStringToAnsiString(&AnsiString, &Name, FALSE);
+ }
+ else
+ {
+ UNICODE_STRING UnicodeString;
+ UnicodeString.MaximumLength = Name.Length + sizeof(UNICODE_NULL);
+ pszName = UserHeapAlloc(UnicodeString.MaximumLength);
+ if (!pszName)
+ {
+ ERR("UserHeapAlloc() failed!\n");
+ goto cleanup;
+ }
+ RtlZeroMemory(pszName, UnicodeString.MaximumLength);
+ UnicodeString.Buffer = (PWSTR)pszName;
+ RtlCopyUnicodeString(&UnicodeString, &Name);
+ }
+ pCsw->lpszName = UserHeapAddressToUser(pszName);
+ }
+
+ pCbtCreate->lpcs = pCsw;
+ pCbtCreate->hwndInsertAfter = hwndInsertAfter;
+
+ //// Call the WH_CBT hook ////
+ Result = co_HOOK_CallHooks(WH_CBT, HCBT_CREATEWND, (WPARAM) hWnd, (LPARAM) pCbtCreate);
+ if (Result != 0)
+ {
+ ERR("WH_CBT HCBT_CREATEWND hook failed! 0x%x\n", Result);
+ goto cleanup;
+ }
+ // Write back changes.
+ Cs->cx = pCsw->cx;
+ Cs->cy = pCsw->cy;
+ Cs->x = pCsw->x;
+ Cs->y = pCsw->y;
+ hwndInsertAfter = pCbtCreate->hwndInsertAfter;
+ }
+
+ /* NCCREATE and WM_NCCALCSIZE need the original values */
+ Cs->lpszName = (LPCWSTR) WindowName;
+ Cs->lpszClass = (LPCWSTR) ClassName;
+
+ if ((Cs->style & (WS_CHILD|WS_POPUP)) == WS_CHILD)
+ {
+ if (ParentWindow != co_GetDesktopWindow(Window))
+ {
+ Cs->x += ParentWindow->rcClient.left;
+ Cs->y += ParentWindow->rcClient.top;
+ }
+ }
+
+ /* Send the WM_GETMINMAXINFO message */
+ Size.cx = Cs->cx;
+ Size.cy = Cs->cy;
+
+ if ((Cs->style & WS_THICKFRAME) || !(Cs->style & (WS_POPUP | WS_CHILD)))
+ {
+ co_WinPosGetMinMaxInfo(Window, &MaxSize, &MaxPos, &MinTrack, &MaxTrack);
+ if (Size.cx > MaxTrack.x) Size.cx = MaxTrack.x;
+ if (Size.cy > MaxTrack.y) Size.cy = MaxTrack.y;
+ if (Size.cx < MinTrack.x) Size.cx = MinTrack.x;
+ if (Size.cy < MinTrack.y) Size.cy = MinTrack.y;
+ }
+
+ Window->rcWindow.left = Cs->x;
+ Window->rcWindow.top = Cs->y;
+ Window->rcWindow.right = Cs->x + Size.cx;
+ Window->rcWindow.bottom = Cs->y + Size.cy;
+ /*
+ if (0 != (Window->style & WS_CHILD) && ParentWindow)
+ {
+ ERR("co_UserCreateWindowEx(): Offset rcWindow\n");
+ RECTL_vOffsetRect(&Window->rcWindow,
+ ParentWindow->rcClient.left,
+ ParentWindow->rcClient.top);
+ }
+ */
+ /* correct child window coordinates if mirroring on parent is enabled */
+ if (ParentWindow != NULL)
+ {
+ if ( ((Cs->style & WS_CHILD) == WS_CHILD) &&
+ ((ParentWindow->ExStyle & WS_EX_LAYOUTRTL) == WS_EX_LAYOUTRTL))
+ {
+ Window->rcWindow.right = ParentWindow->rcClient.right - (Window->rcWindow.left - ParentWindow->rcClient.left);
+ Window->rcWindow.left = Window->rcWindow.right - Size.cx;
+ }
+ }
+
+ Window->rcClient = Window->rcWindow;
+
+ /* Link the window */
+ if (NULL != ParentWindow)
+ {
+ /* Link the window into the siblings list */
+ if ((Cs->style & (WS_CHILD|WS_MAXIMIZE)) == WS_CHILD)
+ IntLinkHwnd(Window, HWND_BOTTOM);
+ else
+ IntLinkHwnd(Window, hwndInsertAfter);
+ }
+
+ if (!(Window->state2 & WNDS2_WIN31COMPAT))
+ {
+ if (Class->style & CS_PARENTDC && !(ParentWindow->style & WS_CLIPCHILDREN))
+ Window->style &= ~(WS_CLIPSIBLINGS | WS_CLIPCHILDREN);
+ }
+
+ if ((Window->style & (WS_CHILD | WS_POPUP)) == WS_CHILD)
+ {
+ if ( !IntIsTopLevelWindow(Window) )
+ {
+ if (pti != Window->spwndParent->head.pti)
+ {
+ //ERR("CreateWindow Parent in.\n");
+ UserAttachThreadInput(pti, Window->spwndParent->head.pti, TRUE);
+ }
+ }
+ }
+
+ /* Send the NCCREATE message */
+ Result = co_IntSendMessage(UserHMGetHandle(Window), WM_NCCREATE, 0, (LPARAM) Cs);
+ if (!Result)
+ {
+ ERR("co_UserCreateWindowEx(): NCCREATE message failed\n");
+ goto cleanup;
+ }
+
+ /* Send the WM_NCCALCSIZE message */
+ {
+ // RECT rc;
+ MaxPos.x = Window->rcWindow.left;
+ MaxPos.y = Window->rcWindow.top;
+
+ Result = co_WinPosGetNonClientSize(Window, &Window->rcWindow, &Window->rcClient);
+ //rc = Window->rcWindow;
+ //Result = co_IntSendMessageNoWait(Window->head.h, WM_NCCALCSIZE, FALSE, (LPARAM)&rc);
+ //Window->rcClient = rc;
+
+ RECTL_vOffsetRect(&Window->rcWindow, MaxPos.x - Window->rcWindow.left,
+ MaxPos.y - Window->rcWindow.top);
+ }
+
+ /* Send the WM_CREATE message. */
+ Result = co_IntSendMessage(UserHMGetHandle(Window), WM_CREATE, 0, (LPARAM) Cs);
+ if (Result == (LRESULT)-1)
+ {
+ ERR("co_UserCreateWindowEx(): WM_CREATE message failed\n");
+ goto cleanup;
+ }
+
+ /* Send the EVENT_OBJECT_CREATE event */
+ IntNotifyWinEvent(EVENT_OBJECT_CREATE, Window, OBJID_WINDOW, CHILDID_SELF, 0);
+
+ /* By setting the flag below it can be examined to determine if the window
+ was created successfully and a valid pwnd was passed back to caller since
+ from here the function has to succeed. */
+ Window->state2 |= WNDS2_WMCREATEMSGPROCESSED;
+
+ /* Send the WM_SIZE and WM_MOVE messages. */
+ if (!(Window->state & WNDS_SENDSIZEMOVEMSGS))
+ {
+ co_WinPosSendSizeMove(Window);
+ }
+
+ /* Show or maybe minimize or maximize the window. */
+
+ style = IntSetStyle( Window, 0, WS_MAXIMIZE | WS_MINIMIZE );
+ if (style & (WS_MINIMIZE | WS_MAXIMIZE))
+ {
+ RECTL NewPos;
+ UINT SwFlag = (style & WS_MINIMIZE) ? SW_MINIMIZE : SW_MAXIMIZE;
+
+ SwFlag = co_WinPosMinMaximize(Window, SwFlag, &NewPos);
+ SwFlag |= SWP_NOZORDER|SWP_FRAMECHANGED; /* Frame always gets changed */
+ if (!(style & WS_VISIBLE) || (style & WS_CHILD) || UserGetActiveWindow()) SwFlag |= SWP_NOACTIVATE;
+ co_WinPosSetWindowPos(Window, 0, NewPos.left, NewPos.top,
+ NewPos.right, NewPos.bottom, SwFlag);
+ }
+
+ /* Send the WM_PARENTNOTIFY message */
+ IntSendParentNotify(Window, WM_CREATE);
+
+ /* Notify the shell that a new window was created */
+ if (Window->spwndParent == UserGetDesktopWindow() &&
+ Window->spwndOwner == NULL &&
+ (Window->style & WS_VISIBLE) &&
+ (!(Window->ExStyle & WS_EX_TOOLWINDOW) ||
+ (Window->ExStyle & WS_EX_APPWINDOW)))
+ {
+ co_IntShellHookNotify(HSHELL_WINDOWCREATED, (WPARAM)hWnd, 0);
+ }
+
+ /* Initialize and show the window's scrollbars */
+ if (Window->style & WS_VSCROLL)
+ {
+ co_UserShowScrollBar(Window, SB_VERT, FALSE, TRUE);
+ }
+ if (Window->style & WS_HSCROLL)
+ {
+ co_UserShowScrollBar(Window, SB_HORZ, TRUE, FALSE);
+ }
+
+ /* Show the new window */
+ if (Cs->style & WS_VISIBLE)
+ {
+ if (Window->style & WS_MAXIMIZE)
+ dwShowMode = SW_SHOW;
+ else if (Window->style & WS_MINIMIZE)
+ dwShowMode = SW_SHOWMINIMIZED;
+
+ co_WinPosShowWindow(Window, dwShowMode);
+
+ if (Window->ExStyle & WS_EX_MDICHILD)
+ {
+ ASSERT(ParentWindow);
+ if(!ParentWindow)
+ goto cleanup;
+ co_IntSendMessage(UserHMGetHandle(ParentWindow), WM_MDIREFRESHMENU, 0, 0);
+ /* ShowWindow won't activate child windows */
+ co_WinPosSetWindowPos(Window, HWND_TOP, 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOMOVE | SWP_NOSIZE);
+ }
+ }
+
+ TRACE("co_UserCreateWindowEx(): Created window %p\n", hWnd);
+ ret = Window;
+
+cleanup:
+ if (!ret)
+ {
+ TRACE("co_UserCreateWindowEx(): Error Created window!\n");
+ /* If the window was created, the class will be dereferenced by co_UserDestroyWindow */
+ if (Window)
+ co_UserDestroyWindow(Window);
+ else if (Class)
+ IntDereferenceClass(Class, pti->pDeskInfo, pti->ppi);
+ }
+
+ if (pCsw) ExFreePoolWithTag(pCsw, TAG_HOOK);
+ if (pCbtCreate) ExFreePoolWithTag(pCbtCreate, TAG_HOOK);
+ if (pszName) UserHeapFree(pszName);
+ if (pszClass) UserHeapFree(pszClass);
+
+ if (Window)
+ {
+ UserDerefObjectCo(Window);
+ }
+ if (ParentWindow) UserDerefObjectCo(ParentWindow);
+
+ return ret;
+}
+
+NTSTATUS
+NTAPI
+ProbeAndCaptureLargeString(
+ OUT PLARGE_STRING plstrSafe,
+ IN PLARGE_STRING plstrUnsafe)
+{
+ LARGE_STRING lstrTemp;
+ PVOID pvBuffer = NULL;
+
+ _SEH2_TRY
+ {
+ /* Probe and copy the string */
+ ProbeForRead(plstrUnsafe, sizeof(LARGE_STRING), sizeof(ULONG));
+ lstrTemp = *plstrUnsafe;
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ /* Fail */
+ _SEH2_YIELD(return _SEH2_GetExceptionCode();)
+ }
+ _SEH2_END
+
+ if (lstrTemp.Length != 0)
+ {
+ /* Allocate a buffer from paged pool */
+ pvBuffer = ExAllocatePoolWithTag(PagedPool, lstrTemp.Length, TAG_STRING);
+ if (!pvBuffer)
+ {
+ return STATUS_NO_MEMORY;
+ }
+
+ _SEH2_TRY
+ {
+ /* Probe and copy the buffer */
+ ProbeForRead(lstrTemp.Buffer, lstrTemp.Length, sizeof(WCHAR));
+ RtlCopyMemory(pvBuffer, lstrTemp.Buffer, lstrTemp.Length);
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ /* Cleanup and fail */
+ ExFreePoolWithTag(pvBuffer, TAG_STRING);
+ _SEH2_YIELD(return _SEH2_GetExceptionCode();)
+ }
+ _SEH2_END
+ }
+
+ /* Set the output string */
+ plstrSafe->Buffer = pvBuffer;
+ plstrSafe->Length = lstrTemp.Length;
+ plstrSafe->MaximumLength = lstrTemp.Length;
+
+ return STATUS_SUCCESS;
+}
+
+/**
+ * \todo Allow passing plstrClassName as ANSI.
+ */
+HWND
+NTAPI
+NtUserCreateWindowEx(
+ DWORD dwExStyle,
+ PLARGE_STRING plstrClassName,
+ PLARGE_STRING plstrClsVersion,
+ PLARGE_STRING plstrWindowName,
+ DWORD dwStyle,
+ int x,
+ int y,
+ int nWidth,
+ int nHeight,
+ HWND hWndParent,
+ HMENU hMenu,
+ HINSTANCE hInstance,
+ LPVOID lpParam,
+ DWORD dwFlags,
+ PVOID acbiBuffer)
+{
+ NTSTATUS Status;
+ LARGE_STRING lstrWindowName;
+ LARGE_STRING lstrClassName;
+ UNICODE_STRING ustrClassName;
+ CREATESTRUCTW Cs;
+ HWND hwnd = NULL;
+ PWND pwnd;
+
+ lstrWindowName.Buffer = NULL;
+ lstrClassName.Buffer = NULL;
+
+ ASSERT(plstrWindowName);
+
+ if ( (dwStyle & (WS_POPUP|WS_CHILD)) != WS_CHILD)
+ {
+ /* check hMenu is valid handle */
- /* error is set in ValidateHandle */
++ if (hMenu && !UserGetMenuObject(hMenu))
+ {
- BOOLEAN FASTCALL co_UserDestroyWindow(PWND Window)
++ ERR("NtUserCreateWindowEx: Got an invalid menu handle!\n");
++ EngSetLastError(ERROR_INVALID_MENU_HANDLE);
+ return NULL;
+ }
+ }
+
+ /* Copy the window name to kernel mode */
+ Status = ProbeAndCaptureLargeString(&lstrWindowName, plstrWindowName);
+ if (!NT_SUCCESS(Status))
+ {
+ ERR("NtUserCreateWindowEx: failed to capture plstrWindowName\n");
+ SetLastNtError(Status);
+ return NULL;
+ }
+
+ plstrWindowName = &lstrWindowName;
+
+ /* Check if the class is an atom */
+ if (IS_ATOM(plstrClassName))
+ {
+ /* It is, pass the atom in the UNICODE_STRING */
+ ustrClassName.Buffer = (PVOID)plstrClassName;
+ ustrClassName.Length = 0;
+ ustrClassName.MaximumLength = 0;
+ }
+ else
+ {
+ /* It's not, capture the class name */
+ Status = ProbeAndCaptureLargeString(&lstrClassName, plstrClassName);
+ if (!NT_SUCCESS(Status))
+ {
+ ERR("NtUserCreateWindowEx: failed to capture plstrClassName\n");
+ /* Set last error, cleanup and return */
+ SetLastNtError(Status);
+ goto cleanup;
+ }
+
+ /* We pass it on as a UNICODE_STRING */
+ ustrClassName.Buffer = lstrClassName.Buffer;
+ ustrClassName.Length = (USHORT)min(lstrClassName.Length, MAXUSHORT); // FIXME: LARGE_STRING truncated
+ ustrClassName.MaximumLength = (USHORT)min(lstrClassName.MaximumLength, MAXUSHORT);
+ }
+
+ /* Fill the CREATESTRUCTW */
+ /* we will keep here the original parameters */
+ Cs.style = dwStyle;
+ Cs.lpCreateParams = lpParam;
+ Cs.hInstance = hInstance;
+ Cs.hMenu = hMenu;
+ Cs.hwndParent = hWndParent;
+ Cs.cx = nWidth;
+ Cs.cy = nHeight;
+ Cs.x = x;
+ Cs.y = y;
+ Cs.lpszName = (LPCWSTR) plstrWindowName->Buffer;
+ if (IS_ATOM(plstrClassName))
+ Cs.lpszClass = (LPCWSTR) plstrClassName;
+ else
+ Cs.lpszClass = (LPCWSTR) plstrClassName->Buffer;
+ Cs.dwExStyle = dwExStyle;
+
+ UserEnterExclusive();
+
+ /* Call the internal function */
+ pwnd = co_UserCreateWindowEx(&Cs, &ustrClassName, plstrWindowName, acbiBuffer);
+
+ if(!pwnd)
+ {
+ ERR("co_UserCreateWindowEx failed!\n");
+ }
+ hwnd = pwnd ? UserHMGetHandle(pwnd) : NULL;
+
+ UserLeave();
+
+cleanup:
+ if (lstrWindowName.Buffer)
+ {
+ ExFreePoolWithTag(lstrWindowName.Buffer, TAG_STRING);
+ }
+ if (lstrClassName.Buffer)
+ {
+ ExFreePoolWithTag(lstrClassName.Buffer, TAG_STRING);
+ }
+
+ return hwnd;
+}
+
+
++BOOLEAN co_UserDestroyWindow(PVOID Object)
+{
+ HWND hWnd;
+ PWND pwndTemp;
+ PTHREADINFO ti;
+ MSG msg;
++ PWND Window = Object;
+
+ ASSERT_REFS_CO(Window); // FIXME: Temp HACK?
+
+ hWnd = Window->head.h;
+ ti = PsGetCurrentThreadWin32Thread();
+
+ TRACE("co_UserDestroyWindow \n");
+
+ /* Check for owner thread */
+ if ( Window->head.pti != PsGetCurrentThreadWin32Thread())
+ {
+ /* Check if we are destroying the desktop window */
+ if (! ((Window->head.rpdesk->dwDTFlags & DF_DESTROYED) && Window == Window->head.rpdesk->pDeskInfo->spwnd))
+ {
+ EngSetLastError(ERROR_ACCESS_DENIED);
+ return FALSE;
+ }
+ }
+
+ /* If window was created successfully and it is hooked */
+ if ((Window->state2 & WNDS2_WMCREATEMSGPROCESSED))
+ {
+ if (co_HOOK_CallHooks(WH_CBT, HCBT_DESTROYWND, (WPARAM) hWnd, 0))
+ {
+ ERR("Destroy Window WH_CBT Call Hook return!\n");
+ return FALSE;
+ }
+ }
+
+ if (Window->pcls->atomClassName != gpsi->atomSysClass[ICLS_IME])
+ {
+ if ((Window->style & (WS_POPUP|WS_CHILD)) != WS_CHILD)
+ {
+ if (Window->spwndOwner)
+ {
+ //ERR("DestroyWindow Owner out.\n");
+ UserAttachThreadInput(Window->head.pti, Window->spwndOwner->head.pti, FALSE);
+ }
+ }
+ }
+
+ /* Inform the parent */
+ if (Window->style & WS_CHILD)
+ {
+ IntSendParentNotify(Window, WM_DESTROY);
+ }
+
+ /* Look whether the focus is within the tree of windows we will
+ * be destroying.
+ */
+ if (!co_WinPosShowWindow(Window, SW_HIDE))
+ { // Rule #1.
+ if (ti->MessageQueue->spwndActive == Window && ti->MessageQueue == IntGetFocusMessageQueue())
+ {
+ co_WinPosActivateOtherWindow(Window);
+ }
+ }
+
+ // Adjust last active.
+ if ((pwndTemp = Window->spwndOwner))
+ {
+ while (pwndTemp->spwndOwner)
+ pwndTemp = pwndTemp->spwndOwner;
+
+ if (pwndTemp->spwndLastActive == Window)
+ pwndTemp->spwndLastActive = Window->spwndOwner;
+ }
+
+ if (Window->spwndParent && IntIsWindow(Window->head.h))
+ {
+ if ((Window->style & (WS_POPUP | WS_CHILD)) == WS_CHILD)
+ {
+ if (!IntIsTopLevelWindow(Window))
+ {
+ //ERR("DestroyWindow Parent out.\n");
+ UserAttachThreadInput(Window->head.pti, Window->spwndParent->head.pti, FALSE);
+ }
+ }
+ }
+
+ if (Window->head.pti->MessageQueue->spwndActive == Window)
+ Window->head.pti->MessageQueue->spwndActive = NULL;
+ if (Window->head.pti->MessageQueue->spwndFocus == Window)
+ Window->head.pti->MessageQueue->spwndFocus = NULL;
+ if (Window->head.pti->MessageQueue->spwndActivePrev == Window)
+ Window->head.pti->MessageQueue->spwndActivePrev = NULL;
+ if (Window->head.pti->MessageQueue->spwndCapture == Window)
+ Window->head.pti->MessageQueue->spwndCapture = NULL;
+
+ /*
+ * Check if this window is the Shell's Desktop Window. If so set hShellWindow to NULL
+ */
+
+ if ((ti != NULL) && (ti->pDeskInfo != NULL))
+ {
+ if (ti->pDeskInfo->hShellWindow == hWnd)
+ {
+ ERR("Destroying the ShellWindow!\n");
+ ti->pDeskInfo->hShellWindow = NULL;
+ }
+ }
+
+ IntEngWindowChanged(Window, WOC_DELETE);
+
+ if (!IntIsWindow(Window->head.h))
+ {
+ return TRUE;
+ }
+
+ /* Recursively destroy owned windows */
+
+ if (! (Window->style & WS_CHILD))
+ {
+ for (;;)
+ {
+ BOOL GotOne = FALSE;
+ HWND *Children;
+ HWND *ChildHandle;
+ PWND Child, Desktop;
+
+ Desktop = IntIsDesktopWindow(Window) ? Window :
+ UserGetWindowObject(IntGetDesktopWindow());
+ Children = IntWinListChildren(Desktop);
+
+ if (Children)
+ {
+ for (ChildHandle = Children; *ChildHandle; ++ChildHandle)
+ {
+ Child = UserGetWindowObject(*ChildHandle);
+ if (Child == NULL)
+ continue;
+ if (Child->spwndOwner != Window)
+ {
+ continue;
+ }
+
+ if (IntWndBelongsToThread(Child, PsGetCurrentThreadWin32Thread()))
+ {
+ USER_REFERENCE_ENTRY ChildRef;
+ UserRefObjectCo(Child, &ChildRef); // Temp HACK?
+ co_UserDestroyWindow(Child);
+ UserDerefObjectCo(Child); // Temp HACK?
+
+ GotOne = TRUE;
+ continue;
+ }
+
+ if (Child->spwndOwner != NULL)
+ {
+ Child->spwndOwner = NULL;
+ }
+
+ }
+ ExFreePoolWithTag(Children, USERTAG_WINDOWLIST);
+ }
+ if (! GotOne)
+ {
+ break;
+ }
+ }
+ }
+
+ /* Generate mouse move message for the next window */
+ msg.message = WM_MOUSEMOVE;
+ msg.wParam = UserGetMouseButtonsState();
+ msg.lParam = MAKELPARAM(gpsi->ptCursor.x, gpsi->ptCursor.y);
+ msg.pt = gpsi->ptCursor;
+ co_MsqInsertMouseMessage(&msg, 0, 0, TRUE);
+
+ if (!IntIsWindow(Window->head.h))
+ {
+ return TRUE;
+ }
+
+ /* Destroy the window storage */
+ co_UserFreeWindow(Window, PsGetCurrentProcessWin32Process(), PsGetCurrentThreadWin32Thread(), TRUE);
+
+ return TRUE;
+}
+
+
+/*
+ * @implemented
+ */
+BOOLEAN APIENTRY
+NtUserDestroyWindow(HWND Wnd)
+{
+ PWND Window;
+ DECLARE_RETURN(BOOLEAN);
+ BOOLEAN ret;
+ USER_REFERENCE_ENTRY Ref;
+
+ TRACE("Enter NtUserDestroyWindow\n");
+ UserEnterExclusive();
+
+ if (!(Window = UserGetWindowObject(Wnd)))
+ {
+ RETURN(FALSE);
+ }
+
+ UserRefObjectCo(Window, &Ref); // FIXME: Dunno if win should be reffed during destroy...
+ ret = co_UserDestroyWindow(Window);
+ UserDerefObjectCo(Window); // FIXME: Dunno if win should be reffed during destroy...
+
+ RETURN(ret);
+
+CLEANUP:
+ TRACE("Leave NtUserDestroyWindow, ret=%u\n", _ret_);
+ UserLeave();
+ END_CLEANUP;
+}
+
+
+static HWND FASTCALL
+IntFindWindow(PWND Parent,
+ PWND ChildAfter,
+ RTL_ATOM ClassAtom,
+ PUNICODE_STRING WindowName)
+{
+ BOOL CheckWindowName;
+ HWND *List, *phWnd;
+ HWND Ret = NULL;
+ UNICODE_STRING CurrentWindowName;
+
+ ASSERT(Parent);
+
+ CheckWindowName = WindowName->Buffer != 0;
+
+ if((List = IntWinListChildren(Parent)))
+ {
+ phWnd = List;
+ if(ChildAfter)
+ {
+ /* skip handles before and including ChildAfter */
+ while(*phWnd && (*(phWnd++) != ChildAfter->head.h))
+ ;
+ }
+
+ /* search children */
+ while(*phWnd)
+ {
+ PWND Child;
+ if(!(Child = UserGetWindowObject(*(phWnd++))))
+ {
+ continue;
+ }
+
+ /* Do not send WM_GETTEXT messages in the kernel mode version!
+ The user mode version however calls GetWindowText() which will
+ send WM_GETTEXT messages to windows belonging to its processes */
+ if (!ClassAtom || Child->pcls->atomClassName == ClassAtom)
+ {
+ // FIXME: LARGE_STRING truncated
+ CurrentWindowName.Buffer = Child->strName.Buffer;
+ CurrentWindowName.Length = (USHORT)min(Child->strName.Length, MAXUSHORT);
+ CurrentWindowName.MaximumLength = (USHORT)min(Child->strName.MaximumLength, MAXUSHORT);
+ if(!CheckWindowName ||
+ (Child->strName.Length < 0xFFFF &&
+ !RtlCompareUnicodeString(WindowName, &CurrentWindowName, TRUE)))
+ {
+ Ret = Child->head.h;
+ break;
+ }
+ }
+ }
+ ExFreePoolWithTag(List, USERTAG_WINDOWLIST);
+ }
+
+ return Ret;
+}
+
+/*
+ * FUNCTION:
+ * Searches a window's children for a window with the specified
+ * class and name
+ * ARGUMENTS:
+ * hwndParent = The window whose childs are to be searched.
+ * NULL = desktop
+ * HWND_MESSAGE = message-only windows
+ *
+ * hwndChildAfter = Search starts after this child window.
+ * NULL = start from beginning
+ *
+ * ucClassName = Class name to search for
+ * Reguired parameter.
+ *
+ * ucWindowName = Window name
+ * ->Buffer == NULL = don't care
+ *
+ * RETURNS:
+ * The HWND of the window if it was found, otherwise NULL
+ */
+/*
+ * @implemented
+ */
+HWND APIENTRY
+NtUserFindWindowEx(HWND hwndParent,
+ HWND hwndChildAfter,
+ PUNICODE_STRING ucClassName,
+ PUNICODE_STRING ucWindowName,
+ DWORD dwUnknown)
+{
+ PWND Parent, ChildAfter;
+ UNICODE_STRING ClassName = {0}, WindowName = {0};
+ HWND Desktop, Ret = NULL;
+ BOOL DoMessageWnd = FALSE;
+ RTL_ATOM ClassAtom = (RTL_ATOM)0;
+ DECLARE_RETURN(HWND);
+
+ TRACE("Enter NtUserFindWindowEx\n");
+ UserEnterShared();
+
+ if (ucClassName != NULL || ucWindowName != NULL)
+ {
+ _SEH2_TRY
+ {
+ if (ucClassName != NULL)
+ {
+ ClassName = ProbeForReadUnicodeString(ucClassName);
+ if (ClassName.Length != 0)
+ {
+ ProbeForRead(ClassName.Buffer,
+ ClassName.Length,
+ sizeof(WCHAR));
+ }
+ else if (!IS_ATOM(ClassName.Buffer))
+ {
+ EngSetLastError(ERROR_INVALID_PARAMETER);
+ _SEH2_LEAVE;
+ }
+
+ if (!IntGetAtomFromStringOrAtom(&ClassName,
+ &ClassAtom))
+ {
+ _SEH2_LEAVE;
+ }
+ }
+
+ if (ucWindowName != NULL)
+ {
+ WindowName = ProbeForReadUnicodeString(ucWindowName);
+ if (WindowName.Length != 0)
+ {
+ ProbeForRead(WindowName.Buffer,
+ WindowName.Length,
+ sizeof(WCHAR));
+ }
+ }
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ SetLastNtError(_SEH2_GetExceptionCode());
+ _SEH2_YIELD(RETURN(NULL));
+ }
+ _SEH2_END;
+
+ if (ucClassName != NULL)
+ {
+ if (ClassName.Length == 0 && ClassName.Buffer != NULL &&
+ !IS_ATOM(ClassName.Buffer))
+ {
+ EngSetLastError(ERROR_INVALID_PARAMETER);
+ RETURN(NULL);
+ }
+ else if (ClassAtom == (RTL_ATOM)0)
+ {
+ /* LastError code was set by IntGetAtomFromStringOrAtom */
+ RETURN(NULL);
+ }
+ }
+ }
+
+ Desktop = IntGetCurrentThreadDesktopWindow();
+
+ if(hwndParent == NULL)
+ {
+ hwndParent = Desktop;
+ DoMessageWnd = TRUE;
+ }
+ else if(hwndParent == HWND_MESSAGE)
+ {
+ hwndParent = IntGetMessageWindow();
+ }
+
+ if(!(Parent = UserGetWindowObject(hwndParent)))
+ {
+ RETURN( NULL);
+ }
+
+ ChildAfter = NULL;
+ if(hwndChildAfter && !(ChildAfter = UserGetWindowObject(hwndChildAfter)))
+ {
+ RETURN( NULL);
+ }
+
+ _SEH2_TRY
+ {
+ if(Parent->head.h == Desktop)
+ {
+ HWND *List, *phWnd;
+ PWND TopLevelWindow;
+ BOOLEAN CheckWindowName;
+ BOOLEAN WindowMatches;
+ BOOLEAN ClassMatches;
+
+ /* windows searches through all top-level windows if the parent is the desktop
+ window */
+
+ if((List = IntWinListChildren(Parent)))
+ {
+ phWnd = List;
+
+ if(ChildAfter)
+ {
+ /* skip handles before and including ChildAfter */
+ while(*phWnd && (*(phWnd++) != ChildAfter->head.h))
+ ;
+ }
+
+ CheckWindowName = WindowName.Buffer != 0;
+
+ /* search children */
+ while(*phWnd)
+ {
+ UNICODE_STRING ustr;
+
+ if(!(TopLevelWindow = UserGetWindowObject(*(phWnd++))))
+ {
+ continue;
+ }
+
+ /* Do not send WM_GETTEXT messages in the kernel mode version!
+ The user mode version however calls GetWindowText() which will
+ send WM_GETTEXT messages to windows belonging to its processes */
+ ustr.Buffer = TopLevelWindow->strName.Buffer;
+ ustr.Length = (USHORT)min(TopLevelWindow->strName.Length, MAXUSHORT); // FIXME:LARGE_STRING truncated
+ ustr.MaximumLength = (USHORT)min(TopLevelWindow->strName.MaximumLength, MAXUSHORT);
+ WindowMatches = !CheckWindowName ||
+ (TopLevelWindow->strName.Length < 0xFFFF &&
+ !RtlCompareUnicodeString(&WindowName, &ustr, TRUE));
+ ClassMatches = (ClassAtom == (RTL_ATOM)0) ||
+ ClassAtom == TopLevelWindow->pcls->atomClassName;
+
+ if (WindowMatches && ClassMatches)
+ {
+ Ret = TopLevelWindow->head.h;
+ break;
+ }
+
+ if (IntFindWindow(TopLevelWindow, NULL, ClassAtom, &WindowName))
+ {
+ /* window returns the handle of the top-level window, in case it found
+ the child window */
+ Ret = TopLevelWindow->head.h;
+ break;
+ }
+
+ }
+ ExFreePoolWithTag(List, USERTAG_WINDOWLIST);
+ }
+ }
+ else
+ {
+ ERR("FindWindowEx: Not Desktop Parent!\n");
+ Ret = IntFindWindow(Parent, ChildAfter, ClassAtom, &WindowName);
+ }
+
+ if (Ret == NULL && DoMessageWnd)
+ {
+ PWND MsgWindows;
+
+ if((MsgWindows = UserGetWindowObject(IntGetMessageWindow())))
+ {
+ Ret = IntFindWindow(MsgWindows, ChildAfter, ClassAtom, &WindowName);
+ }
+ }
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ SetLastNtError(_SEH2_GetExceptionCode());
+ Ret = NULL;
+ }
+ _SEH2_END;
+
+ RETURN( Ret);
+
+CLEANUP:
+ TRACE("Leave NtUserFindWindowEx, ret %p\n", _ret_);
+ UserLeave();
+ END_CLEANUP;
+}
+
+
+/*
+ * @implemented
+ */
+PWND FASTCALL UserGetAncestor(PWND Wnd, UINT Type)
+{
+ PWND WndAncestor, Parent;
+
+ if (Wnd->head.h == IntGetDesktopWindow())
+ {
+ return NULL;
+ }
+
+ switch (Type)
+ {
+ case GA_PARENT:
+ {
+ WndAncestor = Wnd->spwndParent;
+ break;
+ }
+
+ case GA_ROOT:
+ {
+ WndAncestor = Wnd;
+ Parent = NULL;
+
+ for(;;)
+ {
+ if(!(Parent = WndAncestor->spwndParent))
+ {
+ break;
+ }
+ if(IntIsDesktopWindow(Parent))
+ {
+ break;
+ }
+
+ WndAncestor = Parent;
+ }
+ break;
+ }
+
+ case GA_ROOTOWNER:
+ {
+ WndAncestor = Wnd;
+
+ for (;;)
+ {
+ Parent = IntGetParent(WndAncestor);
+
+ if (!Parent)
+ {
+ break;
+ }
+
+ WndAncestor = Parent;
+ }
+ break;
+ }
+
+ default:
+ {
+ return NULL;
+ }
+ }
+
+ return WndAncestor;
+}
+
+/*
+ * @implemented
+ */
+HWND APIENTRY
+NtUserGetAncestor(HWND hWnd, UINT Type)
+{
+ PWND Window, Ancestor;
+ DECLARE_RETURN(HWND);
+
+ TRACE("Enter NtUserGetAncestor\n");
+ UserEnterExclusive();
+
+ if (!(Window = UserGetWindowObject(hWnd)))
+ {
+ RETURN(NULL);
+ }
+
+ Ancestor = UserGetAncestor(Window, Type);
+ /* faxme: can UserGetAncestor ever return NULL for a valid window? */
+
+ RETURN(Ancestor ? Ancestor->head.h : NULL);
+
+CLEANUP:
+ TRACE("Leave NtUserGetAncestor, ret=%p\n", _ret_);
+ UserLeave();
+ END_CLEANUP;
+}
+
+////
+//// ReactOS work around! Keep it the sames as in Combo.c and Controls.h
+////
+/* combo state struct */
+typedef struct
+{
+ HWND self;
+ HWND owner;
+ UINT dwStyle;
+ HWND hWndEdit;
+ HWND hWndLBox;
+ UINT wState;
+ HFONT hFont;
+ RECT textRect;
+ RECT buttonRect;
+ RECT droppedRect;
+ INT droppedIndex;
+ INT fixedOwnerDrawHeight;
+ INT droppedWidth; /* last two are not used unless set */
+ INT editHeight; /* explicitly */
+ LONG UIState;
+} HEADCOMBO,*LPHEADCOMBO;
+
+// Window Extra data container.
+typedef struct _WND2CBOX
+{
+ WND;
+ LPHEADCOMBO pCBox;
+} WND2CBOX, *PWND2CBOX;
+
+#define CBF_BUTTONDOWN 0x0002
+////
+////
+////
+BOOL
+APIENTRY
+NtUserGetComboBoxInfo(
+ HWND hWnd,
+ PCOMBOBOXINFO pcbi)
+{
+ PWND Wnd;
+ PPROCESSINFO ppi;
+ BOOL NotSameppi = FALSE;
+ BOOL Ret = TRUE;
+ DECLARE_RETURN(BOOL);
+
+ TRACE("Enter NtUserGetComboBoxInfo\n");
+ UserEnterShared();
+
+ if (!(Wnd = UserGetWindowObject(hWnd)))
+ {
+ RETURN( FALSE );
+ }
+ _SEH2_TRY
+ {
+ if(pcbi)
+ {
+ ProbeForWrite(pcbi,
+ sizeof(COMBOBOXINFO),
+ 1);
+ }
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ SetLastNtError(_SEH2_GetExceptionCode());
+ _SEH2_YIELD(RETURN(FALSE));
+ }
+ _SEH2_END;
+
+ if (pcbi->cbSize < sizeof(COMBOBOXINFO))
+ {
+ EngSetLastError(ERROR_INVALID_PARAMETER);
+ RETURN(FALSE);
+ }
+
+ // Pass the user pointer, it was already probed.
+ if ((Wnd->pcls->atomClassName != gpsi->atomSysClass[ICLS_COMBOBOX]) && Wnd->fnid != FNID_COMBOBOX)
+ {
+ RETURN( (BOOL) co_IntSendMessage( Wnd->head.h, CB_GETCOMBOBOXINFO, 0, (LPARAM)pcbi));
+ }
+
+ ppi = PsGetCurrentProcessWin32Process();
+ NotSameppi = ppi != Wnd->head.pti->ppi;
+ if (NotSameppi)
+ {
+ KeAttachProcess(&Wnd->head.pti->ppi->peProcess->Pcb);
+ }
+
+ _SEH2_TRY
+ {
+ LPHEADCOMBO lphc = ((PWND2CBOX)Wnd)->pCBox;
+ pcbi->rcItem = lphc->textRect;
+ pcbi->rcButton = lphc->buttonRect;
+ pcbi->stateButton = 0;
+ if (lphc->wState & CBF_BUTTONDOWN)
+ pcbi->stateButton |= STATE_SYSTEM_PRESSED;
+ if (RECTL_bIsEmptyRect(&lphc->buttonRect))
+ pcbi->stateButton |= STATE_SYSTEM_INVISIBLE;
+ pcbi->hwndCombo = lphc->self;
+ pcbi->hwndItem = lphc->hWndEdit;
+ pcbi->hwndList = lphc->hWndLBox;
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ Ret = FALSE;
+ SetLastNtError(_SEH2_GetExceptionCode());
+ }
+ _SEH2_END;
+
+ RETURN( Ret);
+
+CLEANUP:
+ if (NotSameppi) KeDetachProcess();
+ TRACE("Leave NtUserGetComboBoxInfo, ret=%i\n",_ret_);
+ UserLeave();
+ END_CLEANUP;
+}
+
+////
+//// ReactOS work around! Keep it the sames as in Listbox.c
+////
+/* Listbox structure */
+typedef struct
+{
+ HWND self; /* Our own window handle */
+ HWND owner; /* Owner window to send notifications to */
+ UINT style; /* Window style */
+ INT width; /* Window width */
+ INT height; /* Window height */
+ VOID *items; /* Array of items */
+ INT nb_items; /* Number of items */
+ INT top_item; /* Top visible item */
+ INT selected_item; /* Selected item */
+ INT focus_item; /* Item that has the focus */
+ INT anchor_item; /* Anchor item for extended selection */
+ INT item_height; /* Default item height */
+ INT page_size; /* Items per listbox page */
+ INT column_width; /* Column width for multi-column listboxes */
+} LB_DESCR;
+
+// Window Extra data container.
+typedef struct _WND2LB
+{
+ WND;
+ LB_DESCR * pLBiv;
+} WND2LB, *PWND2LB;
+////
+////
+////
+DWORD
+APIENTRY
+NtUserGetListBoxInfo(
+ HWND hWnd)
+{
+ PWND Wnd;
+ PPROCESSINFO ppi;
+ BOOL NotSameppi = FALSE;
+ DWORD Ret = 0;
+ DECLARE_RETURN(DWORD);
+
+ TRACE("Enter NtUserGetListBoxInfo\n");
+ UserEnterShared();
+
+ if (!(Wnd = UserGetWindowObject(hWnd)))
+ {
+ RETURN( 0 );
+ }
+
+ if ((Wnd->pcls->atomClassName != gpsi->atomSysClass[ICLS_LISTBOX]) && Wnd->fnid != FNID_LISTBOX)
+ {
+ RETURN( (DWORD) co_IntSendMessage( Wnd->head.h, LB_GETLISTBOXINFO, 0, 0 ));
+ }
+
+ // wine lisbox:test_GetListBoxInfo lb_getlistboxinfo = 0, should not send a message!
+ ppi = PsGetCurrentProcessWin32Process();
+ NotSameppi = ppi != Wnd->head.pti->ppi;
+ if (NotSameppi)
+ {
+ KeAttachProcess(&Wnd->head.pti->ppi->peProcess->Pcb);
+ }
+
+ _SEH2_TRY
+ {
+ LB_DESCR *descr = ((PWND2LB)Wnd)->pLBiv;
+ // See Controls ListBox.c:LB_GETLISTBOXINFO must match...
+ if (descr->style & LBS_MULTICOLUMN) //// ReactOS
+ Ret = descr->page_size * descr->column_width;
+ else
+ Ret = descr->page_size;
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ Ret = 0;
+ SetLastNtError(_SEH2_GetExceptionCode());
+ }
+ _SEH2_END;
+
+ RETURN( Ret);
+
+CLEANUP:
+ if (NotSameppi) KeDetachProcess();
+ TRACE("Leave NtUserGetListBoxInfo, ret=%lu\n", _ret_);
+ UserLeave();
+ END_CLEANUP;
+}
+
+/*
+ * NtUserSetParent
+ *
+ * The NtUserSetParent function changes the parent window of the specified
+ * child window.
+ *
+ * Remarks
+ * The new parent window and the child window must belong to the same
+ * application. If the window identified by the hWndChild parameter is
+ * visible, the system performs the appropriate redrawing and repainting.
+ * For compatibility reasons, NtUserSetParent does not modify the WS_CHILD
+ * or WS_POPUP window styles of the window whose parent is being changed.
+ *
+ * Status
+ * @implemented
+ */
+
+HWND APIENTRY
+NtUserSetParent(HWND hWndChild, HWND hWndNewParent)
+{
+ DECLARE_RETURN(HWND);
+
+ TRACE("Enter NtUserSetParent\n");
+ UserEnterExclusive();
+
+ /*
+ Check Parent first from user space, set it here.
+ */
+ if (!hWndNewParent)
+ {
+ hWndNewParent = IntGetDesktopWindow();
+ }
+ else if (hWndNewParent == HWND_MESSAGE)
+ {
+ hWndNewParent = IntGetMessageWindow();
+ }
+
+ RETURN( co_UserSetParent(hWndChild, hWndNewParent));
+
+CLEANUP:
+ TRACE("Leave NtUserSetParent, ret=%p\n", _ret_);
+ UserLeave();
+ END_CLEANUP;
+}
+
+/*
+ * UserGetShellWindow
+ *
+ * Returns a handle to shell window that was set by NtUserSetShellWindowEx.
+ *
+ * Status
+ * @implemented
+ */
+HWND FASTCALL UserGetShellWindow(VOID)
+{
+ PWINSTATION_OBJECT WinStaObject;
+ HWND Ret;
+
+ NTSTATUS Status = IntValidateWindowStationHandle(PsGetCurrentProcess()->Win32WindowStation,
+ KernelMode,
+ 0,
+ &WinStaObject);
+
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastNtError(Status);
+ return( (HWND)0);
+ }
+
+ Ret = (HWND)WinStaObject->ShellWindow;
+
+ ObDereferenceObject(WinStaObject);
+ return( Ret);
+}
+
+/*
+ * NtUserSetShellWindowEx
+ *
+ * This is undocumented function to set global shell window. The global
+ * shell window has special handling of window position.
+ *
+ * Status
+ * @implemented
+ */
+BOOL APIENTRY
+NtUserSetShellWindowEx(HWND hwndShell, HWND hwndListView)
+{
+ PWINSTATION_OBJECT WinStaObject;
+ PWND WndShell, WndListView;
+ DECLARE_RETURN(BOOL);
+ USER_REFERENCE_ENTRY Ref;
+ NTSTATUS Status;
+ PTHREADINFO ti;
+
+ TRACE("Enter NtUserSetShellWindowEx\n");
+ UserEnterExclusive();
+
+ if (!(WndShell = UserGetWindowObject(hwndShell)))
+ {
+ RETURN(FALSE);
+ }
+
+ if(!(WndListView = UserGetWindowObject(hwndListView)))
+ {
+ RETURN(FALSE);
+ }
+
+ Status = IntValidateWindowStationHandle(PsGetCurrentProcess()->Win32WindowStation,
+ KernelMode,
+ 0,
+ &WinStaObject);
+
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastNtError(Status);
+ RETURN( FALSE);
+ }
+
+ /*
+ * Test if we are permitted to change the shell window.
+ */
+ if (WinStaObject->ShellWindow)
+ {
+ ObDereferenceObject(WinStaObject);
+ RETURN( FALSE);
+ }
+
+ /*
+ * Move shell window into background.
+ */
+ if (hwndListView && hwndListView != hwndShell)
+ {
+ /*
+ * Disabled for now to get Explorer working.
+ * -- Filip, 01/nov/2003
+ */
+#if 0
+ co_WinPosSetWindowPos(WndListView, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
+#endif
+
+ if (WndListView->ExStyle & WS_EX_TOPMOST)
+ {
+ ObDereferenceObject(WinStaObject);
+ RETURN( FALSE);
+ }
+ }
+
+ if (WndShell->ExStyle & WS_EX_TOPMOST)
+ {
+ ObDereferenceObject(WinStaObject);
+ RETURN( FALSE);
+ }
+
+ UserRefObjectCo(WndShell, &Ref);
+ WndShell->state2 |= WNDS2_BOTTOMMOST;
+ co_WinPosSetWindowPos(WndShell, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
+
+ WinStaObject->ShellWindow = hwndShell;
+ WinStaObject->ShellListView = hwndListView;
+
+ ti = GetW32ThreadInfo();
+ if (ti->pDeskInfo)
+ {
+ ti->pDeskInfo->hShellWindow = hwndShell;
+ ti->pDeskInfo->spwndShell = WndShell;
+ ti->pDeskInfo->ppiShellProcess = ti->ppi;
+ }
+
+ UserRegisterHotKey(WndShell, SC_TASKLIST, MOD_CONTROL, VK_ESCAPE);
+
+ UserDerefObjectCo(WndShell);
+
+ ObDereferenceObject(WinStaObject);
+ RETURN( TRUE);
+
+CLEANUP:
+ TRACE("Leave NtUserSetShellWindowEx, ret=%i\n",_ret_);
+ UserLeave();
+ END_CLEANUP;
+}
+
+// Fixes wine Win test_window_styles and todo tests...
+static BOOL FASTCALL
+IntCheckFrameEdge(ULONG Style, ULONG ExStyle)
+{
+ if (ExStyle & WS_EX_DLGMODALFRAME)
+ return TRUE;
+ else if (!(ExStyle & WS_EX_STATICEDGE) && (Style & (WS_DLGFRAME | WS_THICKFRAME)))
+ return TRUE;
+ else
+ return FALSE;
+}
+
+LONG FASTCALL
+co_UserSetWindowLong(HWND hWnd, DWORD Index, LONG NewValue, BOOL Ansi)
+{
+ PWND Window, Parent;
+ PWINSTATION_OBJECT WindowStation;
+ LONG OldValue;
+ STYLESTRUCT Style;
+
+ if (!(Window = UserGetWindowObject(hWnd)))
+ {
+ return( 0);
+ }
+
+ if ((INT)Index >= 0)
+ {
+ if ((Index + sizeof(LONG)) > Window->cbwndExtra)
+ {
+ EngSetLastError(ERROR_INVALID_INDEX);
+ return( 0);
+ }
+
+ OldValue = *((LONG *)((PCHAR)(Window + 1) + Index));
+/*
+ if ( Index == DWLP_DLGPROC && Wnd->state & WNDS_DIALOGWINDOW)
+ {
+ OldValue = (LONG)IntSetWindowProc( Wnd,
+ (WNDPROC)NewValue,
+ Ansi);
+ if (!OldValue) return 0;
+ }
+*/
+ *((LONG *)((PCHAR)(Window + 1) + Index)) = NewValue;
+ }
+ else
+ {
+ switch (Index)
+ {
+ case GWL_EXSTYLE:
+ OldValue = (LONG) Window->ExStyle;
+ Style.styleOld = OldValue;
+ Style.styleNew = NewValue;
+
+ co_IntSendMessage(hWnd, WM_STYLECHANGING, GWL_EXSTYLE, (LPARAM) &Style);
+
+ /*
+ * Remove extended window style bit WS_EX_TOPMOST for shell windows.
+ */
+ WindowStation = Window->head.pti->rpdesk->rpwinstaParent;
+ if(WindowStation)
+ {
+ if (hWnd == WindowStation->ShellWindow || hWnd == WindowStation->ShellListView)
+ Style.styleNew &= ~WS_EX_TOPMOST;
+ }
+ /* WS_EX_WINDOWEDGE depends on some other styles */
+ if (IntCheckFrameEdge(Window->style, NewValue))
+ Style.styleNew |= WS_EX_WINDOWEDGE;
+ else
+ Style.styleNew &= ~WS_EX_WINDOWEDGE;
+
+ Window->ExStyle = (DWORD)Style.styleNew;
+ co_IntSendMessage(hWnd, WM_STYLECHANGED, GWL_EXSTYLE, (LPARAM) &Style);
+ break;
+
+ case GWL_STYLE:
+ OldValue = (LONG) Window->style;
+ Style.styleOld = OldValue;
+ Style.styleNew = NewValue;
+ co_IntSendMessage(hWnd, WM_STYLECHANGING, GWL_STYLE, (LPARAM) &Style);
+
+ /* WS_CLIPSIBLINGS can't be reset on top-level windows */
+ if (Window->spwndParent == UserGetDesktopWindow()) Style.styleNew |= WS_CLIPSIBLINGS;
+ /* Fixes wine FIXME: changing WS_DLGFRAME | WS_THICKFRAME is supposed to change WS_EX_WINDOWEDGE too */
+ if (IntCheckFrameEdge(NewValue, Window->ExStyle))
+ Window->ExStyle |= WS_EX_WINDOWEDGE;
+ else
+ Window->ExStyle &= ~WS_EX_WINDOWEDGE;
+
+ if ((Style.styleOld ^ Style.styleNew) & WS_VISIBLE)
+ {
+ if (Style.styleOld & WS_VISIBLE) Window->head.pti->cVisWindows--;
+ if (Style.styleNew & WS_VISIBLE) Window->head.pti->cVisWindows++;
+ DceResetActiveDCEs( Window );
+ }
+ Window->style = (DWORD)Style.styleNew;
+ co_IntSendMessage(hWnd, WM_STYLECHANGED, GWL_STYLE, (LPARAM) &Style);
+ break;
+
+ case GWL_WNDPROC:
+ {
+ if ( Window->head.pti->ppi != PsGetCurrentProcessWin32Process() ||
+ Window->fnid & FNID_FREED)
+ {
+ EngSetLastError(ERROR_ACCESS_DENIED);
+ return( 0);
+ }
+ OldValue = (LONG)IntSetWindowProc(Window,
+ (WNDPROC)NewValue,
+ Ansi);
+ break;
+ }
+
+ case GWL_HINSTANCE:
+ OldValue = (LONG) Window->hModule;
+ Window->hModule = (HINSTANCE) NewValue;
+ break;
+
+ case GWL_HWNDPARENT:
+ Parent = Window->spwndParent;
+ if (Parent && (Parent->head.h == IntGetDesktopWindow()))
+ OldValue = (LONG) IntSetOwner(Window->head.h, (HWND) NewValue);
+ else
+ OldValue = (LONG) co_UserSetParent(Window->head.h, (HWND) NewValue);
+ break;
+
+ case GWL_ID:
+ OldValue = (LONG) Window->IDMenu;
+ Window->IDMenu = (UINT) NewValue;
+ break;
+
+ case GWL_USERDATA:
+ OldValue = Window->dwUserData;
+ Window->dwUserData = NewValue;
+ break;
+
+ default:
+ ERR("NtUserSetWindowLong(): Unsupported index %lu\n", Index);
+ EngSetLastError(ERROR_INVALID_INDEX);
+ OldValue = 0;
+ break;
+ }
+ }
+
+ return( OldValue);
+}
+
+/*
+ * NtUserSetWindowLong
+ *
+ * The NtUserSetWindowLong function changes an attribute of the specified
+ * window. The function also sets the 32-bit (long) value at the specified
+ * offset into the extra window memory.
+ *
+ * Status
+ * @implemented
+ */
+
+LONG APIENTRY
+NtUserSetWindowLong(HWND hWnd, DWORD Index, LONG NewValue, BOOL Ansi)
+{
+ DECLARE_RETURN(LONG);
+
+ TRACE("Enter NtUserSetWindowLong\n");
+ UserEnterExclusive();
+
+ if (hWnd == IntGetDesktopWindow())
+ {
+ EngSetLastError(STATUS_ACCESS_DENIED);
+ RETURN( 0);
+ }
+
+ RETURN( co_UserSetWindowLong(hWnd, Index, NewValue, Ansi));
+
+CLEANUP:
+ TRACE("Leave NtUserSetWindowLong, ret=%i\n",_ret_);
+ UserLeave();
+ END_CLEANUP;
+}
+
+/*
+ * NtUserSetWindowWord
+ *
+ * Legacy function similar to NtUserSetWindowLong.
+ *
+ * Status
+ * @implemented
+ */
+
+WORD APIENTRY
+NtUserSetWindowWord(HWND hWnd, INT Index, WORD NewValue)
+{
+ PWND Window;
+ WORD OldValue;
+ DECLARE_RETURN(WORD);
+
+ TRACE("Enter NtUserSetWindowWord\n");
+ UserEnterExclusive();
+
+ if (hWnd == IntGetDesktopWindow())
+ {
+ EngSetLastError(STATUS_ACCESS_DENIED);
+ RETURN( 0);
+ }
+
+ if (!(Window = UserGetWindowObject(hWnd)))
+ {
+ RETURN( 0);
+ }
+
+ switch (Index)
+ {
+ case GWL_ID:
+ case GWL_HINSTANCE:
+ case GWL_HWNDPARENT:
+ RETURN( (WORD)co_UserSetWindowLong(UserHMGetHandle(Window), Index, (UINT)NewValue, TRUE));
+ default:
+ if (Index < 0)
+ {
+ EngSetLastError(ERROR_INVALID_INDEX);
+ RETURN( 0);
+ }
+ }
+
+ if ((ULONG)Index > (Window->cbwndExtra - sizeof(WORD)))
+ {
+ EngSetLastError(ERROR_INVALID_PARAMETER);
+ RETURN( 0);
+ }
+
+ OldValue = *((WORD *)((PCHAR)(Window + 1) + Index));
+ *((WORD *)((PCHAR)(Window + 1) + Index)) = NewValue;
+
+ RETURN( OldValue);
+
+CLEANUP:
+ TRACE("Leave NtUserSetWindowWord, ret=%u\n", _ret_);
+ UserLeave();
+ END_CLEANUP;
+}
+
+/*
+ QueryWindow based on KJK::Hyperion and James Tabor.
+
+ 0 = QWUniqueProcessId
+ 1 = QWUniqueThreadId
+ 2 = QWActiveWindow
+ 3 = QWFocusWindow
+ 4 = QWIsHung Implements IsHungAppWindow found
+ by KJK::Hyperion.
+
+ 9 = QWKillWindow When I called this with hWnd ==
+ DesktopWindow, it shutdown the system
+ and rebooted.
+*/
+/*
+ * @implemented
+ */
+DWORD APIENTRY
+NtUserQueryWindow(HWND hWnd, DWORD Index)
+{
+/* Console Leader Process CID Window offsets */
+#define GWLP_CONSOLE_LEADER_PID 0
+#define GWLP_CONSOLE_LEADER_TID 4
+
+ PWND pWnd;
+ DWORD Result;
+ DECLARE_RETURN(UINT);
+
+ TRACE("Enter NtUserQueryWindow\n");
+ UserEnterShared();
+
+ if (!(pWnd = UserGetWindowObject(hWnd)))
+ {
+ RETURN( 0);
+ }
+
+ switch(Index)
+ {
+ case QUERY_WINDOW_UNIQUE_PROCESS_ID:
+ {
+ if ( (pWnd->head.pti->TIF_flags & TIF_CSRSSTHREAD) &&
+ (pWnd->pcls->atomClassName == gaGuiConsoleWndClass) )
+ {
+ // IntGetWindowLong(offset == GWLP_CONSOLE_LEADER_PID)
+ Result = (DWORD)(*((LONG_PTR*)((PCHAR)(pWnd + 1) + GWLP_CONSOLE_LEADER_PID)));
+ }
+ else
+ {
+ Result = (DWORD)IntGetWndProcessId(pWnd);
+ }
+ break;
+ }
+
+ case QUERY_WINDOW_UNIQUE_THREAD_ID:
+ {
+ if ( (pWnd->head.pti->TIF_flags & TIF_CSRSSTHREAD) &&
+ (pWnd->pcls->atomClassName == gaGuiConsoleWndClass) )
+ {
+ // IntGetWindowLong(offset == GWLP_CONSOLE_LEADER_TID)
+ Result = (DWORD)(*((LONG_PTR*)((PCHAR)(pWnd + 1) + GWLP_CONSOLE_LEADER_TID)));
+ }
+ else
+ {
+ Result = (DWORD)IntGetWndThreadId(pWnd);
+ }
+ break;
+ }
+
+ case QUERY_WINDOW_ACTIVE:
+ Result = (DWORD)(pWnd->head.pti->MessageQueue->spwndActive ? UserHMGetHandle(pWnd->head.pti->MessageQueue->spwndActive) : 0);
+ break;
+
+ case QUERY_WINDOW_FOCUS:
+ Result = (DWORD)(pWnd->head.pti->MessageQueue->spwndFocus ? UserHMGetHandle(pWnd->head.pti->MessageQueue->spwndFocus) : 0);
+ break;
+
+ case QUERY_WINDOW_ISHUNG:
+ Result = (DWORD)MsqIsHung(pWnd->head.pti);
+ break;
+
+ case QUERY_WINDOW_REAL_ID:
+ Result = (DWORD)pWnd->head.pti->pEThread->Cid.UniqueProcess;
+ break;
+
+ case QUERY_WINDOW_FOREGROUND:
+ Result = (pWnd->head.pti->MessageQueue == gpqForeground);
+ break;
+
+ default:
+ Result = (DWORD)NULL;
+ break;
+ }
+
+ RETURN( Result);
+
+CLEANUP:
+ TRACE("Leave NtUserQueryWindow, ret=%u\n", _ret_);
+ UserLeave();
+ END_CLEANUP;
+}
+
+
+/*
+ * @implemented
+ */
+UINT APIENTRY
+NtUserRegisterWindowMessage(PUNICODE_STRING MessageNameUnsafe)
+{
+ UNICODE_STRING SafeMessageName;
+ NTSTATUS Status;
+ UINT Ret;
+ DECLARE_RETURN(UINT);
+
+ TRACE("Enter NtUserRegisterWindowMessage\n");
+ UserEnterExclusive();
+
+ if(MessageNameUnsafe == NULL)
+ {
+ EngSetLastError(ERROR_INVALID_PARAMETER);
+ RETURN( 0);
+ }
+
+ Status = IntSafeCopyUnicodeStringTerminateNULL(&SafeMessageName, MessageNameUnsafe);
+ if(!NT_SUCCESS(Status))
+ {
+ SetLastNtError(Status);
+ RETURN( 0);
+ }
+
+ Ret = (UINT)IntAddAtom(SafeMessageName.Buffer);
+ if (SafeMessageName.Buffer)
+ ExFreePoolWithTag(SafeMessageName.Buffer, TAG_STRING);
+ RETURN( Ret);
+
+CLEANUP:
+ TRACE("Leave NtUserRegisterWindowMessage, ret=%u\n", _ret_);
+ UserLeave();
+ END_CLEANUP;
+}
+
+
+/*
+ * @implemented
+ */
+BOOL APIENTRY
+NtUserSetMenu(
+ HWND hWnd,
+ HMENU Menu,
+ BOOL Repaint)
+{
+ PWND Window;
+ BOOL Changed;
+ DECLARE_RETURN(BOOL);
+
+ TRACE("Enter NtUserSetMenu\n");
+ UserEnterExclusive();
+
+ if (!(Window = UserGetWindowObject(hWnd)))
+ {
+ RETURN( FALSE);
+ }
+
+ if (! IntSetMenu(Window, Menu, &Changed))
+ {
+ RETURN( FALSE);
+ }
+
+ if (Changed && Repaint)
+ {
+ USER_REFERENCE_ENTRY Ref;
+
+ UserRefObjectCo(Window, &Ref);
+ co_WinPosSetWindowPos(Window, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE |
+ SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED);
+
+ UserDerefObjectCo(Window);
+ }
+
+ RETURN( TRUE);
+
+CLEANUP:
+ TRACE("Leave NtUserSetMenu, ret=%i\n",_ret_);
+ UserLeave();
+ END_CLEANUP;
+}
+
+/*
+ * @implemented
+ */
+BOOL APIENTRY
+NtUserSetWindowFNID(HWND hWnd,
+ WORD fnID)
+{
+ PWND Wnd;
+ DECLARE_RETURN(BOOL);
+
+ TRACE("Enter NtUserSetWindowFNID\n");
+ UserEnterExclusive();
+
+ if (!(Wnd = UserGetWindowObject(hWnd)))
+ {
+ RETURN( FALSE);
+ }
+
+ if (Wnd->head.pti->ppi != PsGetCurrentProcessWin32Process())
+ {
+ EngSetLastError(ERROR_ACCESS_DENIED);
+ RETURN( FALSE);
+ }
+
+ // From user land we only set these.
+ if (fnID != FNID_DESTROY)
+ { // Hacked so we can mark desktop~!
+ if ( (/*(fnID < FNID_BUTTON)*/ (fnID < FNID_FIRST) && (fnID > FNID_GHOST)) ||
+ Wnd->fnid != 0 )
+ {
+ EngSetLastError(ERROR_INVALID_PARAMETER);
+ RETURN( FALSE);
+ }
+ }
+
+ Wnd->fnid |= fnID;
+ RETURN( TRUE);
+
+CLEANUP:
+ TRACE("Leave NtUserSetWindowFNID\n");
+ UserLeave();
+ END_CLEANUP;
+}
+
+/*
+ * NtUserDefSetText
+ *
+ * Undocumented function that is called from DefWindowProc to set
+ * window text.
+ *
+ * Status
+ * @implemented
+ */
+BOOL APIENTRY
+NtUserDefSetText(HWND hWnd, PLARGE_STRING WindowText)
+{
+ PWND Wnd;
+ LARGE_STRING SafeText;
+ UNICODE_STRING UnicodeString;
+ BOOL Ret = TRUE;
+
+ TRACE("Enter NtUserDefSetText\n");
+
+ if (WindowText != NULL)
+ {
+ _SEH2_TRY
+ {
+ SafeText = ProbeForReadLargeString(WindowText);
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ Ret = FALSE;
+ SetLastNtError(_SEH2_GetExceptionCode());
+ }
+ _SEH2_END;
+
+ if (!Ret)
+ return FALSE;
+ }
+ else
+ return TRUE;
+
+ UserEnterExclusive();
+
+ if(!(Wnd = UserGetWindowObject(hWnd)))
+ {
+ UserLeave();
+ return FALSE;
+ }
+
+ // ReactOS uses Unicode and not mixed. Up/Down converting will take time.
+ // Brought to you by: The Wine Project! Dysfunctional Thought Processes!
+ // Now we know what the bAnsi is for.
+ RtlInitUnicodeString(&UnicodeString, NULL);
+ if (SafeText.Buffer)
+ {
+ _SEH2_TRY
+ {
+ if (SafeText.bAnsi)
+ ProbeForRead(SafeText.Buffer, SafeText.Length, sizeof(CHAR));
+ else
+ ProbeForRead(SafeText.Buffer, SafeText.Length, sizeof(WCHAR));
+ Ret = RtlLargeStringToUnicodeString(&UnicodeString, &SafeText);
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ Ret = FALSE;
+ SetLastNtError(_SEH2_GetExceptionCode());
+ }
+ _SEH2_END;
+ if (!Ret) goto Exit;
+ }
+
+ if (UnicodeString.Length != 0)
+ {
+ if (Wnd->strName.MaximumLength > 0 &&
+ UnicodeString.Length <= Wnd->strName.MaximumLength - sizeof(UNICODE_NULL))
+ {
+ ASSERT(Wnd->strName.Buffer != NULL);
+
+ Wnd->strName.Length = UnicodeString.Length;
+ Wnd->strName.Buffer[UnicodeString.Length / sizeof(WCHAR)] = L'\0';
+ RtlCopyMemory(Wnd->strName.Buffer,
+ UnicodeString.Buffer,
+ UnicodeString.Length);
+ }
+ else
+ {
+ PWCHAR buf;
+ Wnd->strName.MaximumLength = Wnd->strName.Length = 0;
+ buf = Wnd->strName.Buffer;
+ Wnd->strName.Buffer = NULL;
+ if (buf != NULL)
+ {
+ DesktopHeapFree(Wnd->head.rpdesk, buf);
+ }
+
+ Wnd->strName.Buffer = DesktopHeapAlloc(Wnd->head.rpdesk,
+ UnicodeString.Length + sizeof(UNICODE_NULL));
+ if (Wnd->strName.Buffer != NULL)
+ {
+ Wnd->strName.Buffer[UnicodeString.Length / sizeof(WCHAR)] = L'\0';
+ RtlCopyMemory(Wnd->strName.Buffer,
+ UnicodeString.Buffer,
+ UnicodeString.Length);
+ Wnd->strName.MaximumLength = UnicodeString.Length + sizeof(UNICODE_NULL);
+ Wnd->strName.Length = UnicodeString.Length;
+ }
+ else
+ {
+ EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
+ Ret = FALSE;
+ goto Exit;
+ }
+ }
+ }
+ else
+ {
+ Wnd->strName.Length = 0;
+ if (Wnd->strName.Buffer != NULL)
+ Wnd->strName.Buffer[0] = L'\0';
+ }
+
+ // FIXME: HAX! Windows does not do this in here!
+ // In User32, these are called after: NotifyWinEvent EVENT_OBJECT_NAMECHANGE than
+ // RepaintButton, StaticRepaint, NtUserCallHwndLock HWNDLOCK_ROUTINE_REDRAWFRAMEANDHOOK, etc.
+ /* Send shell notifications */
+ if (!Wnd->spwndOwner && !IntGetParent(Wnd))
+ {
+ co_IntShellHookNotify(HSHELL_REDRAW, (WPARAM) hWnd, FALSE); // FIXME Flashing?
+ }
+
+ Ret = TRUE;
+Exit:
+ if (UnicodeString.Buffer) RtlFreeUnicodeString(&UnicodeString);
+ TRACE("Leave NtUserDefSetText, ret=%i\n", Ret);
+ UserLeave();
+ return Ret;
+}
+
+/*
+ * NtUserInternalGetWindowText
+ *
+ * Status
+ * @implemented
+ */
+
+INT APIENTRY
+NtUserInternalGetWindowText(HWND hWnd, LPWSTR lpString, INT nMaxCount)
+{
+ PWND Wnd;
+ NTSTATUS Status;
+ INT Result;
+ DECLARE_RETURN(INT);
+
+ TRACE("Enter NtUserInternalGetWindowText\n");
+ UserEnterShared();
+
+ if(lpString && (nMaxCount <= 1))
+ {
+ EngSetLastError(ERROR_INVALID_PARAMETER);
+ RETURN( 0);
+ }
+
+ if(!(Wnd = UserGetWindowObject(hWnd)))
+ {
+ RETURN( 0);
+ }
+
+ Result = Wnd->strName.Length / sizeof(WCHAR);
+ if(lpString)
+ {
+ const WCHAR Terminator = L'\0';
+ INT Copy;
+ WCHAR *Buffer = (WCHAR*)lpString;
+
+ Copy = min(nMaxCount - 1, Result);
+ if(Copy > 0)
+ {
+ Status = MmCopyToCaller(Buffer, Wnd->strName.Buffer, Copy * sizeof(WCHAR));
+ if(!NT_SUCCESS(Status))
+ {
+ SetLastNtError(Status);
+ RETURN( 0);
+ }
+ Buffer += Copy;
+ }
+
+ Status = MmCopyToCaller(Buffer, &Terminator, sizeof(WCHAR));
+ if(!NT_SUCCESS(Status))
+ {
+ SetLastNtError(Status);
+ RETURN( 0);
+ }
+
+ Result = Copy;
+ }
+
+ RETURN( Result);
+
+CLEANUP:
+ TRACE("Leave NtUserInternalGetWindowText, ret=%i\n",_ret_);
+ UserLeave();
+ END_CLEANUP;
+}
+
+/*
+ API Call
+*/
+BOOL
+FASTCALL
+IntShowOwnedPopups(PWND OwnerWnd, BOOL fShow )
+{
+ int count = 0;
+ PWND pWnd;
+ HWND *win_array;
+
+// ASSERT(OwnerWnd);
+
+ TRACE("Enter ShowOwnedPopups Show: %s\n", (fShow ? "TRUE" : "FALSE"));
+ win_array = IntWinListChildren(OwnerWnd);
+
+ if (!win_array)
+ return TRUE;
+
+ while (win_array[count])
+ count++;
+ while (--count >= 0)
+ {
+ if (!(pWnd = ValidateHwndNoErr( win_array[count] )))
+ continue;
+ if (pWnd->spwndOwner != OwnerWnd)
+ continue;
+
+ if (fShow)
+ {
+ if (pWnd->state & WNDS_HIDDENPOPUP)
+ {
+ /* In Windows, ShowOwnedPopups(TRUE) generates
+ * WM_SHOWWINDOW messages with SW_PARENTOPENING,
+ * regardless of the state of the owner
+ */
+ co_IntSendMessage(win_array[count], WM_SHOWWINDOW, SW_SHOWNORMAL, SW_PARENTOPENING);
+ continue;
+ }
+ }
+ else
+ {
+ if (pWnd->style & WS_VISIBLE)
+ {
+ /* In Windows, ShowOwnedPopups(FALSE) generates
+ * WM_SHOWWINDOW messages with SW_PARENTCLOSING,
+ * regardless of the state of the owner
+ */
+ co_IntSendMessage(win_array[count], WM_SHOWWINDOW, SW_HIDE, SW_PARENTCLOSING);
+ continue;
+ }
+ }
+
+ }
+ ExFreePoolWithTag(win_array, USERTAG_WINDOWLIST);
+ TRACE("Leave ShowOwnedPopups\n");
+ return TRUE;
+}
+
+/* EOF */
--- /dev/null
- PROSRGNDATA VisRgn;
- HRGN VisBefore = NULL;
- HRGN VisBeforeJustClient = NULL;
- HRGN VisAfter = NULL;
- HRGN DirtyRgn = NULL;
- HRGN ExposedRgn = NULL;
- HRGN CopyRgn = NULL;
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * PURPOSE: Windows
+ * FILE: subsystems/win32/win32k/ntuser/window.c
+ * PROGRAMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
+ */
+
+#include <win32k.h>
+DBG_DEFAULT_CHANNEL(UserWinpos);
+
+/* GLOBALS *******************************************************************/
+
+#define MINMAX_NOSWP (0x00010000)
+
+#define SWP_EX_NOCOPY 0x0001
+#define SWP_EX_PAINTSELF 0x0002
+
+#define SWP_AGG_NOGEOMETRYCHANGE \
+ (SWP_NOSIZE | SWP_NOMOVE | SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE)
+#define SWP_AGG_NOPOSCHANGE \
+ (SWP_AGG_NOGEOMETRYCHANGE | SWP_NOZORDER)
+#define SWP_AGG_STATUSFLAGS \
+ (SWP_AGG_NOPOSCHANGE | SWP_FRAMECHANGED | SWP_HIDEWINDOW | SWP_SHOWWINDOW)
+
+#define EMPTYPOINT(pt) ((pt).x == -1 && (pt).y == -1)
+#define PLACE_MIN 0x0001
+#define PLACE_MAX 0x0002
+#define PLACE_RECT 0x0004
+
+VOID FASTCALL IntLinkWindow(PWND Wnd,PWND WndInsertAfter);
+
+/* FUNCTIONS *****************************************************************/
+
+BOOL FASTCALL
+IntGetClientOrigin(PWND Window OPTIONAL, LPPOINT Point)
+{
+ Window = Window ? Window : UserGetDesktopWindow();
+ if (Window == NULL)
+ {
+ Point->x = Point->y = 0;
+ return FALSE;
+ }
+ Point->x = Window->rcClient.left;
+ Point->y = Window->rcClient.top;
+
+ return TRUE;
+}
+
+/*!
+ * Internal function.
+ * Returns client window rectangle relative to the upper-left corner of client area.
+ *
+ * \note Does not check the validity of the parameters
+*/
+VOID FASTCALL
+IntGetClientRect(PWND Wnd, RECTL *Rect)
+{
+ ASSERT( Wnd );
+ ASSERT( Rect );
+ if (Wnd->style & WS_MINIMIZED)
+ {
+ Rect->left = Rect->top = 0;
+ Rect->right = UserGetSystemMetrics(SM_CXMINIMIZED);
+ Rect->bottom = UserGetSystemMetrics(SM_CYMINIMIZED);
+ return;
+ }
+ if ( Wnd != UserGetDesktopWindow()) // Wnd->fnid != FNID_DESKTOP )
+ {
+ *Rect = Wnd->rcClient;
+ RECTL_vOffsetRect(Rect, -Wnd->rcClient.left, -Wnd->rcClient.top);
+ }
+ else
+ {
+ Rect->left = Rect->top = 0;
+ Rect->right = Wnd->rcClient.right;
+ Rect->bottom = Wnd->rcClient.bottom;
+ /* Do this until Init bug is fixed. This sets 640x480, see InitMetrics.
+ Rect->right = UserGetSystemMetrics(SM_CXSCREEN);
+ Rect->bottom = UserGetSystemMetrics(SM_CYSCREEN);
+ */
+ }
+}
+
+INT FASTCALL
+IntMapWindowPoints(PWND FromWnd, PWND ToWnd, LPPOINT lpPoints, UINT cPoints)
+{
+ BOOL mirror_from, mirror_to;
+ POINT Delta;
+ UINT i;
+ int Change = 1;
+
+ /* Note: Desktop Top and Left is always 0! */
+ Delta.x = Delta.y = 0;
+ mirror_from = mirror_to = FALSE;
+
+ if (FromWnd && FromWnd != UserGetDesktopWindow()) // FromWnd->fnid != FNID_DESKTOP)
+ {
+ if (FromWnd->ExStyle & WS_EX_LAYOUTRTL)
+ {
+ mirror_from = TRUE;
+ Change = -Change;
+ Delta.x = -FromWnd->rcClient.right;
+ }
+ else
+ Delta.x = FromWnd->rcClient.left;
+ Delta.y = FromWnd->rcClient.top;
+ }
+
+ if (ToWnd && ToWnd != UserGetDesktopWindow()) // ToWnd->fnid != FNID_DESKTOP)
+ {
+ if (ToWnd->ExStyle & WS_EX_LAYOUTRTL)
+ {
+ mirror_to = TRUE;
+ Change = -Change;
+ Delta.x += Change * ToWnd->rcClient.right;
+ }
+ else
+ Delta.x -= Change * ToWnd->rcClient.left;
+ Delta.y -= ToWnd->rcClient.top;
+ }
+
+ for (i = 0; i != cPoints; i++)
+ {
+ lpPoints[i].x += Delta.x;
+ lpPoints[i].x *= Change;
+ lpPoints[i].y += Delta.y;
+ }
+
+ if ((mirror_from || mirror_to) && cPoints == 2) /* special case for rectangle */
+ {
+ int tmp = min(lpPoints[0].x, lpPoints[1].x);
+ lpPoints[1].x = max(lpPoints[0].x, lpPoints[1].x);
+ lpPoints[0].x = tmp;
+ }
+
+ return MAKELONG(LOWORD(Delta.x), LOWORD(Delta.y));
+}
+
+BOOL FASTCALL
+IntClientToScreen(PWND Wnd, LPPOINT lpPoint)
+{
+ if (Wnd && Wnd->fnid != FNID_DESKTOP )
+ {
+ if (Wnd->ExStyle & WS_EX_LAYOUTRTL)
+ lpPoint->x = Wnd->rcClient.right - lpPoint->x;
+ else
+ lpPoint->x += Wnd->rcClient.left;
+ lpPoint->y += Wnd->rcClient.top;
+ }
+ return TRUE;
+}
+
+BOOL FASTCALL
+IntScreenToClient(PWND Wnd, LPPOINT lpPoint)
+{
+ if (Wnd && Wnd->fnid != FNID_DESKTOP )
+ {
+ if (Wnd->ExStyle & WS_EX_LAYOUTRTL)
+ lpPoint->x = Wnd->rcClient.right - lpPoint->x;
+ else
+ lpPoint->x -= Wnd->rcClient.left;
+ lpPoint->y -= Wnd->rcClient.top;
+ }
+ return TRUE;
+}
+
+BOOL FASTCALL IsChildVisible(PWND pWnd)
+{
+ do
+ {
+ if ( (pWnd->style & (WS_POPUP|WS_CHILD)) != WS_CHILD ||
+ !(pWnd = pWnd->spwndParent) )
+ return TRUE;
+ }
+ while (pWnd->style & WS_VISIBLE);
+ return FALSE;
+}
+
+PWND FASTCALL IntGetLastTopMostWindow(VOID)
+{
+ PWND pWnd;
+ PDESKTOP rpdesk = gptiCurrent->rpdesk;
+
+ if ( rpdesk &&
+ (pWnd = rpdesk->pDeskInfo->spwnd->spwndChild) &&
+ pWnd->ExStyle & WS_EX_TOPMOST)
+ {
+ for (;;)
+ {
+ if (!pWnd->spwndNext) break;
+ if (!(pWnd->spwndNext->ExStyle & WS_EX_TOPMOST)) break;
+ pWnd = pWnd->spwndNext;
+ }
+ return pWnd;
+ }
+ return NULL;
+}
+
+//
+// This helps with CORE-6129 forcing modal dialog active when another app is minimized or closed.
+//
+BOOL FASTCALL ActivateOtherWindowMin(PWND Wnd)
+{
+ BOOL ActivePrev, FindTopWnd;
+ PWND pWndTopMost, pWndChild, pWndSetActive, pWndTemp, pWndDesk;
+ USER_REFERENCE_ENTRY Ref;
+ PTHREADINFO pti = gptiCurrent;
+
+ //ERR("AOWM 1\n");
+ ActivePrev = (pti->MessageQueue->spwndActivePrev != NULL);
+ FindTopWnd = TRUE;
+
+ if ((pWndTopMost = IntGetLastTopMostWindow()))
+ pWndChild = pWndTopMost->spwndNext;
+ else
+ pWndChild = Wnd->spwndParent->spwndChild;
+
+ for (;;)
+ {
+ if ( ActivePrev )
+ pWndSetActive = pti->MessageQueue->spwndActivePrev;
+ else
+ pWndSetActive = pWndChild;
+
+ pWndTemp = NULL;
+
+ while(pWndSetActive)
+ {
+ if ( VerifyWnd(pWndSetActive) &&
+ !(pWndSetActive->ExStyle & WS_EX_NOACTIVATE) &&
+ (pWndSetActive->style & (WS_VISIBLE|WS_DISABLED)) == WS_VISIBLE &&
+ (!(pWndSetActive->style & WS_ICONIC) /* FIXME MinMax pos? */ ) )
+ {
+ if (!(pWndSetActive->ExStyle & WS_EX_TOOLWINDOW) )
+ {
+ UserRefObjectCo(pWndSetActive, &Ref);
+ //ERR("ActivateOtherWindowMin Set FG 1\n");
+ co_IntSetForegroundWindow(pWndSetActive);
+ UserDerefObjectCo(pWndSetActive);
+ //ERR("AOWM 2 Exit Good\n");
+ return TRUE;
+ }
+ if (!pWndTemp ) pWndTemp = pWndSetActive;
+ }
+ if ( ActivePrev )
+ {
+ ActivePrev = FALSE;
+ pWndSetActive = pWndChild;
+ }
+ else
+ pWndSetActive = pWndSetActive->spwndNext;
+ }
+
+ if ( !FindTopWnd ) break;
+ FindTopWnd = FALSE;
+
+ if ( pWndChild )
+ {
+ pWndChild = pWndChild->spwndParent->spwndChild;
+ continue;
+ }
+
+ if (!(pWndDesk = IntGetThreadDesktopWindow(pti)))
+ {
+ pWndChild = NULL;
+ continue;
+ }
+ pWndChild = pWndDesk->spwndChild;
+ }
+
+ if ((pWndSetActive = pWndTemp))
+ {
+ UserRefObjectCo(pWndSetActive, &Ref);
+ //ERR("ActivateOtherWindowMin Set FG 2\n");
+ co_IntSetForegroundWindow(pWndSetActive);
+ UserDerefObjectCo(pWndSetActive);
+ //ERR("AOWM 3 Exit Good\n");
+ return TRUE;
+ }
+ //ERR("AOWM 4 Bad\n");
+ return FALSE;
+}
+
+/*******************************************************************
+ * can_activate_window
+ *
+ * Check if we can activate the specified window.
+ */
+static
+BOOL FASTCALL can_activate_window( PWND Wnd OPTIONAL)
+{
+ LONG style;
+
+ if (!Wnd) return FALSE;
+
+ style = Wnd->style;
+ if (!(style & WS_VISIBLE)) return FALSE;
+ if (style & WS_MINIMIZE) return FALSE;
+ if ((style & (WS_POPUP|WS_CHILD)) == WS_CHILD) return FALSE;
+ return TRUE;
+ /* FIXME: This window could be disable because the child that closed
+ was a popup. */
+ //return !(style & WS_DISABLED);
+}
+
+
+/*******************************************************************
+ * WinPosActivateOtherWindow
+ *
+ * Activates window other than pWnd.
+ */
+VOID FASTCALL
+co_WinPosActivateOtherWindow(PWND Wnd)
+{
+ PWND WndTo = NULL;
+ USER_REFERENCE_ENTRY Ref;
+
+ ASSERT_REFS_CO(Wnd);
+
+ if (IntIsDesktopWindow(Wnd))
+ {
+ IntSetFocusMessageQueue(NULL);
+ return;
+ }
+
+ /* If this is popup window, try to activate the owner first. */
+ if ((Wnd->style & WS_POPUP) && (WndTo = Wnd->spwndOwner))
+ {
+ WndTo = UserGetAncestor( WndTo, GA_ROOT );
+ if (can_activate_window(WndTo)) goto done;
+ }
+
+ /* Pick a next top-level window. */
+ /* FIXME: Search for non-tooltip windows first. */
+ WndTo = Wnd;
+ for (;;)
+ {
+ if (!(WndTo = WndTo->spwndNext)) break;
+ if (can_activate_window( WndTo )) break;
+ }
+
+done:
+
+ if (WndTo) UserRefObjectCo(WndTo, &Ref);
+
+ if (!gpqForeground || Wnd == gpqForeground->spwndActive)
+ {
+ /* ReactOS can pass WndTo = NULL to co_IntSetForegroundWindow and returns FALSE. */
+ //ERR("WinPosActivateOtherWindow Set FG 0x%p\n",WndTo);
+ if (co_IntSetForegroundWindow(WndTo))
+ {
+ if (WndTo) UserDerefObjectCo(WndTo);
+ return;
+ }
+ }
+ //ERR("WinPosActivateOtherWindow Set Active 0x%p\n",WndTo);
+ if (!co_IntSetActiveWindow(WndTo,FALSE,TRUE,FALSE)) /* Ok for WndTo to be NULL here */
+ {
+ co_IntSetActiveWindow(NULL,FALSE,TRUE,FALSE);
+ }
+ if (WndTo) UserDerefObjectCo(WndTo);
+}
+
+VOID FASTCALL
+WinPosInitInternalPos(PWND Wnd, RECTL *RestoreRect)
+{
+ POINT Size;
+ RECTL Rect = *RestoreRect;
+
+ if (Wnd->spwndParent != UserGetDesktopWindow())
+ {
+ RECTL_vOffsetRect(&Rect,
+ -Wnd->spwndParent->rcClient.left,
+ -Wnd->spwndParent->rcClient.top);
+ }
+
+ Size.x = Rect.left;
+ Size.y = Rect.top;
+
+ if (!Wnd->InternalPosInitialized)
+ {
+ // FIXME: Use check point Atom..
+ Wnd->InternalPos.flags = 0;
+ Wnd->InternalPos.MaxPos.x = Wnd->InternalPos.MaxPos.y = -1;
+ Wnd->InternalPos.IconPos.x = Wnd->InternalPos.IconPos.y = -1;
+ Wnd->InternalPos.NormalRect = Rect;
+ Wnd->InternalPosInitialized = TRUE;
+ }
+
+ if (Wnd->style & WS_MINIMIZE)
+ {
+ Wnd->InternalPos.IconPos = Size;
+ Wnd->InternalPos.flags |= WPF_MININIT;
+ }
+ else if (Wnd->style & WS_MAXIMIZE)
+ {
+ Wnd->InternalPos.flags |= WPF_MAXINIT;
+
+ if ( Wnd->spwndParent == Wnd->head.rpdesk->pDeskInfo->spwnd )
+ {
+ if (Wnd->state & WNDS_MAXIMIZESTOMONITOR)
+ {
+ Wnd->InternalPos.flags &= ~WPF_MAXINIT;
+ Wnd->InternalPos.MaxPos.x = Wnd->InternalPos.MaxPos.y = -1;
+ }
+ else
+ {
+ RECTL WorkArea;
+ PMONITOR pmonitor = UserMonitorFromRect(&Rect, MONITOR_DEFAULTTOPRIMARY );
+ // FIXME: support DPI aware, rcWorkDPI/Real etc..
+ WorkArea = pmonitor->rcMonitor;
+
+ if (Wnd->style & WS_MAXIMIZEBOX)
+ { // Support (Wnd->state & WNDS_HASCAPTION) || pmonitor->cFullScreen too.
+ if ((Wnd->style & WS_CAPTION) == WS_CAPTION || !(Wnd->style & (WS_CHILD | WS_POPUP)))
+ {
+ WorkArea = pmonitor->rcWork;
+ //ERR("rcWork\n");
+ }
+ }
+
+ Wnd->InternalPos.MaxPos.x = Rect.left - WorkArea.left;
+ Wnd->InternalPos.MaxPos.y = Rect.top - WorkArea.top;
+
+ /*ERR("WinPosIP 2 X %d = R.l %d - W.l %d | Y %d = R.t %d - W.t %d\n",
+ Wnd->InternalPos.MaxPos.x,
+ Rect.left, WorkArea.left,
+ Wnd->InternalPos.MaxPos.y,
+ Rect.top, WorkArea.top);*/
+ }
+ }
+ else
+ Wnd->InternalPos.MaxPos = Size;
+ }
+ else
+ {
+ Wnd->InternalPos.NormalRect = Rect;
+ }
+}
+
+BOOL
+FASTCALL
+IntGetWindowPlacement(PWND Wnd, WINDOWPLACEMENT *lpwndpl)
+{
+ if (!Wnd) return FALSE;
+
+ if(lpwndpl->length != sizeof(WINDOWPLACEMENT))
+ {
+ return FALSE;
+ }
+
+ lpwndpl->flags = 0;
+
+ WinPosInitInternalPos(Wnd, &Wnd->rcWindow);
+
+ lpwndpl->showCmd = SW_HIDE;
+
+ if ( Wnd->style & WS_MINIMIZE )
+ lpwndpl->showCmd = SW_SHOWMINIMIZED;
+ else
+ lpwndpl->showCmd = ( Wnd->style & WS_MAXIMIZE ) ? SW_SHOWMAXIMIZED : SW_SHOWNORMAL ;
+
+ lpwndpl->rcNormalPosition = Wnd->InternalPos.NormalRect;
+
+ if (Wnd->InternalPos.flags & WPF_MININIT) // Return if it was set!
+ {
+ lpwndpl->ptMinPosition.x = Wnd->InternalPos.IconPos.x;
+ lpwndpl->ptMinPosition.y = Wnd->InternalPos.IconPos.y;
+ }
+ else
+ lpwndpl->ptMinPosition.x = lpwndpl->ptMinPosition.y = -1;
+
+ if ( Wnd->InternalPos.flags & WPF_MAXINIT && // Return if set and not maximized to monitor!
+ !(Wnd->state & WNDS_MAXIMIZESTOMONITOR))
+ {
+ lpwndpl->ptMaxPosition.x = Wnd->InternalPos.MaxPos.x;
+ lpwndpl->ptMaxPosition.y = Wnd->InternalPos.MaxPos.y;
+ }
+ else
+ lpwndpl->ptMaxPosition.x = lpwndpl->ptMaxPosition.y = -1;
+
+ if ( Wnd->spwndParent == Wnd->head.rpdesk->pDeskInfo->spwnd &&
+ !(Wnd->ExStyle & WS_EX_TOOLWINDOW))
+ {
+ PMONITOR pmonitor = UserMonitorFromRect(&lpwndpl->rcNormalPosition, MONITOR_DEFAULTTOPRIMARY );
+
+ // FIXME: support DPI aware, rcWorkDPI/Real etc..
+ if (Wnd->InternalPos.flags & WPF_MININIT)
+ {
+ lpwndpl->ptMinPosition.x -= (pmonitor->rcWork.left - pmonitor->rcMonitor.left);
+ lpwndpl->ptMinPosition.y -= (pmonitor->rcWork.top - pmonitor->rcMonitor.top);
+ }
+ RECTL_vOffsetRect(&lpwndpl->rcNormalPosition,
+ pmonitor->rcMonitor.left - pmonitor->rcWork.left,
+ pmonitor->rcMonitor.top - pmonitor->rcWork.top);
+ }
+
+ if ( Wnd->InternalPos.flags & WPF_RESTORETOMAXIMIZED || Wnd->style & WS_MAXIMIZE )
+ lpwndpl->flags |= WPF_RESTORETOMAXIMIZED;
+
+ if ( ((Wnd->style & (WS_CHILD|WS_POPUP)) == WS_CHILD) && Wnd->InternalPos.flags & WPF_SETMINPOSITION)
+ lpwndpl->flags |= WPF_SETMINPOSITION;
+
+ return TRUE;
+}
+
+/* make sure the specified rect is visible on screen */
+static void make_rect_onscreen( RECT *rect )
+{
+ PMONITOR pmonitor = UserMonitorFromRect( rect, MONITOR_DEFAULTTONEAREST ); // Wine uses this.
+
+ // FIXME: support DPI aware, rcWorkDPI/Real etc..
+ if (!pmonitor) return;
+ /* FIXME: map coordinates from rcWork to rcMonitor */
+ if (rect->right <= pmonitor->rcWork.left)
+ {
+ rect->right += pmonitor->rcWork.left - rect->left;
+ rect->left = pmonitor->rcWork.left;
+ }
+ else if (rect->left >= pmonitor->rcWork.right)
+ {
+ rect->left += pmonitor->rcWork.right - rect->right;
+ rect->right = pmonitor->rcWork.right;
+ }
+ if (rect->bottom <= pmonitor->rcWork.top)
+ {
+ rect->bottom += pmonitor->rcWork.top - rect->top;
+ rect->top = pmonitor->rcWork.top;
+ }
+ else if (rect->top >= pmonitor->rcWork.bottom)
+ {
+ rect->top += pmonitor->rcWork.bottom - rect->bottom;
+ rect->bottom = pmonitor->rcWork.bottom;
+ }
+}
+
+/* make sure the specified point is visible on screen */
+static void make_point_onscreen( POINT *pt )
+{
+ RECT rect;
+
+ RECTL_vSetRect( &rect, pt->x, pt->y, pt->x + 1, pt->y + 1 );
+ make_rect_onscreen( &rect );
+ pt->x = rect.left;
+ pt->y = rect.top;
+}
+
+BOOL FASTCALL
+IntSetWindowPlacement(PWND Wnd, WINDOWPLACEMENT *wpl, UINT Flags)
+{
+ BOOL sAsync;
+ UINT SWP_Flags;
+
+ if ( Flags & PLACE_MIN) make_point_onscreen( &wpl->ptMinPosition );
+ if ( Flags & PLACE_MAX) make_point_onscreen( &wpl->ptMaxPosition );
+ if ( Flags & PLACE_RECT) make_rect_onscreen( &wpl->rcNormalPosition );
+
+ if (!Wnd || Wnd == Wnd->head.rpdesk->pDeskInfo->spwnd) return FALSE;
+
+ if ( Flags & PLACE_MIN ) Wnd->InternalPos.IconPos = wpl->ptMinPosition;
+ if ( Flags & PLACE_MAX ) Wnd->InternalPos.MaxPos = wpl->ptMaxPosition;
+ if ( Flags & PLACE_RECT) Wnd->InternalPos.NormalRect = wpl->rcNormalPosition;
+
+ SWP_Flags = SWP_NOZORDER | SWP_NOACTIVATE | ((wpl->flags & WPF_ASYNCWINDOWPLACEMENT) ? SWP_ASYNCWINDOWPOS : 0);
+
+ if (Wnd->style & WS_MINIMIZE )
+ {
+ if (Flags & PLACE_MIN || Wnd->InternalPos.flags & WPF_SETMINPOSITION)
+ {
+ co_WinPosSetWindowPos(Wnd, HWND_TOP,
+ wpl->ptMinPosition.x, wpl->ptMinPosition.y, 0, 0,
+ SWP_NOSIZE | SWP_Flags);
+ Wnd->InternalPos.flags |= WPF_MININIT;
+ }
+ }
+ else if (Wnd->style & WS_MAXIMIZE )
+ {
+ if (Flags & PLACE_MAX)
+ {
+ co_WinPosSetWindowPos(Wnd, HWND_TOP,
+ wpl->ptMaxPosition.x, wpl->ptMaxPosition.y, 0, 0,
+ SWP_NOSIZE | SWP_Flags);
+ Wnd->InternalPos.flags |= WPF_MAXINIT;
+ }
+ }
+ else if (Flags & PLACE_RECT)
+ {
+ co_WinPosSetWindowPos(Wnd, HWND_TOP,
+ wpl->rcNormalPosition.left, wpl->rcNormalPosition.top,
+ wpl->rcNormalPosition.right - wpl->rcNormalPosition.left,
+ wpl->rcNormalPosition.bottom - wpl->rcNormalPosition.top,
+ SWP_Flags);
+ }
+
+ sAsync = (Wnd->head.pti->MessageQueue != gptiCurrent->MessageQueue && wpl->flags & WPF_ASYNCWINDOWPLACEMENT);
+
+ if ( sAsync )
+ co_IntSendMessageNoWait( UserHMGetHandle(Wnd), WM_ASYNC_SHOWWINDOW, wpl->showCmd, 0 );
+ else
+ co_WinPosShowWindow(Wnd, wpl->showCmd);
+
+ if ( Wnd->style & WS_MINIMIZE && !sAsync )
+ {
+ if ( wpl->flags & WPF_SETMINPOSITION )
+ Wnd->InternalPos.flags |= WPF_SETMINPOSITION;
+
+ if ( wpl->flags & WPF_RESTORETOMAXIMIZED )
+ Wnd->InternalPos.flags |= WPF_RESTORETOMAXIMIZED;
+ }
+ return TRUE;
+}
+
+UINT
+FASTCALL
+co_WinPosArrangeIconicWindows(PWND parent)
+{
+ RECTL rectParent;
+ PWND Child;
+ INT x, y, xspacing, yspacing, sx, sy;
+
+ ASSERT_REFS_CO(parent);
+
+ IntGetClientRect( parent, &rectParent );
+ // FIXME: Support Minimize Metrics gspv.mm.iArrange.
+ // Default: ARW_BOTTOMLEFT
+ x = rectParent.left;
+ y = rectParent.bottom;
+
+ xspacing = UserGetSystemMetrics(SM_CXMINIMIZED);
+ yspacing = UserGetSystemMetrics(SM_CYMINIMIZED);
+
+ Child = parent->spwndChild;
+ while(Child)
+ {
+ if((Child->style & WS_MINIMIZE) != 0 )
+ {
+ USER_REFERENCE_ENTRY Ref;
+ UserRefObjectCo(Child, &Ref);
+
+ sx = x + UserGetSystemMetrics(SM_CXBORDER);
+ sy = y - yspacing - UserGetSystemMetrics(SM_CYBORDER);
+
+ Child->InternalPos.IconPos.x = sx;
+ Child->InternalPos.IconPos.y = sy;
+ Child->InternalPos.flags |= WPF_MININIT;
+
+ co_WinPosSetWindowPos( Child, 0, sx, sy, xspacing, yspacing, SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOCOPYBITS | SWP_ASYNCWINDOWPOS);
+
+ UserDerefObjectCo(Child);
+
+ if (x <= rectParent.right - xspacing)
+ x += xspacing;
+ else
+ {
+ x = rectParent.left;
+ y -= yspacing;
+ }
+ }
+ Child = Child->spwndNext;
+ }
+ return yspacing;
+}
+
+static VOID FASTCALL
+WinPosFindIconPos(PWND Window, POINT *Pos)
+{
+ RECT rectParent;
+ PWND pwndChild, pwndParent;
+ int x, y, xspacing, yspacing;
+
+ pwndParent = Window->spwndParent;
+ if (pwndParent == UserGetDesktopWindow())
+ {
+ //ERR("Parent is Desktop, Min off screen!\n");
+ /* ReactOS doesn't support iconic minimize to desktop */
+ Pos->x = Pos->y = -32000;
+ Window->InternalPos.flags |= WPF_MININIT;
+ Window->InternalPos.IconPos.x = Pos->x;
+ Window->InternalPos.IconPos.y = Pos->y;
+ return;
+ }
+
+ IntGetClientRect( pwndParent, &rectParent );
+ // FIXME: Support Minimize Metrics gspv.mm.iArrange.
+ // Default: ARW_BOTTOMLEFT
+ x = rectParent.left;
+ y = rectParent.bottom;
+
+ xspacing = UserGetSystemMetrics(SM_CXMINIMIZED);
+ yspacing = UserGetSystemMetrics(SM_CYMINIMIZED);
+
+ // Set to default position when minimized.
+ Pos->x = x + UserGetSystemMetrics(SM_CXBORDER);
+ Pos->y = y - yspacing - UserGetSystemMetrics(SM_CYBORDER);
+
+ for (pwndChild = pwndParent->spwndChild; pwndChild; pwndChild = pwndChild->spwndNext)
+ {
+ if (pwndChild == Window) continue;
+
+ if ((pwndChild->style & (WS_VISIBLE|WS_MINIMIZE)) != (WS_VISIBLE|WS_MINIMIZE) )
+ {
+ continue;
+ }
+
+ if ( pwndChild->InternalPos.IconPos.x != Pos->x && pwndChild->InternalPos.IconPos.y != Pos->y )
+ {
+ break;
+ }
+ if (x <= rectParent.right - xspacing)
+ x += xspacing;
+ else
+ {
+ x = rectParent.left;
+ y -= yspacing;
+ }
+ Pos->x = x + UserGetSystemMetrics(SM_CXBORDER);
+ Pos->y = y - yspacing - UserGetSystemMetrics(SM_CYBORDER);
+ }
+
+ Window->InternalPos.IconPos.x = Pos->x;
+ Window->InternalPos.IconPos.y = Pos->y;
+ Window->InternalPos.flags |= WPF_MININIT;
+ TRACE("Position is set! X:%d Y:%d\n",Pos->x,Pos->y);
+ return;
+}
+
+UINT FASTCALL
+co_WinPosMinMaximize(PWND Wnd, UINT ShowFlag, RECT* NewPos)
+{
+ POINT Size;
+ WINDOWPLACEMENT wpl;
+ LONG old_style;
+ UINT SwpFlags = 0;
+
+ ASSERT_REFS_CO(Wnd);
+
+ wpl.length = sizeof(wpl);
+ IntGetWindowPlacement( Wnd, &wpl );
+
+ if (co_HOOK_CallHooks( WH_CBT, HCBT_MINMAX, (WPARAM)Wnd->head.h, ShowFlag))
+ {
+ ERR("WinPosMinMaximize WH_CBT Call Hook return!\n");
+ return SWP_NOSIZE | SWP_NOMOVE;
+ }
+ if (Wnd->style & WS_MINIMIZE)
+ {
+ switch (ShowFlag)
+ {
+ case SW_SHOWMINNOACTIVE:
+ case SW_SHOWMINIMIZED:
+ case SW_FORCEMINIMIZE:
+ case SW_MINIMIZE:
+ return SWP_NOSIZE | SWP_NOMOVE;
+ }
+ if (!co_IntSendMessageNoWait(Wnd->head.h, WM_QUERYOPEN, 0, 0))
+ {
+ return(SWP_NOSIZE | SWP_NOMOVE);
+ }
+ SwpFlags |= SWP_NOCOPYBITS;
+ }
+ switch (ShowFlag)
+ {
+ case SW_SHOWMINNOACTIVE:
+ case SW_SHOWMINIMIZED:
+ case SW_FORCEMINIMIZE:
+ case SW_MINIMIZE:
+ {
+ //ERR("MinMaximize Minimize\n");
+ if (Wnd->style & WS_MAXIMIZE)
+ {
+ Wnd->InternalPos.flags |= WPF_RESTORETOMAXIMIZED;
+ }
+ else
+ {
+ Wnd->InternalPos.flags &= ~WPF_RESTORETOMAXIMIZED;
+ }
+
+ old_style = IntSetStyle( Wnd, WS_MINIMIZE, WS_MAXIMIZE );
+
+ co_UserRedrawWindow(Wnd, NULL, 0, RDW_VALIDATE | RDW_NOERASE | RDW_NOINTERNALPAINT);
+
+ if (!(Wnd->InternalPos.flags & WPF_SETMINPOSITION))
+ Wnd->InternalPos.flags &= ~WPF_MININIT;
+
+ WinPosFindIconPos(Wnd, &wpl.ptMinPosition);
+
+ if (!(old_style & WS_MINIMIZE)) SwpFlags |= SWP_STATECHANGED;
+
+ RECTL_vSetRect(NewPos, wpl.ptMinPosition.x, wpl.ptMinPosition.y,
+ wpl.ptMinPosition.x + UserGetSystemMetrics(SM_CXMINIMIZED),
+ wpl.ptMinPosition.y + UserGetSystemMetrics(SM_CYMINIMIZED));
+ SwpFlags |= SWP_NOCOPYBITS;
+ break;
+ }
+
+ case SW_MAXIMIZE:
+ {
+ //ERR("MinMaximize Maximize\n");
+ if ((Wnd->style & WS_MAXIMIZE) && (Wnd->style & WS_VISIBLE))
+ {
+ SwpFlags = SWP_NOSIZE | SWP_NOMOVE;
+ break;
+ }
+ co_WinPosGetMinMaxInfo(Wnd, &Size, &wpl.ptMaxPosition, NULL, NULL);
+
+ /*ERR("Maximize: %d,%d %dx%d\n",
+ wpl.ptMaxPosition.x, wpl.ptMaxPosition.y, Size.x, Size.y);
+ */
+ old_style = IntSetStyle( Wnd, WS_MAXIMIZE, WS_MINIMIZE );
+
+ if (!(old_style & WS_MAXIMIZE)) SwpFlags |= SWP_STATECHANGED;
+ RECTL_vSetRect(NewPos, wpl.ptMaxPosition.x, wpl.ptMaxPosition.y,
+ //wpl.ptMaxPosition.x + Size.x, wpl.ptMaxPosition.y + Size.y);
+ Size.x, Size.y);
+ break;
+ }
+
+ case SW_SHOWNOACTIVATE:
+ Wnd->InternalPos.flags &= ~WPF_RESTORETOMAXIMIZED;
+ /* fall through */
+ case SW_SHOWNORMAL:
+ case SW_RESTORE:
+ case SW_SHOWDEFAULT: /* FIXME: should have its own handler */
+ {
+ //ERR("MinMaximize Restore\n");
+ old_style = IntSetStyle( Wnd, 0, WS_MINIMIZE | WS_MAXIMIZE );
+ if (old_style & WS_MINIMIZE)
+ {
+ if (Wnd->InternalPos.flags & WPF_RESTORETOMAXIMIZED)
+ {
+ co_WinPosGetMinMaxInfo(Wnd, &Size, &wpl.ptMaxPosition, NULL, NULL);
+ IntSetStyle( Wnd, WS_MAXIMIZE, 0 );
+ SwpFlags |= SWP_STATECHANGED;
+ RECTL_vSetRect(NewPos, wpl.ptMaxPosition.x, wpl.ptMaxPosition.y,
+ wpl.ptMaxPosition.x + Size.x, wpl.ptMaxPosition.y + Size.y);
+ break;
+ }
+ else
+ {
+ *NewPos = wpl.rcNormalPosition;
+ NewPos->right -= NewPos->left;
+ NewPos->bottom -= NewPos->top;
+ break;
+ }
+ }
+ else
+ {
+ if (!(old_style & WS_MAXIMIZE))
+ {
+ break;
+ }
+ SwpFlags |= SWP_STATECHANGED;
+ Wnd->InternalPos.flags &= ~WPF_RESTORETOMAXIMIZED;
+ *NewPos = wpl.rcNormalPosition;
+ NewPos->right -= NewPos->left;
+ NewPos->bottom -= NewPos->top;
+ break;
+ }
+ }
+ }
+ return SwpFlags;
+}
+
+BOOL
+UserHasWindowEdge(DWORD Style, DWORD ExStyle)
+{
+ if (Style & WS_MINIMIZE)
+ return TRUE;
+ if (ExStyle & WS_EX_DLGMODALFRAME)
+ return TRUE;
+ if (ExStyle & WS_EX_STATICEDGE)
+ return FALSE;
+ if (Style & WS_THICKFRAME)
+ return TRUE;
+ Style &= WS_CAPTION;
+ if (Style == WS_DLGFRAME || Style == WS_CAPTION)
+ return TRUE;
+ return FALSE;
+}
+
+VOID FASTCALL
+IntGetWindowBorderMeasures(PWND Wnd, UINT *cx, UINT *cy)
+{
+ if(HAS_DLGFRAME(Wnd->style, Wnd->ExStyle) && !(Wnd->style & WS_MINIMIZE))
+ {
+ *cx = UserGetSystemMetrics(SM_CXDLGFRAME);
+ *cy = UserGetSystemMetrics(SM_CYDLGFRAME);
+ }
+ else
+ {
+ if(HAS_THICKFRAME(Wnd->style, Wnd->ExStyle)&& !(Wnd->style & WS_MINIMIZE))
+ {
+ *cx = UserGetSystemMetrics(SM_CXFRAME);
+ *cy = UserGetSystemMetrics(SM_CYFRAME);
+ }
+ else if(HAS_THINFRAME(Wnd->style, Wnd->ExStyle))
+ {
+ *cx = UserGetSystemMetrics(SM_CXBORDER);
+ *cy = UserGetSystemMetrics(SM_CYBORDER);
+ }
+ else
+ {
+ *cx = *cy = 0;
+ }
+ }
+}
+
+VOID
+UserGetWindowBorders(DWORD Style, DWORD ExStyle, SIZE *Size, BOOL WithClient)
+{
+ DWORD Border = 0;
+
+ if (UserHasWindowEdge(Style, ExStyle))
+ Border += 2;
+ else if (ExStyle & WS_EX_STATICEDGE)
+ Border += 1;
+ if ((ExStyle & WS_EX_CLIENTEDGE) && WithClient)
+ Border += 2;
+ if (Style & WS_CAPTION || ExStyle & WS_EX_DLGMODALFRAME)
+ Border ++;
+ Size->cx = Size->cy = Border;
+ if ((Style & WS_THICKFRAME) && !(Style & WS_MINIMIZE))
+ {
+ Size->cx += UserGetSystemMetrics(SM_CXFRAME) - UserGetSystemMetrics(SM_CXDLGFRAME);
+ Size->cy += UserGetSystemMetrics(SM_CYFRAME) - UserGetSystemMetrics(SM_CYDLGFRAME);
+ }
+ Size->cx *= UserGetSystemMetrics(SM_CXBORDER);
+ Size->cy *= UserGetSystemMetrics(SM_CYBORDER);
+}
+
+BOOL WINAPI
+UserAdjustWindowRectEx(LPRECT lpRect,
+ DWORD dwStyle,
+ BOOL bMenu,
+ DWORD dwExStyle)
+{
+ SIZE BorderSize;
+
+ if (bMenu)
+ {
+ lpRect->top -= UserGetSystemMetrics(SM_CYMENU);
+ }
+ if ((dwStyle & WS_CAPTION) == WS_CAPTION)
+ {
+ if (dwExStyle & WS_EX_TOOLWINDOW)
+ lpRect->top -= UserGetSystemMetrics(SM_CYSMCAPTION);
+ else
+ lpRect->top -= UserGetSystemMetrics(SM_CYCAPTION);
+ }
+ UserGetWindowBorders(dwStyle, dwExStyle, &BorderSize, TRUE);
+ RECTL_vInflateRect(
+ lpRect,
+ BorderSize.cx,
+ BorderSize.cy);
+
+ return TRUE;
+}
+
+UINT FASTCALL
+co_WinPosGetMinMaxInfo(PWND Window, POINT* MaxSize, POINT* MaxPos,
+ POINT* MinTrack, POINT* MaxTrack)
+{
+ MINMAXINFO MinMax;
+ PMONITOR monitor;
+ INT xinc, yinc;
+ LONG style = Window->style;
+ LONG adjustedStyle;
+ LONG exstyle = Window->ExStyle;
+ RECT rc;
+
+ ASSERT_REFS_CO(Window);
+
+ /* Compute default values */
+
+ rc = Window->rcWindow;
+ MinMax.ptReserved.x = rc.left;
+ MinMax.ptReserved.y = rc.top;
+
+ if ((style & WS_CAPTION) == WS_CAPTION)
+ adjustedStyle = style & ~WS_BORDER; /* WS_CAPTION = WS_DLGFRAME | WS_BORDER */
+ else
+ adjustedStyle = style;
+
+ if(Window->spwndParent)
+ IntGetClientRect(Window->spwndParent, &rc);
+ UserAdjustWindowRectEx(&rc, adjustedStyle, ((style & WS_POPUP) && Window->IDMenu), exstyle);
+
+ xinc = -rc.left;
+ yinc = -rc.top;
+
+ MinMax.ptMaxSize.x = rc.right - rc.left;
+ MinMax.ptMaxSize.y = rc.bottom - rc.top;
+ if (style & (WS_DLGFRAME | WS_BORDER))
+ {
+ MinMax.ptMinTrackSize.x = UserGetSystemMetrics(SM_CXMINTRACK);
+ MinMax.ptMinTrackSize.y = UserGetSystemMetrics(SM_CYMINTRACK);
+ }
+ else
+ {
+ MinMax.ptMinTrackSize.x = 2 * xinc;
+ MinMax.ptMinTrackSize.y = 2 * yinc;
+ }
+ MinMax.ptMaxTrackSize.x = UserGetSystemMetrics(SM_CXMAXTRACK);
+ MinMax.ptMaxTrackSize.y = UserGetSystemMetrics(SM_CYMAXTRACK);
+ MinMax.ptMaxPosition.x = -xinc;
+ MinMax.ptMaxPosition.y = -yinc;
+
+ if (!EMPTYPOINT(Window->InternalPos.MaxPos)) MinMax.ptMaxPosition = Window->InternalPos.MaxPos;
+
+ co_IntSendMessage(Window->head.h, WM_GETMINMAXINFO, 0, (LPARAM)&MinMax);
+
+ /* if the app didn't change the values, adapt them for the current monitor */
+ if ((monitor = UserGetPrimaryMonitor()))
+ {
+ RECT rc_work;
+
+ rc_work = monitor->rcMonitor;
+
+ if (style & WS_MAXIMIZEBOX)
+ {
+ if ((style & WS_CAPTION) == WS_CAPTION || !(style & (WS_CHILD | WS_POPUP)))
+ rc_work = monitor->rcWork;
+ }
+
+ if (MinMax.ptMaxSize.x == UserGetSystemMetrics(SM_CXSCREEN) + 2 * xinc &&
+ MinMax.ptMaxSize.y == UserGetSystemMetrics(SM_CYSCREEN) + 2 * yinc)
+ {
+ MinMax.ptMaxSize.x = (rc_work.right - rc_work.left) + 2 * xinc;
+ MinMax.ptMaxSize.y = (rc_work.bottom - rc_work.top) + 2 * yinc;
+ }
+ if (MinMax.ptMaxPosition.x == -xinc && MinMax.ptMaxPosition.y == -yinc)
+ {
+ MinMax.ptMaxPosition.x = rc_work.left - xinc;
+ MinMax.ptMaxPosition.y = rc_work.top - yinc;
+ }
+ if (MinMax.ptMaxSize.x >= (monitor->rcMonitor.right - monitor->rcMonitor.left) &&
+ MinMax.ptMaxSize.y >= (monitor->rcMonitor.bottom - monitor->rcMonitor.top) )
+ Window->state |= WNDS_MAXIMIZESTOMONITOR;
+ else
+ Window->state &= ~WNDS_MAXIMIZESTOMONITOR;
+ }
+
+
+ MinMax.ptMaxTrackSize.x = max(MinMax.ptMaxTrackSize.x,
+ MinMax.ptMinTrackSize.x);
+ MinMax.ptMaxTrackSize.y = max(MinMax.ptMaxTrackSize.y,
+ MinMax.ptMinTrackSize.y);
+
+ if (MaxSize)
+ *MaxSize = MinMax.ptMaxSize;
+ if (MaxPos)
+ *MaxPos = MinMax.ptMaxPosition;
+ if (MinTrack)
+ *MinTrack = MinMax.ptMinTrackSize;
+ if (MaxTrack)
+ *MaxTrack = MinMax.ptMaxTrackSize;
+
+ return 0; // FIXME: What does it return?
+}
+
+static
+VOID FASTCALL
+FixClientRect(PRECTL ClientRect, PRECTL WindowRect)
+{
+ if (ClientRect->left < WindowRect->left)
+ {
+ ClientRect->left = WindowRect->left;
+ }
+ else if (WindowRect->right < ClientRect->left)
+ {
+ ClientRect->left = WindowRect->right;
+ }
+ if (ClientRect->right < WindowRect->left)
+ {
+ ClientRect->right = WindowRect->left;
+ }
+ else if (WindowRect->right < ClientRect->right)
+ {
+ ClientRect->right = WindowRect->right;
+ }
+ if (ClientRect->top < WindowRect->top)
+ {
+ ClientRect->top = WindowRect->top;
+ }
+ else if (WindowRect->bottom < ClientRect->top)
+ {
+ ClientRect->top = WindowRect->bottom;
+ }
+ if (ClientRect->bottom < WindowRect->top)
+ {
+ ClientRect->bottom = WindowRect->top;
+ }
+ else if (WindowRect->bottom < ClientRect->bottom)
+ {
+ ClientRect->bottom = WindowRect->bottom;
+ }
+}
+/***********************************************************************
+ * get_valid_rects
+ *
+ * Compute the valid rects from the old and new client rect and WVR_* flags.
+ * Helper for WM_NCCALCSIZE handling.
+ */
+static
+VOID FASTCALL
+get_valid_rects( RECTL *old_client, RECTL *new_client, UINT flags, RECTL *valid )
+{
+ int cx, cy;
+
+ if (flags & WVR_REDRAW)
+ {
+ RECTL_vSetEmptyRect( &valid[0] );
+ RECTL_vSetEmptyRect( &valid[1] );
+ return;
+ }
+
+ if (flags & WVR_VALIDRECTS)
+ {
+ if (!RECTL_bIntersectRect( &valid[0], &valid[0], new_client ) ||
+ !RECTL_bIntersectRect( &valid[1], &valid[1], old_client ))
+ {
+ RECTL_vSetEmptyRect( &valid[0] );
+ RECTL_vSetEmptyRect( &valid[1] );
+ return;
+ }
+ flags = WVR_ALIGNLEFT | WVR_ALIGNTOP;
+ }
+ else
+ {
+ valid[0] = *new_client;
+ valid[1] = *old_client;
+ }
+
+ /* make sure the rectangles have the same size */
+ cx = min( valid[0].right - valid[0].left, valid[1].right - valid[1].left );
+ cy = min( valid[0].bottom - valid[0].top, valid[1].bottom - valid[1].top );
+
+ if (flags & WVR_ALIGNBOTTOM)
+ {
+ valid[0].top = valid[0].bottom - cy;
+ valid[1].top = valid[1].bottom - cy;
+ }
+ else
+ {
+ valid[0].bottom = valid[0].top + cy;
+ valid[1].bottom = valid[1].top + cy;
+ }
+ if (flags & WVR_ALIGNRIGHT)
+ {
+ valid[0].left = valid[0].right - cx;
+ valid[1].left = valid[1].right - cx;
+ }
+ else
+ {
+ valid[0].right = valid[0].left + cx;
+ valid[1].right = valid[1].left + cx;
+ }
+}
+
+static
+LONG FASTCALL
+co_WinPosDoNCCALCSize(PWND Window, PWINDOWPOS WinPos, RECTL* WindowRect, RECTL* ClientRect, RECTL* validRects)
+{
+ PWND Parent;
+ UINT wvrFlags = 0;
+
+ ASSERT_REFS_CO(Window);
+
+ /* Send WM_NCCALCSIZE message to get new client area */
+ if ((WinPos->flags & (SWP_FRAMECHANGED | SWP_NOSIZE)) != SWP_NOSIZE)
+ {
+ NCCALCSIZE_PARAMS params;
+ WINDOWPOS winposCopy;
+
+ params.rgrc[0] = *WindowRect; // new coordinates of a window that has been moved or resized
+ params.rgrc[1] = Window->rcWindow; // window before it was moved or resized
+ params.rgrc[2] = Window->rcClient; // client area before the window was moved or resized
+
+ Parent = Window->spwndParent;
+ if (0 != (Window->style & WS_CHILD) && Parent)
+ {
+ RECTL_vOffsetRect(&(params.rgrc[0]), - Parent->rcClient.left, - Parent->rcClient.top);
+ RECTL_vOffsetRect(&(params.rgrc[1]), - Parent->rcClient.left, - Parent->rcClient.top);
+ RECTL_vOffsetRect(&(params.rgrc[2]), - Parent->rcClient.left, - Parent->rcClient.top);
+ }
+
+ params.lppos = &winposCopy;
+ winposCopy = *WinPos;
+
+ wvrFlags = co_IntSendMessage(Window->head.h, WM_NCCALCSIZE, TRUE, (LPARAM) ¶ms);
+
+ /* If the application send back garbage, ignore it */
+ if (params.rgrc[0].left <= params.rgrc[0].right &&
+ params.rgrc[0].top <= params.rgrc[0].bottom)
+ {
+ *ClientRect = params.rgrc[0]; // First rectangle contains the coordinates of the new client rectangle resulting from the move or resize
+ if ((Window->style & WS_CHILD) && Parent)
+ {
+ RECTL_vOffsetRect(ClientRect, Parent->rcClient.left, Parent->rcClient.top);
+ }
+ FixClientRect(ClientRect, WindowRect);
+ }
+
+ if (ClientRect->left != Window->rcClient.left ||
+ ClientRect->top != Window->rcClient.top)
+ {
+ WinPos->flags &= ~SWP_NOCLIENTMOVE;
+ }
+
+ if (ClientRect->right - ClientRect->left != Window->rcClient.right - Window->rcClient.left)
+ {
+ WinPos->flags &= ~SWP_NOCLIENTSIZE;
+ }
+ else
+ wvrFlags &= ~WVR_HREDRAW;
+
+ if (ClientRect->bottom - ClientRect->top != Window->rcClient.bottom - Window->rcClient.top)
+ {
+ WinPos->flags &= ~SWP_NOCLIENTSIZE;
+ }
+ else
+ wvrFlags &= ~WVR_VREDRAW;
+
+ validRects[0] = params.rgrc[1]; // second rectangle contains the valid destination rectangle
+ validRects[1] = params.rgrc[2]; // third rectangle contains the valid source rectangle
+ }
+ else
+ {
+ if (!(WinPos->flags & SWP_NOMOVE) &&
+ (ClientRect->left != Window->rcClient.left ||
+ ClientRect->top != Window->rcClient.top))
+ {
+ WinPos->flags &= ~SWP_NOCLIENTMOVE;
+ }
+ }
+
+ if (WinPos->flags & (SWP_NOCOPYBITS | SWP_NOREDRAW | SWP_SHOWWINDOW | SWP_HIDEWINDOW))
+ {
+ RECTL_vSetEmptyRect( &validRects[0] );
+ RECTL_vSetEmptyRect( &validRects[1] );
+ }
+ else get_valid_rects( &Window->rcClient, ClientRect, wvrFlags, validRects );
+
+ return wvrFlags;
+}
+
+static
+BOOL FASTCALL
+co_WinPosDoWinPosChanging(PWND Window,
+ PWINDOWPOS WinPos,
+ PRECTL WindowRect,
+ PRECTL ClientRect)
+{
+ ASSERT_REFS_CO(Window);
+
+ /* Send WM_WINDOWPOSCHANGING message */
+
+ if (!(WinPos->flags & SWP_NOSENDCHANGING))
+ {
++ TRACE("Sending WM_WINDOWPOSCHANGING to hwnd %p.\n", Window->head.h);
+ co_IntSendMessageNoWait(Window->head.h, WM_WINDOWPOSCHANGING, 0, (LPARAM) WinPos);
+ }
+
+ /* Calculate new position and size */
+
+ *WindowRect = Window->rcWindow;
+ *ClientRect = (Window->style & WS_MINIMIZE) ? Window->rcWindow : Window->rcClient;
+
+ if (!(WinPos->flags & SWP_NOSIZE))
+ {
+ if (Window->style & WS_MINIMIZE)
+ {
+ WindowRect->right = WindowRect->left + UserGetSystemMetrics(SM_CXMINIMIZED);
+ WindowRect->bottom = WindowRect->top + UserGetSystemMetrics(SM_CYMINIMIZED);
+ }
+ else
+ {
+ WindowRect->right = WindowRect->left + WinPos->cx;
+ WindowRect->bottom = WindowRect->top + WinPos->cy;
+ }
+ }
+
+ if (!(WinPos->flags & SWP_NOMOVE))
+ {
+ INT X, Y;
+ PWND Parent;
+ X = WinPos->x;
+ Y = WinPos->y;
+
+ Parent = Window->spwndParent;
+
+ if (((Window->style & WS_CHILD) != 0) &&
+ Parent &&
+ Parent != Window->head.rpdesk->pDeskInfo->spwnd)
+ {
+ TRACE("Not SWP_NOMOVE 1 Parent client offset X %d Y %d\n",X,Y);
+ X += Parent->rcClient.left;
+ Y += Parent->rcClient.top;
+ TRACE("Not SWP_NOMOVE 2 Parent client offset X %d Y %d\n",X,Y);
+ }
+
+ WindowRect->left = X;
+ WindowRect->top = Y;
+ WindowRect->right += X - Window->rcWindow.left;
+ WindowRect->bottom += Y - Window->rcWindow.top;
+
+ RECTL_vOffsetRect(ClientRect, X - Window->rcWindow.left,
+ Y - Window->rcWindow.top);
+ }
+ WinPos->flags |= SWP_NOCLIENTMOVE | SWP_NOCLIENTSIZE;
+
+ TRACE( "hwnd %p, after %p, swp %d,%d %dx%d flags %08x\n",
+ WinPos->hwnd, WinPos->hwndInsertAfter, WinPos->x, WinPos->y,
+ WinPos->cx, WinPos->cy, WinPos->flags );
+ TRACE("WindowRect: %d %d %d %d\n", WindowRect->left,WindowRect->top,WindowRect->right,WindowRect->bottom);
+ TRACE("ClientRect: %d %d %d %d\n", ClientRect->left,ClientRect->top,ClientRect->right,ClientRect->bottom);
+
+ return TRUE;
+}
+
+/*
+ * Fix Z order taking into account owned popups -
+ * basically we need to maintain them above the window that owns them
+ *
+ * FIXME: hide/show owned popups when owner visibility changes.
+ *
+ * ReactOS: See bug CORE-6129 and CORE-6554.
+ *
+ */
+ ////
+ // Pass all the win:test_children/popup_zorder tests except "move hwnd_F and its popups down" which is if'ed out.
+ // Side effect, breaks more of the DeferWindowPos api tests, but wine breaks more!!!!
+static
+HWND FASTCALL
+WinPosDoOwnedPopups(PWND Window, HWND hWndInsertAfter)
+{
+ HWND *List = NULL;
+ HWND Owner;
+ LONG Style;
+ PWND DesktopWindow, ChildObject;
+ int i;
+
+ TRACE("(%p) hInsertAfter = %p\n", Window, hWndInsertAfter );
+
+ Owner = Window->spwndOwner ? Window->spwndOwner->head.h : NULL;
+ Style = Window->style;
+
+ if (Style & WS_CHILD)
+ {
+ TRACE("Window is child\n");
+ return hWndInsertAfter;
+ }
+
+ if (Owner)
+ {
+ /* Make sure this popup stays above the owner */
+
+ if (hWndInsertAfter != HWND_TOPMOST)
+ {
+ DesktopWindow = UserGetDesktopWindow();
+ List = IntWinListChildren(DesktopWindow);
+
+ if (List != NULL)
+ {
+ for (i = 0; List[i]; i++)
+ {
+ BOOL topmost = FALSE;
+
+ ChildObject = ValidateHwndNoErr(List[i]);
+ if (ChildObject)
+ {
+ topmost = (ChildObject->ExStyle & WS_EX_TOPMOST) != 0;
+ }
+
+ if (List[i] == Owner)
+ {
+ if (i > 0) hWndInsertAfter = List[i-1];
+ else hWndInsertAfter = topmost ? HWND_TOPMOST : HWND_TOP;
+ break;
+ }
+
+ if (hWndInsertAfter == HWND_TOP || hWndInsertAfter == HWND_NOTOPMOST)
+ {
+ if (!topmost) break;
+ }
+ else if (List[i] == hWndInsertAfter) break;
+ }
+ }
+ else
+ return hWndInsertAfter;
+ }
+ }
+
+ if (hWndInsertAfter == HWND_BOTTOM)
+ {
+ ERR("Window is HWND_BOTTOM\n");
+ if (List) ExFreePoolWithTag(List, USERTAG_WINDOWLIST);
+ goto done;
+ }
+
+ if (!List)
+ {
+ DesktopWindow = UserGetDesktopWindow();
+ List = IntWinListChildren(DesktopWindow);
+ }
+
+ if (List != NULL)
+ {
+ i = 0;
+
+ if (hWndInsertAfter == HWND_TOP || hWndInsertAfter == HWND_NOTOPMOST)
+ {
+ if (hWndInsertAfter == HWND_NOTOPMOST || !(Window->ExStyle & WS_EX_TOPMOST))
+ {
+ TRACE("skip all the topmost windows\n");
+ /* skip all the topmost windows */
+ while (List[i] &&
+ (ChildObject = ValidateHwndNoErr(List[i])) &&
+ (ChildObject->ExStyle & WS_EX_TOPMOST)) i++;
+ }
+ }
+ else if (hWndInsertAfter != HWND_TOPMOST)
+ {
+ /* skip windows that are already placed correctly */
+ for (i = 0; List[i]; i++)
+ {
+ if (List[i] == hWndInsertAfter) break;
+ if (List[i] == UserHMGetHandle(Window))
+ {
+ ExFreePoolWithTag(List, USERTAG_WINDOWLIST);
+ goto done; /* nothing to do if window is moving backwards in z-order */
+ }
+ }
+ }
+
+ for (; List[i]; i++)
+ {
+ PWND Wnd;
+ USER_REFERENCE_ENTRY Ref;
+
+ if (List[i] == UserHMGetHandle(Window))
+ break;
+
+ if (!(Wnd = ValidateHwndNoErr(List[i])))
+ continue;
+
+ Owner = Wnd->spwndOwner ? Wnd->spwndOwner->head.h : NULL;
+
+ if (Owner != UserHMGetHandle(Window)) continue;
+
+ UserRefObjectCo(Wnd, &Ref);
+ TRACE( "moving %p owned by %p after %p\n", List[i], UserHMGetHandle(Window), hWndInsertAfter );
+ co_WinPosSetWindowPos(Wnd, hWndInsertAfter, 0, 0, 0, 0,
+ SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOSENDCHANGING| SWP_DEFERERASE);
+
+ UserDerefObjectCo(Wnd);
+ hWndInsertAfter = List[i];
+ }
+ ExFreePoolWithTag(List, USERTAG_WINDOWLIST);
+ }
+done:
+ return hWndInsertAfter;
+}
+////
+
+/***********************************************************************
+ * WinPosInternalMoveWindow
+ *
+ * Update WindowRect and ClientRect of Window and all of its children
+ * We keep both WindowRect and ClientRect in screen coordinates internally
+ */
+static
+VOID FASTCALL
+WinPosInternalMoveWindow(PWND Window, INT MoveX, INT MoveY)
+{
+ PWND Child;
+
+ ASSERT(Window != Window->spwndChild);
+ TRACE("InternalMoveWin X %d Y %d\n", MoveX, MoveY);
+
+ Window->rcWindow.left += MoveX;
+ Window->rcWindow.right += MoveX;
+ Window->rcWindow.top += MoveY;
+ Window->rcWindow.bottom += MoveY;
+
+ Window->rcClient.left += MoveX;
+ Window->rcClient.right += MoveX;
+ Window->rcClient.top += MoveY;
+ Window->rcClient.bottom += MoveY;
+
+ for(Child = Window->spwndChild; Child; Child = Child->spwndNext)
+ {
+ WinPosInternalMoveWindow(Child, MoveX, MoveY);
+ }
+}
+
+/*
+ * WinPosFixupSWPFlags
+ *
+ * Fix redundant flags and values in the WINDOWPOS structure.
+ */
+static
+BOOL FASTCALL
+WinPosFixupFlags(WINDOWPOS *WinPos, PWND Wnd)
+{
+ PWND Parent;
+ POINT pt;
+
+ /* Finally make sure that all coordinates are valid */
+ if (WinPos->x < -32768) WinPos->x = -32768;
+ else if (WinPos->x > 32767) WinPos->x = 32767;
+ if (WinPos->y < -32768) WinPos->y = -32768;
+ else if (WinPos->y > 32767) WinPos->y = 32767;
+
+ WinPos->cx = max(WinPos->cx, 0);
+ WinPos->cy = max(WinPos->cy, 0);
+
+ Parent = UserGetAncestor( Wnd, GA_PARENT );
+ if (!IntIsWindowVisible( Parent )) WinPos->flags |= SWP_NOREDRAW;
+
+ if (Wnd->style & WS_VISIBLE) WinPos->flags &= ~SWP_SHOWWINDOW;
+ else
+ {
+ WinPos->flags &= ~SWP_HIDEWINDOW;
+ if (!(WinPos->flags & SWP_SHOWWINDOW)) WinPos->flags |= SWP_NOREDRAW;
+ }
+
+ /* Check for right size */
+ if (Wnd->rcWindow.right - Wnd->rcWindow.left == WinPos->cx &&
+ Wnd->rcWindow.bottom - Wnd->rcWindow.top == WinPos->cy)
+ {
+ WinPos->flags |= SWP_NOSIZE;
+ }
+
+ pt.x = WinPos->x;
+ pt.y = WinPos->y;
+ IntClientToScreen( Parent, &pt );
+ TRACE("WPFU C2S wpx %d wpy %d ptx %d pty %d\n",WinPos->x,WinPos->y,pt.x,pt.y);
+ /* Check for right position */
+ if (Wnd->rcWindow.left == pt.x && Wnd->rcWindow.top == pt.y)
+ {
+ //ERR("In right pos\n");
+ WinPos->flags |= SWP_NOMOVE;
+ }
+
+ if (WinPos->hwnd == UserGetForegroundWindow())
+ {
+ WinPos->flags |= SWP_NOACTIVATE; /* Already active */
+ }
+ else
+ if ((Wnd->style & (WS_POPUP | WS_CHILD)) != WS_CHILD)
+ {
+ /* Bring to the top when activating */
+ if (!(WinPos->flags & (SWP_NOACTIVATE|SWP_HIDEWINDOW)) &&
+ (WinPos->flags & SWP_NOZORDER ||
+ (WinPos->hwndInsertAfter != HWND_TOPMOST && WinPos->hwndInsertAfter != HWND_NOTOPMOST)))
+ {
+ WinPos->flags &= ~SWP_NOZORDER;
+ WinPos->hwndInsertAfter = (0 != (Wnd->ExStyle & WS_EX_TOPMOST) ? HWND_TOPMOST : HWND_TOP);
+ }
+ }
+
+ /* Check hwndInsertAfter */
+ if (!(WinPos->flags & SWP_NOZORDER))
+ {
+ /* Fix sign extension */
+ if (WinPos->hwndInsertAfter == (HWND)0xffff)
+ {
+ WinPos->hwndInsertAfter = HWND_TOPMOST;
+ }
+ else if (WinPos->hwndInsertAfter == (HWND)0xfffe)
+ {
+ WinPos->hwndInsertAfter = HWND_NOTOPMOST;
+ }
+
+ if (WinPos->hwndInsertAfter == HWND_TOP)
+ {
+ /* Keep it topmost when it's already topmost */
+ if ((Wnd->ExStyle & WS_EX_TOPMOST) != 0)
+ WinPos->hwndInsertAfter = HWND_TOPMOST;
+
+ if (IntGetWindow(WinPos->hwnd, GW_HWNDFIRST) == WinPos->hwnd)
+ WinPos->flags |= SWP_NOZORDER;
+ }
+ else if (WinPos->hwndInsertAfter == HWND_BOTTOM)
+ {
+ if (!(Wnd->ExStyle & WS_EX_TOPMOST) && IntGetWindow(WinPos->hwnd, GW_HWNDLAST) == WinPos->hwnd)
+ WinPos->flags |= SWP_NOZORDER;
+ }
+ else if (WinPos->hwndInsertAfter == HWND_TOPMOST)
+ {
+ if ((Wnd->ExStyle & WS_EX_TOPMOST) && IntGetWindow(WinPos->hwnd, GW_HWNDFIRST) == WinPos->hwnd)
+ WinPos->flags |= SWP_NOZORDER;
+ }
+ else if (WinPos->hwndInsertAfter == HWND_NOTOPMOST)
+ {
+ if (!(Wnd->ExStyle & WS_EX_TOPMOST))
+ WinPos->flags |= SWP_NOZORDER;
+ }
+ else /* hwndInsertAfter must be a sibling of the window */
+ {
+ PWND InsAfterWnd;
+
+ InsAfterWnd = ValidateHwndNoErr(WinPos->hwndInsertAfter);
+ if(!InsAfterWnd)
+ {
+ return TRUE;
+ }
+
+ if (InsAfterWnd->spwndParent != Wnd->spwndParent)
+ {
+ /* Note from wine User32 Win test_SetWindowPos:
+ "Returns TRUE also for windows that are not siblings"
+ "Does not seem to do anything even without passing flags, still returns TRUE"
+ "Same thing the other way around."
+ ".. and with these windows."
+ */
+ return FALSE;
+ }
+ else
+ {
+ /*
+ * We don't need to change the Z order of hwnd if it's already
+ * inserted after hwndInsertAfter or when inserting hwnd after
+ * itself.
+ */
+ if ((WinPos->hwnd == WinPos->hwndInsertAfter) ||
+ ((InsAfterWnd->spwndNext) && (WinPos->hwnd == InsAfterWnd->spwndNext->head.h)))
+ {
+ WinPos->flags |= SWP_NOZORDER;
+ }
+ }
+ }
+ }
+
+ return TRUE;
+}
+
+/* x and y are always screen relative */
+BOOLEAN FASTCALL
+co_WinPosSetWindowPos(
+ PWND Window,
+ HWND WndInsertAfter,
+ INT x,
+ INT y,
+ INT cx,
+ INT cy,
+ UINT flags
+ )
+{
+ WINDOWPOS WinPos;
+ RECTL NewWindowRect;
+ RECTL NewClientRect;
+ RECTL valid_rects[2];
- VisRgn = NULL;
++ PREGION VisBefore = NULL;
++ PREGION VisBeforeJustClient = NULL;
++ PREGION VisAfter = NULL;
++ PREGION CopyRgn = NULL;
+ ULONG WvrFlags = 0;
+ RECTL OldWindowRect, OldClientRect;
+ int RgnType;
+ HDC Dc;
+ RECTL CopyRect;
+ PWND Ancestor;
+ BOOL bPointerInWindow;
+
+ ASSERT_REFS_CO(Window);
+
+ /* FIXME: Get current active window from active queue. Why? since r2915. */
+
+ bPointerInWindow = IntPtInWindow(Window, gpsi->ptCursor.x, gpsi->ptCursor.y);
+
+ WinPos.hwnd = Window->head.h;
+ WinPos.hwndInsertAfter = WndInsertAfter;
+ WinPos.x = x;
+ WinPos.y = y;
+ WinPos.cx = cx;
+ WinPos.cy = cy;
+ WinPos.flags = flags;
+
+ if ( flags & SWP_ASYNCWINDOWPOS )
+ {
+ LRESULT lRes;
+ PWINDOWPOS ppos = ExAllocatePoolWithTag(PagedPool, sizeof(WINDOWPOS), USERTAG_SWP);
+ if ( ppos )
+ {
+ WinPos.flags &= ~SWP_ASYNCWINDOWPOS; // Clear flag.
+ *ppos = WinPos;
+ /* Yes it's a pointer inside Win32k! */
+ lRes = co_IntSendMessageNoWait( WinPos.hwnd, WM_ASYNC_SETWINDOWPOS, 0, (LPARAM)ppos);
+ /* We handle this the same way as Event Hooks and Hooks. */
+ if ( !lRes )
+ {
+ ExFreePoolWithTag(ppos, USERTAG_SWP);
+ return FALSE;
+ }
+ return TRUE;
+ }
+ return FALSE;
+ }
+
+ co_WinPosDoWinPosChanging(Window, &WinPos, &NewWindowRect, &NewClientRect);
+
+ /* Does the window still exist? */
+ if (!IntIsWindow(WinPos.hwnd))
+ {
+ TRACE("WinPosSetWindowPos: Invalid handle 0x%p!\n",WinPos.hwnd);
+ EngSetLastError(ERROR_INVALID_WINDOW_HANDLE);
+ return FALSE;
+ }
+
+ /* Fix up the flags. */
+ if (!WinPosFixupFlags(&WinPos, Window))
+ {
+ // See Note.
+ return TRUE;
+ }
+
+ Ancestor = UserGetAncestor(Window, GA_PARENT);
+ if ( (WinPos.flags & (SWP_NOZORDER | SWP_HIDEWINDOW | SWP_SHOWWINDOW)) != SWP_NOZORDER &&
+ Ancestor && Ancestor->head.h == IntGetDesktopWindow() )
+ {
+ WinPos.hwndInsertAfter = WinPosDoOwnedPopups(Window, WinPos.hwndInsertAfter);
+ }
+
+ if (!(WinPos.flags & SWP_NOREDRAW))
+ {
+ /* Compute the visible region before the window position is changed */
+ if (!(WinPos.flags & SWP_SHOWWINDOW) &&
+ (WinPos.flags & (SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER |
+ SWP_HIDEWINDOW | SWP_FRAMECHANGED)) !=
+ (SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER))
+ {
+ VisBefore = VIS_ComputeVisibleRegion(Window, FALSE, FALSE,
+ (Window->style & WS_CLIPSIBLINGS) ? TRUE : FALSE);
- (VisRgn = (PROSRGNDATA)RGNOBJAPI_Lock(VisBefore, NULL)) &&
- REGION_Complexity(VisRgn) == NULLREGION )
+
+ if ( VisBefore != NULL &&
- RGNOBJAPI_Unlock(VisRgn);
- GreDeleteObject(VisBefore);
++ REGION_Complexity(VisBefore) == NULLREGION )
+ {
- else if(VisRgn)
++ REGION_Delete(VisBefore);
+ VisBefore = NULL;
+ }
- RGNOBJAPI_Unlock(VisRgn);
- NtGdiOffsetRgn(VisBefore, -Window->rcWindow.left, -Window->rcWindow.top);
++ else if(VisBefore)
+ {
- VisRgn = NULL;
++ IntGdiOffsetRgn(VisBefore, -Window->rcWindow.left, -Window->rcWindow.top);
+ }
+
+ /* Calculate the non client area for resizes, as this is used in the copy region */
+ if (!(WinPos.flags & SWP_NOSIZE))
+ {
+ VisBeforeJustClient = VIS_ComputeVisibleRegion(Window, TRUE, FALSE,
+ (Window->style & WS_CLIPSIBLINGS) ? TRUE : FALSE);
- (VisRgn = (PROSRGNDATA)RGNOBJAPI_Lock(VisBeforeJustClient, NULL)) &&
- REGION_Complexity(VisRgn) == NULLREGION )
+
+ if ( VisBeforeJustClient != NULL &&
- RGNOBJAPI_Unlock(VisRgn);
- GreDeleteObject(VisBeforeJustClient);
++ REGION_Complexity(VisBeforeJustClient) == NULLREGION )
+ {
- else if(VisRgn)
++ REGION_Delete(VisBeforeJustClient);
+ VisBeforeJustClient = NULL;
+ }
- RGNOBJAPI_Unlock(VisRgn);
- NtGdiOffsetRgn(VisBeforeJustClient, -Window->rcWindow.left, -Window->rcWindow.top);
++ else if(VisBeforeJustClient)
+ {
- VisRgn = NULL;
++ IntGdiOffsetRgn(VisBeforeJustClient, -Window->rcWindow.left, -Window->rcWindow.top);
+ }
+ }
+ }
+ }
+
+ WvrFlags = co_WinPosDoNCCALCSize(Window, &WinPos, &NewWindowRect, &NewClientRect, valid_rects);
+
+// ERR("co_WinPosDoNCCALCSize returned 0x%x\n valid dest: %d %d %d %d\n valid src : %d %d %d %d\n", WvrFlags,
+// valid_rects[0].left,valid_rects[0].top,valid_rects[0].right,valid_rects[0].bottom,
+// valid_rects[1].left,valid_rects[1].top,valid_rects[1].right,valid_rects[1].bottom);
+
+ /* Validate link windows. (also take into account shell window in hwndShellWindow) */
+ if (!(WinPos.flags & SWP_NOZORDER) && WinPos.hwnd != UserGetShellWindow())
+ {
+ IntLinkHwnd(Window, WinPos.hwndInsertAfter);
+ }
+
+ OldWindowRect = Window->rcWindow;
+ OldClientRect = Window->rcClient;
+
+ if (NewClientRect.left != OldClientRect.left ||
+ NewClientRect.top != OldClientRect.top)
+ {
+ // Move child window if their parent is moved. Keep Child window relative to Parent...
+ WinPosInternalMoveWindow(Window,
+ NewClientRect.left - OldClientRect.left,
+ NewClientRect.top - OldClientRect.top);
+ }
+
+ Window->rcWindow = NewWindowRect;
+ Window->rcClient = NewClientRect;
+
+ /* erase parent when hiding or resizing child */
+ if (WinPos.flags & SWP_HIDEWINDOW)
+ {
+ /* Clear the update region */
+ co_UserRedrawWindow( Window,
+ NULL,
+ 0,
+ RDW_VALIDATE | RDW_NOFRAME | RDW_NOERASE | RDW_NOINTERNALPAINT | RDW_ALLCHILDREN);
+
+ if (Window->spwndParent == UserGetDesktopWindow())
+ co_IntShellHookNotify(HSHELL_WINDOWDESTROYED, (WPARAM)Window->head.h, 0);
+
+ Window->style &= ~WS_VISIBLE; //IntSetStyle( Window, 0, WS_VISIBLE );
+ Window->head.pti->cVisWindows--;
+ IntNotifyWinEvent(EVENT_OBJECT_HIDE, Window, OBJID_WINDOW, CHILDID_SELF, WEF_SETBYWNDPTI);
+ }
+ else if (WinPos.flags & SWP_SHOWWINDOW)
+ {
+ if (Window->spwndParent == UserGetDesktopWindow() &&
+ Window->spwndOwner == NULL &&
+ (!(Window->ExStyle & WS_EX_TOOLWINDOW) ||
+ (Window->ExStyle & WS_EX_APPWINDOW)))
+ co_IntShellHookNotify(HSHELL_WINDOWCREATED, (WPARAM)Window->head.h, 0);
+
+ Window->style |= WS_VISIBLE; //IntSetStyle( Window, WS_VISIBLE, 0 );
+ Window->head.pti->cVisWindows++;
+ IntNotifyWinEvent(EVENT_OBJECT_SHOW, Window, OBJID_WINDOW, CHILDID_SELF, WEF_SETBYWNDPTI);
+ }
+
+ if (Window->hrgnUpdate != NULL && Window->hrgnUpdate != HRGN_WINDOW)
+ {
+ NtGdiOffsetRgn(Window->hrgnUpdate,
+ NewWindowRect.left - OldWindowRect.left,
+ NewWindowRect.top - OldWindowRect.top);
+ }
+
+ DceResetActiveDCEs(Window); // For WS_VISIBLE changes.
+
+ if (!(WinPos.flags & SWP_NOREDRAW))
+ {
+ /* Determine the new visible region */
+ VisAfter = VIS_ComputeVisibleRegion(Window, FALSE, FALSE,
+ (Window->style & WS_CLIPSIBLINGS) ? TRUE : FALSE);
- (VisRgn = (PROSRGNDATA)RGNOBJAPI_Lock(VisAfter, NULL)) &&
- REGION_Complexity(VisRgn) == NULLREGION )
+
+ if ( VisAfter != NULL &&
- RGNOBJAPI_Unlock(VisRgn);
- GreDeleteObject(VisAfter);
++ REGION_Complexity(VisAfter) == NULLREGION )
+ {
- else if(VisRgn)
++ REGION_Delete(VisAfter);
+ VisAfter = NULL;
+ }
- RGNOBJAPI_Unlock(VisRgn);
- NtGdiOffsetRgn(VisAfter, -Window->rcWindow.left, -Window->rcWindow.top);
++ else if(VisAfter)
+ {
- CopyRgn = IntSysCreateRectRgn(0, 0, 0, 0);
++ IntGdiOffsetRgn(VisAfter, -Window->rcWindow.left, -Window->rcWindow.top);
+ }
+
+ /*
+ * Determine which pixels can be copied from the old window position
+ * to the new. Those pixels must be visible in both the old and new
+ * position. Also, check the class style to see if the windows of this
+ * class need to be completely repainted on (horizontal/vertical) size
+ * change.
+ */
+ if ( VisBefore != NULL &&
+ VisAfter != NULL &&
+ !(WinPos.flags & SWP_NOCOPYBITS) &&
+ ((WinPos.flags & SWP_NOSIZE) || !(WvrFlags & WVR_REDRAW)) &&
+ !(Window->ExStyle & WS_EX_TRANSPARENT) )
+ {
+
+ /*
+ * If this is (also) a window resize, the whole nonclient area
+ * needs to be repainted. So we limit the copy to the client area,
+ * 'cause there is no use in copying it (would possibly cause
+ * "flashing" too). However, if the copy region is already empty,
+ * we don't have to crop (can't take anything away from an empty
+ * region...)
+ */
+
- RgnType = NtGdiCombineRgn(CopyRgn, VisAfter, VisBefore, RGN_AND);
++ CopyRgn = IntSysCreateRectpRgn(0, 0, 0, 0);
+ if (WinPos.flags & SWP_NOSIZE)
- RgnType = NtGdiCombineRgn(CopyRgn, VisAfter, VisBeforeJustClient, RGN_AND);
- GreDeleteObject(VisBeforeJustClient);
++ RgnType = IntGdiCombineRgn(CopyRgn, VisAfter, VisBefore, RGN_AND);
+ else if (VisBeforeJustClient != NULL)
+ {
- NtGdiOffsetRgn(CopyRgn, NewWindowRect.left, NewWindowRect.top);
- NtGdiCombineRgn(CopyRgn, CopyRgn, Window->hrgnUpdate, RGN_DIFF);
- NtGdiOffsetRgn(CopyRgn, -NewWindowRect.left, -NewWindowRect.top);
++ RgnType = IntGdiCombineRgn(CopyRgn, VisAfter, VisBeforeJustClient, RGN_AND);
++ REGION_Delete(VisBeforeJustClient);
+ }
+
+ /* No use in copying bits which are in the update region. */
+ if (Window->hrgnUpdate != NULL)
+ {
- if ( (VisRgn = (PROSRGNDATA)RGNOBJAPI_Lock(CopyRgn, NULL)) &&
- REGION_GetRgnBox(VisRgn, &CopyRect) == NULLREGION)
++ PREGION RgnUpdate = RGNOBJAPI_Lock(Window->hrgnUpdate, NULL);
++ if (RgnUpdate)
++ {
++ IntGdiOffsetRgn(CopyRgn, NewWindowRect.left, NewWindowRect.top);
++ IntGdiCombineRgn(CopyRgn, CopyRgn, RgnUpdate, RGN_DIFF);
++ IntGdiOffsetRgn(CopyRgn, -NewWindowRect.left, -NewWindowRect.top);
++ RGNOBJAPI_Unlock(RgnUpdate);
++ }
+ }
+
+ /*
+ * Now, get the bounding box of the copy region. If it's empty
+ * there's nothing to copy. Also, it's no use copying bits onto
+ * themselves.
+ */
- RGNOBJAPI_Unlock(VisRgn);
- GreDeleteObject(CopyRgn);
++ if (REGION_GetRgnBox(CopyRgn, &CopyRect) == NULLREGION)
+ {
+ /* Nothing to copy, clean up */
- if(VisRgn)
- {
- RGNOBJAPI_Unlock(VisRgn);
- }
++ REGION_Delete(CopyRgn);
+ CopyRgn = NULL;
+ }
+ else if (OldWindowRect.left != NewWindowRect.left ||
+ OldWindowRect.top != NewWindowRect.top)
+ {
- NtGdiOffsetRgn(CopyRgn, NewWindowRect.left, NewWindowRect.top);
++ HRGN DcRgn = NtGdiCreateRectRgn(0, 0, 0, 0);
++ PREGION DcRgnObj = RGNOBJAPI_Lock(DcRgn, NULL);
+
+ /*
+ * Small trick here: there is no function to bitblt a region. So
+ * we set the region as the clipping region, take the bounding box
+ * of the region and bitblt that. Since nothing outside the clipping
+ * region is copied, this has the effect of bitblt'ing the region.
+ *
+ * Since NtUserGetDCEx takes ownership of the clip region, we need
+ * to create a copy of CopyRgn and pass that. We need CopyRgn later
+ */
- CopyRgn,
++ IntGdiCombineRgn(DcRgnObj, CopyRgn, NULL, RGN_COPY);
++ IntGdiOffsetRgn(DcRgnObj, NewWindowRect.left, NewWindowRect.top);
++ RGNOBJAPI_Unlock(DcRgnObj);
+ Dc = UserGetDCEx( Window,
- NtGdiOffsetRgn(CopyRgn, -NewWindowRect.left, -NewWindowRect.top);
- }
- else if(VisRgn)
- {
- RGNOBJAPI_Unlock(VisRgn);
++ DcRgn,
+ DCX_WINDOW|DCX_CACHE|DCX_INTERSECTRGN|DCX_CLIPSIBLINGS|DCX_KEEPCLIPRGN);
+ NtGdiBitBlt( Dc,
+ CopyRect.left, CopyRect.top,
+ CopyRect.right - CopyRect.left,
+ CopyRect.bottom - CopyRect.top,
+ Dc,
+ CopyRect.left + (OldWindowRect.left - NewWindowRect.left),
+ CopyRect.top + (OldWindowRect.top - NewWindowRect.top),
+ SRCCOPY,
+ 0,
+ 0);
+
+ UserReleaseDC(Window, Dc, FALSE);
+ IntValidateParent(Window, CopyRgn, FALSE);
- DirtyRgn = IntSysCreateRectRgn(0, 0, 0, 0);
- if (CopyRgn != NULL)
- {
- RgnType = NtGdiCombineRgn(DirtyRgn, VisAfter, CopyRgn, RGN_DIFF);
- }
- else
- {
- RgnType = NtGdiCombineRgn(DirtyRgn, VisAfter, 0, RGN_COPY);
- }
- if (RgnType != ERROR && RgnType != NULLREGION)
++ GreDeleteObject(DcRgn);
+ }
+ }
+ else
+ {
+ CopyRgn = NULL;
+ }
+
+ /* We need to redraw what wasn't visible before */
+ if (VisAfter != NULL)
+ {
- /* old code
- NtGdiOffsetRgn(DirtyRgn, Window->rcWindow.left, Window->rcWindow.top);
- IntInvalidateWindows( Window,
- DirtyRgn,
- RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN);
- }
- GreDeleteObject(DirtyRgn);
- */
-
- PWND Parent = Window->spwndParent;
-
- NtGdiOffsetRgn( DirtyRgn,
- Window->rcWindow.left,
- Window->rcWindow.top);
- if ( (Window->style & WS_CHILD) &&
- (Parent) &&
- !(Parent->style & WS_CLIPCHILDREN))
- {
- IntInvalidateWindows( Parent,
- DirtyRgn,
- RDW_ERASE | RDW_INVALIDATE);
- co_IntPaintWindows(Parent, RDW_ERASENOW, FALSE);
- }
- else
- {
++ PREGION DirtyRgn = IntSysCreateRectpRgn(0, 0, 0, 0);
++ if (DirtyRgn)
+ {
- RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN);
- }
++ if (CopyRgn != NULL)
++ {
++ RgnType = IntGdiCombineRgn(DirtyRgn, VisAfter, CopyRgn, RGN_DIFF);
++ }
++ else
++ {
++ RgnType = IntGdiCombineRgn(DirtyRgn, VisAfter, 0, RGN_COPY);
++ }
++ if (RgnType != ERROR && RgnType != NULLREGION)
++ {
++ /* old code
++ NtGdiOffsetRgn(DirtyRgn, Window->rcWindow.left, Window->rcWindow.top);
+ IntInvalidateWindows( Window,
+ DirtyRgn,
- GreDeleteObject(DirtyRgn);
++ RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN);
++ }
++ GreDeleteObject(DirtyRgn);
++ */
++
++ PWND Parent = Window->spwndParent;
++
++ IntGdiOffsetRgn( DirtyRgn,
++ Window->rcWindow.left,
++ Window->rcWindow.top);
++ if ( (Window->style & WS_CHILD) &&
++ (Parent) &&
++ !(Parent->style & WS_CLIPCHILDREN))
++ {
++ IntInvalidateWindows( Parent,
++ DirtyRgn,
++ RDW_ERASE | RDW_INVALIDATE);
++ co_IntPaintWindows(Parent, RDW_ERASENOW, FALSE);
++ }
++ else
++ {
++ IntInvalidateWindows( Window,
++ DirtyRgn,
++ RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN);
++ }
++ }
++ REGION_Delete(DirtyRgn);
+ }
- GreDeleteObject(CopyRgn);
+ }
+
+ if (CopyRgn != NULL)
+ {
- ExposedRgn = IntSysCreateRectRgn(0, 0, 0, 0);
- RgnType = NtGdiCombineRgn(ExposedRgn, VisBefore, NULL, RGN_COPY);
- NtGdiOffsetRgn( ExposedRgn,
- OldWindowRect.left - NewWindowRect.left,
- OldWindowRect.top - NewWindowRect.top);
++ REGION_Delete(CopyRgn);
+ }
+
+ /* Expose what was covered before but not covered anymore */
+ if (VisBefore != NULL)
+ {
- if (VisAfter != NULL)
- RgnType = NtGdiCombineRgn(ExposedRgn, ExposedRgn, VisAfter, RGN_DIFF);
++ PREGION ExposedRgn = IntSysCreateRectpRgn(0, 0, 0, 0);
++ if (ExposedRgn)
++ {
++ RgnType = IntGdiCombineRgn(ExposedRgn, VisBefore, NULL, RGN_COPY);
++ IntGdiOffsetRgn( ExposedRgn,
++ OldWindowRect.left - NewWindowRect.left,
++ OldWindowRect.top - NewWindowRect.top);
+
- if (RgnType != ERROR && RgnType != NULLREGION)
- {
- co_VIS_WindowLayoutChanged(Window, ExposedRgn);
++ if (VisAfter != NULL)
++ RgnType = IntGdiCombineRgn(ExposedRgn, ExposedRgn, VisAfter, RGN_DIFF);
+
- GreDeleteObject(ExposedRgn);
- GreDeleteObject(VisBefore);
++ if (RgnType != ERROR && RgnType != NULLREGION)
++ {
++ co_VIS_WindowLayoutChanged(Window, ExposedRgn);
++ }
++ REGION_Delete(ExposedRgn);
+ }
- GreDeleteObject(VisAfter);
++ REGION_Delete(VisBefore);
+ }
+
+ if (VisAfter != NULL)
+ {
- HRGN hrgnCopy;
++ REGION_Delete(VisAfter);
+ }
+ }
+
+ if (!(WinPos.flags & (SWP_NOACTIVATE|SWP_HIDEWINDOW)))
+ {
+ if ((Window->style & (WS_CHILD | WS_POPUP)) == WS_CHILD)
+ {
+ co_IntSendMessageNoWait(WinPos.hwnd, WM_CHILDACTIVATE, 0, 0);
+ }
+ else
+ {
+ //ERR("SetWindowPos Set FG Window!\n");
+ if (Window->state & WNDS_BEINGACTIVATED) // Inside SAW?
+ co_IntSetActiveWindow(Window, FALSE, TRUE, FALSE); // Fixes Api AttachThreadInput tests.
+ else
+ co_IntSetForegroundWindow(Window); // Fixes SW_HIDE issues. Wine win test_SetActiveWindow & test_SetForegroundWindow.
+ }
+ }
+
+ /* And last, send the WM_WINDOWPOSCHANGED message */
+
+ TRACE("\tstatus flags = %04x\n", WinPos.flags & SWP_AGG_STATUSFLAGS);
+
+ if ((WinPos.flags & SWP_AGG_STATUSFLAGS) != SWP_AGG_NOPOSCHANGE)
+ {
+ /* WM_WINDOWPOSCHANGED is sent even if SWP_NOSENDCHANGING is set
+ and always contains final window position.
+ */
+ WinPos.x = NewWindowRect.left;
+ WinPos.y = NewWindowRect.top;
+ WinPos.cx = NewWindowRect.right - NewWindowRect.left;
+ WinPos.cy = NewWindowRect.bottom - NewWindowRect.top;
+ co_IntSendMessageNoWait(WinPos.hwnd, WM_WINDOWPOSCHANGED, 0, (LPARAM) &WinPos);
+ }
+
+ if ( WinPos.flags & SWP_FRAMECHANGED || WinPos.flags & SWP_STATECHANGED ||
+ !(WinPos.flags & SWP_NOCLIENTSIZE) || !(WinPos.flags & SWP_NOCLIENTMOVE) )
+ {
+ PWND pWnd = ValidateHwndNoErr(WinPos.hwnd);
+ if (pWnd)
+ IntNotifyWinEvent(EVENT_OBJECT_LOCATIONCHANGE, pWnd, OBJID_WINDOW, CHILDID_SELF, WEF_SETBYWNDPTI);
+ }
+
+ if(bPointerInWindow != IntPtInWindow(Window, gpsi->ptCursor.x, gpsi->ptCursor.y))
+ {
+ /* Generate mouse move message */
+ MSG msg;
+ msg.message = WM_MOUSEMOVE;
+ msg.wParam = UserGetMouseButtonsState();
+ msg.lParam = MAKELPARAM(gpsi->ptCursor.x, gpsi->ptCursor.y);
+ msg.pt = gpsi->ptCursor;
+ co_MsqInsertMouseMessage(&msg, 0, 0, TRUE);
+ }
+
+ return TRUE;
+}
+
+LRESULT FASTCALL
+co_WinPosGetNonClientSize(PWND Window, RECT* WindowRect, RECT* ClientRect)
+{
+ LRESULT Result;
+
+ ASSERT_REFS_CO(Window);
+
+ *ClientRect = *WindowRect;
+ Result = co_IntSendMessageNoWait(Window->head.h, WM_NCCALCSIZE, FALSE, (LPARAM) ClientRect);
+
+ FixClientRect(ClientRect, WindowRect);
+
+ return Result;
+}
+
+void FASTCALL
+co_WinPosSendSizeMove(PWND Wnd)
+{
+ RECTL Rect;
+ LPARAM lParam;
+ WPARAM wParam = SIZE_RESTORED;
+
+ IntGetClientRect(Wnd, &Rect);
+ lParam = MAKELONG(Rect.right-Rect.left, Rect.bottom-Rect.top);
+
+ Wnd->state &= ~WNDS_SENDSIZEMOVEMSGS;
+
+ if (Wnd->style & WS_MAXIMIZE)
+ {
+ wParam = SIZE_MAXIMIZED;
+ }
+ else if (Wnd->style & WS_MINIMIZE)
+ {
+ wParam = SIZE_MINIMIZED;
+ lParam = 0;
+ }
+
+ co_IntSendMessageNoWait(UserHMGetHandle(Wnd), WM_SIZE, wParam, lParam);
+
+ if (Wnd->spwndParent == UserGetDesktopWindow()) // Wnd->spwndParent->fnid == FNID_DESKTOP )
+ lParam = MAKELONG(Wnd->rcClient.left, Wnd->rcClient.top);
+ else
+ lParam = MAKELONG(Wnd->rcClient.left-Wnd->spwndParent->rcClient.left, Wnd->rcClient.top-Wnd->spwndParent->rcClient.top);
+
+ co_IntSendMessageNoWait(UserHMGetHandle(Wnd), WM_MOVE, 0, lParam);
+
+ IntEngWindowChanged(Wnd, WOC_RGN_CLIENT);
+}
+
+BOOLEAN FASTCALL
+co_WinPosShowWindow(PWND Wnd, INT Cmd)
+{
+ BOOLEAN WasVisible;
+ UINT Swp = 0, EventMsg = 0;
+ RECTL NewPos = {0, 0, 0, 0};
+ BOOLEAN ShowFlag;
+ LONG style;
+ PWND Parent;
+ PTHREADINFO pti;
+ //HRGN VisibleRgn;
+ BOOL ShowOwned = FALSE;
+ ASSERT_REFS_CO(Wnd);
+ //ERR("co_WinPosShowWindow START\n");
+
+ pti = PsGetCurrentThreadWin32Thread();
+ WasVisible = (Wnd->style & WS_VISIBLE) != 0;
+ style = Wnd->style;
+
+ switch (Cmd)
+ {
+ case SW_HIDE:
+ {
+ if (!WasVisible)
+ {
+ //ERR("co_WinPosShowWindow Exit Bad\n");
+ return(FALSE);
+ }
+ Swp |= SWP_HIDEWINDOW | SWP_NOSIZE | SWP_NOMOVE;
+ if (Wnd != pti->MessageQueue->spwndActive)
+ Swp |= SWP_NOACTIVATE | SWP_NOZORDER;
+ break;
+ }
+
+ case SW_FORCEMINIMIZE: /* FIXME: Does not work if thread is hung. */
+ case SW_SHOWMINNOACTIVE:
+ Swp |= SWP_NOACTIVATE | SWP_NOZORDER;
+ /* Fall through. */
+ case SW_SHOWMINIMIZED:
+ Swp |= SWP_SHOWWINDOW;
+ /* Fall through. */
+ case SW_MINIMIZE:
+ {
+ Swp |= SWP_NOACTIVATE;
+ if (!(style & WS_MINIMIZE))
+ {
+ IntShowOwnedPopups(Wnd, FALSE );
+
+ // Fix wine Win test_SetFocus todo #1 & #2,
+ if (Cmd == SW_SHOWMINIMIZED)
+ {
+ //ERR("co_WinPosShowWindow Set focus 1\n");
+ if ((style & (WS_CHILD | WS_POPUP)) == WS_CHILD)
+ co_UserSetFocus(Wnd->spwndParent);
+ else
+ co_UserSetFocus(0);
+ }
+
+ Swp |= co_WinPosMinMaximize(Wnd, Cmd, &NewPos) |
+ SWP_FRAMECHANGED;
+
+ EventMsg = EVENT_SYSTEM_MINIMIZESTART;
+ }
+ else
+ {
+ if (!WasVisible)
+ {
+ Swp |= SWP_FRAMECHANGED;
+ }
+ else ////
+ {
+ //ERR("co_WinPosShowWindow Exit Good\n");
+ return TRUE;
+ }
+ Swp |= SWP_NOSIZE | SWP_NOMOVE;
+ }
+ break;
+ }
+
+ case SW_SHOWMAXIMIZED:
+ {
+ Swp |= SWP_SHOWWINDOW;
+ if (!(style & WS_MAXIMIZE))
+ {
+ ShowOwned = TRUE;
+
+ Swp |= co_WinPosMinMaximize(Wnd, SW_MAXIMIZE, &NewPos) |
+ SWP_FRAMECHANGED;
+
+ EventMsg = EVENT_SYSTEM_MINIMIZEEND;
+ }
+ else
+ {
+ if (!WasVisible)
+ {
+ Swp |= SWP_FRAMECHANGED;
+ }
+ else ////
+ {
+ //ERR("co_WinPosShowWindow Exit Good 1\n");
+ return TRUE;
+ }
+ Swp |= SWP_NOSIZE | SWP_NOMOVE;
+ }
+ break;
+ }
+
+ case SW_SHOWNA:
+ Swp |= SWP_NOACTIVATE | SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE;
+ if (style & WS_CHILD && !(Wnd->ExStyle & WS_EX_MDICHILD)) Swp |= SWP_NOZORDER;
+ break;
+ case SW_SHOW:
+ if (WasVisible) return(TRUE); // Nothing to do!
+ Swp |= SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE;
+ /* Don't activate the topmost window. */
+ if (style & WS_CHILD && !(Wnd->ExStyle & WS_EX_MDICHILD)) Swp |= SWP_NOACTIVATE | SWP_NOZORDER;
+ break;
+
+ case SW_SHOWNOACTIVATE:
+ Swp |= SWP_NOACTIVATE | SWP_NOZORDER;
+ /* Fall through. */
+ case SW_SHOWNORMAL:
+ case SW_SHOWDEFAULT:
+ case SW_RESTORE:
+ if (!WasVisible) Swp |= SWP_SHOWWINDOW;
+ if (style & (WS_MINIMIZE | WS_MAXIMIZE))
+ {
+ Swp |= co_WinPosMinMaximize(Wnd, Cmd, &NewPos) |
+ SWP_FRAMECHANGED;
+
+ if (style & WS_MINIMIZE) EventMsg = EVENT_SYSTEM_MINIMIZEEND;
+ }
+ else
+ {
+ if (!WasVisible)
+ {
+ Swp |= SWP_FRAMECHANGED;
+ }
+ else ////
+ {
+ //ERR("co_WinPosShowWindow Exit Good 3\n");
+ return TRUE;
+ }
+ Swp |= SWP_NOSIZE | SWP_NOMOVE;
+ }
+ if ( style & WS_CHILD &&
+ !(Wnd->ExStyle & WS_EX_MDICHILD) &&
+ !(Swp & SWP_STATECHANGED))
+ Swp |= SWP_NOACTIVATE | SWP_NOZORDER;
+ break;
+
+ default:
+ //ERR("co_WinPosShowWindow Exit Good 4\n");
+ return WasVisible;
+ }
+
+ ShowFlag = (Cmd != SW_HIDE);
+
+ if ((ShowFlag != WasVisible || Cmd == SW_SHOWNA) && Cmd != SW_SHOWMAXIMIZED && !(Swp & SWP_STATECHANGED))
+ {
+ co_IntSendMessageNoWait(Wnd->head.h, WM_SHOWWINDOW, ShowFlag, 0);
+ if (!(Wnd->state2 & WNDS2_WIN31COMPAT))
+ co_IntSendMessageNoWait(Wnd->head.h, WM_SETVISIBLE, ShowFlag, 0);
+ if (!VerifyWnd(Wnd)) return WasVisible;
+ }
+
+ /* We can't activate a child window */
+ if ((Wnd->style & WS_CHILD) &&
+ !(Wnd->ExStyle & WS_EX_MDICHILD) &&
+ Cmd != SW_SHOWNA)
+ {
+ //ERR("SWP Child No active and ZOrder\n");
+ Swp |= SWP_NOACTIVATE | SWP_NOZORDER;
+ }
+
+#if 0 // Explorer issues with common controls? Someone does not know how CS_SAVEBITS works.
+ // Breaks startup and shutdown active window...
+ if ((Wnd->style & (WS_POPUP|WS_CHILD)) != WS_CHILD &&
+ Wnd->pcls->style & CS_SAVEBITS &&
+ ((Cmd == SW_SHOW) || (Cmd == SW_NORMAL)))
+ {
+ ERR("WinPosShowWindow Set active\n");
+ UserSetActiveWindow(Wnd);
+ Swp |= SWP_NOACTIVATE | SWP_NOZORDER;
+ }
+#endif
+
+ if (IsChildVisible(Wnd) || Swp & SWP_STATECHANGED)
+ {
+ TRACE("Child is Vis %s or State changed %s. ShowFlag %s\n",
+ (IsChildVisible(Wnd) ? "TRUE" : "FALSE"), (Swp & SWP_STATECHANGED ? "TRUE" : "FALSE"),
+ (ShowFlag ? "TRUE" : "FALSE"));
+ co_WinPosSetWindowPos( Wnd,
+ 0 != (Wnd->ExStyle & WS_EX_TOPMOST) ? HWND_TOPMOST : HWND_TOP,
+ NewPos.left,
+ NewPos.top,
+ NewPos.right, //NewPos.right - NewPos.left,
+ NewPos.bottom, //NewPos.bottom - NewPos.top,
+ LOWORD(Swp));
+ }
+ else
+ {
+ TRACE("Parent Vis?\n");
+ /* if parent is not visible simply toggle WS_VISIBLE and return */
+ if (ShowFlag) IntSetStyle( Wnd, WS_VISIBLE, 0 );
+ else IntSetStyle( Wnd, 0, WS_VISIBLE );
+ }
+
+ if ( EventMsg ) IntNotifyWinEvent(EventMsg, Wnd, OBJID_WINDOW, CHILDID_SELF, WEF_SETBYWNDPTI);
+
+ if ( ShowOwned ) IntShowOwnedPopups(Wnd, TRUE );
+
+ if ((Cmd == SW_HIDE) || (Cmd == SW_MINIMIZE))
+ {
+ if ( Wnd == pti->MessageQueue->spwndActive && pti->MessageQueue == IntGetFocusMessageQueue() )
+ {
+ if ( Wnd->spwndParent == UserGetDesktopWindow())
+ {
+ if(!ActivateOtherWindowMin(Wnd))
+ co_WinPosActivateOtherWindow(Wnd);
+ }
+ else
+ co_WinPosActivateOtherWindow(Wnd);
+ }
+
+ /* Revert focus to parent */
+ if (Wnd == pti->MessageQueue->spwndFocus)
+ {
+ Parent = Wnd->spwndParent;
+ if (Wnd->spwndParent == UserGetDesktopWindow()) Parent = 0;
+ co_UserSetFocus(Parent);
+ }
+ }
+
+ /* FIXME: Check for window destruction. */
+
+ if ((Wnd->state & WNDS_SENDSIZEMOVEMSGS) &&
+ !(Wnd->state2 & WNDS2_INDESTROY))
+ {
+ co_WinPosSendSizeMove(Wnd);
+ }
+
+ /* if previous state was minimized Windows sets focus to the window */
+ if (style & WS_MINIMIZE)
+ {
+ co_UserSetFocus(Wnd);
+ // Fix wine Win test_SetFocus todo #3,
+ if (!(style & WS_CHILD)) co_IntSendMessageNoWait(UserHMGetHandle(Wnd), WM_ACTIVATE, WA_ACTIVE, 0);
+ }
+ //ERR("co_WinPosShowWindow EXIT\n");
+ return(WasVisible);
+}
+
+static
+PWND FASTCALL
+co_WinPosSearchChildren(
+ PWND ScopeWin,
+ POINT *Point,
+ USHORT *HitTest,
+ BOOL Ignore
+ )
+{
+ PWND pwndChild;
+ HWND *List, *phWnd;
+
+ if (!(ScopeWin->style & WS_VISIBLE))
+ {
+ return NULL;
+ }
+
+ if (!Ignore && (ScopeWin->style & WS_DISABLED))
+ {
+ return NULL;
+ }
+
+ if (!IntPtInWindow(ScopeWin, Point->x, Point->y))
+ {
+ return NULL;
+ }
+
+ UserReferenceObject(ScopeWin);
+
+ if ( RECTL_bPointInRect(&ScopeWin->rcClient, Point->x, Point->y) )
+ {
+ List = IntWinListChildren(ScopeWin);
+ if(List)
+ {
+ for (phWnd = List; *phWnd; ++phWnd)
+ {
+ if (!(pwndChild = ValidateHwndNoErr(*phWnd)))
+ {
+ continue;
+ }
+
+ pwndChild = co_WinPosSearchChildren(pwndChild, Point, HitTest, Ignore);
+
+ if(pwndChild != NULL)
+ {
+ /* We found a window. Don't send any more WM_NCHITTEST messages */
+ ExFreePoolWithTag(List, USERTAG_WINDOWLIST);
+ UserDereferenceObject(ScopeWin);
+ return pwndChild;
+ }
+ }
+ ExFreePoolWithTag(List, USERTAG_WINDOWLIST);
+ }
+ }
+
+ if (ScopeWin->head.pti == PsGetCurrentThreadWin32Thread())
+ {
+ *HitTest = (USHORT)co_IntSendMessage(ScopeWin->head.h, WM_NCHITTEST, 0,
+ MAKELONG(Point->x, Point->y));
+ if ((*HitTest) == (USHORT)HTTRANSPARENT)
+ {
+ UserDereferenceObject(ScopeWin);
+ return NULL;
+ }
+ }
+ else
+ *HitTest = HTCLIENT;
+
+ return ScopeWin;
+}
+
+PWND FASTCALL
+co_WinPosWindowFromPoint(PWND ScopeWin, POINT *WinPoint, USHORT* HitTest, BOOL Ignore)
+{
+ PWND Window;
+ POINT Point = *WinPoint;
+ USER_REFERENCE_ENTRY Ref;
+
+ if( ScopeWin == NULL )
+ {
+ ScopeWin = UserGetDesktopWindow();
+ if(ScopeWin == NULL)
+ return NULL;
+ }
+
+ *HitTest = HTNOWHERE;
+
+ ASSERT_REFS_CO(ScopeWin);
+ UserRefObjectCo(ScopeWin, &Ref);
+
+ Window = co_WinPosSearchChildren(ScopeWin, &Point, HitTest, Ignore);
+
+ UserDerefObjectCo(ScopeWin);
+ if (Window)
+ ASSERT_REFS_CO(Window);
+ ASSERT_REFS_CO(ScopeWin);
+
+ return Window;
+}
+
+PWND FASTCALL
+IntRealChildWindowFromPoint(PWND Parent, LONG x, LONG y)
+{
+ POINTL Pt;
+ HWND *List, *phWnd;
+ PWND pwndHit = NULL;
+
+ Pt.x = x;
+ Pt.y = y;
+
+ if (Parent != UserGetDesktopWindow())
+ {
+ Pt.x += Parent->rcClient.left;
+ Pt.y += Parent->rcClient.top;
+ }
+
+ if (!IntPtInWindow(Parent, Pt.x, Pt.y)) return NULL;
+
+ if ((List = IntWinListChildren(Parent)))
+ {
+ for (phWnd = List; *phWnd; phWnd++)
+ {
+ PWND Child;
+ if ((Child = ValidateHwndNoErr(*phWnd)))
+ {
+ if ( Child->style & WS_VISIBLE && IntPtInWindow(Child, Pt.x, Pt.y) )
+ {
+ if ( Child->pcls->atomClassName != gpsi->atomSysClass[ICLS_BUTTON] ||
+ (Child->style & BS_TYPEMASK) != BS_GROUPBOX )
+ {
+ ExFreePoolWithTag(List, USERTAG_WINDOWLIST);
+ return Child;
+ }
+ pwndHit = Child;
+ }
+ }
+ }
+ ExFreePoolWithTag(List, USERTAG_WINDOWLIST);
+ }
+ return pwndHit ? pwndHit : Parent;
+}
+
+PWND APIENTRY
+IntChildWindowFromPointEx(PWND Parent, LONG x, LONG y, UINT uiFlags)
+{
+ POINTL Pt;
+ HWND *List, *phWnd;
+ PWND pwndHit = NULL;
+
+ Pt.x = x;
+ Pt.y = y;
+
+ if (Parent != UserGetDesktopWindow())
+ {
+ if (Parent->ExStyle & WS_EX_LAYOUTRTL)
+ Pt.x = Parent->rcClient.right - Pt.x;
+ else
+ Pt.x += Parent->rcClient.left;
+ Pt.y += Parent->rcClient.top;
+ }
+
+ if (!IntPtInWindow(Parent, Pt.x, Pt.y)) return NULL;
+
+ if ((List = IntWinListChildren(Parent)))
+ {
+ for (phWnd = List; *phWnd; phWnd++)
+ {
+ PWND Child;
+ if ((Child = ValidateHwndNoErr(*phWnd)))
+ {
+ if (uiFlags & (CWP_SKIPINVISIBLE|CWP_SKIPDISABLED))
+ {
+ if (!(Child->style & WS_VISIBLE) && (uiFlags & CWP_SKIPINVISIBLE)) continue;
+ if ((Child->style & WS_DISABLED) && (uiFlags & CWP_SKIPDISABLED)) continue;
+ }
+
+ if (uiFlags & CWP_SKIPTRANSPARENT)
+ {
+ if (Child->ExStyle & WS_EX_TRANSPARENT) continue;
+ }
+
+ if (IntPtInWindow(Child, Pt.x, Pt.y))
+ {
+ pwndHit = Child;
+ break;
+ }
+ }
+ }
+ ExFreePoolWithTag(List, USERTAG_WINDOWLIST);
+ }
+ return pwndHit ? pwndHit : Parent;
+}
+
+HDWP
+FASTCALL
+IntDeferWindowPos( HDWP hdwp,
+ HWND hwnd,
+ HWND hwndAfter,
+ INT x,
+ INT y,
+ INT cx,
+ INT cy,
+ UINT flags )
+{
+ PSMWP pDWP;
+ int i;
+ HDWP retvalue = hdwp;
+
+ TRACE("hdwp %p, hwnd %p, after %p, %d,%d (%dx%d), flags %08x\n",
+ hdwp, hwnd, hwndAfter, x, y, cx, cy, flags);
+
+ if (flags & ~(SWP_NOSIZE | SWP_NOMOVE |
+ SWP_NOZORDER | SWP_NOREDRAW |
+ SWP_NOACTIVATE | SWP_NOCOPYBITS |
+ SWP_NOOWNERZORDER|SWP_SHOWWINDOW |
+ SWP_HIDEWINDOW | SWP_FRAMECHANGED))
+ {
+ EngSetLastError(ERROR_INVALID_PARAMETER);
+ return NULL;
+ }
+
+ if (!(pDWP = (PSMWP)UserGetObject(gHandleTable, hdwp, TYPE_SETWINDOWPOS)))
+ {
+ EngSetLastError(ERROR_INVALID_DWP_HANDLE);
+ return NULL;
+ }
+
+ for (i = 0; i < pDWP->ccvr; i++)
+ {
+ if (pDWP->acvr[i].pos.hwnd == hwnd)
+ {
+ /* Merge with the other changes */
+ if (!(flags & SWP_NOZORDER))
+ {
+ pDWP->acvr[i].pos.hwndInsertAfter = hwndAfter;
+ }
+ if (!(flags & SWP_NOMOVE))
+ {
+ pDWP->acvr[i].pos.x = x;
+ pDWP->acvr[i].pos.y = y;
+ }
+ if (!(flags & SWP_NOSIZE))
+ {
+ pDWP->acvr[i].pos.cx = cx;
+ pDWP->acvr[i].pos.cy = cy;
+ }
+ pDWP->acvr[i].pos.flags &= flags | ~(SWP_NOSIZE | SWP_NOMOVE |
+ SWP_NOZORDER | SWP_NOREDRAW |
+ SWP_NOACTIVATE | SWP_NOCOPYBITS|
+ SWP_NOOWNERZORDER);
+ pDWP->acvr[i].pos.flags |= flags & (SWP_SHOWWINDOW | SWP_HIDEWINDOW |
+ SWP_FRAMECHANGED);
+ goto END;
+ }
+ }
+ if (pDWP->ccvr >= pDWP->ccvrAlloc)
+ {
+ PCVR newpos = ExAllocatePoolWithTag(PagedPool, pDWP->ccvrAlloc * 2 * sizeof(CVR), USERTAG_SWP);
+ if (!newpos)
+ {
+ retvalue = NULL;
+ goto END;
+ }
+ RtlZeroMemory(newpos, pDWP->ccvrAlloc * 2 * sizeof(CVR));
+ RtlCopyMemory(newpos, pDWP->acvr, pDWP->ccvrAlloc * sizeof(CVR));
+ ExFreePoolWithTag(pDWP->acvr, USERTAG_SWP);
+ pDWP->ccvrAlloc *= 2;
+ pDWP->acvr = newpos;
+ }
+ pDWP->acvr[pDWP->ccvr].pos.hwnd = hwnd;
+ pDWP->acvr[pDWP->ccvr].pos.hwndInsertAfter = hwndAfter;
+ pDWP->acvr[pDWP->ccvr].pos.x = x;
+ pDWP->acvr[pDWP->ccvr].pos.y = y;
+ pDWP->acvr[pDWP->ccvr].pos.cx = cx;
+ pDWP->acvr[pDWP->ccvr].pos.cy = cy;
+ pDWP->acvr[pDWP->ccvr].pos.flags = flags;
+ pDWP->acvr[pDWP->ccvr].hrgnClip = NULL;
+ pDWP->acvr[pDWP->ccvr].hrgnInterMonitor = NULL;
+ pDWP->ccvr++;
+END:
+ return retvalue;
+}
+
+BOOL FASTCALL IntEndDeferWindowPosEx( HDWP hdwp, BOOL sAsync )
+{
+ PSMWP pDWP;
+ PCVR winpos;
+ BOOL res = TRUE;
+ int i;
+
+ TRACE("%p\n", hdwp);
+
+ if (!(pDWP = (PSMWP)UserGetObject(gHandleTable, hdwp, TYPE_SETWINDOWPOS)))
+ {
+ EngSetLastError(ERROR_INVALID_DWP_HANDLE);
+ return FALSE;
+ }
+
+ for (i = 0, winpos = pDWP->acvr; res && i < pDWP->ccvr; i++, winpos++)
+ {
+ PWND pwnd;
+ USER_REFERENCE_ENTRY Ref;
+
+ TRACE("hwnd %p, after %p, %d,%d (%dx%d), flags %08x\n",
+ winpos->pos.hwnd, winpos->pos.hwndInsertAfter, winpos->pos.x, winpos->pos.y,
+ winpos->pos.cx, winpos->pos.cy, winpos->pos.flags);
+
+ pwnd = ValidateHwndNoErr(winpos->pos.hwnd);
+ if (!pwnd)
+ continue;
+
+ UserRefObjectCo(pwnd, &Ref);
+
+ if ( sAsync )
+ {
+ LRESULT lRes;
+ PWINDOWPOS ppos = ExAllocatePoolWithTag(PagedPool, sizeof(WINDOWPOS), USERTAG_SWP);
+ if ( ppos )
+ {
+ *ppos = winpos->pos;
+ /* Yes it's a pointer inside Win32k! */
+ lRes = co_IntSendMessageNoWait( winpos->pos.hwnd, WM_ASYNC_SETWINDOWPOS, 0, (LPARAM)ppos);
+ /* We handle this the same way as Event Hooks and Hooks. */
+ if ( !lRes )
+ {
+ ExFreePoolWithTag(ppos, USERTAG_SWP);
+ }
+ }
+ }
+ else
+ res = co_WinPosSetWindowPos( pwnd,
+ winpos->pos.hwndInsertAfter,
+ winpos->pos.x,
+ winpos->pos.y,
+ winpos->pos.cx,
+ winpos->pos.cy,
+ winpos->pos.flags);
+
+ // Hack to pass tests.... Must have some work to do so clear the error.
+ if (res && (winpos->pos.flags & (SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER)) == SWP_NOZORDER )
+ EngSetLastError(ERROR_SUCCESS);
+
+ UserDerefObjectCo(pwnd);
+ }
+ ExFreePoolWithTag(pDWP->acvr, USERTAG_SWP);
+ UserDereferenceObject(pDWP);
+ UserDeleteObject(hdwp, TYPE_SETWINDOWPOS);
+ return res;
+}
+
+/*
+ * @implemented
+ */
+HWND APIENTRY
+NtUserChildWindowFromPointEx(HWND hwndParent,
+ LONG x,
+ LONG y,
+ UINT uiFlags)
+{
+ PWND pwndParent;
+ TRACE("Enter NtUserChildWindowFromPointEx\n");
+ UserEnterExclusive();
+ if ((pwndParent = UserGetWindowObject(hwndParent)))
+ {
+ pwndParent = IntChildWindowFromPointEx(pwndParent, x, y, uiFlags);
+ }
+ UserLeave();
+ TRACE("Leave NtUserChildWindowFromPointEx\n");
+ return pwndParent ? UserHMGetHandle(pwndParent) : NULL;
+}
+
+/*
+ * @implemented
+ */
+BOOL APIENTRY
+NtUserEndDeferWindowPosEx(HDWP WinPosInfo,
+ DWORD Unknown1)
+{
+ BOOL Ret;
+ TRACE("Enter NtUserEndDeferWindowPosEx\n");
+ UserEnterExclusive();
+ Ret = IntEndDeferWindowPosEx(WinPosInfo, (BOOL)Unknown1);
+ TRACE("Leave NtUserEndDeferWindowPosEx, ret=%i\n", Ret);
+ UserLeave();
+ return Ret;
+}
+
+/*
+ * @implemented
+ */
+HDWP APIENTRY
+NtUserDeferWindowPos(HDWP WinPosInfo,
+ HWND Wnd,
+ HWND WndInsertAfter,
+ int x,
+ int y,
+ int cx,
+ int cy,
+ UINT Flags)
+{
+ PWND pWnd, pWndIA;
+ HDWP Ret = NULL;
+ UINT Tmp = ~(SWP_ASYNCWINDOWPOS|SWP_DEFERERASE|SWP_NOSENDCHANGING|SWP_NOREPOSITION|
+ SWP_NOCOPYBITS|SWP_HIDEWINDOW|SWP_SHOWWINDOW|SWP_FRAMECHANGED|
+ SWP_NOACTIVATE|SWP_NOREDRAW|SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE);
+
+ TRACE("Enter NtUserDeferWindowPos\n");
+ UserEnterExclusive();
+
+ if ( Flags & Tmp )
+ {
+ EngSetLastError(ERROR_INVALID_FLAGS);
+ goto Exit;
+ }
+
+ pWnd = UserGetWindowObject(Wnd);
+ if ( !pWnd || // FIXME:
+ pWnd == UserGetDesktopWindow() || // pWnd->fnid == FNID_DESKTOP
+ pWnd == UserGetMessageWindow() ) // pWnd->fnid == FNID_MESSAGEWND
+ {
+ goto Exit;
+ }
+
+ if ( WndInsertAfter &&
+ WndInsertAfter != HWND_BOTTOM &&
+ WndInsertAfter != HWND_TOPMOST &&
+ WndInsertAfter != HWND_NOTOPMOST )
+ {
+ pWndIA = UserGetWindowObject(WndInsertAfter);
+ if ( !pWndIA ||
+ pWndIA == UserGetDesktopWindow() ||
+ pWndIA == UserGetMessageWindow() )
+ {
+ goto Exit;
+ }
+ }
+
+ Ret = IntDeferWindowPos(WinPosInfo, Wnd, WndInsertAfter, x, y, cx, cy, Flags);
+
+Exit:
+ TRACE("Leave NtUserDeferWindowPos, ret=%p\n", Ret);
+ UserLeave();
+ return Ret;
+}
+
+/*
+ * @implemented
+ */
+DWORD APIENTRY
+NtUserGetInternalWindowPos( HWND hWnd,
+ LPRECT rectWnd,
+ LPPOINT ptIcon)
+{
+ PWND Window;
+ DWORD Ret = 0;
+ BOOL Hit = FALSE;
+ WINDOWPLACEMENT wndpl;
+
+ UserEnterShared();
+
+ if (!(Window = UserGetWindowObject(hWnd)))
+ {
+ Hit = FALSE;
+ goto Exit;
+ }
+
+ _SEH2_TRY
+ {
+ if(rectWnd)
+ {
+ ProbeForWrite(rectWnd,
+ sizeof(RECT),
+ 1);
+ }
+ if(ptIcon)
+ {
+ ProbeForWrite(ptIcon,
+ sizeof(POINT),
+ 1);
+ }
+
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ SetLastNtError(_SEH2_GetExceptionCode());
+ Hit = TRUE;
+ }
+ _SEH2_END;
+
+ wndpl.length = sizeof(WINDOWPLACEMENT);
+
+ if (IntGetWindowPlacement(Window, &wndpl) && !Hit)
+ {
+ _SEH2_TRY
+ {
+ if (rectWnd)
+ {
+ RtlCopyMemory(rectWnd, &wndpl.rcNormalPosition , sizeof(RECT));
+ }
+ if (ptIcon)
+ {
+ RtlCopyMemory(ptIcon, &wndpl.ptMinPosition, sizeof(POINT));
+ }
+
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ SetLastNtError(_SEH2_GetExceptionCode());
+ Hit = TRUE;
+ }
+ _SEH2_END;
+
+ if (!Hit) Ret = wndpl.showCmd;
+ }
+Exit:
+ UserLeave();
+ return Ret;
+}
+
+/*
+ * @implemented
+ */
+BOOL APIENTRY
+NtUserGetWindowPlacement(HWND hWnd,
+ WINDOWPLACEMENT *lpwndpl)
+{
+ PWND Wnd;
+ WINDOWPLACEMENT Safepl;
+ NTSTATUS Status;
+ DECLARE_RETURN(BOOL);
+
+ TRACE("Enter NtUserGetWindowPlacement\n");
+ UserEnterShared();
+
+ if (!(Wnd = UserGetWindowObject(hWnd)))
+ {
+ RETURN( FALSE);
+ }
+
+ Status = MmCopyFromCaller(&Safepl, lpwndpl, sizeof(WINDOWPLACEMENT));
+ if(!NT_SUCCESS(Status))
+ {
+ SetLastNtError(Status);
+ RETURN( FALSE);
+ }
+ if(Safepl.length != sizeof(WINDOWPLACEMENT))
+ {
+ RETURN( FALSE);
+ }
+
+ IntGetWindowPlacement(Wnd, &Safepl);
+
+ Status = MmCopyToCaller(lpwndpl, &Safepl, sizeof(WINDOWPLACEMENT));
+ if(!NT_SUCCESS(Status))
+ {
+ SetLastNtError(Status);
+ RETURN( FALSE);
+ }
+
+ RETURN( TRUE);
+
+CLEANUP:
+ TRACE("Leave NtUserGetWindowPlacement, ret=%i\n",_ret_);
+ UserLeave();
+ END_CLEANUP;
+}
+
+DWORD
+APIENTRY
+NtUserMinMaximize(
+ HWND hWnd,
+ UINT cmd, // Wine SW_ commands
+ BOOL Hide)
+{
+ PWND pWnd;
+
+ TRACE("Enter NtUserMinMaximize\n");
+ UserEnterExclusive();
+
+ pWnd = UserGetWindowObject(hWnd);
+ if ( !pWnd || // FIXME:
+ pWnd == UserGetDesktopWindow() || // pWnd->fnid == FNID_DESKTOP
+ pWnd == UserGetMessageWindow() ) // pWnd->fnid == FNID_MESSAGEWND
+ {
+ goto Exit;
+ }
+
+ if ( cmd > SW_MAX || pWnd->state2 & WNDS2_INDESTROY)
+ {
+ EngSetLastError(ERROR_INVALID_PARAMETER);
+ goto Exit;
+ }
+
+ cmd |= Hide ? SW_HIDE : 0;
+
+ co_WinPosShowWindow(pWnd, cmd);
+
+Exit:
+ TRACE("Leave NtUserMinMaximize\n");
+ UserLeave();
+ return 0; // Always NULL?
+}
+
+/*
+ * @implemented
+ */
+BOOL APIENTRY
+NtUserMoveWindow(
+ HWND hWnd,
+ int X,
+ int Y,
+ int nWidth,
+ int nHeight,
+ BOOL bRepaint)
+{
+ return NtUserSetWindowPos(hWnd, 0, X, Y, nWidth, nHeight,
+ (bRepaint ? SWP_NOZORDER | SWP_NOACTIVATE :
+ SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW));
+}
+
+/*
+ * @implemented
+ */
+HWND APIENTRY
+NtUserRealChildWindowFromPoint(HWND Parent,
+ LONG x,
+ LONG y)
+{
+ PWND pwndParent;
+ TRACE("Enter NtUserRealChildWindowFromPoint\n");
+ UserEnterShared();
+ if ((pwndParent = UserGetWindowObject(Parent)))
+ {
+ pwndParent = IntRealChildWindowFromPoint(pwndParent, x, y);
+ }
+ UserLeave();
+ TRACE("Leave NtUserRealChildWindowFromPoint\n");
+ return pwndParent ? UserHMGetHandle(pwndParent) : NULL;
+}
+
+/*
+ * @implemented
+ */
+BOOL APIENTRY
+NtUserSetWindowPos(
+ HWND hWnd,
+ HWND hWndInsertAfter,
+ int X,
+ int Y,
+ int cx,
+ int cy,
+ UINT uFlags)
+{
+ DECLARE_RETURN(BOOL);
+ PWND Window, pWndIA;
+ BOOL ret;
+ USER_REFERENCE_ENTRY Ref;
+
+ TRACE("Enter NtUserSetWindowPos\n");
+ UserEnterExclusive();
+
+ if (!(Window = UserGetWindowObject(hWnd)) || // FIXME:
+ Window == UserGetDesktopWindow() || // pWnd->fnid == FNID_DESKTOP
+ Window == UserGetMessageWindow() ) // pWnd->fnid == FNID_MESSAGEWND
+ {
+ ERR("NtUserSetWindowPos bad window handle!\n");
+ RETURN(FALSE);
+ }
+
+ if ( hWndInsertAfter &&
+ hWndInsertAfter != HWND_BOTTOM &&
+ hWndInsertAfter != HWND_TOPMOST &&
+ hWndInsertAfter != HWND_NOTOPMOST )
+ {
+ if (!(pWndIA = UserGetWindowObject(hWndInsertAfter)) ||
+ pWndIA == UserGetDesktopWindow() ||
+ pWndIA == UserGetMessageWindow() )
+ {
+ ERR("NtUserSetWindowPos bad insert window handle!\n");
+ RETURN(FALSE);
+ }
+ }
+
+ /* First make sure that coordinates are valid for WM_WINDOWPOSCHANGING */
+ if (!(uFlags & SWP_NOMOVE))
+ {
+ if (X < -32768) X = -32768;
+ else if (X > 32767) X = 32767;
+ if (Y < -32768) Y = -32768;
+ else if (Y > 32767) Y = 32767;
+ }
+ if (!(uFlags & SWP_NOSIZE))
+ {
+ if (cx < 0) cx = 0;
+ else if (cx > 32767) cx = 32767;
+ if (cy < 0) cy = 0;
+ else if (cy > 32767) cy = 32767;
+ }
+
+ UserRefObjectCo(Window, &Ref);
+ ret = co_WinPosSetWindowPos(Window, hWndInsertAfter, X, Y, cx, cy, uFlags);
+ UserDerefObjectCo(Window);
+
+ RETURN(ret);
+
+CLEANUP:
+ TRACE("Leave NtUserSetWindowPos, ret=%i\n",_ret_);
+ UserLeave();
+ END_CLEANUP;
+}
+
+/*
+ * @implemented
+ */
+INT APIENTRY
+NtUserSetWindowRgn(
+ HWND hWnd,
+ HRGN hRgn,
+ BOOL bRedraw)
+{
- hrgnCopy = IntSysCreateRectRgn(0, 0, 0, 0);
++ HRGN hrgnCopy = NULL;
+ PWND Window;
+ INT flags = (SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE);
+ BOOLEAN Ret = FALSE;
+ DECLARE_RETURN(INT);
+
+ TRACE("Enter NtUserSetWindowRgn\n");
+ UserEnterExclusive();
+
+ if (!(Window = UserGetWindowObject(hWnd)) || // FIXME:
+ Window == UserGetDesktopWindow() || // pWnd->fnid == FNID_DESKTOP
+ Window == UserGetMessageWindow() ) // pWnd->fnid == FNID_MESSAGEWND
+ {
+ RETURN( 0);
+ }
+
+ if (hRgn) // The region will be deleted in user32.
+ {
+ if (GreIsHandleValid(hRgn))
+ {
- else
- {
- hrgnCopy = NULL;
- }
++ hrgnCopy = NtGdiCreateRectRgn(0, 0, 0, 0);
+ /* The coordinates of a window's window region are relative to the
+ upper-left corner of the window, not the client area of the window. */
+ NtGdiCombineRgn( hrgnCopy, hRgn, 0, RGN_COPY);
+ }
+ else
+ RETURN( 0);
+ }
+
+ if (Window->hrgnClip)
+ {
+ /* Delete no longer needed region handle */
+ IntGdiSetRegionOwner(Window->hrgnClip, GDI_OBJ_HMGR_POWNED);
+ GreDeleteObject(Window->hrgnClip);
+ }
+
+ if (hrgnCopy)
+ {
+ /* Set public ownership */
+ IntGdiSetRegionOwner(hrgnCopy, GDI_OBJ_HMGR_PUBLIC);
+ }
+ Window->hrgnClip = hrgnCopy;
+
+ Ret = co_WinPosSetWindowPos(Window, HWND_TOP, 0, 0, 0, 0, bRedraw ? flags : (flags|SWP_NOREDRAW) );
+
+ RETURN( (INT)Ret);
+
+CLEANUP:
+ TRACE("Leave NtUserSetWindowRgn, ret=%i\n",_ret_);
+ UserLeave();
+ END_CLEANUP;
+}
+
+/*
+ * @implemented
+ */
+DWORD APIENTRY
+NtUserSetInternalWindowPos(
+ HWND hwnd,
+ UINT showCmd,
+ LPRECT lprect,
+ LPPOINT lppt)
+{
+ WINDOWPLACEMENT wndpl;
+ UINT flags;
+ PWND Wnd;
+ RECT rect;
+ POINT pt = {0};
+ DECLARE_RETURN(BOOL);
+ USER_REFERENCE_ENTRY Ref;
+
+ TRACE("Enter NtUserSetWindowPlacement\n");
+ UserEnterExclusive();
+
+ if (!(Wnd = UserGetWindowObject(hwnd)) || // FIXME:
+ Wnd == UserGetDesktopWindow() || // pWnd->fnid == FNID_DESKTOP
+ Wnd == UserGetMessageWindow() ) // pWnd->fnid == FNID_MESSAGEWND
+ {
+ RETURN( FALSE);
+ }
+
+ _SEH2_TRY
+ {
+ if (lppt)
+ {
+ ProbeForRead(lppt, sizeof(POINT), 1);
+ RtlCopyMemory(&pt, lppt, sizeof(POINT));
+ }
+ if (lprect)
+ {
+ ProbeForRead(lprect, sizeof(RECT), 1);
+ RtlCopyMemory(&rect, lprect, sizeof(RECT));
+ }
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ SetLastNtError(_SEH2_GetExceptionCode());
+ _SEH2_YIELD(RETURN( FALSE));
+ }
+ _SEH2_END
+
+ wndpl.length = sizeof(wndpl);
+ wndpl.showCmd = showCmd;
+ wndpl.flags = flags = 0;
+
+ if ( lppt )
+ {
+ flags |= PLACE_MIN;
+ wndpl.flags |= WPF_SETMINPOSITION;
+ wndpl.ptMinPosition = pt;
+ }
+ if ( lprect )
+ {
+ flags |= PLACE_RECT;
+ wndpl.rcNormalPosition = rect;
+ }
+
+ UserRefObjectCo(Wnd, &Ref);
+ IntSetWindowPlacement(Wnd, &wndpl, flags);
+ UserDerefObjectCo(Wnd);
+ RETURN(TRUE);
+
+CLEANUP:
+ TRACE("Leave NtUserSetWindowPlacement, ret=%i\n",_ret_);
+ UserLeave();
+ END_CLEANUP;
+}
+
+/*
+ * @implemented
+ */
+BOOL APIENTRY
+NtUserSetWindowPlacement(HWND hWnd,
+ WINDOWPLACEMENT *lpwndpl)
+{
+ PWND Wnd;
+ WINDOWPLACEMENT Safepl;
+ UINT Flags;
+ DECLARE_RETURN(BOOL);
+ USER_REFERENCE_ENTRY Ref;
+
+ TRACE("Enter NtUserSetWindowPlacement\n");
+ UserEnterExclusive();
+
+ if (!(Wnd = UserGetWindowObject(hWnd)) || // FIXME:
+ Wnd == UserGetDesktopWindow() || // pWnd->fnid == FNID_DESKTOP
+ Wnd == UserGetMessageWindow() ) // pWnd->fnid == FNID_MESSAGEWND
+ {
+ RETURN( FALSE);
+ }
+
+ _SEH2_TRY
+ {
+ ProbeForRead(lpwndpl, sizeof(WINDOWPLACEMENT), 1);
+ RtlCopyMemory(&Safepl, lpwndpl, sizeof(WINDOWPLACEMENT));
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ SetLastNtError(_SEH2_GetExceptionCode());
+ _SEH2_YIELD(RETURN( FALSE));
+ }
+ _SEH2_END
+
+ if(Safepl.length != sizeof(WINDOWPLACEMENT))
+ {
+ RETURN( FALSE);
+ }
+
+ Flags = PLACE_MAX | PLACE_RECT;
+ if (Safepl.flags & WPF_SETMINPOSITION) Flags |= PLACE_MIN;
+ UserRefObjectCo(Wnd, &Ref);
+ IntSetWindowPlacement(Wnd, &Safepl, Flags);
+ UserDerefObjectCo(Wnd);
+ RETURN(TRUE);
+
+CLEANUP:
+ TRACE("Leave NtUserSetWindowPlacement, ret=%i\n",_ret_);
+ UserLeave();
+ END_CLEANUP;
+}
+
+/*
+ * @implemented
+ */
+BOOL APIENTRY
+NtUserShowWindowAsync(HWND hWnd, LONG nCmdShow)
+{
+ PWND Window;
+ BOOL ret;
+ DECLARE_RETURN(BOOL);
+ USER_REFERENCE_ENTRY Ref;
+
+ TRACE("Enter NtUserShowWindowAsync\n");
+ UserEnterExclusive();
+
+ if (!(Window = UserGetWindowObject(hWnd)) || // FIXME:
+ Window == UserGetDesktopWindow() || // pWnd->fnid == FNID_DESKTOP
+ Window == UserGetMessageWindow() ) // pWnd->fnid == FNID_MESSAGEWND
+ {
+ RETURN(FALSE);
+ }
+
+ if ( nCmdShow > SW_MAX )
+ {
+ EngSetLastError(ERROR_INVALID_PARAMETER);
+ RETURN(FALSE);
+ }
+
+ UserRefObjectCo(Window, &Ref);
+ ret = co_IntSendMessageNoWait( hWnd, WM_ASYNC_SHOWWINDOW, nCmdShow, 0 );
+ UserDerefObjectCo(Window);
+ if (-1 == (int) ret || !ret) ret = FALSE;
+
+ RETURN(ret);
+
+CLEANUP:
+ TRACE("Leave NtUserShowWindowAsync, ret=%i\n",_ret_);
+ UserLeave();
+ END_CLEANUP;
+}
+
+/*
+ * @implemented
+ */
+BOOL APIENTRY
+NtUserShowWindow(HWND hWnd, LONG nCmdShow)
+{
+ PWND Window;
+ BOOL ret;
+ DECLARE_RETURN(BOOL);
+ USER_REFERENCE_ENTRY Ref;
+
+ TRACE("Enter NtUserShowWindow\n");
+ UserEnterExclusive();
+
+ if (!(Window = UserGetWindowObject(hWnd)) || // FIXME:
+ Window == UserGetDesktopWindow() || // pWnd->fnid == FNID_DESKTOP
+ Window == UserGetMessageWindow() ) // pWnd->fnid == FNID_MESSAGEWND
+ {
+ RETURN(FALSE);
+ }
+
+ if ( nCmdShow > SW_MAX || Window->state2 & WNDS2_INDESTROY)
+ {
+ EngSetLastError(ERROR_INVALID_PARAMETER);
+ RETURN(FALSE);
+ }
+
+ UserRefObjectCo(Window, &Ref);
+ ret = co_WinPosShowWindow(Window, nCmdShow);
+ UserDerefObjectCo(Window);
+
+ RETURN(ret);
+
+CLEANUP:
+ TRACE("Leave NtUserShowWindow, ret=%i\n",_ret_);
+ UserLeave();
+ END_CLEANUP;
+}
+
+
+/*
+ * @implemented
+ */
+HWND APIENTRY
+NtUserWindowFromPoint(LONG X, LONG Y)
+{
+ POINT pt;
+ HWND Ret;
+ PWND DesktopWindow = NULL, Window = NULL;
+ USHORT hittest;
+ DECLARE_RETURN(HWND);
+ USER_REFERENCE_ENTRY Ref;
+
+ TRACE("Enter NtUserWindowFromPoint\n");
+ UserEnterExclusive();
+
+ if ((DesktopWindow = UserGetWindowObject(IntGetDesktopWindow())))
+ {
+ //PTHREADINFO pti;
+
+ pt.x = X;
+ pt.y = Y;
+
+ // Hmm... Threads live on desktops thus we have a reference on the desktop and indirectly the desktop window.
+ // It is possible this referencing is useless, though it should not hurt...
+ UserRefObjectCo(DesktopWindow, &Ref);
+
+ //pti = PsGetCurrentThreadWin32Thread();
+ Window = co_WinPosWindowFromPoint(DesktopWindow, &pt, &hittest, FALSE);
+
+ if (Window)
+ {
+ Ret = UserHMGetHandle(Window);
+
+ RETURN( Ret);
+ }
+ }
+
+ RETURN( NULL);
+
+CLEANUP:
+ if (Window) UserDereferenceObject(Window);
+ if (DesktopWindow) UserDerefObjectCo(DesktopWindow);
+
+ TRACE("Leave NtUserWindowFromPoint, ret=%p\n", _ret_);
+ UserLeave();
+ END_CLEANUP;
+}
+
+/* EOF */