[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("svn://svn.reactos.org/reactos/trunk")]
+ [global::System.Configuration.DefaultSettingValueAttribute("svn://svn.reactos.org/trunk/reactos")]
public string SVNRoot {
get {
return ((string)(this["SVNRoot"]));
<Value Profile="(Default)">C:\Ros\current\irc\TechBot\Resources\wm.xml</Value>
</Setting>
<Setting Name="SVNRoot" Type="System.String" Scope="Application">
- <Value Profile="(Default)">svn://svn.reactos.org/reactos/trunk</Value>
+ <Value Profile="(Default)">svn://svn.reactos.org/trunk/reactos</Value>
</Setting>
</Settings>
</SettingsFile>
\ No newline at end of file
<value>C:\Ros\current\irc\TechBot\Resources\wm.xml</value>
</setting>
<setting name="SVNRoot" serializeAs="String">
- <value>svn://svn.reactos.org/reactos/trunk</value>
+ <value>svn://svn.reactos.org/trunk/reactos</value>
</setting>
</TechBot.Commands.Common.Settings>
</applicationSettings>
public const string PRIVMSG = "PRIVMSG";\r
public const string USER = "USER";\r
public const string PASS = "PASS";\r
- public const string GHOST = "NICKSERV GHOST";\r
- public const string NOTICE = "NOTICE";\r
\r
public const string RPL_NAMREPLY = "353";\r
public const string RPL_ENDOFNAMES = "366";\r
- public const string ERR_NICKNAMEINUSE = "433";\r
\r
#endregion\r
\r
\r
#region Private fields\r
private bool firstPingReceived = false;\r
- private bool awaitingGhostDeath = false;\r
private System.Text.Encoding encoding = System.Text.Encoding.UTF8;\r
private TcpClient tcpClient;\r
private NetworkStream networkStream;\r
private LineBuffer messageStream;\r
private ArrayList ircCommandEventRegistrations = new ArrayList();\r
private ArrayList channels = new ArrayList();\r
- private string reqNickname;\r
- private string curNickname;\r
- private string password;\r
#endregion\r
\r
#region Public events\r
}\r
}\r
\r
- /// <summary>\r
- /// Nickname for the bot.\r
- /// </summary>\r
- public string Nickname\r
- {\r
- get\r
- {\r
- return curNickname;\r
- }\r
- }\r
#endregion\r
\r
#region Private methods\r
firstPingReceived = true;\r
}\r
\r
- /// <summary>\r
- /// Send a PONG message when a PING message is received.\r
- /// </summary>\r
- /// <param name="message">Received IRC message.</param>\r
- private void NoticeMessageReceived(IrcMessage message)\r
- {\r
- if (awaitingGhostDeath)\r
- {\r
- string str = string.Format("\ 2{0}\ 2 has been ghosted", reqNickname);\r
- if (message.Parameters.Contains(str))\r
- {\r
- ChangeNick(reqNickname);\r
- SubmitPassword(password);\r
- awaitingGhostDeath = false;\r
- }\r
- }\r
- }\r
-\r
/// <summary>\r
/// Process RPL_NAMREPLY message.\r
/// </summary>\r
}\r
}\r
\r
- /// <summary>\r
- /// Process ERR_NICKNAMEINUSE message.\r
- /// </summary>\r
- /// <param name="message">Received IRC message.</param>\r
- private void ERR_NICKNAMEINUSEMessageReceived(IrcMessage message)\r
- {\r
- try\r
- {\r
- if (message.Parameters == null)\r
- {\r
- System.Diagnostics.Debug.WriteLine(String.Format("Message has no parameters."));\r
- return;\r
- }\r
- \r
- /* Connect with a different name */\r
- string[] parameters = message.Parameters.Split(new char[] { ' ' });\r
- string nickname = parameters[1];\r
- ChangeNick(nickname + "__");\r
- }\r
- catch (Exception ex)\r
- {\r
- System.Diagnostics.Debug.WriteLine(String.Format("Ex. {0}", ex));\r
- }\r
- }\r
-\r
#endregion\r
\r
/// <summary>\r
}\r
/* Install PING message handler */\r
MonitorCommand(IRC.PING, new MessageReceivedHandler(PingMessageReceived));\r
- /* Install NOTICE message handler */\r
- MonitorCommand(IRC.NOTICE, new MessageReceivedHandler(NoticeMessageReceived));\r
/* Install RPL_NAMREPLY message handler */\r
MonitorCommand(IRC.RPL_NAMREPLY, new MessageReceivedHandler(RPL_NAMREPLYMessageReceived));\r
/* Install RPL_ENDOFNAMES message handler */\r
MonitorCommand(IRC.RPL_ENDOFNAMES, new MessageReceivedHandler(RPL_ENDOFNAMESMessageReceived));\r
- /* Install ERR_NICKNAMEINUSE message handler */\r
- MonitorCommand(IRC.ERR_NICKNAMEINUSE, new MessageReceivedHandler(ERR_NICKNAMEINUSEMessageReceived));\r
/* Start receiving data */\r
Receive();\r
}\r
}\r
else\r
{\r
+ \r
+\r
connected = false;\r
tcpClient.Close();\r
tcpClient = null;\r
if (nickname == null)\r
throw new ArgumentNullException("nickname", "Nickname cannot be null.");\r
\r
- Console.WriteLine("Changing nick to {0}\n", nickname);\r
- curNickname = nickname;\r
-\r
/* NICK <nickname> [ <hopcount> ] */\r
SendMessage(new IrcMessage(IRC.NICK, nickname));\r
}\r
\r
- /// <summary>\r
- /// Ghost nickname.\r
- /// </summary>\r
- /// <param name="nickname">Nickname.</param>\r
- public void GhostNick(string nickname,\r
- string password)\r
- {\r
- if (nickname == null)\r
- throw new ArgumentNullException("nickname", "Nickname cannot be null.");\r
-\r
- if (password == null)\r
- throw new ArgumentNullException("password", "Password cannot be null.");\r
-\r
- awaitingGhostDeath = true;\r
-\r
- /* GHOST <nickname> <password> */\r
- SendMessage(new IrcMessage(IRC.GHOST, nickname + " " + password));\r
- }\r
-\r
/// <summary>\r
/// Submit password to identify user.\r
/// </summary>\r
if (password == null)\r
throw new ArgumentNullException("password", "Password cannot be null.");\r
\r
- this.password = password;\r
-\r
/* PASS <password> */\r
SendMessage(new IrcMessage(IRC.PASS, password));\r
}\r
{\r
if (nickname == null)\r
throw new ArgumentNullException("nickname", "Nickname cannot be null.");\r
- reqNickname = nickname;\r
firstPingReceived = false;\r
if (password != null)\r
- {\r
SubmitPassword(password);\r
- }\r
ChangeNick(nickname);\r
/* OLD: USER <username> <hostname> <servername> <realname> */\r
/* NEW: USER <user> <mode> <unused> <realname> */\r
{\r
foreach (char c in command)\r
{\r
- if (!Char.IsLetter(c) && !Char.IsWhiteSpace(c))\r
+ if (!Char.IsLetter(c))\r
{\r
return false;\r
}\r
<userSettings>
<TechBot.IRCLibrary.Settings>
<setting name="CommandPrefix" serializeAs="String">
- <value>!</value>
+ <value>@</value>
</setting>
</TechBot.IRCLibrary.Settings>
</userSettings>
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("svn://svn.reactos.org/reactos/trunk")]
+ [global::System.Configuration.DefaultSettingValueAttribute("svn://svn.reactos.org/trunk/reactos")]
public string SVNRoot {
get {
return ((string)(this["SVNRoot"]));
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("!")]
+ [global::System.Configuration.DefaultSettingValueAttribute("@")]
public string CommandPrefix {
get {
return ((string)(this["CommandPrefix"]));
<Value Profile="(Default)">C:\Ros\current\irc\TechBot\Resources\wm.xml</Value>
</Setting>
<Setting Name="SVNRoot" Type="System.String" Scope="Application">
- <Value Profile="(Default)">svn://svn.reactos.org/reactos/trunk</Value>
+ <Value Profile="(Default)">svn://svn.reactos.org/trunk/reactos</Value>
</Setting>
<Setting Name="CommandPrefix" Type="System.String" Scope="Application">
- <Value Profile="(Default)">!</Value>
+ <Value Profile="(Default)">@</Value>
</Setting>
</Settings>
</SettingsFile>
\ No newline at end of file
m_IrcClient.Connect(hostname, port);
m_IrcClient.Register(botname, password, null);
- Console.WriteLine("Registered as {0}...", m_IrcClient.Nickname);
-
- /* Did we get the nick we wanted? */
- if (m_IrcClient.Nickname != botname)
- {
- /* there must have been an existing one, kill it */
- m_IrcClient.GhostNick(botname, password);;
- }
-
+ Console.WriteLine("Registered as {0}...", botname);
JoinChannels();
while (!isStopped)
injectMessage,
GetMessageSource(context)));
InjectMessage(context,
- injectMessage);
+ injectMessage);
}
else
{
<value>C:\Ros\current\irc\TechBot\Resources\wm.xml</value>
</setting>
<setting name="SVNRoot" serializeAs="String">
- <value>svn://svn.reactos.org/reactos/trunk</value>
+ <value>svn://svn.reactos.org/trunk/reactos</value>
</setting>
<setting name="CommandPrefix" serializeAs="String">
- <value>!</value>
+ <value>@</value>
</setting>
</TechBot.Library.Settings>
</applicationSettings>
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TechBot.Commands.MSDN", "TechBot.Commands.MSDN\TechBot.Commands.MSDN.csproj", "{ADBF1ED6-A586-4707-BD59-4CD53448D0FE}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TechBot.Commands.RBuild", "TechBot.Commands.RBuild\TechBot.Commands.RBuild.csproj", "{D676FEDE-62DD-4B4D-94C6-308598E827F9}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
{ADBF1ED6-A586-4707-BD59-4CD53448D0FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ADBF1ED6-A586-4707-BD59-4CD53448D0FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ADBF1ED6-A586-4707-BD59-4CD53448D0FE}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D676FEDE-62DD-4B4D-94C6-308598E827F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D676FEDE-62DD-4B4D-94C6-308598E827F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D676FEDE-62DD-4B4D-94C6-308598E827F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D676FEDE-62DD-4B4D-94C6-308598E827F9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
</sectionGroup>
</configSections>
<appSettings>
- <add key="IRCServerHostName" value="irc.freenode.net" />
+ <add key="IRCServerHostName" value="irc.eu.freenode.net" />
<add key="IRCServerHostPort" value="6667" />
- <add key="IRCChannelNames" value="reactos,reactos-dev,reactos-testers" />
+ <add key="IRCChannelNames" value="channel1;channel2" />
<add key="IRCBotName" value="MyBot" />
<add key="IRCBotPassword" value="MyPassword" />
<add key="ChmPath" value="C:\IRC\TechBot\CHM" />
<add key="WinerrorXml" value="C:\IRC\TechBot\winerror.xml" />
<add key="HresultXml" value="C:\IRC\TechBot\hresult.xml" />
<add key="WmXml" value="C:\IRC\TechBot\wm.xml" />
- <add key="SvnCommand" value="svn co svn://svn.reactos.org/reactos/trunk" />
+ <add key="SvnCommand" value="svn co svn://svn.reactos.org/trunk/reactos" />
<add key="BugUrl" value="http://www.reactos.org/bugzilla/show_bug.cgi?id={0}" />
<add key="WineBugUrl" value="http://bugs.winehq.org/show_bug.cgi?id={0}" />
<add key="SambaBugUrl" value="https://bugzilla.samba.org/show_bug.cgi?id={0}" />
# Set target compiler/linker
ifneq ($(ROS_PREFIX),)
- PREFIX_ := $(ROS_PREFIX)-
+ PREFIX_ := $(ROS_PREFIX)
else
ifeq ($(HOST),mingw32-linux)
- PREFIX_ := mingw32-
+ PREFIX_ := mingw32
else
PREFIX_ :=
endif
endif
ifeq ($(TARGET_CC),)
- TARGET_CC = $(PREFIX_)gcc
+ TARGET_CC = $(PREFIX_)-gcc
endif
ifeq ($(TARGET_CPP),)
- TARGET_CPP = $(PREFIX_)g++
+ TARGET_CPP = $(PREFIX_)-g++
endif
gcc = $(Q)$(TARGET_CC)
gpp = $(Q)$(TARGET_CPP)
gas = $(Q)$(TARGET_CC) -x assembler-with-cpp
-ld = $(Q)$(PREFIX_)ld
-nm = $(Q)$(PREFIX_)nm
-objdump = $(Q)$(PREFIX_)objdump
-ar = $(Q)$(PREFIX_)ar
-objcopy = $(Q)$(PREFIX_)objcopy
-dlltool = $(Q)$(PREFIX_)dlltool
-strip = $(Q)$(PREFIX_)strip
-windres = $(Q)$(PREFIX_)windres
+ld = $(Q)$(PREFIX_)-ld
+nm = $(Q)$(PREFIX_)-nm
+objdump = $(Q)$(PREFIX_)-objdump
+ar = $(Q)$(PREFIX_)-ar
+objcopy = $(Q)$(PREFIX_)-objcopy
+dlltool = $(Q)$(PREFIX_)-dlltool
+strip = $(Q)$(PREFIX_)-strip
+windres = $(Q)$(PREFIX_)-windres
# Set utilities
ifeq ($(OSTYPE),msys)
</xi:include>
<xi:include href="ReactOS-generic.rbuild" />
-
+
<!-- <define name="_M_ARM" /> Already defined by toolchain -->
<define name="_ARM_" />
<define name="__arm__" />
<define name="TARGET_arm" host="true" />
-
+
<define name="USE_COMPILER_EXCEPTIONS" />
-
+
<property name="WINEBUILD_FLAGS" value="--kill-at"/>
-
+
<include>include/reactos/arm</include>
<if property="SARCH" value="versatile">
<compilerflag>-UUNICODE</compilerflag>
</group>
-
+
<define name="__MSVCRT__"/> <!-- DUBIOUS -->
-
+
<group linkerset="ld">
<linkerflag>--strip-debug</linkerflag> <!-- INVESTIGATE -->
<linkerflag>-static</linkerflag> <!-- INVESTIGATE -->
<compilerflag>-Wno-strict-aliasing</compilerflag>
<compilerflag>-Wpointer-arith</compilerflag>
<compilerflag>-Wno-multichar</compilerflag>
- <!--
- <compilerflag>-Wno-error=uninitialized</compilerflag>
- <compilerflag>-Wno-error=unused-function</compilerflag>
- <compilerflag>-Wno-error=write-strings</compilerflag>
- -->
+
<!-- compilerflag>-H</compilerflag> enable this for header traces -->
</group>
SaveSettings();
- try { throw 0; } catch (int i) { } /* HACK */
-
return msg.wParam;
}
DispatchMessage(&msg);
}
}
-
- try { throw 0; } catch (int i) { } /* HACK */
-
return msg.wParam;
}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly
+ xmlns="urn:schemas-microsoft-com:asm.v1"
+ manifestVersion="1.0">
+<assemblyIdentity
+ name="DevCpp.Apps.Paint"
+ processorArchitecture="amd64"
+ version="1.0.0.0"
+ type="win32"/>
+<description>Paint</description>
+<dependency>
+ <dependentAssembly>
+ <assemblyIdentity
+ type="win32"
+ name="Microsoft.Windows.Common-Controls"
+ version="6.0.0.0"
+ processorArchitecture="amd64"
+ publicKeyToken="6595b64144ccf1df"
+ language="*"
+ />
+ </dependentAssembly>
+</dependency>
+</assembly>
// THIS WILL MAKE THE PROGRAM USE THE COMMON CONTROLS
// LIBRARY VERSION 6.0 (IF IT IS AVAILABLE)
//
+#ifdef _AMD64_
+1 24 "paint.exe.amd64.manifest"
+#elif _X86_
1 24 "paint.exe.manifest"
+#endif
+
<directory name="telnetd">
<xi:include href="telnetd/telnetd.rbuild" />
</directory>
- <directory name="tftpd">
- <xi:include href="tftpd/tftpd.rbuild" />
- </directory>
+ <directory name="tftpd">
+ <xi:include href="tftpd/tftpd.rbuild" />
+ </directory>
<directory name="umpnpmgr">
<xi:include href="umpnpmgr/umpnpmgr.rbuild" />
</directory>
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
+<installfile installbase="system32/drivers/etc">quotes</installfile>
<module name="tcpsvcs" type="win32cui" installbase="system32" installname="tcpsvcs.exe" unicode="yes">
<include base="arp">.</include>
<library>ws2_32</library>
return TRUE;
}
-BOOL WINAPI
-InfpFindNextLine(
- IN PINFCONTEXT ContextIn,
- OUT PINFCONTEXT ContextOut)
-{
- return InfFindNextLine(ContextIn, ContextOut);
-}
-
-BOOL WINAPI
-InfpGetBinaryField(
- IN PINFCONTEXT Context,
- IN ULONG FieldIndex,
- IN OUT BYTE* ReturnBuffer,
- IN ULONG ReturnBufferSize,
- OUT PULONG RequiredSize)
-{
- return InfGetBinaryField(Context, FieldIndex, ReturnBuffer, ReturnBufferSize, RequiredSize);
-}
-
-DWORD WINAPI
-InfpGetFieldCount(
- IN PINFCONTEXT Context)
-{
- return (DWORD)InfGetFieldCount(Context);
-}
-
-BOOL WINAPI
-InfpGetIntField(
- IN PINFCONTEXT Context,
- IN DWORD FieldIndex,
- OUT PINT IntegerValue)
-{
- LONG IntegerValueL;
- BOOL ret;
-
- ret = InfGetIntField(Context, FieldIndex, &IntegerValueL);
- *IntegerValue = (INT)IntegerValueL;
- return ret;
-}
-
BOOL WINAPI
InfpGetMultiSzFieldW(
IN PINFCONTEXT Context,
#define SetupCloseInfFile InfpCloseInfFile
#define SetupFindFirstLineW InfpFindFirstLineW
-#define SetupFindNextLine InfpFindNextLine
-#define SetupGetBinaryField InfpGetBinaryField
-#define SetupGetFieldCount InfpGetFieldCount
-#define SetupGetIntField InfpGetIntField
+#define SetupFindNextLine InfFindNextLine
+#define SetupGetBinaryField InfGetBinaryField
+#define SetupGetFieldCount InfGetFieldCount
+#define SetupGetIntField InfGetIntField
#define SetupGetMultiSzFieldW InfpGetMultiSzFieldW
#define SetupGetStringFieldW InfpGetStringFieldW
#define SetupOpenInfFileW InfpOpenInfFileW
IN PCWSTR Key,
IN OUT PINFCONTEXT Context);
-BOOL WINAPI
-InfpFindNextLine(
- IN PINFCONTEXT ContextIn,
- OUT PINFCONTEXT ContextOut);
-
-BOOL WINAPI
-InfpGetBinaryField(
- IN PINFCONTEXT Context,
- IN ULONG FieldIndex,
- IN OUT BYTE* ReturnBuffer,
- IN ULONG ReturnBufferSize,
- OUT PULONG RequiredSize);
-
-DWORD WINAPI
-InfpGetFieldCount(
- IN PINFCONTEXT Context);
-
-BOOL WINAPI
-InfpGetIntField(
- IN PINFCONTEXT Context,
- IN DWORD FieldIndex,
- OUT PINT IntegerValue);
-
BOOL WINAPI
InfpGetMultiSzFieldW(
IN PINFCONTEXT Context,
/* Internal Headers */
#include "interface/consup.h"
#include "partlist.h"
+#include "infros.h"
#include "inffile.h"
#include "inicache.h"
#include "progress.h"
return TRUE;
}
- return IMAGE_SUBSYSTEM_WINDOWS_CUI == ProcessPeb.ImageSubSystem;
+ return IMAGE_SUBSYSTEM_WINDOWS_CUI == ProcessPeb.ImageSubsystem;
}
LoadString(g_Globals._hInstance, IDS_NAMECOLUMN, szTemp, nChars);
column.pszText = szTemp;
- ListView_InsertColumn(_list_ctrl, 0, &column);
+ (void)ListView_InsertColumn(_list_ctrl, 0, &column);
column.cx = 300;
LoadString(g_Globals._hInstance, IDS_PATHCOLUMN, szTemp, nChars);
column.pszText = szTemp;
- ListView_InsertColumn(_list_ctrl, 1, &column);
+ (void)ListView_InsertColumn(_list_ctrl, 1, &column);
column.cx = 400;
LoadString(g_Globals._hInstance, IDS_MENUCOLUMN, szTemp, nChars);
column.pszText = szTemp;
- ListView_InsertColumn(_list_ctrl, 2, &column);
+ (void)ListView_InsertColumn(_list_ctrl, 2, &column);
- ListView_SetExtendedListViewStyleEx(_list_ctrl, LVS_EX_FULLROWSELECT, LVS_EX_FULLROWSELECT);
+ (void)ListView_SetExtendedListViewStyleEx(_list_ctrl, LVS_EX_FULLROWSELECT, LVS_EX_FULLROWSELECT);
_common_programs = SpecialFolderFSPath(CSIDL_COMMON_PROGRAMS, hwnd);
if (!_common_programs.empty())
HiddenWindow hide_listctrl(_list_ctrl);
- ListView_DeleteAllItems(_list_ctrl);
+ (void)ListView_DeleteAllItems(_list_ctrl);
if (delete_cache || !_thread._cache_valid) {
_thread.free_dirs();
item.iSubItem = 1;
item.pszText = (LPTSTR)(LPCTSTR)cache_entry._path;
- ListView_SetItem(_list_ctrl, &item);
+ (void)ListView_SetItem(_list_ctrl, &item);
item.iSubItem = 2;
item.pszText = (LPTSTR)(LPCTSTR)cache_entry._menu_path;
- ListView_SetItem(_list_ctrl, &item);
+ (void)ListView_SetItem(_list_ctrl, &item);
}
LRESULT FindProgramDlg::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
if (_tcsstr(ext_options,TEXT("-console"))) {
AllocConsole();
- _dup2(_open_osfhandle((long)GetStdHandle(STD_INPUT_HANDLE), _O_RDONLY), 0);
- _dup2(_open_osfhandle((long)GetStdHandle(STD_OUTPUT_HANDLE), 0), 1);
- _dup2(_open_osfhandle((long)GetStdHandle(STD_ERROR_HANDLE), 0), 2);
+ _dup2(_open_osfhandle((intptr_t)GetStdHandle(STD_INPUT_HANDLE), _O_RDONLY), 0);
+ _dup2(_open_osfhandle((intptr_t)GetStdHandle(STD_OUTPUT_HANDLE), 0), 1);
+ _dup2(_open_osfhandle((intptr_t)GetStdHandle(STD_ERROR_HANDLE), 0), 2);
g_Globals._log = _fdopen(1, "w");
setvbuf(g_Globals._log, 0, _IONBF, 0);
if (use_gdb_stub) {
LOG(TEXT("waiting for debugger connection...\n"));
+#ifdef __i386__
initialize_gdb_stub();
+#endif
}
g_Globals.init(hInstance);
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+<assemblyIdentity
+ version="1.0.0.0"
+ processorArchitecture="amd64"
+ name="ReactOS.Explorer"
+ type="win32"
+/>
+<description>ROS Explorer</description>
+<dependency>
+ <dependentAssembly>
+ <assemblyIdentity
+ type="win32"
+ name="Microsoft.Windows.Common-Controls"
+ version="6.0.0.0"
+ processorArchitecture="amd64"
+ publicKeyToken="6595b64144ccf1df"
+ language="*"
+ />
+ </dependentAssembly>
+</dependency>
+</assembly>
<?xml version="1.0"?>
<!DOCTYPE group SYSTEM "../../../tools/rbuild/project.dtd">
<group xmlns:xi="http://www.w3.org/2001/XInclude">
-<module name="explorer" type="win32gui" installname="explorer.exe" unicode="yes">
+<module name="explorer" type="win32gui" installname="explorer.exe" allowwarnings="true" unicode="yes">
<include base="explorer">.</include>
<define name="WIN32" />
<define name="__WINDRES__" />
<library>shell32</library>
<library>uuid</library>
<library>notifyhook</library>
- <pch>precomp.h</pch>
+
<directory name="desktop">
<file>desktop.cpp</file>
</directory>
<file>xs-native.cpp</file>
</directory>
<file>explorer.cpp</file>
- <file>i386-stub-win32.c</file>
+ <if property="ARCH" value="i386">
+ <file>i386-stub-win32.c</file>
+ </if>
<file>explorer.rc</file>
<linkerflag>--enable-stdcall-fixup</linkerflag>
</module>
-<installfile installbase=".">explorer-cfg-template.xml</installfile>
+<installfile>explorer-cfg-template.xml</installfile>
<directory name="notifyhook">
<xi:include href="notifyhook/notifyhook.rbuild" />
</directory>
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
-STRINGTABLE DISCARDABLE
-BEGIN
- IDS_VERSION_STR REACTOS_STR_PRODUCT_VERSION
- IDS_EXPLORER_VERSION_STR "ReactOS %s Explorer"
-END
+//STRINGTABLE DISCARDABLE
+//BEGIN
+// IDS_VERSION_STR REACTOS_STR_PRODUCT_VERSION
+// IDS_EXPLORER_VERSION_STR "ReactOS %s Explorer"
+//END
"END\r\n"
"#endif\r\n"
"#ifndef _DEBUG\r\n"
+ "#ifdef _AMD64_"
+ "CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST DISCARDABLE PURE ""explorer.exe.amd64.manifest""\r\n"
+ "#else"
"CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST DISCARDABLE PURE ""explorer.exe.manifest""\r\n"
"#endif\r\n"
+ "#endif\r\n"
"\r\n"
"#include ""explorer-bg.rc""\r\n"
"#include ""explorer-cz.rc""\r\n"
hdl.prc = &rt;
hdl.pwpos = ℘
- Header_Layout(_left->_hwndHeader, &hdl);
+ (void)Header_Layout(_left->_hwndHeader, &hdl);
hdwp = DeferWindowPos(hdwp, _left->_hwndHeader, wp.hwndInsertAfter,
wp.x-1, wp.y, _split_pos-SPLIT_WIDTH/2+1, wp.cy, wp.flags);
HINSTANCE hinst = ShellExecute(_hwnd, NULL/*operation*/, dlg.cmd/*file*/, NULL/*parameters*/, NULL/*dir*/, dlg.cmdshow);
- if ((int)hinst <= 32)
+ if ((INT_PTR)hinst <= 32)
display_error(_hwnd, GetLastError());
}
break;}
HiddenWindow hide(_hsidebar);
WindowCanvas canvas(_hwnd);
- TreeView_DeleteAllItems(_hsidebar);
+ (void)TreeView_DeleteAllItems(_hsidebar);
g_Globals._icon_cache.get_icon(ICID_FAVORITES).add_to_imagelist(_himl, canvas);
g_Globals._icon_cache.get_icon(ICID_BOOKMARK).add_to_imagelist(_himl, canvas);
g_Globals._favorites.fill_tree(_hsidebar, hitem_bookmarks, _himl, canvas);
- TreeView_Expand(_hsidebar, hitem_bookmarks, TVE_EXPAND);
+ (void)TreeView_Expand(_hsidebar, hitem_bookmarks, TVE_EXPAND);
}
hdi.pszText = (TCHAR*)g_pos_names[idx];
hdi.fmt = HDF_STRING | g_pos_align[idx];
hdi.cxy = _widths[idx];
- Header_InsertItem(hwnd, idx, &hdi);
+ (void)Header_InsertItem(hwnd, idx, &hdi);
}
_hwndHeader = hwnd;
for(; x+_widths[i]<scroll_pos && i<COLUMNS; i++) {
x += _widths[i];
- Header_SetItem(_hwndHeader, i, &item);
+ (void)Header_SetItem(_hwndHeader, i, &item);
}
if (i < COLUMNS) {
x += _widths[i];
item.cxy = x - scroll_pos;
- Header_SetItem(_hwndHeader, i++, &item);
+ (void)Header_SetItem(_hwndHeader, i++, &item);
for(; i<COLUMNS; i++) {
item.cxy = _widths[i];
x += _widths[i];
- Header_SetItem(_hwndHeader, i, &item);
+ (void)Header_SetItem(_hwndHeader, i, &item);
}
}
}
x += _widths[col];
}
- ListBox_SetHorizontalExtent(_hwnd, x);
+ (void)ListBox_SetHorizontalExtent(_hwnd, x);
}
ClientRect clnt(_hwnd);
// move immediate to simulate HDS_FULLDRAG (for now [04/2000] not realy needed with WINELIB)
- Header_SetItem(_hwndHeader, idx, phdn->pitem);
+ (void)Header_SetItem(_hwndHeader, idx, phdn->pitem);
_widths[idx] += dx;
item.mask = HDI_WIDTH;
item.cxy = _widths[phdn->iItem];
- Header_SetItem(_hwndHeader, phdn->iItem, &item);
+ (void)Header_SetItem(_hwndHeader, phdn->iItem, &item);
InvalidateRect(_hwnd, 0, TRUE);
break;}
CONTEXT("ShellBrowserChild::InitializeTree()");
_himl_old = TreeView_SetImageList(_left_hwnd, _himl, TVSIL_NORMAL);
- TreeView_SetScrollTime(_left_hwnd, 100);
+ (void)TreeView_SetScrollTime(_left_hwnd, 100);
TV_INSERTSTRUCT tvInsert;
TV_ITEM& tvItem = tvInsert.item;
tvItem.cChildren = 1;
HTREEITEM hItem = TreeView_InsertItem(_left_hwnd, &tvInsert);
- TreeView_SelectItem(_left_hwnd, hItem);
- TreeView_Expand(_left_hwnd, hItem, TVE_EXPAND);
+ (void)TreeView_SelectItem(_left_hwnd, hItem);
+ (void)TreeView_Expand(_left_hwnd, hItem, TVE_EXPAND);
}
bool ShellBrowser::InitDragDrop()
CONTEXT("ShellBrowser::OnTreeItemExpanding()");
if (pnmtv->action == TVE_COLLAPSE)
- TreeView_Expand(_left_hwnd, pnmtv->itemNew.hItem, TVE_COLLAPSE|TVE_COLLAPSERESET);
+ (void)TreeView_Expand(_left_hwnd, pnmtv->itemNew.hItem, TVE_COLLAPSE|TVE_COLLAPSERESET);
else if (pnmtv->action == TVE_EXPAND) {
ShellDirectory* entry = (ShellDirectory*)TreeView_GetItemData(_left_hwnd, pnmtv->itemNew.hItem);
tvItem.hItem = pnmtv->itemNew.hItem;
tvItem.cChildren = 0;
- TreeView_SetItem(_left_hwnd, &tvItem);
+ (void)TreeView_SetItem(_left_hwnd, &tvItem);
}
}
}
while((hchild=hnext) != 0) {
hnext = TreeView_GetNextSibling(_left_hwnd, hchild);
- TreeView_DeleteItem(_left_hwnd, hchild);
+ (void)TreeView_DeleteItem(_left_hwnd, hchild);
}
TV_ITEM tvItem;
if ((Entry*)TreeView_GetItemData(_left_hwnd,hitem) == entry) {
if (TreeView_SelectItem(_left_hwnd, hitem)) {
if (expand)
- TreeView_Expand(_left_hwnd, hitem, TVE_EXPAND);
+ (void)TreeView_Expand(_left_hwnd, hitem, TVE_EXPAND);
return hitem;
}
{
HICON hIcon = 0;
- SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL2, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon);
+ SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL2, 0, SMTO_ABORTIFHUNG, 1000, (PDWORD_PTR)&hIcon);
if (!hIcon)
- SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon);
+ SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL, 0, SMTO_ABORTIFHUNG, 1000, (PDWORD_PTR)&hIcon);
if (!hIcon)
- SendMessageTimeout(hwnd, WM_GETICON, ICON_BIG, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon);
+ SendMessageTimeout(hwnd, WM_GETICON, ICON_BIG, 0, SMTO_ABORTIFHUNG, 1000, (PDWORD_PTR)&hIcon);
if (!hIcon)
hIcon = (HICON)GetClassLongPtr(hwnd, GCL_HICONSM);
hIcon = (HICON)GetClassLongPtr(hwnd, GCL_HICON);
if (!hIcon)
- SendMessageTimeout(hwnd, WM_QUERYDRAGICON, 0, 0, 0, 1000, (LPDWORD)&hIcon);
+ SendMessageTimeout(hwnd, WM_QUERYDRAGICON, 0, 0, 0, 1000, (PDWORD_PTR)&hIcon);
return hIcon;
}
{
HICON hIcon = 0;
- SendMessageTimeout(hwnd, WM_GETICON, ICON_BIG, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon);
+ SendMessageTimeout(hwnd, WM_GETICON, ICON_BIG, 0, SMTO_ABORTIFHUNG, 1000, (PDWORD_PTR)&hIcon);
if (!hIcon)
- SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL2, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon);
+ SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL2, 0, SMTO_ABORTIFHUNG, 1000, (PDWORD_PTR)&hIcon);
if (!hIcon)
- SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon);
+ SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL, 0, SMTO_ABORTIFHUNG, 1000, (PDWORD_PTR)&hIcon);
if (allow_from_class) {
if (!hIcon)
}
if (!hIcon)
- SendMessageTimeout(hwnd, WM_QUERYDRAGICON, 0, 0, 0, 1000, (LPDWORD)&hIcon);
+ SendMessageTimeout(hwnd, WM_QUERYDRAGICON, 0, 0, 0, 1000, (PDWORD_PTR)&hIcon);
return hIcon;
}
HiddenWindow hide(_tree_ctrl);
- TreeView_DeleteAllItems(_tree_ctrl);
+ (void)TreeView_DeleteAllItems(_tree_ctrl);
TV_INSERTSTRUCT tvi;
CheckDlgButton(_hwnd, ID_SHOW_HIDDEN_ICONS, _pNotifyArea->_show_hidden? BST_CHECKED: BST_UNCHECKED);
}
- TreeView_Expand(_tree_ctrl, _hitemCurrent_visible, TVE_EXPAND);
- TreeView_Expand(_tree_ctrl, _hitemCurrent_hidden, TVE_EXPAND);
- TreeView_Expand(_tree_ctrl, _hitemCurrent, TVE_EXPAND);
- TreeView_Expand(_tree_ctrl, _hitemConfig, TVE_EXPAND);
+ (void)TreeView_Expand(_tree_ctrl, _hitemCurrent_visible, TVE_EXPAND);
+ (void)TreeView_Expand(_tree_ctrl, _hitemCurrent_hidden, TVE_EXPAND);
+ (void)TreeView_Expand(_tree_ctrl, _hitemCurrent, TVE_EXPAND);
+ (void)TreeView_Expand(_tree_ctrl, _hitemConfig, TVE_EXPAND);
- TreeView_EnsureVisible(_tree_ctrl, _hitemCurrent_visible);
+ (void)TreeView_EnsureVisible(_tree_ctrl, _hitemCurrent_visible);
}
void TrayNotifyDlg::InsertItem(HTREEITEM hparent, HTREEITEM after, const NotifyInfo& entry, HDC hdc)
GlobalUnlock(medium.hGlobal);
}
- TreeView_SelectDropTarget(m_hTargetWnd, NULL);
+ (void)TreeView_SelectDropTarget(m_hTargetWnd, NULL);
return true; //let base free the medium
}
HTREEITEM hItem = TreeView_HitTest(m_hTargetWnd,&hit);
if (hItem != NULL)
- TreeView_SelectDropTarget(m_hTargetWnd, hItem);
+ (void)TreeView_SelectDropTarget(m_hTargetWnd, hItem);
return IDropTargetImpl::DragOver(grfKeyState, pt, pdwEffect);
}
virtual HRESULT STDMETHODCALLTYPE DragLeave(void)
{
- TreeView_SelectDropTarget(m_hTargetWnd, NULL);
+ (void)TreeView_SelectDropTarget(m_hTargetWnd, NULL);
return IDropTargetImpl::DragLeave();
}
HINSTANCE hinst = ShellExecute(hwnd, NULL/*operation*/, cmd, parameters, NULL/*dir*/, nCmdShow);
- if ((int)hinst <= 32) {
+ if ((INT_PTR)hinst <= 32) {
display_error(hwnd, GetLastError());
return FALSE;
}
{
HINSTANCE hinst = ShellExecuteA(hwnd, NULL/*operation*/, cmd, parameters, NULL/*dir*/, nCmdShow);
- if ((int)hinst <= 32) {
+ if ((INT_PTR)hinst <= 32) {
display_error(hwnd, GetLastError());
return FALSE;
}
_tcscpy(parameters, TEXT("shell32.dll,Control_RunDLL "));
_tcscat(parameters, applet);
- return ((int)ShellExecute(hwnd, TEXT("open"), TEXT("rundll32.exe"), parameters, NULL, SW_SHOWDEFAULT) > 32);
+ return ((INT_PTR)ShellExecute(hwnd, TEXT("open"), TEXT("rundll32.exe"), parameters, NULL, SW_SHOWDEFAULT) > 32);
}
int idx = ListView_GetSelectionMark(_hwnd);
LPARAM param = ListView_GetItemData(_hwnd, idx);
- ListView_SortItems(_hwnd, _compare_fct, (LPARAM)this);
+ (void)ListView_SortItems(_hwnd, _compare_fct, (LPARAM)this);
if (idx >= 0) {
idx = ListView_FindItemPara(_hwnd, param);
- ListView_EnsureVisible(_hwnd, idx, FALSE);
+ (void)ListView_EnsureVisible(_hwnd, idx, FALSE);
}
}
{
if (!_cmd.empty()) {
HINSTANCE hinst = ShellExecute(GetParent(_hwnd), _T("open"), _cmd, 0, 0, SW_SHOWNORMAL);
- return (int)hinst > HINSTANCE_ERROR;
+ return (ULONG_PTR)hinst > HINSTANCE_ERROR;
}
return true;
void add(HWND hparent, HWND htool, LPCTSTR txt=LPSTR_TEXTCALLBACK, LPARAM lparam=0)
{
TOOLINFO ti = {
- sizeof(TOOLINFO), TTF_SUBCLASS|TTF_IDISHWND|TTF_TRANSPARENT, hparent, (UINT)htool,
+ sizeof(TOOLINFO), TTF_SUBCLASS|TTF_IDISHWND|TTF_TRANSPARENT, hparent, (UINT_PTR)htool,
{0,0,0,0}, 0, (LPTSTR)txt, lparam
};
void remove(HWND hparent, HWND htool)
{
TOOLINFO ti = {
- sizeof(TOOLINFO), TTF_IDISHWND, hparent, (UINT)htool,
+ sizeof(TOOLINFO), TTF_IDISHWND, hparent, (UINT_PTR)htool,
{0,0,0,0}, 0, 0, 0
};
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
-<module name="bootcd" type="iso" output="ReactOS.iso">
+<module name="bootcd" type="iso" output="ReactOS-$(ARCH).iso">
<bootsector>isoboot</bootsector>
</module>
--- /dev/null
+[Version]
+Signature="$ReactOS$
+
+[AddReg]
+HKLM,"SOFTWARE\Classes",,0x00000010
+
+
+; Default key
+HKCR,"*","",0x00000000,""
+HKCR,"*\shellex\ContextMenuHandlers\Open With","",0x00000000,"{09799AFB-AD67-11d1-ABCD-00C04FC30936}"
+
+; Folders
+HKCR,"Folder","",0x00000000,"Folder"
+;HKCR,"Folder\Defaulticon","",0x00000000,"%SystemRoot%\system32\shell32.dll,-4"
+HKCR,"Folder\shell\open\command","",0x00000000,"explorer.exe ""%1"""
+HKCR,"Folder\shell\explore\command","",0x00000000,"explorer.exe /e,""%1"""
+HKCR,"Folder\shell\rootexplore","",0x00000000,"Explore from here"
+HKCR,"Folder\shell\rootexplore\command","",0x00000000,"explorer.exe /e,/root,""%1"""
+
+; Drive property page
+HKCR,"CLSID\{5F5295E0-429F-1069-A2E2-08002B30309D}","",0x00000000,"Drive Property Page Extension"
+HKCR,"CLSID\{5F5295E0-429F-1069-A2E2-08002B30309D}\InProcServer32","",0x00000000,"shell32.dll"
+HKCR,"CLSID\{5F5295E0-429F-1069-A2E2-08002B30309D}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+
+; New Object Service
+HKCR,"CLSID\{D969A300-E7FF-11d0-A93B-00A0C90F2719}","",0x00000000,"ReactOS New Object Service"
+HKCR,"CLSID\{D969A300-E7FF-11d0-A93B-00A0C90F2719}\InProcServer32","",0x00000000,"shell32.dll"
+HKCR,"CLSID\{D969A300-E7FF-11d0-A93B-00A0C90F2719}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+
+; Rich Text Files
+HKCR,".rtf","",0x00000000,"rtffile"
+HKCR,".rtf\shellnew","",0x00000000,""
+HKCR,".rtf\shellnew","Data",0x00020000,"{\rtf1}"
+HKCR,"rtffile","",0x00000000,"Rich Text Document"
+HKCR,"rtffile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\wordpad.exe,-1404"
+HKCR,"rtffile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-2"
+HKCR,"rtffile\shell\open","",0x00000000,"Open"
+HKCR,"rtffile\shell\open\command","",0x00020000,"%SystemRoot%\system32\wordpad.exe %1"
+
+; Virtual Device Drivers
+HKCR,".386","",0x00000000,"vxdfile"
+HKCR,".vxd","",0x00000000,"vxdfile"
+HKCR,"vxdfile","",0x00000000,"Virtual Device Driver"
+HKCR,"vxdfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-156"
+
+; Animated Cursors
+HKCR,".ani","",0x00000000,"anifile"
+HKCR,"anifile","",0x00000000,"Animated Cursor"
+HKCR,"anifile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\main.cpl,-1039"
+HKCR,"anifile\DefaultIcon","",0x00000000,"%1"
+
+; DOS Batch-Files
+HKCR,".bat","",0x00000000,"batfile"
+HKCR,"batfile","",0x00000000,"DOS Batch File"
+HKCR,"batfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-158"
+HKCR,"batfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-153"
+HKCR,"batfile\shell\edit\command","",0x00020000,"%SystemRoot%\system32\notepad.exe %1"
+HKCR,"batfile\shell\open\command","",0x00000000,"""%1"" %*"
+
+HKCR,".cmd","",0x00000000,"cmdfile"
+HKCR,"cmdfile","",0x00000000,"ReactOS Command Script"
+HKCR,"cmdfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-159"
+HKCR,"cmdfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-153"
+HKCR,"cmdfile\shell\edit\command","",0x00020000,"%SystemRoot%\system32\notepad.exe %1"
+HKCR,"cmdfile\shell\open\command","",0x00000000,"""%1"" %*"
+
+; Get DOS Applications a Icon
+HKCR,".com","",0x00000000,"comfile"
+HKCR,"comfile","",0x00000000,"DOS Application"
+HKCR,"comfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-160"
+HKCR,"comfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-3"
+
+; Control Panel extensions
+HKCR,".cpl","",0x00000000,"cplfile"
+HKCR,"cplfile","",0x00000000,"Control Panel Extension"
+HKCR,"cplfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-161"
+HKCR,"cplfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-154"
+HKCR,"cplfile\shell\cplopen","",0x00000000,"Open with Control Panel"
+HKCR,"cplfile\shell\cplopen\command","",0x00020000,"%SystemRoot%\system32\rundll32.exe shell32.dll,Control_RunDLL %1,%*"
+
+; Cursors
+HKCR,".cur","",0x00000000,"curfile"
+HKCR,"curfile","",0x00000000,"Cursor"
+HKCR,"curfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-162"
+HKCR,"curfile\DefaultIcon","",0x00000000,"%1"
+
+; Dynamic Link Libraries
+HKCR,".dll","",0x00000000,"dllfile"
+HKCR,"dllfile","",0x00000000,"Dynamic Link Library"
+HKCR,"dllfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-163"
+HKCR,"dllfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-154"
+
+; Device Drivers
+HKCR,".drv","",0x00000000,"drvfile"
+HKCR,"drvfile","",0x00000000,"Device Driver"
+HKCR,"drvfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-164"
+HKCR,"drvfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-154"
+
+; Applicatons
+HKCR,".exe","",0x00000000,"exefile"
+HKCR,"exefile","",0x00000000,"ReactOS Application"
+HKCR,"exefile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-165"
+HKCR,"exefile\Defaulticon","",0x00000000,"%1"
+HKCR,"exefile\shell\open\command","",0x00000000,"""%1"" %*"
+
+; Fonts
+HKCR,".fon","",0x00000000,"fonfile"
+HKCR,"fonfile","",0x00000000,"Font File"
+HKCR,"fonfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-166"
+HKCR,"fonfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-155"
+
+HKCR,".ttf","",0x00000000,"ttffile"
+HKCR,"ttffile","",0x00000000,"TrueType Font File"
+HKCR,"ttffile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-156"
+HKCR,"ttffile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-167"
+HKCR,"ttffile\shell\open\command","",0x00020000,"%SystemRoot%\system32\fontview.exe %1"
+
+; Help Files
+HKCR,".hlp","",0x00000000,"hlpfile"
+HKCR,"hlpfile","",0x00000000,"Help File"
+HKCR,"hlpfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-168"
+HKCR,"hlpfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-24"
+HKCR,"hlpfile\shell\open\command","",0x00020000,"%SystemRoot%\system32\winhlp32.exe %1"
+
+HKCR,".chm","",0x00000000,"chm.file"
+HKCR,"chm.file","",0x00000000,"Help File"
+HKCR,"chm.file","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-168"
+HKCR,"chm.file\DefaultIcon","",0x00020000,"%SystemRoot%\hh.exe,0"
+HKCR,"chm.file\shell\open\command","",0x00020000,"%SystemRoot%\hh.exe %1"
+
+; set MIME type for .html and .htm because Tiny webserver needs it
+HKCR,".htm","",0x00000000,"html"
+HKCR,".htm","Content Type",0x00000000,"text/html"
+
+HKCR,".html","",0x00000000,"html"
+HKCR,".html","Content Type",0x00000000,"text/html"
+
+; Icons
+HKCR,".ico","",0x00000000,"icofile"
+HKCR,"icofile","",0x00000000,"Icon"
+HKCR,"icofile\DefaultIcon","",0x00000000,"%1"
+
+; JPEG Images
+HKCR,".jpg","",0x00000000,"jpegfile"
+HKCR,".jpeg","",0x00000000,"jpegfile"
+HKCR,"jpegfile","",0x00000000,"JPEG Image"
+HKCR,"jpegfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shimgvw.dll,0"
+HKCR,"jpegfile\shell\open\command","",0x00020000,"rundll32.exe %SystemRoot%\system32\shimgvw.dll,ImageView_Fullscreen %1"
+
+; Bitmap Images
+HKCR,".bmp","",0x00000000,"bmpfile"
+HKCR,"bmpfile","",0x00000000,"Bitmap Image"
+HKCR,"bmpfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shimgvw.dll,0"
+HKCR,"bmpfile\shell\open\command","",0x00020000,"rundll32.exe %SystemRoot%\system32\shimgvw.dll,ImageView_Fullscreen %1"
+
+; PNG Images
+HKCR,".png","",0x00000000,"pngfile"
+HKCR,"pngfile","",0x00000000,"PNG Image"
+HKCR,"pngfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shimgvw.dll,0"
+HKCR,"pngfile\shell\open\command","",0x00020000,"rundll32.exe %SystemRoot%\system32\shimgvw.dll,ImageView_Fullscreen %1"
+
+; GIF Images
+HKCR,".gif","",0x00000000,"giffile"
+HKCR,"giffile","",0x00000000,"GIF Image"
+HKCR,"giffile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shimgvw.dll,0"
+HKCR,"giffile\shell\open\command","",0x00020000,"rundll32.exe %SystemRoot%\system32\shimgvw.dll,ImageView_Fullscreen %1"
+
+; Configuration Files
+HKCR,".ini","",0x00000000,"inifile"
+HKCR,"inifile","",0x00000000,"Configuration Settings"
+HKCR,"inifile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-169"
+HKCR,"inifile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-151"
+HKCR,"inifile\shell\open\command","",0x00000000,"notepad.exe ""%1"""
+
+; Setup Information Files
+HKCR,".inf","",0x00000000,"inffile"
+HKCR,"inffile","",0x00000000,"Setup Information"
+HKCR,"inffile\FriendlyTypeName","",0x00020000,"%SystemRoot%\system32\setupapi.dll,-2001"
+HKCR,"inffile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-151"
+HKCR,"inffile\shell\open\command","",0x00000000,"notepad.exe ""%1"""
+HKCR,"inffile\shell\Install","",0x00000000,"Install"
+HKCR,"inffile\shell\Install\command","",0x00020000,"%SystemRoot%\system32\rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 %1"
+
+; Show icons for shortcuts in shell views (lnkfile is handled specially in shell32)
+; Don't display extension for shortcuts
+HKCR,".lnk","",0x00000000,"lnkfile"
+HKCR,".lnk\shellnew","",0x00000000,""
+HKCR,".lnk\shellnew","command",0x00020000,"%SystemRoot%\system32\rundll32.exe appwiz.cpl,NewLinkHere %1"
+HKCR,"lnkfile","",0x00000000,"Shortcut"
+HKCR,"lnkfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-170"
+HKCR,"lnkfile","NeverShowExt",0x00000000,""
+HKCR,"lnkfile","IsShortcut",0x00000000,"yes"
+HKCR,"lnkfile\CLSID","",0x00000000,"{00021401-0000-0000-C000-000000000046}"
+HKCR,"lnkfile\shellex\IconHandler","",0x00000000,"{00021401-0000-0000-C000-000000000046}"
+HKCR,"lnkfile\shellex\ContextMenuHandlers\{00021401-0000-0000-C000-000000000046}","",0x00000000,""
+HKCR,"lnkfile\shellex\PropertySheetHandlers\Shellink Property Page", "", 0x00000000, "{00021401-0000-0000-C000-000000000046}"
+
+; Text Documents
+HKCR,".log","",0x00000000,"txtfile"
+HKCR,".txt","",0x00000000,"txtfile"
+HKCR,".c","",0x00000000,"txtfile"
+HKCR,".cpp","",0x00000000,"txtfile"
+HKCR,".h","",0x00000000,"txtfile"
+HKCR,".hpp","",0x00000000,"txtfile"
+HKCR,".txt\shellnew","",0x00000000,""
+HKCR,".txt\shellnew","NullFile",0x00020000,""
+HKCR,"txtfile","",0x00000000,"Text Document"
+HKCR,".txt","Content Type",0x00000000,"text/plain"
+HKCR,"txtfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-152"
+HKCR,"txtfile\shell\open\command","",0x00020000,"%SystemRoot%\system32\notepad.exe %1"
+
+; XML Documents
+HKCR,".xml","",0x00000000,"xmlfile"
+HKCR,"xmlfile","",0x00000000,"XML Document"
+HKCR,".xml","Content Type",0x00000000,"text/xml"
+HKCR,"xmlfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-151"
+HKCR,"xmlfile\shell\open\command","",0x00020000,"%SystemRoot%\system32\notepad.exe %1"
+
+; MSI files
+HKCR,".msi","",0x00000000,"MSI.Package"
+HKCR,"Msi.Package\DefaultIcon","",0x00000000,"msiexec.exe"
+HKCR,"Msi.Package\shell\Open\command","",0x00020000,"%SystemRoot%\system32\msiexec.exe /i ""%1"""
+HKCR,"Msi.Package\shell\Repair\command","",0x00020000,"%SystemRoot%\system32\msiexec.exe /f ""%1"""
+HKCR,"Msi.Package\shell\Uninstall\command","",0x00020000,"%SystemRoot%\system32\msiexec.exe /x ""%1"""
+
+HKCR,".pif","",0x00000000,"piffile"
+
+; Registration Entries
+HKCR,".reg","",0x00000000,"regfile"
+HKCR,"regfile","",0x00000000,"Registration Entries"
+HKCR,"regfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-170"
+HKCR,"regfile\DefaultIcon","",0x00020000,"%SystemRoot%\regedit.exe,1"
+HKCR,"regfile\shell\edit\command","",0x00020000,"%SystemRoot%\system32\notepad.exe %1"
+HKCR,"regfile\shell\open","",0x00000000,"Merge"
+HKCR,"regfile\shell\open\command","",0x00000000,"regedit.exe ""%1"""
+
+; Screen Savers
+HKCR,".scr","",0x00000000,"scrfile"
+HKCR,"scrfile","",0x00000000,"Screen Saver"
+HKCR,"scrfile\Defaulticon","",0x00000000,"%1"
+HKCR,"scrfile\shell\config","",0x00000000,"Configure"
+HKCR,"scrfile\shell\config\command","",0x00000000,"""%1"""
+HKCR,"scrfile\shell\install","",0x00000000,"Install"
+HKCR,"scrfile\shell\install\command","",0x00000000,"rundll32.exe desk.cpl,InstallScreenSaver %l"
+HKCR,"scrfile\shell\open","",0x00000000,"Test"
+HKCR,"scrfile\shell\open\command","",0x00000000,"""%1"" /S"
+
+; shell command files (e.g. "Show Desktop" in quicklaunch bar)
+HKCR,".scf","",0x00000000,"SHCmdFile"
+HKCR,"SHCmdFile","NeverShowExt",0x00000000,""
+HKCR,"SHCmdFile","IsShortcut",0x00000000,"yes"
+HKCR,"SHCmdFile\shell\open\command","",0x00000000,"explorer.exe ""%1"""
+HKCR,"SHCmdFile\CLSID","",0x00000000,"{57651662-CE3E-11D0-8D77-00C04FC99D61}"
+HKCR,"SHCmdFile\shellex\IconHandler","",0x00000000,"{57651662-CE3E-11D0-8D77-00C04FC99D61}"
+
+; System-Files
+HKCR,".sys","",0x00000000,"sysfile"
+HKCR,"sysfile","",0x00000000,"System File"
+HKCR,"regfile","FriendlyTypeName",0x00020000,"@%SystemRoot%\system32\shell32.dll,-171"
+HKCR,"sysfile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-154"
+
+; URL shortcuts (e.g. used in favorites folder of IExplorer)
+HKCR,".url","",0x00000000,"InternetShortcut"
+
+; Wave Sounds
+HKCR,".wav","",0x00000000,"SoundRec"
+HKCR,"SoundRec","",0x00000000,"Wave Sound"
+HKCR,"SoundRec\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-225"
+HKCR,"SoundRec\shell\open\command","",0x00020000,"%SystemRoot%\system32\mplay32.exe %1"
+
+; Midi Sounds
+HKCR,".mid","",0x00000000,"MIDFile"
+HKCR,".midi","",0x00000000,"MIDFile"
+HKCR,"MIDFile","",0x00000000,"MIDI Sequence"
+HKCR,"MIDFile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-225"
+HKCR,"MIDFile\shell\open\command","",0x00020000,"%SystemRoot%\system32\mplay32.exe %1"
+
+; Audio CD
+HKCR,".cda","",0x00000000,"CDAFile"
+HKCR,"CDAFile","",0x00000000,"CD Audio Track"
+HKCR,"CDAFile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-225"
+HKCR,"CDAFile\shell\open\command","",0x00020000,"%SystemRoot%\system32\mplay32.exe %1"
+
+; Avi Files
+HKCR,".avi","",0x00000000,"AVIFile"
+HKCR,"AVIFile","",0x00000000,"Video Clip"
+HKCR,"AVIFile\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-224"
+HKCR,"AVIFile\shell\open\command","",0x00020000,"%SystemRoot%\system32\mplay32.exe %1"
+
+HKCR,"CLSID",,0x00000012
+
+; For Shell32.dll
+HKCR,"CLSID\{00021400-0000-0000-C000-000000000046}","",0x00000000,"Desktop"
+HKCR,"CLSID\{00021400-0000-0000-C000-000000000046}\InProcServer32","",0x00000000,"shell32.dll"
+HKCR,"CLSID\{00021400-0000-0000-C000-000000000046}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+HKCR,"CLSID\{00021401-0000-0000-C000-000000000046}","",0x00000000,"Shortcut"
+HKCR,"CLSID\{00021401-0000-0000-C000-000000000046}\InProcServer32","",0x00000000,"shell32.dll"
+HKCR,"CLSID\{00021401-0000-0000-C000-000000000046}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+HKCR,"CLSID\{00021401-0000-0000-C000-000000000046}\shellex\MayChangeDefaultMenu","",0x00000000,""
+HKCR,"CLSID\{000214E6-0000-0000-C000-000000000046}","",0x00000000,"Shellfolder"
+HKCR,"CLSID\{000214E6-0000-0000-C000-000000000046}\InProcServer32","",0x00000000,"shell32.dll"
+HKCR,"CLSID\{000214E6-0000-0000-C000-000000000046}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+HKCR,"CLSID\{000214EE-0000-0000-C000-000000000046}","",0x00000000,"IShellLinkA"
+HKCR,"CLSID\{000214EE-0000-0000-C000-000000000046}\InProcServer32","",0x00000000,"shell32.dll"
+HKCR,"CLSID\{000214EE-0000-0000-C000-000000000046}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+HKCR,"CLSID\{000214F9-0000-0000-C000-000000000046}","",0x00000000,"IShellLinkW"
+HKCR,"CLSID\{000214F9-0000-0000-C000-000000000046}\InProcServer32","",0x00000000,"shell32.dll"
+HKCR,"CLSID\{000214F9-0000-0000-C000-000000000046}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+
+HKCR,"CLSID\{1F4DE370-D627-11D1-BA4F-00A0C91EEDBA}","",0x00000000,"Computer Search Results Folder"
+HKCR,"CLSID\{1F4DE370-D627-11D1-BA4F-00A0C91EEDBA}","LocalizedString",0x00020000,"@%SystemRoot%\system32\shell32.dll,-30521"
+HKCR,"CLSID\{1F4DE370-D627-11D1-BA4F-00A0C91EEDBA}\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-135"
+HKCR,"CLSID\{1F4DE370-D627-11D1-BA4F-00A0C91EEDBA}\InProcServer32","",0x00020000,"%SystemRoot%\system32\shell32.dll"
+HKCR,"CLSID\{1F4DE370-D627-11D1-BA4F-00A0C91EEDBA}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+HKCR,"CLSID\{1F4DE370-D627-11D1-BA4F-00A0C91EEDBA}\ShellFolder","Attributes",0x00010001,0x20180000
+
+HKCR,"CLSID\{4657278A-411B-11d2-839A-00C04FD918D0}","",0x00000000,"Shell Drag and Drop helper"
+HKCR,"CLSID\{4657278A-411B-11d2-839A-00C04FD918D0}\InProcServer32","",0x00020000,"%SystemRoot%\system32\shell32.dll"
+HKCR,"CLSID\{4657278A-411B-11d2-839A-00C04FD918D0}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+
+; Folder Options CPL
+HKCR,"CLSID\{6DFD7C5C-2451-11d3-A299-00C04F8EF6AF}","",0x00000000,"Folder Options"
+HKCR,"CLSID\{6DFD7C5C-2451-11d3-A299-00C04F8EF6AF}","LocalizedString",0x00020000,"@%SystemRoot%\system32\shell32.dll,-150"
+HKCR,"CLSID\{6DFD7C5C-2451-11d3-A299-00C04F8EF6AF}\InProcServer32","",0x00000000,"shell32.dll"
+HKCR,"CLSID\{6DFD7C5C-2451-11d3-A299-00C04F8EF6AF}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+HKCR,"CLSID\{6DFD7C5C-2451-11d3-A299-00C04F8EF6AF}\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,-210"
+HKCR,"CLSID\{6DFD7C5C-2451-11d3-A299-00C04F8EF6AF}\shell\Open\command","",0x00000000,"rundll32.exe shell32.dll,Options_RunDLL 0"
+HKCR,"CLSID\{6DFD7C5C-2451-11d3-A299-00C04F8EF6AF}\shell\RunAs\command","",0x00000000,"rundll32.exe shell32.dll,Options_RunDLL 0"
+HKCR,"CLSID\{6DFD7C5C-2451-11d3-A299-00C04F8EF6AF}\ShellFolder","Attributes",0x00010001,0x00000000
+
+; Open With shell extension
+HKCR,"CLSID\{09799AFB-AD67-11d1-ABCD-00C04FC30936}","",0x00000000,"Open With Context Menu Handler"
+HKCR,"CLSID\{09799AFB-AD67-11d1-ABCD-00C04FC30936}\InProcServer32","",0x00000000,"shell32.dll"
+HKCR,"CLSID\{09799AFB-AD67-11d1-ABCD-00C04FC30936}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+HKCR,"CLSID\{09799AFB-AD67-11d1-ABCD-00C04FC30936}\shellex\MayChangeDefaultMenu","",0x00000000,""
+HKCR,"SystemFileAssociations","",0x00000000,""
+HKCR,"Applications","",0x00000000,""
+
+; Recycle bin is not implemented
+;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}","",0x00000000,"Recycle Bin"
+;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}","LocalizedString",0x00020000,"@%SystemRoot%\system32\shell32.dll,-8964"
+;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}","InfoTip",0x00020000,"@%SystemRoot%\system32\shell32.dll,-22915"
+;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}","IntroText",0x00020000,"@%SystemRoot%\system32\shell32.dll,-31748"
+;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}","SortOrderIndex",0x00010001,0x00000060
+;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\DefaultIcon","",0x00020000,"%SystemRoot%\system32\shell32.dll,31"
+;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\DefaultIcon","Empty",0x00020000,"%SystemRoot%\system32\shell32.dll,31"
+;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\DefaultIcon","Full",0x00020000,"%SystemRoot%\system32\shell32.dll,32"
+;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\InProcServer32","",0x00020000,"%SystemRoot%\system32\shell32.dll"
+;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\ShellFolder","Attributes",0x00010001,0x20000140
+;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\ShellFolder","CallForAttributes",0x00010001,0x00000040
+;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shellex\ContextMenuHandlers\{645FF040-5081-101B-9F08-00AA002F954E}","",0x00000000,""
+;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\shellex\PropertySheetHandlers\{645FF040-5081-101B-9F08-00AA002F954E}","",0x00000000,""
+
+; deskadp.dll shell extension
+HKCR,"CLSID\{42071712-76d4-11d1-8b24-00a0c9068ff3}","",0x00000000,"Display Adapter CPL Extension"
+HKCR,"CLSID\{42071712-76d4-11d1-8b24-00a0c9068ff3}\InProcServer32","",0x00020000,"%SystemRoot%\system32\deskadp.dll"
+HKCR,"CLSID\{42071712-76d4-11d1-8b24-00a0c9068ff3}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+
+; deskmon.dll shell extension
+HKCR,"CLSID\{42071713-76d4-11d1-8b24-00a0c9068ff3}","",0x00000000,"Display Monitor CPL Extension"
+HKCR,"CLSID\{42071713-76d4-11d1-8b24-00a0c9068ff3}\InProcServer32","",0x00020000,"%SystemRoot%\system32\deskmon.dll"
+HKCR,"CLSID\{42071713-76d4-11d1-8b24-00a0c9068ff3}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+
+; For TCPIP Protocol property page
+HKCR,"CLSID\{A907657F-6FDF-11D0-8EFB-00C04FD912B2}","",0x00000000,"TCP/IP Configuration Notify Object"
+HKCR,"CLSID\{A907657F-6FDF-11D0-8EFB-00C04FD912B2}\InProcServer32","",0x00000000,"netcfgx.dll"
+HKCR,"CLSID\{A907657F-6FDF-11D0-8EFB-00C04FD912B2}\InProcServer32","ThreadingModel",0x00000000,"Both"
+
+; For dxdiagn.dll
+HKCR,"CLSID\{A65B8071-3BFE-4213-9A5B-491DA4461CA7}","",0x00000000,"DxDiagProvider Class"
+HKCR,"CLSID\{A65B8071-3BFE-4213-9A5B-491DA4461CA7}\InProcServer32","",0x00000000,"%SystemRoot%\system32\dxdiagn.dll"
+HKCR,"CLSID\{A65B8071-3BFE-4213-9A5B-491DA4461CA7}\InProcServer32","ThreadingModel",0x00000000,"Apartment"
+HKCR,"CLSID\{A65B8071-3BFE-4213-9A5B-491DA4461CA7}\ProgID","",0x00000000,"DxDiag.DxDiagProvider.1"
+HKCR,"CLSID\{A65B8071-3BFE-4213-9A5B-491DA4461CA7}\VersionIndependentProgID","",0x00000000,"DxDiag.DxDiagProvider"
+
+
+HKCR,"NDS\Clsid","",0x00000002,"{323991f0-7bad-11cf-b03d-00aa006e0975}"
+
+HKCR,"WinNT\Clsid","",0x00000002,"{8b20cd60-0f29-11cf-abc4-02608c9e7553}"
+
+
+; For language support:
+
+HKCR,"MIME",,0x00000012
+HKCR,"MIME\Database",,0x00000012
+HKCR,"MIME\Database\Rfc1766",,0x00000012
+HKCR,"MIME\Database\Rfc1766","0436",0x00000000,"af;Afrikaans"
+HKCR,"MIME\Database\Rfc1766","041C",0x00000000,"sq;Albanian"
+HKCR,"MIME\Database\Rfc1766","0001",0x00000000,"ar;Arabic"
+HKCR,"MIME\Database\Rfc1766","1401",0x00000000,"ar-dz;Arabic (Algeria)"
+HKCR,"MIME\Database\Rfc1766","3C01",0x00000000,"ar-bh;Arabic (Bahrain)"
+HKCR,"MIME\Database\Rfc1766","0C01",0x00000000,"ar-eg;Arabic (Egypt)"
+HKCR,"MIME\Database\Rfc1766","0801",0x00000000,"ar-iq;Arabic (Iraq)"
+HKCR,"MIME\Database\Rfc1766","2C01",0x00000000,"ar-jo;Arabic (Jordan)"
+HKCR,"MIME\Database\Rfc1766","3401",0x00000000,"ar-kw;Arabic (Kuwait)"
+HKCR,"MIME\Database\Rfc1766","3001",0x00000000,"ar-lb;Arabic (Lebanon)"
+HKCR,"MIME\Database\Rfc1766","1001",0x00000000,"ar-ly;Arabic (Libya)"
+HKCR,"MIME\Database\Rfc1766","1801",0x00000000,"ar-ma;Arabic (Morocco)"
+HKCR,"MIME\Database\Rfc1766","2001",0x00000000,"ar-om;Arabic (Oman)"
+HKCR,"MIME\Database\Rfc1766","4001",0x00000000,"ar-qa;Arabic (Qatar)"
+HKCR,"MIME\Database\Rfc1766","0401",0x00000000,"ar-sa;Arabic (Saudi Arabia)"
+HKCR,"MIME\Database\Rfc1766","2801",0x00000000,"ar-sy;Arabic (Syria)"
+HKCR,"MIME\Database\Rfc1766","1C01",0x00000000,"ar-tn;Arabic (Tunisia)"
+HKCR,"MIME\Database\Rfc1766","3801",0x00000000,"ar-ae;Arabic (U.A.E.)"
+HKCR,"MIME\Database\Rfc1766","2401",0x00000000,"ar-ye;Arabic (Yemen)"
+HKCR,"MIME\Database\Rfc1766","042B",0x00000000,"hy;Armenian"
+HKCR,"MIME\Database\Rfc1766","042D",0x00000000,"eu;Basque"
+HKCR,"MIME\Database\Rfc1766","0423",0x00000000,"be;Belarusian"
+HKCR,"MIME\Database\Rfc1766","0445",0x00000000,"bn;Bengali"
+HKCR,"MIME\Database\Rfc1766","0402",0x00000000,"bg;Bulgarian"
+HKCR,"MIME\Database\Rfc1766","0403",0x00000000,"ca;Catalan"
+HKCR,"MIME\Database\Rfc1766","0004",0x00000000,"zh;Chinese"
+HKCR,"MIME\Database\Rfc1766","0804",0x00000000,"zh-cn;Chinese (China)"
+HKCR,"MIME\Database\Rfc1766","0C04",0x00000000,"zh-hk;Chinese (Hong Kong SAR)"
+HKCR,"MIME\Database\Rfc1766","1004",0x00000000,"zh-sg;Chinese (Singapore)"
+HKCR,"MIME\Database\Rfc1766","0404",0x00000000,"zh-tw;Chinese (Taiwan)"
+HKCR,"MIME\Database\Rfc1766","041A",0x00000000,"hr;Croatian"
+HKCR,"MIME\Database\Rfc1766","0405",0x00000000,"cs;Czech"
+HKCR,"MIME\Database\Rfc1766","0406",0x00000000,"da;Danish"
+HKCR,"MIME\Database\Rfc1766","0813",0x00000000,"nl-be;Dutch (Belgium)"
+HKCR,"MIME\Database\Rfc1766","0413",0x00000000,"nl;Dutch (Netherlands)"
+HKCR,"MIME\Database\Rfc1766","0009",0x00000000,"en;English"
+HKCR,"MIME\Database\Rfc1766","0C09",0x00000000,"en-au;English (Australia)"
+HKCR,"MIME\Database\Rfc1766","2809",0x00000000,"en-bz;English (Belize)"
+HKCR,"MIME\Database\Rfc1766","1009",0x00000000,"en-ca;English (Canada)"
+HKCR,"MIME\Database\Rfc1766","1809",0x00000000,"en-ie;English (Ireland)"
+HKCR,"MIME\Database\Rfc1766","2009",0x00000000,"en-jm;English (Jamaica)"
+HKCR,"MIME\Database\Rfc1766","1409",0x00000000,"en-nz;English (New Zealand)"
+HKCR,"MIME\Database\Rfc1766","1C09",0x00000000,"en-za;English (South Africa)"
+HKCR,"MIME\Database\Rfc1766","2C09",0x00000000,"en-tt;English (Trinidad)"
+HKCR,"MIME\Database\Rfc1766","0809",0x00000000,"en-gb;English (United Kingdom)"
+HKCR,"MIME\Database\Rfc1766","0409",0x00000000,"en-us;English (United States)"
+HKCR,"MIME\Database\Rfc1766","048F",0x00000000,"eo;Esperanto"
+HKCR,"MIME\Database\Rfc1766","0425",0x00000000,"et;Estonian"
+HKCR,"MIME\Database\Rfc1766","0438",0x00000000,"fo;Faeroese"
+HKCR,"MIME\Database\Rfc1766","0429",0x00000000,"fa;Farsi"
+HKCR,"MIME\Database\Rfc1766","040B",0x00000000,"fi;Finnish"
+HKCR,"MIME\Database\Rfc1766","080C",0x00000000,"fr-be;French (Belgium)"
+HKCR,"MIME\Database\Rfc1766","0C0C",0x00000000,"fr-ca;French (Canada)"
+HKCR,"MIME\Database\Rfc1766","040C",0x00000000,"fr;French (France)"
+HKCR,"MIME\Database\Rfc1766","140C",0x00000000,"fr-lu;French (Luxembourg)"
+HKCR,"MIME\Database\Rfc1766","100C",0x00000000,"fr-ch;French (Switzerland)"
+HKCR,"MIME\Database\Rfc1766","043C",0x00000000,"gd;Gaelic"
+HKCR,"MIME\Database\Rfc1766","0C07",0x00000000,"de-at;German (Austria)"
+HKCR,"MIME\Database\Rfc1766","0407",0x00000000,"de;German (Germany)"
+HKCR,"MIME\Database\Rfc1766","1407",0x00000000,"de-li;German (Liechtenstein)"
+HKCR,"MIME\Database\Rfc1766","1007",0x00000000,"de-lu;German (Luxembourg)"
+HKCR,"MIME\Database\Rfc1766","0807",0x00000000,"de-ch;German (Switzerland)"
+HKCR,"MIME\Database\Rfc1766","0408",0x00000000,"el;Greek"
+HKCR,"MIME\Database\Rfc1766","040D",0x00000000,"he;Hebrew"
+HKCR,"MIME\Database\Rfc1766","0439",0x00000000,"hi;Hindi"
+HKCR,"MIME\Database\Rfc1766","040E",0x00000000,"hu;Hungarian"
+HKCR,"MIME\Database\Rfc1766","040F",0x00000000,"is;Icelandic"
+HKCR,"MIME\Database\Rfc1766","0421",0x00000000,"in;Indonesian"
+HKCR,"MIME\Database\Rfc1766","0410",0x00000000,"it;Italian (Italy)"
+HKCR,"MIME\Database\Rfc1766","0810",0x00000000,"it-ch;Italian (Switzerland)"
+HKCR,"MIME\Database\Rfc1766","0411",0x00000000,"ja;Japanese"
+HKCR,"MIME\Database\Rfc1766","0412",0x00000000,"ko;Korean"
+HKCR,"MIME\Database\Rfc1766","0426",0x00000000,"lv;Latvian"
+HKCR,"MIME\Database\Rfc1766","0427",0x00000000,"lt;Lithuanian"
+HKCR,"MIME\Database\Rfc1766","042F",0x00000000,"mk;FYRO Macedonian"
+HKCR,"MIME\Database\Rfc1766","043E",0x00000000,"ms;Malay (Malaysia)"
+HKCR,"MIME\Database\Rfc1766","043A",0x00000000,"mt;Maltese"
+HKCR,"MIME\Database\Rfc1766","0414",0x00000000,"no;Norwegian (Bokmal)"
+HKCR,"MIME\Database\Rfc1766","0814",0x00000000,"no;Norwegian (Nynorsk)"
+HKCR,"MIME\Database\Rfc1766","0415",0x00000000,"pl;Polish"
+HKCR,"MIME\Database\Rfc1766","0416",0x00000000,"pt-br;Portuguese (Brazil)"
+HKCR,"MIME\Database\Rfc1766","0816",0x00000000,"pt;Portuguese (Portugal)"
+HKCR,"MIME\Database\Rfc1766","0417",0x00000000,"rm;Rhaeto-Romanic"
+HKCR,"MIME\Database\Rfc1766","0418",0x00000000,"ro;Romanian"
+HKCR,"MIME\Database\Rfc1766","0818",0x00000000,"ro-mo;Romanian (Moldova)"
+HKCR,"MIME\Database\Rfc1766","0419",0x00000000,"ru;Russian"
+HKCR,"MIME\Database\Rfc1766","0819",0x00000000,"ru-mo;Russian (Moldova)"
+HKCR,"MIME\Database\Rfc1766","0C1A",0x00000000,"sr;Serbian (Cyrillic)"
+HKCR,"MIME\Database\Rfc1766","081A",0x00000000,"sr;Serbian (Latin)"
+HKCR,"MIME\Database\Rfc1766","041B",0x00000000,"sk;Slovak"
+HKCR,"MIME\Database\Rfc1766","0424",0x00000000,"sl;Slovenian"
+HKCR,"MIME\Database\Rfc1766","042E",0x00000000,"sb;Sorbian"
+HKCR,"MIME\Database\Rfc1766","2C0A",0x00000000,"es-ar;Spanish (Argentina)"
+HKCR,"MIME\Database\Rfc1766","400A",0x00000000,"es-bo;Spanish (Bolivia)"
+HKCR,"MIME\Database\Rfc1766","340A",0x00000000,"es-cl;Spanish (Chile)"
+HKCR,"MIME\Database\Rfc1766","240A",0x00000000,"es-co;Spanish (Colombia)"
+HKCR,"MIME\Database\Rfc1766","140A",0x00000000,"es-cr;Spanish (Costa Rica)"
+HKCR,"MIME\Database\Rfc1766","1C0A",0x00000000,"es-do;Spanish (Dominican Republic)"
+HKCR,"MIME\Database\Rfc1766","300A",0x00000000,"es-ec;Spanish (Ecuador)"
+HKCR,"MIME\Database\Rfc1766","440A",0x00000000,"es-sv;Spanish (El Salvador)"
+HKCR,"MIME\Database\Rfc1766","100A",0x00000000,"es-gt;Spanish (Guatemala)"
+HKCR,"MIME\Database\Rfc1766","480A",0x00000000,"es-hn;Spanish (Honduras)"
+HKCR,"MIME\Database\Rfc1766","0C0A",0x00000000,"es;Spanish (International Sort)"
+HKCR,"MIME\Database\Rfc1766","080A",0x00000000,"es-mx;Spanish (Mexico)"
+HKCR,"MIME\Database\Rfc1766","4C0A",0x00000000,"es-ni;Spanish (Nicaragua)"
+HKCR,"MIME\Database\Rfc1766","180A",0x00000000,"es-pa;Spanish (Panama)"
+HKCR,"MIME\Database\Rfc1766","3C0A",0x00000000,"es-py;Spanish (Paraguay)"
+HKCR,"MIME\Database\Rfc1766","280A",0x00000000,"es-pe;Spanish (Peru)"
+HKCR,"MIME\Database\Rfc1766","500A",0x00000000,"es-pr;Spanish (Puerto Rico)"
+HKCR,"MIME\Database\Rfc1766","040A",0x00000000,"es;Spanish (Traditional Sort)"
+HKCR,"MIME\Database\Rfc1766","380A",0x00000000,"es-uy;Spanish (Uruguay)"
+HKCR,"MIME\Database\Rfc1766","200A",0x00000000,"es-ve;Spanish (Venezuela)"
+HKCR,"MIME\Database\Rfc1766","0430",0x00000000,"sx;Sutu"
+HKCR,"MIME\Database\Rfc1766","041D",0x00000000,"sv;Swedish"
+HKCR,"MIME\Database\Rfc1766","081D",0x00000000,"sv-fi;Swedish (Finland)"
+HKCR,"MIME\Database\Rfc1766","041E",0x00000000,"th;Thai"
+HKCR,"MIME\Database\Rfc1766","0431",0x00000000,"ts;Tsonga"
+HKCR,"MIME\Database\Rfc1766","0432",0x00000000,"tn;Tswana"
+HKCR,"MIME\Database\Rfc1766","041F",0x00000000,"tr;Turkish"
+HKCR,"MIME\Database\Rfc1766","0422",0x00000000,"uk;Ukrainian"
+HKCR,"MIME\Database\Rfc1766","0420",0x00000000,"ur;Urdu"
+HKCR,"MIME\Database\Rfc1766","042A",0x00000000,"vi;Vietnamese"
+HKCR,"MIME\Database\Rfc1766","0490",0x00000000,"wa;Walloon"
+HKCR,"MIME\Database\Rfc1766","0434",0x00000000,"xh;Xhosa"
+HKCR,"MIME\Database\Rfc1766","043D",0x00000000,"ji;Yiddish"
+HKCR,"MIME\Database\Rfc1766","0435",0x00000000,"zu;Zulu"
+
+HKCR,TypeLib\{00020430-0000-0000-C000-000000000046}\1.0,,,"OLE Automation"
+HKCR,TypeLib\{00020430-0000-0000-C000-000000000046}\1.0\0\win16,,,"stdole.tlb"
+HKCR,TypeLib\{00020430-0000-0000-C000-000000000046}\1.0\0\win32,,,"stdole32.tlb"
+HKCR,TypeLib\{00020430-0000-0000-C000-000000000046}\1.0\FLAGS,,,"1"
+HKCR,TypeLib\{00020430-0000-0000-C000-000000000046}\2.0,,,"OLE Automation"
+HKCR,TypeLib\{00020430-0000-0000-C000-000000000046}\2.0\0\win32,,,"stdole2.tlb"
+HKCR,TypeLib\{00020430-0000-0000-C000-000000000046}\2.0\FLAGS,,,"0"
+
+; EOF
--- /dev/null
+[Version]
+Signature="$ReactOS$
+
+[AddReg]
+
+HKCU,"Console","CursorSize",0x00010003,25
+HKCU,"Console","FaceName",0x00000002,""
+HKCU,"Console","FontFamily",0x00010003,0
+HKCU,"Console","FontSize",0x00010003,0
+HKCU,"Console","FontWeight",0x00010003,0
+HKCU,"Console","FullScreen",0x00010003,0
+HKCU,"Console","HistoryBufferSize",0x00010003,50
+HKCU,"Console","InsertMode",0x00010003,1
+HKCU,"Console","LoadConIme",0x00010003,1
+HKCU,"Console","NumberOfHistoryBuffers",0x00010003,4
+HKCU,"Console","PopupColors",0x00010003,245
+HKCU,"Console","QuickEdit",0x00010003,0
+HKCU,"Console","ScreenBufferSize",0x00010003,19660880
+HKCU,"Console","ScreenColors",0x00010003,7
+HKCU,"Console","WindowSize",0x00010003,1638480
+HKCU,"Console","ColorTable00",0x00010003,0
+HKCU,"Console","ColorTable01",0x00010003,8388608
+HKCU,"Console","ColorTable02",0x00010003,32768
+HKCU,"Console","ColorTable03",0x00010003,8421376
+HKCU,"Console","ColorTable04",0x00010003,128
+HKCU,"Console","ColorTable05",0x00010003,8388736
+HKCU,"Console","ColorTable06",0x00010003,32896
+HKCU,"Console","ColorTable07",0x00010003,12632256
+HKCU,"Console","ColorTable08",0x00010003,8421504
+HKCU,"Console","ColorTable09",0x00010003,16711680
+HKCU,"Console","ColorTable10",0x00010003,65280
+HKCU,"Console","ColorTable11",0x00010003,16776960
+HKCU,"Console","ColorTable12",0x00010003,255
+HKCU,"Console","ColorTable13",0x00010003,16711935
+HKCU,"Console","ColorTable14",0x00010003,65535
+HKCU,"Console","ColorTable15",0x00010003,16777215
+
+HKCU,"Control Panel",,0x00000012
+
+; Accessibility
+HKCU,"Control Panel\Accessibility",,0x00000012
+HKCU,"Control Panel\Accessibility\Keyboard Preference",,0x00000012
+HKCU,"Control Panel\Accessibility\Keyboard Preference","On",2,"0"
+HKCU,"Control Panel\Accessibility\HighContrast","Flags",2,"126"
+HKCU,"Control Panel\Accessibility\HighContrast","High Contrast Scheme",2,"High Contrast Black (large)"
+HKCU,"Control Panel\Accessibility\Keyboard Response","AutoRepeatDelay",2,"1000"
+HKCU,"Control Panel\Accessibility\Keyboard Response","AutoRepeatRate",2,"500"
+HKCU,"Control Panel\Accessibility\Keyboard Response","BounceTime",2,"0"
+HKCU,"Control Panel\Accessibility\Keyboard Response","DelayBeforeAcceptance",2,"1000"
+HKCU,"Control Panel\Accessibility\Keyboard Response","Flags",2,"126"
+HKCU,"Control Panel\Accessibility\MouseKeys","Flags",2,"62"
+HKCU,"Control Panel\Accessibility\MouseKeys","MaximumSpeed",2,"80"
+HKCU,"Control Panel\Accessibility\MouseKeys","TimeToMaximumSpeed",2,"3000"
+HKCU,"Control Panel\Accessibility\ShowSounds","On",2,"0"
+HKCU,"Control Panel\Accessibility\SoundSentry","Flags",2,"2"
+HKCU,"Control Panel\Accessibility\SoundSentry","FSTextEffect",2,"0"
+HKCU,"Control Panel\Accessibility\SoundSentry","WindowsEffect",2,"1"
+HKCU,"Control Panel\Accessibility\StickyKeys","Flags",2,"510"
+HKCU,"Control Panel\Accessibility\TimeOut","Flags",2,"2"
+HKCU,"Control Panel\Accessibility\TimeOut","TimeToWait",2,"300000"
+HKCU,"Control Panel\Accessibility\ToggleKeys","Flags",2,"62"
+HKCU,"Control Panel\Accessibility\Blind Access","On",2,"0"
+
+HKCU,"Control Panel\Mouse","MouseTrails",0x00000002,"0"
+HKCU,"Control Panel\Mouse","SnapToDefaultButton",0x00000002,"0"
+HKCU,"Control Panel\Mouse","MouseSpeed",0x00000002,"1"
+HKCU,"Control Panel\Mouse","MouseThreshold1",0x00000002,"6"
+HKCU,"Control Panel\Mouse","MouseThreshold2",0x00000002,"10"
+HKCU,"Control Panel\Mouse","DoubleClickSpeed",0x00000002,"500"
+HKCU,"Control Panel\Mouse","SwapMouseButtons",0x00000002,"0"
+HKCU,"Control Panel\Mouse","MouseSensitivity",0x00000002,"10"
+HKCU,"Control Panel\Mouse","MouseHoverTime",0x00000002,"400"
+HKCU,"Control Panel\Mouse","MouseHoverWidth",0x00000002,"4"
+HKCU,"Control Panel\Mouse","MouseHoverHeight",0x00000002,"4"
+HKCU,"Control Panel\Mouse","DoubleClickWidth",0x00000002,"4"
+HKCU,"Control Panel\Mouse","DoubleClickHeight",0x00000002,"4"
+
+HKCU,"Control Panel\Keyboard","InitialKeyboardIndicators",2,"0x80000000"
+HKCU,"Control Panel\Keyboard","KeyboardDelay",2,"1"
+HKCU,"Control Panel\Keyboard","KeyboardSpeed",2,"31"
+
+HKCU,"Control Panel\Desktop","ActiveWndTrkTimeout",0x00010003,0x00000000
+HKCU,"Control Panel\Desktop","AutoEndTasks",2,"0"
+HKCU,"Control Panel\Desktop","CaretWidth",0x00010003,0x00000001
+HKCU,"Control Panel\Desktop","CoolSwitch",2,"1"
+HKCU,"Control Panel\Desktop","CoolSwitchColumns",2,"7"
+HKCU,"Control Panel\Desktop","CoolSwitchRows",2,"3"
+HKCU,"Control Panel\Desktop","CursorBlinkRate",2,"530"
+HKCU,"Control Panel\Desktop","DragFullWindows",2,"0"
+HKCU,"Control Panel\Desktop","DragHeight",0x00000000,"4"
+HKCU,"Control Panel\Desktop","DragWidth",0x00000000,"4"
+HKCU,"Control Panel\Desktop","PaintDesktopVersion",0x00010001,"0"
+HKCU,"Control Panel\Desktop","HungAppTimeout",2,"5000"
+HKCU,"Control Panel\Desktop","SCRNSAVE.EXE",0,""
+HKCU,"Control Panel\Desktop","ScreenSaveActive",2,"1"
+HKCU,"Control Panel\Desktop","ScreenSaverIsSecure",2,"1"
+HKCU,"Control Panel\Desktop","ScreenSaveTimeOut",0,"600"
+HKCU,"Control Panel\Desktop","WaitToKillAppTimeout",2,"20000"
+HKCU,"Control Panel\Desktop","Wallpaper",0x00000000,""
+HKCU,"Control Panel\Desktop","FontSmoothing",2,"0"
+HKCU,"Control Panel\Desktop","FontSmoothingOrientation",0x00010003,0x00000001
+HKCU,"Control Panel\Desktop","FontSmoothingType",0x00010003,0x00000001
+HKCU,"Control Panel\Desktop","ForegroundFlashCount",0x00010003,0x00000003
+HKCU,"Control Panel\Desktop","ForegroundLockTimeout",0x00010003,0x00030d40
+HKCU,"Control Panel\Desktop","GridGranularity",2,"0"
+HKCU,"Control Panel\Desktop","SmoothScroll",3,00,00,00,00
+HKCU,"Control Panel\Desktop","UserPreferencesMask",3,10,00,00,80
+HKCU,"Control Panel\Desktop","LowPowerActive",2,"0"
+HKCU,"Control Panel\Desktop","LowPowerTimeOut",2,"0"
+HKCU,"Control Panel\Desktop","PowerOffActive",2,"0"
+HKCU,"Control Panel\Desktop","PowerOffTimeOut",2,"0"
+HKCU,"Control Panel\Desktop","MenuShowDelay",2,"400"
+HKCU,"Control Panel\Desktop","WheelScrollLines",2,"3"
+HKCU,"Control Panel\Desktop","WheelScrollChars",2,"3"
+HKCU,"Control Panel\Desktop","TileWallpaper",2,"0"
+HKCU,"Control Panel\Desktop","Pattern",2,"(None)"
+
+HKCU,"Control Panel\Desktop\WindowMetrics","ScrollWidth",2,"16"
+HKCU,"Control Panel\Desktop\WindowMetrics","ScrollHeight",2,"16"
+HKCU,"Control Panel\Desktop\WindowMetrics","CaptionWidth",2,"18"
+HKCU,"Control Panel\Desktop\WindowMetrics","CaptionHeight",2,"18"
+HKCU,"Control Panel\Desktop\WindowMetrics","SmCaptionWidth",2,"13"
+HKCU,"Control Panel\Desktop\WindowMetrics","SmCaptionHeight",2,"15"
+HKCU,"Control Panel\Desktop\WindowMetrics","MenuWidth",2,"18"
+HKCU,"Control Panel\Desktop\WindowMetrics","MenuHeight",2,"18"
+HKCU,"Control Panel\Desktop\WindowMetrics","BorderWidth",2,"1"
+HKCU,"Control Panel\Desktop\WindowMetrics","Shell Icon Size",2,"32"
+HKCU, "Control Panel\Desktop\WindowMetrics","CaptionFont",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,01,00,00,00,00,54,00,61,00,68,00,6f,00,6d,\
+00,61,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU, "Control Panel\Desktop\WindowMetrics","IconFont",0x00000001,f5,ff,ff,ff,00,00,00,00,\
+00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,01,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,\
+61,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU, "Control Panel\Desktop\WindowMetrics","MenuFont",0x00000001,f5,ff,ff,ff,00,00,00,00,\
+00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,01,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,\
+61,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU, "Control Panel\Desktop\WindowMetrics","MessageFont",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,01,00,00,00,00,54,00,61,00,68,00,6f,00,6d,\
+00,61,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU, "Control Panel\Desktop\WindowMetrics","SmCaptionFont",0x00000001,f5,ff,ff,ff,00,00,\
+00,00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,01,00,00,00,00,54,00,61,00,68,00,6f,00,\
+6d,00,61,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU, "Control Panel\Desktop\WindowMetrics","StatusFont",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,01,00,00,00,00,54,00,61,00,68,00,6f,00,6d,\
+00,61,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+
+; Input Methods
+HKCU,"Control Panel\Input Method\Hot Keys",,0x00000012
+HKCU,"Control Panel\Input Method\Hot Keys\00000010","Key Modifiers",0x00030003,02,c0,00,00
+HKCU,"Control Panel\Input Method\Hot Keys\00000010","Target IME",0x00030003,00,00,00,00
+HKCU,"Control Panel\Input Method\Hot Keys\00000010","Virtual Key",0x00030003,20,00,00,00
+HKCU,"Control Panel\Input Method\Hot Keys\00000011","Key Modifiers",0x00030003,04,c0,00,00
+HKCU,"Control Panel\Input Method\Hot Keys\00000011","Target IME",0x00030003,00,00,00,00
+HKCU,"Control Panel\Input Method\Hot Keys\00000011","Virtual Key",0x00030003,20,00,00,00
+HKCU,"Control Panel\Input Method\Hot Keys\00000012","Key Modifiers",0x00030003,02,c0,00,00
+HKCU,"Control Panel\Input Method\Hot Keys\00000012","Target IME",0x00030003,00,00,00,00
+HKCU,"Control Panel\Input Method\Hot Keys\00000012","Virtual Key",0x00030003,be,00,00,00
+HKCU,"Control Panel\Input Method\Hot Keys\00000070","Key Modifiers",0x00030003,02,c0,00,00
+HKCU,"Control Panel\Input Method\Hot Keys\00000070","Target IME",0x00030003,00,00,00,00
+HKCU,"Control Panel\Input Method\Hot Keys\00000070","Virtual Key",0x00030003,20,00,00,00
+HKCU,"Control Panel\Input Method\Hot Keys\00000071","Key Modifiers",0x00030003,04,c0,00,00
+HKCU,"Control Panel\Input Method\Hot Keys\00000071","Target IME",0x00030003,00,00,00,00
+HKCU,"Control Panel\Input Method\Hot Keys\00000071","Virtual Key",0x00030003,20,00,00,00
+HKCU,"Control Panel\Input Method\Hot Keys\00000072","Key Modifiers",0x00030003,03,c0,00,00
+HKCU,"Control Panel\Input Method\Hot Keys\00000072","Target IME",0x00030003,00,00,00,00
+HKCU,"Control Panel\Input Method\Hot Keys\00000072","Virtual Key",0x00030003,bc,00,00,00
+HKCU,"Control Panel\Input Method\Hot Keys\00000200","Key Modifiers",0x00030003,03,C0,00,00
+HKCU,"Control Panel\Input Method\Hot Keys\00000200","Target IME",0x00030003,00,00,00,00
+HKCU,"Control Panel\Input Method\Hot Keys\00000200","Virtual Key",0x00030003,47,00,00,00
+HKCU,"Control Panel\Input Method\Hot Keys\00000201","Key Modifiers",0x00030003,03,c0,00,00
+HKCU,"Control Panel\Input Method\Hot Keys\00000201","Target IME",0x00030003,00,00,00,00
+HKCU,"Control Panel\Input Method\Hot Keys\00000201","Virtual Key",0x00030003,4b,00,00,00
+HKCU,"Control Panel\Input Method\Hot Keys\00000202","Key Modifiers",0x00030003,03,c0,00,00
+HKCU,"Control Panel\Input Method\Hot Keys\00000202","Target IME",0x00030003,00,00,00,00
+HKCU,"Control Panel\Input Method\Hot Keys\00000202","Virtual Key",0x00030003,4c,00,00,00
+
+; International keys
+HKCU,"Control Panel\International",,0x00000012
+HKCU,"Control Panel\International","Locale",0x00000000,"0409"
+HKCU,"Control Panel\International","iCountry",2,"1"
+HKCU,"Control Panel\International","iCurrDigits",2,"2"
+HKCU,"Control Panel\International","iCurrency",2,"0"
+HKCU,"Control Panel\International","iDate",2,"0"
+HKCU,"Control Panel\International","iDigits",2,"2"
+HKCU,"Control Panel\International","iLZero",2,"1"
+HKCU,"Control Panel\International","iMeasure",2,"1"
+HKCU,"Control Panel\International","iNegCurr",2,"0"
+HKCU,"Control Panel\International","iTime",2,"0"
+HKCU,"Control Panel\International","iTLZero",2,"0"
+HKCU,"Control Panel\International","s1159",2,"AM"
+HKCU,"Control Panel\International","s2359",2,"PM"
+HKCU,"Control Panel\International","sCountry",2,"United States"
+HKCU,"Control Panel\International","sCurrency",2,"$"
+HKCU,"Control Panel\International","sDate",2,"/"
+HKCU,"Control Panel\International","sDecimal",2,"."
+;HKCU,"Control Panel\International","sLanguage",2,"ENU"
+HKCU,"Control Panel\International","sList",2,","
+HKCU,"Control Panel\International","sLongDate",2,"dddd, MMMM dd, yyyy"
+HKCU,"Control Panel\International","sShortDate",2,"M/d/yyyy"
+HKCU,"Control Panel\International","sThousand",2,","
+HKCU,"Control Panel\International","sTime",2,":"
+HKCU,"Control Panel\International\Geo","Nation",0x00000000,"1"
+
+; Cursors Schemes
+HKCU,"Control Panel\Cursors",,,"ReactOS Default"
+HKCU,"Control Panel\Cursors","Scheme Source",0x00010001,0x00000002
+
+; PowerCfg
+HKCU,"Control Panel\PowerCfg","CurrentPowerPolicy",2,"0"
+HKCU,"Control Panel\PowerCfg\GlobalPowerPolicy","Policies",0x00030003,01,00,00,00,00,\
+00,00,00,03,00,00,00,10,00,00,00,00,00,00,00,03,00,00,00,10,00,00,00,02,00,00,00,03,\
+00,00,00,00,00,00,00,02,00,00,00,03,00,00,00,00,00,00,00,02,00,00,00,01,00,00,00,00,\
+00,00,00,02,00,00,00,01,00,00,00,00,00,00,00,01,00,00,00,03,00,00,00,03,00,00,00,00,\
+00,00,C0,01,00,00,00,05,00,00,00,01,00,00,00,0A,00,00,00,00,00,00,00,03,00,00,00,01,\
+00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,16,\
+00,00,00
+
+HKCU,"Control Panel\PowerCfg\PowerPolicies\0","Name",2,"Home/Office Desk"
+HKCU,"Control Panel\PowerCfg\PowerPolicies\0","Description",2,"This scheme is suited to most home or desktop computers that are left plugged in all the time."
+HKCU,"Control Panel\PowerCfg\PowerPolicies\0","Policies",0x00030003,01,00,00,00,02,00,\
+00,00,01,00,00,00,00,00,00,00,02,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,2C,01,\
+00,00,32,32,00,03,04,00,00,00,04,00,00,00,00,00,00,00,00,00,00,00,B0,04,00,00,2C,01,\
+00,00,00,00,00,00,58,02,00,00,01,01,64,50,64,64,00,00
+
+HKCU,"Control Panel\PowerCfg\PowerPolicies\1","Name",2,"Portable/Laptop"
+HKCU,"Control Panel\PowerCfg\PowerPolicies\1","Description",2,"This scheme is designed for extended battery life for portable computers on the road."
+HKCU,"Control Panel\PowerCfg\PowerPolicies\1","Policies",0x00030003,01,00,00,00,02,00,\
+00,00,01,00,00,00,00,00,00,00,02,00,00,00,01,00,00,00,00,00,00,00,B0,04,00,00,2C,01,\
+00,00,32,32,03,03,04,00,00,00,04,00,00,00,00,00,00,00,00,00,00,00,84,03,00,00,2C,01,\
+00,00,08,07,00,00,2C,01,00,00,01,01,64,50,64,64,00,00
+
+HKCU,"Control Panel\PowerCfg\PowerPolicies\2","Name",2,"Presentation"
+HKCU,"Control Panel\PowerCfg\PowerPolicies\2","Description",2,"This scheme keeps the monitor on for doing presentations."
+HKCU,"Control Panel\PowerCfg\PowerPolicies\2","Policies",0x00030003,01,00,00,00,02,00,\
+00,00,01,00,00,00,00,00,00,00,02,00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,84,03,\
+00,00,32,32,03,02,04,00,00,00,04,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,2C,01,00,00,01,01,50,50,64,64,00,00
+
+HKCU,"Control Panel\PowerCfg\PowerPolicies\3","Name",2,"Always On"
+HKCU,"Control Panel\PowerCfg\PowerPolicies\3","Description",2,"This scheme keeps the computer running so that it can be accessed from the network. Use this scheme if you do not have network wakeup hardware."
+HKCU,"Control Panel\PowerCfg\PowerPolicies\3","Policies",0x00030003,01,00,00,00,02,00,\
+00,00,01,00,00,00,00,00,00,00,02,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,32,32,00,00,04,00,00,00,04,00,00,00,00,00,00,00,00,00,00,00,B0,04,00,00,84,03,\
+00,00,00,00,00,00,08,07,00,00,00,01,64,64,64,64,00,00
+
+HKCU,"Control Panel\PowerCfg\PowerPolicies\4","Name",2,"Minimal Power Management"
+HKCU,"Control Panel\PowerCfg\PowerPolicies\4","Description",2,"This scheme keeps the computer on and optimizes it for high performance."
+HKCU,"Control Panel\PowerCfg\PowerPolicies\4","Policies",0x00030003,01,00,00,00,02,00,\
+00,00,01,00,00,00,00,00,00,00,02,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,2C,01,\
+00,00,32,32,03,03,04,00,00,00,04,00,00,00,00,00,00,00,00,00,00,00,84,03,00,00,2C,01,\
+00,00,00,00,00,00,84,03,00,00,00,01,64,64,64,64,00,00
+
+HKCU,"Control Panel\PowerCfg\PowerPolicies\5","Name",2,"Max Battery"
+HKCU,"Control Panel\PowerCfg\PowerPolicies\5","Description",2,"This scheme is extremely aggressive for saving power."
+HKCU,"Control Panel\PowerCfg\PowerPolicies\5","Policies",0x00030003,01,00,00,00,02,00,\
+00,00,01,00,00,00,00,00,00,00,02,00,00,00,05,00,00,00,00,00,00,00,B0,04,00,00,78,00,\
+00,00,32,32,03,02,04,00,00,00,04,00,00,00,00,00,00,00,00,00,00,00,84,03,00,00,3C,00,\
+00,00,00,00,00,00,B4,00,00,00,01,01,64,32,64,64,00,00
+
+; Color schemes
+HKCU,"Control Panel\Current","Color Schemes",0x00020000,"ReactOS Standard"
+HKCU,"Control Panel\Appearance","Current",0x00020000,"ReactOS Standard"
+HKCU,"Control Panel\Appearance","NewCurrent",0x00020000,"ReactOS Standard"
+HKCU,"Control Panel\Appearance\New Schemes","SelectedSize",0x00020000,"0"
+HKCU,"Control Panel\Appearance\New Schemes","SelectedStyle",0x00020000,"0"
+; ReactOS Standard
+HKCU,"Control Panel\Appearance\New Schemes\0","DisplayName",0x00020000,"@themeui.dll,-883"
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","DisplayName",0x00020000,"@themeui.dll,-2019"
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Flat Menus",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Font #0",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Font #1",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Font #2",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Font #3",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Font #4",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Font #5",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #0",0x00010001,0x00c8d0d4
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #1",0x00010001,0x00a56e3a
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #2",0x00010001,0x006a240a
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #3",0x00010001,0x00808080
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #4",0x00010001,0x00c8d0d4
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #5",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #6",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #7",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #8",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #9",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #10",0x00010001,0x00c8d0d4
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #11",0x00010001,0x00c8d0d4
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #12",0x00010001,0x00808080
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #13",0x00010001,0x006a240a
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #14",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #15",0x00010001,0x00c8d0d4
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #16",0x00010001,0x00808080
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #17",0x00010001,0x00808080
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #18",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #19",0x00010001,0x00c8d0d4
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #20",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #21",0x00010001,0x00404040
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #22",0x00010001,0x00c8d0d4
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #23",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #24",0x00010001,0x00e1ffff
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #25",0x00010001,0x00b5b5b5
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #26",0x00010001,0x00800000
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #27",0x00010001,0x00f0caa6
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #28",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #29",0x00010001,0x006a240a
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Color #30",0x00010001,0x00c8d0d4
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","Contrast",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\0\Sizes\0","LegacyName",0x00020000,"ReactOS Standard"
+; Brick
+HKCU,"Control Panel\Appearance\New Schemes\1","DisplayName",0x00020000,"@themeui.dll,-851"
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","DisplayName",0x00020000,"@themeui.dll,-2019"
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Flat Menus",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Font #0",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Font #1",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Font #2",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Font #3",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Font #4",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Font #5",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #0",0x00010001,0x02d2e0e1
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #1",0x00010001,0x00000042
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #2",0x00010001,0x00000080
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #3",0x00010001,0x0061898d
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #4",0x00010001,0x00a5bfc2
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #5",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #6",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #7",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #8",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #9",0x00010001,0x00d2e0e1
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #10",0x00010001,0x00a5bfc2
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #11",0x00010001,0x00a5bfc2
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #12",0x00010001,0x00d2e0e1
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #13",0x00010001,0x0061898d
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #14",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #15",0x00010001,0x00a5bfc2
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #16",0x00010001,0x0261898d
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #17",0x00010001,0x0261898d
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #18",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #19",0x00010001,0x00d2e0e1
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #20",0x00010001,0x02d2e0e1
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #21",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #22",0x00010001,0x02a5bfc2
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #23",0x00010001,0x00000080
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #24",0x00010001,0x00d2e0e1
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #25",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #26",0x00010001,0x02000080
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #27",0x00010001,0x004074b0
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #28",0x00010001,0x0070b8c8
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #29",0x00010001,0x00808000
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Color #30",0x00010001,0x00a5bfc2
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","Contrast",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\1\Sizes\0","LegacyName",0x00020000,"Brick"
+; Eggplant
+HKCU,"Control Panel\Appearance\New Schemes\2","DisplayName",0x00020000,"@themeui.dll,-851"
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","DisplayName",0x00020000,"@themeui.dll,-2019"
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Flat Menus",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Font #0",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Font #1",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Font #2",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Font #3",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Font #4",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Font #5",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #0",0x00010001,0x02a8b090
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #1",0x00010001,0x00400040
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #2",0x00010001,0x00788058
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #3",0x00010001,0x00a8b090
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #4",0x00010001,0x00a8b090
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #5",0x00010001,0x02ffffff
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #6",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #7",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #8",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #9",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #10",0x00010001,0x02a8b090
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #11",0x00010001,0x02a8b090
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #12",0x00010001,0x02808080
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #13",0x00010001,0x00788058
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #14",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #15",0x00010001,0x02a8b090
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #16",0x00010001,0x02788058
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #17",0x00010001,0x02788058
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #18",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #19",0x00010001,0x00788058
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #20",0x00010001,0x02d8d8c8
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #21",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #22",0x00010001,0x02a8b090
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #23",0x00010001,0x00800080
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #24",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #25",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #26",0x00010001,0x02788058
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #27",0x00010001,0x00834b83
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #28",0x00010001,0x00d2bdcb
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #29",0x00010001,0x00788058
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Color #30",0x00010001,0x00a8b090
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","Contrast",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\2\Sizes\0","LegacyName",0x00020000,"Eggplant"
+; Green Olive
+HKCU,"Control Panel\Appearance\New Schemes\3","DisplayName",0x00020000,"@themeui.dll,-877"
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","DisplayName",0x00020000,"@themeui.dll,-2019"
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Flat Menus",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Font #0",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Font #1",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Font #2",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Font #3",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Font #4",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Font #5",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #0",0x00010001,0x02d3e3d0
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #1",0x00010001,0x00213f21
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #2",0x00010001,0x00649759
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #3",0x00010001,0x00808080
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #4",0x00010001,0x00a9c8a2
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #5",0x00010001,0x02ffffff
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #6",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #7",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #8",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #9",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #10",0x00010001,0x02a9c8a2
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #11",0x00010001,0x02a9c8a2
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #12",0x00010001,0x02d3e3d0
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #13",0x00010001,0x00649759
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #14",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #15",0x00010001,0x02a9c8a2
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #16",0x00010001,0x02649759
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #17",0x00010001,0x02649759
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #18",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #19",0x00010001,0x00d3e3d0
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #20",0x00010001,0x02d3e3d0
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #21",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #22",0x00010001,0x02a9c8a2
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #23",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #24",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #25",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #26",0x00010001,0x02649759
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #27",0x00010001,0x00e8c898
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #28",0x00010001,0x00b0cca8
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #29",0x00010001,0x00649759
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Color #30",0x00010001,0x00a9c8a2
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","Contrast",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\3\Sizes\0","LegacyName",0x00020000,"Green Olive"
+; High Contrast 1
+HKCU,"Control Panel\Appearance\New Schemes\4","DisplayName",0x00020000,"@themeui.dll,-851"
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","DisplayName",0x00020000,"@themeui.dll,-2019"
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Flat Menus",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Font #0",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Font #1",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Font #2",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Font #3",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Font #4",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Font #5",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #0",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #1",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #2",0x00010001,0x00ff0000
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #3",0x00010001,0x00ffff00
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #4",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #5",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #6",0x00010001,0x02ffffff
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #7",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #8",0x00010001,0x0000ffff
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #9",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #10",0x00010001,0x00ff0000
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #11",0x00010001,0x00ffff00
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #12",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #13",0x00010001,0x00008000
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #14",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #15",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #16",0x00010001,0x02808080
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #17",0x00010001,0x0200ff00
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #18",0x00010001,0x02ffffff
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #19",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #20",0x00010001,0x02c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #21",0x00010001,0x02ffffff
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #22",0x00010001,0x02ffffff
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #23",0x00010001,0x0000ffff
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #24",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #25",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #26",0x00010001,0x02800080
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #27",0x00010001,0x00ff0000
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #28",0x00010001,0x00ffff00
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #29",0x00010001,0x00008000
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Color #30",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","Contrast",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\4\Sizes\0","LegacyName",0x00020000,"High Contrast 1"
+; High Contrast 2
+HKCU,"Control Panel\Appearance\New Schemes\5","DisplayName",0x00020000,"@themeui.dll,-851"
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","DisplayName",0x00020000,"@themeui.dll,-2019"
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Flat Menus",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Font #0",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Font #1",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Font #2",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Font #3",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Font #4",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Font #5",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #0",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #1",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #2",0x00010001,0x00ffff00
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #3",0x00010001,0x00ff0000
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #4",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #5",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #6",0x00010001,0x02ffffff
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #7",0x00010001,0x0000ff00
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #8",0x00010001,0x0000ff00
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #9",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #10",0x00010001,0x00ffff00
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #11",0x00010001,0x00ff0000
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #12",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #13",0x00010001,0x00ff0000
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #14",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #15",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #16",0x00010001,0x02808080
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #17",0x00010001,0x0200ff00
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #18",0x00010001,0x0000ff00
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #19",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #20",0x00010001,0x02c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #21",0x00010001,0x02ffffff
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #22",0x00010001,0x02ffffff
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #23",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #24",0x00010001,0x0000ffff
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #25",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #26",0x00010001,0x02800080
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #27",0x00010001,0x00ffff00
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #28",0x00010001,0x00ff0000
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #29",0x00010001,0x00ff0000
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Color #30",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","Contrast",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\5\Sizes\0","LegacyName",0x00020000,"High Contrast 2"
+; High Contrast Black
+HKCU,"Control Panel\Appearance\New Schemes\6","DisplayName",0x00020000,"@themeui.dll,-851"
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","DisplayName",0x00020000,"@themeui.dll,-2019"
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Flat Menus",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Font #0",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Font #1",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Font #2",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Font #3",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Font #4",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Font #5",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #0",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #1",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #2",0x00010001,0x00800080
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #3",0x00010001,0x00008000
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #4",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #5",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #6",0x00010001,0x02ffffff
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #7",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #8",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #9",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #10",0x00010001,0x0200ffff
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #11",0x00010001,0x02008000
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #12",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #13",0x00010001,0x00800080
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #14",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #15",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #16",0x00010001,0x02808080
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #17",0x00010001,0x0200ff00
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #18",0x00010001,0x02ffffff
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #19",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #20",0x00010001,0x02c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #21",0x00010001,0x02ffffff
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #22",0x00010001,0x02ffffff
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #23",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #24",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #25",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #26",0x00010001,0x02800080
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #27",0x00010001,0x00800080
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #28",0x00010001,0x00008000
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #29",0x00010001,0x00800080
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Color #30",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","Contrast",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\6\Sizes\0","LegacyName",0x00020000,"High Contrast Black"
+; High Contrast White
+HKCU,"Control Panel\Appearance\New Schemes\7","DisplayName",0x00020000,"@themeui.dll,-851"
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","DisplayName",0x00020000,"@themeui.dll,-2019"
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Flat Menus",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Font #0",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Font #1",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Font #2",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Font #3",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Font #4",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Font #5",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #0",0x00010001,0x02ffffff
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #1",0x00010001,0x02ffffff
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #2",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #3",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #4",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #5",0x00010001,0x02ffffff
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #6",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #7",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #8",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #9",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #10",0x00010001,0x02808080
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #11",0x00010001,0x02c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #12",0x00010001,0x02808080
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #13",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #14",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #15",0x00010001,0x02ffffff
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #16",0x00010001,0x02808080
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #17",0x00010001,0x0200ff00
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #18",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #19",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #20",0x00010001,0x02c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #21",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #22",0x00010001,0x02c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #23",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #24",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #25",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #26",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #27",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #28",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #29",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Color #30",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","Contrast",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\7\Sizes\0","LegacyName",0x00020000,"High Contrast White"
+; Lilac
+HKCU,"Control Panel\Appearance\New Schemes\8","DisplayName",0x00020000,"@themeui.dll,-851"
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","DisplayName",0x00020000,"@themeui.dll,-2019"
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Flat Menus",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Font #0",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Font #1",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Font #2",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Font #3",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Font #4",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Font #5",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #0",0x00010001,0x02d9a8ae
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #1",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #2",0x00010001,0x00b14e5a
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #3",0x00010001,0x00808080
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #4",0x00010001,0x00d9a8ae
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #5",0x00010001,0x02ffffff
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #6",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #7",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #8",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #9",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #10",0x00010001,0x02d9a8ae
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #11",0x00010001,0x02d9a8ae
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #12",0x00010001,0x02b14e5a
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #13",0x00010001,0x00b14e5a
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #14",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #15",0x00010001,0x02d9a8ae
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #16",0x00010001,0x02b14e5a
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #17",0x00010001,0x02b14e5a
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #18",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #19",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #20",0x00010001,0x02ecd5d8
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #21",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #22",0x00010001,0x02d9a8ae
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #23",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #24",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #25",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #26",0x00010001,0x02b14e5a
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #27",0x00010001,0x00cb8fb6
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #28",0x00010001,0x00d0b4b8
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #29",0x00010001,0x00b14e5a
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Color #30",0x00010001,0x00d9a8ae
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","Contrast",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\8\Sizes\0","LegacyName",0x00020000,"Lilac"
+; Maple
+HKCU,"Control Panel\Appearance\New Schemes\9","DisplayName",0x00020000,"@themeui.dll,-851"
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","DisplayName",0x00020000,"@themeui.dll,-2019"
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Flat Menus",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Font #0",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Font #1",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Font #2",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Font #3",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Font #4",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Font #5",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #0",0x00010001,0x02d7ecf2
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #1",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #2",0x00010001,0x00000080
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #3",0x00010001,0x0046a6c6
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #4",0x00010001,0x00aed8e6
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #5",0x00010001,0x02ffffff
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #6",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #7",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #8",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #9",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #10",0x00010001,0x02aed8e6
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #11",0x00010001,0x02aed8e6
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #12",0x00010001,0x0246a6c6
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #13",0x00010001,0x0046a6c6
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #14",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #15",0x00010001,0x02aed8e6
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #16",0x00010001,0x0246a6c6
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #17",0x00010001,0x0246a6c6
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #18",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #19",0x00010001,0x00d7ecf2
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #20",0x00010001,0x02d7ecf2
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #21",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #22",0x00010001,0x02aed8e6
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #23",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #24",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #25",0x00010001,0x02c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #26",0x00010001,0x0246a6c6
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #27",0x00010001,0x00389cc0
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #28",0x00010001,0x0088c8e0
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #29",0x00010001,0x0046a6c6
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Color #30",0x00010001,0x00aed8e6
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","Contrast",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\9\Sizes\0","LegacyName",0x00020000,"Maple"
+; Marine
+HKCU,"Control Panel\Appearance\New Schemes\10","DisplayName",0x00020000,"@themeui.dll,-851"
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","DisplayName",0x00020000,"@themeui.dll,-2019"
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Flat Menus",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Font #0",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Font #1",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Font #2",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Font #3",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Font #4",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Font #5",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #0",0x00010001,0x02d8e0c8
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #1",0x00010001,0x00474e2c
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #2",0x00010001,0x00800000
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #3",0x00010001,0x00889048
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #4",0x00010001,0x00b8c088
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #5",0x00010001,0x02d8e0c8
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #6",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #7",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #8",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #9",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #10",0x00010001,0x02b8c088
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #11",0x00010001,0x02b8c088
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #12",0x00010001,0x00848d4b
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #13",0x00010001,0x00800000
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #14",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #15",0x00010001,0x02b8c088
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #16",0x00010001,0x02889048
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #17",0x00010001,0x02889048
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #18",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #19",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #20",0x00010001,0x02d8e0c8
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #21",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #22",0x00010001,0x02b8c088
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #23",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #24",0x00010001,0x00d8e0c8
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #25",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #26",0x00010001,0x02800000
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #27",0x00010001,0x00c0b418
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #28",0x00010001,0x00d8cc78
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #29",0x00010001,0x00800000
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Color #30",0x00010001,0x00b8c088
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","Contrast",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\10\Sizes\0","LegacyName",0x00020000,"Marine"
+; Plum
+HKCU,"Control Panel\Appearance\New Schemes\11","DisplayName",0x00020000,"@themeui.dll,-869"
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","DisplayName",0x00020000,"@themeui.dll,-2019"
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Flat Menus",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Font #0",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Font #1",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Font #2",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Font #3",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Font #4",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Font #5",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #0",0x00010001,0x00c8d0d8
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #1",0x00010001,0x00402840
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #2",0x00010001,0x00604048
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #3",0x00010001,0x00586078
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #4",0x00010001,0x009098a8
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #5",0x00010001,0x00c8d0d8
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #6",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #7",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #8",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #9",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #10",0x00010001,0x009098a8
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #11",0x00010001,0x009098a8
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #12",0x00010001,0x005a6374
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #13",0x00010001,0x00808000
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #14",0x00010001,0x00c8d0d8
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #15",0x00010001,0x009098a8
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #16",0x00010001,0x00586078
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #17",0x00010001,0x00586078
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #18",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #19",0x00010001,0x009098a8
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #20",0x00010001,0x00c8d0d8
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #21",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #22",0x00010001,0x009098a8
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #23",0x00010001,0x00580030
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #24",0x00010001,0x00c8ccd5
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #25",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #26",0x00010001,0x00604048
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #27",0x00010001,0x00b884a0
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #28",0x00010001,0x007898a8
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #29",0x00010001,0x00808000
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Color #30",0x00010001,0x009098a8
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","Contrast",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\11\Sizes\0","LegacyName",0x00020000,"Plum"
+; Pumpkin
+HKCU,"Control Panel\Appearance\New Schemes\12","DisplayName",0x00020000,"@themeui.dll,-851"
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","DisplayName",0x00020000,"@themeui.dll,-2019"
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Flat Menus",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Font #0",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Font #1",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Font #2",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Font #3",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Font #4",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Font #5",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #0",0x00010001,0x02cfeaf5
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #1",0x00010001,0x00420042
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #2",0x00010001,0x002fa5d7
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #3",0x00010001,0x00a4a0a0
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #4",0x00010001,0x009dd5ec
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #5",0x00010001,0x02ffffff
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #6",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #7",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #8",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #9",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #10",0x00010001,0x029dd5ec
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #11",0x00010001,0x029dd5ec
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #12",0x00010001,0x02cfeaf5
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #13",0x00010001,0x00800080
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #14",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #15",0x00010001,0x029dd5ec
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #16",0x00010001,0x022fa5d7
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #17",0x00010001,0x022fa5d7
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #18",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #19",0x00010001,0x00cfeaf5
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #20",0x00010001,0x02cfeaf5
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #21",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #22",0x00010001,0x029dd5ec
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #23",0x00010001,0x00800080
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #24",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #25",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #26",0x00010001,0x022fa5d7
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #27",0x00010001,0x0088cce0
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #28",0x00010001,0x0090ccd0
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #29",0x00010001,0x00800080
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Color #30",0x00010001,0x009dd5ec
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","Contrast",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\12\Sizes\0","LegacyName",0x00020000,"Pumpkin"
+; Rainy Day
+HKCU,"Control Panel\Appearance\New Schemes\13","DisplayName",0x00020000,"@themeui.dll,-851"
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","DisplayName",0x00020000,"@themeui.dll,-2019"
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Flat Menus",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Font #0",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Font #1",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Font #2",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Font #3",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Font #4",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Font #5",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #0",0x00010001,0x02d9ccc1
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #1",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #2",0x00010001,0x007d654f
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #3",0x00010001,0x00808080
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #4",0x00010001,0x00b19983
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #5",0x00010001,0x02ffffff
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #6",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #7",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #8",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #9",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #10",0x00010001,0x02b19983
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #11",0x00010001,0x02b19983
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #12",0x00010001,0x02808080
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #13",0x00010001,0x007d654f
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #14",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #15",0x00010001,0x02b19983
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #16",0x00010001,0x027d654f
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #17",0x00010001,0x027d654f
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #18",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #19",0x00010001,0x00d9ccc1
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #20",0x00010001,0x02d9ccc1
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #21",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #22",0x00010001,0x02b19983
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #23",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #24",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #25",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #26",0x00010001,0x027d654f
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #27",0x00010001,0x00d0b480
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #28",0x00010001,0x00d0bcb0
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #29",0x00010001,0x007d654f
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Color #30",0x00010001,0x00b19983
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","Contrast",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\13\Sizes\0","LegacyName",0x00020000,"Rainy Day"
+; ReactOS Classic
+HKCU,"Control Panel\Appearance\New Schemes\14","DisplayName",0x00020000,"@themeui.dll,-880"
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","DisplayName",0x00020000,"@themeui.dll,-2019"
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Flat Menus",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Font #0",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Font #1",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Font #2",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Font #3",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Font #4",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Font #5",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #0",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #1",0x00010001,0x00a56e3a
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #2",0x00010001,0x00800000
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #3",0x00010001,0x00808080
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #4",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #5",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #6",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #7",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #8",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #9",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #10",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #11",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #12",0x00010001,0x00808080
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #13",0x00010001,0x00800000
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #14",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #15",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #16",0x00010001,0x00808080
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #17",0x00010001,0x00808080
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #18",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #19",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #20",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #21",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #22",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #23",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #24",0x00010001,0x00e1ffff
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #25",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #26",0x00010001,0x00800000
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #27",0x00010001,0x00d08410
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #28",0x00010001,0x00b5b5b5
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #29",0x00010001,0x00800000
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Color #30",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","Contrast",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\14\Sizes\0","LegacyName",0x00020000,"ReactOS Classic"
+; Rose
+HKCU,"Control Panel\Appearance\New Schemes\15","DisplayName",0x00020000,"@themeui.dll,-851"
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","DisplayName",0x00020000,"@themeui.dll,-2019"
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Flat Menus",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Font #0",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Font #1",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Font #2",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Font #3",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Font #4",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Font #5",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #0",0x00010001,0x02b7afcf
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #1",0x00010001,0x02808080
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #2",0x00010001,0x0070609f
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #3",0x00010001,0x00a4a0a0
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #4",0x00010001,0x00b7afcf
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #5",0x00010001,0x02ffffff
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #6",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #7",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #8",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #9",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #10",0x00010001,0x02b7afcf
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #11",0x00010001,0x02b7afcf
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #12",0x00010001,0x0270609f
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #13",0x00010001,0x0070609f
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #14",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #15",0x00010001,0x02b7afcf
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #16",0x00010001,0x0270609f
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #17",0x00010001,0x0270609f
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #18",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #19",0x00010001,0x007d7d7d
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #20",0x00010001,0x02dcd8e7
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #21",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #22",0x00010001,0x02b7afcf
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #23",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #24",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #25",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #26",0x00010001,0x0270609f
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #27",0x00010001,0x00d0ccd8
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #28",0x00010001,0x00d0d4d0
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #29",0x00010001,0x0070609f
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Color #30",0x00010001,0x00b7afcf
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","Contrast",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\15\Sizes\0","LegacyName",0x00020000,"Rose"
+; Sand
+HKCU,"Control Panel\Appearance\New Schemes\16","DisplayName",0x00020000,"@themeui.dll,-851"
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","DisplayName",0x00020000,"@themeui.dll,-2019"
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Flat Menus",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Font #0",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Font #1",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Font #2",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Font #3",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Font #4",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Font #5",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #0",0x00010001,0x02dde6ea
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #1",0x00010001,0x02688da2
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #2",0x00010001,0x00808000
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #3",0x00010001,0x00688da2
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #4",0x00010001,0x00bbccd5
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #5",0x00010001,0x02ffffff
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #6",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #7",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #8",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #9",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #10",0x00010001,0x02bbccd5
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #11",0x00010001,0x02bbccd5
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #12",0x00010001,0x02688da2
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #13",0x00010001,0x00808000
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #14",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #15",0x00010001,0x02bbccd5
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #16",0x00010001,0x02688da2
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #17",0x00010001,0x02688da2
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #18",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #19",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #20",0x00010001,0x02dde6ea
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #21",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #22",0x00010001,0x02bbccd5
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #23",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #24",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #25",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #26",0x00010001,0x02808000
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #27",0x00010001,0x00aabd84
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #28",0x00010001,0x0080d0e8
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #29",0x00010001,0x00808000
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Color #30",0x00010001,0x00bbccd5
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","Contrast",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\16\Sizes\0","LegacyName",0x00020000,"Sand"
+; Sky (WinXP-like)
+HKCU,"Control Panel\Appearance\New Schemes\17","DisplayName",0x00020000,"@themeui.dll,-851"
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","DisplayName",0x00020000,"@themeui.dll,-2019"
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Flat Menus",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Font #0",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Font #1",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Font #2",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Font #3",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Font #4",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Font #5",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #0",0x00010001,0x00c8d0d4
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #1",0x00010001,0x00984e00
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #2",0x00010001,0x00e35400
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #3",0x00010001,0x00df967a
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #4",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #5",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #6",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #7",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #8",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #9",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #10",0x00010001,0x00c8d0d4
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #11",0x00010001,0x00c8d0d4
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #12",0x00010001,0x00808080
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #13",0x00010001,0x00c56a31
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #14",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #15",0x00010001,0x00d8e9ec
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #16",0x00010001,0x0099a8ac
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #17",0x00010001,0x0099a8ac
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #18",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #19",0x00010001,0x00f8e4d8
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #20",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #21",0x00010001,0x00646f71
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #22",0x00010001,0x00e2eff1
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #23",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #24",0x00010001,0x00e1ffff
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #25",0x00010001,0x00b5b5b5
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #26",0x00010001,0x00800000
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #27",0x00010001,0x00ff953d
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #28",0x00010001,0x00ebb99d
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #29",0x00010001,0x00c56a31
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Color #30",0x00010001,0x00d8e9ec
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","Contrast",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\17\Sizes\0","LegacyName",0x00020000,"Sky"
+; Slate
+HKCU,"Control Panel\Appearance\New Schemes\18","DisplayName",0x00020000,"@themeui.dll,-851"
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","DisplayName",0x00020000,"@themeui.dll,-2019"
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Flat Menus",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Font #0",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Font #1",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Font #2",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Font #3",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Font #4",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Font #5",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #0",0x00010001,0x02e3dcce
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #1",0x00010001,0x00414141
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #2",0x00010001,0x00978055
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #3",0x00010001,0x00808080
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #4",0x00010001,0x00c8b99d
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #5",0x00010001,0x02ffffff
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #6",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #7",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #8",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #9",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #10",0x00010001,0x02c8b99d
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #11",0x00010001,0x02c8b99d
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #12",0x00010001,0x00424242
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #13",0x00010001,0x00978055
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #14",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #15",0x00010001,0x02c8b99d
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #16",0x00010001,0x02978055
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #17",0x00010001,0x02978055
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #18",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #19",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #20",0x00010001,0x02e3dcce
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #21",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #22",0x00010001,0x02c8b99d
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #23",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #24",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #25",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #26",0x00010001,0x02978055
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #27",0x00010001,0x00d8b888
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #28",0x00010001,0x00c8bca0
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #29",0x00010001,0x00978055
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Color #30",0x00010001,0x00c8b99d
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","Contrast",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\18\Sizes\0","LegacyName",0x00020000,"Slate"
+; Storm
+HKCU,"Control Panel\Appearance\New Schemes\19","DisplayName",0x00020000,"@themeui.dll,-851"
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","DisplayName",0x00020000,"@themeui.dll,-2019"
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Flat Menus",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Font #0",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Font #1",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Font #2",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Font #3",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Font #4",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Font #5",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #0",0x00010001,0x02c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #1",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #2",0x00010001,0x00800080
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #3",0x00010001,0x00808080
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #4",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #5",0x00010001,0x02ffffff
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #6",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #7",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #8",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #9",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #10",0x00010001,0x02c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #11",0x00010001,0x02c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #12",0x00010001,0x02808080
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #13",0x00010001,0x00800080
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #14",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #15",0x00010001,0x02c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #16",0x00010001,0x02808080
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #17",0x00010001,0x02808080
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #18",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #19",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #20",0x00010001,0x02ffffff
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #21",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #22",0x00010001,0x02c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #23",0x00010001,0x00800080
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #24",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #25",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #26",0x00010001,0x02800080
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #27",0x00010001,0x00b08c38
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #28",0x00010001,0x00a8aca8
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #29",0x00010001,0x00800080
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Color #30",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","Contrast",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\19\Sizes\0","LegacyName",0x00020000,"Storm"
+; Teal
+HKCU,"Control Panel\Appearance\New Schemes\20","DisplayName",0x00020000,"@themeui.dll,-851"
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","DisplayName",0x00020000,"@themeui.dll,-2019"
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Flat Menus",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Font #0",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Font #1",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Font #2",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Font #3",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Font #4",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Font #5",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #0",0x00010001,0x02c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #1",0x00010001,0x00404000
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #2",0x00010001,0x00808000
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #3",0x00010001,0x00808080
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #4",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #5",0x00010001,0x02ffffff
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #6",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #7",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #8",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #9",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #10",0x00010001,0x02c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #11",0x00010001,0x02c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #12",0x00010001,0x02808080
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #13",0x00010001,0x00808000
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #14",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #15",0x00010001,0x02c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #16",0x00010001,0x02808080
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #17",0x00010001,0x02808080
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #18",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #19",0x00010001,0x00f0fbff
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #20",0x00010001,0x02ffffff
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #21",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #22",0x00010001,0x02c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #23",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #24",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #25",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #26",0x00010001,0x02808000
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #27",0x00010001,0x00d8cc00
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #28",0x00010001,0x00b8c898
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #29",0x00010001,0x00808000
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Color #30",0x00010001,0x00c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","Contrast",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\20\Sizes\0","LegacyName",0x00020000,"Teal"
+; Wheat
+HKCU,"Control Panel\Appearance\New Schemes\21","DisplayName",0x00020000,"@themeui.dll,-851"
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","DisplayName",0x00020000,"@themeui.dll,-2019"
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Flat Menus",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Font #0",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Font #1",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,bc,02,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Font #2",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Font #3",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Font #4",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Font #5",0x00000001,f5,ff,ff,ff,00,00,00,\
+00,00,00,00,00,00,00,00,00,90,01,00,00,00,00,00,00,00,00,00,00,54,00,61,00,68,00,6f,00,6d,00,61,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
+00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #0",0x00010001,0x02d0eeee
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #1",0x00010001,0x021d4000
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #2",0x00010001,0x00008080
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #3",0x00010001,0x0041bcbc
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #4",0x00010001,0x00a0dede
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #5",0x00010001,0x02ffffff
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #6",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #7",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #8",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #9",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #10",0x00010001,0x02a0dede
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #11",0x00010001,0x02a0dede
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #12",0x00010001,0x0241bcbc
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #13",0x00010001,0x00008080
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #14",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #15",0x00010001,0x02a0dede
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #16",0x00010001,0x0241bcbc
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #17",0x00010001,0x0241bcbc
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #18",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #19",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #20",0x00010001,0x02d0eeee
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #21",0x00010001,0x02000000
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #22",0x00010001,0x02a0dede
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #23",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #24",0x00010001,0x00ffffff
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #25",0x00010001,0x02c0c0c0
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #26",0x00010001,0x02008080
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #27",0x00010001,0x0048b0c8
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #28",0x00010001,0x0080b8b8
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #29",0x00010001,0x00008080
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Color #30",0x00010001,0x00a0dede
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","Contrast",0x00010001,0x00000000
+HKCU,"Control Panel\Appearance\New Schemes\21\Sizes\0","LegacyName",0x00020000,"Wheat"
+
+HKCU,"Control Panel\Sound","Beep",2,"yes"
+HKCU,"Control Panel\Sound","ExtendedSounds",2,"yes"
+
+HKCU,"Environment",,0x00000012
+HKCU,"Environment","TEMP",0x00020000,"%USERPROFILE%\Local Settings\Temp"
+HKCU,"Environment","TMP",0x00020000,"%USERPROFILE%\Local Settings\Temp"
+
+HKCU,"SOFTWARE",,0x00000012
+HKCU,"SOFTWARE\Policies",,0x00000012
+HKCU,"SOFTWARE\Microsoft",,0x00000012
+
+; DirectX version report as DirectX 9.0
+HKCU,"SOFTWARE\Microsoft\DirectX","Debug",0x00010001,0x00000000
+HKCU,"SOFTWARE\Microsoft\DirectX","InstalledVersion",0x00000001,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x00
+HKCU,"SOFTWARE\Microsoft\DirectX","InstallMDX",0x00010001,0x00000001
+HKCU,"SOFTWARE\Microsoft\DirectX","RC",0x00010001,0x00000000
+HKCU,"SOFTWARE\Microsoft\DirectX","Version",0x00000000,"5.03.2600.2180"
+
+; Open With settings
+HKCU,"SOFTWARE\Classes",,0x00000012
+HKCU,"SOFTWARE\Classes\Applications",,0x00000012
+
+; Current user shell folder settings
+HKCU,"SOFTWARE\Microsoft\Windows",,0x00000012
+HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion",,0x00000012
+HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer",,0x00000012
+HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders",,0x00000012
+HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders",,0x00000012
+HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts",,0x00000012
+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\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}",,0x00000012
+
+; default shell
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon",,0x00000012
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","Shell",0x00020000,"%SystemRoot%\explorer.exe"
+
+HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Policies",,0x00000012
+HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Run",,0x00000012
+HKCU,"Software\Microsoft\Windows\CurrentVersion\Telephony",,0x00000012
+HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall",,0x00000012
+
+HKCU,"SOFTWARE\Microsoft\Windows NT",,0x00000012
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion",,0x00000012
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Devices",,0x00000012
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Network",,0x00000012
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\PrinterPorts",,0x00000012
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Program Manager",,0x00000012
+
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows","DebugOptions",2,"2048"
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows","device",2,""
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows","Documents",2,""
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows","DosPrint",2,"no"
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows","load",2,""
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows","NetMessage",2,"no"
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows","NullPort",2,"None"
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows","Programs",2,"com exe bat pif cmd"
+
+; Application compatibility settings for Windows 95
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WIN95","MajorVersion",0x00010001,0x00000004
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WIN95","MinorVersion",0x00010001,0x0000000A
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WIN95","BuildNumber",0x00010001,0x000003B6
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WIN95","PlatformId",0x00010001,0x00000001
+; Application compatibility settings for Windows 98/ME
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WIN98","MajorVersion",0x00010001,0x00000004
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WIN98","MinorVersion",0x00010001,0x00000000
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WIN98","BuildNumber",0x00010001,0x000008AE
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WIN98","PlatformId",0x00010001,0x00000001
+; Application compatibility settings for Windows NT 4 Service Pack 5
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\NT4SP5","MajorVersion",0x00010001,0x00000004
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\NT4SP5","MinorVersion",0x00010001,0x00000000
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\NT4SP5","BuildNumber",0x00010001,0x00000565
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\NT4SP5","PlatformId",0x00010001,0x00000002
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\NT4SP5","SPMajorVersion",0x00010001,0x00000005
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\NT4SP5","SPMinorVersion",0x00010001,0x00000000
+; Application compatibility settings for Windows 2000
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WIN2000","MajorVersion",0x00010001,0x00000005
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WIN2000","MinorVersion",0x00010001,0x00000000
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WIN2000","BuildNumber",0x00010001,0x00000893
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WIN2000","PlatformId",0x00010001,0x00000002
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WIN2000","SPMajorVersion",0x00010001,0x00000003
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WIN2000","SPMinorVersion",0x00010001,0x00000000
+; Application compatibility settings for Windows XP
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WINXP","MajorVersion",0x00010001,0x00000005
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WINXP","MinorVersion",0x00010001,0x00000001
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WINXP","BuildNumber",0x00010001,0x00000A28
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WINXP","PlatformId",0x00010001,0x00000002
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WINXP","SPMajorVersion",0x00010001,0x00000001
+HKCU,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\WINXP","SPMinorVersion",0x00010001,0x00000000
+
+; DEBUG: Windows Messages SPY configuration
+HKCU,"SOFTWARE\ReactOS\Debug","SpyInclude",0x00020000,"INCLUDEALL"
+;HKCU,"SOFTWARE\ReactOS\Debug","SpyExclude",0x00020000,""
+;HKCU,"SOFTWARE\ReactOS\Debug","SpyExcludeDWP",0x00020000,""
+
+; Internet Explorer
+
+HKCU,Software\Wine\MSHTML,"GeckoUrl",,"http://source.winehq.org/winegecko.php"
+HKCU,Software\Wine\MSHTML,"GeckoCabDir",0x00020000,"%SystemRoot%\"
+
+; Sound Schemes
+HKCU,"AppEvents",,0x00000012
+HKCU,"AppEvents\Schemes","",0x00000000,".Default"
+HKCU,"AppEvents\Schemes\Apps",,0x00000012
+HKCU,"AppEvents\Schemes\Apps\.Default","",0x00000000,"ReactOS"
+HKCU,"AppEvents\Schemes\Apps\.Default","DispFileName",0x00000000,"@mmsys.cpl,-5856"
+HKCU,"AppEvents\Schemes\Apps\.Default\.Default",,0x00000012
+HKCU,"AppEvents\Schemes\Apps\.Default\.Default\.Current","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\.Default\.Default","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\AppGPFault",,0x00000012
+HKCU,"AppEvents\Schemes\Apps\.Default\AppGPFault\.Current","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\AppGPFault\.Default","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\Close",,0x00000012
+HKCU,"AppEvents\Schemes\Apps\.Default\Close\.Current","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\Close\.Default","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\CriticalBatteryAlarm",,0x00000012
+HKCU,"AppEvents\Schemes\Apps\.Default\CriticalBatteryAlarm\.Current","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\CriticalBatteryAlarm\.Default","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\DeviceConnect",,0x00000012
+HKCU,"AppEvents\Schemes\Apps\.Default\DeviceConnect\.Current","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\DeviceConnect\.Default","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\DeviceDisconnect",,0x00000012
+HKCU,"AppEvents\Schemes\Apps\.Default\DeviceDisconnect\.Current","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\DeviceDisconnect\.Default","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\DeviceFail",,0x00000012
+HKCU,"AppEvents\Schemes\Apps\.Default\DeviceFail\.Current","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\DeviceFail\.Default","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\LowBatteryAlarm",,0x00000012
+HKCU,"AppEvents\Schemes\Apps\.Default\LowBatteryAlarm\.Current","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\LowBatteryAlarm\.Default","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\MailBeep",,0x00000012
+HKCU,"AppEvents\Schemes\Apps\.Default\MailBeep\.Current","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\MailBeep\.Default","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\Maximize",,0x00000012
+HKCU,"AppEvents\Schemes\Apps\.Default\Maximize\.Current","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\Maximize\.Default","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\MenuCommand",,0x00000012
+HKCU,"AppEvents\Schemes\Apps\.Default\MenuCommand\.Current","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\MenuCommand\.Default","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\MenuPopup",,0x00000012
+HKCU,"AppEvents\Schemes\Apps\.Default\MenuPopup\.Current","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\MenuPopup\.Default","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\Minimize",,0x00000012
+HKCU,"AppEvents\Schemes\Apps\.Default\Minimize\.Current","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\Minimize\.Default","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\Open",,0x00000012
+HKCU,"AppEvents\Schemes\Apps\.Default\Open\.Current","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\Open\.Default","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\PrintComplete",,0x00000012
+HKCU,"AppEvents\Schemes\Apps\.Default\PrintComplete\.Current","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\PrintComplete\.Default","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\RestoreDown",,0x00000012
+HKCU,"AppEvents\Schemes\Apps\.Default\RestoreDown\.Current","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\RestoreDown\.Default","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\RestoreUp",,0x00000012
+HKCU,"AppEvents\Schemes\Apps\.Default\RestoreUp\.Current","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\RestoreUp\.Default","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\SystemAsterisk",,0x00000012
+HKCU,"AppEvents\Schemes\Apps\.Default\SystemAsterisk\.Current","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\SystemAsterisk\.Default","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\SystemExclamation",,0x00000012
+HKCU,"AppEvents\Schemes\Apps\.Default\SystemExclamation\.Current","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\SystemExclamation\.Default","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\SystemExit",,0x00000012
+HKCU,"AppEvents\Schemes\Apps\.Default\SystemExit\.Current","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\SystemExit\.Default","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\SystemHand",,0x00000012
+HKCU,"AppEvents\Schemes\Apps\.Default\SystemHand\.Current","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\SystemHand\.Default","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\SystemNotification",,0x00000012
+HKCU,"AppEvents\Schemes\Apps\.Default\SystemNotification\.Current","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\SystemNotification\.Default","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\SystemQuestion",,0x00000012
+HKCU,"AppEvents\Schemes\Apps\.Default\SystemQuestion\.Current","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\SystemQuestion\.Default","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\SystemStart",,0x00000012
+HKCU,"AppEvents\Schemes\Apps\.Default\SystemStart\.Current","",0x00020000,"%SystemRoot%\media\ReactOS_LogOn.wav"
+HKCU,"AppEvents\Schemes\Apps\.Default\SystemStart\.Default","",0x00020000,"%SystemRoot%\media\ReactOS_LogOn.wav"
+HKCU,"AppEvents\Schemes\Apps\.Default\WindowsLogoff",,0x00000012
+HKCU,"AppEvents\Schemes\Apps\.Default\WindowsLogoff\.Current","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\WindowsLogoff\.Default","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\WindowsLogon",,0x00000012
+HKCU,"AppEvents\Schemes\Apps\.Default\WindowsLogon\.Current","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\.Default\WindowsLogon\.Default","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\Explorer","",0x00000002,"ReactOS Explorer"
+HKCU,"AppEvents\Schemes\Apps\Explorer","DispFileName",0x00000000,"@mmsys.cpl,-5854"
+HKCU,"AppEvents\Schemes\Apps\Explorer\EmptyRecycleBin",,0x00000012
+HKCU,"AppEvents\Schemes\Apps\Explorer\EmptyRecycleBin\.Current","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\Explorer\EmptyRecycleBin\.Default","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\Explorer\Navigating",,0x00000012
+HKCU,"AppEvents\Schemes\Apps\Explorer\Navigating\.Current","",0x00020000,""
+HKCU,"AppEvents\Schemes\Apps\Explorer\Navigating\.Default","",0x00020000,""
+HKCU,"AppEvents\Schemes\Names",,0x00000012
+HKCU,"AppEvents\Schemes\Names\.Default","",0x00000002,"ReactOS Default"
+HKCU,"AppEvents\Schemes\Names\.None","",0x00000002,"No sounds"
+
+HKCU,"AppEvents\EventLabels",,0x00000012
+HKCU,"AppEvents\EventLabels\.Default","",0x00000000,"Default Beep"
+HKCU,"AppEvents\EventLabels\.Default","DispFileName",0x00000000,"@mmsys.cpl,-5824"
+HKCU,"AppEvents\EventLabels\AppGPFault","",0x00000000,"Program error"
+HKCU,"AppEvents\EventLabels\AppGPFault","DispFileName",0x00000000,"@mmsys.cpl,-5825"
+HKCU,"AppEvents\EventLabels\Close","",0x00000000,"Close program"
+HKCU,"AppEvents\EventLabels\Close","DispFileName",0x00000000,"@mmsys.cpl,-5826"
+HKCU,"AppEvents\EventLabels\CriticalBatteryAlarm","",0x00000000,"Critical Battery Alarm"
+HKCU,"AppEvents\EventLabels\CriticalBatteryAlarm","DispFileName",0x00000000,"@mmsys.cpl,-5827"
+HKCU,"AppEvents\EventLabels\DeviceConnect","",0x00000000,"Device Connect"
+HKCU,"AppEvents\EventLabels\DeviceConnect","DispFileName",0x00000000,"@mmsys.cpl,-5828"
+HKCU,"AppEvents\EventLabels\DeviceDisconnect","",0x00000000,"Device Disconnect"
+HKCU,"AppEvents\EventLabels\DeviceDisconnect","DispFileName",0x00000000,"@mmsys.cpl,-5829"
+HKCU,"AppEvents\EventLabels\DeviceFail","",0x00000000,"Device Failed to Connect"
+HKCU,"AppEvents\EventLabels\DeviceFail","DispFileName",0x00000000,"@mmsys.cpl,-5830"
+HKCU,"AppEvents\EventLabels\EmptyRecycleBin","",0x00000000,"Empty Recycle Bin"
+HKCU,"AppEvents\EventLabels\EmptyRecycleBin","DispFileName",0x00000000,"@mmsys.cpl,-5831"
+HKCU,"AppEvents\EventLabels\LowBatteryAlarm","",0x00000000,"Low Battery Alarm"
+HKCU,"AppEvents\EventLabels\LowBatteryAlarm","DispFileName",0x00000000,"@mmsys.cpl,-5832"
+HKCU,"AppEvents\EventLabels\Maximize","",0x00000000,"Maximize"
+HKCU,"AppEvents\EventLabels\Maximize","DispFileName",0x00000000,"@mmsys.cpl,-5833"
+HKCU,"AppEvents\EventLabels\MenuCommand","",0x00000000,"Menu command"
+HKCU,"AppEvents\EventLabels\MenuCommand","DispFileName",0x00000000,"@mmsys.cpl,-5834"
+HKCU,"AppEvents\EventLabels\MenuPopup","",0x00000000,"Menu popup"
+HKCU,"AppEvents\EventLabels\MenuPopup","DispFileName",0x00000000,"@mmsys.cpl,-5835"
+HKCU,"AppEvents\EventLabels\Minimize","",0x00000000,"Minimize"
+HKCU,"AppEvents\EventLabels\Minimize","DispFileName",0x00000000,"@mmsys.cpl,-5836"
+HKCU,"AppEvents\EventLabels\MailBeep","",0x00000000,"New Mail Notification"
+HKCU,"AppEvents\EventLabels\MailBeep","DispFileName",0x00000000,"@mmsys.cpl,-5837"
+HKCU,"AppEvents\EventLabels\Navigating","",0x00000000,"Start Navigation"
+HKCU,"AppEvents\EventLabels\Navigating","DispFileName",0x00000000,"@mmsys.cpl,-5838"
+HKCU,"AppEvents\EventLabels\Open","",0x00000000,"Open program"
+HKCU,"AppEvents\EventLabels\Open","DispFileName",0x00000000,"@mmsys.cpl,-5839"
+HKCU,"AppEvents\EventLabels\PrintComplete","",0x00000000,"Print Complete"
+HKCU,"AppEvents\EventLabels\PrintComplete","DispFileName",0x00000000,"@mmsys.cpl,-5840"
+HKCU,"AppEvents\EventLabels\RestoreDown","",0x00000000,"Restore Down"
+HKCU,"AppEvents\EventLabels\RestoreDown","DispFileName",0x00000000,"@mmsys.cpl,-5841"
+HKCU,"AppEvents\EventLabels\RestoreUp","",0x00000000,"Restore Up"
+HKCU,"AppEvents\EventLabels\RestoreUp","DispFileName",0x00000000,"@mmsys.cpl,-5842"
+HKCU,"AppEvents\EventLabels\SystemAsterisk","",0x00000000,"Asterisk"
+HKCU,"AppEvents\EventLabels\SystemAsterisk","DispFileName",0x00000000,"@mmsys.cpl,-5843"
+HKCU,"AppEvents\EventLabels\SystemExclamation","",0x00000000,"Exclamation"
+HKCU,"AppEvents\EventLabels\SystemExclamation","DispFileName",0x00000000,"@mmsys.cpl,-5845"
+HKCU,"AppEvents\EventLabels\SystemExit","",0x00000000,"Exit ReactOS"
+HKCU,"AppEvents\EventLabels\SystemExit","DispFileName",0x00000000,"@mmsys.cpl,-5846"
+HKCU,"AppEvents\EventLabels\SystemHand","",0x00000000,"Critical Stop"
+HKCU,"AppEvents\EventLabels\SystemHand","DispFileName",0x00000000,"@mmsys.cpl,-5847"
+HKCU,"AppEvents\EventLabels\SystemNotification","",0x00000000,"System Notification"
+HKCU,"AppEvents\EventLabels\SystemNotification","DispFileName",0x00000000,"@mmsys.cpl,-5848"
+HKCU,"AppEvents\EventLabels\SystemQuestion","",0x00000000,"Question"
+HKCU,"AppEvents\EventLabels\SystemQuestion","DispFileName",0x00000000,"@mmsys.cpl,-5849"
+HKCU,"AppEvents\EventLabels\SystemStart","",0x00000000,"Start ReactOS"
+HKCU,"AppEvents\EventLabels\SystemStart","DispFileName",0x00000000,"@mmsys.cpl,-5850"
+HKCU,"AppEvents\EventLabels\WindowsLogoff","",0x00000000,"ReactOS Logoff"
+HKCU,"AppEvents\EventLabels\WindowsLogoff","DispFileName",0x00000000,"@mmsys.cpl,-5852"
+HKCU,"AppEvents\EventLabels\WindowsLogon","",0x00000000,"ReactOS Logon"
+HKCU,"AppEvents\EventLabels\WindowsLogon","DispFileName",0x00000000,"@mmsys.cpl,-5853"
+
+; EOF
--- /dev/null
+[Version]
+Signature = "$ReactOS$"
+
+[AddReg]
+; Enable _one_ driver per section by removing the leading semicolon.
+
+;
+; Display driver section
+;
+
+; VBE SVGA driver
+HKLM,"SYSTEM\CurrentControlSet\Services\VBE","Start",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\VBE\Device0","DefaultSettings.VRefresh",0x00010001,1
+HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\VBE\Device0","DefaultSettings.BitsPerPel",0x00010001,16
+HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\VBE\Device0","DefaultSettings.XResolution",0x00010001,800
+HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\VBE\Device0","DefaultSettings.YResolution",0x00010001,600
+
+; VGA miniport driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Vga","Start",0x00010001,0x00000001
--- /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"
+
+; DirectX
+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
+
+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",0x00020000,"5.2"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","CSDVersion",0x00020000,"Service Pack 2"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","CurrentBuildNumber",0x00020000,"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
+
+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
+
+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",0x00000000,"0x00000002"
+;HKLM,"Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\loaddll.exe","GlobalFlag",0x00000000,"0x00000002"
+;HKLM,"Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\soffice.exe","GlobalFlag",0x00000000,"0x00000002"
+;HKLM,"Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\tlstest.exe","GlobalFlag",0x00000000,"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"
+
+; Mesa OpenGL Driver
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers","DefaultDriver",0x00000000,"Mesa"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\Mesa","Version",0x00010001,0x00000002
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\Mesa","Dll",0x00000000,"mesa32"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\Mesa","DriverVersion",0x00010001,0x00000010
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\Mesa","Flags",0x00010001,0x00000001
+
+; 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
+; SysFontSubstitutes are also returned by EnumFontFamilies, FontSubstitutes aren't
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts",,0x00000012
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\SysFontSubstitutes",,0x00000012
+
+; 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\Russian Standard Time","Display",0x00000000,"(GMT+03: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,\
+0x4c,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\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+05: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,\
+0xd4,0xfe,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\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+06:00) Almaty, Novosibirsk"
+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,\
+0x98,0xfe,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\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+07: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,\
+0x5c,0xfe,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\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\North Asia East Standard Time","Display",0x00000000,"(GMT+08:00) Irkutsk, Ulaan Bataar"
+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,\
+0x20,0xfe,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\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+09: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,\
+0xe4,0xfd,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\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+10: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,\
+0xa8,0xfd,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\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) Magadan, 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\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"
+
+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","StartServices",0x00010001,0x00000001
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","StartLsass",0x00010001,0x00000001
+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","DefaultUserName",0x00000000,"Administrator"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","DefaultPassword",0x00000000,"Secret"
+
+;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,"United States of America"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\106","CountryCode",0x00010001,0x0000006A
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\106","Name",0x00000000,"British Virgin Islands"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\107","CountryCode",0x00010001,0x0000006B
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\107","Name",0x00000000,"Canada"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\109","CountryCode",0x00010001,0x0000006D
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\109","Name",0x00000000,"Dominica"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\110","CountryCode",0x00010001,0x0000006E
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\110","Name",0x00000000,"Dominican Republic"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\20","CountryCode",0x00010001,0x00000014
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\20","Name",0x00000000,"Egypt"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\268","CountryCode",0x00010001,0x0000010c
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\268","Name",0x00000000,"Swaziland"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\27","CountryCode",0x00010001,0x0000001b
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\27","Name",0x00000000,"South Africa"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\30","CountryCode",0x00010001,0x0000001e
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\30","Name",0x00000000,"Greece"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\31","CountryCode",0x00010001,0x0000001f
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\31","Name",0x00000000,"Netherlands"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\32","CountryCode",0x00010001,0x00000020
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\32","Name",0x00000000,"Belgium"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\33","CountryCode",0x00010001,0x00000021
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\33","Name",0x00000000,"France"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\34","CountryCode",0x00010001,0x00000022
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\34","Name",0x00000000,"Spain"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\351","CountryCode",0x00010001,0x0000015f
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\351","Name",0x00000000,"Portugal"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\352","CountryCode",0x00010001,0x00000160
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\352","Name",0x00000000,"Luxembourg"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\353","CountryCode",0x00010001,0x00000161
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\353","Name",0x00000000,"Ireland"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\354","CountryCode",0x00010001,0x00000162
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\354","Name",0x00000000,"Iceland"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\355","CountryCode",0x00010001,0x00000163
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\355","Name",0x00000000,"Albania"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\358","CountryCode",0x00010001,0x00000166
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\358","Name",0x00000000,"Finland"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\359","CountryCode",0x00010001,0x00000167
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\359","Name",0x00000000,"Bulgaria"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\36","CountryCode",0x00010001,0x00000024
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\36","Name",0x00000000,"Hungary"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\370","CountryCode",0x00010001,0x00000172
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\370","Name",0x00000000,"Lithuania"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\371","CountryCode",0x00010001,0x00000173
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\371","Name",0x00000000,"Latvia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\372","CountryCode",0x00010001,0x00000174
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\372","Name",0x00000000,"Estonia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\373","CountryCode",0x00010001,0x00000175
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\373","Name",0x00000000,"Moldova"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\374","CountryCode",0x00010001,0x00000176
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\374","Name",0x00000000,"Armenia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\380","CountryCode",0x00010001,0x0000017c
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\380","Name",0x00000000,"Ukraine"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\381","CountryCode",0x00010001,0x0000017d
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\381","Name",0x00000000,"Yugoslavia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\385","CountryCode",0x00010001,0x00000181
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\385","Name",0x00000000,"Croatia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\386","CountryCode",0x00010001,0x00000182
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\386","Name",0x00000000,"Slovenia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\387","CountryCode",0x00010001,0x00000183
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\387","Name",0x00000000,"Bosnia and Herzegovina"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\39","CountryCode",0x00010001,0x00000027
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\39","Name",0x00000000,"Italy"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\40","CountryCode",0x00010001,0x00000028
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\40","Name",0x00000000,"Romania"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\41","CountryCode",0x00010001,0x00000029
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\41","Name",0x00000000,"Switzerland"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\420","CountryCode",0x00010001,0x000001a4
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\420","Name",0x00000000,"Czech Republic"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\421","CountryCode",0x00010001,0x000001a5
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\421","Name",0x00000000,"Slovakia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\423","CountryCode",0x00010001,0x000001a7
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\423","Name",0x00000000,"Liechtenstein"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\43","CountryCode",0x00010001,0x0000002b
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\43","Name",0x00000000,"Austria"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\44","CountryCode",0x00010001,0x0000002c
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\44","Name",0x00000000,"United Kingdom"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\45","CountryCode",0x00010001,0x0000002D
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\45","Name",0x00000000,"Denmark"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\46","CountryCode",0x00010001,0x0000002e
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\46","Name",0x00000000,"Sweden"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\47","CountryCode",0x00010001,0x0000002f
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\47","Name",0x00000000,"Norway"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\48","CountryCode",0x00010001,0x00000030
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\48","Name",0x00000000,"Poland"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\49","CountryCode",0x00010001,0x00000031
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\49","Name",0x00000000,"Germany"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\52","CountryCode",0x00010001,0x00000034
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\52","Name",0x00000000,"Mexico"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\54","CountryCode",0x00010001,0x00000036
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\54","Name",0x00000000,"Argentina"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\55","CountryCode",0x00010001,0x00000037
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\55","Name",0x00000000,"Brazil"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\56","CountryCode",0x00010001,0x00000038
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\56","Name",0x00000000,"Chile"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\57","CountryCode",0x00010001,0x00000039
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\57","Name",0x00000000,"Colombia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\58","CountryCode",0x00010001,0x0000003a
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\58","Name",0x00000000,"Venezuela"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\60","CountryCode",0x00010001,0x0000003c
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\60","Name",0x00000000,"Malaysia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\61","CountryCode",0x00010001,0x0000003d
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\61","Name",0x00000000,"Australia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\62","CountryCode",0x00010001,0x0000003e
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\62","Name",0x00000000,"Indonesia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\63","CountryCode",0x00010001,0x0000003f
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\63","Name",0x00000000,"Philippines"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\64","CountryCode",0x00010001,0x00000040
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\64","Name",0x00000000,"New Zealand"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\66","CountryCode",0x00010001,0x00000042
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\66","Name",0x00000000,"Thailand"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\7","CountryCode",0x00010001,0x00000007
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\7","Name",0x00000000,"Russia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\705","CountryCode",0x00010001,0x000002C1
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\705","Name",0x00000000,"Kazakhstan"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\708","CountryCode",0x00010001,0x000002C4
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\708","Name",0x00000000,"Tajikistan"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\81","CountryCode",0x00010001,0x00000051
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\81","Name",0x00000000,"Japan"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\82","CountryCode",0x00010001,0x00000052
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\82","Name",0x00000000,"Korea (Republic of)"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\850","CountryCode",0x00010001,0x00000352
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\850","Name",0x00000000,"Korea (North)"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\86","CountryCode",0x00010001,0x00000056
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\86","Name",0x00000000,"China"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\886","CountryCode",0x00010001,0x00000376
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\886","Name",0x00000000,"Taiwan"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\90","CountryCode",0x00010001,0x0000005a
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\90","Name",0x00000000,"Turkey"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\91","CountryCode",0x00010001,0x0000005b
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\91","Name",0x00000000,"India"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\93","CountryCode",0x00010001,0x0000005d
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\93","Name",0x00000000,"Afghanistan"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\960","CountryCode",0x00010001,0x000003c0
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\960","Name",0x00000000,"Maldives"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\964","CountryCode",0x00010001,0x000003c4
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\964","Name",0x00000000,"Iraq"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\966","CountryCode",0x00010001,0x000003c6
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\966","Name",0x00000000,"Saudi Arabia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\971","CountryCode",0x00010001,0x000003cb
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\971","Name",0x00000000,"United Arab Emirates"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\972","CountryCode",0x00010001,0x000003cc
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\972","Name",0x00000000,"Israel"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\974","CountryCode",0x00010001,0x000003ce
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\974","Name",0x00000000,"Qatar"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\976","CountryCode",0x00010001,0x000003d0
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\976","Name",0x00000000,"Mongolia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\977","CountryCode",0x00010001,0x000003d1
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\977","Name",0x00000000,"Nepal"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\98","CountryCode",0x00010001,0x00000062
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\98","Name",0x00000000,"Iran"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\993","CountryCode",0x00010001,0x000003e1
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\993","Name",0x00000000,"Turkmenistan"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\994","CountryCode",0x00010001,0x000003e2
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\994","Name",0x00000000,"Azerbaijan"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\995","CountryCode",0x00010001,0x000003e3
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\995","Name",0x00000000,"Georgia"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\996","CountryCode",0x00010001,0x000003e4
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\996","Name",0x00000000,"Kyrgyzstan"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\998","CountryCode",0x00010001,0x000003e6
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Telephony\Country List\998","Name",0x00000000,"Uzbekistan"
+
+; 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"
+
+; EOF
--- /dev/null
+[Version]
+Signature = "$ReactOS$"
+
+[AddReg]
+
+HKLM,"SYSTEM\CurrentControlSet\Control","CurrentUser",2,"USERNAME"
+HKLM,"SYSTEM\CurrentControlSet\Control","WaitToKillServiceTimeout",2,"20000"
+HKLM,"SYSTEM\CurrentControlSet\Control\Biosinfo","InfName",2,"biosinfo.inf"
+HKLM,"SYSTEM\CurrentControlSet\Control\PnP",,0x00000012
+
+HKLM,"SYSTEM\CurrentControlSet\Control\FileSystem","NtfsDisable8dot3NameCreation",0x00010003,0
+HKLM,"SYSTEM\CurrentControlSet\Control\FileSystem","Win31FileSystem",0x00010001,0
+HKLM,"SYSTEM\CurrentControlSet\Control\FileSystem","Win95TruncatedExtensions",0x00010001,1
+
+; Device classes (this list is incomplete... and should be generated from .inf files during installation)
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E973-E325-11CE-BFC1-08002BE10318}",,0x00000000,"Network Client"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E973-E325-11CE-BFC1-08002BE10318}","Class",0x00000000,"NetClient"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E973-E325-11CE-BFC1-08002BE10318}","Icon",0x00000000,"-7"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E973-E325-11CE-BFC1-08002BE10318}","Installer32",0x00000000,"NetCfgx.dll,NetClassInstaller"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E973-E325-11CE-BFC1-08002BE10318}","NoDisplayClass",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E973-E325-11CE-BFC1-08002BE10318}","NoInstallClass",0x00000000,"1"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E974-E325-11CE-BFC1-08002BE10318}",,0x00000000,"Network Service"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E974-E325-11CE-BFC1-08002BE10318}","Class",0x00000000,"NetService"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E974-E325-11CE-BFC1-08002BE10318}","Icon",0x00000000,"-7"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E974-E325-11CE-BFC1-08002BE10318}","Installer32",0x00000000,"NetCfgx.dll,NetClassInstaller"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E974-E325-11CE-BFC1-08002BE10318}","NoDisplayClass",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E974-E325-11CE-BFC1-08002BE10318}","NoInstallClass",0x00000000,"1"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E975-E325-11CE-BFC1-08002BE10318}",,0x00000000,"Network Protocol"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E975-E325-11CE-BFC1-08002BE10318}","Class",0x00000000,"NetTrans"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E975-E325-11CE-BFC1-08002BE10318}","Icon",0x00000000,"-6"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E975-E325-11CE-BFC1-08002BE10318}","Installer32",0x00000000,"NetCfgx.dll,NetClassInstaller"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E975-E325-11CE-BFC1-08002BE10318}","NoDisplayClass",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E975-E325-11CE-BFC1-08002BE10318}","NoInstallClass",0x00000000,"1"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{9D6D66A6-0B0C-4563-9077-A0E9A7955AE4}",,0x00000000,"Ramdisk"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{9D6D66A6-0B0C-4563-9077-A0E9A7955AE4}","Class",0x00000000,"Ramdisk"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{9D6D66A6-0B0C-4563-9077-A0E9A7955AE4}","Icon",0x00000000,"-5"
+
+; Default computer name settings
+HKLM,"SYSTEM\CurrentControlSet\Control\ComputerName",,0x00000012
+HKLM,"SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName","ComputerName",0x00000002,"COMPUTERNAME"
+
+; Device classes key
+HKLM,"SYSTEM\CurrentControlSet\Control\DeviceClasses",,0x00000012
+
+; HAL Chipset Hacks
+HKLM,"SYSTEM\CurrentControlSet\Control\HAL","10390530",0x00010001,0x1
+HKLM,"SYSTEM\CurrentControlSet\Control\HAL","10390620",0x00010001,0x1
+HKLM,"SYSTEM\CurrentControlSet\Control\HAL","10B90533",0x00010001,0x1
+HKLM,"SYSTEM\CurrentControlSet\Control\HAL","10B91533",0x00010001,0x1
+HKLM,"SYSTEM\CurrentControlSet\Control\HAL","11060596",0x00010001,0x1
+HKLM,"SYSTEM\CurrentControlSet\Control\HAL","11060686",0x00010001,0x5
+HKLM,"SYSTEM\CurrentControlSet\Control\HAL","1166004F",0x00010001,0x1
+HKLM,"SYSTEM\CurrentControlSet\Control\HAL","11660050",0x00010001,0x1
+HKLM,"SYSTEM\CurrentControlSet\Control\HAL","11660200",0x00010001,0x1
+HKLM,"SYSTEM\CurrentControlSet\Control\HAL","80862410",0x00010001,0x8
+HKLM,"SYSTEM\CurrentControlSet\Control\HAL","80862420",0x00010001,0x8
+HKLM,"SYSTEM\CurrentControlSet\Control\HAL","80862440",0x00010001,0x8
+HKLM,"SYSTEM\CurrentControlSet\Control\HAL","8086244C",0x00010001,0x8
+HKLM,"SYSTEM\CurrentControlSet\Control\HAL","80862480",0x00010001,0x8
+HKLM,"SYSTEM\CurrentControlSet\Control\HAL","8086248C",0x00010001,0x8
+HKLM,"SYSTEM\CurrentControlSet\Control\HAL","80867110",0x00010001,0x1
+
+; Hardware profile settings
+HKLM,"SYSTEM\CurrentControlSet\Control\IDConfigDB",,0x00000012
+HKLM,"SYSTEM\CurrentControlSet\Control\IDConfigDB","CurrentConfig",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Control\IDConfigDB\Hardware Profiles\0000","FriendlyName",0x00000000,"New Hardware Profile"
+
+; Keyboard Layouts
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000401","Layout File",0x00000000,"kbda1.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000401","Layout Text",0x00000000,"Arabic (101)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000401","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5084"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010401","Layout File",0x00000000,"kbda2.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010401","Layout Text",0x00000000,"Arabic (102)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010401","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5085"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020401","Layout File",0x00000000,"kbda3.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020401","Layout Text",0x00000000,"Arabic (102) AZERTY"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020401","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5086"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000402","Layout File",0x00000000,"kbdbgm.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000402","Layout Text",0x00000000,"Bulgarian BDS 5237-1978"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000402","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5136"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020402","Layout File",0x00000000,"kbdbgt.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020402","Layout Text",0x00000000,"Bulgarian phonetic classic"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020402","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5134"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00030402","Layout File",0x00000000,"kbdbga.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00030402","Layout Text",0x00000000,"Bulgarian phonetic BDS 5237-2006"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00030402","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5135"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000406","Layout File",0x00000000,"kbdda.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000406","Layout Text",0x00000000,"Danish"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000406","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5007"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00030407","Layout File",0x00000000,"kbdgerg.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00030407","Layout Text",0x00000000,"German (de_ergo)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00030407","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5139"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020407","Layout File",0x00000000,"kbdgneo.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020407","Layout Text",0x00000000,"German (NEO-1.1)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020407","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5138"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010407","Layout File",0x00000000,"kbdgrist.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010407","Layout Text",0x00000000,"German (RISTOME)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010407","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5137"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000407","Layout File",0x00000000,"kbdgr.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000407","Layout Text",0x00000000,"German"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000407","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5011"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000807","Layout File",0x00000000,"kbdsg.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000807","Layout Text",0x00000000,"Swiss (German)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000807","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5024"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000408","Layout File",0x00000000,"kbdhe.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000408","Layout Text",0x00000000,"Greek"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000408","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5046"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000409","Layout File",0x00000000,"kbdus.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000409","Layout Text",0x00000000,"United States"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000409","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5000"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000809","Layout File",0x00000000,"kbduk.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000809","Layout Text",0x00000000,"United Kingdom"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000809","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5025"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010409","Layout File",0x00000000,"kbddv.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010409","Layout Id", 0x00000000,"0002"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010409","Layout Text",0x00000000,"US-Dvorak"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010409","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5092"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020409","Layout File",0x00000000,"kbdusx.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020409","Layout Id", 0x00000000,"0001"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020409","Layout Text",0x00000000,"US International"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020409","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5026"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00030409","Layout File",0x00000000,"kbdusl.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00030409","Layout Id", 0x00000000,"001A"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00030409","Layout Text",0x00000000,"US Dvorak for left hand"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00030409","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5027"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00040409","Layout File",0x00000000,"kbdusr.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00040409","Layout Id", 0x00000000,"001B"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00040409","Layout Text",0x00000000,"US Dvorak for right hand"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00040409","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5028"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00050409","Layout File",0x00000000,"kbdusa.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00050409","Layout Id", 0x00000000,"000B"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00050409","Layout Text",0x00000000,"US English (IBM Arabic 238_L)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00050409","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5123"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00001809","Layout File",0x00000000,"kbdir.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00001809","Layout Text",0x00000000,"Irish"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00001809","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5014"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040a","Layout File",0x00000000,"kbdes.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040a","Layout Text",0x00000000,"Spanish"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040a","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5020"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000080a","Layout File",0x00000000,"kbdla.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000080a","Layout Text",0x00000000,"Latin American"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000080a","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5017"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040b","Layout File",0x00000000,"kbdfi.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040b","Layout Text",0x00000000,"Finnish"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040b","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5009"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040c","Layout File",0x00000000,"kbdfr.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040c","Layout Text",0x00000000,"French"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040c","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5010"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040d","Layout File",0x00000000,"kbdheb.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040d","Layout Text",0x00000000,"Hebrew"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040d","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5083"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040e","Layout File",0x00000000,"kbdhu.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040e","Layout Text",0x00000000,"Hungarian"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040e","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5033"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040f","Layout File",0x00000000,"kbdic.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040f","Layout Text",0x00000000,"Icelandic"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040f","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5013"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000410","Layout File",0x00000000,"kbdit.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000410","Layout Text",0x00000000,"Italian"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000410","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5015"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000411","Layout File",0x00000000,"kbdja.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000411","Layout Text",0x00000000,"Japanese"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000411","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5061"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041c","Layout File",0x00000000,"kbdal.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041c","Layout Text",0x00000000,"Albanian"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041c","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5029"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041f","Layout File",0x00000000,"kbdtuq.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041f","Layout Text",0x00000000,"Turkish Q"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041f","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5060"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001041f","Layout File",0x00000000,"kbdtuf.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001041f","Layout Text",0x00000000,"Turkish F"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001041f","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5059"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001041f","Layout Id",0x00000000,"0014"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000080c","Layout File",0x00000000,"kbdbe.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000080c","Layout Text",0x00000000,"Belgian (French)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000080c","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5002"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000413","Layout File",0x00000000,"kbdne.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000413","Layout Text",0x00000000,"Dutch"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000413","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5008"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000813","Layout File",0x00000000,"kbdbe.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000813","Layout Text",0x00000000,"Belgian (Dutch)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000813","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5001"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000415","Layout File",0x00000000,"kbdpl1.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000415","Layout Text",0x00000000,"Polish (Programmers)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000415","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5035"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010416","Layout File",0x00000000,"kbdbr.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010416","Layout Text",0x00000000,"Portuguese (Brazilian ABNT2)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010416","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5126"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000816","Layout File",0x00000000,"kbdpo.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000816","Layout Text",0x00000000,"Portuguese (Portugal)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000816","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5019"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000418","Layout File",0x00000000,"kbdro.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000418","Layout Text",0x00000000,"Romanian"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000418","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5037"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000419","Layout File",0x00000000,"kbdru.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000419","Layout Text",0x00000000,"Russian"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000419","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5055"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010419","Layout File",0x00000000,"kbdru1.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010419","Layout Text",0x00000000,"Russian (Typewriter)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010419","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5056"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041a","Layout File",0x00000000,"kbdcr.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041a","Layout Text",0x00000000,"Croatian"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041a","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5030"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041b","Layout File",0x00000000,"kbdsk.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041b","Layout Text",0x00000000,"Slovak"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041b","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5039"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001041b","Layout File",0x00000000,"kbdsk1.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001041b","Layout Text",0x00000000,"Slovak (QWERTY)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001041b","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5040"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041d","Layout File",0x00000000,"kbdsw.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041d","Layout Text",0x00000000,"Swedish"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041d","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5022"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041e","Layout File",0x00000000,"kbdth0.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041e","Layout Text",0x00000000,"Thai Kedmanee"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000041e","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5079"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001041e","Layout File",0x00000000,"kbdth1.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001041e","Layout Text",0x00000000,"Thai Pattachote"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001041e","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5080"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0002041e","Layout File",0x00000000,"kbdth2.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0002041e","Layout Text",0x00000000,"Thai Kedmanee (non-ShiftLock)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0002041e","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5081"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0003041e","Layout File",0x00000000,"kbdth3.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0003041e","Layout Text",0x00000000,"Thai Pattachote (non-ShiftLock)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0003041e","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5082"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000422","Layout File",0x00000000,"kbdur.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000422","Layout Text",0x00000000,"Ukrainian"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000422","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5058"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010422","Layout File",0x00000000,"kbdurs.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010422","Layout Text",0x00000000,"Ukrainian (Student)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010422","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5141"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000423","Layout File",0x00000000,"kbdblr.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000423","Layout Text",0x00000000,"Belarusian"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000423","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5052"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000425","Layout File",0x00000000,"kbdest.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000425","Layout Text",0x00000000,"Estonian"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000425","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5042"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000426","Layout File",0x00000000,"kbdlv.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000426","Layout Text",0x00000000,"Latvian"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000426","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5043"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010427","Layout File",0x00000000,"kbdlt1.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010427","Layout Text",0x00000000,"Lithuanian"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010427","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5088"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042a","Layout File",0x00000000,"kbdvntc.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042a","Layout Text",0x00000000,"Vietnamese"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042a","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5118"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042b","Layout File",0x00000000,"kbdarme.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042b","Layout Text",0x00000000,"Armenian Eastern"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042b","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5120"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001042b","Layout File",0x00000000,"kbdarmw.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001042b","Layout Text",0x00000000,"Armenian Western"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001042b","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5121"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042c","Layout File",0x00000000,"kbdazel.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042c","Layout Text",0x00000000,"Azeri Latin"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042c","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5117"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000082c","Layout File",0x00000000,"kbdaze.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000082c","Layout Text",0x00000000,"Azeri Cyrillic"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000082c","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5115"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042f","Layout File",0x00000000,"kbdmac.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042f","Layout Text",0x00000000,"Macedonian (FYRO)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042f","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5109"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000437","Layout File",0x00000000,"kbdgeo.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000437","Layout Text",0x00000000,"Georgian"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000437","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5119"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000439","Layout File",0x00000000,"kbdindev.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000439","Layout Text",0x00000000,"Devanagari - INSCRIPT"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000439","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5096"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000043f","Layout File",0x00000000,"kbdkaz.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000043f","Layout Text",0x00000000,"Kazakh"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000043f","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5113"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000843","Layout File",0x00000000,"kbduzb.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000843","Layout Text",0x00000000,"Uzbek (Cyrillic)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000843","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5114"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000444","Layout File",0x00000000,"kbdtat.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000444","Layout Text",0x00000000,"Tatar"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000444","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5116"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000445","Layout File",0x00000000,"kbdinben.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000445","Layout Text",0x00000000,"Bengali"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000445","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5135"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000447","Layout File",0x00000000,"kbdinguj.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000447","Layout Text",0x00000000,"Gujarati"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000447","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5097"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000044c","Layout File",0x00000000,"kbdinmal.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000044c","Layout Text",0x00000000,"Malayalam"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000044c","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5139"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000044d","Layout File",0x00000000,"kbdinasa.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000044d","Layout Text",0x00000000,"ASSAMESE - INSCRIPT"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000044d","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5177"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000455","Layout File",0x00000000,"kbdbur.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000455","Layout Text",0x00000000,"Burmese"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000455","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5140"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000414","Layout File",0x00000000,"kbdno.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000414","Layout Text",0x00000000,"Norwegian"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000414","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5018"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000405","Layout File",0x00000000,"kbdcz.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000405","Layout Text",0x00000000,"Czech"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000405","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5031"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010405","Layout File",0x00000000,"kbdcz1.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010405","Layout Text",0x00000000,"Czech (QWERTY)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010405","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5032"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00011009","Layout File",0x00000000,"kbdcan.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00011009","Layout Id", 0x00000000,"0020"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00011009","Layout Text",0x00000000,"Canadian Multilingual Standard"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00011009","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5110"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000c0c","Layout File",0x00000000,"kbdfc.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000c0c","Layout Text",0x00000000,"Canadian French (Legacy)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000c0c","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5005"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000c1a","Layout File",0x00000000,"kbdycc.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000c1a","Layout Text",0x00000000,"Serbian (Cyrillic)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000c1a","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5057"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000081a","Layout File",0x00000000,"kbdycl.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000081a","Layout Text",0x00000000,"Serbian (Latin)"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000081a","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5038"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000412","Layout File",0x00000000,"kbdko.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000412","Layout Text",0x00000000,"Korean"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000412","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5063"
+
+; Keyboard layouts
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout",,0x00000012
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00000402",2,"bg"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00000404",2,"ch"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00000405",2,"cz"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00000406",2,"dk"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00000407",2,"gr"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00000408",2,"gk"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00000409",2,"us"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","0000040A",2,"sp"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","0000040B",2,"su"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","0000040C",2,"fr"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","0000040E",2,"hu"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","0000040F",2,"is"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00000410",2,"it"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00000411",2,"jp"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00000412",2,"ko"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00000413",2,"nl"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00000414",2,"no"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00000415",2,"pl"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00000416",2,"br"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00000418",2,"ro"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00000419",2,"ru"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","0000041A",2,"yu"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","0000041B",2,"sl"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","0000041C",2,"us"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","0000041D",2,"sv"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","0000041F",2,"tr"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00000422",2,"us"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00000423",2,"us"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00000424",2,"yu"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00000425",2,"et"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00000426",2,"us"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00000427",2,"us"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00000804",2,"ch"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00000807",2,"sg"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00000809",2,"uk"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","0000080A",2,"la"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","0000080C",2,"be"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00000813",2,"be"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00000816",2,"po"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00000C0C",2,"cf"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00000C1A",2,"us"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00001009",2,"us"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","0000100C",2,"sf"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00001809",2,"us"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00010402",2,"us"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00010405",2,"cz"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00010407",2,"gr"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00010408",2,"gk"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00010409",2,"dv"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","0001040A",2,"sp"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","0001040E",2,"hu"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00010410",2,"it"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00010415",2,"pl"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00010419",2,"ru"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","0001041B",2,"sl"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","0001041F",2,"tr"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00010426",2,"us"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00010C0C",2,"cf"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00010C1A",2,"us"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00020408",2,"gk"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00020409",2,"us"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00030409",2,"usl"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00040409",2,"usr"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes","00050408",2,"gk"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybIDs","00000410",2,"141"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybIDs","0000041F",2,"179"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybIDs","00010408",2,"220"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybIDs","00010410",2,"142"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybIDs","00010415",2,"214"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybIDs","0001041F",2,"440"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybIDs","00020408",2,"319"
+
+; Network
+HKLM,"SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}",,0x00000000,"Network Adapters"
+HKLM,"SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}","Class",0x00000000,"Net"
+HKLM,"SYSTEM\CurrentControlSet\Control\Network\{4D36E973-E325-11CE-BFC1-08002BE10318}",,0x00000000,"Network Client"
+HKLM,"SYSTEM\CurrentControlSet\Control\Network\{4D36E973-E325-11CE-BFC1-08002BE10318}","Class",0x00000000,"NetClient"
+HKLM,"SYSTEM\CurrentControlSet\Control\Network\{4D36E974-E325-11CE-BFC1-08002BE10318}",,0x00000000,"Network Service"
+HKLM,"SYSTEM\CurrentControlSet\Control\Network\{4D36E974-E325-11CE-BFC1-08002BE10318}","Class",0x00000000,"NetService"
+HKLM,"SYSTEM\CurrentControlSet\Control\Network\{4D36E975-E325-11CE-BFC1-08002BE10318}",,0x00000000,"Network Protocol"
+HKLM,"SYSTEM\CurrentControlSet\Control\Network\{4D36E975-E325-11CE-BFC1-08002BE10318}","Class",0x00000000,"NetTrans"
+HKLM,"SYSTEM\CurrentControlSet\Control\NetworkProvider\Order","ProviderOrder",0x00000000,""
+
+; NLS Files
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","37",0x00000000,"c_037.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","424",0x00000000,"c_424.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","437",0x00000000,"c_437.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","500",0x00000000,"c_500.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","737",0x00000000,"c_737.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","775",0x00000000,"c_775.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","850",0x00000000,"c_850.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","852",0x00000000,"c_852.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","855",0x00000000,"c_855.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","856",0x00000000,"c_856.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","857",0x00000000,"c_857.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","860",0x00000000,"c_860.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","861",0x00000000,"c_861.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","862",0x00000000,"c_862.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","863",0x00000000,"c_863.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","864",0x00000000,"c_864.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","865",0x00000000,"c_865.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","866",0x00000000,"c_866.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","869",0x00000000,"c_869.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","874",0x00000000,"c_874.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","875",0x00000000,"c_875.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","878",0x00000000,"c_878.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","932",0x00000000,"c_932.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","936",0x00000000,"c_936.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","949",0x00000000,"c_949.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","950",0x00000000,"c_950.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","1006",0x00000000,"c_1006.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","1026",0x00000000,"c_1026.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","1250",0x00000000,"c_1250.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","1251",0x00000000,"c_1251.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","1252",0x00000000,"c_1252.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","1253",0x00000000,"c_1253.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","1254",0x00000000,"c_1254.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","1255",0x00000000,"c_1255.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","1256",0x00000000,"c_1256.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","1257",0x00000000,"c_1257.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","1258",0x00000000,"c_1258.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","10000",0x00000000,"c_10000.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","10006",0x00000000,"c_10006.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","10007",0x00000000,"c_10007.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","10029",0x00000000,"c_10029.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","10079",0x00000000,"c_10079.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","10081",0x00000000,"c_10081.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","20866",0x00000000,"c_20866.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","21866",0x00000000,"c_21866.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","28591",0x00000000,"c_28591.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","28592",0x00000000,"c_28592.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","28593",0x00000000,"c_28593.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","28594",0x00000000,"c_28594.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","28595",0x00000000,"c_28595.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","28596",0x00000000,"c_28596.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","28597",0x00000000,"c_28597.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","28598",0x00000000,"c_28598.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","28599",0x00000000,"c_28599.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","28600",0x00000000,"c_28600.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","28603",0x00000000,"c_28603.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","28604",0x00000000,"c_28604.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","28605",0x00000000,"c_28605.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","28606",0x00000000,"c_28606.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","ACP",0x00000000,"1252"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","OEMCP",0x00000000,"437"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\CodePage","MACCP",0x00000000,"10000"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Nls\CodePage\EUDCCodeRange","932",2,"F040-F9FC"
+HKLM,"SYSTEM\CurrentControlSet\Control\Nls\CodePage\EUDCCodeRange","936",2,"AAA1-AFFE,F8A1-FEFE,A140-A7A0"
+HKLM,"SYSTEM\CurrentControlSet\Control\Nls\CodePage\EUDCCodeRange","949",2,"C9A1-C9FE,FEA1-FEFE"
+HKLM,"SYSTEM\CurrentControlSet\Control\Nls\CodePage\EUDCCodeRange","950",2,"FA40-FEFE,8E40-A0FE,8140-8DFE,C6A1-C8FE"
+HKLM,"SYSTEM\CurrentControlSet\Control\Nls\CodePage\EUDCCodeRange","Unicode",2,"E000-F8FF"
+
+; NLS Language settings
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0402",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0403",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0404",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0804",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0c04",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","1004",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","1404",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0405",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0406",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0407",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0807",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0c07",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","1407",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0408",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0409",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0809",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0c09",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","1009",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","1409",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","1809",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","1c09",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","2009",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","3009",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","3409",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","040a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","080a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0c0a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","100a",0x00000000,"l_intl.nls"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","140a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","180a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","1c0a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","200a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","240a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","280a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","2c0a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","300a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","340a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","380a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","3c0a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","400a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","440a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","480a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","4c0a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","500a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","040b",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","040c",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","080c",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0c0c",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","100c",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","140c",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","180c",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","040d",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","040e",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","040f",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0410",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0810",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0411",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0412",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0413",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0414",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0813",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0414",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0814",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0415",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0416",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0816",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0417",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0418",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0419",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","041a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","081a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0c1a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","041b",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","041c",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","041d",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","081d",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","041e",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","041f",0x00000000,"l_intl.nls"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0420",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0421",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0422",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0423",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0424",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0425",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0426",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0427",0x00000000,"l_intl.nls"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0429",0x00000000,"l_intl.nls"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","042a",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","042b",0x00000000,"l_intl.nls"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","042c",0x00000000,"l_intl.nls"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","082c",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","042d",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","042f",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0436",0x00000000,"l_intl.nls"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0437",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0438",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0439",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","043e",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","083e",0x00000000,"l_intl.nls"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","043f",0x00000000,"l_intl.nls"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0440",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0441",0x00000000,"l_intl.nls"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0443",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0843",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0445",0x00000000,"l_intl.nls"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0455",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0456",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","048f",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0490",0x00000000,"l_intl.nls"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","Default",0x00000000,"0409"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","InstallLanguage",0x00000000,"0409"
+
+; Supported and installed locales
+; If you add/uncomment an entry here, please also add the appropriate Language
+; in the previous section.
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale",,0x00000012
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000402",0x00000000,"5"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000403",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000404",0x00000000,"9"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000804",0x00000000,"a"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000405",0x00000000,"2"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000406",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000407",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000807",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000c07",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00001407",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000408",0x00000000,"4"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000409",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000809",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000c09",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00001009",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00001409",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00001809",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00001c09",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00002009",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00003009",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00003409",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000040a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000080a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000c0a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000100a",0x00000000,"1"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000140a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000180a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00001c0a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000200a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000240a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000280a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00002c0a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000300a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000340a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000380a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00003c0a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000400a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000440a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000480a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00004c0a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000500a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000040b",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000040c",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000080c",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000c0c",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000100c",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000140c",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000180c",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000040d",0x00000000,"c"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000040e",0x00000000,"2"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000040f",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000410",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000810",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000411",0x00000000,"7"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000412",0x00000000,"8"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000413",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000813",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000414",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000814",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000415",0x00000000,"2"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000416",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000816",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000417",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000418",0x00000000,"2"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000419",0x00000000,"5"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000041a",0x00000000,"2"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000081a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000c1a",0x00000000,"5"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000041b",0x00000000,"2"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000041c",0x00000000,"2"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000041d",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000081d",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000041e",0x00000000,"b"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000041f",0x00000000,"6"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000420",0x00000000,""
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000421",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000422",0x00000000,"5"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000423",0x00000000,"5"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000424",0x00000000,"2"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000425",0x00000000,"3"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000426",0x00000000,"3"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000427",0x00000000,"3"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000429",0x00000000,""
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000042a",0x00000000,""
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000042b",0x00000000,"11"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000042c",0x00000000,"6"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000082c",0x00000000,"5"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000042d",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000042f",0x00000000,"5"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000436",0x00000000,"1"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000437",0x00000000,"10"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000438",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000439",0x00000000,"f"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000043e",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000083e",0x00000000,"1"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000043f",0x00000000,"5"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000440",0x00000000,"5"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000441",0x00000000,"1"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000443",0x00000000,"6"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000843",0x00000000,"5"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000445",0x00000000,"f"
+;HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000455",0x00000000,""
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000456",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","0000048f",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale","00000490",0x00000000,"1"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","1",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","2",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","3",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","4",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","5",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","6",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","7",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","8",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","9",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","10",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","11",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","a",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","b",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","c",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","d",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","e",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language Groups","f",0x00000000,"1"
+
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale\Alternate Sorts","00010407",0x00000000,"1"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale\Alternate Sorts","0001040e",0x00000000,"2"
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale\Alternate Sorts","00010437",0x00000000,""
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale\Alternate Sorts","00020804",0x00000000,""
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale\Alternate Sorts","00021004",0x00000000,""
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale\Alternate Sorts","00021404",0x00000000,""
+HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Locale\Alternate Sorts","00030404",0x00000000,""
+
+HKLM,"SYSTEM\CurrentControlSet\Control\PnP\Pci\CardList","Intel 82441FX",0x00030003,\
+01,00,00,00,86,80,37,12,00,00,00,00,00,00,00,00
+HKLM,"SYSTEM\CurrentControlSet\Control\PnP\Pci\CardList","Intel 82439HX",0x00030003,\
+01,00,00,00,86,80,50,12,00,00,00,00,00,00,00,00
+HKLM,"SYSTEM\CurrentControlSet\Control\PnP\Pci\CardList","Intel 82439TX",0x00030003,\
+01,00,00,00,86,80,00,71,00,00,00,00,00,00,00,00
+HKLM,"SYSTEM\CurrentControlSet\Control\PnP\Pci\CardList","Intel 82443LX/EX",0x00030003,\
+01,00,00,00,86,80,80,71,00,00,00,00,00,00,00,00
+HKLM,"SYSTEM\CurrentControlSet\Control\PnP\Pci\CardList","Intel 82443BX1",0x00030003,\
+01,00,00,00,86,80,90,71,00,00,00,00,00,00,00,00
+HKLM,"SYSTEM\CurrentControlSet\Control\PnP\Pci\CardList","Intel 82443BX2",0x00030003,\
+01,00,00,00,86,80,92,71,00,00,00,00,00,00,00,00
+HKLM,"SYSTEM\CurrentControlSet\Control\PnP\Pci\CardList","Intel 82443GX",0x00030003,\
+01,00,00,00,86,80,a0,71,00,00,00,00,00,00,00,00
+HKLM,"SYSTEM\CurrentControlSet\Control\PnP\Pci\CardList","VIA Tech1",0x00030003,\
+01,00,00,00,06,11,01,05,00,00,00,00,00,00,00,00
+HKLM,"SYSTEM\CurrentControlSet\Control\PnP\Pci\CardList","VIA Tech2",0x00030003,\
+01,00,00,00,06,11,91,06,00,00,00,00,00,00,00,00
+HKLM,"SYSTEM\CurrentControlSet\Control\PnP\Pci\CardList","Toshiba",0x00030003,\
+01,00,00,00,79,11,01,06,00,00,00,00,00,00,00,00
+HKLM,"SYSTEM\CurrentControlSet\Control\PnP\Pci\CardList","Ali",0x00030003,\
+01,00,00,00,b9,10,21,15,00,00,00,00,00,00,00,00
+
+HKLM,"SYSTEM\CurrentControlSet\Control\Print","MajorVersion",0x00010001,2
+HKLM,"SYSTEM\CurrentControlSet\Control\Print","MinorVersion",0x00010003,0
+HKLM,"SYSTEM\CurrentControlSet\Control\Print","PriorityClass",0x00010003,0
+HKLM,"SYSTEM\CurrentControlSet\Control\Print\Environments",,0x00000012
+HKLM,"SYSTEM\CurrentControlSet\Control\Print\Monitors",,0x00000012
+HKLM,"SYSTEM\CurrentControlSet\Control\Print\Monitors\Local Port","Driver",2,"localspl.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Print\Printers",,0x00000012
+
+HKLM,"SYSTEM\CurrentControlSet\Control\ProductOptions","ProductType",2,"WinNT"
+HKLM,"SYSTEM\CurrentControlSet\Control\ProductOptions","ProductSuite",0x00010002,""
+
+HKLM,"SYSTEM\CurrentControlSet\Control\SecurityProviders","SecurityProviders",2,"schannel.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\SecurityProviders\SaslProfiles",,0x00000012
+
+; Some installers check for SP6
+HKLM,"SYSTEM\CurrentControlSet\Control\Windows","CSDVersion",0x00010001,0x00000600
+
+; Service groups
+HKLM,"SYSTEM\CurrentControlSet\Control\ServiceGroupOrder","List",0x00010000, \
+ "Boot Bus Extender", \
+ "System Bus Extender", \
+ "SCSI Port", \
+ "SCSI Miniport", \
+ "Primary Disk", \
+ "SCSI Class Helper", \
+ "SCSI Class", \
+ "Boot File System", \
+ "Base", \
+ "Pointer Port", \
+ "Keyboard Port", \
+ "Pointer Class", \
+ "Keyboard Class", \
+ "Debug", \
+ "Video Init", \
+ "Video", \
+ "Video Save", \
+ "File System", \
+ "Event log", \
+ "NDIS", \
+ "PNP_TDI", \
+ "TDI", \
+ "PlugPlay", \
+ "SpoolerGroup", \
+ "Extended Base"
+
+; Set the timeout for directx/ReactX graphic surface lock see _EDD_DIRECTDRAW_GLOBAL struct for more info
+HKLM,"SYSTEM\CurrentControlSet\Control\GraphicsDrivers\DCI","Timeout",0x00010001,0x00000007
+HKLM,"SYSTEM\CurrentControlSet\Control\GraphicsDrivers\UseNewKey",,0x00000012
+
+; Group order, the first DWORD is the count of entries,
+; the following dwords are the tag entries for the load order.
+HKLM,"SYSTEM\CurrentControlSet\Control\GroupOrderList","Video Save", 0x00000001, \
+ 0x02, 0x00, 0x00, 0x00, \
+ 0x01, 0x00, 0x00, 0x00, \
+ 0x02, 0x00, 0x00, 0x00
+HKLM,"SYSTEM\CurrentControlSet\Control\GroupOrderList","SCSI Miniport", 0x00000001, \
+ 0x02, 0x00, 0x00, 0x00, \
+ 0x10, 0x00, 0x00, 0x00, \
+ 0x20, 0x00, 0x00, 0x00
+
+; Session Manager stuff
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager","BootExecute", 0x00010000, \
+ "autocheck autochk *"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager","ObjectDirectories",0x00010000, \
+ "\Windows", \
+ "\RPC Control"
+
+; DOS devices
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices","AUX",0x00000000,"\DosDevices\COM1"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices","MAILSLOT",0x00000000,"\Device\MailSlot"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices","NUL",0x00000000,"\Device\Null"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices","PIPE",0x00000000,"\Device\NamedPipe"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices","PRN",0x00000000,"\DosDevices\LPT1"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices","UNC",0x00000000,"\Device\Mup"
+
+; System environment settings
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","ComSpec",0x00020000,"%SystemRoot%\system32\cmd.exe"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","OS",0x00020000,"ReactOS"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","Path",0x00020000,"%SystemRoot%\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\wbem"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","windir",0x00020000,"%SystemRoot%"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","TEMP",0x00020000,"%SystemDrive%\TEMP"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","TMP",0x00020000,"%SystemDrive%\TEMP"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","PATHEXT",0x00020000,".COM;.EXE;.BAT;.CMD"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","PROCESSOR_ARCHITECTURE",0x00020000,"x86"
+
+
+; Known DLLs
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\KnownDlls","DllDirectory",0x00020000,"%SystemRoot%\system32"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\KnownDlls","advapi32",0x00000000,"advapi32.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\KnownDlls","comdlg32",0x00000000,"comdlg32.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\KnownDlls","gdi32",0x00000000,"gdi32.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\KnownDlls","imagehlp",0x00000000,"imagehlp.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\KnownDlls","kernel32",0x00000000,"kernel32.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\KnownDlls","lz32",0x00000000,"lz32.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\KnownDlls","ole32",0x00000000,"ole32.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\KnownDlls","oleaut32",0x00000000,"oleaut32.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\KnownDlls","olecli32",0x00000000,"olecli32.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\KnownDlls","olesvr32",0x00000000,"olesvr32.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\KnownDlls","olethk32",0x00000000,"olethk32.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\KnownDlls","rpcrt4",0x00000000,"rpcrt4.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\KnownDlls","shell32",0x00000000,"shell32.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\KnownDlls","url",0x00000000,"url.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\KnownDlls","urlmon",0x00000000,"urlmon.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\KnownDlls","user32",0x00000000,"user32.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\KnownDlls","version",0x00000000,"version.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\KnownDlls","wininet",0x00000000,"wininet.dll"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\KnownDlls","wldap32",0x00000000,"wldap32.dll"
+
+; Pagefile settings
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management","PagingFiles",0x00010000, \
+ "C:\pagefile.sys"
+
+; Subsystems
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Subsystems","Debug",0x00020000,""
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Subsystems","Kmode",0x00020000,"%SystemRoot%\system32\win32k.sys"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Subsystems","Optional",0x00010000,"Posix","Os2","Vms"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Subsystems","Os2",0x00020000,"%SystemRoot%\system32\csr.exe ObjectDirectory=\OS2 SharedSection=128 Windows=Off SubSystemType=Text ServerDll=os2srv,1 ProfileControl=Off RequestThreads=2 MaxRequestThreads=2 Sessions=Off"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Subsystems","Posix",0x00020000,"%SystemRoot%\system32\csr.exe ObjectDirectory=\POSIX SharedSection=128 Windows=Off SubSystemType=Text ServerDll=psxsrv,1 ProfileControl=Off RequestThreads=2 MaxRequestThreads=2 Sessions=Off"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Subsystems","Required",0x00010000,"Debug","Windows"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Subsystems","Vms",0x00020000,"%SystemRoot%\system32\csr.exe ObjectDirectory=\VMS SharedSection=128 Windows=Off SubSystemType=Text ServerDll=vmssrv,1 ProfileControl=Off RequestThreads=2 MaxRequestThreads=2 Sessions=Off"
+HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Subsystems","Windows",0x00020000,"%SystemRoot%\system32\csrss.exe"
+
+; WOW Support
+HKLM,"SYSTEM\CurrentControlSet\Control\Wow","",0x00000000,""
+
+; PNP Root device
+HKLM,"SYSTEM\CurrentControlSet\Enum\HTREE\ROOT\0","",0x00000000,""
+
+; Afd driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Afd","ErrorControl",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\Afd","Group",0x00000000,"TDI"
+HKLM,"SYSTEM\CurrentControlSet\Services\Afd","ImagePath",0x00020000,"system32\drivers\afd.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Afd","Start",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\Afd","Type",0x00010001,0x00000001
+
+; UniATA/Atapi miniport driver
+HKLM,"SYSTEM\CurrentControlSet\Services\UniATA","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\UniATA","Group",0x00000000,"System Bus Extender"
+HKLM,"SYSTEM\CurrentControlSet\Services\UniATA","ImagePath",0x00020000,"system32\drivers\uniata.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\UniATA","Start",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\UniATA","Type",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\UniATA","Tag",0x00010001,0x00000010
+
+; Audio Service
+HKLM,"SYSTEM\CurrentControlSet\Services\RosAudioSrv","DisplayName",0x00000000,"Audio Service"
+HKLM,"SYSTEM\CurrentControlSet\Services\RosAudioSrv","Description",0x00000000,"Provides audio facilities to applications"
+HKLM,"SYSTEM\CurrentControlSet\Services\RosAudioSrv","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\RosAudioSrv","Group",0x00000000,"Audio"
+HKLM,"SYSTEM\CurrentControlSet\Services\RosAudioSrv","ImagePath",0x00020000,"%SystemRoot%\system32\audiosrv.exe"
+HKLM,"SYSTEM\CurrentControlSet\Services\RosAudioSrv","Start",0x00010001,0x00000003
+HKLM,"SYSTEM\CurrentControlSet\Services\RosAudioSrv","Type",0x00010001,0x00000010
+
+; BusLogic 958 miniport driver
+HKLM,"SYSTEM\CurrentControlSet\Services\BusLogic","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\BusLogic","Group",0x00000000,"SCSI Miniport"
+HKLM,"SYSTEM\CurrentControlSet\Services\BusLogic","ImagePath",0x00020000,"system32\drivers\buslogic.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\BusLogic","Start",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\BusLogic","Type",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\BusLogic","Tag",0x00010001,0x00000020
+
+; Beep device driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Beep","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Beep","Group",0x00000000,"Base"
+HKLM,"SYSTEM\CurrentControlSet\Services\Beep","ImagePath",0x00020000,"system32\drivers\beep.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Beep","Start",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\Beep","Type",0x00010001,0x00000001
+
+; BlueScreen device driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Blue","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Blue","Group",0x00000000,"Video Init"
+HKLM,"SYSTEM\CurrentControlSet\Services\Blue","ImagePath",0x00020000,"system32\drivers\blue.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Blue","Start",0x00010001,0x00000004
+HKLM,"SYSTEM\CurrentControlSet\Services\Blue","Type",0x00010001,0x00000001
+
+; Cdfs (ISO96660) filesystem driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Cdfs","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Cdfs","Group",0x00000000,"File System"
+HKLM,"SYSTEM\CurrentControlSet\Services\Cdfs","ImagePath",0x00020000,"system32\drivers\cdfs.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Cdfs","Start",0x00010001,0x00000004
+HKLM,"SYSTEM\CurrentControlSet\Services\Cdfs","Type",0x00010001,0x00000002
+
+; Cdrom class driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Cdrom","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Cdrom","Group",0x00000000,"SCSI Class"
+HKLM,"SYSTEM\CurrentControlSet\Services\Cdrom","ImagePath",0x00020000,"system32\drivers\cdrom.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Cdrom","Start",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\Cdrom","Type",0x00010001,0x00000001
+
+; Class2 driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Class2","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Class2","Group",0x00000000,"SCSI Class Helper"
+HKLM,"SYSTEM\CurrentControlSet\Services\Class2","ImagePath",0x00020000,"system32\drivers\class2.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Class2","Start",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Class2","Type",0x00010001,0x00000001
+
+; Debug output driver
+HKLM,"SYSTEM\CurrentControlSet\Services\DebugOut","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\DebugOut","Group",0x00000000,"Debug"
+HKLM,"SYSTEM\CurrentControlSet\Services\DebugOut","ImagePath",0x00020000,"system32\drivers\debugout.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\DebugOut","Start",0x00010001,0x00000004
+HKLM,"SYSTEM\CurrentControlSet\Services\DebugOut","Type",0x00010001,0x00000001
+
+; Disk class driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Disk","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Disk","Group",0x00000000,"SCSI Class"
+HKLM,"SYSTEM\CurrentControlSet\Services\Disk","ImagePath",0x00020000,"system32\drivers\disk.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Disk","Start",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Disk","Type",0x00010001,0x00000001
+
+; DHCP client service
+HKLM,"SYSTEM\CurrentControlSet\Services\DHCP","DisplayName",0x00000000,"DHCP Client"
+HKLM,"SYSTEM\CurrentControlSet\Services\DHCP","Description",0x00000000,"Attempts to obtain network settings automatically from an available DHCP server"
+HKLM,"SYSTEM\CurrentControlSet\Services\DHCP","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\DHCP","Group",0x00000000,"Network"
+HKLM,"SYSTEM\CurrentControlSet\Services\DHCP","ImagePath",0x00020000,"%SystemRoot%\system32\dhcp.exe"
+HKLM,"SYSTEM\CurrentControlSet\Services\DHCP","Start",0x00010001,0x00000002
+HKLM,"SYSTEM\CurrentControlSet\Services\DHCP","Type",0x00010001,0x00000010
+
+; Event logging service
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog",,0x00000010
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog","DisplayName",0x00000000,"Event Logger"
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog","Description",0x00000000,"Logs events or messages sent by the operating system in a database accessible via the event log viewer"
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog","Group",0x00000000,"Event log"
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog","ImagePath",0x00020000,"%SystemRoot%\system32\eventlog.exe"
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog","Start",0x00010001,0x00000002
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog","Type",0x00010001,0x00000010
+
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog\Application",,0x00000010
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog\Application","File",0x00020000,"%SystemRoot%\system32\config\AppEvent.Evt"
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog\Security",,0x00000010
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog\Security","File",0x00020000,"%SystemRoot%\system32\config\SecEvent.Evt"
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog\System",,0x00000010
+HKLM,"SYSTEM\CurrentControlSet\Services\EventLog\System","File",0x00020000,"%SystemRoot%\system32\config\SysEvent.Evt"
+
+; Floppy driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Floppy","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Floppy","Group",0x00000000,"Primary Disk"
+HKLM,"SYSTEM\CurrentControlSet\Services\Floppy","ImagePath",0x00020000,"system32\drivers\floppy.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Floppy","Start",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\Floppy","Type",0x00010001,0x00000001
+
+; Filesystem recognizer driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Fs_Rec","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Fs_Rec","Group",0x00000000,"Boot file system"
+HKLM,"SYSTEM\CurrentControlSet\Services\Fs_Rec","ImagePath",0x00020000,"system32\drivers\fs_rec.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Fs_Rec","Start",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\Fs_Rec","Type",0x00010001,0x00000008
+
+; Kernel-Mode Tests
+;HKLM,"SYSTEM\CurrentControlSet\Services\Kmtest","ErrorControl",0x00010001,0x00000000
+;HKLM,"SYSTEM\CurrentControlSet\Services\Kmtest","Group",0x00000000,"Base"
+;HKLM,"SYSTEM\CurrentControlSet\Services\Kmtest","ImagePath",0x00020000,"system32\drivers\kmtest.sys"
+;HKLM,"SYSTEM\CurrentControlSet\Services\Kmtest","Start",0x00010001,0x00000001
+;HKLM,"SYSTEM\CurrentControlSet\Services\Kmtest","Type",0x00010001,0x00000001
+
+; Keyboard class driver
+HKLM,"SYSTEM\CurrentControlSet\Services\kbdclass","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\kbdclass","Group",0x00000000,"Keyboard Class"
+HKLM,"SYSTEM\CurrentControlSet\Services\kbdclass","ImagePath",0x00020000,"system32\drivers\kbdclass.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\kbdclass","Start",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\kbdclass","Type",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\kbdclass\Parameters","ConnectMultiplePorts",0x00010001,1
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E96B-E325-11CE-BFC1-08002BE10318}","UpperFilters",0x00010000,"kbdclass"
+
+; MPU-401 MIDI driver
+HKLM,"SYSTEM\CurrentControlSet\Services\mpu401","Group",0x00000000,"Base"
+HKLM,"SYSTEM\CurrentControlSet\Services\mpu401","ServiceType",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\mpu401","Type",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\mpu401","Start",0x00010001,0x00000004
+HKLM,"SYSTEM\CurrentControlSet\Services\mpu401","ErrorControl",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\mpu401","ImagePath",0x00020000,"system32\drivers\mpu401.sys"
+
+; Mouse class driver
+HKLM,"SYSTEM\CurrentControlSet\Services\mouclass","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\mouclass","Group",0x00000000,"Pointer Class"
+HKLM,"SYSTEM\CurrentControlSet\Services\mouclass","ImagePath",0x00020000,"system32\drivers\mouclass.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\mouclass","Start",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\mouclass","Type",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E96F-E325-11CE-BFC1-08002BE10318}","UpperFilters",0x00010000,"mouclass"
+
+; Mailslot filesystem driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Msfs","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Msfs","Group",0x00000000,"File System"
+HKLM,"SYSTEM\CurrentControlSet\Services\Msfs","ImagePath",0x00020000,"system32\drivers\msfs.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Msfs","Start",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\Msfs","Type",0x00010001,0x00000002
+
+; NDIS driver - the only boot-start network driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Ndis","ErrorControl",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\Ndis","Group",0x00000000,"NDIS"
+HKLM,"SYSTEM\CurrentControlSet\Services\Ndis","ImagePath",0x00020000,"system32\drivers\ndis.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Ndis","Start",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Ndis","Type",0x00010001,0x00000001
+
+; NetLogon
+;HKLM,"SYSTEM\CurrentControlSet\Services\NetLogon","DisplayName",0x00000000,"Net Logon"
+;HKLM,"SYSTEM\CurrentControlSet\Services\NetLogon","Description",0x00000000,"Sets up a secure channel to a domain controller for domain authentication"
+;HKLM,"SYSTEM\CurrentControlSet\Services\NetLogon","ErrorControl",0x00010001,0x00000001
+;HKLM,"SYSTEM\CurrentControlSet\Services\Netlogon","ImagePath",0x00020000,"%SystemRoot%\system32\lsass.exe"
+;HKLM,"SYSTEM\CurrentControlSet\Services\NetLogon","Start",0x00010001,0x00000003
+;HKLM,"SYSTEM\CurrentControlSet\Services\Netlogon","Type",0x00010001,0x00000020
+
+; Named Pipe filesystem driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Npfs","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Npfs","Group",0x00000000,"File System"
+HKLM,"SYSTEM\CurrentControlSet\Services\Npfs","ImagePath",0x00020000,"system32\drivers\npfs.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Npfs","Start",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\Npfs","Type",0x00010001,0x00000002
+
+; NTFS filesystem driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Ntfs","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Ntfs","Group",0x00000000,"File System"
+HKLM,"SYSTEM\CurrentControlSet\Services\Ntfs","ImagePath",0x00020000,"system32\drivers\ntfs.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Ntfs","Start",0x00010001,0x00000004
+HKLM,"SYSTEM\CurrentControlSet\Services\Ntfs","Type",0x00010001,0x00000002
+
+; Null device driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Null","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Null","Group",0x00000000,"Base"
+HKLM,"SYSTEM\CurrentControlSet\Services\Null","ImagePath",0x00020000,"system32\drivers\null.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Null","Start",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\Null","Type",0x00010001,0x00000001
+
+; Packet driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Packet","ErrorControl",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\Packet","Group",0x00000000,"PNP_TDI"
+HKLM,"SYSTEM\CurrentControlSet\Services\Packet","ImagePath",0x00020000,"system32\drivers\packet.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Packet","Start",0x00010001,0x00000004
+HKLM,"SYSTEM\CurrentControlSet\Services\Packet","Type",0x00010001,0x00000001
+
+; Plug and Play manager
+HKLM,"SYSTEM\CurrentControlSet\Services\PlugPlay","DisplayName",0x00000000,"Plug and Play"
+HKLM,"SYSTEM\CurrentControlSet\Services\PlugPlay","Description",0x00000000,"Detects hardware changes and installs needed software if possible"
+HKLM,"SYSTEM\CurrentControlSet\Services\PlugPlay","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\PlugPlay","Group",0x00000000,"PlugPlay"
+HKLM,"SYSTEM\CurrentControlSet\Services\PlugPlay","ImagePath",0x00020000,"%SystemRoot%\system32\umpnpmgr.exe"
+HKLM,"SYSTEM\CurrentControlSet\Services\PlugPlay","Start",0x00010001,0x00000004
+HKLM,"SYSTEM\CurrentControlSet\Services\PlugPlay","Type",0x00010001,0x00000010
+
+; RPC service
+HKLM,"SYSTEM\CurrentControlSet\Services\Rpcss","DisplayName",0x00000000,"Remote Procedure Call"
+HKLM,"SYSTEM\CurrentControlSet\Services\Rpcss","Description",0x00000000,"RPC subsystem which is responsible for Remote procedure Calls on the local machine"
+HKLM,"SYSTEM\CurrentControlSet\Services\Rpcss","ErrorControl",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\Rpcss","Group",0x00000000," RPC Service"
+HKLM,"SYSTEM\CurrentControlSet\Services\Rpcss","ImagePath",0x00020000,"%SystemRoot%\system32\rpcss.exe"
+HKLM,"SYSTEM\CurrentControlSet\Services\Rpcss","Start",0x00010001,0x00000002
+HKLM,"SYSTEM\CurrentControlSet\Services\Rpcss","Type",0x00010001,0x00000010
+
+; Scsiport driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Scsiport","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Scsiport","Group",0x00000000,"SCSI Port"
+HKLM,"SYSTEM\CurrentControlSet\Services\Scsiport","ImagePath",0x00020000,"system32\drivers\scsiport.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Scsiport","Start",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Scsiport","Type",0x00010001,0x00000001
+
+; Spooler service
+HKLM,"SYSTEM\CurrentControlSet\Services\Spooler","DependOnService",0x00010000,"RPCSS"
+HKLM,"SYSTEM\CurrentControlSet\Services\Spooler","DisplayName",0x00000000,"Printer Spooler"
+HKLM,"SYSTEM\CurrentControlSet\Services\Spooler","Description",0x00000000,"Printer Spooler"
+HKLM,"SYSTEM\CurrentControlSet\Services\Spooler","ErrorControl",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\Spooler","Group",0x00000000,"SpoolerGroup"
+HKLM,"SYSTEM\CurrentControlSet\Services\Spooler","ImagePath",0x00020000,"%SystemRoot%\system32\spoolsv.exe"
+HKLM,"SYSTEM\CurrentControlSet\Services\Spooler","ObjectName",0x00000000,"LocalSystem"
+HKLM,"SYSTEM\CurrentControlSet\Services\Spooler","Start",0x00010001,0x00000002
+HKLM,"SYSTEM\CurrentControlSet\Services\Spooler","Type",0x00010001,0x00000110
+
+; WLAN service
+HKLM,"SYSTEM\CurrentControlSet\Services\WlanSvc","DependOnService",0x00010000,"RPCSS"
+HKLM,"SYSTEM\CurrentControlSet\Services\WlanSvc","DisplayName",0x00000000,"WLAN Service"
+HKLM,"SYSTEM\CurrentControlSet\Services\WlanSvc","Description",0x00000000,"WLAN Service"
+HKLM,"SYSTEM\CurrentControlSet\Services\WlanSvc","ErrorControl",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\WlanSvc","Group",0x00000000,"TDI"
+HKLM,"SYSTEM\CurrentControlSet\Services\WlanSvc","ImagePath",0x00020000,"%SystemRoot%\system32\wlansvc.exe"
+HKLM,"SYSTEM\CurrentControlSet\Services\WlanSvc","ObjectName",0x00000000,"LocalSystem"
+HKLM,"SYSTEM\CurrentControlSet\Services\WlanSvc","Start",0x00010001,0x00000003
+HKLM,"SYSTEM\CurrentControlSet\Services\WlanSvc","Type",0x00010001,0x00000110
+
+; Simple TCP services
+HKLM,"SYSTEM\CurrentControlSet\Services\tcpsvcs","Description",0x00000000,"Supports the following TCP/IP services: Chargen, Daytime, Discard, Echo, QOTD"
+HKLM,"SYSTEM\CurrentControlSet\Services\tcpsvcs","DisplayName",0x00000000,"Simple TCP/IP Services"
+HKLM,"SYSTEM\CurrentControlSet\Services\tcpsvcs","ErrorControl",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\tcpsvcs","Group",0x00000000,"Network"
+HKLM,"SYSTEM\CurrentControlSet\Services\tcpsvcs","ImagePath",0x00020000,"%SystemRoot%\system32\tcpsvcs.exe"
+HKLM,"SYSTEM\CurrentControlSet\Services\tcpsvcs","Start",0x00010001,0x00000003
+HKLM,"SYSTEM\CurrentControlSet\Services\tcpsvcs","Type",0x00010001,0x00000020
+
+; ReactOS Telnet Daemon
+HKLM,"SYSTEM\CurrentControlSet\Services\telnetd","Description",0x00000000,"ReactOS Telnet Daemon"
+HKLM,"SYSTEM\CurrentControlSet\Services\telnetd","DisplayName",0x00000000,"ReactOS Telnet Daemon"
+HKLM,"SYSTEM\CurrentControlSet\Services\telnetd","ErrorControl",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\telnetd","Group",0x00000000,"Network"
+HKLM,"SYSTEM\CurrentControlSet\Services\telnetd","ImagePath",0x00020000,"%SystemRoot%\system32\telnetd.exe"
+HKLM,"SYSTEM\CurrentControlSet\Services\telnetd","Start",0x00010001,0x00000003
+HKLM,"SYSTEM\CurrentControlSet\Services\telnetd","Type",0x00010001,0x00000020
+
+; Sound Blaster (NT4)
+;HKLM,"SYSTEM\CurrentControlSet\Services\sndblst","Description",0x00000000,"Sound Blaster (NT4)"
+;HKLM,"SYSTEM\CurrentControlSet\Services\sndblst","ErrorControl",0x00010001,0x00000001
+;HKLM,"SYSTEM\CurrentControlSet\Services\sndblst","Group",0x00000000,"Base"
+;HKLM,"SYSTEM\CurrentControlSet\Services\sndblst","ImagePath",0x00020000,"system32\drivers\sndblst.sys"
+;HKLM,"SYSTEM\CurrentControlSet\Services\sndblst","Start",0x00010001,0x00000003
+;HKLM,"SYSTEM\CurrentControlSet\Services\sndblst","Type",0x00010001,0x00000001
+
+; Virtual FAT filesystem driver
+HKLM,"SYSTEM\CurrentControlSet\Services\fastfat","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\fastfat","Group",0x00000000,"Boot File System"
+HKLM,"SYSTEM\CurrentControlSet\Services\fastfat","ImagePath",0x00020000,"system32\drivers\fastfat.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\fastfat","Start",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\fastfat","Type",0x00010001,0x00000002
+
+; RAM Disk class driver
+HKLM,"SYSTEM\CurrentControlSet\Services\RamDisk","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\RamDisk","Group",0x00000000,"Boot File System"
+HKLM,"SYSTEM\CurrentControlSet\Services\RamDisk","ImagePath",0x00020000,"system32\drivers\ramdisk.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\RamDisk","Start",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\RamDisk","Type",0x00010001,0x00000002
+
+; EXT2 Filesystem driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Ext2fs","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Ext2fs","Group",0x00000000,"Boot File System"
+HKLM,"SYSTEM\CurrentControlSet\Services\Ext2fs","ImagePath",0x00020000,"system32\drivers\ext2.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Ext2fs","Start",0x00010001,0x00000004
+HKLM,"SYSTEM\CurrentControlSet\Services\Ext2fs","Type",0x00010001,0x00000002
+
+; VBE SVGA driver
+HKLM,"SYSTEM\CurrentControlSet\Services\VBE","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\VBE","Group",0x00000000,"Video Save"
+HKLM,"SYSTEM\CurrentControlSet\Services\VBE","ImagePath",0x00020000,"system32\drivers\vbemp.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\VBE","Start",0x00010001,0x00000004
+HKLM,"SYSTEM\CurrentControlSet\Services\VBE","Type",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\VBE","Tag",0x00010001,0x00000001
+
+HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\VBE\Device0","InstalledDisplayDrivers",0x00010000,"framebuf"
+HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\VBE\Device0","DefaultSettings.VRefresh",0x00010001,1
+HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\VBE\Device0","DefaultSettings.BitsPerPel",0x00010001,8
+HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\VBE\Device0","DefaultSettings.XResolution",0x00010001,640
+HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\VBE\Device0","DefaultSettings.YResolution",0x00010001,480
+
+; VGA miniport driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Vga","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\Vga","Group",0x00000000,"Video Save"
+HKLM,"SYSTEM\CurrentControlSet\Services\Vga","ImagePath",0x00020000,"system32\drivers\vgamp.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\Vga","Start",0x00010001,0x00000004
+HKLM,"SYSTEM\CurrentControlSet\Services\Vga","Type",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\Vga","Tag",0x00010001,0x00000002
+
+HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\Vga\Device0","InstalledDisplayDrivers",0x00010000,"vgaddi"
+HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\Vga\Device0","DefaultSettings.VRefresh",0x00010001,1
+HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\Vga\Device0","DefaultSettings.BitsPerPel",0x00010001,8
+HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\Vga\Device0","DefaultSettings.XResolution",0x00010001,640
+HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\Vga\Device0","DefaultSettings.YResolution",0x00010001,480
+
+; USB uhci/ehci driver
+HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","ErrorControl",0x00010001,0x00000000
+HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","Group",0x00000000,"Base"
+HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","ImagePath",0x00020000,"system32\drivers\usbdriver.sys"
+HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","Start",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\usbdriver","Type",0x00010001,0x00000001
+
+; USB storage driver
+;HKLM,"SYSTEM\CurrentControlSet\Services\usbstor","ErrorControl",0x00010001,0x00000000
+;HKLM,"SYSTEM\CurrentControlSet\Services\usbstor","Group",0x00000000,"Extended Base"
+;HKLM,"SYSTEM\CurrentControlSet\Services\usbstor","ImagePath",0x00020000,"system32\drivers\usbstor.sys"
+;HKLM,"SYSTEM\CurrentControlSet\Services\usbstor","Start",0x00010001,0x00000003
+;HKLM,"SYSTEM\CurrentControlSet\Services\usbstor","Type",0x00010001,0x00000001
+
+; Windows Installer Service
+HKLM,"SYSTEM\CurrentControlSet\Services\MSIserver","DisplayName",0x00000000,"ReactOS Installer"
+HKLM,"SYSTEM\CurrentControlSet\Services\MSIserver","Description",0x00000000,"Controls installation, maintenance, and removal of software packaged as an msi (Windows Installer)"
+HKLM,"SYSTEM\CurrentControlSet\Services\MSIserver","Group",0x00000000,"Windows Installer"
+HKLM,"SYSTEM\CurrentControlSet\Services\MSIserver","ErrorControl",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\MSIserver","ImagePath",0x00020000,"system32\msiexec.exe /V"
+HKLM,"SYSTEM\CurrentControlSet\Services\MSIserver","Start",0x00010001,0x00000003
+HKLM,"SYSTEM\CurrentControlSet\Services\MSIserver","Type",0x00010001,0x00000020
+
+; ControlSet selection settings
+HKLM,"SYSTEM\Select","Current",0x00010001,0x00000001
+HKLM,"SYSTEM\Select","Default",0x00010001,0x00000001
+HKLM,"SYSTEM\Select","Failed",0x00010001,0x00000000
+HKLM,"SYSTEM\Select","LastKnownGood",0x00010001,0x00000000
+
+; System setup settings
+HKLM,"SYSTEM\Setup","CmdLine",0x00000000,"setup -newsetup"
+HKLM,"SYSTEM\Setup","OsLoaderPath",0x00000000,"\"
+HKLM,"SYSTEM\Setup","SetupType",0x00010001,0x00000001
+HKLM,"SYSTEM\Setup","SystemPartition",0x00000000,"\Device\Harddisk0\Partition1"
+HKLM,"SYSTEM\Setup","SystemSetupInProgress",0x00010001,0x00000001
+
+; Debug channels
+;HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","DEBUGCHANNEL",0x00020000,"+ole,+rpc"
+
+; EOF
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
-<module name="livecd" type="liveiso" output="ReactOS-LiveCD.iso">
+<module name="livecd" type="liveiso" output="ReactOS-LiveCD-$(ARCH).iso">
<bootsector>isoboot</bootsector>
</module>
+++ /dev/null
-; Main ReactOS package
-
-.Set DiskLabelTemplate="ReactOS" ; Label of disk
-.Set CabinetNameTemplate="reactos.cab" ; reactos.cab
-.Set InfFileName="reactos.inf" ; reactos.inf
-
-
-;.Set Cabinet=on
-;.Set Compress=on
-
-.InfBegin
-[Version]
-Signature = "$ReactOS$"
-
-[Directories]
-1 = system32
-2 = system32\drivers
-3 = Fonts
-4 =
-5 = system32\drivers\etc
-6 = inf
-7 = bin
-8 = media
-
-.InfEnd
-
-; Contents of disk
-.InfBegin
-[SourceFiles]
-.InfEnd
-
-
-; Base files
-base\applications\cacls\cacls.exe 1
-base\applications\calc\calc.exe 1
-base\applications\charmap\charmap.exe 1
-base\applications\cmdutils\dbgprint\dbgprint.exe 1
-base\applications\cmdutils\doskey\doskey.exe 1
-base\applications\cmdutils\find\find.exe 1
-base\applications\cmdutils\hostname\hostname.exe 1
-base\applications\cmdutils\lodctr\lodctr.exe 1
-base\applications\cmdutils\more\more.exe 1
-base\applications\cmdutils\reg\reg.exe 1
-base\applications\cmdutils\xcopy\xcopy.exe 1
-base\applications\control\control.exe 1
-base\applications\dxdiag\dxdiag.exe 1
-base\applications\fontview\fontview.exe 1
-base\applications\mscutils\devmgmt\devmgmt.exe 1
-base\applications\mscutils\eventvwr\eventvwr.exe 1
-base\applications\games\solitaire\sol.exe 1
-base\applications\games\spider\spider.exe 1
-base\applications\games\winemine\winemine.exe 1
-base\applications\hh\hh.exe 4
-base\applications\kbswitch\kbswitch.exe 1
-base\applications\kbswitch\kbsdll\kbsdll.dll 1
-base\applications\logoff\logoff.exe 1
-base\applications\magnify\magnify.exe 1
-base\applications\mplay32\mplay32.exe 1
-base\applications\msconfig\msconfig.exe 1
-base\applications\mstsc\mstsc.exe 1
-base\applications\network\arp\arp.exe 1
-base\applications\network\dwnl\dwnl.exe 1
-base\applications\network\route\route.exe 1
-base\applications\network\finger\finger.exe 1
-base\applications\network\ftp\ftp.exe 1
-base\applications\network\ipconfig\ipconfig.exe 1
-base\applications\network\netstat\netstat.exe 1
-base\applications\network\nslookup\nslookup.exe 1
-base\applications\network\ping\ping.exe 1
-base\applications\network\telnet\telnet.exe 1
-base\applications\network\tracert\tracert.exe 1
-base\applications\network\whois\whois.exe 1
-base\applications\notepad\notepad.exe 1
-base\applications\paint\paint.exe 1
-base\applications\rapps\rapps.exe 1
-base\applications\regedit\regedit.exe 4
-base\applications\regedit\clb\clb.dll 1
-base\applications\regedt32\regedt32.exe 1
-base\applications\sc\sc.exe 1
-base\applications\screensavers\3dtext\3dtext.scr 1
-base\applications\screensavers\logon\logon.scr 1
-base\applications\mscutils\servman\servman.exe 1
-base\applications\shutdown\shutdown.exe 1
-base\applications\sndrec32\sndrec32.exe 1
-base\applications\sndvol32\sndvol32.exe 1
-base\applications\taskmgr\taskmgr.exe 1
-base\applications\winhlp32\winhlp32.exe 4
-base\applications\winver\winver.exe 1
-base\applications\wordpad\wordpad.exe 1
-base\applications\write\write.exe 1
-
-base\services\audiosrv\audiosrv.exe 1
-base\services\dhcp\dhcp.exe 1
-base\services\eventlog\eventlog.exe 1
-base\services\rpcss\rpcss.exe 1
-base\services\spoolsv\spoolsv.exe 1
-base\services\tcpsvcs\tcpsvcs.exe 1
-base\services\telnetd\telnetd.exe 1
-base\services\tcpsvcs\quotes 5
-base\services\umpnpmgr\umpnpmgr.exe 1
-base\services\wlansvc\wlansvc.exe 1
-base\services\svchost\svchost.exe 1
-
-base\setup\setup\setup.exe 1
-base\setup\vmwinst\vmwinst.exe 1
-
-base\shell\cmd\cmd.exe 1
-base\shell\explorer\explorer.exe 4
-base\shell\explorer\explorer-cfg-template.xml 4
-base\shell\explorer\notifyhook\notifyhook.dll 1
-base\shell\explorer-new\explorer_new.exe 4 optional
-
-base\system\autochk\autochk.exe 1
-base\system\bootok\bootok.exe 1
-base\system\format\format.exe 1
-base\system\lsass\lsass.exe 1
-base\system\msiexec\msiexec.exe 1
-base\system\regsvr32\regsvr32.exe 1
-base\system\rundll32\rundll32.exe 1
-base\system\runonce\runonce.exe 1
-base\system\services\services.exe 1
-base\system\userinit\userinit.exe 1
-base\system\winlogon\winlogon.exe 1
-base\system\expand\expand.exe 1
-base\system\smss\smss.exe 1
-
-
-; Dynamic Link Libraries
-dll\3rdparty\mesa32\mesa32.dll 1
-dll\3rdparty\libjpeg\libjpeg.dll 1
-dll\3rdparty\libxslt\libxslt.dll 1
-dll\3rdparty\dxtn\dxtn.dll 1 optional
-
-dll\cpl\access\access.cpl 1
-dll\cpl\appwiz\appwiz.cpl 1
-dll\cpl\console\console.dll 1
-dll\cpl\desk\desk.cpl 1
-dll\cpl\hdwwiz\hdwwiz.cpl 1
-dll\cpl\input\input.dll 1
-dll\cpl\intl\intl.cpl 1
-dll\cpl\joy\joy.cpl 1
-;dll\cpl\liccpa\liccpa.cpl 1
-dll\cpl\main\main.cpl 1
-dll\cpl\mmsys\mmsys.cpl 1
-dll\cpl\ncpa\ncpa.cpl 1
-;dll\cpl\odbccp32\odbccp32.cpl 1
-dll\cpl\powercfg\powercfg.cpl 1
-dll\cpl\sysdm\sysdm.cpl 1
-;dll\cpl\telephon\telephon.cpl 1
-dll\cpl\timedate\timedate.cpl 1
-;dll\cpl\usrmgr\usrmgr.cpl 1
-
-dll\directx\amstream\amstream.dll 1
-dll\directx\dinput\dinput.dll 1
-dll\directx\dinput8\dinput8.dll 1
-dll\directx\dmusic\dmusic.dll 1
-dll\directx\dplay\dplay.dll 1
-dll\directx\dplayx\dplayx.dll 1
-dll\directx\dsound\dsound.dll 1
-dll\directx\dxdiagn\dxdiagn.dll 1
-dll\directx\wine\ddraw\ddraw.dll 1
-dll\directx\d3d8thk\d3d8thk.dll 1
-dll\directx\devenum\devenum.dll 1
-dll\directx\ksproxy\ksproxy.ax 1
-dll\directx\ksuser\ksuser.dll 1
-dll\directx\msdmo\msdmo.dll 1
-dll\directx\quartz\quartz.dll 1
-dll\directx\qedit\qedit.dll 1
-dll\directx\wine\d3d8\d3d8.dll 1
-dll\directx\wine\wined3d\wined3d.dll 1
-dll\directx\wine\d3d9\d3d9.dll 1
-
-dll\keyboard\kbda1\kbda1.dll 1
-dll\keyboard\kbda2\kbda2.dll 1
-dll\keyboard\kbda3\kbda3.dll 1
-dll\keyboard\kbdal\kbdal.dll 1
-dll\keyboard\kbdarme\kbdarme.dll 1
-dll\keyboard\kbdarmw\kbdarmw.dll 1
-dll\keyboard\kbdaze\kbdaze.dll 1
-dll\keyboard\kbdazel\kbdazel.dll 1
-dll\keyboard\kbdbgm\kbdbgm.dll 1
-dll\keyboard\kbdbgt\kbdbgt.dll 1
-dll\keyboard\kbdblr\kbdblr.dll 1
-dll\keyboard\kbdbr\kbdbr.dll 1
-dll\keyboard\kbdbga\kbdbga.dll 1
-dll\keyboard\kbdbe\kbdbe.dll 1
-dll\keyboard\kbdbur\kbdbur.dll 1
-dll\keyboard\kbdcan\kbdcan.dll 1
-dll\keyboard\kbdcr\kbdcr.dll 1
-dll\keyboard\kbdcz\kbdcz.dll 1
-dll\keyboard\kbdcz1\kbdcz1.dll 1
-dll\keyboard\kbdda\kbdda.dll 1
-dll\keyboard\kbddv\kbddv.dll 1
-dll\keyboard\kbdes\kbdes.dll 1
-dll\keyboard\kbdest\kbdest.dll 1
-dll\keyboard\kbdfc\kbdfc.dll 1
-dll\keyboard\kbdfi\kbdfi.dll 1
-dll\keyboard\kbdfr\kbdfr.dll 1
-dll\keyboard\kbdgeo\kbdgeo.dll 1
-dll\keyboard\kbdgerg\kbdgerg.dll 1
-dll\keyboard\kbdgneo\kbdgneo.dll 1
-dll\keyboard\kbdgrist\kbdgrist.dll 1
-dll\keyboard\kbdgr\kbdgr.dll 1
-dll\keyboard\kbdhe\kbdhe.dll 1
-dll\keyboard\kbdheb\kbdheb.dll 1
-dll\keyboard\kbdhu\kbdhu.dll 1
-dll\keyboard\kbdic\kbdic.dll 1
-dll\keyboard\kbdinasa\kbdinasa.dll 1
-dll\keyboard\kbdinben\kbdinben.dll 1
-dll\keyboard\kbdindev\kbdindev.dll 1
-dll\keyboard\kbdinguj\kbdinguj.dll 1
-dll\keyboard\kbdinmal\kbdinmal.dll 1
-dll\keyboard\kbdir\kbdir.dll 1
-dll\keyboard\kbdit\kbdit.dll 1
-dll\keyboard\kbdja\kbdja.dll 1
-dll\keyboard\kbdkaz\kbdkaz.dll 1
-dll\keyboard\kbdla\kbdla.dll 1
-dll\keyboard\kbdlt1\kbdlt1.dll 1
-dll\keyboard\kbdlv\kbdlv.dll 1
-dll\keyboard\kbdmac\kbdmac.dll 1
-dll\keyboard\kbdne\kbdne.dll 1
-dll\keyboard\kbdno\kbdno.dll 1
-dll\keyboard\kbdpl1\kbdpl1.dll 1
-dll\keyboard\kbdpo\kbdpo.dll 1
-dll\keyboard\kbdro\kbdro.dll 1
-dll\keyboard\kbdru\kbdru.dll 1
-dll\keyboard\kbdru1\kbdru1.dll 1
-dll\keyboard\kbdsg\kbdsg.dll 1
-dll\keyboard\kbdsk\kbdsk.dll 1
-dll\keyboard\kbdsk1\kbdsk1.dll 1
-dll\keyboard\kbdsw\kbdsw.dll 1
-dll\keyboard\kbdtat\kbdtat.dll 1
-dll\keyboard\kbdth0\kbdth0.dll 1
-dll\keyboard\kbdth1\kbdth1.dll 1
-dll\keyboard\kbdth2\kbdth2.dll 1
-dll\keyboard\kbdth3\kbdth3.dll 1
-dll\keyboard\kbdtuf\kbdtuf.dll 1
-dll\keyboard\kbdtuq\kbdtuq.dll 1
-dll\keyboard\kbduk\kbduk.dll 1
-dll\keyboard\kbdur\kbdur.dll 1
-dll\keyboard\kbdurs\kbdurs.dll 1
-dll\keyboard\kbdus\kbdus.dll 1
-dll\keyboard\kbdusa\kbdusa.dll 1
-dll\keyboard\kbdusl\kbdusl.dll 1
-dll\keyboard\kbdusr\kbdusr.dll 1
-dll\keyboard\kbdusx\kbdusx.dll 1
-dll\keyboard\kbduzb\kbduzb.dll 1
-dll\keyboard\kbdvntc\kbdvntc.dll 1
-dll\keyboard\kbdycc\kbdycc.dll 1
-dll\keyboard\kbdycl\kbdycl.dll 1
-dll\keyboard\kbdko\kbdko.dll 1
-
-dll\ntdll\ntdll.dll 1
-
-dll\win32\acledit\acledit.dll 1
-dll\win32\aclui\aclui.dll 1
-dll\win32\activeds\activeds.dll 1
-dll\win32\advapi32\advapi32.dll 1
-dll\win32\advpack\advpack.dll 1
-dll\win32\actxprxy\actxprxy.dll 1
-dll\win32\atl\atl.dll 1
-dll\win32\authz\authz.dll 1
-dll\win32\avicap32\avicap32.dll 1
-dll\win32\avifil32\avifil32.dll 1
-dll\win32\bcrypt\bcrypt.dll 1
-dll\win32\beepmidi\beepmidi.dll 1
-dll\win32\browseui\browseui.dll 1
-dll\win32\cabinet\cabinet.dll 1
-dll\win32\cards\cards.dll 1
-dll\win32\cfgmgr32\cfgmgr32.dll 1
-dll\win32\clusapi\clusapi.dll 1
-dll\win32\comcat\comcat.dll 1
-dll\win32\comctl32\comctl32.dll 1
-dll\win32\comdlg32\comdlg32.dll 1
-dll\win32\compstui\compstui.dll 1
-dll\win32\credui\credui.dll 1
-dll\win32\crtdll\crtdll.dll 1
-dll\win32\crypt32\crypt32.dll 1
-dll\win32\cryptdlg\cryptdlg.dll 1
-dll\win32\cryptdll\cryptdll.dll 1
-dll\win32\cryptnet\cryptnet.dll 1
-dll\win32\cryptui\cryptui.dll 1
-dll\win32\dbghelp\dbghelp.dll 1
-dll\win32\dciman32\dciman32.dll 1
-dll\win32\dwmapi\dwmapi.dll 1
-dll\win32\devmgr\devmgr.dll 1
-dll\win32\dhcpcsvc\dhcpcsvc.dll 1
-dll\win32\dnsapi\dnsapi.dll 1
-dll\win32\fmifs\fmifs.dll 1
-dll\win32\fusion\fusion.dll 1
-dll\win32\gdi32\gdi32.dll 1
-dll\win32\gdiplus\gdiplus.dll 1
-dll\win32\getuname\getuname.dll 1
-dll\win32\glu32\glu32.dll 1
-dll\win32\hhctrl.ocx\hhctrl.ocx 1
-dll\win32\hid\hid.dll 1
-dll\win32\hlink\hlink.dll 1
-dll\win32\hnetcfg\hnetcfg.dll 1
-dll\win32\httpapi\httpapi.dll 1
-dll\win32\iccvid\iccvid.dll 1
-dll\win32\icmp\icmp.dll 1
-dll\win32\imaadp32.acm\imaadp32.acm 1
-dll\win32\imagehlp\imagehlp.dll 1
-dll\win32\imm32\imm32.dll 1
-dll\win32\inetcomm\inetcomm.dll 1
-dll\win32\inetmib1\inetmib1.dll 1
-dll\win32\initpki\initpki.dll 1
-dll\win32\inseng\inseng.dll 1
-dll\win32\iphlpapi\iphlpapi.dll 1
-dll\win32\itircl\itircl.dll 1
-dll\win32\itss\itss.dll 1
-dll\win32\jscript\jscript.dll 1
-dll\win32\kernel32\kernel32.dll 1
-dll\win32\loadperf\loadperf.dll 1
-dll\win32\localspl\localspl.dll 1
-dll\win32\localui\localui.dll 1
-dll\win32\lsasrv\lsasrv.dll 1
-dll\win32\lz32\lz32.dll 1
-dll\win32\mapi32\mapi32.dll 1
-dll\win32\mciavi32\mciavi32.dll 1
-dll\win32\mcicda\mcicda.dll 1
-dll\win32\mciqtz32\mciqtz32.dll 1
-dll\win32\mciseq\mciseq.dll 1
-dll\win32\mciwave\mciwave.dll 1
-dll\win32\mlang\mlang.dll 1
-dll\win32\mmdrv\mmdrv.dll 1
-dll\win32\modemui\modemui.dll 1
-dll\win32\mpr\mpr.dll 1
-dll\win32\mprapi\mprapi.dll 1
-dll\win32\msacm32\msacm32.dll 1
-dll\win32\msacm32\msacm32.drv\msacm32.drv 1
-dll\win32\msadp32.acm\msadp32.acm 1
-dll\win32\msafd\msafd.dll 1
-dll\win32\mscat32\mscat32.dll 1
-dll\win32\mscms\mscms.dll 1
-dll\win32\mscoree\mscoree.dll 1
-dll\win32\msctf\msctf.dll 1
-dll\win32\msftedit\msftedit.dll 1
-dll\win32\msg711.acm\msg711.acm 1
-dll\win32\msgina\msgina.dll 1
-dll\win32\msgsm32.acm\msgsm32.acm 1
-dll\win32\mshtml\mshtml.dll 1
-dll\win32\mshtml.tlb\mshtml.tlb 1
-dll\win32\msi\msi.dll 1
-dll\win32\msimg32\msimg32.dll 1
-dll\win32\msimtf\msimtf.dll 1
-dll\win32\msisip\msisip.dll 1
-dll\win32\msisys.ocx\msisys.ocx 1
-dll\win32\msnet32\msnet32.dll 1
-dll\win32\msrle32\msrle32.dll 1
-dll\win32\mssign32\mssign32.dll 1
-dll\win32\mssip32\mssip32.dll 1
-dll\win32\mstask\mstask.dll 1
-dll\win32\msvcrt\msvcrt.dll 1
-dll\win32\msvcrt20\msvcrt20.dll 1
-dll\win32\msvcrt40\msvcrt40.dll 1
-dll\win32\msvfw32\msvfw32.dll 1
-dll\win32\msvidc32\msvidc32.dll 1
-dll\win32\mswsock\mswsock.dll 1
-dll\win32\msxml3\msxml3.dll 1
-dll\win32\nddeapi\nddeapi.dll 1
-dll\win32\netapi32\netapi32.dll 1
-dll\win32\netcfgx\netcfgx.dll 1
-dll\win32\netid\netid.dll 1
-dll\win32\netshell\netshell.dll 1
-dll\win32\newdev\newdev.dll 1
-dll\win32\ntdsapi\ntdsapi.dll 1
-dll\win32\ntlanman\ntlanman.dll 1
-dll\win32\ntmarta\ntmarta.dll 1
-dll\win32\ntprint\ntprint.dll 1
-dll\win32\objsel\objsel.dll 1
-dll\win32\odbc32\odbc32.dll 1
-dll\win32\odbccp32\odbccp32.dll 1
-dll\win32\ole32\ole32.dll 1
-dll\win32\oleacc\oleacc.dll 1
-dll\win32\oleaut32\oleaut32.dll 1
-dll\win32\olecli32\olecli32.dll 1
-dll\win32\oledlg\oledlg.dll 1
-dll\win32\olepro32\olepro32.dll 1
-dll\win32\olesvr32\olesvr32.dll 1
-dll\win32\olethk32\olethk32.dll 1
-dll\win32\opengl32\opengl32.dll 1
-dll\win32\pdh\pdh.dll 1
-dll\win32\pidgen\pidgen.dll 1
-dll\win32\powrprof\powrprof.dll 1
-dll\win32\printui\printui.dll 1
-dll\win32\psapi\psapi.dll 1
-dll\win32\pstorec\pstorec.dll 1
-dll\win32\qmgr\qmgr.dll 1
-dll\win32\qmgrprxy\qmgrprxy.dll 1
-dll\win32\query\query.dll 1
-dll\win32\rasadhlp\rasadhlp.dll 1
-dll\win32\rasapi32\rasapi32.dll 1
-dll\win32\rasdlg\rasdlg.dll 1
-dll\win32\resutils\resutils.dll 1
-dll\win32\rasman\rasman.dll 1
-dll\win32\riched20\riched20.dll 1
-dll\win32\riched32\riched32.dll 1
-dll\win32\rpcrt4\rpcrt4.dll 1
-dll\win32\rsabase\rsabase.dll 1
-dll\win32\rsaenh\rsaenh.dll 1
-dll\win32\samlib\samlib.dll 1
-dll\win32\samsrv\samsrv.dll 1
-dll\win32\sccbase\sccbase.dll 1
-dll\win32\schannel\schannel.dll 1
-dll\win32\secur32\secur32.dll 1
-dll\win32\security\security.dll 1
-dll\win32\sensapi\sensapi.dll 1
-dll\win32\serialui\serialui.dll 1
-dll\win32\setupapi\setupapi.dll 1
-dll\win32\sfc\sfc.dll 1
-dll\win32\sfc_os\sfc_os.dll 1
-dll\win32\shdoclc\shdoclc.dll 1
-dll\win32\shdocvw\shdocvw.dll 1
-dll\win32\shell32\shell32.dll 1
-dll\win32\shfolder\shfolder.dll 1
-dll\win32\shimgvw\shimgvw.dll 1
-dll\win32\shlwapi\shlwapi.dll 1
-dll\win32\slbcsp\slbcsp.dll 1
-dll\win32\smdll\smdll.dll 1
-dll\win32\snmpapi\snmpapi.dll 1
-dll\win32\softpub\softpub.dll 1
-dll\win32\spoolss\spoolss.dll 1
-dll\win32\srclient\srclient.dll 1
-dll\win32\stdole2.tlb\stdole2.tlb 1
-dll\win32\stdole32.tlb\stdole32.tlb 1
-dll\win32\sti\sti.dll 1
-dll\win32\sxs\sxs.dll 1
-dll\win32\syssetup\syssetup.dll 1
-dll\win32\t2embed\t2embed.dll 1
-dll\win32\tapi32\tapi32.dll 1
-dll\win32\tapiui\tapiui.dll 1
-dll\win32\traffic\traffic.dll 1
-dll\win32\twain_32\twain_32.dll 1
-dll\win32\uext2\uext2.dll 1
-dll\win32\ufat\ufat.dll 1
-dll\win32\ufatx\ufatx.dll 1 optional
-dll\win32\untfs\untfs.dll 1
-dll\win32\updspapi\updspapi.dll 1
-dll\win32\url\url.dll 1
-dll\win32\urlmon\urlmon.dll 1
-dll\win32\user32\user32.dll 1
-dll\win32\userenv\userenv.dll 1
-dll\win32\usp10\usp10.dll 1
-dll\win32\uxtheme\uxtheme.dll 1
-dll\win32\vdmdbg\vdmdbg.dll 1
-dll\win32\version\version.dll 1
-dll\win32\windowscodecs\windowscodecs.dll 1
-dll\win32\winemp3.acm\winemp3.acm 1
-dll\win32\winfax\winfax.dll 1
-dll\win32\winhttp\winhttp.dll 1
-dll\win32\wininet\wininet.dll 1
-dll\win32\winmm\winmm.dll 1
-dll\win32\winspool\winspool.drv 1
-dll\win32\winsta\winsta.dll 1
-dll\win32\wlanapi\wlanapi.dll 1
-dll\win32\wintrust\wintrust.dll 1
-dll\win32\wldap32\wldap32.dll 1
-dll\win32\wmi\wmi.dll 1
-dll\win32\ws2_32\ws2_32.dll 1
-dll\win32\ws2help\ws2help.dll 1
-dll\win32\wshirda\wshirda.dll 1
-dll\win32\wshtcpip\wshtcpip.dll 1
-dll\win32\wsock32\wsock32.dll 1
-dll\win32\wtsapi32\wtsapi32.dll 1
-dll\win32\wuapi\wuapi.dll 1
-dll\win32\xinput1_1\xinput1_1.dll 1
-dll\win32\xinput1_2\xinput1_2.dll 1
-dll\win32\xinput1_3\xinput1_3.dll 1
-dll\win32\xinput9_1_0\xinput9_1_0.dll 1
-dll\win32\xmllite\xmllite.dll 1
-dll\win32\winmm\midimap\midimap.dll 1
-dll\win32\wdmaud.drv\wdmaud.drv 1
-
-; Shell Extensions
-dll\shellext\deskadp\deskadp.dll 1
-dll\shellext\deskmon\deskmon.dll 1
-
-; Drivers
-drivers\base\bootvid\bootvid.dll 1
-drivers\base\beep\beep.sys 2
-drivers\base\null\null.sys 2
-
-drivers\bus\isapnp\isapnp.sys 2
-
-drivers\directx\dxapi\dxapi.sys 2
-drivers\directx\dxg\dxg.sys 2
-drivers\directx\dxgthk\dxgthk.sys 2
-
-drivers\filesystems\fs_rec\fs_rec.sys 2
-drivers\filesystems\msfs\msfs.sys 2
-drivers\filesystems\mup\mup.sys 2
-drivers\filesystems\npfs\npfs.sys 2
-
-drivers\input\mouclass\mouclass.sys 2
-drivers\input\sermouse\sermouse.sys 2
-
-drivers\ksfilter\ks\ks.sys 2
-
-drivers\network\afd\afd.sys 2
-drivers\network\ndis\ndis.sys 2
-drivers\network\tcpip\tcpip.sys 2
-drivers\network\tdi\tdi.sys 2
-drivers\network\dd\ne2000\ne2000.sys 2
-drivers\network\dd\pcnet\pcnet.sys 2
-
-drivers\serial\serenum\serenum.sys 2
-drivers\serial\serial\serial.sys 2
-
-drivers\storage\ide\pciide\pciide.sys 2
-drivers\storage\ide\pciidex\pciidex.sys 2
-
-;drivers\usb\miniport\usbohci\usbohci.sys 2
-;drivers\usb\miniport\usbuhci\usbuhci.sys 2
-;drivers\usb\usbhub\usbhub.sys 2
-;drivers\usb\usbport\usbport.sys 2
-drivers\usb\nt4compat\usbdriver\usbdriver.sys 2
-
-drivers\video\displays\vga\vgaddi.dll 1
-drivers\video\displays\framebuf\framebuf.dll 1
-drivers\video\miniport\vga\vgamp.sys 2
-drivers\video\miniport\vbe\vbemp.sys 2
-drivers\video\videoprt\videoprt.sys 2
-drivers\video\font\ftfd\ftfd.dll 1
-
-drivers\wdm\audio\filters\kmixer\kmixer.sys 2
-drivers\wdm\audio\sysaudio\sysaudio.sys 2
-drivers\wdm\audio\legacy\wdmaud\wdmaud.sys 2
-drivers\wdm\audio\backpln\portcls\portcls.sys 2
-drivers\wdm\audio\drm\drmk\drmk.sys 2
-drivers\wmi\wmilib.sys 2
-
-; Media
-media\fonts\DejaVuSans.ttf 3
-media\fonts\DejaVuSans-Bold.ttf 3
-media\fonts\DejaVuSans-BoldOblique.ttf 3
-media\fonts\DejaVuSansMono.ttf 3
-media\fonts\DejaVuSansMono-Bold.ttf 3
-media\fonts\DejaVuSansMono-BoldOblique.ttf 3
-media\fonts\DejaVuSansMono-Oblique.ttf 3
-media\fonts\DejaVuSans-Oblique.ttf 3
-media\fonts\DejaVuSerif.ttf 3
-media\fonts\DejaVuSerif-Bold.ttf 3
-media\fonts\DejaVuSerif-BoldItalic.ttf 3
-media\fonts\DejaVuSerif-Italic.ttf 3
-
-media\fonts\FreeMono.ttf 3
-media\fonts\FreeMonoBold.ttf 3
-media\fonts\FreeMonoBoldOblique.ttf 3
-media\fonts\FreeMonoOblique.ttf 3
-
-media\fonts\LiberationMono-Bold.ttf 3
-media\fonts\LiberationMono-BoldItalic.ttf 3
-media\fonts\LiberationMono-Italic.ttf 3
-media\fonts\LiberationMono-Regular.ttf 3
-media\fonts\LiberationSans-Bold.ttf 3
-media\fonts\LiberationSans-BoldItalic.ttf 3
-media\fonts\LiberationSans-Italic.ttf 3
-media\fonts\LiberationSans-Regular.ttf 3
-media\fonts\LiberationSerif-Bold.ttf 3
-media\fonts\LiberationSerif-BoldItalic.ttf 3
-media\fonts\LiberationSerif-Italic.ttf 3
-media\fonts\LiberationSerif-Regular.ttf 3
-
-media\fonts\Marlett.ttf 3
-media\fonts\symbol.ttf 3
-media\fonts\tahoma.ttf 3
-media\fonts\tahomabd.ttf 3
-
-media\nls\c_037.nls 1
-media\nls\c_424.nls 1
-media\nls\c_500.nls 1
-media\nls\c_737.nls 1
-media\nls\c_775.nls 1
-media\nls\c_850.nls 1
-media\nls\c_852.nls 1
-media\nls\c_855.nls 1
-media\nls\c_856.nls 1
-media\nls\c_857.nls 1
-media\nls\c_860.nls 1
-media\nls\c_861.nls 1
-media\nls\c_862.nls 1
-media\nls\c_863.nls 1
-media\nls\c_864.nls 1
-media\nls\c_865.nls 1
-media\nls\c_866.nls 1
-media\nls\c_869.nls 1
-media\nls\c_874.nls 1
-media\nls\c_875.nls 1
-media\nls\c_878.nls 1
-media\nls\c_932.nls 1
-media\nls\c_936.nls 1
-media\nls\c_949.nls 1
-media\nls\c_950.nls 1
-media\nls\c_1006.nls 1
-media\nls\c_1026.nls 1
-media\nls\c_1250.nls 1
-media\nls\c_1251.nls 1
-media\nls\c_1253.nls 1
-media\nls\c_1254.nls 1
-media\nls\c_1255.nls 1
-media\nls\c_1256.nls 1
-media\nls\c_1257.nls 1
-media\nls\c_1258.nls 1
-media\nls\c_10000.nls 1
-media\nls\c_10006.nls 1
-media\nls\c_10007.nls 1
-media\nls\c_10029.nls 1
-media\nls\c_10079.nls 1
-media\nls\c_10081.nls 1
-media\nls\c_20866.nls 1
-media\nls\c_21866.nls 1
-media\nls\c_28591.nls 1
-media\nls\c_28592.nls 1
-media\nls\c_28593.nls 1
-media\nls\c_28594.nls 1
-media\nls\c_28595.nls 1
-media\nls\c_28596.nls 1
-media\nls\c_28597.nls 1
-media\nls\c_28598.nls 1
-media\nls\c_28599.nls 1
-media\nls\c_28600.nls 1
-media\nls\c_28603.nls 1
-media\nls\c_28604.nls 1
-media\nls\c_28605.nls 1
-media\nls\c_28606.nls 1
-media\drivers\etc\services 5
-media\inf\audio.inf 6
-media\inf\acpi.inf 6
-media\inf\cdrom.inf 6
-media\inf\display.inf 6
-media\inf\font.inf 6
-media\inf\fdc.inf 6
-media\inf\hdc.inf 6
-media\inf\intl.inf 6
-media\inf\layout.inf 6
-media\inf\machine.inf 6
-media\inf\msmouse.inf 6
-media\inf\keyboard.inf 6
-media\inf\ks.inf 6
-media\inf\NET_NIC.inf 6
-media\inf\netamd.inf 6
-media\inf\netisa.inf 6
-media\inf\netrtpnt.inf 6
-media\inf\nettcpip.inf 6
-media\inf\ports.inf 6
-media\inf\scsi.inf 6
-media\inf\syssetup.inf 6
-media\inf\usbport.inf 6
-media\inf\usb.inf 6
-media\inf\usbstor.inf 6
-media\inf\xboxdisp.inf 6
-
-
-; Media Files
-media\sounds\ReactOS_LogOn.wav 8
-
-; Ini Files
-boot\bootdata\system.ini 4
-
-; Regression Testing
-boot\bootdata\bootcdregtest\regtest.cmd 7 optional
-
-; Subsystems
-subsystems\win32\csrss\csrss.exe 1
-subsystems\win32\csrss\win32csr\win32csr.dll 1
-subsystems\ntvdm\ntvdm.exe 1
-subsystems\win32\win32k\win32k.sys 1
-
-; Optional/proprietary files
-modules\optional\DroidSansFallback.ttf 3 optional
-modules\optional\NOTICE_for_Droid_Font.txt 4 optional
-modules\optional\netkvm2k.inf 6 optional
-modules\optional\netkvm2k.cat 6 optional
-modules\optional\netkvm.sys 2 optional
-modules\optional\alcxwdm.inf 6 optional
-modules\optional\alcxwdm.sys 2 optional
-modules\optional\mfc42.dll 1 optional
-modules\optional\mfc42u.dll 1 optional
-modules\optional\mfc71.dll 1 optional
-modules\optional\mfc71u.dll 1 optional
-modules\optional\msvbvm50.dll 1 optional
-modules\optional\msvbvm60.dll 1 optional
-modules\optional\msvcirt.dll 1 optional
-modules\optional\msvcp71.dll 1 optional
-modules\optional\msvcr71.dll 1 optional
-modules\optional\vmx_fb.dll 1 optional
-modules\optional\vmx_mode.dll 1 optional
-modules\optional\vmx_svga.inf 6 optional
-modules\optional\vmx_svga.sys 2 optional
-modules\optional\wine_gecko-1.0.0-x86.cab 4 optional
-
-; Rosapps
-modules\rosapps\applications\screensavers\cylfrac\cylfrac.scr 1 optional
-modules\rosapps\applications\screensavers\matrix\matrix.scr 1 optional
-modules\rosapps\applications\screensavers\blankscr\scrnsave.scr 1 optional
-modules\rosapps\applications\screensavers\starfield\starfield.scr 1 optional
-modules\rosapps\applications\screensavers\mazescr\mazescr.scr 1 optional
-modules\rosapps\applications\screensavers\butterflies\butterflies.scr 1 optional
-modules\rosapps\applications\cmdutils\comp\comp.exe 1 optional
-modules\rosapps\applications\cmdutils\mode\mode.exe 1 optional
-modules\rosapps\applications\cmdutils\sort\sort.exe 1 optional
-modules\rosapps\applications\cmdutils\tee\tee.exe 1 optional
-modules\rosapps\applications\cmdutils\touch\touch.exe 1 optional
-modules\rosapps\applications\cmdutils\uptime\uptime.exe 1 optional
-modules\rosapps\applications\cmdutils\y\y.exe 1 optional
-modules\rosapps\applications\devutils\gdb2\gdb2.exe 1 optional
-modules\rosapps\applications\devutils\gdihv\gdihv.exe 1 optional
-modules\rosapps\applications\devutils\genguid\genguid.exe 1 optional
-modules\rosapps\applications\sysutils\gettype\gettype.exe 1 optional
-modules\rosapps\applications\net\ncftp\ncftp.exe 1 optional
-modules\rosapps\applications\net\netreg\netreg.exe 1 optional
-modules\rosapps\applications\net\niclist\niclist.exe 1 optional
-modules\rosapps\applications\net\roshttpd\roshttpd.exe 1 optional
-modules\rosapps\applications\notevil\notevil.exe 1 optional
-modules\rosapps\applications\sysutils\chkdsk\chkdsk.exe 1 optional
-modules\rosapps\applications\sysutils\systeminfo\systeminfo.exe 1 optional
-modules\rosapps\applications\sysutils\chklib\chklib.exe 1 optional
-modules\rosapps\applications\sysutils\ctm\ctm.exe 1 optional
-modules\rosapps\applications\sysutils\kill\kill.exe 1 optional
-modules\rosapps\applications\sysutils\lsdd\lsdd.exe 1 optional
-modules\rosapps\applications\sysutils\man\man.exe 1 optional
-modules\rosapps\applications\sysutils\pedump\pedump.exe 1 optional
-modules\rosapps\applications\sysutils\regexpl\regexpl.exe 1 optional
-modules\rosapps\applications\sysutils\tcat\tcat.exe 1 optional
-modules\rosapps\applications\sysutils\tlist\tlist.exe 1 optional
-modules\rosapps\applications\sysutils\screenshot\screenshot.exe 1 optional
-modules\rosapps\applications\sysutils\utils\binpatch\binpatch.exe 1 optional
-modules\rosapps\applications\sysutils\utils\cat\cat.exe 1 optional
-modules\rosapps\applications\sysutils\utils\driver\load\load.exe 1 optional
-modules\rosapps\applications\sysutils\utils\driver\unload\unload.exe 1 optional
-modules\rosapps\applications\sysutils\utils\infinst\infinst.exe 1 optional
-modules\rosapps\applications\sysutils\utils\nts2w32err\nts2w32err.exe 1 optional
-modules\rosapps\applications\sysutils\utils\objdir\objdir.exe 1 optional
-modules\rosapps\applications\sysutils\utils\partinfo\partinfo.exe 1 optional
-modules\rosapps\applications\sysutils\utils\ps\ps.exe 1 optional
-modules\rosapps\applications\sysutils\utils\rosperf\rosperf.exe 1 optional
-modules\rosapps\applications\sysutils\utils\stats\stats.exe 1 optional
-modules\rosapps\applications\sysutils\utils\tickcount\tickcount.exe 1 optional
-modules\rosapps\applications\winfile\winfile.exe 1 optional
-modules\rosapps\demos\maze\maze.exe 1 optional
-modules\rosapps\drivers\green\green.sys 2 optional
-
-; Rostests
-modules\rostests\rosautotest\rosautotest.exe 1 optional
-modules\rostests\tests\pseh2\pseh2_test.exe 7 optional
-modules\rostests\winetests\advapi32\advapi32_winetest.exe 7 optional
-modules\rostests\winetests\advpack\advpack_winetest.exe 7 optional
-modules\rostests\winetests\browseui\browseui_winetest.exe 7 optional
-modules\rostests\winetests\cabinet\cabinet_winetest.exe 7 optional
-modules\rostests\winetests\comcat\comcat_winetest.exe 7 optional
-modules\rostests\winetests\comctl32\comctl32_winetest.exe 7 optional
-modules\rostests\winetests\comdlg32\comdlg32_winetest.exe 7 optional
-modules\rostests\winetests\crypt32\crypt32_winetest.exe 7 optional
-modules\rostests\winetests\cryptnet\cryptnet_winetest.exe 7 optional
-modules\rostests\winetests\gdi32\gdi32_winetest.exe 7 optional
-modules\rostests\winetests\gdiplus\gdiplus_winetest.exe 7 optional
-modules\rostests\winetests\hlink\hlink_winetest.exe 7 optional
-modules\rostests\winetests\icmp\icmp_winetest.exe 7 optional
-modules\rostests\winetests\iphlpapi\iphlpapi_winetest.exe 7 optional
-modules\rostests\winetests\jscript\jscript_winetest.exe 7 optional
-modules\rostests\winetests\kernel32\kernel32_winetest.exe 7 optional
-modules\rostests\winetests\lz32\lz32_winetest.exe 7 optional
-modules\rostests\winetests\mapi32\mapi32_winetest.exe 7 optional
-modules\rostests\winetests\mlang\mlang_winetest.exe 7 optional
-modules\rostests\winetests\mshtml\mshtml_winetest.exe 7 optional
-modules\rostests\winetests\msi\msi_winetest.exe 7 optional
-modules\rostests\winetests\mstask\mstask_winetest.exe 7 optional
-modules\rostests\winetests\msvcrt\msvcrt_winetest.exe 7 optional
-modules\rostests\winetests\msxml3\msxml3_winetest.exe 7 optional
-modules\rostests\winetests\netapi32\netapi32_winetest.exe 7 optional
-modules\rostests\winetests\ntdll\ntdll_winetest.exe 7 optional
-modules\rostests\winetests\odbccp32\odbccp32_winetest.exe 7 optional
-modules\rostests\winetests\ole32\ole32_winetest.exe 7 optional
-modules\rostests\winetests\oleaut32\oleaut32_winetest.exe 7 optional
-modules\rostests\winetests\powrprof\powrprof_winetest.exe 7 optional
-modules\rostests\winetests\psapi\psapi_winetest.exe 7 optional
-modules\rostests\winetests\riched20\riched20_winetest.exe 7 optional
-modules\rostests\winetests\rpcrt4\rpcrt4_winetest.exe 7 optional
-modules\rostests\winetests\rsabase\rsabase_winetest.exe 7 optional
-modules\rostests\winetests\rsaenh\rsaenh_winetest.exe 7 optional
-modules\rostests\winetests\schannel\schannel_winetest.exe 7 optional
-modules\rostests\winetests\secur32\secur32_winetest.exe 7 optional
-modules\rostests\winetests\setupapi\setupapi_winetest.exe 7 optional
-modules\rostests\winetests\shdocvw\shdocvw_winetest.exe 7 optional
-modules\rostests\winetests\shell32\shell32_winetest.exe 7 optional
-modules\rostests\winetests\shlwapi\shlwapi_winetest.exe 7 optional
-modules\rostests\winetests\urlmon\urlmon_winetest.exe 7 optional
-modules\rostests\winetests\user32\user32_winetest.exe 7 optional
-modules\rostests\winetests\usp10\usp10_winetest.exe 7 optional
-modules\rostests\winetests\uxtheme\uxtheme_winetest.exe 7 optional
-modules\rostests\winetests\version\version_winetest.exe 7 optional
-modules\rostests\winetests\winhttp\winhttp_winetest.exe 7 optional
-modules\rostests\winetests\wininet\wininet_winetest.exe 7 optional
-modules\rostests\winetests\winmm\winmm_winetest.exe 7 optional
-modules\rostests\winetests\wintrust\wintrust_winetest.exe 7 optional
-modules\rostests\winetests\wlanapi\wlanapi_winetest.exe 7 optional
-modules\rostests\winetests\ws2_32\ws2_32_winetest.exe 7 optional
-
-modules\wallpaper\Angelus_02_ROSWP.bmp 4 optional
#define HYPERSPACE_BASE 0xfffff70000000000ULL
#define HAL_BASE 0xffffffff80000000ULL
-#define APIC_BASE 0xfffffffffee00000ULL // FIXME
+#define APIC_BASE 0xFFFFFFFFFFFE0000ULL
#define APIC_PHYS_BASE 0xfee00000
*/
}
-#if DBG
VOID
MempDump()
{
DPRINTM(DPRINT_WINDOWS, "\n");
}
}
-#endif
enable this (except they/you purchased a license from the patent owner).
This settings is disabled (0) by default.
-->
-<property name="NSWPAT" value="1" />
+<property name="NSWPAT" value="0" />
<!--
Whether to compile with the KD protocol. This will disable support for KDBG
<define name="BUILD_GL32" />
<define name="WIN32" />
<define name="USE_EXTERNAL_DXTN_LIB=1" />
- <define name="USE_X86_ASM" />
- <define name="USE_MMX_ASM" />
- <define name="USE_SSE_ASM" />
+ <if property="ARCH" value="i386">
+ <define name="USE_X86_ASM" />
+ <define name="USE_MMX_ASM" />
+ <define name="USE_SSE_ASM" />
+ </if>
<define name="USE_3DNOW_ASM" />
+ <define name="GL_NO_STDCALL" />
<include base="mesa32">include</include>
<include base="mesa32">src</include>
<include base="mesa32">src/main</include>
<file>t_vertex.c</file>
<file>t_vertex_generic.c</file>
<file>t_vp_build.c</file>
- <file>t_vertex_sse.c</file>
+ <if property="ARCH" value="i386">
+ <file>t_vertex_sse.c</file>
+ </if>
</directory>
<directory name="vbo">
<file>vbo_context.c</file>
</directory>
</directory>
</directory>
- <directory name="x86">
- <directory name="rtasm">
- <file>x86sse.c</file>
+
+ <if property="ARCH" value="i386">
+ <directory name="x86">
+ <directory name="rtasm">
+ <file>x86sse.c</file>
+ </directory>
+ <file>3dnow.c</file>
+ <file>3dnow_normal.S</file>
+ <file>3dnow_xform1.S</file>
+ <file>3dnow_xform2.S</file>
+ <file>3dnow_xform3.S</file>
+ <file>3dnow_xform4.S</file>
+ <file>common_x86.c</file>
+ <file>common_x86_asm.S</file>
+ <file>glapi_x86.S</file>
+ <file>mmx_blend.S</file>
+ <file>read_rgba_span_x86.S</file>
+ <file>sse_normal.S</file>
+ <file>sse_xform1.S</file>
+ <file>sse_xform2.S</file>
+ <file>sse_xform3.S</file>
+ <file>sse_xform4.S</file>
+ <file>x86.c</file>
+ <file>x86_cliptest.S</file>
+ <file>x86_xform2.S</file>
+ <file>x86_xform3.S</file>
+ <file>x86_xform4.S</file>
+ <file>sse.c</file>
</directory>
- <file>3dnow.c</file>
- <file>3dnow_normal.S</file>
- <file>3dnow_xform1.S</file>
- <file>3dnow_xform2.S</file>
- <file>3dnow_xform3.S</file>
- <file>3dnow_xform4.S</file>
- <file>common_x86.c</file>
- <file>common_x86_asm.S</file>
- <file>glapi_x86.S</file>
- <file>mmx_blend.S</file>
- <file>read_rgba_span_x86.S</file>
- <file>sse_normal.S</file>
- <file>sse_xform1.S</file>
- <file>sse_xform2.S</file>
- <file>sse_xform3.S</file>
- <file>sse_xform4.S</file>
- <file>x86.c</file>
- <file>x86_cliptest.S</file>
- <file>x86_xform2.S</file>
- <file>x86_xform3.S</file>
- <file>x86_xform4.S</file>
- <file>sse.c</file>
- </directory>
- <directory name="x86-64">
- <file>x86-64.c</file>
+ </if>
+
+ <if property="ARCH" value="amd64">
+ <directory name="x86-64">
+ <file>x86-64.c</file>
+ <!-- file>glapi_x86-64.S</file -->
+ <file>xform4.S</file>
+ </directory>
+ </if>
+
</directory>
-</directory>
</module>
+++ /dev/null
-MESA_DRIVER_COMMON_SOURCES = \
-driverfuncs.c
+++ /dev/null
-MESA_GLAPI_SOURCES = \
-glapi.c \
-glthread.c
-
-MESA_GLAPI_HEADERS = \
-dispatch.h \
-glapi.h \
-glapioffsets.h \
-glapitable.h \
-glapitemp.h \
-glprocs.h \
-glthread.h
+++ /dev/null
-
-/*
- * Mesa 3-D graphics library
- * Version: 3.5
- *
- * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-#ifndef API_EVAL_H
-#define API_EVAL_H
-
-#include "mtypes.h"
-
-extern void _mesa_EvalPoint1( GLint i );
-extern void _mesa_EvalPoint2( GLint i, GLint j );
-extern void _mesa_EvalCoord1f( GLfloat u );
-extern void _mesa_EvalCoord2f( GLfloat u, GLfloat v );
-extern void _mesa_EvalCoord1fv( const GLfloat *u );
-extern void _mesa_EvalCoord2fv( const GLfloat *u );
-
-#endif
-
-
-
+++ /dev/null
-/*
- * Mesa 3-D graphics library
- * Version: 7.1
- *
- * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-
-
-/**
- * \file mcopmiler.h
- *
- * Define helper macros/etc that are platform or compiler-specific.
- * There shouldn't be anything specific to GL in here.
- */
-
-#ifndef MCOMPILER_H
-#define MCOMPILER_H
-
-
-
-/* Get typedefs for uintptr_t and friends */
-#if defined(__MINGW32__) || defined(__NetBSD__)
-# include <stdint.h>
-#elif defined(_WIN32)
-# include <BaseTsd.h>
-# if _MSC_VER == 1200
- typedef UINT_PTR uintptr_t;
-# endif
-#else
-# include <inttypes.h>
-#endif
-
-
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-
-/**
- * NULL
- */
-#ifndef NULL
-#define NULL 0
-#endif
-
-
-
-/**
- * Function inlining
- */
-#if defined(__GNUC__)
-# define INLINE __inline__
-#elif defined(__MSC__)
-# define INLINE __inline
-#elif defined(_MSC_VER)
-# define INLINE __inline
-#elif defined(__ICL)
-# define INLINE __inline
-#elif defined(__INTEL_COMPILER)
-# define INLINE inline
-#elif defined(__WATCOMC__) && (__WATCOMC__ >= 1100)
-# define INLINE __inline
-#else
-# define INLINE
-#endif
-
-
-/**
- * PUBLIC/USED macros for symbol export.
- *
- * If we build the library with gcc's -fvisibility=hidden flag, we'll
- * use the PUBLIC macro to mark functions that are to be exported.
- *
- * We also need to define a USED attribute, so the optimizer doesn't
- * inline a static function that we later use in an alias. - ajax
- */
-#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
-# define PUBLIC __attribute__((visibility("default")))
-# define USED __attribute__((used))
-#else
-# define PUBLIC
-# define USED
-#endif
-
-
-/**
- * Some compilers don't like some of Mesa's const usage.
- */
-#ifdef NO_CONST
-# define CONST
-#else
-# define CONST const
-#endif
-
-
-/**
- * ASSERT macro
- */
-#if defined(BUILD_FOR_SNAP) && defined(CHECKED)
-# define ASSERT(X) _CHECK(X)
-#elif defined(DEBUG)
-# define ASSERT(X) assert(X)
-#else
-# define ASSERT(X)
-#endif
-
-
-/**
- * __builtin_expect() dummy for non-gcc
- */
-#if (!defined(__GNUC__) || __GNUC__ < 3) && (!defined(__IBMC__) || __IBMC__ < 900)
-# define __builtin_expect(x, y) x
-#endif
-
-
-
-/**
- * The __FUNCTION__ gcc variable is generally only used for debugging.
- * If we're not using gcc, define __FUNCTION__ as a cpp symbol here.
- * Don't define it if using a newer Windows compiler.
- */
-#if defined(__VMS)
-# define __FUNCTION__ "VMS$NL:"
-#elif __STDC_VERSION__ < 199901L
-# if ((!defined __GNUC__) || (__GNUC__ < 2)) && (!defined __xlC__) && \
- (!defined(_MSC_VER) || _MSC_VER < 1300)
-# define __FUNCTION__ "<unknown>"
-# endif
-#endif
-
-
-
-
-/** gcc -pedantic warns about long string literals, LONGSTRING silences that */
-#if !defined(__GNUC__) || (__GNUC__ < 2) || \
- ((__GNUC__ == 2) && (__GNUC_MINOR__ <= 7))
-# define LONGSTRING
-#else
-# define LONGSTRING __extension__
-#endif
-
-
-/* Create a macro so that asm functions can be linked into compilers other
- * than GNU C
- */
-#ifndef _ASMAPI
-#if defined(WIN32) && !defined(BUILD_FOR_SNAP)/* was: !defined( __GNUC__ ) && !defined( VMS ) && !defined( __INTEL_COMPILER )*/
-#define _ASMAPI __cdecl
-#else
-#define _ASMAPI
-#endif
-#ifdef PTR_DECL_IN_FRONT
-#define _ASMAPIP * _ASMAPI
-#else
-#define _ASMAPIP _ASMAPI *
-#endif
-#endif
-
-#ifdef USE_X86_ASM
-#define _NORMAPI _ASMAPI
-#define _NORMAPIP _ASMAPIP
-#else
-#define _NORMAPI
-#define _NORMAPIP *
-#endif
-
-
-
-/**
- * XXX is this used anymore?
- */
-#if !defined(CAPI) && defined(WIN32) && !defined(BUILD_FOR_SNAP)
-#define CAPI _cdecl
-#endif
-
-
-
-/**
- * USE_IEEE: Determine if we're using IEEE floating point
- */
-#if defined(__i386__) || defined(__386__) || defined(__sparc__) || \
- defined(__s390x__) || defined(__powerpc__) || \
- defined(__x86_64__) || \
- defined(ia64) || defined(__ia64__) || \
- defined(__hppa__) || defined(hpux) || \
- defined(__mips) || defined(_MIPS_ARCH) || \
- defined(__arm__) || \
- defined(__sh__) || defined(__m32r__) || \
- (defined(__sun) && defined(_IEEE_754)) || \
- (defined(__alpha__) && (defined(__IEEE_FLOAT) || !defined(VMS)))
-#define USE_IEEE
-#define IEEE_ONE 0x3f800000
-#endif
-
-
-
-/**
- * finite macro
- */
-#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__) && !defined(BUILD_FOR_SNAP)
-# define __WIN32__
-# define finite _finite
-#endif
-
-#if defined(__WATCOMC__)
-# define finite _finite
-# pragma disable_message(201) /* Disable unreachable code warnings */
-#endif
-
-
-/**
- * IS_INF_OR_NAN: test if float is infinite or NaN
- */
-#ifdef USE_IEEE
-static INLINE int IS_INF_OR_NAN( float x )
-{
- fi_type tmp;
- tmp.f = x;
- return !(int)((unsigned int)((tmp.i & 0x7fffffff)-0x7f800000) >> 31);
-}
-#elif defined(isfinite)
-#define IS_INF_OR_NAN(x) (!isfinite(x))
-#elif defined(finite)
-#define IS_INF_OR_NAN(x) (!finite(x))
-#elif defined(__VMS)
-#define IS_INF_OR_NAN(x) (!finite(x))
-#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-#define IS_INF_OR_NAN(x) (!isfinite(x))
-#else
-#define IS_INF_OR_NAN(x) (!finite(x))
-#endif
-
-
-
-/***
- *** START_FAST_MATH: Set x86 FPU to faster, 32-bit precision mode (and save
- *** original mode to a temporary).
- *** END_FAST_MATH: Restore x86 FPU to original mode.
- ***/
-#if defined(__GNUC__) && defined(__i386__)
-/*
- * Set the x86 FPU control word to guarentee only 32 bits of precision
- * are stored in registers. Allowing the FPU to store more introduces
- * differences between situations where numbers are pulled out of memory
- * vs. situations where the compiler is able to optimize register usage.
- *
- * In the worst case, we force the compiler to use a memory access to
- * truncate the float, by specifying the 'volatile' keyword.
- */
-/* Hardware default: All exceptions masked, extended double precision,
- * round to nearest (IEEE compliant):
- */
-#define DEFAULT_X86_FPU 0x037f
-/* All exceptions masked, single precision, round to nearest:
- */
-#define FAST_X86_FPU 0x003f
-/* The fldcw instruction will cause any pending FP exceptions to be
- * raised prior to entering the block, and we clear any pending
- * exceptions before exiting the block. Hence, asm code has free
- * reign over the FPU while in the fast math block.
- */
-#if defined(NO_FAST_MATH)
-#define START_FAST_MATH(x) \
-do { \
- static unsigned mask = DEFAULT_X86_FPU; \
- __asm__ ( "fnstcw %0" : "=m" (*&(x)) ); \
- __asm__ ( "fldcw %0" : : "m" (mask) ); \
-} while (0)
-#else
-#define START_FAST_MATH(x) \
-do { \
- static unsigned mask = FAST_X86_FPU; \
- __asm__ ( "fnstcw %0" : "=m" (*&(x)) ); \
- __asm__ ( "fldcw %0" : : "m" (mask) ); \
-} while (0)
-#endif
-/* Restore original FPU mode, and clear any exceptions that may have
- * occurred in the FAST_MATH block.
- */
-#define END_FAST_MATH(x) \
-do { \
- __asm__ ( "fnclex ; fldcw %0" : : "m" (*&(x)) ); \
-} while (0)
-
-#elif defined(__WATCOMC__) && defined(__386__)
-#define DEFAULT_X86_FPU 0x037f /* See GCC comments above */
-#define FAST_X86_FPU 0x003f /* See GCC comments above */
-void _watcom_start_fast_math(unsigned short *x,unsigned short *mask);
-#pragma aux _watcom_start_fast_math = \
- "fnstcw word ptr [eax]" \
- "fldcw word ptr [ecx]" \
- parm [eax] [ecx] \
- modify exact [];
-void _watcom_end_fast_math(unsigned short *x);
-#pragma aux _watcom_end_fast_math = \
- "fnclex" \
- "fldcw word ptr [eax]" \
- parm [eax] \
- modify exact [];
-#if defined(NO_FAST_MATH)
-#define START_FAST_MATH(x) \
-do { \
- static unsigned short mask = DEFAULT_X86_FPU; \
- _watcom_start_fast_math(&x,&mask); \
-} while (0)
-#else
-#define START_FAST_MATH(x) \
-do { \
- static unsigned short mask = FAST_X86_FPU; \
- _watcom_start_fast_math(&x,&mask); \
-} while (0)
-#endif
-#define END_FAST_MATH(x) _watcom_end_fast_math(&x)
-
-#elif defined(_MSC_VER) && defined(_M_IX86)
-#define DEFAULT_X86_FPU 0x037f /* See GCC comments above */
-#define FAST_X86_FPU 0x003f /* See GCC comments above */
-#if defined(NO_FAST_MATH)
-#define START_FAST_MATH(x) do {\
- static unsigned mask = DEFAULT_X86_FPU;\
- __asm fnstcw word ptr [x]\
- __asm fldcw word ptr [mask]\
-} while(0)
-#else
-#define START_FAST_MATH(x) do {\
- static unsigned mask = FAST_X86_FPU;\
- __asm fnstcw word ptr [x]\
- __asm fldcw word ptr [mask]\
-} while(0)
-#endif
-#define END_FAST_MATH(x) do {\
- __asm fnclex\
- __asm fldcw word ptr [x]\
-} while(0)
-
-#else
-#define START_FAST_MATH(x) x = 0
-#define END_FAST_MATH(x) (void)(x)
-#endif
-
-
-
-/**
- * Either define MESA_BIG_ENDIAN or MESA_LITTLE_ENDIAN.
- * Do not use them unless absolutely necessary!
- * Try to use a runtime test instead.
- * For now, only used by some DRI hardware drivers for color/texel packing.
- */
-#if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN
-#if defined(__linux__)
-#include <byteswap.h>
-#define CPU_TO_LE32( x ) bswap_32( x )
-#else /*__linux__*/
-#define CPU_TO_LE32( x ) ( x ) /* fix me for non-Linux big-endian! */
-#endif /*__linux__*/
-#define MESA_BIG_ENDIAN 1
-#else
-#define CPU_TO_LE32( x ) ( x )
-#define MESA_LITTLE_ENDIAN 1
-#endif
-#define LE32_TO_CPU( x ) CPU_TO_LE32( x )
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* MCOMPILER_H */
+++ /dev/null
-# List of source files in this directory used for X.org xserver build
-MESA_MAIN_SOURCES = \
-accum.c \
-api_arrayelt.c \
-api_loopback.c \
-api_noop.c \
-api_validate.c \
-arrayobj.c \
-attrib.c \
-blend.c \
-bufferobj.c \
-buffers.c \
-clip.c \
-colortab.c \
-context.c \
-convolve.c \
-debug.c \
-depth.c \
-depthstencil.c \
-dlist.c \
-drawpix.c \
-enable.c \
-enums.c \
-eval.c \
-execmem.c \
-extensions.c \
-fbobject.c \
-feedback.c \
-fog.c \
-framebuffer.c \
-get.c \
-getstring.c \
-hash.c \
-hint.c \
-histogram.c \
-image.c \
-imports.c \
-light.c \
-lines.c \
-matrix.c \
-mipmap.c \
-mm.c \
-occlude.c \
-pixel.c \
-points.c \
-polygon.c \
-rastpos.c \
-rbadaptors.c \
-renderbuffer.c \
-state.c \
-stencil.c \
-texcompress.c \
-texcompress_fxt1.c \
-texcompress_s3tc.c \
-texenvprogram.c \
-texformat.c \
-teximage.c \
-texobj.c \
-texrender.c \
-texstate.c \
-texstore.c \
-varray.c \
-$(VSNPRINTF_SOURCES) \
-vtxfmt.c
-
-MESA_VSNPRINTF_SOURCES = \
-vsnprintf.c
-
-MESA_MAIN_HEADERS = \
-accum.h \
-api_arrayelt.h \
-api_eval.h \
-api_loopback.h \
-api_noop.h \
-api_validate.h \
-arrayobj.h \
-attrib.h \
-bitset.h \
-blend.h \
-bufferobj.h \
-buffers.h \
-clip.h \
-colormac.h \
-colortab.h \
-config.h \
-context.h \
-convolve.h \
-dd.h \
-debug.h \
-depth.h \
-depthstencil.h \
-dlist.h \
-drawpix.h \
-enable.h \
-enums.h \
-eval.h \
-extensions.h \
-fbobject.h \
-feedback.h \
-fog.h \
-framebuffer.h \
-get.h \
-glheader.h \
-hash.h \
-hint.h \
-histogram.h \
-image.h \
-imports.h \
-light.h \
-lines.h \
-macros.h \
-matrix.h \
-mipmap.h \
-mm.h \
-mtypes.h \
-occlude.h \
-pixel.h \
-points.h \
-polygon.h \
-rastpos.h \
-rbadaptors.h \
-renderbuffer.h \
-simple_list.h \
-state.h \
-stencil.h \
-texcompress.h \
-texenvprogram.h \
-texformat.h \
-texformat_tmp.h \
-teximage.h \
-texobj.h \
-texrender.h \
-texstate.h \
-texstore.h \
-varray.h \
-version.h \
-vtxfmt.h \
-vtxfmt_tmp.h
+++ /dev/null
-MESA_MATH_SOURCES = \
-m_debug_clip.c \
-m_debug_norm.c \
-m_debug_xform.c \
-m_eval.c \
-m_matrix.c \
-m_translate.c \
-m_vector.c \
-m_xform.c
-
-MESA_MATH_HEADERS = \
-m_clip_tmp.h \
-m_copy_tmp.h \
-m_debug.h \
-m_debug_util.h \
-m_dotprod_tmp.h \
-m_eval.h \
-m_matrix.h \
-m_norm_tmp.h \
-m_trans_tmp.h \
-m_translate.h \
-m_vector.h \
-m_xform.h \
-m_xform_tmp.h \
-mathmod.h
+++ /dev/null
-MESA_SHADER_GRAMMAR_SOURCES = \
-grammar_mesa.c
-
-MESA_SHADER_GRAMMAR_HEADERS = \
-grammar.c \
-grammar.h \
-grammar_mesa.h \
-grammar_syn.h
+++ /dev/null
-
-
-#include "main/glheader.h"
-#include "main/mtypes.h"
-
-
-/**
- * Write shader and associated info to a file.
- */
-void
-_mesa_write_shader_to_file(const struct gl_shader *shader)
-{
- const char *type;
- char filename[100];
- FILE *f;
-
- if (shader->Type == GL_FRAGMENT_SHADER)
- type = "frag";
- else
- type = "vert";
-
- snprintf(filename, strlen(filename), "shader_%u.%s", shader->Name, type);
- f = fopen(filename, "w");
- if (!f) {
- fprintf(stderr, "Unable to open %s for writing\n", filename);
- return;
- }
-
- fprintf(f, "/* Shader %u source */\n", shader->Name);
- fputs(shader->Source, f);
- fprintf(f, "\n");
-
- fprintf(f, "/* Compile status: %d */\n", shader->CompileStatus);
- fprintf(f, "\n");
-
- if (shader->CompileStatus) {
- FILE *stdout_save;
-
- stdout_save = stdout;
- stdout = f;
-
- fprintf(f, "/*GPU code */\n");
- _mesa_print_program(shader->Program);
-
- stdout = stdout_save;
- }
-
- fclose(f);
-}
-
-
-
-
+++ /dev/null
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * SimplexNoise1234
- * Copyright (c) 2003-2005, Stefan Gustavson
- *
- * Contact: stegu@itn.liu.se
- */
-
-/** \file
- \brief C implementation of Perlin Simplex Noise over 1,2,3, and 4 dimensions.
- \author Stefan Gustavson (stegu@itn.liu.se)
-*/
-
-/*
- * This implementation is "Simplex Noise" as presented by
- * Ken Perlin at a relatively obscure and not often cited course
- * session "Real-Time Shading" at Siggraph 2001 (before real
- * time shading actually took on), under the title "hardware noise".
- * The 3D function is numerically equivalent to his Java reference
- * code available in the PDF course notes, although I re-implemented
- * it from scratch to get more readable code. The 1D, 2D and 4D cases
- * were implemented from scratch by me from Ken Perlin's text.
- *
- * This file has no dependencies on any other file, not even its own
- * header file. The header file is made for use by external code only.
- */
-
-
-#include "main/imports.h"
-#include "slang_library_noise.h"
-
-#define FASTFLOOR(x) ( ((x)>0) ? ((int)x) : (((int)x)-1) )
-
-/*
- * ---------------------------------------------------------------------
- * Static data
- */
-
-/*
- * Permutation table. This is just a random jumble of all numbers 0-255,
- * repeated twice to avoid wrapping the index at 255 for each lookup.
- * This needs to be exactly the same for all instances on all platforms,
- * so it's easiest to just keep it as static explicit data.
- * This also removes the need for any initialisation of this class.
- *
- * Note that making this an int[] instead of a char[] might make the
- * code run faster on platforms with a high penalty for unaligned single
- * byte addressing. Intel x86 is generally single-byte-friendly, but
- * some other CPUs are faster with 4-aligned reads.
- * However, a char[] is smaller, which avoids cache trashing, and that
- * is probably the most important aspect on most architectures.
- * This array is accessed a *lot* by the noise functions.
- * A vector-valued noise over 3D accesses it 96 times, and a
- * float-valued 4D noise 64 times. We want this to fit in the cache!
- */
-unsigned char perm[512] = {151,160,137,91,90,15,
- 131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,
- 190, 6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,
- 88,237,149,56,87,174,20,125,136,171,168, 68,175,74,165,71,134,139,48,27,166,
- 77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,
- 102,143,54, 65,25,63,161, 1,216,80,73,209,76,132,187,208, 89,18,169,200,196,
- 135,130,116,188,159,86,164,100,109,198,173,186, 3,64,52,217,226,250,124,123,
- 5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,
- 223,183,170,213,119,248,152, 2,44,154,163, 70,221,153,101,155,167, 43,172,9,
- 129,22,39,253, 19,98,108,110,79,113,224,232,178,185, 112,104,218,246,97,228,
- 251,34,242,193,238,210,144,12,191,179,162,241, 81,51,145,235,249,14,239,107,
- 49,192,214, 31,181,199,106,157,184, 84,204,176,115,121,50,45,127, 4,150,254,
- 138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180,
- 151,160,137,91,90,15,
- 131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,
- 190, 6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,
- 88,237,149,56,87,174,20,125,136,171,168, 68,175,74,165,71,134,139,48,27,166,
- 77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,
- 102,143,54, 65,25,63,161, 1,216,80,73,209,76,132,187,208, 89,18,169,200,196,
- 135,130,116,188,159,86,164,100,109,198,173,186, 3,64,52,217,226,250,124,123,
- 5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,
- 223,183,170,213,119,248,152, 2,44,154,163, 70,221,153,101,155,167, 43,172,9,
- 129,22,39,253, 19,98,108,110,79,113,224,232,178,185, 112,104,218,246,97,228,
- 251,34,242,193,238,210,144,12,191,179,162,241, 81,51,145,235,249,14,239,107,
- 49,192,214, 31,181,199,106,157,184, 84,204,176,115,121,50,45,127, 4,150,254,
- 138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180
-};
-
-/*
- * ---------------------------------------------------------------------
- */
-
-/*
- * Helper functions to compute gradients-dot-residualvectors (1D to 4D)
- * Note that these generate gradients of more than unit length. To make
- * a close match with the value range of classic Perlin noise, the final
- * noise values need to be rescaled to fit nicely within [-1,1].
- * (The simplex noise functions as such also have different scaling.)
- * Note also that these noise functions are the most practical and useful
- * signed version of Perlin noise. To return values according to the
- * RenderMan specification from the SL noise() and pnoise() functions,
- * the noise values need to be scaled and offset to [0,1], like this:
- * float SLnoise = (SimplexNoise1234::noise(x,y,z) + 1.0) * 0.5;
- */
-
-static float grad1( int hash, float x ) {
- int h = hash & 15;
- float grad = 1.0f + (h & 7); /* Gradient value 1.0, 2.0, ..., 8.0 */
- if (h&8) grad = -grad; /* Set a random sign for the gradient */
- return ( grad * x ); /* Multiply the gradient with the distance */
-}
-
-static float grad2( int hash, float x, float y ) {
- int h = hash & 7; /* Convert low 3 bits of hash code */
- float u = h<4 ? x : y; /* into 8 simple gradient directions, */
- float v = h<4 ? y : x; /* and compute the dot product with (x,y). */
- return ((h&1)? -u : u) + ((h&2)? -2.0f*v : 2.0f*v);
-}
-
-static float grad3( int hash, float x, float y , float z ) {
- int h = hash & 15; /* Convert low 4 bits of hash code into 12 simple */
- float u = h<8 ? x : y; /* gradient directions, and compute dot product. */
- float v = h<4 ? y : h==12||h==14 ? x : z; /* Fix repeats at h = 12 to 15 */
- return ((h&1)? -u : u) + ((h&2)? -v : v);
-}
-
-static float grad4( int hash, float x, float y, float z, float t ) {
- int h = hash & 31; /* Convert low 5 bits of hash code into 32 simple */
- float u = h<24 ? x : y; /* gradient directions, and compute dot product. */
- float v = h<16 ? y : z;
- float w = h<8 ? z : t;
- return ((h&1)? -u : u) + ((h&2)? -v : v) + ((h&4)? -w : w);
-}
-
- /* A lookup table to traverse the simplex around a given point in 4D. */
- /* Details can be found where this table is used, in the 4D noise method. */
- /* TODO: This should not be required, backport it from Bill's GLSL code! */
- static unsigned char simplex[64][4] = {
- {0,1,2,3},{0,1,3,2},{0,0,0,0},{0,2,3,1},{0,0,0,0},{0,0,0,0},{0,0,0,0},{1,2,3,0},
- {0,2,1,3},{0,0,0,0},{0,3,1,2},{0,3,2,1},{0,0,0,0},{0,0,0,0},{0,0,0,0},{1,3,2,0},
- {0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},
- {1,2,0,3},{0,0,0,0},{1,3,0,2},{0,0,0,0},{0,0,0,0},{0,0,0,0},{2,3,0,1},{2,3,1,0},
- {1,0,2,3},{1,0,3,2},{0,0,0,0},{0,0,0,0},{0,0,0,0},{2,0,3,1},{0,0,0,0},{2,1,3,0},
- {0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},
- {2,0,1,3},{0,0,0,0},{0,0,0,0},{0,0,0,0},{3,0,1,2},{3,0,2,1},{0,0,0,0},{3,1,2,0},
- {2,1,0,3},{0,0,0,0},{0,0,0,0},{0,0,0,0},{3,1,0,2},{0,0,0,0},{3,2,0,1},{3,2,1,0}};
-
-/* 1D simplex noise */
-GLfloat _slang_library_noise1 (GLfloat x)
-{
- int i0 = FASTFLOOR(x);
- int i1 = i0 + 1;
- float x0 = x - i0;
- float x1 = x0 - 1.0f;
- float t1 = 1.0f - x1*x1;
- float n0, n1;
-
- float t0 = 1.0f - x0*x0;
-/* if(t0 < 0.0f) t0 = 0.0f; // this never happens for the 1D case */
- t0 *= t0;
- n0 = t0 * t0 * grad1(perm[i0 & 0xff], x0);
-
-/* if(t1 < 0.0f) t1 = 0.0f; // this never happens for the 1D case */
- t1 *= t1;
- n1 = t1 * t1 * grad1(perm[i1 & 0xff], x1);
- /* The maximum value of this noise is 8*(3/4)^4 = 2.53125 */
- /* A factor of 0.395 would scale to fit exactly within [-1,1], but */
- /* we want to match PRMan's 1D noise, so we scale it down some more. */
- return 0.25f * (n0 + n1);
-}
-
-/* 2D simplex noise */
-GLfloat _slang_library_noise2 (GLfloat x, GLfloat y)
-{
-#define F2 0.366025403f /* F2 = 0.5*(sqrt(3.0)-1.0) */
-#define G2 0.211324865f /* G2 = (3.0-Math.sqrt(3.0))/6.0 */
-
- float n0, n1, n2; /* Noise contributions from the three corners */
-
- /* Skew the input space to determine which simplex cell we're in */
- float s = (x+y)*F2; /* Hairy factor for 2D */
- float xs = x + s;
- float ys = y + s;
- int i = FASTFLOOR(xs);
- int j = FASTFLOOR(ys);
-
- float t = (float)(i+j)*G2;
- float X0 = i-t; /* Unskew the cell origin back to (x,y) space */
- float Y0 = j-t;
- float x0 = x-X0; /* The x,y distances from the cell origin */
- float y0 = y-Y0;
-
- float x1, y1, x2, y2;
- int ii, jj;
- float t0, t1, t2;
-
- /* For the 2D case, the simplex shape is an equilateral triangle. */
- /* Determine which simplex we are in. */
- int i1, j1; /* Offsets for second (middle) corner of simplex in (i,j) coords */
- if(x0>y0) {i1=1; j1=0;} /* lower triangle, XY order: (0,0)->(1,0)->(1,1) */
- else {i1=0; j1=1;} /* upper triangle, YX order: (0,0)->(0,1)->(1,1) */
-
- /* A step of (1,0) in (i,j) means a step of (1-c,-c) in (x,y), and */
- /* a step of (0,1) in (i,j) means a step of (-c,1-c) in (x,y), where */
- /* c = (3-sqrt(3))/6 */
-
- x1 = x0 - i1 + G2; /* Offsets for middle corner in (x,y) unskewed coords */
- y1 = y0 - j1 + G2;
- x2 = x0 - 1.0f + 2.0f * G2; /* Offsets for last corner in (x,y) unskewed coords */
- y2 = y0 - 1.0f + 2.0f * G2;
-
- /* Wrap the integer indices at 256, to avoid indexing perm[] out of bounds */
- ii = i % 256;
- jj = j % 256;
-
- /* Calculate the contribution from the three corners */
- t0 = 0.5f - x0*x0-y0*y0;
- if(t0 < 0.0f) n0 = 0.0f;
- else {
- t0 *= t0;
- n0 = t0 * t0 * grad2(perm[ii+perm[jj]], x0, y0);
- }
-
- t1 = 0.5f - x1*x1-y1*y1;
- if(t1 < 0.0f) n1 = 0.0f;
- else {
- t1 *= t1;
- n1 = t1 * t1 * grad2(perm[ii+i1+perm[jj+j1]], x1, y1);
- }
-
- t2 = 0.5f - x2*x2-y2*y2;
- if(t2 < 0.0f) n2 = 0.0f;
- else {
- t2 *= t2;
- n2 = t2 * t2 * grad2(perm[ii+1+perm[jj+1]], x2, y2);
- }
-
- /* Add contributions from each corner to get the final noise value. */
- /* The result is scaled to return values in the interval [-1,1]. */
- return 40.0f * (n0 + n1 + n2); /* TODO: The scale factor is preliminary! */
-}
-
-/* 3D simplex noise */
-GLfloat _slang_library_noise3 (GLfloat x, GLfloat y, GLfloat z)
-{
-/* Simple skewing factors for the 3D case */
-#define F3 0.333333333f
-#define G3 0.166666667f
-
- float n0, n1, n2, n3; /* Noise contributions from the four corners */
-
- /* Skew the input space to determine which simplex cell we're in */
- float s = (x+y+z)*F3; /* Very nice and simple skew factor for 3D */
- float xs = x+s;
- float ys = y+s;
- float zs = z+s;
- int i = FASTFLOOR(xs);
- int j = FASTFLOOR(ys);
- int k = FASTFLOOR(zs);
-
- float t = (float)(i+j+k)*G3;
- float X0 = i-t; /* Unskew the cell origin back to (x,y,z) space */
- float Y0 = j-t;
- float Z0 = k-t;
- float x0 = x-X0; /* The x,y,z distances from the cell origin */
- float y0 = y-Y0;
- float z0 = z-Z0;
-
- float x1, y1, z1, x2, y2, z2, x3, y3, z3;
- int ii, jj, kk;
- float t0, t1, t2, t3;
-
- /* For the 3D case, the simplex shape is a slightly irregular tetrahedron. */
- /* Determine which simplex we are in. */
- int i1, j1, k1; /* Offsets for second corner of simplex in (i,j,k) coords */
- int i2, j2, k2; /* Offsets for third corner of simplex in (i,j,k) coords */
-
-/* This code would benefit from a backport from the GLSL version! */
- if(x0>=y0) {
- if(y0>=z0)
- { i1=1; j1=0; k1=0; i2=1; j2=1; k2=0; } /* X Y Z order */
- else if(x0>=z0) { i1=1; j1=0; k1=0; i2=1; j2=0; k2=1; } /* X Z Y order */
- else { i1=0; j1=0; k1=1; i2=1; j2=0; k2=1; } /* Z X Y order */
- }
- else { /* x0<y0 */
- if(y0<z0) { i1=0; j1=0; k1=1; i2=0; j2=1; k2=1; } /* Z Y X order */
- else if(x0<z0) { i1=0; j1=1; k1=0; i2=0; j2=1; k2=1; } /* Y Z X order */
- else { i1=0; j1=1; k1=0; i2=1; j2=1; k2=0; } /* Y X Z order */
- }
-
- /* A step of (1,0,0) in (i,j,k) means a step of (1-c,-c,-c) in (x,y,z), */
- /* a step of (0,1,0) in (i,j,k) means a step of (-c,1-c,-c) in (x,y,z), and */
- /* a step of (0,0,1) in (i,j,k) means a step of (-c,-c,1-c) in (x,y,z), where */
- /* c = 1/6. */
-
- x1 = x0 - i1 + G3; /* Offsets for second corner in (x,y,z) coords */
- y1 = y0 - j1 + G3;
- z1 = z0 - k1 + G3;
- x2 = x0 - i2 + 2.0f*G3; /* Offsets for third corner in (x,y,z) coords */
- y2 = y0 - j2 + 2.0f*G3;
- z2 = z0 - k2 + 2.0f*G3;
- x3 = x0 - 1.0f + 3.0f*G3; /* Offsets for last corner in (x,y,z) coords */
- y3 = y0 - 1.0f + 3.0f*G3;
- z3 = z0 - 1.0f + 3.0f*G3;
-
- /* Wrap the integer indices at 256, to avoid indexing perm[] out of bounds */
- ii = i % 256;
- jj = j % 256;
- kk = k % 256;
-
- /* Calculate the contribution from the four corners */
- t0 = 0.6f - x0*x0 - y0*y0 - z0*z0;
- if(t0 < 0.0f) n0 = 0.0f;
- else {
- t0 *= t0;
- n0 = t0 * t0 * grad3(perm[ii+perm[jj+perm[kk]]], x0, y0, z0);
- }
-
- t1 = 0.6f - x1*x1 - y1*y1 - z1*z1;
- if(t1 < 0.0f) n1 = 0.0f;
- else {
- t1 *= t1;
- n1 = t1 * t1 * grad3(perm[ii+i1+perm[jj+j1+perm[kk+k1]]], x1, y1, z1);
- }
-
- t2 = 0.6f - x2*x2 - y2*y2 - z2*z2;
- if(t2 < 0.0f) n2 = 0.0f;
- else {
- t2 *= t2;
- n2 = t2 * t2 * grad3(perm[ii+i2+perm[jj+j2+perm[kk+k2]]], x2, y2, z2);
- }
-
- t3 = 0.6f - x3*x3 - y3*y3 - z3*z3;
- if(t3<0.0f) n3 = 0.0f;
- else {
- t3 *= t3;
- n3 = t3 * t3 * grad3(perm[ii+1+perm[jj+1+perm[kk+1]]], x3, y3, z3);
- }
-
- /* Add contributions from each corner to get the final noise value. */
- /* The result is scaled to stay just inside [-1,1] */
- return 32.0f * (n0 + n1 + n2 + n3); /* TODO: The scale factor is preliminary! */
-}
-
-/* 4D simplex noise */
-GLfloat _slang_library_noise4 (GLfloat x, GLfloat y, GLfloat z, GLfloat w)
-{
- /* The skewing and unskewing factors are hairy again for the 4D case */
-#define F4 0.309016994f /* F4 = (Math.sqrt(5.0)-1.0)/4.0 */
-#define G4 0.138196601f /* G4 = (5.0-Math.sqrt(5.0))/20.0 */
-
- float n0, n1, n2, n3, n4; /* Noise contributions from the five corners */
-
- /* Skew the (x,y,z,w) space to determine which cell of 24 simplices we're in */
- float s = (x + y + z + w) * F4; /* Factor for 4D skewing */
- float xs = x + s;
- float ys = y + s;
- float zs = z + s;
- float ws = w + s;
- int i = FASTFLOOR(xs);
- int j = FASTFLOOR(ys);
- int k = FASTFLOOR(zs);
- int l = FASTFLOOR(ws);
-
- float t = (i + j + k + l) * G4; /* Factor for 4D unskewing */
- float X0 = i - t; /* Unskew the cell origin back to (x,y,z,w) space */
- float Y0 = j - t;
- float Z0 = k - t;
- float W0 = l - t;
-
- float x0 = x - X0; /* The x,y,z,w distances from the cell origin */
- float y0 = y - Y0;
- float z0 = z - Z0;
- float w0 = w - W0;
-
- /* For the 4D case, the simplex is a 4D shape I won't even try to describe. */
- /* To find out which of the 24 possible simplices we're in, we need to */
- /* determine the magnitude ordering of x0, y0, z0 and w0. */
- /* The method below is a good way of finding the ordering of x,y,z,w and */
- /* then find the correct traversal order for the simplex we're in. */
- /* First, six pair-wise comparisons are performed between each possible pair */
- /* of the four coordinates, and the results are used to add up binary bits */
- /* for an integer index. */
- int c1 = (x0 > y0) ? 32 : 0;
- int c2 = (x0 > z0) ? 16 : 0;
- int c3 = (y0 > z0) ? 8 : 0;
- int c4 = (x0 > w0) ? 4 : 0;
- int c5 = (y0 > w0) ? 2 : 0;
- int c6 = (z0 > w0) ? 1 : 0;
- int c = c1 + c2 + c3 + c4 + c5 + c6;
-
- int i1, j1, k1, l1; /* The integer offsets for the second simplex corner */
- int i2, j2, k2, l2; /* The integer offsets for the third simplex corner */
- int i3, j3, k3, l3; /* The integer offsets for the fourth simplex corner */
-
- float x1, y1, z1, w1, x2, y2, z2, w2, x3, y3, z3, w3, x4, y4, z4, w4;
- int ii, jj, kk, ll;
- float t0, t1, t2, t3, t4;
-
- /* simplex[c] is a 4-vector with the numbers 0, 1, 2 and 3 in some order. */
- /* Many values of c will never occur, since e.g. x>y>z>w makes x<z, y<w and x<w */
- /* impossible. Only the 24 indices which have non-zero entries make any sense. */
- /* We use a thresholding to set the coordinates in turn from the largest magnitude. */
- /* The number 3 in the "simplex" array is at the position of the largest coordinate. */
- i1 = simplex[c][0]>=3 ? 1 : 0;
- j1 = simplex[c][1]>=3 ? 1 : 0;
- k1 = simplex[c][2]>=3 ? 1 : 0;
- l1 = simplex[c][3]>=3 ? 1 : 0;
- /* The number 2 in the "simplex" array is at the second largest coordinate. */
- i2 = simplex[c][0]>=2 ? 1 : 0;
- j2 = simplex[c][1]>=2 ? 1 : 0;
- k2 = simplex[c][2]>=2 ? 1 : 0;
- l2 = simplex[c][3]>=2 ? 1 : 0;
- /* The number 1 in the "simplex" array is at the second smallest coordinate. */
- i3 = simplex[c][0]>=1 ? 1 : 0;
- j3 = simplex[c][1]>=1 ? 1 : 0;
- k3 = simplex[c][2]>=1 ? 1 : 0;
- l3 = simplex[c][3]>=1 ? 1 : 0;
- /* The fifth corner has all coordinate offsets = 1, so no need to look that up. */
-
- x1 = x0 - i1 + G4; /* Offsets for second corner in (x,y,z,w) coords */
- y1 = y0 - j1 + G4;
- z1 = z0 - k1 + G4;
- w1 = w0 - l1 + G4;
- x2 = x0 - i2 + 2.0f*G4; /* Offsets for third corner in (x,y,z,w) coords */
- y2 = y0 - j2 + 2.0f*G4;
- z2 = z0 - k2 + 2.0f*G4;
- w2 = w0 - l2 + 2.0f*G4;
- x3 = x0 - i3 + 3.0f*G4; /* Offsets for fourth corner in (x,y,z,w) coords */
- y3 = y0 - j3 + 3.0f*G4;
- z3 = z0 - k3 + 3.0f*G4;
- w3 = w0 - l3 + 3.0f*G4;
- x4 = x0 - 1.0f + 4.0f*G4; /* Offsets for last corner in (x,y,z,w) coords */
- y4 = y0 - 1.0f + 4.0f*G4;
- z4 = z0 - 1.0f + 4.0f*G4;
- w4 = w0 - 1.0f + 4.0f*G4;
-
- /* Wrap the integer indices at 256, to avoid indexing perm[] out of bounds */
- ii = i % 256;
- jj = j % 256;
- kk = k % 256;
- ll = l % 256;
-
- /* Calculate the contribution from the five corners */
- t0 = 0.6f - x0*x0 - y0*y0 - z0*z0 - w0*w0;
- if(t0 < 0.0f) n0 = 0.0f;
- else {
- t0 *= t0;
- n0 = t0 * t0 * grad4(perm[ii+perm[jj+perm[kk+perm[ll]]]], x0, y0, z0, w0);
- }
-
- t1 = 0.6f - x1*x1 - y1*y1 - z1*z1 - w1*w1;
- if(t1 < 0.0f) n1 = 0.0f;
- else {
- t1 *= t1;
- n1 = t1 * t1 * grad4(perm[ii+i1+perm[jj+j1+perm[kk+k1+perm[ll+l1]]]], x1, y1, z1, w1);
- }
-
- t2 = 0.6f - x2*x2 - y2*y2 - z2*z2 - w2*w2;
- if(t2 < 0.0f) n2 = 0.0f;
- else {
- t2 *= t2;
- n2 = t2 * t2 * grad4(perm[ii+i2+perm[jj+j2+perm[kk+k2+perm[ll+l2]]]], x2, y2, z2, w2);
- }
-
- t3 = 0.6f - x3*x3 - y3*y3 - z3*z3 - w3*w3;
- if(t3 < 0.0f) n3 = 0.0f;
- else {
- t3 *= t3;
- n3 = t3 * t3 * grad4(perm[ii+i3+perm[jj+j3+perm[kk+k3+perm[ll+l3]]]], x3, y3, z3, w3);
- }
-
- t4 = 0.6f - x4*x4 - y4*y4 - z4*z4 - w4*w4;
- if(t4 < 0.0f) n4 = 0.0f;
- else {
- t4 *= t4;
- n4 = t4 * t4 * grad4(perm[ii+1+perm[jj+1+perm[kk+1+perm[ll+1]]]], x4, y4, z4, w4);
- }
-
- /* Sum up and scale the result to cover the range [-1,1] */
- return 27.0f * (n0 + n1 + n2 + n3 + n4); /* TODO: The scale factor is preliminary! */
-}
-
+++ /dev/null
-/*
- * Mesa 3-D graphics library
- * Version: 6.5
- *
- * Copyright (C) 2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#if !defined SLANG_LIBRARY_NOISE_H
-#define SLANG_LIBRARY_NOISE_H
-
-#if defined __cplusplus
-extern "C" {
-#endif
-
-GLfloat _slang_library_noise1 (GLfloat);
-GLfloat _slang_library_noise2 (GLfloat, GLfloat);
-GLfloat _slang_library_noise3 (GLfloat, GLfloat, GLfloat);
-GLfloat _slang_library_noise4 (GLfloat, GLfloat, GLfloat, GLfloat);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
+++ /dev/null
-MESA_SHADER_SLANG_SOURCES = \
-slang_analyse.c \
-slang_assemble_assignment.c \
-slang_assemble.c \
-slang_assemble_conditional.c \
-slang_assemble_constructor.c \
-slang_assemble_typeinfo.c \
-slang_compile.c \
-slang_compile_function.c \
-slang_compile_operation.c \
-slang_compile_struct.c \
-slang_compile_variable.c \
-slang_execute.c \
-slang_execute_x86.c \
-slang_export.c \
-slang_library_texsample.c \
-slang_library_noise.c \
-slang_link.c \
-slang_preprocess.c \
-slang_storage.c \
-slang_utility.c
-
-MESA_SHADER_SLANG_HEADERS = \
-slang_analyse.h \
-slang_assemble.h \
-slang_assemble_assignment.h \
-slang_assemble_conditional.h \
-slang_assemble_constructor.h \
-slang_assemble_typeinfo.h \
-slang_compile.h \
-slang_compile_function.h \
-slang_compile_operation.h \
-slang_compile_struct.h \
-slang_compile_variable.h \
-slang_execute.h \
-slang_export.h \
-slang_library_noise.h \
-slang_library_texsample.h \
-slang_link.h \
-slang_mesa.h \
-slang_preprocess.h \
-slang_storage.h \
-slang_utility.h \
-traverse_wrap.h
+++ /dev/null
-# List of source files in this directory used for X.org xserver build
-MESA_SHADER_SOURCES = \
-arbprogparse.c \
-arbprogram.c \
-atifragshader.c \
-nvfragparse.c \
-nvprogram.c \
-nvvertexec.c \
-nvvertparse.c \
-program.c \
-programopt.c \
-shaderobjects.c \
-shaderobjects_3dlabs.c
-
-MESA_SHADER_HEADERS = \
-arbprogparse.h \
-arbprogram.h \
-arbprogram_syn.h \
-atifragshader.h \
-nvfragparse.h \
-nvprogram.h \
-nvvertexec.h \
-nvvertparse.h \
-programopt.h \
-program.h \
-program_instruction.h \
-shaderobjects.h \
-shaderobjects_3dlabs.h
+++ /dev/null
-
-/*
- * Mesa 3-D graphics library
- * Version: 3.5
- *
- * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-#ifndef S_DRAWPIXELS_H
-#define S_DRAWPIXELS_H
-
-
-#include "mtypes.h"
-#include "swrast.h"
-
-/* XXX kill this header? */
-
-#endif
+++ /dev/null
-/*
- * Mesa 3-D graphics library
- * Version: 6.5.3
- *
- * Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * Regarding GL_NV_point_sprite:
- *
- * Portions of this software may use or implement intellectual
- * property owned and licensed by NVIDIA Corporation. NVIDIA disclaims
- * any and all warranties with respect to such intellectual property,
- * including any use thereof or modifications thereto.
- */
-
-
-/*
- * Point rendering template code.
- *
- * Set FLAGS = bitwise-OR of the following tokens:
- *
- * RGBA = do rgba instead of color index
- * SMOOTH = do antialiasing
- * ATTRIBS = general attributes (texcoords, etc)
- * SPECULAR = do separate specular color
- * LARGE = do points with diameter > 1 pixel
- * ATTENUATE = compute point size attenuation
- * SPRITE = GL_ARB_point_sprite / GL_NV_point_sprite
- *
- * Notes: LARGE and ATTENUATE are exclusive of each other.
- * ATTRIBS requires RGBA
- */
-
-
-/*
- * NOTES on antialiased point rasterization:
- *
- * Let d = distance of fragment center from vertex.
- * if d < rmin2 then
- * fragment has 100% coverage
- * else if d > rmax2 then
- * fragment has 0% coverage
- * else
- * fragment has % coverage = (d - rmin2) / (rmax2 - rmin2)
- */
-
-
-static void
-NAME ( GLcontext *ctx, const SWvertex *vert )
-{
-#if FLAGS & (ATTENUATE | LARGE | SMOOTH | SPRITE)
- GLfloat size;
-#endif
-#if FLAGS & RGBA
-#if (FLAGS & ATTENUATE) && (FLAGS & SMOOTH)
- GLfloat alphaAtten;
-#endif
- const GLchan red = vert->color[0];
- const GLchan green = vert->color[1];
- const GLchan blue = vert->color[2];
- const GLchan alpha = vert->color[3];
-#endif
-#if FLAGS & SPECULAR
- const GLchan specRed = vert->specular[0];
- const GLchan specGreen = vert->specular[1];
- const GLchan specBlue = vert->specular[2];
-#endif
-#if FLAGS & INDEX
- const GLuint colorIndex = (GLuint) vert->index; /* XXX round? */
-#endif
-#if FLAGS & ATTRIBS
- GLfloat attrib[FRAG_ATTRIB_MAX][4]; /* texture & varying */
-#endif
- SWcontext *swrast = SWRAST_CONTEXT(ctx);
- SWspan *span = &(swrast->PointSpan);
-
- /* Cull primitives with malformed coordinates.
- */
- {
- float tmp = vert->win[0] + vert->win[1];
- if (IS_INF_OR_NAN(tmp))
- return;
- }
-
- /*
- * Span init
- */
- span->interpMask = SPAN_FOG;
- span->arrayMask = SPAN_XY | SPAN_Z;
- span->attrStart[FRAG_ATTRIB_FOGC][0] = vert->attrib[FRAG_ATTRIB_FOGC][0];
- span->attrStepX[FRAG_ATTRIB_FOGC][0] = 0.0;
- span->attrStepY[FRAG_ATTRIB_FOGC][0] = 0.0;
-#if FLAGS & RGBA
- span->arrayMask |= SPAN_RGBA;
-#endif
-#if FLAGS & SPECULAR
- span->arrayMask |= SPAN_SPEC;
-#endif
-#if FLAGS & INDEX
- span->arrayMask |= SPAN_INDEX;
-#endif
-#if FLAGS & ATTRIBS
- span->arrayMask |= (SPAN_TEXTURE | SPAN_LAMBDA);
- if (ctx->FragmentProgram._Active) {
- /* Don't divide texture s,t,r by q (use TXP to do that) */
- ATTRIB_LOOP_BEGIN
- COPY_4V(attrib[attr], vert->attrib[attr]);
- ATTRIB_LOOP_END
- }
- else {
- /* Divide texture s,t,r by q here */
- ATTRIB_LOOP_BEGIN
- const GLfloat q = vert->attrib[attr][3];
- const GLfloat invQ = (q == 0.0F || q == 1.0F) ? 1.0F : (1.0F / q);
- attrib[attr][0] = vert->attrib[attr][0] * invQ;
- attrib[attr][1] = vert->attrib[attr][1] * invQ;
- attrib[attr][2] = vert->attrib[attr][2] * invQ;
- attrib[attr][3] = q;
- ATTRIB_LOOP_END
- }
- /* need these for fragment programs */
- span->attrStart[FRAG_ATTRIB_WPOS][3] = 1.0F;
- span->attrStepX[FRAG_ATTRIB_WPOS][3] = 0.0F;
- span->attrStepY[FRAG_ATTRIB_WPOS][3] = 0.0F;
-#endif
-#if FLAGS & SMOOTH
- span->arrayMask |= SPAN_COVERAGE;
-#endif
-#if FLAGS & SPRITE
- span->arrayMask |= (SPAN_TEXTURE | SPAN_LAMBDA);
-#endif
-
- /* Compute point size if not known to be one */
-#if FLAGS & ATTENUATE
- /* first, clamp attenuated size to the user-specifed range */
- size = CLAMP(vert->pointSize, ctx->Point.MinSize, ctx->Point.MaxSize);
-#if (FLAGS & RGBA) && (FLAGS & SMOOTH)
- /* only if multisampling, compute the fade factor */
- if (ctx->Multisample.Enabled) {
- if (vert->pointSize >= ctx->Point.Threshold) {
- alphaAtten = 1.0F;
- }
- else {
- GLfloat dsize = vert->pointSize / ctx->Point.Threshold;
- alphaAtten = dsize * dsize;
- }
- }
- else {
- alphaAtten = 1.0;
- }
-#endif
-#elif FLAGS & (LARGE | SMOOTH | SPRITE)
- /* constant, non-attenuated size */
- size = ctx->Point._Size; /* this is already clamped */
-#endif
-
-
-#if FLAGS & (ATTENUATE | LARGE | SMOOTH | SPRITE)
- /***
- *** Multi-pixel points
- ***/
-
- /* do final clamping now */
- if (ctx->Point.SmoothFlag) {
- size = CLAMP(size, ctx->Const.MinPointSizeAA, ctx->Const.MaxPointSizeAA);
- }
- else {
- size = CLAMP(size, ctx->Const.MinPointSize, ctx->Const.MaxPointSize);
- }
-
- {{
- GLint x, y;
- const GLfloat radius = 0.5F * size;
- const GLuint z = (GLuint) (vert->win[2] + 0.5F);
- GLuint count;
-#if FLAGS & SMOOTH
- const GLfloat rmin = radius - 0.7071F; /* 0.7071 = sqrt(2)/2 */
- const GLfloat rmax = radius + 0.7071F;
- const GLfloat rmin2 = MAX2(0.0F, rmin * rmin);
- const GLfloat rmax2 = rmax * rmax;
- const GLfloat cscale = 1.0F / (rmax2 - rmin2);
- const GLint xmin = (GLint) (vert->win[0] - radius);
- const GLint xmax = (GLint) (vert->win[0] + radius);
- const GLint ymin = (GLint) (vert->win[1] - radius);
- const GLint ymax = (GLint) (vert->win[1] + radius);
-#else
- /* non-smooth */
- GLint xmin, xmax, ymin, ymax;
- GLint iSize = (GLint) (size + 0.5F);
- GLint iRadius;
- iSize = MAX2(1, iSize);
- iRadius = iSize / 2;
- if (iSize & 1) {
- /* odd size */
- xmin = (GLint) (vert->win[0] - iRadius);
- xmax = (GLint) (vert->win[0] + iRadius);
- ymin = (GLint) (vert->win[1] - iRadius);
- ymax = (GLint) (vert->win[1] + iRadius);
- }
- else {
- /* even size */
- xmin = (GLint) vert->win[0] - iRadius;
- xmax = xmin + iSize - 1;
- ymin = (GLint) vert->win[1] - iRadius;
- ymax = ymin + iSize - 1;
- }
-#endif /*SMOOTH*/
-
- /* check if we need to flush */
- if (span->end + (xmax-xmin+1) * (ymax-ymin+1) >= MAX_WIDTH ||
- (swrast->_RasterMask & (BLEND_BIT | LOGIC_OP_BIT | MASKING_BIT))) {
- if (span->end > 0) {
-#if FLAGS & RGBA
- _swrast_write_rgba_span(ctx, span);
-#else
- _swrast_write_index_span(ctx, span);
-#endif
- span->end = 0;
- }
- }
-
- /*
- * OK, generate fragments
- */
- count = span->end;
- (void) radius;
- for (y = ymin; y <= ymax; y++) {
- /* check if we need to flush */
- if (count + (xmax-xmin+1) >= MAX_WIDTH) {
- span->end = count;
-#if FLAGS & RGBA
- _swrast_write_rgba_span(ctx, span);
-#else
- _swrast_write_index_span(ctx, span);
-#endif
- count = span->end = 0;
- }
- for (x = xmin; x <= xmax; x++) {
-#if FLAGS & SPRITE
- GLuint u;
-#endif
-
-#if FLAGS & RGBA
- span->array->rgba[count][RCOMP] = red;
- span->array->rgba[count][GCOMP] = green;
- span->array->rgba[count][BCOMP] = blue;
- span->array->rgba[count][ACOMP] = alpha;
-#endif
-#if FLAGS & SPECULAR
- span->array->spec[count][RCOMP] = specRed;
- span->array->spec[count][GCOMP] = specGreen;
- span->array->spec[count][BCOMP] = specBlue;
-#endif
-#if FLAGS & INDEX
- span->array->index[count] = colorIndex;
-#endif
-#if FLAGS & ATTRIBS
- ATTRIB_LOOP_BEGIN
- COPY_4V(span->array->attribs[attr][count], attrib[attr]);
- if (attr < FRAG_ATTRIB_VAR0 && attr >= FRAG_ATTRIB_TEX0) {
- const GLuint u = attr - FRAG_ATTRIB_TEX0;
- span->array->lambda[u][count] = 0.0;
- }
- ATTRIB_LOOP_END
-#endif
-
-#if FLAGS & SMOOTH
- /* compute coverage */
- {
- const GLfloat dx = x - vert->win[0] + 0.5F;
- const GLfloat dy = y - vert->win[1] + 0.5F;
- const GLfloat dist2 = dx * dx + dy * dy;
- if (dist2 < rmax2) {
- if (dist2 >= rmin2) {
- /* compute partial coverage */
- span->array->coverage[count] = 1.0F - (dist2 - rmin2) * cscale;
-#if FLAGS & INDEX
- /* coverage in [0,15] */
- span->array->coverage[count] *= 15.0;
-#endif
- }
- else {
- /* full coverage */
- span->array->coverage[count] = 1.0F;
- }
-
- span->array->x[count] = x;
- span->array->y[count] = y;
- span->array->z[count] = z;
-
-#if (FLAGS & ATTENUATE) && (FLAGS & RGBA)
- span->array->rgba[count][ACOMP] = (GLchan) (alpha * alphaAtten);
-#elif FLAGS & RGBA
- span->array->rgba[count][ACOMP] = alpha;
-#endif /*ATTENUATE*/
- count++;
- } /*if*/
- }
-
-#else /*SMOOTH*/
-
- /* not smooth (square points) */
- span->array->x[count] = x;
- span->array->y[count] = y;
- span->array->z[count] = z;
-
-#if FLAGS & SPRITE
- for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
- GLuint attr = FRAG_ATTRIB_TEX0 + u;
- if (ctx->Texture.Unit[u]._ReallyEnabled) {
- if (ctx->Point.CoordReplace[u]) {
- GLfloat s = 0.5F + (x + 0.5F - vert->win[0]) / size;
- GLfloat t, r;
- if (ctx->Point.SpriteOrigin == GL_LOWER_LEFT)
- t = 0.5F + (y + 0.5F - vert->win[1]) / size;
- else /* GL_UPPER_LEFT */
- t = 0.5F - (y + 0.5F - vert->win[1]) / size;
- if (ctx->Point.SpriteRMode == GL_ZERO)
- r = 0.0F;
- else if (ctx->Point.SpriteRMode == GL_S)
- r = vert->attrib[attr][0];
- else /* GL_R */
- r = vert->attrib[attr][2];
- span->array->attribs[attr][count][0] = s;
- span->array->attribs[attr][count][1] = t;
- span->array->attribs[attr][count][2] = r;
- span->array->attribs[attr][count][3] = 1.0F;
- span->array->lambda[u][count] = 0.0; /* XXX fix? */
- }
- else {
- COPY_4V(span->array->attribs[attr][count],
- vert->attrib[attr]);
- }
- }
- }
-#endif /*SPRITE*/
-
- count++; /* square point */
-
-#endif /*SMOOTH*/
-
- } /*for x*/
- } /*for y*/
- span->end = count;
- }}
-
-#else /* LARGE | ATTENUATE | SMOOTH | SPRITE */
-
- /***
- *** Single-pixel points
- ***/
- {{
- GLuint count;
-
- /* check if we need to flush */
- if (span->end >= MAX_WIDTH ||
- (swrast->_RasterMask & (BLEND_BIT | LOGIC_OP_BIT | MASKING_BIT))) {
-#if FLAGS & RGBA
- _swrast_write_rgba_span(ctx, span);
-#else
- _swrast_write_index_span(ctx, span);
-#endif
- span->end = 0;
- }
-
- count = span->end;
-
-#if FLAGS & RGBA
- span->array->rgba[count][RCOMP] = red;
- span->array->rgba[count][GCOMP] = green;
- span->array->rgba[count][BCOMP] = blue;
- span->array->rgba[count][ACOMP] = alpha;
-#endif
-#if FLAGS & SPECULAR
- span->array->spec[count][RCOMP] = specRed;
- span->array->spec[count][GCOMP] = specGreen;
- span->array->spec[count][BCOMP] = specBlue;
-#endif
-#if FLAGS & INDEX
- span->array->index[count] = colorIndex;
-#endif
-#if FLAGS & ATTRIBS
- ATTRIB_LOOP_BEGIN
- COPY_4V(span->array->attribs[attr][count], attribs[attr]);
- ATTRIB_LOOP_END
-#endif
-
- span->array->x[count] = (GLint) vert->win[0];
- span->array->y[count] = (GLint) vert->win[1];
- span->array->z[count] = (GLint) (vert->win[2] + 0.5F);
- span->end = count + 1;
- }}
-
-#endif /* LARGE || ATTENUATE || SMOOTH */
-
- ASSERT(span->end <= MAX_WIDTH);
-}
-
-
-#undef FLAGS
-#undef NAME
+++ /dev/null
-# List of source files in this directory used for X.org xserver build
-MESA_SWRAST_SOURCES = \
-s_aaline.c \
-s_aatriangle.c \
-s_accum.c \
-s_alpha.c \
-s_arbshader.c \
-s_atifragshader.c \
-s_bitmap.c \
-s_blend.c \
-s_blit.c \
-s_buffers.c \
-s_context.c \
-s_copypix.c \
-s_depth.c \
-s_drawpix.c \
-s_feedback.c \
-s_fog.c \
-s_imaging.c \
-s_lines.c \
-s_logic.c \
-s_masking.c \
-s_nvfragprog.c \
-s_points.c \
-s_readpix.c \
-s_span.c \
-s_stencil.c \
-s_texcombine.c \
-s_texfilter.c \
-s_texstore.c \
-s_triangle.c \
-s_zoom.c
-
-MESA_SWRAST_HEADERS = \
-s_aaline.h \
-s_aalinetemp.h \
-s_aatriangle.h \
-s_aatritemp.h \
-s_accum.h \
-s_alpha.h \
-s_arbshader.h \
-s_atifragshader.h \
-s_blend.h \
-s_context.h \
-s_depth.h \
-s_drawpix.h \
-s_feedback.h \
-s_fog.h \
-s_lines.h \
-s_linetemp.h \
-s_logic.h \
-s_masking.h \
-s_nvfragprog.h \
-s_points.h \
-s_pointtemp.h \
-s_span.h \
-s_spantemp.h \
-s_stencil.h \
-s_texcombine.h \
-s_texfilter.h \
-s_triangle.h \
-s_trispan.h \
-s_tritemp.h \
-s_zoom.h \
-swrast.h
+++ /dev/null
-MESA_SWRAST_SETUP_SOURCES = \
-ss_context.c \
-ss_triangle.c
-
-MESA_SWRAST_SETUP_HEADERS = \
-ss_context.h \
-ss_triangle.h \
-ss_tritmp.h \
-ss_vb.h \
-swrast_setup.h
+++ /dev/null
-# List of source files in this directory used for X.org xserver build
-MESA_TNL_SOURCES = \
-t_context.c \
-t_pipeline.c \
-t_vb_arbprogram.c \
-t_vb_arbprogram_sse.c \
-t_vb_arbshader.c \
-t_vb_cull.c \
-t_vb_fog.c \
-t_vb_light.c \
-t_vb_normals.c \
-t_vb_points.c \
-t_vb_program.c \
-t_vb_render.c \
-t_vb_texgen.c \
-t_vb_texmat.c \
-t_vb_vertex.c \
-t_vertex.c \
-t_vertex_generic.c \
-t_vertex_sse.c \
-t_vp_build.c
-
-MESA_TNL_HEADERS = \
-t_array_api.h \
-t_array_import.h \
-t_context.h \
-t_pipeline.h \
-t_vb_arbprogram.h \
-t_vb_cliptmp.h \
-t_vb_lighttmp.h \
-t_vb_rendertmp.h \
-t_vertex.h \
-t_vp_build.h \
-tnl.h
-@ stdcall CPlApplet(ptr long ptr ptr)
\ No newline at end of file
+@ stdcall CPlApplet(ptr long ptr ptr)
+++ /dev/null
-LANGUAGE LANG_GREEK, SUBLANG_DEFAULT
-
-IDD_PROPPAGE1 DIALOGEX DISCARDABLE 20, 40, 315, 104
-STYLE DS_SHELLFONT | DS_MODALFRAME | WS_OVERLAPPED | WS_CAPTION | WS_VISIBLE | WS_SYSMENU
-CAPTION "ÅðéëÝîôå Ôýðï Áäåéïäüôçóçò"
-FONT 8, "Helv"
-BEGIN
- CONTROL "Ôýðïò Áäåéïäüôçóçò ÐåëÜôç", 100, "BUTTON", BS_GROUPBOX | WS_CHILD | WS_VISIBLE, 4, 4, 239, 94
- CONTROL "ÁíÜ ÓõóêåõÞ Þ ÁíÜ ×ñÞóôç", 102, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 13, 79, 107, 12
- CONTROL "ÁíÜ ÄÉáêïìéóôÞ. Áñéèìüò ôáõôü÷ñïíùí óõíäÝóåùí:", 103, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 13, 38, 163, 9
- CONTROL "Ðñïúüí:", 105, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 13, 20, 31, 8
- CONTROL "", 106, "COMBOBOX", CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP, 49, 20, 171, 12
- CONTROL "OK", 107, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 263, 7, 46, 14
- CONTROL "¢êõñï", 108, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 263, 27, 46, 14
- CONTROL "ÂïÞèåéá", 109, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 263, 48, 46, 14
- CONTROL "ÁðÜíôçóç...", 110, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 263, 68, 46, 14
- CONTROL "ÐñïóèÞêç Áäåéþí", 111, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 30, 56, 65, 15
- CONTROL "Áöáßñåóç Áäåéþí", 112, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 112, 56, 61, 16
- CONTROL "", 114, "EDIT", ES_LEFT | ES_AUTOHSCROLL | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 187, 39, 32, 12
-END
-
-STRINGTABLE
-BEGIN
- IDS_CPLNAME_1 "Äéá÷åéñéóôÞò Áäåéþí"
- IDS_CPLDESCRIPTION_1 "Äéá÷åéñéóôÞò Áäåéþí"
- IDS_REACTOS "ReactOS - FreeSoftware"
-END
<file>DirectD3D3_Vtable.c</file>
<file>DirectD3D7_Vtable.c</file>
</directory>
- <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
- <compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
</module>
<directory name="amstream">
<xi:include href="amstream/amstream.rbuild" />
</directory>
+ <directory name="d3d8">
+ <xi:include href="d3d8/d3d8.rbuild" />
+ </directory>
<directory name="d3d8thk">
<xi:include href="d3d8thk/d3d8thk.rbuild" />
</directory>
+ <directory name="d3d9">
+ <xi:include href="d3d9/d3d9.rbuild" />
+ </directory>
+ <directory name="ddraw">
+ <xi:include href="ddraw/ddraw.rbuild" />
+ </directory>
<directory name="devenum">
<xi:include href="devenum/devenum.rbuild" />
</directory>
<xi:include href="quartz/quartz.rbuild" />
</directory>
- <directory name="wine">
- <xi:include href="wine/wine.rbuild" />
- </directory>
</group>
<importlibrary definition="dmusic.spec" />
<redefine name="_WIN32_WINNT">0x600</redefine>
<define name="__WINESRC__" />
+ <compilerflag>-Wno-format</compilerflag>
<include base="dmusic">.</include>
<include base="ReactOS">include/reactos/wine</include>
<library>wine</library>
<file>viewport.c</file>
<dependency>wineheaders</dependency>
-
- <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
- <compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
</module>
--- /dev/null
+LIBRARY "idndl"
+
+EXPORTS
+ DownlevelGetLocaleScripts = DownlevelGetLocaleScripts @1
+ DownlevelGetStringScripts = kernel32.GetStringScripts @2
+ DownlevelVerifyScripts = kernel32.VerifyScripts @3
--- /dev/null
+LIBRARY "idndl"
+
+EXPORTS
+ DownlevelGetLocaleScripts = DownlevelGetLocaleScripts@12 @1
+ DownlevelGetStringScripts@20 = kernel32.GetStringScripts @2
+ DownlevelVerifyScripts@20 = kernel32.VerifyScripts @3
</group>
<redefine name="WINVER">0x600</redefine>
<file>idndl.cpp</file>
- <importlibrary definition="idndl.def" />
+ <importlibrary definition="idndl-$(ARCH).def" />
</module>
/* Do the probe */
Pointer = (PUCHAR)Address;
Data = *Pointer;
- Pointer = (PUCHAR)((ULONG)Address + Length -1);
+ Pointer = (PUCHAR)((ULONG_PTR)Address + Length -1);
Data = *Pointer;
}
Pointer = (PUCHAR)Address;
Data = *Pointer;
*Pointer = Data;
- Pointer = (PUCHAR)((ULONG)Address + Length -1);
+ Pointer = (PUCHAR)((ULONG_PTR)Address + Length -1);
Data = *Pointer;
*Pointer = Data;
}
HANDLE ThreadHandle;
/* Write common data */
- DebugEvent->dwProcessId = (DWORD)WaitStateChange->
+ DebugEvent->dwProcessId = (ULONG_PTR)WaitStateChange->
AppClientId.UniqueProcess;
- DebugEvent->dwThreadId = (DWORD)WaitStateChange->AppClientId.UniqueThread;
+ DebugEvent->dwThreadId = (ULONG_PTR)WaitStateChange->AppClientId.UniqueThread;
/* Check what kind of even this is */
switch (WaitStateChange->NewState)
/* Save the image name from the TIB */
DebugEvent->u.LoadDll.lpImageName =
((PTEB)ThreadBasicInfo.TebBaseAddress)->
- Tib.ArbitraryUserPointer;
+ NtTib.ArbitraryUserPointer;
}
else
{
--- /dev/null
+; $Id: ntdll.def 34404 2008-07-10 09:46:25Z fireball $
+;
+; ReactOS Operating System
+; Exports taken from Vista64
+;
+LIBRARY ntdll.dll
+
+EXPORTS
+;A_SHAFinal
+;A_SHAInit
+;A_SHAUpdate
+;AlpcAdjustCompletionListConcurrencyCount
+;AlpcFreeCompletionListMessage
+;AlpcGetCompletionListLastMessageInformation
+;AlpcGetCompletionListMessageAttributes
+;AlpcGetHeaderSize
+;AlpcGetMessageAttribute
+;AlpcGetMessageFromCompletionList
+;AlpcGetOutstandingCompletionListMessageCount
+;AlpcInitializeMessageAttribute
+;AlpcMaxAllowedMessageLength
+;AlpcRegisterCompletionList
+;AlpcRegisterCompletionListWorkerThread
+;AlpcUnregisterCompletionList
+;AlpcUnregisterCompletionListWorkerThread
+CsrAllocateCaptureBuffer
+CsrAllocateMessagePointer
+CsrCaptureMessageBuffer
+CsrCaptureMessageMultiUnicodeStringsInPlace
+CsrCaptureMessageString
+CsrCaptureTimeout
+CsrClientCallServer
+CsrClientConnectToServer
+CsrFreeCaptureBuffer
+CsrGetProcessId
+CsrIdentifyAlertableThread
+CsrSetPriorityClass
+;CsrVerifyRegion
+DbgBreakPoint
+DbgPrint
+DbgPrintEx
+DbgPrintReturnControlC
+DbgPrompt
+DbgQueryDebugFilterState
+DbgSetDebugFilterState
+DbgUiConnectToDbg
+DbgUiContinue
+DbgUiConvertStateChangeStructure
+DbgUiDebugActiveProcess
+DbgUiGetThreadDebugObject
+DbgUiIssueRemoteBreakin
+DbgUiRemoteBreakin
+DbgUiSetThreadDebugObject
+DbgUiStopDebugging
+DbgUiWaitStateChange
+DbgUserBreakPoint
+;EtwCreateTraceInstanceId
+;EtwDeliverDataBlock
+;EtwEnumerateProcessRegGuids
+;EtwEventActivityIdControl
+;EtwEventEnabled
+;EtwEventProviderEnabled
+;EtwEventRegister
+;EtwEventUnregister
+;EtwEventWrite
+;EtwEventWriteEndScenario
+;EtwEventWriteFull
+;EtwEventWriteStartScenario
+;EtwEventWriteString
+;EtwEventWriteTransfer
+;EtwGetTraceEnableFlags
+;EtwGetTraceEnableLevel
+;EtwGetTraceLoggerHandle
+;EtwLogTraceEvent
+;EtwNotificationRegister
+;EtwNotificationUnregister
+;EtwProcessPrivateLoggerRequest
+;EtwRegisterSecurityProvider
+;EtwRegisterTraceGuidsA
+;EtwRegisterTraceGuidsW
+;EtwReplyNotification
+;EtwSendNotification
+;EtwSetMark
+;EtwTraceEventInstance
+;EtwTraceMessage
+;EtwTraceMessageVa
+;EtwUnregisterTraceGuids
+;EtwWriteUMSecurityEvent
+;EtwpCreateEtwThread
+;EtwpGetCpuSpeed
+;EtwpNotificationThread
+;ExpInterlockedPopEntrySListEnd
+;ExpInterlockedPopEntrySListFault
+;ExpInterlockedPopEntrySListResume
+KiRaiseUserExceptionDispatcher
+KiUserApcDispatcher
+KiUserCallbackDispatcher
+KiUserExceptionDispatcher
+LdrAccessResource
+;LdrAddLoadAsDataTable
+LdrAddRefDll
+LdrDisableThreadCalloutsForDll
+LdrEnumResources
+;LdrEnumerateLoadedModules
+LdrFindEntryForAddress
+LdrFindResourceDirectory_U
+;LdrFindResourceEx_U
+LdrFindResource_U
+;LdrFlushAlternateResourceModules
+LdrGetDllHandle
+;LdrGetDllHandleEx
+;LdrGetFailureData
+;LdrGetFileNameFromLoadAsDataTable
+;LdrGetKnownDllSectionHandle
+LdrGetProcedureAddress
+;LdrGetProcedureAddressEx
+;LdrHotPatchRoutine
+;LdrInitShimEngineDynamic
+LdrInitializeThunk
+;LdrLoadAlternateResourceModule
+;LdrLoadAlternateResourceModuleEx
+LdrLoadDll
+LdrLockLoaderLock
+;LdrOpenImageFileOptionsKey
+;LdrProcessInitializationComplete
+LdrProcessRelocationBlock
+LdrQueryImageFileExecutionOptions
+;LdrQueryImageFileExecutionOptionsEx
+;LdrQueryImageFileKeyOption
+;LdrQueryModuleServiceTags
+LdrQueryProcessModuleInformation
+;LdrRegisterDllNotification
+;LdrRemoveLoadAsDataTable
+;LdrResFindResource
+;LdrResFindResourceDirectory
+;LdrResRelease
+;LdrResSearchResource
+;LdrSetAppCompatDllRedirectionCallback
+;LdrSetDllManifestProber
+;LdrSetMUICacheType
+LdrShutdownProcess
+LdrShutdownThread
+LdrUnloadAlternateResourceModule
+;LdrUnloadAlternateResourceModuleEx
+LdrUnloadDll
+LdrUnlockLoaderLock
+;LdrUnregisterDllNotification
+LdrVerifyImageMatchesChecksum
+;LdrVerifyImageMatchesChecksumEx
+;LdrpResGetMappingSize
+;LdrpResGetRCConfig
+;LdrpResGetResourceDirectory
+;MD4Final
+;MD4Init
+;MD4Update
+;MD5Final
+;MD5Init
+;MD5Update
+NlsAnsiCodePage
+NlsMbCodePageTag
+NlsMbOemCodePageTag
+NtAcceptConnectPort
+NtAccessCheck
+NtAccessCheckAndAuditAlarm
+NtAccessCheckByType
+NtAccessCheckByTypeAndAuditAlarm
+NtAccessCheckByTypeResultList
+NtAccessCheckByTypeResultListAndAuditAlarm
+NtAccessCheckByTypeResultListAndAuditAlarmByHandle
+;NtAcquireCMFViewOwnership
+NtAddAtom
+NtAddBootEntry
+NtAddDriverEntry
+NtAdjustGroupsToken
+NtAdjustPrivilegesToken
+NtAlertResumeThread
+NtAlertThread
+NtAllocateLocallyUniqueId
+NtAllocateUserPhysicalPages
+NtAllocateUuids
+NtAllocateVirtualMemory
+;NtAlpcAcceptConnectPort
+;NtAlpcCancelMessage
+;NtAlpcConnectPort
+;NtAlpcCreatePort
+;NtAlpcCreatePortSection
+;NtAlpcCreateResourceReserve
+;NtAlpcCreateSectionView
+;NtAlpcCreateSecurityContext
+;NtAlpcDeletePortSection
+;NtAlpcDeleteResourceReserve
+;NtAlpcDeleteSectionView
+;NtAlpcDeleteSecurityContext
+;NtAlpcDisconnectPort
+;NtAlpcImpersonateClientOfPort
+;NtAlpcOpenSenderProcess
+;NtAlpcOpenSenderThread
+;NtAlpcQueryInformation
+;NtAlpcQueryInformationMessage
+;NtAlpcRevokeSecurityContext
+;NtAlpcSendWaitReceivePort
+;NtAlpcSetInformation
+NtApphelpCacheControl
+NtAreMappedFilesTheSame
+NtAssignProcessToJobObject
+NtCallbackReturn
+NtCancelDeviceWakeupRequest
+NtCancelIoFile
+;NtCancelIoFileEx
+;NtCancelSynchronousIoFile
+NtCancelTimer
+NtClearEvent
+NtClose
+NtCloseObjectAuditAlarm
+;NtCommitComplete
+;NtCommitEnlistment
+;NtCommitTransaction
+NtCompactKeys
+NtCompareTokens
+NtCompleteConnectPort
+NtCompressKey
+NtConnectPort
+NtContinue
+NtCreateDebugObject
+NtCreateDirectoryObject
+;NtCreateEnlistment
+NtCreateEvent
+NtCreateEventPair
+NtCreateFile
+NtCreateIoCompletion
+NtCreateJobObject
+NtCreateJobSet
+NtCreateKey
+;NtCreateKeyTransacted
+NtCreateKeyedEvent
+NtCreateMailslotFile
+NtCreateMutant
+NtCreateNamedPipeFile
+NtCreatePagingFile
+NtCreatePort
+;NtCreatePrivateNamespace
+NtCreateProcess
+NtCreateProcessEx
+NtCreateProfile
+;NtCreateResourceManager
+NtCreateSection
+NtCreateSemaphore
+NtCreateSymbolicLinkObject
+NtCreateThread
+;NtCreateThreadEx
+NtCreateTimer
+NtCreateToken
+;NtCreateTransaction
+;NtCreateTransactionManager
+;NtCreateUserProcess
+NtCreateWaitablePort
+;NtCreateWorkerFactory
+NtDebugActiveProcess
+NtDebugContinue
+NtDelayExecution
+NtDeleteAtom
+NtDeleteBootEntry
+NtDeleteDriverEntry
+NtDeleteFile
+NtDeleteKey
+NtDeleteObjectAuditAlarm
+;NtDeletePrivateNamespace
+NtDeleteValueKey
+NtDeviceIoControlFile
+NtDisplayString
+NtDuplicateObject
+NtDuplicateToken
+NtEnumerateBootEntries
+NtEnumerateDriverEntries
+NtEnumerateKey
+NtEnumerateSystemEnvironmentValuesEx
+;NtEnumerateTransactionObject
+NtEnumerateValueKey
+NtExtendSection
+NtFilterToken
+NtFindAtom
+NtFlushBuffersFile
+;NtFlushInstallUILanguage
+NtFlushInstructionCache
+NtFlushKey
+;NtFlushProcessWriteBuffers
+NtFlushVirtualMemory
+NtFlushWriteBuffer
+NtFreeUserPhysicalPages
+NtFreeVirtualMemory
+;NtFreezeRegistry
+;NtFreezeTransactions
+NtFsControlFile
+NtGetContextThread
+NtGetCurrentProcessorNumber
+NtGetDevicePowerState
+;NtGetMUIRegistryInfo
+;NtGetNextProcess
+;NtGetNextThread
+;NtGetNlsSectionPtr
+;NtGetNotificationResourceManager
+NtGetPlugPlayEvent
+;NtGetTickCount
+NtGetWriteWatch
+NtImpersonateAnonymousToken
+NtImpersonateClientOfPort
+NtImpersonateThread
+;NtInitializeNlsFiles
+NtInitializeRegistry
+NtInitiatePowerAction
+NtIsProcessInJob
+NtIsSystemResumeAutomatic
+;NtIsUILanguageComitted
+NtListenPort
+NtLoadDriver
+NtLoadKey
+NtLoadKey2
+NtLoadKeyEx
+NtLockFile
+NtLockProductActivationKeys
+NtLockRegistryKey
+NtLockVirtualMemory
+NtMakePermanentObject
+NtMakeTemporaryObject
+;NtMapCMFModule
+NtMapUserPhysicalPages
+NtMapUserPhysicalPagesScatter
+NtMapViewOfSection
+NtModifyBootEntry
+NtModifyDriverEntry
+NtNotifyChangeDirectoryFile
+NtNotifyChangeKey
+NtNotifyChangeMultipleKeys
+NtOpenDirectoryObject
+;NtOpenEnlistment
+NtOpenEvent
+NtOpenEventPair
+NtOpenFile
+NtOpenIoCompletion
+NtOpenJobObject
+NtOpenKey
+;NtOpenKeyTransacted
+NtOpenKeyedEvent
+NtOpenMutant
+NtOpenObjectAuditAlarm
+;NtOpenPrivateNamespace
+NtOpenProcess
+NtOpenProcessToken
+NtOpenProcessTokenEx
+;NtOpenResourceManager
+NtOpenSection
+NtOpenSemaphore
+;NtOpenSession
+NtOpenSymbolicLinkObject
+NtOpenThread
+NtOpenThreadToken
+NtOpenThreadTokenEx
+NtOpenTimer
+;NtOpenTransaction
+;NtOpenTransactionManager
+NtPlugPlayControl
+NtPowerInformation
+;NtPrePrepareComplete
+;NtPrePrepareEnlistment
+;NtPrepareComplete
+;NtPrepareEnlistment
+NtPrivilegeCheck
+NtPrivilegeObjectAuditAlarm
+NtPrivilegedServiceAuditAlarm
+;NtPropagationComplete
+;NtPropagationFailed
+NtProtectVirtualMemory
+NtPulseEvent
+NtQueryAttributesFile
+NtQueryBootEntryOrder
+NtQueryBootOptions
+NtQueryDebugFilterState
+NtQueryDefaultLocale
+NtQueryDefaultUILanguage
+NtQueryDirectoryFile
+NtQueryDirectoryObject
+NtQueryDriverEntryOrder
+NtQueryEaFile
+NtQueryEvent
+NtQueryFullAttributesFile
+NtQueryInformationAtom
+;NtQueryInformationEnlistment
+NtQueryInformationFile
+NtQueryInformationJobObject
+NtQueryInformationPort
+NtQueryInformationProcess
+;NtQueryInformationResourceManager
+NtQueryInformationThread
+NtQueryInformationToken
+;NtQueryInformationTransaction
+;NtQueryInformationTransactionManager
+;NtQueryInformationWorkerFactory
+NtQueryInstallUILanguage
+NtQueryIntervalProfile
+NtQueryIoCompletion
+NtQueryKey
+;NtQueryLicenseValue
+NtQueryMultipleValueKey
+NtQueryMutant
+NtQueryObject
+NtQueryOpenSubKeys
+NtQueryOpenSubKeysEx
+NtQueryPerformanceCounter
+NtQueryPortInformationProcess
+NtQueryQuotaInformationFile
+NtQuerySection
+NtQuerySecurityObject
+NtQuerySemaphore
+NtQuerySymbolicLinkObject
+NtQuerySystemEnvironmentValue
+NtQuerySystemEnvironmentValueEx
+NtQuerySystemInformation
+NtQuerySystemTime
+NtQueryTimer
+NtQueryTimerResolution
+NtQueryValueKey
+NtQueryVirtualMemory
+NtQueryVolumeInformationFile
+NtQueueApcThread
+NtRaiseException
+NtRaiseHardError
+NtReadFile
+NtReadFileScatter
+;NtReadOnlyEnlistment
+NtReadRequestData
+NtReadVirtualMemory
+;NtRecoverEnlistment
+;NtRecoverResourceManager
+;NtRecoverTransactionManager
+;NtRegisterProtocolAddressInformation
+NtRegisterThreadTerminatePort
+;NtReleaseCMFViewOwnership
+NtReleaseKeyedEvent
+NtReleaseMutant
+NtReleaseSemaphore
+;NtReleaseWorkerFactoryWorker
+NtRemoveIoCompletion
+;NtRemoveIoCompletionEx
+NtRemoveProcessDebug
+NtRenameKey
+;NtRenameTransactionManager
+NtReplaceKey
+;NtReplacePartitionUnit
+NtReplyPort
+NtReplyWaitReceivePort
+NtReplyWaitReceivePortEx
+NtReplyWaitReplyPort
+NtRequestDeviceWakeup
+NtRequestPort
+NtRequestWaitReplyPort
+NtRequestWakeupLatency
+NtResetEvent
+NtResetWriteWatch
+NtRestoreKey
+NtResumeProcess
+NtResumeThread
+;NtRollbackComplete
+;NtRollbackEnlistment
+;NtRollbackTransaction
+;NtRollforwardTransactionManager
+NtSaveKey
+NtSaveKeyEx
+NtSaveMergedKeys
+NtSecureConnectPort
+NtSetBootEntryOrder
+NtSetBootOptions
+NtSetContextThread
+NtSetDebugFilterState
+NtSetDefaultHardErrorPort
+NtSetDefaultLocale
+NtSetDefaultUILanguage
+NtSetDriverEntryOrder
+NtSetEaFile
+NtSetEvent
+NtSetEventBoostPriority
+NtSetHighEventPair
+NtSetHighWaitLowEventPair
+NtSetInformationDebugObject
+;NtSetInformationEnlistment
+NtSetInformationFile
+NtSetInformationJobObject
+NtSetInformationKey
+NtSetInformationObject
+NtSetInformationProcess
+;NtSetInformationResourceManager
+NtSetInformationThread
+NtSetInformationToken
+;NtSetInformationTransaction
+;NtSetInformationTransactionManager
+;NtSetInformationWorkerFactory
+NtSetIntervalProfile
+NtSetIoCompletion
+NtSetLdtEntries
+NtSetLowEventPair
+NtSetLowWaitHighEventPair
+NtSetQuotaInformationFile
+NtSetSecurityObject
+NtSetSystemEnvironmentValue
+NtSetSystemEnvironmentValueEx
+NtSetSystemInformation
+NtSetSystemPowerState
+NtSetSystemTime
+NtSetThreadExecutionState
+NtSetTimer
+NtSetTimerResolution
+NtSetUuidSeed
+NtSetValueKey
+NtSetVolumeInformationFile
+NtShutdownSystem
+;NtShutdownWorkerFactory
+NtSignalAndWaitForSingleObject
+;NtSinglePhaseReject
+NtStartProfile
+NtStopProfile
+NtSuspendProcess
+NtSuspendThread
+NtSystemDebugControl
+NtTerminateJobObject
+NtTerminateProcess
+NtTerminateThread
+NtTestAlert
+;NtThawRegistry
+;NtThawTransactions
+;NtTraceControl
+NtTraceEvent
+NtTranslateFilePath
+NtUnloadDriver
+NtUnloadKey
+NtUnloadKey2
+NtUnloadKeyEx
+NtUnlockFile
+NtUnlockVirtualMemory
+NtUnmapViewOfSection
+NtVdmControl
+NtWaitForDebugEvent
+NtWaitForKeyedEvent
+NtWaitForMultipleObjects
+NtWaitForMultipleObjects32
+NtWaitForSingleObject
+;NtWaitForWorkViaWorkerFactory
+NtWaitHighEventPair
+NtWaitLowEventPair
+;NtWorkerFactoryWorkerReady
+NtWriteFile
+NtWriteFileGather
+NtWriteRequestData
+NtWriteVirtualMemory
+NtYieldExecution
+;NtdllDefWindowProc_A
+;NtdllDefWindowProc_W
+;NtdllDialogWndProc_A
+;NtdllDialogWndProc_W
+;PfxFindPrefix
+;PfxInitialize
+;PfxInsertPrefix
+;PfxRemovePrefix
+;RtlAbortRXact
+RtlAbsoluteToSelfRelativeSD
+RtlAcquirePebLock
+RtlAcquirePrivilege
+RtlAcquireResourceExclusive
+RtlAcquireResourceShared
+RtlAcquireSRWLockExclusive
+RtlAcquireSRWLockShared
+RtlActivateActivationContext
+;RtlActivateActivationContextEx
+RtlActivateActivationContextUnsafeFast
+RtlAddAccessAllowedAce
+RtlAddAccessAllowedAceEx
+RtlAddAccessAllowedObjectAce
+RtlAddAccessDeniedAce
+RtlAddAccessDeniedAceEx
+RtlAddAccessDeniedObjectAce
+RtlAddAce
+;RtlAddActionToRXact
+RtlAddAtomToAtomTable
+;RtlAddAttributeActionToRXact
+RtlAddAuditAccessAce
+RtlAddAuditAccessAceEx
+RtlAddAuditAccessObjectAce
+;RtlAddCompoundAce
+;RtlAddFunctionTable
+RtlAddMandatoryAce
+RtlAddRefActivationContext
+;RtlAddRefMemoryStream
+;RtlAddSIDToBoundaryDescriptor
+;RtlAddVectoredContinueHandler
+RtlAddVectoredExceptionHandler
+;RtlAddressInSectionTable
+RtlAdjustPrivilege
+RtlAllocateActivationContextStack
+RtlAllocateAndInitializeSid
+RtlAllocateHandle
+RtlAllocateHeap
+;RtlAllocateMemoryBlockLookaside
+;RtlAllocateMemoryZone
+RtlAnsiCharToUnicodeChar
+RtlAnsiStringToUnicodeSize=RtlxAnsiStringToUnicodeSize
+RtlAnsiStringToUnicodeString
+RtlAppendAsciizToString
+;RtlAppendPathElement
+RtlAppendStringToString
+RtlAppendUnicodeStringToString
+RtlAppendUnicodeToString
+;RtlApplicationVerifierStop
+;RtlApplyRXact
+;RtlApplyRXactNoFlush
+RtlAreAllAccessesGranted
+RtlAreAnyAccessesGranted
+RtlAreBitsClear
+RtlAreBitsSet
+RtlAssert
+;RtlBarrier
+;RtlBarrierForDelete
+;RtlCancelTimer
+RtlCaptureContext
+RtlCaptureStackBackTrace
+RtlCharToInteger
+;RtlCheckForOrphanedCriticalSections
+RtlCheckRegistryKey
+;RtlCleanUpTEBLangLists
+RtlClearAllBits
+RtlClearBits
+;RtlCloneMemoryStream
+;RtlCloneUserProcess
+;RtlCmDecodeMemIoResource
+;RtlCmEncodeMemIoResource
+;RtlCommitDebugInfo
+;RtlCommitMemoryStream
+RtlCompactHeap
+;RtlCompareAltitudes
+RtlCompareMemory
+RtlCompareMemoryUlong
+RtlCompareString
+RtlCompareUnicodeString
+;RtlCompareUnicodeStrings
+;RtlCompleteProcessCloning
+RtlCompressBuffer
+RtlComputeCrc32
+;RtlComputeImportTableHash
+;RtlComputePrivatizedDllName_U
+;RtlConnectToSm
+;RtlConsoleMultiByteToUnicodeN
+RtlConvertExclusiveToShared
+;RtlConvertLCIDToString
+RtlConvertUlongToLargeInteger
+RtlConvertSharedToExclusive
+RtlConvertSidToUnicodeString
+;RtlConvertToAutoInheritSecurityObject
+;RtlConvertUiListToApiList
+RtlCopyLuid
+RtlCopyLuidAndAttributesArray
+;RtlCopyMappedMemory
+RtlCopyMemory=memmove
+;RtlCopyMemoryNonTemporal
+;RtlCopyMemoryStreamTo
+;RtlCopyOutOfProcessMemoryStreamTo
+RtlCopySecurityDescriptor
+RtlCopySid
+RtlCopySidAndAttributesArray
+RtlCopyString
+RtlCopyUnicodeString
+RtlCreateAcl
+RtlCreateActivationContext
+;RtlCreateAndSetSD
+RtlCreateAtomTable
+;RtlCreateBootStatusDataFile
+;RtlCreateBoundaryDescriptor
+RtlCreateEnvironment
+;RtlCreateEnvironmentEx
+RtlCreateHeap
+;RtlCreateMemoryBlockLookaside
+;RtlCreateMemoryZone
+RtlCreateProcessParameters
+;RtlCreateProcessParametersEx
+RtlCreateQueryDebugBuffer
+RtlCreateRegistryKey
+RtlCreateSecurityDescriptor
+;RtlCreateServiceSid
+RtlCreateSystemVolumeInformationFolder
+RtlCreateTagHeap
+RtlCreateTimer
+RtlCreateTimerQueue
+RtlCreateUnicodeString
+RtlCreateUnicodeStringFromAsciiz
+RtlCreateUserProcess
+;RtlCreateUserSecurityObject
+;RtlCreateUserStack
+RtlCreateUserThread
+;RtlCultureNameToLCID
+RtlCustomCPToUnicodeN
+RtlCutoverTimeToSystemTime
+;RtlDeCommitDebugInfo
+RtlDeNormalizeProcessParams
+RtlDeactivateActivationContext
+RtlDeactivateActivationContextUnsafeFast
+;RtlDebugPrintTimes
+RtlDecodePointer=RtlEncodePointer
+RtlDecodeSystemPointer=RtlEncodeSystemPointer
+RtlDecompressBuffer
+RtlDecompressFragment
+;RtlDefaultNpAcl
+RtlDelete
+RtlDeleteAce
+RtlDeleteAtomFromAtomTable
+;RtlDeleteBarrier
+;RtlDeleteBoundaryDescriptor
+RtlDeleteCriticalSection
+RtlDeleteElementGenericTable
+RtlDeleteElementGenericTableAvl
+;RtlDeleteFunctionTable
+RtlDeleteNoSplay
+RtlDeleteRegistryValue
+RtlDeleteResource
+RtlDeleteSecurityObject
+RtlDeleteTimer
+RtlDeleteTimerQueue
+RtlDeleteTimerQueueEx
+;RtlDeregisterSecureMemoryCacheCallback
+RtlDeregisterWait
+RtlDeregisterWaitEx
+RtlDestroyAtomTable
+RtlDestroyEnvironment
+RtlDestroyHandleTable
+RtlDestroyHeap
+;RtlDestroyMemoryBlockLookaside
+;RtlDestroyMemoryZone
+RtlDestroyProcessParameters
+RtlDestroyQueryDebugBuffer
+RtlDetermineDosPathNameType_U
+RtlDllShutdownInProgress
+;RtlDnsHostNameToComputerName
+RtlDoesFileExists_U
+;RtlDosApplyFileIsolationRedirection_Ustr
+RtlDosPathNameToNtPathName_U
+;RtlDosPathNameToNtPathName_U_WithStatus
+RtlDosPathNameToRelativeNtPathName_U
+;RtlDosPathNameToRelativeNtPathName_U_WithStatus
+RtlDosSearchPath_U
+;RtlDosSearchPath_Ustr
+RtlDowncaseUnicodeChar
+RtlDowncaseUnicodeString
+RtlDumpResource
+RtlDuplicateUnicodeString
+RtlEmptyAtomTable
+;RtlEnableEarlyCriticalSectionEventCreation
+RtlEncodePointer
+RtlEncodeSystemPointer
+RtlEnterCriticalSection
+RtlEnumProcessHeaps
+RtlEnumerateGenericTable
+RtlEnumerateGenericTableAvl
+RtlEnumerateGenericTableLikeADirectory
+RtlEnumerateGenericTableWithoutSplaying
+RtlEnumerateGenericTableWithoutSplayingAvl
+RtlEqualComputerName
+RtlEqualDomainName
+RtlEqualLuid
+RtlEqualPrefixSid
+RtlEqualSid
+RtlEqualString
+RtlEqualUnicodeString
+RtlEraseUnicodeString
+;RtlExitUserProcess
+RtlExitUserThread
+;RtlExpandEnvironmentStrings
+RtlExpandEnvironmentStrings_U
+;RtlExtendMemoryBlockLookaside
+;RtlExtendMemoryZone
+RtlFillMemory
+;RtlFinalReleaseOutOfProcessMemoryStream
+;RtlFindAceByType
+;RtlFindActivationContextSectionGuid
+RtlFindActivationContextSectionString
+RtlFindCharInUnicodeString
+RtlFindClearBits
+RtlFindClearBitsAndSet
+RtlFindClearRuns
+;RtlFindClosestEncodableLength
+RtlFindLastBackwardRunClear
+RtlFindLeastSignificantBit
+RtlFindLongestRunClear
+RtlFindMessage
+RtlFindMostSignificantBit
+RtlFindNextForwardRunClear
+RtlFindSetBits
+RtlFindSetBitsAndClear
+RtlFirstEntrySList
+RtlFirstFreeAce
+;RtlFlsAlloc
+;RtlFlsFree
+RtlFlushSecureMemoryCache
+RtlFormatCurrentUserKeyPath
+RtlFormatMessage
+;RtlFormatMessageEx
+;RtlFreeActivationContextStack
+RtlFreeAnsiString
+RtlFreeHandle
+RtlFreeHeap
+;RtlFreeMemoryBlockLookaside
+RtlFreeOemString
+RtlFreeSid
+;RtlFreeThreadActivationContextStack
+RtlFreeUnicodeString
+;RtlFreeUserStack
+RtlGUIDFromString
+RtlGenerate8dot3Name
+RtlGetAce
+RtlGetActiveActivationContext
+RtlGetCallersAddress
+RtlGetCompressionWorkSpaceSize
+RtlGetControlSecurityDescriptor
+;RtlGetCriticalSectionRecursionCount
+RtlGetCurrentDirectory_U
+RtlGetCurrentPeb
+RtlGetCurrentProcessorNumber
+;RtlGetCurrentTransaction
+RtlGetDaclSecurityDescriptor
+RtlGetElementGenericTable
+RtlGetElementGenericTableAvl
+;RtlGetFileMUIPath
+;RtlGetFrame
+RtlGetFullPathName_U
+;RtlGetFullPathName_UstrEx
+;RtlGetFunctionTableListHead
+RtlGetGroupSecurityDescriptor
+;RtlGetIntegerAtom
+RtlGetLastNtStatus
+RtlGetLastWin32Error
+;RtlGetLengthWithoutLastFullDosOrNtPathElement
+;RtlGetLengthWithoutTrailingPathSeperators
+RtlGetLongestNtPathLength
+;RtlGetNativeSystemInformation
+RtlGetNtGlobalFlags
+RtlGetNtProductType
+RtlGetNtVersionNumbers
+RtlGetOwnerSecurityDescriptor
+;RtlGetParentLocaleName
+RtlGetProcessHeaps
+;RtlGetProductInfo
+RtlGetSaclSecurityDescriptor
+RtlGetSecurityDescriptorRMControl
+RtlGetSetBootStatusData
+;RtlGetSystemPreferredUILanguages
+;RtlGetThreadErrorMode
+;RtlGetThreadLangIdByIndex
+;RtlGetThreadPreferredUILanguages
+;RtlGetUILanguageInfo
+;RtlGetUnloadEventTrace
+;RtlGetUnloadEventTraceEx
+RtlGetUserInfoHeap
+;RtlGetUserPreferredUILanguages
+RtlGetVersion
+RtlHashUnicodeString
+;RtlHeapTrkInitialize
+RtlIdentifierAuthoritySid
+;RtlIdnToAscii
+;RtlIdnToNameprepUnicode
+;RtlIdnToUnicode
+RtlImageDirectoryEntryToData
+RtlImageNtHeader
+;RtlImageNtHeaderEx
+RtlImageRvaToSection
+RtlImageRvaToVa
+RtlImpersonateSelf
+;RtlImpersonateSelfEx
+RtlInitAnsiString
+RtlInitAnsiStringEx
+;RtlInitBarrier
+RtlInitCodePageTable
+;RtlInitMemoryStream
+RtlInitNlsTables
+;RtlInitOutOfProcessMemoryStream
+RtlInitString
+RtlInitUnicodeString
+RtlInitUnicodeStringEx
+;RtlInitializeAtomPackage
+RtlInitializeBitMap
+RtlInitializeConditionVariable
+RtlInitializeContext
+RtlInitializeCriticalSection
+RtlInitializeCriticalSectionAndSpinCount
+;RtlInitializeCriticalSectionEx
+RtlInitializeGenericTable
+RtlInitializeGenericTableAvl
+RtlInitializeHandleTable
+;RtlInitializeNtUserPfn
+;RtlInitializeRXact
+RtlInitializeResource
+RtlInitializeSListHead
+RtlInitializeSRWLock
+RtlInitializeSid
+RtlInsertElementGenericTable
+RtlInsertElementGenericTableAvl
+RtlInsertElementGenericTableFull
+RtlInsertElementGenericTableFullAvl
+;RtlInstallFunctionTableCallback
+RtlInt64ToUnicodeString
+RtlIntegerToChar
+RtlIntegerToUnicodeString
+RtlInterlockedFlushSList
+RtlInterlockedPopEntrySList
+RtlInterlockedPushEntrySList
+RtlInterlockedPushListSList
+;RtlIoDecodeMemIoResource
+;RtlIoEncodeMemIoResource
+RtlIpv4AddressToStringA
+RtlIpv4AddressToStringExA
+RtlIpv4AddressToStringExW
+RtlIpv4AddressToStringW
+RtlIpv4StringToAddressA
+RtlIpv4StringToAddressExA
+RtlIpv4StringToAddressExW
+RtlIpv4StringToAddressW
+RtlIpv6AddressToStringA
+RtlIpv6AddressToStringExA
+RtlIpv6AddressToStringExW
+RtlIpv6AddressToStringW
+RtlIpv6StringToAddressA
+RtlIpv6StringToAddressExA
+RtlIpv6StringToAddressExW
+RtlIpv6StringToAddressW
+;RtlIsActivationContextActive
+;RtlIsCriticalSectionLocked
+;RtlIsCriticalSectionLockedByThread
+;RtlIsCurrentThreadAttachExempt
+RtlIsDosDeviceName_U
+RtlIsGenericTableEmpty
+RtlIsGenericTableEmptyAvl
+RtlIsNameLegalDOS8Dot3
+;RtlIsNormalizedString
+RtlIsTextUnicode
+RtlIsThreadWithinLoaderCallout
+RtlIsValidHandle
+RtlIsValidIndexHandle
+;RtlIsValidLocaleName
+;RtlLCIDToCultureName
+RtlLargeIntegerSubtract
+RtlLargeIntegerDivide
+RtlLargeIntegerToChar
+;RtlLcidToLocaleName
+RtlLeaveCriticalSection
+RtlLengthRequiredSid
+RtlLengthSecurityDescriptor
+RtlLengthSid
+RtlLocalTimeToSystemTime
+;RtlLocaleNameToLcid
+RtlLockBootStatusData
+;RtlLockCurrentThread
+RtlLockHeap
+;RtlLockMemoryBlockLookaside
+;RtlLockMemoryStreamRegion
+;RtlLockMemoryZone
+;RtlLockModuleSection
+;RtlLogStackBackTrace
+RtlLookupAtomInAtomTable
+RtlLookupElementGenericTable
+RtlLookupElementGenericTableAvl
+RtlLookupElementGenericTableFull
+RtlLookupElementGenericTableFullAvl
+RtlLookupFunctionEntry
+RtlLookupFunctionTable
+RtlMakeSelfRelativeSD
+RtlMapGenericMask
+RtlMapSecurityErrorToNtStatus
+RtlMoveMemory
+;RtlMultiAppendUnicodeStringBuffer
+RtlMultiByteToUnicodeN
+RtlMultiByteToUnicodeSize
+RtlMultipleAllocateHeap
+RtlMultipleFreeHeap
+;RtlNewInstanceSecurityObject
+;RtlNewSecurityGrantedAccess
+RtlNewSecurityObject
+;RtlNewSecurityObjectEx
+;RtlNewSecurityObjectWithMultipleInheritance
+RtlNormalizeProcessParams
+;RtlNormalizeString
+RtlNtPathNameToDosPathName
+RtlNtStatusToDosError
+RtlNtStatusToDosErrorNoTeb
+;RtlNtdllName
+RtlNumberGenericTableElements
+RtlNumberGenericTableElementsAvl
+RtlNumberOfClearBits
+RtlNumberOfSetBits
+;RtlNumberOfSetBitsUlongPtr
+RtlOemStringToUnicodeSize=RtlxOemStringToUnicodeSize
+RtlOemStringToUnicodeString
+RtlOemToUnicodeN
+RtlOpenCurrentUser
+;RtlOwnerAcesPresent
+RtlPcToFileHeader
+RtlPinAtomInAtomTable
+;RtlPopFrame
+RtlPrefixString
+RtlPrefixUnicodeString
+;RtlPrepareForProcessCloning
+;RtlProcessFlsData
+;RtlProtectHeap
+;RtlPushFrame
+;RtlQueryActivationContextApplicationSettings
+RtlQueryAtomInAtomTable
+;RtlQueryCriticalSectionOwner
+RtlQueryDepthSList
+;RtlQueryDynamicTimeZoneInformation
+;RtlQueryElevationFlags
+;RtlQueryEnvironmentVariable
+RtlQueryEnvironmentVariable_U
+RtlQueryHeapInformation
+RtlQueryInformationAcl
+RtlQueryInformationActivationContext
+;RtlQueryInformationActiveActivationContext
+;RtlQueryInterfaceMemoryStream
+;RtlQueryModuleInformation
+;RtlQueryProcessBackTraceInformation
+RtlQueryProcessDebugInformation
+;RtlQueryProcessHeapInformation
+;RtlQueryProcessLockInformation
+RtlQueryRegistryValues
+RtlQuerySecurityObject
+RtlQueryTagHeap
+RtlQueryTimeZoneInformation
+;RtlQueueApcWow64Thread
+RtlQueueWorkItem
+RtlRaiseException
+RtlRaiseStatus
+RtlRandom
+RtlRandomEx=RtlRandom
+RtlReAllocateHeap
+;RtlReadMemoryStream
+;RtlReadOutOfProcessMemoryStream
+RtlRealPredecessor
+RtlRealSuccessor
+RtlRegisterSecureMemoryCacheCallback
+;RtlRegisterThreadWithCsrss
+RtlRegisterWait
+RtlReleaseActivationContext
+;RtlReleaseMemoryStream
+RtlReleasePebLock
+RtlReleasePrivilege
+RtlReleaseRelativeName
+RtlReleaseResource
+RtlReleaseSRWLockExclusive
+RtlReleaseSRWLockShared
+RtlRemoteCall
+;RtlRemovePrivileges
+;RtlRemoveVectoredContinueHandler
+RtlRemoveVectoredExceptionHandler
+;RtlReportException
+;RtlResetMemoryBlockLookaside
+;RtlResetMemoryZone
+RtlResetRtlTranslations
+;RtlRestoreContext
+RtlRestoreLastWin32Error=RtlSetLastWin32Error
+;RtlRetrieveNtUserPfn
+;RtlRevertMemoryStream
+RtlRunDecodeUnicodeString
+RtlRunEncodeUnicodeString
+;RtlRunOnceBeginInitialize
+;RtlRunOnceComplete
+;RtlRunOnceExecuteOnce
+;RtlRunOnceInitialize
+RtlSecondsSince1970ToTime
+RtlSecondsSince1980ToTime
+;RtlSeekMemoryStream
+RtlSelfRelativeToAbsoluteSD
+RtlSelfRelativeToAbsoluteSD2
+;RtlSendMsgToSm
+RtlSetAllBits
+RtlSetAttributesSecurityDescriptor
+RtlSetBits
+RtlSetControlSecurityDescriptor
+RtlSetCriticalSectionSpinCount
+RtlSetCurrentDirectory_U
+RtlSetCurrentEnvironment
+;RtlSetCurrentTransaction
+RtlSetDaclSecurityDescriptor
+;RtlSetDynamicTimeZoneInformation
+;RtlSetEnvironmentStrings
+;RtlSetEnvironmentVar
+RtlSetEnvironmentVariable
+RtlSetGroupSecurityDescriptor
+RtlSetHeapInformation
+RtlSetInformationAcl
+RtlSetIoCompletionCallback
+RtlSetLastWin32Error
+RtlSetLastWin32ErrorAndNtStatusFromNtStatus
+;RtlSetMemoryStreamSize
+RtlSetOwnerSecurityDescriptor
+;RtlSetProcessDebugInformation
+RtlSetProcessIsCritical
+RtlSetSaclSecurityDescriptor
+RtlSetSecurityDescriptorRMControl
+RtlSetSecurityObject
+;RtlSetSecurityObjectEx
+;RtlSetThreadErrorMode
+;RtlSetThreadIsCritical
+;RtlSetThreadPoolStartFunc
+;RtlSetThreadPreferredUILanguages
+RtlSetTimeZoneInformation
+;RtlSetTimer
+RtlSetUnhandledExceptionFilter
+RtlSetUserFlagsHeap
+RtlSetUserValueHeap
+;RtlSidDominates
+;RtlSidEqualLevel
+;RtlSidHashInitialize
+;RtlSidHashLookup
+;RtlSidIsHigherLevel
+RtlSizeHeap
+RtlSleepConditionVariableCS
+RtlSleepConditionVariableSRW
+RtlSplay
+;RtlStartRXact
+;RtlStatMemoryStream
+RtlStringFromGUID
+RtlSubAuthorityCountSid
+RtlSubAuthoritySid
+RtlSubtreePredecessor
+RtlSubtreeSuccessor
+RtlSystemTimeToLocalTime
+RtlTestBit
+RtlTimeFieldsToTime
+RtlTimeToElapsedTimeFields
+RtlTimeToSecondsSince1970
+RtlTimeToSecondsSince1980
+RtlTimeToTimeFields
+;RtlTraceDatabaseAdd
+;RtlTraceDatabaseCreate
+;RtlTraceDatabaseDestroy
+;RtlTraceDatabaseEnumerate
+;RtlTraceDatabaseFind
+;RtlTraceDatabaseLock
+;RtlTraceDatabaseUnlock
+;RtlTraceDatabaseValidate
+;RtlTryAcquirePebLock
+RtlTryEnterCriticalSection
+RtlUnhandledExceptionFilter
+;RtlUnhandledExceptionFilter2
+RtlUnicodeStringToAnsiSize=RtlxUnicodeStringToAnsiSize
+RtlUnicodeStringToAnsiString
+RtlUnicodeStringToCountedOemString
+RtlUnicodeStringToInteger
+RtlUnicodeStringToOemSize=RtlxUnicodeStringToOemSize
+RtlUnicodeStringToOemString
+RtlUnicodeToCustomCPN
+RtlUnicodeToMultiByteN
+RtlUnicodeToMultiByteSize
+RtlUnicodeToOemN
+RtlUniform
+RtlUnlockBootStatusData
+;RtlUnlockCurrentThread
+RtlUnlockHeap
+;RtlUnlockMemoryBlockLookaside
+;RtlUnlockMemoryStreamRegion
+;RtlUnlockMemoryZone
+;RtlUnlockModuleSection
+RtlUnwind
+RtlUnwindEx
+RtlUpcaseUnicodeChar
+RtlUpcaseUnicodeString
+RtlUpcaseUnicodeStringToAnsiString
+RtlUpcaseUnicodeStringToCountedOemString
+RtlUpcaseUnicodeStringToOemString
+RtlUpcaseUnicodeToCustomCPN
+RtlUpcaseUnicodeToMultiByteN
+RtlUpcaseUnicodeToOemN
+;RtlUpdateClonedCriticalSection
+;RtlUpdateClonedSRWLock
+RtlUpdateTimer
+RtlUpperChar
+RtlUpperString
+;RtlUserThreadStart
+RtlValidAcl
+RtlValidRelativeSecurityDescriptor
+RtlValidSecurityDescriptor
+RtlValidSid
+RtlValidateHeap
+RtlValidateProcessHeaps
+RtlValidateUnicodeString
+RtlVerifyVersionInfo
+RtlVirtualUnwind
+RtlWakeAllConditionVariable
+RtlWakeConditionVariable
+RtlWalkFrameChain
+RtlWalkHeap
+;RtlWerpReportException
+;RtlWow64CallFunction64
+;RtlWow64EnableFsRedirection
+;RtlWow64EnableFsRedirectionEx
+;RtlWow64GetThreadContext
+;RtlWow64LogMessageInEventLogger
+;RtlWow64SetThreadContext
+;RtlWow64SuspendThread
+;RtlWriteMemoryStream
+RtlWriteRegistryValue
+RtlZeroHeap
+RtlZeroMemory
+RtlZombifyActivationContext
+;RtlpApplyLengthFunction
+;RtlpCheckDynamicTimeZoneInformation
+;RtlpCleanupRegistryKeys
+;RtlpConvertCultureNamesToLCIDs
+;RtlpConvertLCIDsToCultureNames
+;RtlpCreateProcessRegistryInfo
+RtlpEnsureBufferSize
+;RtlpGetLCIDFromLangInfoNode
+;RtlpGetNameFromLangInfoNode
+;RtlpGetSystemDefaultUILanguage
+;RtlpGetUserOrMachineUILanguage4NLS
+;RtlpInitializeLangRegistryInfo
+;RtlpIsQualifiedLanguage
+;RtlpLoadMachineUIByPolicy
+;RtlpLoadUserUIByPolicy
+;RtlpMuiFreeLangRegistryInfo
+;RtlpMuiRegCreateRegistryInfo
+;RtlpMuiRegFreeRegistryInfo
+;RtlpMuiRegLoadRegistryInfo
+;RtlpNotOwnerCriticalSection
+RtlpNtCreateKey
+RtlpNtEnumerateSubKey
+RtlpNtMakeTemporaryKey
+RtlpNtOpenKey
+RtlpNtQueryValueKey
+RtlpNtSetValueKey
+;RtlpQueryDefaultUILanguage
+;RtlpQueryProcessDebugInformationFromWow64
+;RtlpRefreshCachedUILanguage
+;RtlpSetInstallLanguage
+;RtlpSetPreferredUILanguages
+;RtlpSetUserPreferredUILanguages
+RtlpUnWaitCriticalSection
+;RtlpVerifyAndCommitUILanguageSettings
+RtlpWaitForCriticalSection
+RtlxAnsiStringToUnicodeSize
+RtlxOemStringToUnicodeSize
+RtlxUnicodeStringToAnsiSize
+RtlxUnicodeStringToOemSize
+;ShipAssert
+;ShipAssertGetBufferInfo
+;ShipAssertMsgA
+;ShipAssertMsgW
+;TpAllocAlpcCompletion
+;TpAllocCleanupGroup
+;TpAllocIoCompletion
+;TpAllocPool
+;TpAllocTimer
+;TpAllocWait
+;TpAllocWork
+;TpCallbackLeaveCriticalSectionOnCompletion
+;TpCallbackMayRunLong
+;TpCallbackReleaseMutexOnCompletion
+;TpCallbackReleaseSemaphoreOnCompletion
+;TpCallbackSetEventOnCompletion
+;TpCallbackUnloadDllOnCompletion
+;TpCancelAsyncIoOperation
+;TpCaptureCaller
+;TpCheckTerminateWorker
+;TpDbgDumpHeapUsage
+;TpDbgSetLogRoutine
+;TpDisassociateCallback
+;TpIsTimerSet
+;TpPostWork
+;TpReleaseAlpcCompletion
+;TpReleaseCleanupGroup
+;TpReleaseCleanupGroupMembers
+;TpReleaseIoCompletion
+;TpReleasePool
+;TpReleaseTimer
+;TpReleaseWait
+;TpReleaseWork
+;TpSetPoolMaxThreads
+;TpSetPoolMinThreads
+;TpSetTimer
+;TpSetWait
+;TpSimpleTryPost
+;TpStartAsyncIoOperation
+;TpWaitForAlpcCompletion
+;TpWaitForIoCompletion
+;TpWaitForTimer
+;TpWaitForWait
+;TpWaitForWork
+VerSetConditionMask
+;WerCheckEventEscalation
+;WerReportSQMEvent
+;WerReportWatsonEvent
+;WinSqmAddToStream
+;WinSqmEndSession
+;WinSqmEventEnabled
+;WinSqmEventWrite
+;WinSqmIsOptedIn
+;WinSqmSetString
+;WinSqmStartSession
+ZwAcceptConnectPort
+ZwAccessCheck
+ZwAccessCheckAndAuditAlarm
+ZwAccessCheckByType
+ZwAccessCheckByTypeAndAuditAlarm
+ZwAccessCheckByTypeResultList
+ZwAccessCheckByTypeResultListAndAuditAlarm
+ZwAccessCheckByTypeResultListAndAuditAlarmByHandle
+;ZwAcquireCMFViewOwnership
+ZwAddAtom
+ZwAddBootEntry
+ZwAddDriverEntry
+ZwAdjustGroupsToken
+ZwAdjustPrivilegesToken
+ZwAlertResumeThread
+ZwAlertThread
+ZwAllocateLocallyUniqueId
+ZwAllocateUserPhysicalPages
+ZwAllocateUuids
+ZwAllocateVirtualMemory
+;ZwAlpcAcceptConnectPort
+;ZwAlpcCancelMessage
+;ZwAlpcConnectPort
+;ZwAlpcCreatePort
+;ZwAlpcCreatePortSection
+;ZwAlpcCreateResourceReserve
+;ZwAlpcCreateSectionView
+;ZwAlpcCreateSecurityContext
+;ZwAlpcDeletePortSection
+;ZwAlpcDeleteResourceReserve
+;ZwAlpcDeleteSectionView
+;ZwAlpcDeleteSecurityContext
+;ZwAlpcDisconnectPort
+;ZwAlpcImpersonateClientOfPort
+;ZwAlpcOpenSenderProcess
+;ZwAlpcOpenSenderThread
+;ZwAlpcQueryInformation
+;ZwAlpcQueryInformationMessage
+;ZwAlpcRevokeSecurityContext
+;ZwAlpcSendWaitReceivePort
+;ZwAlpcSetInformation
+ZwApphelpCacheControl
+ZwAreMappedFilesTheSame
+ZwAssignProcessToJobObject
+ZwCallbackReturn
+ZwCancelDeviceWakeupRequest
+ZwCancelIoFile
+;ZwCancelIoFileEx
+;ZwCancelSynchronousIoFile
+ZwCancelTimer
+ZwClearEvent
+ZwClose
+ZwCloseObjectAuditAlarm
+;ZwCommitComplete
+;ZwCommitEnlistment
+;ZwCommitTransaction
+ZwCompactKeys
+ZwCompareTokens
+ZwCompleteConnectPort
+ZwCompressKey
+ZwConnectPort
+ZwContinue
+ZwCreateDebugObject
+ZwCreateDirectoryObject
+;ZwCreateEnlistment
+ZwCreateEvent
+ZwCreateEventPair
+ZwCreateFile
+ZwCreateIoCompletion
+ZwCreateJobObject
+ZwCreateJobSet
+ZwCreateKey
+;ZwCreateKeyTransacted
+ZwCreateKeyedEvent
+ZwCreateMailslotFile
+ZwCreateMutant
+ZwCreateNamedPipeFile
+ZwCreatePagingFile
+ZwCreatePort
+;ZwCreatePrivateNamespace
+ZwCreateProcess
+ZwCreateProcessEx
+ZwCreateProfile
+;ZwCreateResourceManager
+ZwCreateSection
+ZwCreateSemaphore
+ZwCreateSymbolicLinkObject
+ZwCreateThread
+;ZwCreateThreadEx
+ZwCreateTimer
+ZwCreateToken
+;ZwCreateTransaction
+;ZwCreateTransactionManager
+;ZwCreateUserProcess
+ZwCreateWaitablePort
+;ZwCreateWorkerFactory
+ZwDebugActiveProcess
+ZwDebugContinue
+ZwDelayExecution
+ZwDeleteAtom
+ZwDeleteBootEntry
+ZwDeleteDriverEntry
+ZwDeleteFile
+ZwDeleteKey
+ZwDeleteObjectAuditAlarm
+;ZwDeletePrivateNamespace
+ZwDeleteValueKey
+ZwDeviceIoControlFile
+ZwDisplayString
+ZwDuplicateObject
+ZwDuplicateToken
+ZwEnumerateBootEntries
+ZwEnumerateDriverEntries
+ZwEnumerateKey
+ZwEnumerateSystemEnvironmentValuesEx
+;ZwEnumerateTransactionObject
+ZwEnumerateValueKey
+ZwExtendSection
+ZwFilterToken
+ZwFindAtom
+ZwFlushBuffersFile
+;ZwFlushInstallUILanguage
+ZwFlushInstructionCache
+ZwFlushKey
+;ZwFlushProcessWriteBuffers
+ZwFlushVirtualMemory
+ZwFlushWriteBuffer
+ZwFreeUserPhysicalPages
+ZwFreeVirtualMemory
+;ZwFreezeRegistry
+;ZwFreezeTransactions
+ZwFsControlFile
+ZwGetContextThread
+ZwGetCurrentProcessorNumber
+ZwGetDevicePowerState
+;ZwGetMUIRegistryInfo
+;ZwGetNextProcess
+;ZwGetNextThread
+;ZwGetNlsSectionPtr
+;ZwGetNotificationResourceManager
+ZwGetPlugPlayEvent
+ZwGetWriteWatch
+ZwImpersonateAnonymousToken
+ZwImpersonateClientOfPort
+ZwImpersonateThread
+;ZwInitializeNlsFiles
+ZwInitializeRegistry
+ZwInitiatePowerAction
+ZwIsProcessInJob
+ZwIsSystemResumeAutomatic
+;ZwIsUILanguageComitted
+ZwListenPort
+ZwLoadDriver
+ZwLoadKey
+ZwLoadKey2
+ZwLoadKeyEx
+ZwLockFile
+ZwLockProductActivationKeys
+ZwLockRegistryKey
+ZwLockVirtualMemory
+ZwMakePermanentObject
+ZwMakeTemporaryObject
+;ZwMapCMFModule
+ZwMapUserPhysicalPages
+ZwMapUserPhysicalPagesScatter
+ZwMapViewOfSection
+ZwModifyBootEntry
+ZwModifyDriverEntry
+ZwNotifyChangeDirectoryFile
+ZwNotifyChangeKey
+ZwNotifyChangeMultipleKeys
+ZwOpenDirectoryObject
+;ZwOpenEnlistment
+ZwOpenEvent
+ZwOpenEventPair
+ZwOpenFile
+ZwOpenIoCompletion
+ZwOpenJobObject
+ZwOpenKey
+;ZwOpenKeyTransacted
+ZwOpenKeyedEvent
+ZwOpenMutant
+ZwOpenObjectAuditAlarm
+;ZwOpenPrivateNamespace
+ZwOpenProcess
+ZwOpenProcessToken
+ZwOpenProcessTokenEx
+;ZwOpenResourceManager
+ZwOpenSection
+ZwOpenSemaphore
+;ZwOpenSession
+ZwOpenSymbolicLinkObject
+ZwOpenThread
+ZwOpenThreadToken
+ZwOpenThreadTokenEx
+ZwOpenTimer
+;ZwOpenTransaction
+;ZwOpenTransactionManager
+ZwPlugPlayControl
+ZwPowerInformation
+;ZwPrePrepareComplete
+;ZwPrePrepareEnlistment
+;ZwPrepareComplete
+;ZwPrepareEnlistment
+ZwPrivilegeCheck
+ZwPrivilegeObjectAuditAlarm
+ZwPrivilegedServiceAuditAlarm
+;ZwPropagationComplete
+;ZwPropagationFailed
+ZwProtectVirtualMemory
+ZwPulseEvent
+ZwQueryAttributesFile
+ZwQueryBootEntryOrder
+ZwQueryBootOptions
+ZwQueryDebugFilterState
+ZwQueryDefaultLocale
+ZwQueryDefaultUILanguage
+ZwQueryDirectoryFile
+ZwQueryDirectoryObject
+ZwQueryDriverEntryOrder
+ZwQueryEaFile
+ZwQueryEvent
+ZwQueryFullAttributesFile
+ZwQueryInformationAtom
+;ZwQueryInformationEnlistment
+ZwQueryInformationFile
+ZwQueryInformationJobObject
+ZwQueryInformationPort
+ZwQueryInformationProcess
+;ZwQueryInformationResourceManager
+ZwQueryInformationThread
+ZwQueryInformationToken
+;ZwQueryInformationTransaction
+;ZwQueryInformationTransactionManager
+;ZwQueryInformationWorkerFactory
+ZwQueryInstallUILanguage
+ZwQueryIntervalProfile
+ZwQueryIoCompletion
+ZwQueryKey
+;ZwQueryLicenseValue
+ZwQueryMultipleValueKey
+ZwQueryMutant
+ZwQueryObject
+ZwQueryOpenSubKeys
+ZwQueryOpenSubKeysEx
+ZwQueryPerformanceCounter
+ZwQueryPortInformationProcess
+ZwQueryQuotaInformationFile
+ZwQuerySection
+ZwQuerySecurityObject
+ZwQuerySemaphore
+ZwQuerySymbolicLinkObject
+ZwQuerySystemEnvironmentValue
+ZwQuerySystemEnvironmentValueEx
+ZwQuerySystemInformation
+ZwQuerySystemTime
+ZwQueryTimer
+ZwQueryTimerResolution
+ZwQueryValueKey
+ZwQueryVirtualMemory
+ZwQueryVolumeInformationFile
+ZwQueueApcThread
+ZwRaiseException
+ZwRaiseHardError
+ZwReadFile
+ZwReadFileScatter
+;ZwReadOnlyEnlistment
+ZwReadRequestData
+ZwReadVirtualMemory
+;ZwRecoverEnlistment
+;ZwRecoverResourceManager
+;ZwRecoverTransactionManager
+;ZwRegisterProtocolAddressInformation
+ZwRegisterThreadTerminatePort
+;ZwReleaseCMFViewOwnership
+ZwReleaseKeyedEvent
+ZwReleaseMutant
+ZwReleaseSemaphore
+;ZwReleaseWorkerFactoryWorker
+ZwRemoveIoCompletion
+;ZwRemoveIoCompletionEx
+ZwRemoveProcessDebug
+ZwRenameKey
+;ZwRenameTransactionManager
+ZwReplaceKey
+;ZwReplacePartitionUnit
+ZwReplyPort
+ZwReplyWaitReceivePort
+ZwReplyWaitReceivePortEx
+ZwReplyWaitReplyPort
+ZwRequestDeviceWakeup
+ZwRequestPort
+ZwRequestWaitReplyPort
+ZwRequestWakeupLatency
+ZwResetEvent
+ZwResetWriteWatch
+ZwRestoreKey
+ZwResumeProcess
+ZwResumeThread
+;ZwRollbackComplete
+;ZwRollbackEnlistment
+;ZwRollbackTransaction
+;ZwRollforwardTransactionManager
+ZwSaveKey
+ZwSaveKeyEx
+ZwSaveMergedKeys
+ZwSecureConnectPort
+ZwSetBootEntryOrder
+ZwSetBootOptions
+ZwSetContextThread
+ZwSetDebugFilterState
+ZwSetDefaultHardErrorPort
+ZwSetDefaultLocale
+ZwSetDefaultUILanguage
+ZwSetDriverEntryOrder
+ZwSetEaFile
+ZwSetEvent
+ZwSetEventBoostPriority
+ZwSetHighEventPair
+ZwSetHighWaitLowEventPair
+ZwSetInformationDebugObject
+;ZwSetInformationEnlistment
+ZwSetInformationFile
+ZwSetInformationJobObject
+ZwSetInformationKey
+ZwSetInformationObject
+ZwSetInformationProcess
+;ZwSetInformationResourceManager
+ZwSetInformationThread
+ZwSetInformationToken
+;ZwSetInformationTransaction
+;ZwSetInformationTransactionManager
+;ZwSetInformationWorkerFactory
+ZwSetIntervalProfile
+ZwSetIoCompletion
+ZwSetLdtEntries
+ZwSetLowEventPair
+ZwSetLowWaitHighEventPair
+ZwSetQuotaInformationFile
+ZwSetSecurityObject
+ZwSetSystemEnvironmentValue
+ZwSetSystemEnvironmentValueEx
+ZwSetSystemInformation
+ZwSetSystemPowerState
+ZwSetSystemTime
+ZwSetThreadExecutionState
+ZwSetTimer
+ZwSetTimerResolution
+ZwSetUuidSeed
+ZwSetValueKey
+ZwSetVolumeInformationFile
+ZwShutdownSystem
+;ZwShutdownWorkerFactory
+ZwSignalAndWaitForSingleObject
+;ZwSinglePhaseReject
+ZwStartProfile
+ZwStopProfile
+ZwSuspendProcess
+ZwSuspendThread
+ZwSystemDebugControl
+ZwTerminateJobObject
+ZwTerminateProcess
+ZwTerminateThread
+ZwTestAlert
+;ZwThawRegistry
+;ZwThawTransactions
+;ZwTraceControl
+ZwTraceEvent
+ZwTranslateFilePath
+ZwUnloadDriver
+ZwUnloadKey
+ZwUnloadKey2
+ZwUnloadKeyEx
+ZwUnlockFile
+ZwUnlockVirtualMemory
+ZwUnmapViewOfSection
+ZwVdmControl
+ZwWaitForDebugEvent
+ZwWaitForKeyedEvent
+ZwWaitForMultipleObjects
+ZwWaitForMultipleObjects32
+ZwWaitForSingleObject
+;ZwWaitForWorkViaWorkerFactory
+ZwWaitHighEventPair
+ZwWaitLowEventPair
+;ZwWorkerFactoryWorkerReady
+ZwWriteFile
+ZwWriteFileGather
+ZwWriteRequestData
+ZwWriteVirtualMemory
+ZwYieldExecution
+;__C_specific_handler
+__chkstk
+__isascii
+__iscsym
+__iscsymf
+;__misaligned_access
+__toascii
+_atoi64
+_fltused
+_i64toa
+_i64tow
+_itoa
+_itow
+_lfind
+;_local_unwind
+_ltoa
+_ltow
+_memccpy
+_memicmp
+_setjmp
+_setjmpex
+_snprintf
+_snwprintf
+_splitpath
+_strcmpi
+_stricmp
+_strlwr
+_strnicmp
+_strupr
+;_swprintf
+_ui64toa
+_ui64tow
+_ultoa
+_ultow
+;_vscwprintf
+_vsnprintf
+_vsnwprintf
+;_vswprintf
+_wcsicmp
+_wcslwr
+_wcsnicmp
+;_wcstoui64
+_wcsupr
+_wtoi
+_wtoi64
+_wtol
+abs
+atan
+atoi
+atol
+bsearch
+ceil
+cos
+fabs
+floor
+isalnum
+isalpha
+iscntrl
+isdigit
+isgraph
+islower
+isprint
+ispunct
+isspace
+isupper
+iswalpha
+iswctype
+iswdigit
+iswlower
+iswspace
+iswxdigit
+isxdigit
+labs
+log
+longjmp
+mbstowcs
+memchr
+memcmp
+memcpy=memmove
+memmove
+memset
+pow
+qsort
+sin
+sprintf
+sqrt
+sscanf
+strcat
+strchr
+strcmp
+strcpy
+strcspn
+strlen
+strncat
+strncmp
+strncpy
+strpbrk
+strrchr
+strspn
+strstr
+strtol
+strtoul
+swprintf
+tan
+tolower
+toupper
+towlower
+towupper
+vDbgPrintEx
+vDbgPrintExWithPrefix
+vsprintf
+wcscat
+wcschr
+wcscmp
+wcscpy
+wcscspn
+wcslen
+wcsncat
+wcsncmp
+wcsncpy
+wcspbrk
+wcsrchr
+wcsspn
+wcsstr
+wcstol
+wcstombs
+wcstoul
+;
+; HACKS for ros
+CsrNewThread
--- /dev/null
+
+; $Id: ntdll.def 34404 2008-07-10 09:46:25Z fireball $
+;
+; ReactOS Operating System
+;
+LIBRARY ntdll.dll
+
+EXPORTS
+CsrAllocateCaptureBuffer
+CsrAllocateMessagePointer
+CsrCaptureMessageBuffer
+CsrCaptureMessageMultiUnicodeStringsInPlace
+CsrCaptureMessageString
+CsrCaptureTimeout
+CsrClientCallServer
+CsrClientConnectToServer
+CsrFreeCaptureBuffer
+CsrGetProcessId
+CsrIdentifyAlertableThread
+CsrNewThread
+CsrProbeForRead
+CsrProbeForWrite
+CsrSetPriorityClass
+DbgBreakPoint
+DbgPrint
+DbgPrintEx
+DbgPrompt
+DbgUiConvertStateChangeStructure
+DbgUiDebugActiveProcess
+DbgUiConnectToDbg
+DbgUiContinue
+DbgUiGetThreadDebugObject
+DbgUiIssueRemoteBreakin
+DbgUiRemoteBreakin
+DbgUiSetThreadDebugObject
+DbgUiStopDebugging
+DbgUiWaitStateChange
+DbgUserBreakPoint
+KiRaiseUserExceptionDispatcher
+KiUserApcDispatcher
+KiUserCallbackDispatcher
+KiUserExceptionDispatcher
+KiIntSystemCall
+KiFastSystemCallRet
+KiFastSystemCall
+LdrAccessResource
+LdrAddRefDll
+LdrDisableThreadCalloutsForDll
+LdrEnumResources
+LdrFindEntryForAddress
+LdrFindResourceDirectory_U
+LdrFindResource_U
+LdrGetDllHandle
+LdrGetProcedureAddress
+LdrInitializeThunk
+LdrLoadDll
+LdrProcessRelocationBlock
+LdrQueryImageFileExecutionOptions
+LdrQueryProcessModuleInformation
+LdrShutdownProcess
+LdrShutdownThread
+LdrUnloadDll
+LdrVerifyImageMatchesChecksum
+NlsAnsiCodePage DATA
+NlsMbCodePageTag DATA
+NlsMbOemCodePageTag DATA
+NtAcceptConnectPort
+NtAccessCheck
+NtAccessCheckAndAuditAlarm
+NtAddAtom
+NtAddBootEntry
+NtAdjustGroupsToken
+NtAdjustPrivilegesToken
+NtAlertResumeThread
+NtAlertThread
+NtAllocateLocallyUniqueId
+NtAllocateUuids
+NtAllocateVirtualMemory
+NtAssignProcessToJobObject
+NtCallbackReturn
+NtCancelIoFile
+NtCancelTimer
+NtClearEvent
+NtClose
+NtCloseObjectAuditAlarm
+NtCompareTokens
+NtCompleteConnectPort
+NtConnectPort
+NtContinue
+NtCreateDebugObject
+NtCreateDirectoryObject
+NtCreateEvent
+NtCreateEventPair
+NtCreateFile
+NtCreateIoCompletion
+NtCreateJobObject
+NtCreateKey
+NtCreateMailslotFile
+NtCreateMutant
+NtCreateNamedPipeFile
+NtCreatePagingFile
+NtCreatePort
+NtCreateProcess
+NtCreateProfile
+NtCreateSection
+NtCreateSemaphore
+NtCreateSymbolicLinkObject
+NtCreateThread
+NtCreateTimer
+NtCreateToken
+NtCreateWaitablePort
+NtCurrentTeb=_NtCurrentTeb
+NtDebugContinue
+NtDelayExecution
+NtDeleteAtom
+NtDeleteFile
+NtDeleteKey
+NtDeleteObjectAuditAlarm
+NtDeleteValueKey
+NtDeviceIoControlFile
+NtDisplayString
+NtDuplicateObject
+NtDuplicateToken
+NtEnumerateKey
+NtEnumerateValueKey
+NtExtendSection
+NtFindAtom
+NtFlushBuffersFile
+NtFlushInstructionCache
+NtFlushKey
+NtFlushVirtualMemory
+NtFlushWriteBuffer
+NtFreeVirtualMemory
+NtFsControlFile
+NtGetContextThread
+NtGetPlugPlayEvent
+NtImpersonateAnonymousToken
+NtImpersonateClientOfPort
+NtImpersonateThread
+NtInitializeRegistry
+NtIsProcessInJob
+NtListenPort
+NtLoadDriver
+NtLoadKey
+NtLoadKey2
+NtLockFile
+NtLockVirtualMemory
+NtMakeTemporaryObject
+NtMapViewOfSection
+NtNotifyChangeDirectoryFile
+NtNotifyChangeKey
+NtOpenDirectoryObject
+NtOpenEvent
+NtOpenEventPair
+NtOpenFile
+NtOpenIoCompletion
+NtOpenJobObject
+NtOpenKey
+NtOpenMutant
+NtOpenObjectAuditAlarm
+NtOpenProcess
+NtOpenProcessToken
+NtOpenSection
+NtOpenSemaphore
+NtOpenSymbolicLinkObject
+NtOpenThread
+NtOpenThreadToken
+NtOpenTimer
+NtPlugPlayControl
+NtPowerInformation
+NtPrivilegeCheck
+NtPrivilegedServiceAuditAlarm
+NtPrivilegeObjectAuditAlarm
+NtProtectVirtualMemory
+NtPulseEvent
+NtQueryAttributesFile
+NtQueryDebugFilterState
+NtQueryDefaultLocale
+NtQueryDefaultUILanguage
+NtQueryDirectoryFile
+NtQueryDirectoryObject
+NtQueryEaFile
+NtQueryEvent
+NtQueryFullAttributesFile
+NtQueryInformationAtom
+NtQueryInformationFile
+NtQueryInformationJobObject
+NtQueryInformationPort
+NtQueryInformationProcess
+NtQueryInformationThread
+NtQueryInformationToken
+NtQueryInstallUILanguage
+NtQueryIntervalProfile
+NtQueryIoCompletion
+NtQueryKey
+NtQueryMultipleValueKey
+NtQueryMutant
+NtQueryObject
+NtQueryPerformanceCounter
+NtQuerySection
+NtQuerySecurityObject
+NtQuerySemaphore
+NtQuerySymbolicLinkObject
+NtQuerySystemEnvironmentValue
+NtQuerySystemInformation
+NtQuerySystemTime
+NtQueryTimer
+NtQueryTimerResolution
+NtQueryValueKey
+NtQueryVirtualMemory
+NtQueryVolumeInformationFile
+NtQueueApcThread
+NtRaiseException
+NtRaiseHardError
+NtReadFile
+NtReadFileScatter
+NtReadRequestData
+NtReadVirtualMemory
+NtRegisterThreadTerminatePort
+NtReleaseMutant
+NtReleaseSemaphore
+NtRemoveIoCompletion
+NtReplaceKey
+NtReplyPort
+NtReplyWaitReceivePort
+NtReplyWaitReceivePortEx
+NtReplyWaitReplyPort
+NtRequestPort
+NtRequestWaitReplyPort
+NtResetEvent
+NtRestoreKey
+NtResumeProcess
+NtResumeThread
+NtSaveKey
+NtSecureConnectPort
+NtSetContextThread
+NtSetDebugFilterState
+NtSetDefaultHardErrorPort
+NtSetDefaultLocale
+NtSetDefaultUILanguage
+NtSetEaFile
+NtSetEvent
+NtSetHighEventPair
+NtSetHighWaitLowEventPair
+NtSetInformationDebugObject
+NtSetInformationFile
+NtSetInformationJobObject
+NtSetInformationKey
+NtSetInformationObject
+NtSetInformationProcess
+NtSetInformationThread
+NtSetInformationToken
+NtSetIntervalProfile
+NtSetIoCompletion
+NtSetLdtEntries
+NtSetLowEventPair
+NtSetLowWaitHighEventPair
+NtSetSecurityObject
+NtSetSystemEnvironmentValue
+NtSetSystemInformation
+NtSetSystemPowerState
+NtSetSystemTime
+NtSetTimer
+NtSetTimerResolution
+NtSetUuidSeed
+NtSetValueKey
+NtSetVolumeInformationFile
+NtShutdownSystem
+NtSignalAndWaitForSingleObject
+NtStartProfile
+NtStopProfile
+NtSuspendProcess
+NtSuspendThread
+NtSystemDebugControl
+NtTerminateJobObject
+NtTerminateProcess
+NtTerminateThread
+NtTestAlert
+NtUnloadDriver
+NtUnloadKey
+NtUnlockFile
+NtUnlockVirtualMemory
+NtUnmapViewOfSection
+NtVdmControl
+NtWaitForDebugEvent
+NtWaitForMultipleObjects
+NtWaitForSingleObject
+NtWaitHighEventPair
+NtWaitLowEventPair
+NtWriteFile
+NtWriteFileGather
+NtWriteRequestData
+NtWriteVirtualMemory
+NtYieldExecution
+NtGetCurrentProcessorNumber
+;PfxFindPrefix
+;PfxInitialize
+;PfxInsertPrefix
+;PfxRemovePrefix
+;PropertyLengthAsVariant
+;RestoreEm87Context
+;RtlAbortRXact
+RtlAbsoluteToSelfRelativeSD
+RtlAcquirePebLock
+RtlAcquireResourceExclusive
+RtlAcquireResourceShared
+RtlAcquireSRWLockExclusive
+RtlAcquireSRWLockShared
+RtlAddAccessAllowedAce
+RtlAddAccessAllowedAceEx
+RtlAddAccessAllowedObjectAce
+RtlAddAccessDeniedAce
+RtlAddAccessDeniedAceEx
+RtlAddAccessDeniedObjectAce
+RtlAddAce
+;RtlAddActionToRXact
+RtlAddAtomToAtomTable
+;RtlAddAttributeActionToRXact
+RtlAddAuditAccessAce
+RtlAddAuditAccessAceEx
+RtlAddAuditAccessObjectAce
+;RtlAddCompoundAce
+RtlAddMandatoryAce
+RtlAddRange
+RtlAddVectoredExceptionHandler
+RtlAdjustPrivilege
+RtlAllocateAndInitializeSid
+RtlAllocateHandle
+RtlAllocateHeap
+RtlAnsiCharToUnicodeChar
+RtlAnsiStringToUnicodeSize=RtlxAnsiStringToUnicodeSize
+RtlAnsiStringToUnicodeString
+RtlAppendAsciizToString
+RtlAppendStringToString
+RtlAppendUnicodeStringToString
+RtlAppendUnicodeToString
+;RtlApplyRXact
+;RtlApplyRXactNoFlush
+RtlAreAllAccessesGranted
+RtlAreAnyAccessesGranted
+RtlAreBitsClear
+RtlAreBitsSet
+RtlAssert
+RtlCaptureStackBackTrace
+RtlCharToInteger
+RtlCheckRegistryKey
+RtlClearAllBits
+RtlClearBits
+RtlCompactHeap
+RtlCompareMemory
+RtlCompareMemoryUlong
+RtlCompareString
+RtlCompareUnicodeString
+RtlCompressBuffer
+RtlComputeCrc32
+;RtlConsoleMultiByteToUnicodeN
+RtlConvertExclusiveToShared
+RtlConvertLongToLargeInteger
+RtlConvertSharedToExclusive
+RtlConvertSidToUnicodeString
+;RtlConvertUiListToApiList
+RtlConvertUlongToLargeInteger
+RtlCopyLuid
+RtlCopyLuidAndAttributesArray
+RtlCopyRangeList
+RtlCopySecurityDescriptor
+RtlCopySid
+RtlCopySidAndAttributesArray
+RtlCopyString
+RtlCopyUnicodeString
+RtlCreateAcl
+;RtlCreateAndSetSD
+RtlCreateAtomTable
+RtlCreateEnvironment
+RtlCreateHeap
+RtlCreateProcessParameters
+RtlCreateQueryDebugBuffer
+RtlCreateRegistryKey
+RtlCreateSecurityDescriptor
+RtlCreateTagHeap
+RtlCreateTimer
+RtlCreateTimerQueue
+RtlCreateUnicodeString
+RtlCreateUnicodeStringFromAsciiz
+RtlCreateUserProcess
+;RtlCreateUserSecurityObject
+RtlCreateUserThread
+RtlCustomCPToUnicodeN
+RtlCutoverTimeToSystemTime
+RtlDeNormalizeProcessParams
+RtlDecodePointer=RtlEncodePointer
+RtlDecompressBuffer
+RtlDecompressFragment
+RtlDelete
+RtlDeleteAce
+RtlDeleteAtomFromAtomTable
+RtlDeleteCriticalSection
+RtlDeleteElementGenericTable
+RtlDeleteElementGenericTableAvl
+RtlDeleteNoSplay
+RtlDeleteOwnersRanges
+RtlDeleteRange
+RtlDeleteRegistryValue
+RtlDeleteResource
+RtlDeleteSecurityObject
+RtlDeleteTimer
+RtlDeleteTimerQueue
+RtlDeleteTimerQueueEx
+RtlDeregisterWait
+RtlDeregisterWaitEx
+RtlDestroyAtomTable
+RtlDestroyEnvironment
+RtlDestroyHandleTable
+RtlDestroyHeap
+RtlDestroyProcessParameters
+RtlDestroyQueryDebugBuffer
+RtlDetermineDosPathNameType_U
+RtlDllShutdownInProgress
+RtlDoesFileExists_U
+RtlDosPathNameToNtPathName_U
+RtlDosPathNameToRelativeNtPathName_U
+RtlDosSearchPath_U
+RtlDowncaseUnicodeChar
+RtlDowncaseUnicodeString
+RtlDumpResource
+RtlDuplicateUnicodeString
+RtlEmptyAtomTable
+RtlEncodePointer
+RtlEnlargedIntegerMultiply
+RtlEnlargedUnsignedDivide
+RtlEnlargedUnsignedMultiply
+RtlEnterCriticalSection
+RtlEnumProcessHeaps
+RtlEnumerateGenericTable
+RtlEnumerateGenericTableAvl
+RtlEnumerateGenericTableLikeADirectory
+RtlEnumerateGenericTableWithoutSplaying
+RtlEnumerateGenericTableWithoutSplayingAvl
+RtlEqualComputerName
+RtlEqualDomainName
+RtlEqualLuid
+RtlEqualPrefixSid
+RtlEqualSid
+RtlEqualString
+RtlEqualUnicodeString
+RtlEraseUnicodeString
+RtlExitUserThread
+RtlExpandEnvironmentStrings_U
+RtlExtendHeap
+RtlExtendedIntegerMultiply
+RtlExtendedLargeIntegerDivide
+RtlExtendedMagicDivide
+RtlFillMemory
+RtlFillMemoryUlong
+RtlFindClearBits
+RtlFindClearBitsAndSet
+RtlFindClearRuns
+RtlFindLastBackwardRunClear
+RtlFindLeastSignificantBit
+RtlFindLongestRunClear
+RtlFindLongestRunSet
+RtlFindMessage
+RtlFindMostSignificantBit
+RtlFindNextForwardRunClear
+RtlFindRange
+RtlFindSetBits
+RtlFindSetBitsAndClear
+RtlFirstFreeAce
+RtlFormatCurrentUserKeyPath
+RtlFormatMessage
+RtlFreeAnsiString
+RtlFreeHandle
+RtlFreeHeap
+RtlFreeOemString
+RtlFreeRangeList
+RtlFreeSid
+RtlFreeUnicodeString
+RtlFreeUserThreadStack
+RtlGUIDFromString
+RtlGenerate8dot3Name
+RtlGetAce
+;RtlGetCallersAddress
+RtlGetCompressionWorkSpaceSize
+RtlGetControlSecurityDescriptor
+RtlGetCurrentDirectory_U
+RtlGetDaclSecurityDescriptor
+RtlGetElementGenericTable
+RtlGetElementGenericTableAvl
+RtlGetFirstRange
+RtlGetFullPathName_U
+RtlGetGroupSecurityDescriptor
+RtlGetLastNtStatus
+RtlGetLastWin32Error
+RtlGetLongestNtPathLength
+RtlGetNextRange
+RtlGetNtGlobalFlags
+RtlGetNtProductType
+RtlGetNtVersionNumbers
+RtlGetOwnerSecurityDescriptor
+RtlGetProcessHeaps
+RtlGetSaclSecurityDescriptor
+RtlGetSecurityDescriptorRMControl
+RtlGetSetBootStatusData
+RtlGetUserInfoHeap
+RtlGetVersion
+RtlHashUnicodeString
+RtlIdentifierAuthoritySid
+RtlImageDirectoryEntryToData
+RtlImageNtHeader
+RtlImageRvaToSection
+RtlImageRvaToVa
+RtlImpersonateSelf
+RtlInitAnsiString
+RtlInitCodePageTable
+RtlInitNlsTables
+RtlInitString
+RtlInitUnicodeString
+RtlInitUnicodeStringEx
+;RtlInitializeAtomPackage
+RtlInitializeBitMap
+RtlInitializeConditionVariable
+RtlInitializeContext
+RtlInitializeCriticalSection
+RtlInitializeCriticalSectionAndSpinCount
+RtlInitializeGenericTable
+RtlInitializeGenericTableAvl
+RtlInitializeHandleTable
+RtlInitializeRangeList
+RtlInitializeResource
+;RtlInitializeRXact
+RtlInitializeSid
+RtlInitializeSRWLock
+RtlInsertElementGenericTable
+RtlInsertElementGenericTableAvl
+RtlInsertElementGenericTableFull
+RtlInsertElementGenericTableFullAvl
+RtlInt64ToUnicodeString
+RtlIntegerToChar
+RtlIntegerToUnicodeString
+RtlInvertRangeList
+RtlIpv4AddressToStringA
+RtlIpv4AddressToStringExA
+RtlIpv4AddressToStringExW
+RtlIpv4AddressToStringW
+RtlIpv4StringToAddressA
+RtlIpv4StringToAddressExA
+RtlIpv4StringToAddressExW
+RtlIpv4StringToAddressW
+RtlIpv6AddressToStringA
+RtlIpv6AddressToStringExA
+RtlIpv6AddressToStringExW
+RtlIpv6AddressToStringW
+RtlIpv6StringToAddressA
+RtlIpv6StringToAddressExA
+RtlIpv6StringToAddressExW
+RtlIpv6StringToAddressW
+RtlIsDosDeviceName_U
+RtlIsGenericTableEmpty
+RtlIsGenericTableEmptyAvl
+RtlIsNameLegalDOS8Dot3
+RtlIsRangeAvailable
+RtlIsTextUnicode
+RtlIsValidHandle
+RtlIsValidIndexHandle
+RtlLargeIntegerAdd
+RtlLargeIntegerArithmeticShift
+RtlLargeIntegerDivide
+RtlLargeIntegerNegate
+RtlLargeIntegerShiftLeft
+RtlLargeIntegerShiftRight
+RtlLargeIntegerSubtract
+RtlLargeIntegerToChar
+RtlLeaveCriticalSection
+RtlLengthRequiredSid
+RtlLengthSecurityDescriptor
+RtlLengthSid
+RtlLocalTimeToSystemTime
+RtlLockBootStatusData
+RtlLockHeap
+RtlLookupAtomInAtomTable
+RtlLookupElementGenericTable
+RtlLookupElementGenericTableAvl
+RtlLookupElementGenericTableFull
+RtlLookupElementGenericTableFullAvl
+RtlMakeSelfRelativeSD
+RtlMapGenericMask
+RtlMergeRangeLists
+RtlMoveMemory
+RtlMultiByteToUnicodeN
+RtlMultiByteToUnicodeSize
+;RtlNewInstanceSecurityObject
+;RtlNewSecurityGrantedAccess
+RtlNewSecurityObject
+RtlNormalizeProcessParams
+RtlNtPathNameToDosPathName
+RtlNtStatusToDosError
+RtlNumberGenericTableElements
+RtlNumberGenericTableElementsAvl
+RtlNumberOfClearBits
+RtlNumberOfSetBits
+RtlOemStringToUnicodeSize=RtlxOemStringToUnicodeSize
+RtlOemStringToUnicodeString
+RtlOemToUnicodeN
+RtlOpenCurrentUser
+RtlPcToFileHeader
+RtlPinAtomInAtomTable
+RtlPrefixString
+RtlPrefixUnicodeString
+;RtlProtectHeap
+RtlQueryAtomInAtomTable
+RtlQueryEnvironmentVariable_U
+RtlQueryInformationAcl
+;RtlQueryProcessBackTraceInformation
+RtlQueryProcessDebugInformation
+;RtlQueryProcessHeapInformation
+;RtlQueryProcessLockInformation
+RtlQueryRegistryValues
+RtlQuerySecurityObject
+RtlQueryTagHeap
+RtlQueryTimeZoneInformation
+RtlQueueWorkItem
+RtlRaiseException
+RtlRaiseStatus
+RtlRandom
+RtlRandomEx
+RtlReAllocateHeap
+RtlRealPredecessor
+RtlRealSuccessor
+RtlRegisterWait
+RtlReleasePebLock
+RtlReleaseRelativeName
+RtlReleaseResource
+RtlReleaseSRWLockExclusive
+RtlReleaseSRWLockShared
+;RtlRemoteCall
+RtlRemoveVectoredExceptionHandler
+RtlResetRtlTranslations
+RtlRestoreLastWin32Error=RtlSetLastWin32Error
+RtlRunDecodeUnicodeString
+RtlRunEncodeUnicodeString
+RtlSecondsSince1970ToTime
+RtlSecondsSince1980ToTime
+RtlSelfRelativeToAbsoluteSD
+RtlSelfRelativeToAbsoluteSD2
+RtlSetAllBits
+RtlSetAttributesSecurityDescriptor
+RtlSetBits
+RtlSetControlSecurityDescriptor
+RtlSetCriticalSectionSpinCount
+RtlSetCurrentDirectory_U
+RtlSetCurrentEnvironment
+RtlSetDaclSecurityDescriptor
+RtlSetEnvironmentVariable
+RtlSetGroupSecurityDescriptor
+RtlSetInformationAcl
+RtlSetLastWin32Error
+RtlSetLastWin32ErrorAndNtStatusFromNtStatus
+RtlSetOwnerSecurityDescriptor
+RtlSetProcessIsCritical
+RtlSetSaclSecurityDescriptor
+RtlSetSecurityDescriptorRMControl
+RtlSetSecurityObject
+RtlSetTimeZoneInformation
+;RtlSetUnicodeCallouts
+RtlSetUserFlagsHeap
+RtlSetUserValueHeap
+RtlSizeHeap
+RtlSleepConditionVariableCS
+RtlSleepConditionVariableSRW
+RtlSplay
+;RtlStartRXact
+RtlStringFromGUID
+RtlSubAuthorityCountSid
+RtlSubAuthoritySid
+RtlSubtreePredecessor
+RtlSubtreeSuccessor
+RtlSystemTimeToLocalTime
+RtlTimeFieldsToTime
+RtlTimeToElapsedTimeFields
+RtlTimeToSecondsSince1970
+RtlTimeToSecondsSince1980
+RtlTimeToTimeFields
+RtlTryEnterCriticalSection
+@RtlUlongByteSwap
+@RtlUlonglongByteSwap
+RtlUnhandledExceptionFilter
+RtlUnicodeStringToAnsiSize=RtlxUnicodeStringToAnsiSize
+RtlUnicodeStringToAnsiString
+RtlUnicodeStringToCountedOemString
+RtlUnicodeStringToInteger
+RtlUnicodeStringToOemSize=RtlxUnicodeStringToOemSize
+RtlUnicodeStringToOemString
+RtlUnicodeToCustomCPN
+RtlUnicodeToMultiByteN
+RtlUnicodeToMultiByteSize
+RtlUnicodeToOemN
+RtlUniform
+RtlUnlockBootStatusData
+RtlUnlockHeap
+RtlUnwind
+RtlUpcaseUnicodeChar
+RtlUpcaseUnicodeString
+RtlUpcaseUnicodeStringToAnsiString
+RtlUpcaseUnicodeStringToCountedOemString
+RtlUpcaseUnicodeStringToOemString
+RtlUpcaseUnicodeToCustomCPN
+RtlUpcaseUnicodeToMultiByteN
+RtlUpcaseUnicodeToOemN
+RtlUpdateTimer
+RtlUpperChar
+RtlUpperString
+RtlUsageHeap
+@RtlUshortByteSwap
+RtlValidAcl
+RtlValidRelativeSecurityDescriptor
+RtlValidSecurityDescriptor
+RtlValidSid
+RtlValidateHeap
+RtlValidateProcessHeaps
+RtlValidateUnicodeString
+RtlVerifyVersionInfo
+;RtlWalkHeap
+RtlWakeAllConditionVariable
+RtlWakeConditionVariable
+RtlWriteRegistryValue
+;RtlZeroHeap
+RtlZeroMemory
+RtlpEnsureBufferSize
+RtlpNtCreateKey
+RtlpNtEnumerateSubKey
+RtlpNtMakeTemporaryKey
+RtlpNtOpenKey
+RtlpNtQueryValueKey
+RtlpNtSetValueKey
+RtlpUnWaitCriticalSection
+RtlpWaitForCriticalSection
+RtlxAnsiStringToUnicodeSize
+RtlxOemStringToUnicodeSize
+RtlxUnicodeStringToAnsiSize
+RtlxUnicodeStringToOemSize
+;SaveEm87Context
+VerSetConditionMask
+ZwAcceptConnectPort
+ZwAccessCheck
+ZwAccessCheckAndAuditAlarm
+ZwAddAtom
+ZwAdjustGroupsToken
+ZwAdjustPrivilegesToken
+ZwAlertResumeThread
+ZwAlertThread
+ZwAllocateLocallyUniqueId
+ZwAllocateUuids
+ZwAllocateVirtualMemory
+ZwAssignProcessToJobObject
+ZwCallbackReturn
+ZwCancelIoFile
+ZwCancelTimer
+ZwClearEvent
+ZwClose
+ZwCloseObjectAuditAlarm
+ZwCompareTokens
+ZwCompleteConnectPort
+ZwConnectPort
+ZwContinue
+ZwCreateDebugObject
+ZwCreateDirectoryObject
+ZwCreateEvent
+ZwCreateEventPair
+ZwCreateFile
+ZwCreateIoCompletion
+ZwCreateJobObject
+ZwCreateKey
+ZwCreateMailslotFile
+ZwCreateMutant
+ZwCreateNamedPipeFile
+ZwCreatePagingFile
+ZwCreatePort
+ZwCreateProcess
+ZwCreateProfile
+ZwCreateSection
+ZwCreateSemaphore
+ZwCreateSymbolicLinkObject
+ZwCreateThread
+ZwCreateTimer
+ZwCreateToken
+ZwCreateWaitablePort
+ZwDebugContinue
+ZwDelayExecution
+ZwDeleteAtom
+ZwDeleteFile
+ZwDeleteKey
+ZwDeleteObjectAuditAlarm
+ZwDeleteValueKey
+ZwDeviceIoControlFile
+ZwDisplayString
+ZwDuplicateObject
+ZwDuplicateToken
+ZwEnumerateKey
+ZwEnumerateValueKey
+ZwExtendSection
+ZwFindAtom
+ZwFlushBuffersFile
+ZwFlushInstructionCache
+ZwFlushKey
+ZwFlushVirtualMemory
+ZwFlushWriteBuffer
+ZwFreeVirtualMemory
+ZwFsControlFile
+ZwGetContextThread
+ZwGetPlugPlayEvent
+ZwImpersonateAnonymousToken
+ZwImpersonateClientOfPort
+ZwImpersonateThread
+ZwInitializeRegistry
+ZwIsProcessInJob
+ZwListenPort
+ZwLoadDriver
+ZwLoadKey
+ZwLoadKey2
+ZwLockFile
+ZwLockVirtualMemory
+ZwMakeTemporaryObject
+ZwMapViewOfSection
+ZwNotifyChangeDirectoryFile
+ZwNotifyChangeKey
+ZwOpenDirectoryObject
+ZwOpenEvent
+ZwOpenEventPair
+ZwOpenFile
+ZwOpenIoCompletion
+ZwOpenJobObject
+ZwOpenKey
+ZwOpenMutant
+ZwOpenObjectAuditAlarm
+ZwOpenProcess
+ZwOpenProcessToken
+ZwOpenSection
+ZwOpenSemaphore
+ZwOpenSymbolicLinkObject
+ZwOpenThread
+ZwOpenThreadToken
+ZwOpenTimer
+ZwPlugPlayControl
+ZwPowerInformation
+ZwPrivilegeCheck
+ZwPrivilegedServiceAuditAlarm
+ZwPrivilegeObjectAuditAlarm
+ZwProtectVirtualMemory
+ZwPulseEvent
+ZwQueryAttributesFile
+ZwQueryDebugFilterState
+ZwQueryDefaultLocale
+ZwQueryDefaultUILanguage
+ZwQueryDirectoryFile
+ZwQueryDirectoryObject
+ZwQueryEaFile
+ZwQueryEvent
+ZwQueryFullAttributesFile
+ZwQueryInformationAtom
+ZwQueryInformationFile
+ZwQueryInformationJobObject
+ZwQueryInformationPort
+ZwQueryInformationProcess
+ZwQueryInformationThread
+ZwQueryInformationToken
+ZwQueryInstallUILanguage
+ZwQueryIntervalProfile
+ZwQueryIoCompletion
+ZwQueryKey
+ZwQueryMultipleValueKey
+ZwQueryMutant
+ZwQueryObject
+ZwQueryPerformanceCounter
+ZwQuerySection
+ZwQuerySecurityObject
+ZwQuerySemaphore
+ZwQuerySymbolicLinkObject
+ZwQuerySystemEnvironmentValue
+ZwQuerySystemInformation
+ZwQuerySystemTime
+ZwQueryTimer
+ZwQueryTimerResolution
+ZwQueryValueKey
+ZwQueryVirtualMemory
+ZwQueryVolumeInformationFile
+ZwQueueApcThread
+ZwRaiseException
+ZwRaiseHardError
+ZwReadFile
+ZwReadFileScatter
+ZwReadRequestData
+ZwReadVirtualMemory
+ZwRegisterThreadTerminatePort
+ZwReleaseMutant
+ZwReleaseSemaphore
+ZwRemoveIoCompletion
+ZwReplaceKey
+ZwReplyPort
+ZwReplyWaitReceivePort
+ZwReplyWaitReceivePortEx
+ZwReplyWaitReplyPort
+ZwRequestPort
+ZwRequestWaitReplyPort
+ZwResetEvent
+ZwRestoreKey
+ZwResumeProcess
+ZwResumeThread
+ZwSaveKey
+ZwSecureConnectPort
+ZwSetContextThread
+ZwSetDebugFilterState
+ZwSetDefaultHardErrorPort
+ZwSetDefaultLocale
+ZwSetDefaultUILanguage
+ZwSetEaFile
+ZwSetEvent
+ZwSetHighEventPair
+ZwSetHighWaitLowEventPair
+ZwSetInformationDebugObject
+ZwSetInformationFile
+ZwSetInformationJobObject
+ZwSetInformationKey
+ZwSetInformationObject
+ZwSetInformationProcess
+ZwSetInformationThread
+ZwSetInformationToken
+ZwSetIntervalProfile
+ZwSetIoCompletion
+ZwSetLdtEntries
+ZwSetLowEventPair
+ZwSetLowWaitHighEventPair
+ZwSetSecurityObject
+ZwSetSystemEnvironmentValue
+ZwSetSystemInformation
+ZwSetSystemPowerState
+ZwSetSystemTime
+ZwSetTimer
+ZwSetTimerResolution
+ZwSetUuidSeed
+ZwSetValueKey
+ZwSetVolumeInformationFile
+ZwShutdownSystem
+ZwSignalAndWaitForSingleObject
+ZwStartProfile
+ZwStopProfile
+ZwSuspendProcess
+ZwSuspendThread
+ZwSystemDebugControl
+ZwTerminateJobObject
+ZwTerminateProcess
+ZwTerminateThread
+ZwTestAlert
+ZwUnloadDriver
+ZwUnloadKey
+ZwUnlockFile
+ZwUnlockVirtualMemory
+ZwUnmapViewOfSection
+ZwVdmControl
+ZwWaitForDebugEvent
+ZwWaitForMultipleObjects
+ZwWaitForSingleObject
+ZwWaitHighEventPair
+ZwWaitLowEventPair
+ZwWriteFile
+ZwWriteFileGather
+ZwWriteRequestData
+ZwWriteVirtualMemory
+ZwYieldExecution
+__isascii
+__iscsym
+__iscsymf
+__toascii
+_i64toa
+_i64tow
+_itoa
+_itow
+_lfind
+_ltoa
+_ltow
+_memccpy
+_memicmp
+_snprintf
+_snwprintf
+_splitpath
+_strcmpi
+_stricmp
+_strlwr
+_strnicmp
+_strupr
+_tolower
+_toupper
+_ui64toa
+_ui64tow
+_ultoa
+_ultow
+_vsnprintf
+_vsnwprintf
+_wcsicmp
+_wcslwr
+_wcsnicmp
+_wcsupr
+_wtoi
+_wtoi64
+_wtol
+abs
+atoi
+atol
+bsearch
+isalnum
+isalpha
+iscntrl
+isdigit
+isgraph
+islower
+isprint
+ispunct
+isspace
+isupper
+iswalpha
+iswctype
+iswdigit
+iswlower
+iswspace
+iswxdigit
+isxdigit
+labs
+mbstowcs
+memchr
+memcmp
+memcpy=memmove
+memmove
+memset
+qsort
+sprintf
+sscanf
+strcat
+strchr
+strcmp
+strcpy
+strcspn
+strlen
+strncat
+strncmp
+strncpy
+strpbrk
+strrchr
+strspn
+strstr
+strtol
+strtoul
+strtoull
+swprintf
+tolower
+toupper
+towlower
+towupper
+vsprintf
+vDbgPrintExWithPrefix
+wcscat
+wcschr
+wcscmp
+wcscpy
+wcscspn
+wcslen
+wcsncat
+wcsncmp
+wcsncpy
+wcspbrk
+wcsrchr
+wcsspn
+wcsstr
+wcstol
+wcstombs
+wcstoul
+; EOF
--- /dev/null
+;
+; ReactOS Operating System
+;
+LIBRARY ntdll.dll
+
+EXPORTS
+CsrAllocateCaptureBuffer@8
+CsrAllocateMessagePointer@12
+CsrCaptureMessageBuffer@16
+CsrCaptureMessageMultiUnicodeStringsInPlace@12
+CsrCaptureMessageString@20
+CsrCaptureTimeout@8
+CsrClientCallServer@16
+CsrClientConnectToServer@20
+CsrFreeCaptureBuffer@4
+CsrGetProcessId@0
+CsrIdentifyAlertableThread@0
+CsrNewThread@0
+CsrProbeForRead@12
+CsrProbeForWrite@12
+CsrSetPriorityClass@8
+DbgBreakPoint@0
+DbgPrint
+DbgPrintEx
+DbgPrintReturnControlC
+DbgPrompt@12
+DbgQueryDebugFilterState@8
+DbgSetDebugFilterState@12
+DbgUiConnectToDbg@0
+DbgUiContinue@8
+DbgUiConvertStateChangeStructure@8
+DbgUiDebugActiveProcess@4
+DbgUiGetThreadDebugObject@0
+DbgUiIssueRemoteBreakin@4
+DbgUiRemoteBreakin@0
+DbgUiSetThreadDebugObject@4
+DbgUiStopDebugging@4
+DbgUiWaitStateChange@8
+DbgUserBreakPoint@0
+;EtwControlTraceA
+;EtwControlTraceW
+;EtwControlTraceW
+;EtwCreateTraceInstanceId
+;EtwEnableTrace
+;EtwEnumerateTraceGuids
+;EtwFlushTraceA
+;EtwFlushTraceW
+;EtwGetTraceEnableFlags
+;EtwGetTraceEnableLevel
+;EtwGetTraceLoggerHandle
+;EtwNotificationRegistrationA
+;EtwNotificationRegistrationW
+;EtwQueryAllTracesA
+;EtwQueryAllTracesW
+;EtwQueryTraceA
+;EtwQueryTraceW
+;EtwReceiveNotificationsA
+;EtwReceiveNotificationsW
+;EtwRegisterTraceGuidsA
+;EtwRegisterTraceGuidsW
+;EtwStartTraceA
+;EtwStartTraceW
+;EtwStopTraceA
+;EtwStopTraceW
+;EtwTraceEvent
+;EtwTraceEventInstance
+;EtwTraceMessage
+;EtwTraceMessageVa
+;EtwUnregisterTraceGuids
+;EtwUpdateTraceA
+;EtwUpdateTraceW
+;EtwpGetTraceBuffer
+;EtwpSetHWConfigFunction
+;ExpInterlockedPopEntrySListEnd
+;ExpInterlockedPopEntrySListFault
+;ExpInterlockedPopEntrySListResume
+KiFastSystemCall@0
+KiFastSystemCallRet@0
+KiIntSystemCall@0
+KiRaiseUserExceptionDispatcher@0
+KiUserApcDispatcher@16
+KiUserCallbackDispatcher@12
+KiUserExceptionDispatcher@8
+;LdrAccessOutOfProcessResource
+LdrAccessResource@16
+LdrAddRefDll@8
+;LdrAlternateResourcesEnabled
+;LdrCreateOutOfProcessImage
+;LdrDestroyOutOfProcessImage
+LdrDisableThreadCalloutsForDll@4
+LdrEnumResources@20
+LdrFindEntryForAddress@8
+;LdrEnumerateLoadedModules
+;LdrFindCreateProcessManifest
+LdrFindEntryForAddress@8
+LdrFindResourceDirectory_U@16
+;LdrFindResourceEx_U
+LdrFindResource_U@16
+LdrGetDllHandle@16
+;LdrFlushAlternateResourceModules
+LdrGetDllHandle@16
+;LdrGetDllHandleEx
+LdrGetProcedureAddress@16
+;LdrHotPatchRoutine
+;LdrInitShimEngineDynamic
+LdrInitializeThunk@16
+;LdrLoadAlternateResourceModule
+LdrLoadDll@16
+LdrLockLoaderLock@12
+;LdrOpenImageFileOptionsKey
+LdrProcessRelocationBlock@16
+LdrQueryImageFileExecutionOptions@24
+;LdrQueryImageFileExecutionOptionsEx
+;LdrQueryImageFileKeyOption
+LdrQueryProcessModuleInformation@12
+;LdrSetAppCompatDllRedirectionCallback
+;LdrSetDllManifestProber
+LdrShutdownProcess@0
+LdrShutdownThread@0
+LdrUnloadAlternateResourceModule@4
+LdrUnloadDll@4
+LdrUnlockLoaderLock@8
+LdrVerifyImageMatchesChecksum@16
+NlsAnsiCodePage DATA
+NlsMbCodePageTag DATA
+NlsMbOemCodePageTag DATA
+NtAcceptConnectPort@24
+NtAccessCheck@32
+NtAccessCheckAndAuditAlarm@44
+NtAccessCheckByType@44
+NtAccessCheckByTypeAndAuditAlarm@64
+NtAccessCheckByTypeResultList@44
+NtAccessCheckByTypeResultListAndAuditAlarm@64
+NtAccessCheckByTypeResultListAndAuditAlarmByHandle@68
+NtAddAtom@12
+NtAddBootEntry@8
+NtAddDriverEntry@8
+NtAdjustGroupsToken@24
+NtAdjustPrivilegesToken@24
+NtAlertResumeThread@8
+NtAlertThread@4
+NtAllocateLocallyUniqueId@4
+NtAllocateUserPhysicalPages@12
+NtAllocateUuids@16
+NtAllocateVirtualMemory@24
+NtApphelpCacheControl@8
+NtAreMappedFilesTheSame@8
+NtAssignProcessToJobObject@8
+NtCallbackReturn@12
+NtCancelDeviceWakeupRequest@4
+NtCancelIoFile@8
+NtCancelTimer@8
+NtClearEvent@4
+NtClose@4
+NtCloseObjectAuditAlarm@12
+NtCompactKeys@8
+NtCompareTokens@12
+NtCompleteConnectPort@4
+NtCompressKey@4
+NtConnectPort@32
+NtContinue@8
+NtCreateDebugObject@16
+NtCreateDirectoryObject@12
+NtCreateEvent@20
+NtCreateEventPair@12
+NtCreateFile@44
+NtCreateIoCompletion@16
+NtCreateJobObject@12
+NtCreateJobSet@12
+NtCreateKey@28
+NtCreateKeyedEvent@16
+NtCreateMailslotFile@32
+NtCreateMutant@16
+NtCreateNamedPipeFile@56
+NtCreatePagingFile@16
+NtCreatePort@20
+NtCreateProcess@32
+NtCreateProcessEx@36
+NtCreateProfile@36
+NtCreateSection@28
+NtCreateSemaphore@20
+NtCreateSymbolicLinkObject@16
+NtCreateThread@32
+NtCreateTimer@16
+NtCreateToken@52
+NtCreateWaitablePort@20
+NtCurrentTeb=_NtCurrentTeb@0
+NtDebugActiveProcess@8
+NtDebugContinue@12
+NtDelayExecution@8
+NtDeleteAtom@4
+NtDeleteBootEntry@4
+NtDeleteDriverEntry@4
+NtDeleteFile@4
+NtDeleteKey@4
+NtDeleteObjectAuditAlarm@12
+NtDeleteValueKey@8
+NtDeviceIoControlFile@40
+NtDisplayString@4
+NtDuplicateObject@28
+NtDuplicateToken@24
+NtEnumerateBootEntries@8
+NtEnumerateDriverEntries@8
+NtEnumerateKey@24
+NtEnumerateSystemEnvironmentValuesEx@12
+NtEnumerateValueKey@24
+NtExtendSection@8
+NtFilterToken@24
+NtFindAtom@12
+NtFlushBuffersFile@8
+NtFlushInstructionCache@12
+NtFlushKey@4
+NtFlushVirtualMemory@16
+NtFlushWriteBuffer@0
+NtFreeUserPhysicalPages@12
+NtFreeVirtualMemory@16
+NtFsControlFile@40
+NtGetContextThread@8
+NtGetCurrentProcessorNumber@0
+NtGetDevicePowerState@8
+NtGetPlugPlayEvent@16
+;NtGetTickCount
+NtGetWriteWatch@28
+NtImpersonateAnonymousToken@4
+NtImpersonateClientOfPort@8
+NtImpersonateThread@12
+NtInitializeRegistry@4
+NtInitiatePowerAction@16
+NtIsProcessInJob@8
+NtIsSystemResumeAutomatic@0
+NtListenPort@8
+NtLoadDriver@4
+NtLoadKey@8
+NtLoadKey2@12
+NtLoadKeyEx@16
+NtLockFile@40
+NtLockProductActivationKeys@8
+NtLockRegistryKey@4
+NtLockVirtualMemory@16
+NtMakePermanentObject@4
+NtMakeTemporaryObject@4
+NtMapUserPhysicalPages@12
+NtMapUserPhysicalPagesScatter@12
+NtMapViewOfSection@40
+NtModifyBootEntry@4
+NtModifyDriverEntry@4
+NtNotifyChangeDirectoryFile@36
+NtNotifyChangeKey@40
+NtNotifyChangeMultipleKeys@48
+NtOpenDirectoryObject@12
+NtOpenEvent@12
+NtOpenEventPair@12
+NtOpenFile@24
+NtOpenIoCompletion@12
+NtOpenJobObject@12
+NtOpenKey@12
+NtOpenKeyedEvent@12
+NtOpenMutant@12
+NtOpenObjectAuditAlarm@48
+NtOpenProcess@16
+NtOpenProcessToken@12
+NtOpenProcessTokenEx@16
+NtOpenSection@12
+NtOpenSemaphore@12
+NtOpenSymbolicLinkObject@12
+NtOpenThread@16
+NtOpenThreadToken@16
+NtOpenThreadTokenEx@20
+NtOpenTimer@12
+NtPlugPlayControl@12
+NtPowerInformation@20
+NtPrivilegeCheck@12
+NtPrivilegeObjectAuditAlarm@24
+NtPrivilegedServiceAuditAlarm@20
+NtProtectVirtualMemory@20
+NtPulseEvent@8
+NtQueryAttributesFile@8
+NtQueryBootEntryOrder@8
+NtQueryBootOptions@8
+NtQueryDebugFilterState@8
+NtQueryDefaultLocale@8
+NtQueryDefaultUILanguage@4
+NtQueryDirectoryFile@44
+NtQueryDirectoryObject@28
+NtQueryDriverEntryOrder@8
+NtQueryEaFile@36
+NtQueryEvent@20
+NtQueryFullAttributesFile@8
+NtQueryInformationAtom@20
+NtQueryInformationFile@20
+NtQueryInformationJobObject@20
+NtQueryInformationPort@20
+NtQueryInformationProcess@20
+NtQueryInformationThread@20
+NtQueryInformationToken@20
+NtQueryInstallUILanguage@4
+NtQueryIntervalProfile@8
+NtQueryIoCompletion@20
+NtQueryKey@20
+NtQueryMultipleValueKey@24
+NtQueryMutant@20
+NtQueryObject@20
+NtQueryOpenSubKeys@8
+NtQueryOpenSubKeysEx@16
+NtQueryPerformanceCounter@8
+NtQueryPortInformationProcess@0
+NtQueryQuotaInformationFile@36
+NtQuerySection@20
+NtQuerySecurityObject@20
+NtQuerySemaphore@20
+NtQuerySymbolicLinkObject@12
+NtQuerySystemEnvironmentValue@16
+NtQuerySystemEnvironmentValueEx@20
+NtQuerySystemInformation@16
+NtQuerySystemTime@4
+NtQueryTimer@20
+NtQueryTimerResolution@12
+NtQueryValueKey@24
+NtQueryVirtualMemory@24
+NtQueryVolumeInformationFile@20
+NtQueueApcThread@20
+NtRaiseException@12
+NtRaiseHardError@24
+NtReadFile@36
+NtReadFileScatter@36
+NtReadRequestData@24
+NtReadVirtualMemory@20
+NtRegisterThreadTerminatePort@4
+NtReleaseKeyedEvent@16
+NtReleaseMutant@8
+NtReleaseSemaphore@12
+NtRemoveIoCompletion@20
+NtRemoveProcessDebug@8
+NtRenameKey@8
+NtReplaceKey@12
+NtReplyPort@8
+NtReplyWaitReceivePort@16
+NtReplyWaitReceivePortEx@20
+NtReplyWaitReplyPort@8
+NtRequestDeviceWakeup@4
+NtRequestPort@8
+NtRequestWaitReplyPort@12
+NtRequestWakeupLatency@4
+NtResetEvent@8
+NtResetWriteWatch@12
+NtRestoreKey@12
+NtResumeProcess@4
+NtResumeThread@8
+NtSaveKey@8
+NtSaveKeyEx@12
+NtSaveMergedKeys@12
+NtSecureConnectPort@36
+NtSetBootEntryOrder@8
+NtSetBootOptions@8
+NtSetContextThread@8
+NtSetDebugFilterState@12
+NtSetDefaultHardErrorPort@4
+NtSetDefaultLocale@8
+NtSetDefaultUILanguage@4
+NtSetDriverEntryOrder@8
+NtSetEaFile@16
+NtSetEvent@8
+NtSetEventBoostPriority@4
+NtSetHighEventPair@4
+NtSetHighWaitLowEventPair@4
+NtSetInformationDebugObject@20
+NtSetInformationFile@20
+NtSetInformationJobObject@16
+NtSetInformationKey@16
+NtSetInformationObject@16
+NtSetInformationProcess@16
+NtSetInformationThread@16
+NtSetInformationToken@16
+NtSetIntervalProfile@8
+NtSetIoCompletion@20
+NtSetLdtEntries@24
+NtSetLowEventPair@4
+NtSetLowWaitHighEventPair@4
+NtSetQuotaInformationFile@16
+NtSetSecurityObject@12
+NtSetSystemEnvironmentValue@8
+NtSetSystemEnvironmentValueEx@8
+NtSetSystemInformation@12
+NtSetSystemPowerState@12
+NtSetSystemTime@8
+NtSetThreadExecutionState@8
+NtSetTimer@28
+NtSetTimerResolution@12
+NtSetUuidSeed@4
+NtSetValueKey@24
+NtSetVolumeInformationFile@20
+NtShutdownSystem@4
+NtSignalAndWaitForSingleObject@16
+NtStartProfile@4
+NtStopProfile@4
+NtSuspendProcess@4
+NtSuspendThread@8
+NtSystemDebugControl@24
+NtTerminateJobObject@8
+NtTerminateProcess@8
+NtTerminateThread@8
+NtTestAlert@0
+NtTraceEvent@16
+NtTranslateFilePath@16
+NtUnloadDriver@4
+NtUnloadKey@4
+NtUnloadKey2@8
+NtUnloadKeyEx@8
+NtUnlockFile@20
+NtUnlockVirtualMemory@16
+NtUnmapViewOfSection@8
+NtVdmControl@8
+NtWaitForDebugEvent@16
+NtWaitForKeyedEvent@16
+NtWaitForMultipleObjects@20
+NtWaitForMultipleObjects32@20
+NtWaitForSingleObject@12
+NtWaitHighEventPair@4
+NtWaitLowEventPair@4
+NtWriteFile@36
+NtWriteFileGather@36
+NtWriteRequestData@24
+NtWriteVirtualMemory@20
+NtYieldExecution@0
+;PfxFindPrefix
+;PfxInitialize
+;PfxInsertPrefix
+;PfxRemovePrefix
+;PropertyLengthAsVariant
+;RtlAbortRXact
+RtlAbsoluteToSelfRelativeSD@12
+RtlAcquirePebLock@0
+RtlAcquirePrivilege@16
+RtlAcquireResourceExclusive@8
+RtlAcquireResourceShared@8
+RtlAcquireSRWLockExclusive@4
+RtlAcquireSRWLockShared@4
+RtlActivateActivationContext@12
+;RtlActivateActivationContextEx
+RtlActivateActivationContextUnsafeFast@8
+RtlAddAccessAllowedAce@16
+RtlAddAccessAllowedAceEx@20
+RtlAddAccessAllowedObjectAce@28
+RtlAddAccessDeniedAce@16
+RtlAddAccessDeniedAceEx@20
+RtlAddAccessDeniedObjectAce@28
+RtlAddAce@20
+;RtlAddActionToRXact
+RtlAddAtomToAtomTable@12
+;RtlAddAttributeActionToRXact
+RtlAddAuditAccessAce@24
+RtlAddAuditAccessAceEx@28
+RtlAddAuditAccessObjectAce@36
+;RtlAddCompoundAce
+RtlAddMandatoryAce@24
+RtlAddRefActivationContext@4
+;RtlAddRefMemoryStream
+;RtlAddVectoredContinueHandler
+RtlAddVectoredExceptionHandler@8
+;RtlAddressInSectionTable
+RtlAdjustPrivilege@16
+RtlAllocateActivationContextStack@4
+RtlAllocateAndInitializeSid@44
+RtlAllocateHandle@8
+RtlAllocateHeap@12
+RtlAnsiCharToUnicodeChar@4
+RtlAnsiStringToUnicodeSize@4=RtlxAnsiStringToUnicodeSize@4
+RtlAnsiStringToUnicodeString@12
+RtlAppendAsciizToString@8
+;RtlAppendPathElement
+RtlAppendStringToString@8
+RtlAppendUnicodeStringToString@8
+RtlAppendUnicodeToString@8
+;RtlApplyRXact
+;RtlApplyRXactNoFlush
+RtlAreAllAccessesGranted@8
+RtlAreAnyAccessesGranted@8
+RtlAreBitsClear@12
+RtlAreBitsSet@12
+RtlAssert@16
+;RtlCancelTimer
+RtlCaptureContext@4
+RtlCaptureStackBackTrace@16
+;RtlCaptureStackContext
+RtlCharToInteger@12
+;RtlCheckForOrphanedCriticalSections
+;RtlCheckProcessParameters
+RtlCheckRegistryKey@8
+RtlClearAllBits@4
+RtlClearBits@12
+;RtlCloneMemoryStream
+;RtlCommitMemoryStream
+RtlCompactHeap@8
+RtlCompareMemory@12
+RtlCompareMemoryUlong@12
+RtlCompareString@12
+RtlCompareUnicodeString@12
+RtlCompressBuffer@32
+RtlComputeCrc32@12
+;RtlComputeImportTableHash
+;RtlComputePrivatizedDllName_U
+;RtlConsoleMultiByteToUnicodeN
+RtlConvertExclusiveToShared@4
+RtlConvertLongToLargeInteger@4
+;RtlConvertPropertyToVariant
+RtlConvertSharedToExclusive@4
+RtlConvertSidToUnicodeString@12
+;RtlConvertToAutoInheritSecurityObject
+;RtlConvertUiListToApiList
+RtlConvertUlongToLargeInteger@4
+;RtlConvertVariantToProperty
+RtlCopyLuid@8
+RtlCopyLuidAndAttributesArray@12
+;RtlCopyMappedMemory
+;RtlCopyMemoryStreamTo
+;RtlCopyOutOfProcessMemoryStreamTo
+RtlCopySecurityDescriptor@8
+RtlCopySid@12
+RtlCopySidAndAttributesArray@28
+RtlCopyString@8
+RtlCopyUnicodeString@8
+RtlCreateAcl@12
+RtlCreateActivationContext@8
+;RtlCreateAndSetSD
+RtlCreateAtomTable@8
+;RtlCreateBootStatusDataFile
+RtlCreateEnvironment@8
+RtlCreateHeap@24
+RtlCreateProcessParameters@40
+RtlCreateQueryDebugBuffer@8
+RtlCreateRegistryKey@8
+RtlCreateSecurityDescriptor@8
+RtlCreateSystemVolumeInformationFolder@4
+RtlCreateTagHeap@16
+RtlCreateTimer@28
+RtlCreateTimerQueue@4
+RtlCreateUnicodeString@8
+RtlCreateUnicodeStringFromAsciiz@8
+RtlCreateUserProcess@40
+;RtlCreateUserSecurityObject
+RtlCreateUserThread@40
+RtlCustomCPToUnicodeN@24
+RtlCutoverTimeToSystemTime@16
+RtlDeNormalizeProcessParams@4
+RtlDeactivateActivationContext@8
+RtlDeactivateActivationContextUnsafeFast@4
+RtlDecodePointer=RtlEncodePointer@4
+RtlDecodeSystemPointer@4=RtlEncodeSystemPointer@4
+RtlDecompressBuffer@24
+RtlDecompressFragment@32
+;RtlDefaultNpAcl
+RtlDelete@4
+RtlDeleteAce@8
+RtlDeleteAtomFromAtomTable@8
+RtlDeleteCriticalSection@4
+RtlDeleteElementGenericTable@8
+RtlDeleteElementGenericTableAvl@8
+RtlDeleteNoSplay@8
+RtlDeleteRegistryValue@12
+RtlDeleteResource@4
+RtlDeleteSecurityObject@4
+RtlDeleteTimer@12
+RtlDeleteTimerQueue@4
+RtlDeleteTimerQueueEx@8
+RtlDeregisterWait@4
+RtlDeregisterWaitEx@8
+RtlDestroyAtomTable@4
+RtlDestroyEnvironment@4
+RtlDestroyHandleTable@4
+RtlDestroyHeap@4
+RtlDestroyProcessParameters@4
+RtlDestroyQueryDebugBuffer@4
+RtlDetermineDosPathNameType_U@4
+RtlDllShutdownInProgress@0
+;RtlDnsHostNameToComputerName
+RtlDoesFileExists_U@4
+;RtlDosApplyFileIsolationRedirection_Ustr
+RtlDosPathNameToNtPathName_U@16
+;RtlDosPathNameToNtPathName_U_WithStatus
+RtlDosPathNameToRelativeNtPathName_U@16
+;RtlDosPathNameToRelativeNtPathName_U_WithStatus
+RtlDosSearchPath_U@24
+;RtlDosSearchPath_Ustr
+RtlDowncaseUnicodeChar@4
+RtlDowncaseUnicodeString@12
+RtlDumpResource@4
+RtlDuplicateUnicodeString@12
+RtlEmptyAtomTable@8
+;RtlEnableEarlyCriticalSectionEventCreation
+RtlEncodePointer@4
+RtlEncodeSystemPointer@4
+RtlEnlargedIntegerMultiply@8
+RtlEnlargedUnsignedDivide@16
+RtlEnlargedUnsignedMultiply@8
+RtlEnterCriticalSection@4
+RtlEnumProcessHeaps@8
+RtlEnumerateGenericTable@8
+RtlEnumerateGenericTableAvl@8
+RtlEnumerateGenericTableLikeADirectory@28
+RtlEnumerateGenericTableWithoutSplaying@8
+RtlEnumerateGenericTableWithoutSplayingAvl@8
+RtlEqualComputerName@8
+RtlEqualDomainName@8
+RtlEqualLuid@8
+RtlEqualPrefixSid@8
+RtlEqualSid@8
+RtlEqualString@12
+RtlEqualUnicodeString@12
+RtlEraseUnicodeString@4
+RtlExitUserThread@4
+RtlExpandEnvironmentStrings_U@16
+RtlExtendHeap@16
+RtlExtendedIntegerMultiply@12
+RtlExtendedLargeIntegerDivide@16
+RtlExtendedMagicDivide@20
+RtlFillMemory@12
+RtlFillMemoryUlong@12
+;RtlFinalReleaseOutOfProcessMemoryStream
+;RtlFindActivationContextSectionGuid
+RtlFindActivationContextSectionString@20
+RtlFindCharInUnicodeString@16
+RtlFindClearBits@12
+RtlFindClearBitsAndSet@12
+RtlFindClearRuns@16
+RtlFindLastBackwardRunClear@12
+RtlFindLeastSignificantBit@8
+RtlFindLongestRunClear@8
+RtlFindMessage@20
+RtlFindMostSignificantBit@8
+RtlFindNextForwardRunClear@12
+RtlFindSetBits@12
+RtlFindSetBitsAndClear@12
+RtlFirstEntrySList@4
+RtlFirstFreeAce@8
+RtlFlushSecureMemoryCache@8
+RtlFormatCurrentUserKeyPath@4
+RtlFormatMessage@32
+;RtlFormatMessageEx
+;RtlFreeActivationContextStack
+RtlFreeAnsiString@4
+RtlFreeHandle@8
+RtlFreeHeap@12
+RtlFreeOemString@4
+RtlFreeSid@4
+;RtlFreeThreadActivationContextStack
+RtlFreeUnicodeString@4
+RtlFreeUserThreadStack@8
+RtlGUIDFromString@8
+RtlGenerate8dot3Name@16
+RtlGetAce@12
+RtlGetActiveActivationContext@4
+RtlGetCallersAddress@8
+RtlGetCompressionWorkSpaceSize@12
+RtlGetControlSecurityDescriptor@12
+;RtlGetCriticalSectionRecursionCount
+RtlGetCurrentDirectory_U@8
+RtlGetCurrentPeb@0
+RtlGetCurrentProcessorNumber@0
+RtlGetDaclSecurityDescriptor@16
+RtlGetElementGenericTable@8
+RtlGetElementGenericTableAvl@8
+;RtlGetFrame
+RtlGetFullPathName_U@16
+;RtlGetFullPathName_UstrEx
+RtlGetGroupSecurityDescriptor@12
+RtlGetLastNtStatus@0
+RtlGetLastWin32Error@0
+;RtlGetLengthWithoutLastFullDosOrNtPathElement
+;RtlGetLengthWithoutTrailingPathSeperators
+RtlGetLongestNtPathLength@0
+;RtlGetNativeSystemInformation
+RtlGetNtGlobalFlags@0
+RtlGetNtProductType@4
+RtlGetNtVersionNumbers@12
+RtlGetOwnerSecurityDescriptor@12
+RtlGetProcessHeaps@8
+RtlGetSaclSecurityDescriptor@16
+RtlGetSecurityDescriptorRMControl@8
+RtlGetSetBootStatusData@24
+;RtlGetThreadErrorMode
+;RtlGetUnloadEventTrace
+RtlGetUserInfoHeap@20
+RtlGetVersion@4
+RtlHashUnicodeString@16
+RtlIdentifierAuthoritySid@4
+RtlImageDirectoryEntryToData@16
+RtlImageNtHeader@4
+;RtlImageNtHeaderEx
+RtlImageRvaToSection@12
+RtlImageRvaToVa@16
+RtlImpersonateSelf@4
+RtlInitAnsiString@8
+RtlInitAnsiStringEx@8
+RtlInitCodePageTable@8
+;RtlInitMemoryStream
+RtlInitNlsTables@16
+;RtlInitOutOfProcessMemoryStream
+RtlInitString@8
+RtlInitUnicodeString@8
+RtlInitUnicodeStringEx@8
+;RtlInitializeAtomPackage
+RtlInitializeBitMap@12
+RtlInitializeConditionVariable@4
+RtlInitializeContext@20
+RtlInitializeCriticalSection@4
+RtlInitializeCriticalSectionAndSpinCount@8
+RtlInitializeGenericTable@20
+RtlInitializeGenericTableAvl@20
+RtlInitializeHandleTable@12
+;RtlInitializeRXact
+RtlInitializeResource@4
+RtlInitializeSListHead@4
+RtlInitializeSid@12
+RtlInitializeSRWLock@4
+RtlInsertElementGenericTable@16
+RtlInsertElementGenericTableAvl@16
+RtlInsertElementGenericTableFull@24
+RtlInsertElementGenericTableFullAvl@24
+RtlInt64ToUnicodeString@16
+RtlIntegerToChar@16
+RtlIntegerToUnicodeString@12
+RtlInterlockedCompareExchange64@20
+RtlInterlockedFlushSList@4
+RtlInterlockedPopEntrySList@4
+RtlInterlockedPushEntrySList@8
+RtlInterlockedPushListSList@16
+RtlIpv4AddressToStringA@8
+RtlIpv4AddressToStringExA@16
+RtlIpv4AddressToStringExW@16
+RtlIpv4AddressToStringW@8
+RtlIpv4StringToAddressA@16
+RtlIpv4StringToAddressExA@16
+RtlIpv4StringToAddressExW@16
+RtlIpv4StringToAddressW@16
+RtlIpv6AddressToStringA@8
+RtlIpv6AddressToStringExA@20
+RtlIpv6AddressToStringExW@20
+RtlIpv6AddressToStringW@8
+RtlIpv6StringToAddressA@12
+RtlIpv6StringToAddressExA@16
+RtlIpv6StringToAddressExW@16
+RtlIpv6StringToAddressW@12
+;RtlIsActivationContextActive
+;RtlIsCriticalSectionLocked
+;RtlIsCriticalSectionLockedByThread
+RtlIsDosDeviceName_U@4
+RtlIsGenericTableEmpty@4
+RtlIsGenericTableEmptyAvl@4
+RtlIsNameLegalDOS8Dot3@12
+RtlIsTextUnicode@12
+RtlIsThreadWithinLoaderCallout@0
+RtlIsValidHandle@8
+RtlIsValidIndexHandle@12
+RtlLargeIntegerAdd@16
+RtlLargeIntegerArithmeticShift@12
+RtlLargeIntegerDivide@20
+RtlLargeIntegerNegate@8
+RtlLargeIntegerShiftLeft@12
+RtlLargeIntegerShiftRight@12
+RtlLargeIntegerSubtract@16
+RtlLargeIntegerToChar@16
+RtlLeaveCriticalSection@4
+RtlLengthRequiredSid@4
+RtlLengthSecurityDescriptor@4
+RtlLengthSid@4
+RtlLocalTimeToSystemTime@8
+RtlLockBootStatusData@4
+RtlLockHeap@4
+;RtlLockMemoryStreamRegion
+;RtlLogStackBackTrace
+RtlLookupAtomInAtomTable@12
+RtlLookupElementGenericTable@8
+RtlLookupElementGenericTableAvl@8
+RtlLookupElementGenericTableFull@16
+RtlLookupElementGenericTableFullAvl@16
+RtlMakeSelfRelativeSD@12
+RtlMapGenericMask@8
+;RtlMapSecurityErrorToNtStatus
+RtlMoveMemory@12
+;RtlMultiAppendUnicodeStringBuffer
+RtlMultiByteToUnicodeN@20
+RtlMultiByteToUnicodeSize@12
+RtlMultipleAllocateHeap@20
+RtlMultipleFreeHeap@16
+;RtlNewInstanceSecurityObject
+;RtlNewSecurityGrantedAccess
+RtlNewSecurityObject@24
+;RtlNewSecurityObjectEx
+;RtlNewSecurityObjectWithMultipleInheritance
+RtlNormalizeProcessParams@4
+RtlNtPathNameToDosPathName@16
+RtlNtStatusToDosError@4
+RtlNtStatusToDosErrorNoTeb@4
+RtlNumberGenericTableElements@4
+RtlNumberGenericTableElementsAvl@4
+RtlNumberOfClearBits@4
+RtlNumberOfSetBits@4
+RtlOemStringToUnicodeSize@4=RtlxOemStringToUnicodeSize@4
+RtlOemStringToUnicodeString@12
+RtlOemToUnicodeN@20
+RtlOpenCurrentUser@8
+RtlPcToFileHeader@8
+RtlPinAtomInAtomTable@8
+;RtlPopFrame
+RtlPrefixString@12
+RtlPrefixUnicodeString@12
+RtlProtectHeap@8
+;RtlPushFrame
+RtlQueryAtomInAtomTable@24
+RtlQueryDepthSList@4
+RtlQueryEnvironmentVariable_U@12
+RtlQueryHeapInformation@20
+RtlQueryInformationAcl@16
+RtlQueryInformationActivationContext@28
+;RtlQueryInformationActiveActivationContext
+;RtlQueryInterfaceMemoryStream
+;RtlQueryProcessBackTraceInformation
+RtlQueryProcessDebugInformation@12
+;RtlQueryProcessHeapInformation
+;RtlQueryProcessLockInformation
+RtlQueryRegistryValues@20
+RtlQuerySecurityObject@20
+RtlQueryTagHeap@20
+RtlQueryTimeZoneInformation@4
+;RtlQueueApcWow64Thread
+RtlQueueWorkItem@12
+RtlRaiseException@4
+RtlRaiseStatus@4
+RtlRandom@4
+RtlRandomEx@4
+RtlReAllocateHeap@16
+;RtlReadMemoryStream
+;RtlReadOutOfProcessMemoryStream
+RtlRealPredecessor@4
+RtlRealSuccessor@4
+RtlRegisterSecureMemoryCacheCallback@4
+RtlRegisterWait@24
+RtlReleaseActivationContext@4
+;RtlReleaseMemoryStream
+RtlReleasePebLock@0
+RtlReleasePrivilege@4
+RtlReleaseRelativeName@4
+RtlReleaseResource@4
+RtlReleaseSRWLockExclusive@4
+RtlReleaseSRWLockShared@4
+RtlRemoteCall@28
+;RtlRemoveVectoredContinueHandler
+RtlRemoveVectoredExceptionHandler@4
+RtlResetRtlTranslations@4
+RtlRestoreLastWin32Error@4=RtlSetLastWin32Error@4
+;RtlRevertMemoryStream
+RtlRunDecodeUnicodeString@8
+RtlRunEncodeUnicodeString@8
+RtlSecondsSince1970ToTime@8
+RtlSecondsSince1980ToTime@8
+;RtlSeekMemoryStream
+RtlSelfRelativeToAbsoluteSD@44
+RtlSelfRelativeToAbsoluteSD2@8
+RtlSetAllBits@4
+RtlSetAttributesSecurityDescriptor@12
+RtlSetBits@12
+RtlSetControlSecurityDescriptor@12
+RtlSetCriticalSectionSpinCount@8
+RtlSetCurrentDirectory_U@4
+RtlSetCurrentEnvironment@8
+RtlSetDaclSecurityDescriptor@16
+;RtlSetEnvironmentStrings
+RtlSetEnvironmentVariable@12
+RtlSetGroupSecurityDescriptor@12
+RtlSetHeapInformation@16
+RtlSetInformationAcl@16
+RtlSetIoCompletionCallback@12
+RtlSetLastWin32Error@4
+RtlSetLastWin32ErrorAndNtStatusFromNtStatus@4
+;RtlSetMemoryStreamSize
+RtlSetOwnerSecurityDescriptor@12
+RtlSetProcessIsCritical@12
+RtlSetSaclSecurityDescriptor@16
+RtlSetSecurityDescriptorRMControl@8
+RtlSetSecurityObject@20
+;RtlSetSecurityObjectEx
+;RtlSetThreadErrorMode
+;RtlSetThreadIsCritical
+;RtlSetThreadPoolStartFunc
+RtlSetTimeZoneInformation@4
+;RtlSetTimer
+RtlSetUnhandledExceptionFilter@4
+;RtlSetUnicodeCallouts
+RtlSetUserFlagsHeap@16
+RtlSetUserValueHeap@16
+RtlSizeHeap@12
+RtlSleepConditionVariableCS@12
+RtlSleepConditionVariableSRW@16
+RtlSplay@4
+;RtlStartRXact
+;RtlStatMemoryStream
+RtlStringFromGUID@8
+RtlSubAuthorityCountSid@4
+RtlSubAuthoritySid@8
+RtlSubtreePredecessor@4
+RtlSubtreeSuccessor@4
+RtlSystemTimeToLocalTime@8
+RtlTimeFieldsToTime@8
+RtlTimeToElapsedTimeFields@8
+RtlTimeToSecondsSince1970@8
+RtlTimeToSecondsSince1980@8
+RtlTimeToTimeFields@8
+;RtlTraceDatabaseAdd
+;RtlTraceDatabaseCreate
+;RtlTraceDatabaseDestroy
+;RtlTraceDatabaseEnumerate
+;RtlTraceDatabaseFind
+;RtlTraceDatabaseLock
+;RtlTraceDatabaseUnlock
+;RtlTraceDatabaseValidate
+RtlTryEnterCriticalSection@4
+@RtlUlongByteSwap@4
+@RtlUlonglongByteSwap@8
+RtlUnhandledExceptionFilter@4
+;RtlUnhandledExceptionFilter2
+RtlUnicodeStringToAnsiSize@4=RtlxUnicodeStringToAnsiSize@4
+RtlUnicodeStringToAnsiString@12
+RtlUnicodeStringToCountedOemString@12
+RtlUnicodeStringToInteger@12
+RtlUnicodeStringToOemSize@4=RtlxUnicodeStringToOemSize@4
+RtlUnicodeStringToOemString@12
+RtlUnicodeToCustomCPN@24
+RtlUnicodeToMultiByteN@20
+RtlUnicodeToMultiByteSize@12
+RtlUnicodeToOemN@20
+RtlUniform@4
+RtlUnlockBootStatusData@4
+RtlUnlockHeap@4
+;RtlUnlockMemoryStreamRegion
+RtlUnwind@16
+RtlUpcaseUnicodeChar@4
+RtlUpcaseUnicodeString@12
+RtlUpcaseUnicodeStringToAnsiString@12
+RtlUpcaseUnicodeStringToCountedOemString@12
+RtlUpcaseUnicodeStringToOemString@12
+RtlUpcaseUnicodeToCustomCPN@24
+RtlUpcaseUnicodeToMultiByteN@20
+RtlUpcaseUnicodeToOemN@20
+RtlUpdateTimer@16
+RtlUpperChar@4
+RtlUpperString@8
+RtlUsageHeap@12
+@RtlUshortByteSwap@4
+RtlValidAcl@4
+RtlValidRelativeSecurityDescriptor@12
+RtlValidSecurityDescriptor@4
+RtlValidSid@4
+RtlValidateHeap@12
+RtlValidateProcessHeaps@0
+RtlValidateUnicodeString@8
+RtlVerifyVersionInfo@16
+RtlWalkFrameChain@12
+RtlWalkHeap@8
+;RtlWow64EnableFsRedirection
+;RtlWow64EnableFsRedirectionEx
+RtlWakeAllConditionVariable@4
+RtlWakeConditionVariable@4
+RtlWriteRegistryValue@24
+;RtlWriteMemoryStream
+RtlWriteRegistryValue@24
+RtlZeroHeap@8
+RtlZeroMemory@8
+RtlZombifyActivationContext@4
+;RtlpApplyLengthFunction
+RtlpEnsureBufferSize@12
+;RtlpNotOwnerCriticalSection
+RtlpNtCreateKey@24
+RtlpNtEnumerateSubKey@16
+RtlpNtMakeTemporaryKey@4
+RtlpNtOpenKey@16
+RtlpNtQueryValueKey@20
+RtlpNtSetValueKey@16
+RtlpUnWaitCriticalSection@4
+RtlpWaitForCriticalSection@4
+RtlxAnsiStringToUnicodeSize@4
+RtlxOemStringToUnicodeSize@4
+RtlxUnicodeStringToAnsiSize@4
+RtlxUnicodeStringToOemSize@4
+VerSetConditionMask@16
+ZwAcceptConnectPort@24
+ZwAccessCheck@32
+ZwAccessCheckAndAuditAlarm@44
+ZwAccessCheckByType@44
+ZwAccessCheckByTypeAndAuditAlarm@64
+ZwAccessCheckByTypeResultList@44
+ZwAccessCheckByTypeResultListAndAuditAlarm@64
+ZwAccessCheckByTypeResultListAndAuditAlarmByHandle@68
+ZwAddAtom@12
+ZwAddBootEntry@8
+ZwAddDriverEntry@8
+ZwAdjustGroupsToken@24
+ZwAdjustPrivilegesToken@24
+ZwAlertResumeThread@8
+ZwAlertThread@4
+ZwAllocateLocallyUniqueId@4
+ZwAllocateUserPhysicalPages@12
+ZwAllocateUuids@16
+ZwAllocateVirtualMemory@24
+ZwApphelpCacheControl@8
+ZwAssignProcessToJobObject@8
+ZwCallbackReturn@12
+ZwCancelDeviceWakeupRequest@4
+ZwCancelIoFile@8
+ZwCancelTimer@8
+ZwClearEvent@4
+ZwClose@4
+ZwCloseObjectAuditAlarm@12
+ZwCompactKeys@8
+ZwCompareTokens@12
+ZwCompleteConnectPort@4
+ZwCompressKey@4
+ZwConnectPort@32
+ZwContinue@8
+ZwCreateDebugObject@16
+ZwCreateDirectoryObject@12
+ZwCreateEvent@20
+ZwCreateEventPair@12
+ZwCreateFile@44
+ZwCreateIoCompletion@16
+ZwCreateJobObject@12
+ZwCreateJobSet@12
+ZwCreateKey@28
+ZwCreateKeyedEvent@16
+ZwCreateMailslotFile@32
+ZwCreateMutant@16
+ZwCreateNamedPipeFile@56
+ZwCreatePagingFile@16
+ZwCreatePort@20
+ZwCreateProcess@32
+ZwCreateProcessEx@36
+ZwCreateProfile@36
+ZwCreateSection@28
+ZwCreateSemaphore@20
+ZwCreateSymbolicLinkObject@16
+ZwCreateThread@32
+ZwCreateTimer@16
+ZwCreateToken@52
+ZwCreateWaitablePort@20
+ZwDebugActiveProcess@8
+ZwDebugContinue@12
+ZwDelayExecution@8
+ZwDeleteAtom@4
+ZwDeleteBootEntry@4
+ZwDeleteDriverEntry@4
+ZwDeleteFile@4
+ZwDeleteKey@4
+ZwDeleteObjectAuditAlarm@12
+ZwDeleteValueKey@8
+ZwDeviceIoControlFile@40
+ZwDisplayString@4
+ZwDuplicateObject@28
+ZwDuplicateToken@24
+ZwEnumerateBootEntries@8
+ZwEnumerateDriverEntries@8
+ZwEnumerateKey@24
+ZwEnumerateSystemEnvironmentValuesEx@12
+ZwEnumerateValueKey@24
+ZwExtendSection@8
+ZwFilterToken@24
+ZwFindAtom@12
+ZwFlushBuffersFile@8
+ZwFlushInstructionCache@12
+ZwFlushKey@4
+ZwFlushVirtualMemory@16
+ZwFlushWriteBuffer@0
+ZwFreeVirtualMemory@16
+ZwFsControlFile@40
+ZwGetContextThread@8
+ZwGetCurrentProcessorNumber@0
+ZwGetDevicePowerState@8
+ZwGetPlugPlayEvent@16
+ZwGetWriteWatch@28
+ZwImpersonateAnonymousToken@4
+ZwImpersonateClientOfPort@8
+ZwImpersonateThread@12
+ZwInitializeRegistry@4
+ZwInitiatePowerAction@16
+ZwIsProcessInJob@8
+ZwIsSystemResumeAutomatic@0
+ZwListenPort@8
+ZwLoadDriver@4
+ZwLoadKey@8
+ZwLoadKey2@12
+ZwLoadKeyEx@16
+ZwLockFile@40
+ZwLockProductActivationKeys@8
+ZwLockRegistryKey@4
+ZwLockVirtualMemory@16
+ZwMakePermanentObject@4
+ZwMakeTemporaryObject@4
+ZwMapUserPhysicalPages@12
+ZwMapUserPhysicalPagesScatter@12
+ZwMapViewOfSection@40
+ZwModifyBootEntry@4
+ZwModifyDriverEntry@4
+ZwNotifyChangeDirectoryFile@36
+ZwNotifyChangeKey@40
+ZwNotifyChangeMultipleKeys@48
+ZwOpenDirectoryObject@12
+ZwOpenEvent@12
+ZwOpenEventPair@12
+ZwOpenFile@24
+ZwOpenIoCompletion@12
+ZwOpenJobObject@12
+ZwOpenKey@12
+ZwOpenKeyedEvent@12
+ZwOpenMutant@12
+ZwOpenObjectAuditAlarm@48
+ZwOpenProcess@16
+ZwOpenProcessToken@12
+ZwOpenProcessTokenEx@16
+ZwOpenSection@12
+ZwOpenSemaphore@12
+ZwOpenSymbolicLinkObject@12
+ZwOpenThread@16
+ZwOpenThreadToken@16
+ZwOpenThreadTokenEx@20
+ZwOpenTimer@12
+ZwPlugPlayControl@12
+ZwPowerInformation@20
+ZwPrivilegeCheck@12
+ZwPrivilegeObjectAuditAlarm@24
+ZwPrivilegedServiceAuditAlarm@20
+ZwProtectVirtualMemory@20
+ZwPulseEvent@8
+ZwQueryAttributesFile@8
+ZwQueryBootEntryOrder@8
+ZwQueryBootOptions@8
+ZwQueryDebugFilterState@8
+ZwQueryDefaultLocale@8
+ZwQueryDefaultUILanguage@4
+ZwQueryDirectoryFile@44
+ZwQueryDirectoryObject@28
+ZwQueryDriverEntryOrder@8
+ZwQueryEaFile@36
+ZwQueryEvent@20
+ZwQueryFullAttributesFile@8
+ZwQueryInformationAtom@20
+ZwQueryInformationFile@20
+ZwQueryInformationJobObject@20
+ZwQueryInformationPort@20
+ZwQueryInformationProcess@20
+ZwQueryInformationThread@20
+ZwQueryInformationToken@20
+ZwQueryInstallUILanguage@4
+ZwQueryIntervalProfile@8
+ZwQueryIoCompletion@20
+ZwQueryKey@20
+ZwQueryMultipleValueKey@24
+ZwQueryMutant@20
+ZwQueryObject@20
+ZwQueryOpenSubKeys@8
+ZwQueryOpenSubKeysEx@16
+ZwQueryPerformanceCounter@8
+ZwQueryPortInformationProcess@0
+ZwQueryQuotaInformationFile@36
+ZwQuerySection@20
+ZwQuerySecurityObject@20
+ZwQuerySemaphore@20
+ZwQuerySymbolicLinkObject@12
+ZwQuerySystemEnvironmentValue@16
+ZwQuerySystemEnvironmentValueEx@20
+ZwQuerySystemInformation@16
+ZwQuerySystemTime@4
+ZwQueryTimer@20
+ZwQueryTimerResolution@12
+ZwQueryValueKey@24
+ZwQueryVirtualMemory@24
+ZwQueryVolumeInformationFile@20
+ZwQueueApcThread@20
+ZwRaiseException@12
+ZwRaiseHardError@24
+ZwReadFile@36
+ZwReadFileScatter@36
+ZwReadRequestData@24
+ZwReadVirtualMemory@20
+ZwRegisterThreadTerminatePort@4
+ZwReleaseKeyedEvent@16
+ZwReleaseMutant@8
+ZwReleaseSemaphore@12
+ZwRemoveIoCompletion@20
+ZwRemoveProcessDebug@8
+ZwRenameKey@8
+ZwReplaceKey@12
+ZwReplyPort@8
+ZwReplyWaitReceivePort@16
+ZwReplyWaitReceivePortEx@20
+ZwReplyWaitReplyPort@8
+ZwRequestDeviceWakeup@4
+ZwRequestPort@8
+ZwRequestWaitReplyPort@12
+ZwRequestWakeupLatency@4
+ZwResetEvent@8
+ZwResetWriteWatch@12
+ZwRestoreKey@12
+ZwResumeProcess@4
+ZwResumeThread@8
+ZwSaveKey@8
+ZwSaveKeyEx@12
+ZwSaveMergedKeys@12
+ZwSecureConnectPort@36
+ZwSetBootEntryOrder@8
+ZwSetBootOptions@8
+ZwSetContextThread@8
+ZwSetDebugFilterState@12
+ZwSetDefaultHardErrorPort@4
+ZwSetDefaultLocale@8
+ZwSetDefaultUILanguage@4
+ZwSetDriverEntryOrder@8
+ZwSetEaFile@16
+ZwSetEvent@8
+ZwSetEventBoostPriority@4
+ZwSetHighEventPair@4
+ZwSetHighWaitLowEventPair@4
+ZwSetInformationDebugObject@20
+ZwSetInformationFile@20
+ZwSetInformationJobObject@16
+ZwSetInformationKey@16
+ZwSetInformationObject@16
+ZwSetInformationProcess@16
+ZwSetInformationThread@16
+ZwSetInformationToken@16
+ZwSetIntervalProfile@8
+ZwSetIoCompletion@20
+ZwSetLdtEntries@24
+ZwSetLowEventPair@4
+ZwSetLowWaitHighEventPair@4
+ZwSetQuotaInformationFile@16
+ZwSetSecurityObject@12
+ZwSetSystemEnvironmentValue@8
+ZwSetSystemEnvironmentValueEx@8
+ZwSetSystemInformation@12
+ZwSetSystemPowerState@12
+ZwSetSystemTime@8
+ZwSetThreadExecutionState@8
+ZwSetTimer@28
+ZwSetTimerResolution@12
+ZwSetUuidSeed@4
+ZwSetValueKey@24
+ZwSetVolumeInformationFile@20
+ZwShutdownSystem@4
+ZwSignalAndWaitForSingleObject@16
+ZwStartProfile@4
+ZwStopProfile@4
+ZwSuspendProcess@4
+ZwSuspendThread@8
+ZwSystemDebugControl@24
+ZwTerminateJobObject@8
+ZwTerminateProcess@8
+ZwTerminateThread@8
+ZwTestAlert@0
+ZwTraceEvent@16
+ZwTranslateFilePath@16
+ZwUnloadDriver@4
+ZwUnloadKey@4
+ZwUnloadKey2@8
+ZwUnloadKeyEx@8
+ZwUnlockFile@20
+ZwUnlockVirtualMemory@16
+ZwUnmapViewOfSection@8
+ZwVdmControl@8
+ZwWaitForDebugEvent@16
+ZwWaitForKeyedEvent@16
+ZwWaitForMultipleObjects@20
+ZwWaitForMultipleObjects32@20
+ZwWaitForSingleObject@12
+ZwWaitHighEventPair@4
+ZwWaitLowEventPair@4
+ZwWriteFile@36
+ZwWriteFileGather@36
+ZwWriteRequestData@24
+ZwWriteVirtualMemory@20
+ZwYieldExecution@0
+;_CIcos
+;_CIlog
+;_CIpow
+;_CIsin
+;_CIsqrt
+__isascii
+__iscsym
+__iscsymf
+__toascii
+_alldiv
+_alldvrm
+_allmul
+_alloca_probe
+_allrem
+_allshl
+_allshr
+_atoi64
+_aulldiv
+_aulldvrm
+_aullrem
+_aullshr
+_chkstk
+_fltused
+_ftol
+_i64toa
+_i64tow
+_itoa
+_itow
+_lfind
+_ltoa
+_ltow
+_memccpy
+_memicmp
+_snprintf
+_snwprintf
+_splitpath
+_strcmpi
+_stricmp
+_strlwr
+_strnicmp
+_strupr
+_tolower
+_toupper
+_ui64toa
+_ui64tow
+_ultoa
+_ultow
+;_vscwprintf
+_vsnprintf
+_vsnwprintf
+_wcsicmp
+_wcslwr
+_wcsnicmp
+;_wcstoui64
+_wcsupr
+_wtoi
+_wtoi64
+_wtol
+abs
+atan
+atoi
+atol
+bsearch
+ceil
+cos
+fabs
+floor
+isalnum
+isalpha
+iscntrl
+isdigit
+isgraph
+islower
+isprint
+ispunct
+isspace
+isupper
+iswalpha
+iswctype
+iswdigit
+iswlower
+iswspace
+iswxdigit
+isxdigit
+labs
+log
+mbstowcs
+memchr
+memcmp
+memcpy=memmove
+memmove
+memset
+pow
+qsort
+sin
+sprintf
+sqrt
+sscanf
+strcat
+strchr
+strcmp
+strcpy
+strcspn
+strlen
+strncat
+strncmp
+strncpy
+strpbrk
+strrchr
+strspn
+strstr
+strtol
+strtoul
+swprintf
+tan
+tolower
+toupper
+towlower
+towupper
+vDbgPrintEx@16
+vDbgPrintExWithPrefix@20
+vsprintf
+wcscat
+wcschr
+wcscmp
+wcscpy
+wcscspn
+wcslen
+wcsncat
+wcsncmp
+wcsncpy
+wcspbrk
+wcsrchr
+wcsspn
+wcsstr
+wcstol
+wcstombs
+wcstoul
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS NT Library
+ * FILE: dll/ntdll/dispatch/amd64/stubs.c
+ * PURPOSE: AMD64 stubs
+ * PROGRAMMERS: Stefan Ginsberg (stefan.ginsberg@reactos.org)
+ */
+
+/* INCLUDES *****************************************************************/
+
+#include <ntdll.h>
+#define NDEBUG
+#include <debug.h>
+
+/* PUBLIC FUNCTIONS **********************************************************/
+
+/*
+ * @unimplemented
+ */
+VOID
+NTAPI
+LdrInitializeThunk(ULONG Unknown1, // FIXME: Parameters!
+ ULONG Unknown2,
+ ULONG Unknown3,
+ ULONG Unknown4)
+{
+ UNIMPLEMENTED;
+ return;
+}
+
+/*
+ * @unimplemented
+ */
+VOID
+NTAPI
+KiUserApcDispatcher(IN PVOID NormalRoutine,
+ IN PVOID NormalContext,
+ IN PVOID SystemArgument1,
+ IN PVOID SystemArgument2)
+{
+ UNIMPLEMENTED;
+ return;
+}
ULONG ArgumentLength)
{
/* Return with the result of the callback function */
+ USER_CALL *KernelCallbackTable = NtCurrentPeb()->KernelCallbackTable;
ZwCallbackReturn(NULL,
0,
- ((USER_CALL)(NtCurrentPeb()->KernelCallbackTable[Index]))
- (Argument, ArgumentLength));
+ KernelCallbackTable[Index](Argument, ArgumentLength));
}
LDR_RESOURCE_INFO info;
IMAGE_RESOURCE_DATA_ENTRY *entry;
- info.Type = (ULONG)RT_MANIFEST;
- info.Name = (ULONG)ISOLATIONAWARE_MANIFEST_RESOURCE_ID;
+ info.Type = (ULONG_PTR)RT_MANIFEST;
+ info.Name = (ULONG_PTR)ISOLATIONAWARE_MANIFEST_RESOURCE_ID;
info.Language = 0;
if (!(status = LdrFindResource_U( module->DllBase, &info, 3, &entry )))
{
/* initalize peb lock support */
RtlInitializeCriticalSection(&PebLock);
Peb->FastPebLock = &PebLock;
- Peb->FastPebLockRoutine = (PPEBLOCKROUTINE)RtlEnterCriticalSection;
- Peb->FastPebUnlockRoutine = (PPEBLOCKROUTINE)RtlLeaveCriticalSection;
/* initialize tls bitmaps */
RtlInitializeBitMap(&TlsBitMap, Peb->TlsBitmapBits, TLS_MINIMUM_AVAILABLE);
InsertTailList(&Peb->Ldr->InLoadOrderModuleList,
&NtModule->InLoadOrderLinks);
InsertTailList(&Peb->Ldr->InInitializationOrderModuleList,
- &NtModule->InInitializationOrderModuleList);
+ &NtModule->InInitializationOrderLinks);
/* add entry for executable (becomes first list entry) */
ExeModule = (PLDR_DATA_TABLE_ENTRY)
ASSERT(Module);
memset(Module, 0, sizeof(LDR_DATA_TABLE_ENTRY));
Module->DllBase = (PVOID)ImageBase;
- Module->EntryPoint = (PVOID)NTHeaders->OptionalHeader.AddressOfEntryPoint;
+ Module->EntryPoint = (PVOID)(ULONG_PTR)NTHeaders->OptionalHeader.AddressOfEntryPoint;
if (Module->EntryPoint != 0)
Module->EntryPoint = (PVOID)((ULONG_PTR)Module->EntryPoint + (ULONG_PTR)Module->DllBase);
Module->SizeOfImage = LdrpGetResidentSize(NTHeaders);
? RVA(BaseAddress, ExFunctions[Ordinal - ExportDir->Base] )
: NULL);
- if (((ULONG)Function >= (ULONG)ExportDir) &&
- ((ULONG)Function < (ULONG)ExportDir + (ULONG)ExportDirSize))
+ if (((ULONG_PTR)Function >= (ULONG_PTR)ExportDir) &&
+ ((ULONG_PTR)Function < (ULONG_PTR)ExportDir + (ULONG_PTR)ExportDirSize))
{
DPRINT("Forward: %s\n", (PCHAR)Function);
Function = LdrFixupForward((PCHAR)Function);
{
Ordinal = ExOrdinals[Hint];
Function = RVA(BaseAddress, ExFunctions[Ordinal]);
- if (((ULONG)Function >= (ULONG)ExportDir) &&
- ((ULONG)Function < (ULONG)ExportDir + (ULONG)ExportDirSize))
+ if (((ULONG_PTR)Function >= (ULONG_PTR)ExportDir) &&
+ ((ULONG_PTR)Function < (ULONG_PTR)ExportDir + (ULONG_PTR)ExportDirSize))
{
DPRINT("Forward: %s\n", (PCHAR)Function);
Function = LdrFixupForward((PCHAR)Function);
{
Ordinal = ExOrdinals[mid];
Function = RVA(BaseAddress, ExFunctions[Ordinal]);
- if (((ULONG)Function >= (ULONG)ExportDir) &&
- ((ULONG)Function < (ULONG)ExportDir + (ULONG)ExportDirSize))
+ if (((ULONG_PTR)Function >= (ULONG_PTR)ExportDir) &&
+ ((ULONG_PTR)Function < (ULONG_PTR)ExportDir + (ULONG_PTR)ExportDirSize))
{
DPRINT("Forward: %s\n", (PCHAR)Function);
Function = LdrFixupForward((PCHAR)Function);
{
PIMAGE_DATA_DIRECTORY RelocationDDir;
PIMAGE_BASE_RELOCATION RelocationDir, RelocationEnd;
- ULONG Count, ProtectSize, OldProtect, OldProtect2;
+ ULONG Count, OldProtect, OldProtect2;
+ SIZE_T ProtectSize;
PVOID Page, ProtectPage, ProtectPage2;
PUSHORT TypeOffset;
ULONG_PTR Delta;
PVOID IATBase;
ULONG OldProtect;
ULONG Ordinal;
- ULONG IATSize;
+ SIZE_T IATSize;
if (ImportModuleDirectory == NULL || ImportModuleDirectory->Name == 0)
{
PVOID IATBase;
ULONG OldProtect;
ULONG Offset;
- ULONG IATSize;
+ SIZE_T IATSize;
PIMAGE_NT_HEADERS NTHeaders;
PCHAR Name;
ULONG Size;
/* Map the dll into the process */
ViewSize = 0;
ImageBase = 0;
- ArbitraryUserPointer = NtCurrentTeb()->Tib.ArbitraryUserPointer;
- NtCurrentTeb()->Tib.ArbitraryUserPointer = FullDosName.Buffer;
+ ArbitraryUserPointer = NtCurrentTeb()->NtTib.ArbitraryUserPointer;
+ NtCurrentTeb()->NtTib.ArbitraryUserPointer = FullDosName.Buffer;
Status = NtMapViewOfSection(SectionHandle,
NtCurrentProcess(),
&ImageBase,
ViewShare,
0,
PAGE_READONLY);
- NtCurrentTeb()->Tib.ArbitraryUserPointer = ArbitraryUserPointer;
+ NtCurrentTeb()->NtTib.ArbitraryUserPointer = ArbitraryUserPointer;
if (!NT_SUCCESS(Status))
{
DPRINT1("map view of section failed (Status 0x%08lx)\n", Status);
RtlEnterCriticalSection(NtCurrentPeb()->LoaderLock);
InsertTailList(&NtCurrentPeb()->Ldr->InInitializationOrderModuleList,
- &(*Module)->InInitializationOrderModuleList);
+ &(*Module)->InInitializationOrderLinks);
RtlLeaveCriticalSection (NtCurrentPeb()->LoaderLock);
}
return STATUS_SUCCESS;
Entry = ModuleListHead->Blink;
while (Entry != ModuleListHead)
{
- Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InInitializationOrderModuleList);
+ Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InInitializationOrderLinks);
if (((UnloadAll && Module->LoadCount == LDRP_PROCESS_CREATION_TIME) || Module->LoadCount == 0) &&
Module->Flags & LDRP_ENTRY_PROCESSED &&
!(Module->Flags & LDRP_UNLOAD_IN_PROGRESS))
{
TRACE_LDR("Unload %wZ - Calling entry point at %x\n",
&Module->BaseDllName, Module->EntryPoint);
- LdrpCallDllEntry(Module, DLL_PROCESS_DETACH, (PVOID)(Module->LoadCount == LDRP_PROCESS_CREATION_TIME ? 1 : 0));
+ LdrpCallDllEntry(Module, DLL_PROCESS_DETACH, (PVOID)(INT_PTR)(Module->LoadCount == LDRP_PROCESS_CREATION_TIME ? 1 : 0));
}
else
{
Entry = ModuleListHead->Blink;
while (Entry != ModuleListHead)
{
- Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InInitializationOrderModuleList);
+ Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InInitializationOrderLinks);
Entry = Entry->Blink;
if (Module->Flags & LDRP_UNLOAD_IN_PROGRESS &&
((UnloadAll && Module->LoadCount != LDRP_PROCESS_CREATION_TIME) || Module->LoadCount == 0))
{
/* remove the module entry from the list */
RemoveEntryList (&Module->InLoadOrderLinks);
- RemoveEntryList (&Module->InInitializationOrderModuleList);
+ RemoveEntryList (&Module->InInitializationOrderLinks);
NtUnmapViewOfSection (NtCurrentProcess (), Module->DllBase);
NtClose (Module->SectionPointer);
Entry = ModuleListHead->Flink;
while (Entry != ModuleListHead)
{
- Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InInitializationOrderModuleList);
+ Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InInitializationOrderLinks);
if (!(Module->Flags & (LDRP_LOAD_IN_PROGRESS|LDRP_UNLOAD_IN_PROGRESS|LDRP_ENTRY_PROCESSED)))
{
Module->Flags |= LDRP_LOAD_IN_PROGRESS;
TRACE_LDR("%wZ loaded - Calling init routine at %x for process attaching\n",
&Module->BaseDllName, Module->EntryPoint);
- Result = LdrpCallDllEntry(Module, DLL_PROCESS_ATTACH, (PVOID)(Module->LoadCount == LDRP_PROCESS_CREATION_TIME ? 1 : 0));
+ Result = LdrpCallDllEntry(Module, DLL_PROCESS_ATTACH, (PVOID)(INT_PTR)(Module->LoadCount == LDRP_PROCESS_CREATION_TIME ? 1 : 0));
if (!Result)
{
Status = STATUS_DLL_INIT_FAILED;
while (Entry != ModuleListHead)
{
- Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InInitializationOrderModuleList);
+ Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InInitializationOrderLinks);
if (Module->Flags & LDRP_PROCESS_ATTACH_CALLED &&
!(Module->Flags & LDRP_DONT_CALL_FOR_THREADS) &&
!(Module->Flags & LDRP_UNLOAD_IN_PROGRESS))
Entry = ModuleListHead->Blink;
while (Entry != ModuleListHead)
{
- Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InInitializationOrderModuleList);
+ Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InInitializationOrderLinks);
if (Module->Flags & LDRP_PROCESS_ATTACH_CALLED &&
!(Module->Flags & LDRP_DONT_CALL_FOR_THREADS) &&
LongPtr = (PULONG)((ULONG_PTR)Address + Offset);
*LongPtr += Delta;
break;
+#ifdef _WIN64
+ case IMAGE_REL_BASED_DIR64:
+ LongPtr = (PULONG)((ULONG_PTR)Address + Offset);
+ *LongPtr += Delta;
+ break;
+#endif
case IMAGE_REL_BASED_HIGHADJ:
case IMAGE_REL_BASED_MIPS_JMPADDR:
}
/* FIXME: Cookie is based on part of the thread id */
- *Cookie = (ULONG)NtCurrentTeb()->RealClientId.UniqueThread;
+ *Cookie = (ULONG_PTR)NtCurrentTeb()->RealClientId.UniqueThread;
return Status;
}
if (Flags != 0x01)
return STATUS_INVALID_PARAMETER_1;
- if (Cookie != (ULONG)NtCurrentTeb()->RealClientId.UniqueThread)
+ if (Cookie != (ULONG_PTR)NtCurrentTeb()->RealClientId.UniqueThread)
return STATUS_INVALID_PARAMETER_2;
RtlLeaveCriticalSection(NtCurrentPeb()->LoaderLock);
<file>dispatch.S</file>
</directory>
</if>
+ <if property="ARCH" value="amd64">
+ <directory name="amd64">
+ <file>stubs.c</file>
+ </directory>
+ </if>
<if property="ARCH" value="arm">
<directory name="arm">
<file>stubs_asm.s</file>
SIZE_T RtlpAllocDeallocQueryBufferSize = PAGE_SIZE;
PTEB LdrpTopLevelDllBeingLoadedTeb = NULL;
+#define IMAGE_DOS_MAGIC 0x5a4d
+#define IMAGE_PE_MAGIC 0x00004550
/* FUNCTIONS ***************************************************************/
+#ifndef _M_AMD64
+// FIXME: Why "Not implemented"???
/*
* @implemented
*/
/* Not implemented for user-mode */
return 0;
}
+#endif
BOOLEAN
NTAPI
RtlAcquirePebLock(VOID)
{
PPEB Peb = NtCurrentPeb ();
- Peb->FastPebLockRoutine (Peb->FastPebLock);
+ RtlEnterCriticalSection(Peb->FastPebLock);
}
/*
RtlReleasePebLock(VOID)
{
PPEB Peb = NtCurrentPeb ();
- Peb->FastPebUnlockRoutine (Peb->FastPebLock);
+ RtlLeaveCriticalSection(Peb->FastPebLock);
}
/*
IN ULONG_PTR *StackEnd)
{
/* FIXME: Verify */
- *StackBegin = (ULONG_PTR)NtCurrentTeb()->Tib.StackLimit;
- *StackEnd = (ULONG_PTR)NtCurrentTeb()->Tib.StackBase;
+ *StackBegin = (ULONG_PTR)NtCurrentTeb()->NtTib.StackLimit;
+ *StackEnd = (ULONG_PTR)NtCurrentTeb()->NtTib.StackBase;
return TRUE;
}
+#ifdef _AMD64_
+VOID
+NTAPI
+RtlpGetStackLimits(
+ OUT PULONG_PTR LowLimit,
+ OUT PULONG_PTR HighLimit)
+{
+ *LowLimit = (ULONG_PTR)NtCurrentTeb()->NtTib.StackLimit;
+ *HighLimit = (ULONG_PTR)NtCurrentTeb()->NtTib.StackBase;
+ return;
+}
+#endif
+
BOOLEAN
NTAPI
RtlIsThreadWithinLoaderCallout(VOID)
return NULL;
}
-
/*
* Ldr Resource support code
*/
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/* $Id: acledit.c 35011 2008-08-01 16:29:40Z sginsberg $
+/* $Id$
*
* PROJECT: ReactOS Access Control List Editor
* FILE: lib/acledit/acledit.c
-/* $Id: stubs.c 35011 2008-08-01 16:29:40Z sginsberg $
+/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Access Control List Editor
<library>rpcrt4</library>
<library>pseh</library>
<file>usrmarshal.c</file>
- <compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
</module>
<module name="actxprxy_interface" type="idlinterface">
<file>actxprxy_servprov.idl</file>
<file>token.c</file>
</directory>
<file>advapi32.rc</file>
- <compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
</module>
NtClose(Handle); \
}
#define IsPredefKey(HKey) \
- (((ULONG)(HKey) & 0xF0000000) == 0x80000000)
+ (((ULONG_PTR)(HKey) & 0xF0000000) == 0x80000000)
#define GetPredefKeyIndex(HKey) \
- ((ULONG)(HKey) & 0x0FFFFFFF)
+ ((ULONG_PTR)(HKey) & 0x0FFFFFFF)
static NTSTATUS OpenClassesRootKey(PHANDLE KeyHandle);
static NTSTATUS OpenLocalMachineKey (PHANDLE KeyHandle);
{
DWORD ErrorCode;
- if (InterlockedCompareExchangePointer(&NtMarta,
+ if (InterlockedCompareExchangePointer((PVOID)&NtMarta,
NULL,
NULL) == NULL)
{
if (ErrorCode == ERROR_SUCCESS)
{
/* try change the NtMarta pointer */
- if (InterlockedCompareExchangePointer(&NtMarta,
+ if (InterlockedCompareExchangePointer((PVOID)&NtMarta,
&NtMartaStatic,
NULL) != NULL)
{
VOID
UnloadNtMarta(VOID)
{
- if (InterlockedExchangePointer(&NtMarta,
+ if (InterlockedExchangePointer((PVOID)&NtMarta,
NULL) != NULL)
{
FreeLibrary(NtMartaStatic.hDllInstance);
/* One or two buffers are insufficient, add up a char for NULL termination */
*pdwAccountName = dwAccountName + 1;
*pdwDomainName = dwDomainName + 1;
- ret = FALSE;
+ ret = FALSE;
} else
- {
+ {
/* Lengths are sufficient, copy the data */
if(dwAccountName)
RtlCopyMemory(pAccountName, TranslatedName->Name.Buffer, dwAccountName * sizeof(WCHAR));
*pdwAccountName = dwAccountName;
*pdwDomainName = dwDomainName;
- if (peUse)
+ if ( peUse )
*peUse = TranslatedName->Use;
}
-
+
if ( !ret )
SetLastError(ERROR_INSUFFICIENT_BUFFER);
}
TRACE("Size: %lu\n", ControlPacket->dwSize);
TRACE("Service: %S\n", &ControlPacket->szArguments[0]);
- lpService = (PACTIVE_SERVICE)ControlPacket->hClient;
+ lpService = (PACTIVE_SERVICE)(ULONG_PTR)ControlPacket->hClient;
if (lpService == NULL)
{
TRACE("Service not found\n");
TRACE("Size: %lu\n", ControlPacket->dwSize);
TRACE("Service: %S\n", &ControlPacket->szArguments[0]);
- lpService = (PACTIVE_SERVICE)ControlPacket->hClient;
+ lpService = (PACTIVE_SERVICE)(ULONG_PTR)ControlPacket->hClient;
if (lpService == NULL)
{
TRACE("Service not found\n");
nWidth,
nHeight,
hWnd,
- (HMENU)nID,
+ ULongToHandle(nID),
hInstance,
NULL);
}
DWORD_PTR parameter1,
DWORD_PTR parameter2)
{
- DPRINT("Calling client - callback 0x%x mmhandle 0x%x\n", (int) device_info->callback, device_info->mme_handle);
+ DPRINT("Calling client - callback 0x%x mmhandle 0x%x\n", device_info->callback, device_info->mme_handle);
return DriverCallback(device_info->callback,
HIWORD(device_info->flags),
device_info->mme_handle,
header->dwFlags |= MHDR_DONE;
header->dwFlags &= ~ MHDR_INQUEUE;
- DPRINT("Success? %d\n", CallClient(the_device, MOM_DONE, (DWORD_PTR) header, 0));
+ DPRINT("Success? %d\n", CallClient(the_device, MOM_DONE, (DWORD_PTR)header, 0));
return MMSYSERR_NOERROR;
}
LRESULT CToolbarProxy::OnAddBitmap(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
{
- LRESULT result;
+ long int result;
HRESULT hResult;
result = 0;
VOID WINAPI
InitCommonControls (void)
{
+ return;
}
<file>message.c</file>
<file>crypt32.rc</file>
<file>version.rc</file>
- <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
- <compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
</module>
#include "crypt32_En.rc"
#include "crypt32_Fr.rc"
#include "crypt32_Ko.rc"
-#include "crypt32_Lt.rc"
#include "crypt32_Nl.rc"
#include "crypt32_No.rc"
#include "crypt32_Pt.rc"
-#include "crypt32_Ro.rc"
#include "crypt32_Sv.rc"
-<module name="gdi32" type="win32dll" baseaddress="${BASEADDRESS_GDI32}" installbase="system32" installname="gdi32.dll" unicode="yes" crt="dll">
+<module name="gdi32" type="win32dll" baseaddress="${BASEADDRESS_GDI32}" installbase="system32" installname="gdi32.dll" unicode="yes" crt="dll" allowwarnings=true>
<importlibrary definition="gdi32.spec" />
<include base="gdi32">include</include>
<define name="LANGPACK" />
<library>pseh</library>
<library>dxguid</library>
<library>ntdll</library>
- <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269
<directory name="include">
<pch>precomp.h</pch>
</directory>
- -->
<directory name="main">
<file>dllmain.c</file>
</directory>
<file>path.c</file>
</directory>
<file>gdi32.rc</file>
- <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
- <compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
</module>
RtlMoveMemory(&SurfaceMore.ddsCapsEx,
&pSurface->ddckCKDestBlt,
sizeof(DDSCAPSEX));
- SurfaceMore.dwSurfaceHandle = (DWORD)pSurface->dbnOverlayNode.object_int->lpVtbl;
+ SurfaceMore.dwSurfaceHandle = PtrToUlong(pSurface->dbnOverlayNode.object_int->lpVtbl);
/* Set up SurfaceGlobal struct */
SurfaceGlobal.fpVidMem = pSurface->lpGbl->fpVidMem;
}
/* Create the object */
- pSurface->hDDSurface = (DWORD)NtGdiDdCreateSurfaceObject(GetDdHandle(pSurface->lpGbl->lpDD->hDD),
- (HANDLE)pSurface->hDDSurface,
- &SurfaceLocal,
- &SurfaceMore,
- &SurfaceGlobal,
- bComplete);
+ pSurface->hDDSurface = (ULONG_PTR)NtGdiDdCreateSurfaceObject(GetDdHandle(pSurface->lpGbl->lpDD->hDD),
+ (HANDLE)pSurface->hDDSurface,
+ &SurfaceLocal,
+ &SurfaceMore,
+ &SurfaceGlobal,
+ bComplete);
/* Return status */
if (pSurface->hDDSurface) return TRUE;
-typedef int (WINAPI *CHOOSEPIXELFMT) (HDC, CONST PIXELFORMATDESCRIPTOR *);
-typedef BOOL (WINAPI *SETPIXELFMT) (HDC, int, CONST PIXELFORMATDESCRIPTOR *);
-typedef BOOL (WINAPI *SWAPBUFFERS) (HDC hdc);
-typedef int (WINAPI *DESCRIBEPIXELFMT) (HDC, int, UINT, LPPIXELFORMATDESCRIPTOR);
-typedef int (WINAPI *GETPIXELFMT) (HDC);
+typedef INT_PTR (WINAPI *CHOOSEPIXELFMT) (HDC, CONST PIXELFORMATDESCRIPTOR *);
+typedef INT_PTR (WINAPI *SETPIXELFMT) (HDC, int, CONST PIXELFORMATDESCRIPTOR *);
+typedef INT_PTR (WINAPI *SWAPBUFFERS) (HDC hdc);
+typedef INT_PTR (WINAPI *DESCRIBEPIXELFMT) (HDC, int, UINT, LPPIXELFORMATDESCRIPTOR);
+typedef INT_PTR (WINAPI *GETPIXELFMT) (HDC);
static CHOOSEPIXELFMT glChoosePixelFormat = NULL;
}
}
- if ((ULONG)lpvBits & (sizeof(DWORD) - 1))
+ if (((ULONG_PTR)lpvBits) & (sizeof(DWORD) - 1))
{
pvSafeBits = RtlAllocateHeap(RtlGetProcessHeap(), 0, cjBmpScanSize);
if (!pvSafeBits)
/* From Wine: DeleteObject does not SetLastError() on a null object */
if(!hObject) return FALSE;
- if (0 != ((DWORD) hObject & GDI_HANDLE_STOCK_MASK))
+ if (0 != (HandleToUlong(hObject) & GDI_HANDLE_STOCK_MASK))
{ // Relax! This is a normal return!
DPRINT("Trying to delete system object 0x%x\n", hObject);
return TRUE;
switch (uType)
{
case GDI_OBJECT_TYPE_REGION:
- return (HGDIOBJ)ExtSelectClipRgn(hDC, hGdiObj, RGN_COPY);
+ return ULongToHandle(ExtSelectClipRgn(hDC, hGdiObj, RGN_COPY));
case GDI_OBJECT_TYPE_BITMAP:
return NtGdiSelectBitmap(hDC, hGdiObj);
if (pPDev->Sig != PDEV_UMPD_ID)
{
- pPDev = (PUMPDEV)pPDev->Sig;
+ pPDev = (PUMPDEV)ULongToPtr(pPDev->Sig);//wtf?
}
return pPDev->pdi5Info->pDriverPath;
}
if (pPDev->Sig != PDEV_UMPD_ID)
{
- pPDev = (PUMPDEV)pPDev->Sig;
+ pPDev = (PUMPDEV)ULongToPtr(pPDev->Sig);//wtf
}
return pPDev->pdi5Info->pDataFile;
}
needed = sizeof(OUTLINETEXTMETRICA);
if(lpOTMW->otmpFamilyName)
needed += WideCharToMultiByte(CP_ACP, 0,
- (WCHAR*)((char*)lpOTMW + (int)lpOTMW->otmpFamilyName), -1,
+ (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpFamilyName), -1,
NULL, 0, NULL, NULL);
if(lpOTMW->otmpFaceName)
needed += WideCharToMultiByte(CP_ACP, 0,
- (WCHAR*)((char*)lpOTMW + (int)lpOTMW->otmpFaceName), -1,
+ (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpFaceName), -1,
NULL, 0, NULL, NULL);
if(lpOTMW->otmpStyleName)
needed += WideCharToMultiByte(CP_ACP, 0,
- (WCHAR*)((char*)lpOTMW + (int)lpOTMW->otmpStyleName), -1,
+ (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpStyleName), -1,
NULL, 0, NULL, NULL);
if(lpOTMW->otmpFullName)
needed += WideCharToMultiByte(CP_ACP, 0,
- (WCHAR*)((char*)lpOTMW + (int)lpOTMW->otmpFullName), -1,
+ (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpFullName), -1,
NULL, 0, NULL, NULL);
if(!lpOTM) {
if(lpOTMW->otmpFamilyName) {
output->otmpFamilyName = (LPSTR)(ptr - (char*)output);
len = WideCharToMultiByte(CP_ACP, 0,
- (WCHAR*)((char*)lpOTMW + (int)lpOTMW->otmpFamilyName), -1,
+ (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpFamilyName), -1,
ptr, left, NULL, NULL);
left -= len;
ptr += len;
if(lpOTMW->otmpFaceName) {
output->otmpFaceName = (LPSTR)(ptr - (char*)output);
len = WideCharToMultiByte(CP_ACP, 0,
- (WCHAR*)((char*)lpOTMW + (int)lpOTMW->otmpFaceName), -1,
+ (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpFaceName), -1,
ptr, left, NULL, NULL);
left -= len;
ptr += len;
if(lpOTMW->otmpStyleName) {
output->otmpStyleName = (LPSTR)(ptr - (char*)output);
len = WideCharToMultiByte(CP_ACP, 0,
- (WCHAR*)((char*)lpOTMW + (int)lpOTMW->otmpStyleName), -1,
+ (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpStyleName), -1,
ptr, left, NULL, NULL);
left -= len;
ptr += len;
if(lpOTMW->otmpFullName) {
output->otmpFullName = (LPSTR)(ptr - (char*)output);
len = WideCharToMultiByte(CP_ACP, 0,
- (WCHAR*)((char*)lpOTMW + (int)lpOTMW->otmpFullName), -1,
+ (WCHAR*)((char*)lpOTMW + (ptrdiff_t)lpOTMW->otmpFullName), -1,
ptr, left, NULL, NULL);
left -= len;
} else
WINAPI
CreatePolygonRgn( const POINT * lppt, int cPoints, int fnPolyFillMode)
{
- return (HRGN) NtGdiPolyPolyDraw( (HDC) fnPolyFillMode, (PPOINT) lppt, (PULONG) &cPoints, 1, GdiPolyPolyRgn);
+ return (HRGN) NtGdiPolyPolyDraw( ULongToHandle(fnPolyFillMode), (PPOINT) lppt, (PULONG) &cPoints, 1, GdiPolyPolyRgn);
}
/*
int nCount,
int fnPolyFillMode)
{
- return (HRGN) NtGdiPolyPolyDraw( (HDC) fnPolyFillMode, (PPOINT) lppt, (PULONG) lpPolyCounts, (ULONG) nCount, GdiPolyPolyRgn );
+ return (HRGN) NtGdiPolyPolyDraw( ULongToHandle(fnPolyFillMode), (PPOINT) lppt, (PULONG) lpPolyCounts, (ULONG) nCount, GdiPolyPolyRgn );
}
/*
}
else
{
- FIXME("Unimplemented hatch style %d\n", hatchstyle);
+ FIXME("Unimplemented hatch style %d\n", hatchstyle);
- (*brush)->brush.lb.lbStyle = BS_SOLID;
- (*brush)->brush.lb.lbColor = fgcol;
- (*brush)->brush.lb.lbHatch = 0;
+ (*brush)->brush.lb.lbStyle = BS_SOLID;
+ (*brush)->brush.lb.lbColor = fgcol;
+ (*brush)->brush.lb.lbHatch = 0;
(*brush)->brush.gdibrush = CreateBrushIndirect(&(*brush)->brush.lb);
}
if (stat == Ok)
{
- (*brush)->brush.bt = BrushTypeHatchFill;
- (*brush)->forecol = forecol;
- (*brush)->backcol = backcol;
- (*brush)->hatchstyle = hatchstyle;
+ (*brush)->brush.bt = BrushTypeHatchFill;
+ (*brush)->forecol = forecol;
+ (*brush)->backcol = backcol;
+ (*brush)->hatchstyle = hatchstyle;
}
else
{
}
if (points)
- add_arc_part(&points[i], x1, y1, x2, y2, start_angle, end_angle, i == 0);
+ add_arc_part(&points[i], x1, y1, x2, y2, start_angle, end_angle, i == 0);
start_angle += M_PI_2 * (sweepAngle < 0.0 ? -1.0 : 1.0);
}
<library>gdi32</library>
<library>windowscodecs</library>
<library>ntdll</library>
+ <if property="ARCH" value="amd64">
+ <library>crt</library>
+ </if>
</module>
</group>
}
if (brush->pblendcount == 0)
- return blend_colors(brush->startcolor, brush->endcolor, blendfac);
+ return blend_colors(brush->startcolor, brush->endcolor, blendfac);
else
{
int i=1;
right_blendcolor = brush->pblendcolor[i];
blendfac = (blendfac - left_blendpos) / (right_blendpos - left_blendpos);
return blend_colors(left_blendcolor, right_blendcolor, blendfac);
- }
+}
}
static void brush_fill_path(GpGraphics *graphics, GpBrush* brush)
break;
default:
FIXME("not implemented for format 0x%x\n", bitmap->format);
- return NotImplemented;
- }
+ return NotImplemented;
+}
*color = a<<24|r<<16|g<<8|b;
break;
default:
FIXME("not implemented for format 0x%x\n", bitmap->format);
- return NotImplemented;
- }
+ return NotImplemented;
+}
return Ok;
}
bitmap = (GpBitmap*)*image;
if (status == Ok && bitmap->format == PixelFormat32bppARGB)
- {
+{
/* WIC supports bmp files with alpha, but gdiplus does not */
bitmap->format = PixelFormat32bppRGB;
}
return status;
-}
+ }
static GpStatus decode_image_jpeg(IStream* stream, REFCLSID clsid, GpImage **image)
{
return decode_image_wic(stream, &CLSID_WICJpegDecoder, image);
-}
+ }
static GpStatus decode_image_png(IStream* stream, REFCLSID clsid, GpImage **image)
-{
+ {
return decode_image_wic(stream, &CLSID_WICPngDecoder, image);
-}
+ }
static GpStatus decode_image_gif(IStream* stream, REFCLSID clsid, GpImage **image)
{
if (stat == Ok)
{
memcpy(&(*image)->format, &codec->info.FormatID, sizeof(GUID));
- }
+}
return stat;
}
-@ stdcall gluBeginCurve(ptr)
-@ stdcall gluBeginPolygon(ptr)
-@ stdcall gluBeginSurface(ptr)
-@ stdcall gluBeginTrim(ptr)
-@ stdcall gluBuild1DMipmapLevels(long long long long long long long long ptr)
-@ stdcall gluBuild1DMipmaps(long long long long long ptr)
-@ stdcall gluBuild2DMipmapLevels(long long long long long long long long long ptr)
-@ stdcall gluBuild2DMipmaps(long long long long long long ptr)
-@ stdcall gluBuild3DMipmapLevels(long long long long long long long long long long ptr)
-@ stdcall gluBuild3DMipmaps(long long long long long long long ptr)
-@ stdcall gluCheckExtension(str ptr)
-@ stdcall gluCylinder(ptr double double double long long)
-@ stdcall gluDeleteNurbsRenderer(ptr)
-@ stdcall gluDeleteQuadric(ptr)
-@ stdcall gluDeleteTess(ptr)
-@ stdcall gluDisk(ptr double double long long)
-@ stdcall gluEndCurve(ptr)
-@ stdcall gluEndPolygon(ptr)
-@ stdcall gluEndSurface(ptr)
-@ stdcall gluEndTrim(ptr)
-@ stdcall gluErrorString(long)
-@ stdcall gluGetNurbsProperty(ptr long ptr)
-@ stdcall gluGetString(long)
-@ stdcall gluGetTessProperty(ptr long ptr)
-@ stdcall gluLoadSamplingMatrices(ptr ptr ptr ptr)
-@ stdcall gluLookAt(double double double double double double double double double)
-@ stdcall gluNewNurbsRenderer()
-@ stdcall gluNewQuadric()
-@ stdcall gluNewTess()
-@ stdcall gluNextContour(ptr long)
-@ stdcall gluNurbsCallback(ptr long ptr)
-@ stdcall gluNurbsCallbackData(ptr ptr)
-@ stdcall gluNurbsCallbackDataEXT(ptr ptr)
-@ stdcall gluNurbsCurve(ptr long ptr long ptr long long)
-@ stdcall gluNurbsProperty(ptr long long)
-@ stdcall gluNurbsSurface(ptr long ptr long ptr long long ptr long long long)
-@ stdcall gluOrtho2D(double double double double)
-@ stdcall gluPartialDisk(ptr double double long long double double)
-@ stdcall gluPerspective(double double double double)
-@ stdcall gluPickMatrix(double double double double ptr)
-@ stdcall gluProject(double double double ptr ptr ptr ptr ptr ptr)
-@ stdcall gluPwlCurve(ptr long ptr long long)
-@ stdcall gluQuadricCallback(ptr long ptr)
-@ stdcall gluQuadricDrawStyle(ptr long)
-@ stdcall gluQuadricNormals(ptr long)
-@ stdcall gluQuadricOrientation(ptr long)
-@ stdcall gluQuadricTexture(ptr long)
-@ stdcall gluScaleImage(long long long long ptr long long long ptr)
-@ stdcall gluSphere(ptr double long long)
-@ stdcall gluTessBeginContour(ptr)
-@ stdcall gluTessBeginPolygon(ptr ptr)
-@ stdcall gluTessCallback(ptr long ptr)
-@ stdcall gluTessEndContour(ptr)
-@ stdcall gluTessEndPolygon(ptr)
-@ stdcall gluTessNormal(ptr double double double)
-@ stdcall gluTessProperty(ptr long double)
-@ stdcall gluTessVertex(ptr ptr ptr)
-@ stdcall gluUnProject(double double double ptr ptr ptr ptr ptr ptr)
-@ stdcall gluUnProject4(double double double double ptr ptr ptr double double ptr ptr ptr ptr)
+@ stdcall gluBeginCurve(ptr)
+@ stdcall gluBeginPolygon(ptr)
+@ stdcall gluBeginSurface(ptr)
+@ stdcall gluBeginTrim(ptr)
+@ stdcall gluBuild1DMipmaps(long long long long long ptr)
+@ stdcall gluBuild2DMipmaps(long long long long long long ptr)
+@ stdcall gluCheckExtension(str ptr)
+@ stdcall gluCylinder(ptr double double double long long)
+@ stdcall gluDeleteNurbsRenderer(ptr)
+@ stdcall gluDeleteQuadric(ptr)
+@ stdcall gluDeleteTess(ptr)
+@ stdcall gluDisk(ptr double double long long)
+@ stdcall gluEndCurve(ptr)
+@ stdcall gluEndPolygon(ptr)
+@ stdcall gluEndSurface(ptr)
+@ stdcall gluEndTrim(ptr)
+@ stdcall gluErrorString(long)
+@ stub gluErrorUnicodeStringEXT
+@ stdcall gluGetNurbsProperty(ptr long ptr)
+@ stdcall gluGetString(long)
+@ stdcall gluGetTessProperty(ptr ptr ptr)
+@ stdcall gluLoadSamplingMatrices(ptr ptr ptr ptr)
+@ stdcall gluLookAt(double double double double double double double double double)
+@ stdcall gluNewNurbsRenderer()
+@ stdcall gluNewQuadric()
+@ stdcall gluNewTess()
+@ stdcall gluNextContour(ptr long)
+@ stdcall gluNurbsCallback(ptr long ptr)
+@ stdcall gluNurbsCurve(ptr long ptr long ptr long long)
+@ stdcall gluNurbsProperty(ptr long long)
+@ stdcall gluNurbsSurface(ptr long ptr long ptr long long ptr long long long)
+@ stdcall gluOrtho2D(double double double double)
+@ stdcall gluPartialDisk(ptr double double long long double double)
+@ stdcall gluPerspective(double double double double)
+@ stdcall gluPickMatrix(double double double double ptr)
+@ stdcall gluProject(double double double ptr ptr ptr ptr ptr ptr)
+@ stdcall gluPwlCurve(ptr long ptr long long)
+@ stdcall gluQuadricCallback(ptr long ptr)
+@ stdcall gluQuadricDrawStyle(ptr long)
+@ stdcall gluQuadricNormals(ptr long)
+@ stdcall gluQuadricOrientation(ptr long)
+@ stdcall gluQuadricTexture(ptr long)
+@ stdcall gluScaleImage(long long long long ptr long long long ptr)
+@ stdcall gluSphere(ptr double long long)
+@ stdcall gluTessBeginContour(ptr)
+@ stdcall gluTessBeginPolygon(ptr ptr)
+@ stdcall gluTessCallback(ptr long ptr)
+@ stdcall gluTessEndContour(ptr)
+@ stdcall gluTessEndPolygon(ptr)
+@ stdcall gluTessNormal(ptr double double double)
+@ stdcall gluTessProperty(ptr long double)
+@ stdcall gluTessVertex(ptr ptr ptr)
+@ stdcall gluUnProject(double double double ptr ptr ptr ptr ptr ptr)
\ No newline at end of file
-<module name="imagehlp" type="win32dll" baseaddress="${BASEADDRESS_IMAGEHLP}" installbase="system32" installname="imagehlp.dll">
+<module name="imagehlp" type="win32dll" baseaddress="${BASEADDRESS_IMAGEHLP}" installbase="system32" installname="imagehlp.dll" allowwarnings="true">
<importlibrary definition="imagehlp.spec" />
<include base="imagehlp">.</include>
<define name="_IMAGEHLP_SOURCE_"></define>
# include <resolv.h>
#endif
-#undef _WIN32_WINNT
-#define _WIN32_WINNT 0x500
#define WIN32_NO_STATUS
#include <winsock2.h>
#include <ws2tcpip.h>
RtlAllocateHeap (
HANDLE Heap,
ULONG Flags,
- ULONG Size
+ SIZE_T Size
);
NTSYSAPI
CLIENT_ID ClientId;
/* If we don't have a PID, look it up */
- if (dwProcessId == MAXDWORD) dwProcessId = (DWORD)CsrGetProcessId();
+ if (dwProcessId == MAXDWORD) dwProcessId = (DWORD_PTR)CsrGetProcessId();
/* Open a handle to the process */
ClientId.UniqueThread = NULL;
- ClientId.UniqueProcess = (HANDLE)dwProcessId;
+ ClientId.UniqueProcess = (HANDLE)(ULONG_PTR)dwProcessId;
InitializeObjectAttributes(&ObjectAttributes, NULL, 0, NULL, NULL);
Status = NtOpenProcess(&Handle,
PROCESS_ALL_ACCESS,
return psz;
}
-#ifdef _M_IX86
+
static VOID
_dump_context(PCONTEXT pc)
{
+#ifdef _M_IX86
/*
* Print out the CPU registers
*/
DbgPrint("EDX: %.8x EBP: %.8x ESI: %.8x ESP: %.8x\n", pc->Edx,
pc->Ebp, pc->Esi, pc->Esp);
DbgPrint("EDI: %.8x EFLAGS: %.8x\n", pc->Edi, pc->EFlags);
-}
+#elif defined(_M_AMD64)
+ DbgPrint("CS:EIP %x:%I64x\n", pc->SegCs&0xffff, pc->Rip );
+ DbgPrint("DS %x ES %x FS %x GS %x\n", pc->SegDs&0xffff, pc->SegEs&0xffff,
+ pc->SegFs&0xffff, pc->SegGs&0xfff);
+ DbgPrint("RAX: %I64x RBX: %I64x RCX: %I64x RDI: %I64x\n", pc->Rax, pc->Rbx, pc->Rcx, pc->Rdi);
+ DbgPrint("RDX: %I64x RBP: %I64x RSI: %I64x RSP: %I64x\n", pc->Rdx, pc->Rbp, pc->Rsi, pc->Rsp);
+ DbgPrint("R8: %I64x R9: %I64x R10: %I64x R11: %I64x\n", pc->R8, pc->R9, pc->R10, pc->R11);
+ DbgPrint("R12: %I64x R13: %I64x R14: %I64x R15: %I64x\n", pc->R12, pc->R13, pc->R14, pc->R15);
+ DbgPrint("EFLAGS: %.8x\n", pc->EFlags);
#else
#warning Unknown architecture
-static VOID
-_dump_context(PCONTEXT pc)
-{
-}
#endif
+}
static LONG
BasepCheckForReadOnlyResource(IN PVOID Ptr)
{
PVOID Data;
- ULONG Size, OldProtect;
+ SIZE_T Size;
+ ULONG OldProtect;
MEMORY_BASIC_INFORMATION mbi;
NTSTATUS Status;
LONG Ret = EXCEPTION_CONTINUE_SEARCH;
LONG RetValue;
HANDLE DebugPort = NULL;
NTSTATUS ErrCode;
- ULONG ErrorParameters[4];
+ ULONG_PTR ErrorParameters[4];
ULONG ErrorResponse;
if ((NTSTATUS)ExceptionInfo->ExceptionRecord->ExceptionCode == STATUS_ACCESS_VIOLATION &&
if ((GetErrorMode() & SEM_NOGPFAULTERRORBOX) == 0)
{
-#ifdef _X86_
+#ifdef __i386__
PULONG Frame;
#endif
PVOID StartAddr;
/* Save exception code and address */
ErrorParameters[0] = (ULONG)ExceptionInfo->ExceptionRecord->ExceptionCode;
- ErrorParameters[1] = (ULONG)ExceptionInfo->ExceptionRecord->ExceptionAddress;
+ ErrorParameters[1] = (ULONG_PTR)ExceptionInfo->ExceptionRecord->ExceptionAddress;
if ((NTSTATUS)ExceptionInfo->ExceptionRecord->ExceptionCode == STATUS_ACCESS_VIOLATION)
{
hFile = TranslateStdHandle(hFile);
- if (IsConsoleHandle(hFile))
+ if (IsConsoleHandle((ULONG_PTR)hFile))
{
return WriteConsoleA(hFile,
lpBuffer,
@ stdcall AddAtomW(wstr)
@ stdcall AddConsoleAliasA(str str str) ;check
@ stdcall AddConsoleAliasW(wstr wstr wstr) ;check
+;@ stdcall -arch=x86_64 AddIntegrityLabelToBoundaryDescriptor ; Win 7
@ stdcall AddLocalAlternateComputerNameA(str ptr)
@ stdcall AddLocalAlternateComputerNameW(wstr ptr)
@ stdcall AddRefActCtx(ptr)
@ stdcall AddVectoredContinueHandler(long ptr) ntdll.RtlAddVectoredContinueHandler
@ stdcall AddVectoredExceptionHandler(long ptr) ntdll.RtlAddVectoredExceptionHandler
+;@ stdcall AdjustCalendarDate ; Win 7
@ stdcall AllocConsole()
-@ stub AllocLSCallback ; missing in XP SP3 and 2003 R2
+@ stub AllocLSCallback ; missing in XP SP3 and 2003 R2 and Win 7
@ stdcall AllocateUserPhysicalPages(long ptr ptr)
+;@ stdcall AllocateUserPhysicalPagesNuma ; Win 7
+;@ stdcall ApplicationRecoveryFinished ; Win 7
+;@ stdcall ApplicationRecoveryInProgress ; Win 7
@ stdcall AreFileApisANSI()
@ stdcall AssignProcessToJobObject(ptr ptr)
@ stdcall AttachConsole(long)
@ stdcall BackupSeek(ptr long long ptr ptr ptr)
@ stdcall BackupWrite(ptr ptr long ptr long long ptr)
@ stdcall BaseCheckAppcompatCache(long long long ptr) ;check
+;@ stdcall BaseCheckAppcompatCacheEx ; Win7
@ stub BaseCheckRunApp
-@ stdcall BaseCleanupAppcompatCache()
+@ stdcall BaseCleanupAppcompatCache() ; missing in Win 7
@ stdcall BaseCleanupAppcompatCacheSupport(ptr)
+;@ stdcall BaseDllReadWriteIniFile ; Win 7
@ stdcall BaseDumpAppcompatCache()
@ stdcall BaseFlushAppcompatCache()
-@ stdcall BaseInitAppcompatCache()
+;@ stdcall BaseFormatObjectAttributes ; Win 7
+;@ stdcall BaseFormatTimeOut ; Win 7
+;@ stdcall BaseGenerateAppCompatData ; Win 7
+;@ stdcall BaseGetNamedObjectDirectory ; Win 7
+@ stdcall BaseInitAppcompatCache() ; missing in Win 7
@ stdcall BaseInitAppcompatCacheSupport()
-@ stdcall BaseProcessInitPostImport()
+;@ stdcall BaseIsAppcompatInfrastructureDisabled ; Win 7
+@ stdcall BaseProcessInitPostImport() ; missing in Win 7
@ stdcall BaseQueryModuleData(str str ptr ptr ptr) ;check
+;@ stdcall BaseThreadInitThunk ; Win 7
+;@ stdcall BaseSetLastNTError ; Win 7, not 64 bit
@ stdcall BaseUpdateAppcompatCache(long long long)
+;@ stdcall BaseVerifyUnicodeString ; Win 7
+;@ stdcall Basep8BitStringToDynamicUnicodeString ; Win 7
+;@ stdcall BasepAllocateActivationContextActivationBlock ; Win 7
+;@ stdcall BasepAnsiStringToDynamicUnicodeString ; Win 7
+;@ stdcall BasepCheckAppCompat ; Win 7
+;@ stdcall BasepCheckBadapp ; Win 7
@ stub BasepCheckWinSaferRestrictions
-@ stub BasepDebugDump ; missing in XP SP3
+@ stub BasepDebugDump ; missing in XP SP3 and Win 7
+;@ stdcall BasepFreeActivationContextActivationBlock ; Win 7
+;@ stdcall BasepFreeAppCompatData ; Win 7
+;@ stdcall BasepMapModuleHandle ; Win 7
@ stdcall Beep(long long)
@ stdcall BeginUpdateResourceA(str long)
@ stdcall BeginUpdateResourceW(wstr long)
@ stdcall BuildCommDCBW(wstr ptr)
@ stdcall CallNamedPipeA(str ptr long ptr long ptr long)
@ stdcall CallNamedPipeW(wstr ptr long ptr long ptr long)
+;@ stdcall CallbackMayRunLong ; Win 7
@ stdcall CancelDeviceWakeupRequest(long)
@ stdcall CancelIo(long)
@ stdcall CancelIoEx(long ptr)
@ stdcall CancelSynchronousIo(long)
+;@ stdcall CancelThreadpoolIo(ptr) ntdll.TpCancelAsyncIoOperation; Win 7
@ stdcall CancelTimerQueueTimer(long long)
@ stdcall CancelWaitableTimer(long)
@ stdcall ChangeTimerQueueTimer(long long long long)
+;@ stdcall CheckElevation ; Win 7
+;@ stdcall CheckElevationEnabled ; Win 7
+;@ stdcall CheckForReadOnlyResource ; Win 7
@ stdcall CheckNameLegalDOS8Dot3A(str str long long long)
@ stdcall CheckNameLegalDOS8Dot3W(wstr str long long long)
@ stdcall CheckRemoteDebuggerPresent(long ptr)
@ stdcall ClearCommError(long ptr ptr)
@ stdcall CloseConsoleHandle(long)
@ stdcall CloseHandle(long)
+;@ stdcall ClosePrivateNamespace ; Win 7
@ stdcall CloseProfileUserMapping()
-@ stub CloseSystemHandle ; missing in XP SP3
+@ stub CloseSystemHandle ; missing in XP SP3 and Win 7
+;@ stdcall CloseThreadpool(ptr) ntdll.TpReleasePool ; Win 7
+;@ stdcall CloseThreadpoolCleanupGroup(ptr) ntdll.TpReleaseCleanupGroup ; Win 7
+;@ stdcall CloseThreadpoolCleanupGroupMembers(ptr long ptr) ntdll.TpReleaseCleanupGroupMembers ; Win 7
+;@ stdcall CloseThreadpoolIo ntdll.TpReleaseIoCompletion ; Win 7
+;@ stdcall CloseThreadpoolTimer ntdll.TpReleaseTimer ; Win 7
+;@ stdcall CloseThreadpoolWait ntdll.TpReleaseWait ; Win 7
+;@ stdcall CloseThreadpoolWork ntdll.TpReleaseWork ; Win 7
@ stdcall CmdBatNotification(long)
@ stdcall CommConfigDialogA(str long ptr)
@ stdcall CommConfigDialogW(wstr long ptr)
+;@ stdcall CompareCalendarDates ; Win 7
@ stdcall CompareFileTime(ptr ptr)
@ stdcall CompareStringA(long long str long str long)
+;@ stdcall CompareStringEx ; Win 7
+;@ stdcall CompareStringOrdinal ; Win 7
@ stdcall CompareStringW(long long wstr long wstr long)
@ stdcall ConnectNamedPipe(long ptr)
@ stdcall ConsoleMenuControl(long long long)
-@ stub ConsoleSubst ; missing in XP SP3
+@ stub ConsoleSubst ; missing in XP SP3 and Win 7
@ stdcall ContinueDebugEvent(long long long)
+;@ stdcall ConvertCalDateTimeToSystemTime ; Win 7
@ stdcall ConvertDefaultLocale (long)
@ stdcall ConvertFiberToThread()
+;@ stdcall ConvertNLSDayOfWeekToWin32DayOfWeek ; Win 7
+;@ stdcall ConvertSystemTimeToCalDateTime ; Win 7
@ stdcall ConvertThreadToFiber(ptr)
@ stdcall ConvertThreadToFiberEx(ptr long)
+;@ stdcall CopyExtendedContext ; Win 7
@ stdcall CopyFileA(str str long)
@ stdcall CopyFileExA (str str ptr ptr ptr long)
@ stdcall CopyFileExW (wstr wstr ptr ptr ptr long)
+;@ stdcall CopyFileTransactedA ; Win 7
+;@ stdcall CopyFileTransactedW ; Win 7
@ stdcall CopyFileW(wstr wstr long)
@ stdcall CopyLZFile(long long) LZCopy
@ stdcall CreateActCtxA(ptr)
@ stdcall CreateDirectoryA(str ptr)
@ stdcall CreateDirectoryExA(str str ptr)
@ stdcall CreateDirectoryExW(wstr wstr ptr)
+;@ stdcall CreateDirectoryTransactedA ; Win 7
+;@ stdcall CreateDirectoryTransactedW ; Win 7
@ stdcall CreateDirectoryW(wstr ptr)
@ stdcall CreateEventA(ptr long long str)
+;@ stdcall CreateEventExA ; Win 7
+;@ stdcall CreateEventExW ; Win 7
@ stdcall CreateEventW(ptr long long wstr)
@ stdcall CreateFiber(long ptr ptr)
@ stdcall CreateFiberEx(long long long ptr ptr)
@ stdcall CreateFileA(str long long ptr long long long)
@ stdcall CreateFileMappingA(long ptr long long long str)
+;@ stdcall CreateFileMappingNumaA ; Win 7
+;@ stdcall CreateFileMappingNumaW ; Win 7
@ stdcall CreateFileMappingW(long ptr long long long wstr)
+;@ stdcall CreateFileTransactedA ; Win 7
+;@ stdcall CreateFileTransactedW ; Win 7
@ stdcall CreateFileW(wstr long long ptr long long long)
@ stdcall CreateHardLinkA(str str ptr)
+;@ stdcall CreateHardLinkTransactedA ; Win 7
+;@ stdcall CreateHardLinkTransactedW ; Win 7
@ stdcall CreateHardLinkW(wstr wstr ptr)
@ stdcall CreateIoCompletionPort(long long long long)
@ stdcall CreateJobObjectA(ptr str)
@ stdcall CreateJobObjectW(ptr wstr)
@ stdcall CreateJobSet(long ptr long)
-@ stub CreateKernelThread ; missing in XP SP3
+@ stub CreateKernelThread ; missing in XP SP3 and Win 7
@ stdcall CreateMailslotA(ptr long long ptr)
@ stdcall CreateMailslotW(ptr long long ptr)
@ stdcall CreateMemoryResourceNotification(ptr)
@ stdcall CreateMutexA(ptr long str)
+;@ stdcall CreateMutexExA ; Win 7
+;@ stdcall CreateMutexExW ; Win 7
@ stdcall CreateMutexW(ptr long wstr)
@ stdcall CreateNamedPipeA(str long long long long long long ptr)
@ stdcall CreateNamedPipeW(wstr long long long long long long ptr)
-@ stdcall CreateNlsSecurityDescriptor(ptr long long)
+@ stdcall CreateNlsSecurityDescriptor(ptr long long) ; missing in Win 7
@ stdcall CreatePipe(ptr ptr ptr long)
+;@ stdcall CreatePrivateNamespaceA ; Win 7
+;@ stdcall CreatePrivateNamespaceW ; Win 7
@ stdcall CreateProcessA(str str ptr ptr long long ptr str ptr ptr)
+;@ stdcall CreateProcessAsUserW ; Win 7
@ stdcall CreateProcessInternalA(ptr str str ptr ptr long long ptr str ptr ptr long)
@ stdcall CreateProcessInternalW(ptr wstr wstr ptr ptr long long ptr wstr ptr ptr long)
-@ stdcall CreateProcessInternalWSecure()
+@ stdcall CreateProcessInternalWSecure() ; missing in Win 7
@ stdcall CreateProcessW(wstr wstr ptr ptr long long ptr wstr ptr ptr)
@ stdcall CreateRemoteThread(long ptr long ptr long long ptr)
+;@ stdcall CreateRemoteThreadEx api-ms-win-core-processthreads-l1-1-0.CreateRemoteThreadEx ; Win 7
@ stdcall CreateSemaphoreA(ptr long long str)
-@ stdcall CreateSemaphoreW(ptr long long wstr)
@ stdcall CreateSemaphoreExA(ptr long long str long long)
@ stdcall CreateSemaphoreExW(ptr long long wstr long long)
-@ stdcall CreateSocketHandle()
+@ stdcall CreateSemaphoreW(ptr long long wstr)
+@ stdcall CreateSocketHandle() ; missing in Win 7 64 bit
@ stdcall CreateSymbolicLinkA(str str long)
+;@ stdcall CreateSymbolicLinkTransactedA ; Win 7
+;@ stdcall CreateSymbolicLinkTransactedW ; Win 7
@ stdcall CreateSymbolicLinkW(wstr wstr long)
@ stdcall CreateTapePartition(long long long long)
@ stdcall CreateThread(ptr long ptr long long ptr)
+;@ stdcall CreateThreadpool ; Win 7
+;@ stdcall CreateThreadpoolCleanupGroup ; Win 7
+;@ stdcall CreateThreadpoolIo ; Win 7
+;@ stdcall CreateThreadpoolTimer ; Win 7
+;@ stdcall CreateThreadpoolWait ; Win 7
+;@ stdcall CreateThreadpoolWork ; Win 7
@ stdcall CreateTimerQueue ()
@ stdcall CreateTimerQueueTimer(ptr long ptr ptr long long long)
@ stdcall CreateToolhelp32Snapshot(long long)
-@ stdcall CreateVirtualBuffer(long long long)
+;@ stdcall arch=x86_64 CreateUmsCompletionList
+;@ stdcall arch=x86_64 CreateUmsThreadContext
+@ stdcall CreateVirtualBuffer(long long long) ; missing in Win 7
@ stdcall CreateWaitableTimerA(ptr long str)
-@ stdcall CreateWaitableTimerW(ptr long wstr)
@ stdcall CreateWaitableTimerExA (ptr str long long)
@ stdcall CreateWaitableTimerExW (ptr wstr long long)
@ stdcall DeactivateActCtx(long ptr)
@ stdcall DefineDosDeviceW(long wstr wstr)
@ stdcall DelayLoadFailureHook(str str)
@ stdcall DeleteAtom(long)
+;@ stdcall DeleteBoundaryDescriptor ntdll.RtlDeleteBoundaryDescriptor ; Win 7
@ stdcall DeleteCriticalSection(ptr) ntdll.RtlDeleteCriticalSection
@ stdcall DeleteFiber(ptr)
@ stdcall DeleteFileA(str)
+;@ stdcall DeleteFileTransactedA ; Win 7
+;@ stdcall DeleteFileTransactedW ; Win 7
@ stdcall DeleteFileW(wstr)
+;@ stdcall DeleteProcThreadAttributeList api-ms-win-core-processthreads-l1-1-0.DeleteProcThreadAttributeList ; Win 7
@ stdcall DeleteTimerQueue(long)
@ stdcall DeleteTimerQueueEx (long long)
@ stdcall DeleteTimerQueueTimer(long long long)
+;@ stdcall -arch=x86_64 DeleteUmsCompletionList
+;@ stdcall -arch=x86_64 DeleteUmsThreadContext
@ stdcall DeleteVolumeMountPointA(str) ;check
@ stdcall DeleteVolumeMountPointW(wstr) ;check
+;@ stdcall -arch=x86_64 DequeueUmsCompletionListItems
@ stdcall DeviceIoControl(long long ptr long ptr long ptr ptr)
@ stdcall DisableThreadLibraryCalls(long)
+;@ stdcall DisableThreadProfiling ; Win 7
+;@ stdcall DisassociateCurrentThreadFromCallback ntdll.TpDisassociateCallback ; Win 7
@ stdcall DisconnectNamedPipe(long)
@ stdcall DnsHostnameToComputerNameA (str ptr ptr)
@ stdcall DnsHostnameToComputerNameW (wstr ptr ptr)
@ stdcall DosPathToSessionPathW(long wstr wstr)
@ stdcall DuplicateConsoleHandle(long long long long)
@ stdcall DuplicateHandle(long long long ptr long long long)
+;@ stdcall EnableThreadProfiling ; Win 7
@ stdcall EncodePointer(ptr) ntdll.RtlEncodePointer
@ stdcall EncodeSystemPointer(ptr) ntdll.RtlEncodeSystemPointer
@ stdcall EndUpdateResourceA(long long)
@ stdcall EndUpdateResourceW(long long)
@ stdcall EnterCriticalSection(ptr) ntdll.RtlEnterCriticalSection
+;@ stdcall -arch=x86_64 EnterUmsSchedulingMode
@ stdcall EnumCalendarInfoA(ptr long long long)
@ stdcall EnumCalendarInfoExA(ptr long long long)
+;@ stdcall EnumCalendarInfoExEx ; Win 7
@ stdcall EnumCalendarInfoExW(ptr long long long)
@ stdcall EnumCalendarInfoW(ptr long long long)
@ stdcall EnumDateFormatsA(ptr long long)
@ stdcall EnumDateFormatsExA(ptr long long)
+;@ stdcall EnumDateFormatsExEx ; Win 7
@ stdcall EnumDateFormatsExW(ptr long long)
@ stdcall EnumDateFormatsW(ptr long long)
@ stdcall EnumLanguageGroupLocalesA(ptr long long ptr)
@ stdcall EnumLanguageGroupLocalesW(ptr long long ptr)
@ stdcall EnumResourceLanguagesA(long str str ptr long)
+;@ stdcall EnumResourceLanguagesExA ; Win 7
+;@ stdcall EnumResourceLanguagesExW ; Win 7
@ stdcall EnumResourceLanguagesW(long wstr wstr ptr long)
@ stdcall EnumResourceNamesA(long str ptr long)
+;@ stdcall EnumResourceNamesExA ; Win 7
+;@ stdcall EnumResourceNamesExW ; Win 7
@ stdcall EnumResourceNamesW(long wstr ptr long)
@ stdcall EnumResourceTypesA(long ptr long)
+;@ stdcall EnumResourceTypesExA ; Win 7
+;@ stdcall EnumResourceTypesExW ; Win 7
@ stdcall EnumResourceTypesW(long ptr long)
@ stdcall EnumSystemCodePagesA(ptr long)
@ stdcall EnumSystemCodePagesW(ptr long)
+;@ stdcall EnumSystemFirmwareTables ; Win 7
@ stdcall EnumSystemGeoID(long long ptr)
@ stdcall EnumSystemLanguageGroupsA(ptr long ptr)
@ stdcall EnumSystemLanguageGroupsW(ptr long ptr)
@ stdcall EnumSystemLocalesA(ptr long)
+;@ stdcall EnumSystemLocalesEx ; Win 7
@ stdcall EnumSystemLocalesW(ptr long)
@ stdcall EnumTimeFormatsA(ptr long long)
+;@ stdcall EnumTimeFormatsEx ; Win 7
@ stdcall EnumTimeFormatsW(ptr long long)
@ stdcall EnumUILanguagesA(ptr long long)
@ stdcall EnumUILanguagesW(ptr long long)
@ stdcall EnumerateLocalComputerNamesW(ptr long wstr ptr)
@ stdcall EraseTape(ptr long long)
@ stdcall EscapeCommFunction(long long)
-@ stdcall ExitProcess(long)
-@ stdcall ExitThread(long)
+@ stdcall ExitProcess(long) ; FIXME: ntdll.RtlExitUserProcess
+@ stdcall ExitThread(long) ; FIXME: ntdll.RtlExitUserThread
@ stdcall ExitVDM(long long)
@ stdcall ExpandEnvironmentStringsA(str ptr long)
@ stdcall ExpandEnvironmentStringsW(wstr ptr long)
@ stdcall ExpungeConsoleCommandHistoryA(long)
@ stdcall ExpungeConsoleCommandHistoryW(long)
-@ stdcall ExtendVirtualBuffer(long long)
+@ stdcall ExtendVirtualBuffer(long long) ; missing in Win 7
@ stdcall FatalAppExitA(long str)
@ stdcall FatalAppExitW(long wstr)
@ stdcall FatalExit(long)
@ stdcall FindFirstFileA(str ptr)
@ stdcall FindFirstFileExA(str long ptr long ptr long)
@ stdcall FindFirstFileExW(wstr long ptr long ptr long)
+;@ stdcall FindFirstFileNameTransactedW ; Win 7
+;@ stdcall FindFirstFileNameW ; Win 7
+;@ stdcall FindFirstFileTransactedA ; Win 7
+;@ stdcall FindFirstFileTransactedW ; Win 7
@ stdcall FindFirstFileW(wstr ptr)
+;@ stdcall FindFirstStreamTransactedW ; Win 7
@ stdcall FindFirstStreamW(wstr ptr ptr long)
@ stdcall FindFirstVolumeA(ptr long)
@ stdcall FindFirstVolumeMountPointA(str ptr long)
@ stdcall FindFirstVolumeMountPointW(wstr ptr long)
@ stdcall FindFirstVolumeW(ptr long)
+;@ stdcall FindNLSString ; Win 7
+;@ stdcall FindNLSStringEx ; Win 7
@ stdcall FindNextChangeNotification(long)
@ stdcall FindNextFileA(long ptr)
+;@ stdcall FindNextFileNameW ; Win 7
@ stdcall FindNextFileW(long ptr)
+;@ stdcall FindNextStreamW ; Win 7
@ stdcall FindNextVolumeA(long ptr long)
@ stdcall FindNextVolumeMountPointA(long str long)
@ stdcall FindNextVolumeMountPointW(long wstr long)
@ stdcall FindResourceExA(long str str long)
@ stdcall FindResourceExW(long wstr wstr long)
@ stdcall FindResourceW(long wstr wstr)
+;@ stdcall FindStringOrdinal ; Win 7
@ stdcall FindVolumeClose(ptr)
@ stdcall FindVolumeMountPointClose(ptr)
;@ stdcall FlsAlloc(ptr) ; missing in XP SP3
@ stdcall FlushConsoleInputBuffer(long)
@ stdcall FlushFileBuffers(long)
@ stdcall FlushInstructionCache(long long long)
+;@ stdcall FlushProcessWriteBuffers ntdll.NtFlushProcessWriteBuffers ; Win 7
@ stdcall FlushViewOfFile(ptr long)
@ stdcall FoldStringA(long str long ptr long)
@ stdcall FoldStringW(long wstr long ptr long)
@ stdcall FreeEnvironmentStringsW(ptr)
@ stdcall FreeLibrary(long)
@ stdcall FreeLibraryAndExitThread(long long)
+;@ stdcall FreeLibraryWhenCallbackReturns ntdll.TpCallbackUnloadDllOnCompletion ; Win 7
@ stdcall FreeResource(long)
@ stdcall FreeUserPhysicalPages(long long long)
-@ stdcall FreeVirtualBuffer(ptr)
+@ stdcall FreeVirtualBuffer(ptr) ; missing in Win 7
@ stdcall GenerateConsoleCtrlEvent(long long)
@ stdcall GetACP()
+;@ stdcall GetActiveProcessorCount ; Win 7
+;@ stdcall GetActiveProcessorGroupCount ; Win 7
+;@ stdcall GetApplicationRecoveryCallback ; Win 7
+;@ stdcall GetApplicationRestartSettings ; Win 7
@ stdcall GetAtomNameA(long ptr long)
@ stdcall GetAtomNameW(long ptr long)
@ stdcall GetBinaryType(str ptr) GetBinaryTypeA
@ stdcall GetBinaryTypeA(str ptr)
@ stdcall GetBinaryTypeW(wstr ptr)
-@ stdcall GetCPFileNameFromRegistry(long wstr long) ;check
+@ stdcall GetCPFileNameFromRegistry(long wstr long) ;check missing in Win 7
@ stdcall GetCPInfo(long ptr)
@ stdcall GetCPInfoExA(long long ptr)
@ stdcall GetCPInfoExW(long long ptr)
+;@ stdcall GetCalendarDateFormat ; Win 7
+;@ stdcall GetCalendarDateFormatEx ; Win 7
+;@ stdcall GetCalendarDaysInMonth ; Win 7
+;@ stdcall GetCalendarDifferenceInDays ; Win 7
@ stdcall GetCalendarInfoA(long long long ptr long ptr)
+;@ stdcall GetCalendarInfoEx ; Win 7
@ stdcall GetCalendarInfoW(long long long ptr long ptr)
+;@ stdcall GetCalendarMonthsInYear ; Win 7
+;@ stdcall GetCalendarSupportedDateRange ; Win 7
+;@ stdcall GetCalendarWeekNumber ; Win 7
@ stdcall GetComPlusPackageInstallStatus()
@ stdcall GetCommConfig(long ptr long)
@ stdcall GetCommMask(long ptr)
@ stdcall GetCommandLineA()
@ stdcall GetCommandLineW()
@ stdcall GetCompressedFileSizeA(long ptr)
+;@ stdcall GetCompressedFileSizeTransactedA ; Win 7
+;@ stdcall GetCompressedFileSizeTransactedW ; Win 7
@ stdcall GetCompressedFileSizeW(long ptr)
@ stdcall GetComputerNameA(ptr ptr)
@ stdcall GetComputerNameExA(long ptr ptr)
@ stdcall GetConsoleFontInfo(long long long ptr)
@ stdcall GetConsoleFontSize(long long)
@ stdcall GetConsoleHardwareState(long long ptr)
+;@ stdcall GetConsoleHistoryInfo ; Win 7
@ stdcall GetConsoleInputExeNameA(long ptr)
@ stdcall GetConsoleInputExeNameW(long ptr)
@ stdcall GetConsoleInputWaitHandle()
@ stdcall GetConsoleKeyboardLayoutNameW(ptr)
@ stdcall GetConsoleMode(long ptr)
@ stdcall GetConsoleNlsMode(long ptr)
+;@ stdcall GetConsoleOriginalTitleA ; Win 7
+;@ stdcall GetConsoleOriginalTitleW ; Win 7
@ stdcall GetConsoleOutputCP()
-@ stub GetConsoleProcessList ; missing in XP SP3
+@ stub GetConsoleProcessList ; missing in XP SP3, present in Win 7
@ stdcall GetConsoleScreenBufferInfo(long ptr)
+;@ stdcall GetConsoleScreenBufferInfoEx ; Win 7
@ stdcall GetConsoleSelectionInfo(ptr)
@ stdcall GetConsoleTitleA(ptr long)
@ stdcall GetConsoleTitleW(ptr long)
@ stdcall GetConsoleWindow()
@ stdcall GetCurrencyFormatA(long long str ptr str long)
+;@ stdcall GetCurrencyFormatEx ; Win 7
@ stdcall GetCurrencyFormatW(long long str ptr str long)
@ stdcall GetCurrentActCtx(ptr)
@ stdcall GetCurrentConsoleFont(long long ptr)
+;@ stdcall GetCurrentConsoleFontEx ; Win 7
@ stdcall GetCurrentDirectoryA(long ptr)
@ stdcall GetCurrentDirectoryW(long ptr)
@ stdcall GetCurrentProcess()
@ stdcall GetCurrentProcessId()
@ stdcall GetCurrentProcessorNumber() ntdll.RtlGetCurrentProcessorNumber
+;@ stdcall GetCurrentProcessorNumberEx ntdll.RtlGetCurrentProcessorNumberEx ; Win 7
@ stdcall GetCurrentThread()
@ stdcall GetCurrentThreadId()
+;@ stdcall GetCurrentUmsThread
@ stdcall GetDateFormatA(long long ptr str ptr long)
+;@ stdcall GetDateFormatEx ; Win 7
@ stdcall GetDateFormatW(long long ptr wstr ptr long)
-@ stub GetDaylightFlag ; missing in XP SP3
+@ stub GetDaylightFlag ; missing in XP SP3 and Win 7
@ stdcall GetDefaultCommConfigA(str ptr long)
@ stdcall GetDefaultCommConfigW(wstr ptr long)
-@ stdcall GetDefaultSortkeySize(ptr)
+@ stdcall GetDefaultSortkeySize(ptr) ; missing in Win 7
@ stdcall GetDevicePowerState(long ptr)
@ stdcall GetDiskFreeSpaceA(str ptr ptr ptr ptr)
@ stdcall GetDiskFreeSpaceExA (str ptr ptr ptr)
@ stdcall GetDllDirectoryW(long ptr)
@ stdcall GetDriveTypeA(str)
@ stdcall GetDriveTypeW(wstr)
+;@ stdcall GetDurationFormat ; Win 7
+;@ stdcall GetDurationFormatEx ; Win 7
+;@ stdcall GetDynamicTimeZoneInformation ; Win 7
+;@ stdcall GetEnabledExtendedFeatures api-ms-win-core-xstate-l1-1-0.RtlGetEnabledExtendedFeatures ; Win 7
@ stdcall GetEnvironmentStrings()
@ stdcall GetEnvironmentStringsA() GetEnvironmentStrings
@ stdcall GetEnvironmentStringsW()
@ stdcall GetEnvironmentVariableA(str ptr long)
@ stdcall GetEnvironmentVariableW(wstr ptr long)
+;@ stdcall GetEraNameCountedString ; Win 7
@ stdcall GetErrorMode()
@ stdcall GetExitCodeProcess(long ptr)
@ stdcall GetExitCodeThread(long ptr)
@ stdcall GetExpandedNameA(str ptr)
@ stdcall GetExpandedNameW(wstr ptr)
+;@ stdcall GetExtendedContextLength ; Win 7
+;@ stdcall GetExtendedFeaturesMask api-ms-win-core-xstate-l1-1-0.RtlGetExtendedFeaturesMask ; Win 7
@ stdcall GetFileAttributesA(str)
-@ stdcall GetFileAttributesByHandle(long ptr long)
+@ stdcall GetFileAttributesByHandle(long ptr long) ; missing in Win 7
@ stdcall GetFileAttributesExA(str long ptr)
@ stdcall GetFileAttributesExW(wstr long ptr)
+;@ stdcall GetFileAttributesTransactedA ; Win 7
+;@ stdcall GetFileAttributesTransactedW ; Win 7
@ stdcall GetFileAttributesW(wstr)
@ stdcall GetFileBandwidthReservation(long ptr ptr ptr ptr ptr)
@ stdcall GetFileInformationByHandle(long ptr)
+;@ stdcall GetFileInformationByHandleEx ; Win 7
+;@ stdcall GetFileMUIInfo ; Win 7
+;@ stdcall GetFileMUIPath ; Win 7
@ stdcall GetFileSize(long ptr)
@ stdcall GetFileSizeEx(long ptr)
@ stdcall GetFileTime(long ptr ptr ptr)
@ stdcall GetFirmwareEnvironmentVariableA(str str ptr long)
@ stdcall GetFirmwareEnvironmentVariableW(wstr wstr ptr long)
@ stdcall GetFullPathNameA(str long ptr ptr)
+;@ stdcall GetFullPathNameTransactedA ; Win 7
+;@ stdcall GetFullPathNameTransactedW ; Win 7
@ stdcall GetFullPathNameW(wstr long ptr ptr)
@ stdcall GetGeoInfoA(long long ptr long long)
@ stdcall GetGeoInfoW(long long ptr long long)
-@ stdcall GetHandleContext(long)
+@ stdcall GetHandleContext(long) ; missing on x64
@ stdcall GetHandleInformation(long ptr)
-@ stub GetSCallbackTarget ; missing in XP SP3
-@ stub GetSCallbackTemplate ; missing in XP SP3
+@ stub GetSCallbackTarget ; missing in XP SP3 and Win 7
+@ stub GetSCallbackTemplate ; missing in XP SP3 and Win 7
@ stdcall GetLargePageMinimum()
@ stdcall GetLargestConsoleWindowSize(long)
@ stdcall GetLastError() ntdll.RtlGetLastWin32Error
-@ stdcall GetLinguistLangSize(ptr)
+@ stdcall GetLinguistLangSize(ptr) ; missing in Win 7
@ stdcall GetLocalTime(ptr)
@ stdcall GetLocaleInfoA(long long ptr long)
-@ stdcall GetLocaleInfoW(long long ptr long)
@ stdcall GetLocaleInfoEx(wstr long wstr long)
+@ stdcall GetLocaleInfoW(long long ptr long)
@ stdcall GetLogicalDriveStringsA(long ptr)
@ stdcall GetLogicalDriveStringsW(long ptr)
@ stdcall GetLogicalDrives()
@ stdcall GetLogicalProcessorInformation(ptr ptr)
+;@ stdcall GetLogicalProcessorInformationEx api-ms-win-core-sysinfo-l1-1-0.GetLogicalProcessorInformationEx ; Win 7
@ stdcall GetLongPathNameA (str long long)
+;@ stdcall GetLongPathNameTransactedA ; Win 7
+;@ stdcall GetLongPathNameTransactedW ; Win 7
@ stdcall GetLongPathNameW (wstr long long)
@ stdcall GetMailslotInfo(long ptr ptr ptr ptr)
+;@ stdcall GetMaximumProcessorCount ; Win 7
+;@ stdcall GetMaximumProcessorGroupCount ; Win 7
@ stdcall GetModuleFileNameA(long ptr long)
@ stdcall GetModuleFileNameW(long ptr long)
@ stdcall GetModuleHandleA(str)
@ stdcall GetModuleHandleExA(long ptr ptr)
@ stdcall GetModuleHandleExW(long ptr ptr)
@ stdcall GetModuleHandleW(wstr)
+;@ stdcall GetNLSVersion ; Win 7
+;@ stdcall GetNLSVersionEx ; Win 7
+;@ stdcall GetNamedPipeAttribute ; Win 7
+;@ stdcall GetNamedPipeClientComputerNameA ; Win 7
+;@ stdcall GetNamedPipeClientComputerNameW ; Win 7
+;@ stdcall GetNamedPipeClientProcessId ; Win 7
+;@ stdcall GetNamedPipeClientSessionId ; Win 7
@ stdcall GetNamedPipeHandleStateA(long ptr ptr ptr ptr str long)
@ stdcall GetNamedPipeHandleStateW(long ptr ptr ptr ptr wstr long)
@ stdcall GetNamedPipeInfo(long ptr ptr ptr ptr)
+;@ stdcall GetNamedPipeServerProcessId ; Win 7
+;@ stdcall GetNamedPipeServerSessionId ; Win 7
@ stdcall GetNativeSystemInfo(ptr)
+;@ stdcall -arch=x86_64 GetNextUmsListItem
@ stdcall GetNextVDMCommand(long)
-@ stdcall GetNlsSectionName(long long double str str double)
-@ stdcall GetNumaAvailableMemory(ptr double ptr)
+@ stdcall GetNlsSectionName(long long double str str double) ; missing in Win 7
+@ stdcall GetNumaAvailableMemory(ptr double ptr) ; missing in Win 7
@ stdcall GetNumaAvailableMemoryNode(double ptr)
+;@ stdcall GetNumaAvailableMemoryNodeEx ; Win 7
@ stdcall GetNumaHighestNodeNumber(ptr)
+;@ stdcall GetNumaNodeNumberFromHandle ; Win 7
@ stdcall GetNumaNodeProcessorMask(double ptr)
-@ stdcall GetNumaProcessorMap(ptr double ptr)
+;@ stdcall GetNumaNodeProcessorMaskEx ; Win 7
+@ stdcall GetNumaProcessorMap(ptr double ptr) ; missing in Win 7
@ stdcall GetNumaProcessorNode(double ptr)
+;@ stdcall GetNumaProcessorNodeEx ; Win 7
+;@ stdcall GetNumaProximityNode ; Win 7
+;@ stdcall GetNumaProximityNodeEx ; Win 7
@ stdcall GetNumberFormatA(long long str ptr ptr long)
+;@ stdcall GetNumberFormatEx ; Win 7
@ stdcall GetNumberFormatW(long long wstr ptr ptr long)
@ stdcall GetNumberOfConsoleFonts()
@ stdcall GetNumberOfConsoleInputEvents(long ptr)
@ stdcall GetNumberOfConsoleMouseButtons(ptr)
@ stdcall GetOEMCP()
@ stdcall GetOverlappedResult(long ptr ptr long)
+;@ stdcall GetPhysicallyInstalledSystemMemory ; Win 7
@ stdcall GetPriorityClass(long)
@ stdcall GetPrivateProfileIntA(str str long str)
@ stdcall GetPrivateProfileIntW(wstr wstr long wstr)
@ stdcall GetPrivateProfileStructW(wstr wstr ptr long wstr)
@ stdcall GetProcAddress(long str)
@ stdcall GetProcessAffinityMask(long ptr ptr)
+;@ stdcall GetProcessDEPPolicy ; Win 7
+;@ stdcall GetProcessGroupAffinity ; Win 7
@ stdcall GetProcessHandleCount(long ptr)
@ stdcall GetProcessHeap()
@ stdcall GetProcessHeaps(long ptr)
@ stdcall GetProcessId(long)
+;@ stdcall GetProcessIdOfThread ; Win 7
@ stdcall GetProcessIoCounters(long ptr)
+;@ stdcall GetProcessPreferredUILanguages ; Win 7
@ stdcall GetProcessPriorityBoost(long ptr)
@ stdcall GetProcessShutdownParameters(ptr ptr)
@ stdcall GetProcessTimes(long ptr ptr ptr ptr)
@ stdcall GetProcessVersion(long)
@ stdcall GetProcessWorkingSetSize(long ptr ptr)
-@ stub GetProductName ; missing in XP SP3
+;@ stdcall GetProcessWorkingSetSizeEx ; Win 7
+;@ stdcall GetProcessorSystemCycleTime ; Win 7
+;@ stdcall GetProductInfo ; Win 7
+@ stub GetProductName ; missing in XP SP3 and Win 7
@ stdcall GetProfileIntA(str str long)
@ stdcall GetProfileIntW(wstr wstr long)
@ stdcall GetProfileSectionA(str ptr long)
@ stdcall GetProfileStringA(str str str ptr long)
@ stdcall GetProfileStringW(wstr wstr wstr ptr long)
@ stdcall GetQueuedCompletionStatus(long ptr ptr ptr long)
-@ stub GetLSCallbackTarget ; missing in XP SP3
-@ stub GetLSCallbackTemplate ; missing in XP SP3
+;@ stdcall GetQueuedCompletionStatusEx ; Win 7
+@ stub GetLSCallbackTarget ; missing in XP SP3 and Win 7
+@ stub GetLSCallbackTemplate ; missing in XP SP3 and Win 7
@ stdcall GetShortPathNameA(str ptr long)
@ stdcall GetShortPathNameW(wstr ptr long)
@ stdcall GetStartupInfoA(ptr)
@ stdcall GetStartupInfoW(ptr)
@ stdcall GetStdHandle(long)
+;@ stdcall GetStringScripts ; Win 7
@ stdcall GetStringTypeA(long long str long ptr)
@ stdcall GetStringTypeExA(long long str long ptr)
@ stdcall GetStringTypeExW(long long wstr long ptr)
@ stdcall GetStringTypeW(long wstr long ptr)
+;@ stdcall GetSystemDEPPolicy ; Win 7
@ stdcall GetSystemDefaultLCID()
@ stdcall GetSystemDefaultLangID()
+;@ stdcall GetSystemDefaultLocaleName ; Win 7
@ stdcall GetSystemDefaultUILanguage()
@ stdcall GetSystemDirectoryA(ptr long)
@ stdcall GetSystemDirectoryW(ptr long)
+;@ stdcall GetSystemFileCacheSize ; Win 7
+;@ stdcall GetSystemFirmwareTable ; Win 7
@ stdcall GetSystemInfo(ptr)
@ stdcall GetSystemPowerStatus(ptr)
+;@ stdcall GetSystemPreferredUILanguages ; Win 7
@ stdcall GetSystemRegistryQuota(ptr ptr)
@ stdcall GetSystemTime(ptr)
@ stdcall GetSystemTimeAdjustment(ptr ptr ptr)
@ stdcall GetTempPathA(long ptr)
@ stdcall GetTempPathW(long ptr)
@ stdcall GetThreadContext(long ptr)
+;@ stdcall GetThreadErrorMode ; Win 7
+;@ stdcall GetThreadGroupAffinity ; Win 7
+;@ stdcall GetThreadIOPendingFlag ; Win 7
@ stdcall GetThreadId(ptr)
-@ stdcall GetThreadIOPendingFlag(long ptr)
+;@ stdcall GetThreadIdealProcessorEx ; Win 7
+@ stdcall GetThreadIOPendingFlag(long ptr) ; missing in Win 7
@ stdcall GetThreadLocale()
+;@ stdcall GetThreadPreferredUILanguages ; Win 7
@ stdcall GetThreadPriority(long)
@ stdcall GetThreadPriorityBoost(long ptr)
@ stdcall GetThreadSelectorEntry(long long ptr)
@ stdcall GetThreadTimes(long ptr ptr ptr ptr)
+;@ stdcall GetThreadUILanguage ; Win 7
@ stdcall GetTickCount()
@ stdcall -ret64 GetTickCount64()
@ stdcall GetTimeFormatA(long long ptr str ptr long)
+;@ stdcall GetTimeFormatEx ; Win 7
@ stdcall GetTimeFormatW(long long ptr wstr ptr long)
@ stdcall GetTimeZoneInformation(ptr)
+;@ stdcall GetTimeZoneInformationForYear ; Win 7
+;@ stdcall GetUILanguageInfo ; Win 7
+;@ stdcall -arch=x86_64 GetUmsCompletionListEvent
@ stdcall GetUserDefaultLCID()
@ stdcall GetUserDefaultLangID()
+;@ stdcall GetUserDefaultLocaleName ; Win 7
@ stdcall GetUserDefaultUILanguage()
@ stdcall GetUserGeoID(long)
+;@ stdcall GetUserPreferredUILanguages ; Win 7
@ stdcall GetVDMCurrentDirectories(long long)
@ stdcall GetVersion()
@ stdcall GetVersionExA(ptr)
@ stdcall GetVersionExW(ptr)
@ stdcall GetVolumeInformationA(str ptr long ptr ptr ptr ptr long)
+;@ stdcall GetVolumeInformationByHandleW ; Win 7
@ stdcall GetVolumeInformationW(wstr ptr long ptr ptr ptr ptr long)
@ stdcall GetVolumeNameForVolumeMountPointA(str ptr long)
@ stdcall GetVolumeNameForVolumeMountPointW(wstr ptr long)
@ stdcall HeapAlloc(long long long) ntdll.RtlAllocateHeap
@ stdcall HeapCompact(long long)
@ stdcall HeapCreate(long long long)
-@ stdcall HeapCreateTagsW(long long wstr wstr)
+@ stdcall HeapCreateTagsW(long long wstr wstr) ; missing in Win 7
@ stdcall HeapDestroy(long)
-@ stdcall HeapExtend(long long ptr long)
+@ stdcall HeapExtend(long long ptr long) ; missing in Win 7
@ stdcall HeapFree(long long long) ntdll.RtlFreeHeap
@ stdcall HeapLock(long)
@ stdcall HeapQueryInformation(long long ptr long ptr)
-@ stdcall HeapQueryTagW(long long long long ptr)
+@ stdcall HeapQueryTagW(long long long long ptr) ; missing in Win 7
@ stdcall HeapReAlloc(long long ptr long) ntdll.RtlReAllocateHeap
-@ stub HeapSetFlags ; missing in XP SP3
+@ stub HeapSetFlags ; missing in XP SP3 and Win 7
@ stdcall HeapSetInformation(ptr long ptr long)
@ stdcall HeapSize(long long ptr) ntdll.RtlSizeHeap
@ stdcall HeapSummary(long long ptr)
@ stdcall HeapUnlock(long)
-@ stdcall HeapUsage(long long long long ptr)
+@ stdcall HeapUsage(long long long long ptr) ; missing in Win 7
@ stdcall HeapValidate(long long ptr)
@ stdcall HeapWalk(long ptr)
+;@ stdcall IdnToAscii ; Win 7
+;@ stdcall IdnToNameprepUnicode ; Win 7
+;@ stdcall IdnToUnicode ; Win 7
@ stdcall InitAtomTable(long)
-@ stdcall InitializeCriticalSection(ptr)
+;@ stdcall InitOnceBeginInitialize ; Win 7
+;@ stdcall InitOnceComplete ; Win 7
+;@ stdcall InitOnceExecuteOnce ; Win 7
+;@ stdcall InitOnceInitialize ntdll.RtlRunOnceInitialize ; Win 7
+;@ stdcall InitializeConditionVariable ntdll.RtlInitializeConditionVariable ; Win 7
+@ stdcall InitializeCriticalSection(ptr) ; FIXME: ntdll.RtlInitializeCriticalSection
@ stdcall InitializeCriticalSectionAndSpinCount(ptr long)
;@ stdcall InitializeCriticalSectionEx(ptr long long) ; missing in XP SP3
+;@ stdcall InitializeExtendedContext ; Win 7
+;@ stdcall InitializeProcThreadAttributeList api-ms-win-core-processthreads-l1-1-0.InitializeProcThreadAttributeList ; Win 7
@ stdcall InitializeSListHead(ptr) ntdll.RtlInitializeSListHead
@ stdcall InitializeSRWLock(ptr) ntdll.RtlInitializeSRWLock
-@ stdcall InterlockedCompareExchange(ptr long long)
-@ stdcall InterlockedCompareExchange64(ptr double double) ntdll.RtlInterlockedCompareExchange64
-@ stdcall InterlockedDecrement(ptr)
-@ stdcall InterlockedExchange(ptr long)
-@ stdcall InterlockedExchangeAdd (ptr long )
+@ stdcall InterlockedCompareExchange(ptr long long) ; missing in Win 7 x64
+@ stdcall InterlockedCompareExchange64(ptr double double) ntdll.RtlInterlockedCompareExchange64 ; missing in Win7 x64
+@ stdcall InterlockedDecrement(ptr) ; missing in Win 7 x64
+@ stdcall InterlockedExchange(ptr long) ; missing in Win 7 x64
+@ stdcall InterlockedExchangeAdd (ptr long ) ; missing in Win 7 x64
@ stdcall InterlockedFlushSList(ptr) ntdll.RtlInterlockedFlushSList
-@ stdcall InterlockedIncrement(ptr)
+@ stdcall InterlockedIncrement(ptr) ; missing in Win 7 x64
@ stdcall InterlockedPopEntrySList(ptr) ntdll.RtlInterlockedPopEntrySList
@ stdcall InterlockedPushEntrySList(ptr ptr) ntdll.RtlInterlockedPushEntrySList
+;@ stdcall InterlockedPushListSList ntdll.RtlInterlockedPushListSList ; Win 7
@ stdcall InvalidateConsoleDIBits(long long)
-@ stub InvalidateNSCache ; missing in XP SP3
+@ stub InvalidateNSCache ; missing in XP SP3 and Win 7
@ stdcall IsBadCodePtr(ptr)
@ stdcall IsBadHugeReadPtr(ptr long)
@ stdcall IsBadHugeWritePtr(ptr long)
@ stdcall IsBadStringPtrA(ptr long)
@ stdcall IsBadStringPtrW(ptr long)
@ stdcall IsBadWritePtr(ptr long)
+;@ stdcall IsCalendarLeapDay ; Win 7
+;@ stdcall IsCalendarLeapMonth ; Win 7
+;@ stdcall IsCalendarLeapYear ; Win 7
@ stdcall IsDBCSLeadByte(long)
@ stdcall IsDBCSLeadByteEx(long long)
@ stdcall IsDebuggerPresent()
+;@ stdcall IsNLSDefinedString ; Win 7
+;@ stdcall IsNormalizedString ; Win 7
@ stdcall IsProcessInJob(long long ptr)
@ stdcall IsProcessorFeaturePresent(long)
@ stdcall IsSystemResumeAutomatic()
+;@ stdcall IsThreadAFiber ; Win 7
+;@ stdcall IsThreadpoolTimerSet ntdll.TpIsTimerSet ; Win 7
+;@ stdcall IsTimeZoneRedirectionEnabled ; Win 7
+;@ stdcall IsValidCalDateTime ; Win 7
@ stdcall IsValidCodePage(long)
@ stdcall IsValidLanguageGroup(long long)
@ stdcall IsValidLocale(long long)
-@ stdcall IsValidUILanguage(long)
+;@ stdcall IsValidLocaleName ; Win 7
+@ stdcall IsValidUILanguage(long) ; missing in Win 7
@ stdcall IsWow64Process(ptr ptr)
+;@ stdcall K32EmptyWorkingSet ; Win 7
+;@ stdcall K32EnumDeviceDrivers ; Win 7
+;@ stdcall K32EnumPageFilesA ; Win 7
+;@ stdcall K32EnumPageFilesW ; Win 7
+;@ stdcall K32EnumProcessModules ; Win 7
+;@ stdcall K32EnumProcessModulesEx ; Win 7
+;@ stdcall K32EnumProcesses ; Win 7
+;@ stdcall K32GetDeviceDriverBaseNameA ; Win 7
+;@ stdcall K32GetDeviceDriverBaseNameW ; Win 7
+;@ stdcall K32GetDeviceDriverFileNameA ; Win 7
+;@ stdcall K32GetDeviceDriverFileNameW ; Win 7
+;@ stdcall K32GetMappedFileNameA ; Win 7
+;@ stdcall K32GetMappedFileNameW ; Win 7
+;@ stdcall K32GetModuleBaseNameA ; Win 7
+;@ stdcall K32GetModuleBaseNameW ; Win 7
+;@ stdcall K32GetModuleFileNameExA ; Win 7
+;@ stdcall K32GetModuleFileNameExW ; Win 7
+;@ stdcall K32GetModuleInformation ; Win 7
+;@ stdcall K32GetPerformanceInfo ; Win 7
+;@ stdcall K32GetProcessImageFileNameA ; Win 7
+;@ stdcall K32GetProcessImageFileNameW ; Win 7
+;@ stdcall K32GetProcessMemoryInfo ; Win 7
+;@ stdcall K32GetWsChanges ; Win 7
+;@ stdcall K32GetWsChangesEx ; Win 7
+;@ stdcall K32InitializeProcessForWsWatch ; Win 7
+;@ stdcall K32QueryWorkingSet ; Win 7
+;@ stdcall K32QueryWorkingSetEx ; Win 7
@ stdcall LCIDToLocaleName(long wstr long long) ; needed for wine gecko; missing in XP SP3
@ stdcall LCMapStringA(long long str long ptr long)
+;@ stdcall LCMapStringEx ; Win 7
@ stdcall LCMapStringW(long long wstr long ptr long)
+@ stdcall LZClose(long)
+;@ stdcall LZCloseFile ; Win 7
+@ stdcall LZCopy(long long)
+;@ stdcall LZCreateFileW ; Win 7
+@ stdcall LZDone()
+@ stdcall LZInit(long)
+@ stdcall LZOpenFileA(str ptr long)
+@ stdcall LZOpenFileW(wstr ptr long)
+@ stdcall LZRead(long str long) ;check
+@ stdcall LZSeek(long long long) ;check
+@ stdcall LZStart()
@ stdcall LeaveCriticalSection(ptr) ntdll.RtlLeaveCriticalSection
+;@ stdcall LeaveCriticalSectionWhenCallbackReturns ntdll.TpCallbackLeaveCriticalSectionOnCompletion ; Win 7
+;@ stdcall LoadAppInitDlls ; Win 7
@ stdcall LoadLibraryA(str)
@ stdcall LoadLibraryExA( str long long)
@ stdcall LoadLibraryExW(wstr long long)
@ stdcall LoadLibraryW(wstr)
@ stdcall LoadModule(str ptr)
@ stdcall LoadResource(long long)
+;@ stdcall LoadStringBaseExW ; Win 7
+;@ stdcall LoadStringBaseW ; Win 7
@ stdcall LocalAlloc(long long)
@ stdcall LocalCompact(long)
@ stdcall LocalFileTimeToFileTime(ptr ptr)
@ stdcall LocalSize(long)
@ stdcall LocalUnlock(long)
;@ stub LocaleNameToLCID ; missing in XP SP3
+;@ stdcall LocateExtendedFeature api-ms-win-core-xstate-l1-1-0.RtlLocateExtendedFeature ; Win 7
+;@ stdcall LocateLegacyContext api-ms-win-core-xstate-l1-1-0.RtlLocateLegacyContext ; Win 7
@ stdcall LockFile(long long long long long)
@ stdcall LockFileEx(long long long long long ptr)
@ stdcall LockResource(long)
-@ stdcall LZClose(long)
-@ stdcall LZCopy(long long)
-@ stdcall LZDone()
-@ stdcall LZInit(long)
-@ stdcall LZOpenFileA(str ptr long)
-@ stdcall LZOpenFileW(wstr ptr long)
-@ stdcall LZRead(long str long) ;check
-@ stdcall LZSeek(long long long) ;check
-@ stdcall LZStart()
@ stdcall MapUserPhysicalPages(ptr long ptr)
@ stdcall MapUserPhysicalPagesScatter(ptr long ptr)
@ stdcall MapViewOfFile(long long long long long)
@ stdcall MapViewOfFileEx(long long long long long ptr)
+;@ stdcall MapViewOfFileExNuma ; Win 7
@ stdcall Module32First(long ptr)
@ stdcall Module32FirstW(long ptr)
@ stdcall Module32Next(long ptr)
@ stdcall MoveFileA(str str)
@ stdcall MoveFileExA(str str long)
@ stdcall MoveFileExW(wstr wstr long)
+;@ stdcall MoveFileTransactedA ; Win 7
+;@ stdcall MoveFileTransactedW ; Win 7
@ stdcall MoveFileW(wstr wstr)
@ stdcall MoveFileWithProgressA(str str ptr ptr long)
@ stdcall MoveFileWithProgressW(wstr wstr ptr ptr long)
@ stdcall MultiByteToWideChar(long long str long ptr long)
@ stdcall NeedCurrentDirectoryForExePathA(str)
@ stdcall NeedCurrentDirectoryForExePathW(wstr)
-@ stdcall NlsConvertIntegerToString(double double double wstr double)
+;@ stdcall NlsCheckPolicy ; Win 7
+@ stdcall NlsConvertIntegerToString(double double double wstr double) ; missing in Win 7
+;@ stdcall NlsEventDataDescCreate ; Win 7
@ stdcall NlsGetCacheUpdateCount()
-@ stub NlsResetProcessLocale ; missing in XP SP3
-@ stub NotifyNLSUserCache ; missing in XP SP3
-@ stdcall NumaVirtualQueryNode(long long long long)
+@ stub NlsResetProcessLocale ; missing in XP SP3 and Win 7
+;@ stdcall NlsUpdateLocale ; Win 7
+;@ stdcall NlsUpdateSystemLocale ; Win 7
+;@ stdcall NlsWriteEtwEvent ; Win 7
+;@ stdcall NormalizeString ; Win 7
+;@ stdcall NotifyMountMgr ; Win 7
+@ stub NotifyNLSUserCache ; missing in XP SP3 and win 7
+;@ stdcall NotifyUILanguageChange ; Win 7
+@ stdcall NumaVirtualQueryNode(long long long long) ; missing in win 7
@ stdcall OpenConsoleW(wstr long long long)
-@ stdcall OpenDataFile(long long)
+@ stdcall OpenDataFile(long long) ; missing in Win 7
@ stdcall OpenEventA(long long str)
@ stdcall OpenEventW(long long wstr)
@ stdcall OpenFile(str ptr long)
+;@ stdcall OpenFileById ; Win 7
@ stdcall OpenFileMappingA(long long str)
@ stdcall OpenFileMappingW(long long wstr)
@ stdcall OpenJobObjectA(long long str)
@ stdcall OpenJobObjectW(long long wstr)
@ stdcall OpenMutexA(long long str)
@ stdcall OpenMutexW(long long wstr)
+;@ stdcall OpenPrivateNamespaceA ; Win 7
+;@ stdcall OpenPrivateNamespaceW ; Win 7
@ stdcall OpenProcess(long long long)
+;@ stdcall OpenProcessToken api-ms-win-core-processthreads-l1-1-0.OpenProcessToken ; Win 7
@ stdcall OpenProfileUserMapping()
@ stdcall OpenSemaphoreA(long long str)
@ stdcall OpenSemaphoreW(long long wstr)
@ stdcall OpenThread(long long long)
+;@ stdcall OpenThreadToken api-ms-win-core-processthreads-l1-1-0.OpenThreadToken ; win 7
@ stdcall OpenWaitableTimerA(long long str)
@ stdcall OpenWaitableTimerW(long long wstr)
@ stdcall OutputDebugStringA(str)
@ stdcall PeekConsoleInputW(ptr ptr long ptr)
@ stdcall PeekNamedPipe(long ptr long ptr ptr ptr)
@ stdcall PostQueuedCompletionStatus(long long ptr ptr)
+;@ stdcall PowerClearRequest ; Win 7
+;@ stdcall PowerCreateRequest ; Win 7
+;@ stdcall PowerSetRequest ; Win 7
@ stdcall PrepareTape(ptr long long)
@ stdcall PrivCopyFileExW(wstr wstr ptr ptr long long)
@ stdcall PrivMoveFileIdentityW(long long long)
@ stdcall QueryDepthSList(ptr) ntdll.RtlQueryDepthSList
@ stdcall QueryDosDeviceA(str ptr long)
@ stdcall QueryDosDeviceW(wstr ptr long)
+@ stdcall QueryFullProcessImageNameA(ptr long str ptr) ; Vista and later
+@ stdcall QueryFullProcessImageNameW(ptr long wstr ptr) ; Vista and later
+;@ stdcall QueryIdleProcessorCycleTime ; Win 7
+;@ stdcall QueryIdleProcessorCycleTimeEx ; Win 7
@ stdcall QueryInformationJobObject(long long ptr long ptr)
@ stdcall QueryMemoryResourceNotification(long ptr)
-@ stub QueryNumberOfEventLogRecords ; missing in XP SP3
-@ stub QueryOldestEventLogRecord ; missing in XP SP3
+@ stub QueryNumberOfEventLogRecords ; missing in XP SP3 and Win 7
+@ stub QueryOldestEventLogRecord ; missing in XP SP3 and Win 7
@ stdcall QueryPerformanceCounter(ptr)
@ stdcall QueryPerformanceFrequency(ptr)
-@ stdcall QueryWin31IniFilesMappedToRegistry(long long long long)
+;@ stdcall QueryProcessAffinityUpdateMode ; Win 7
+;@ stdcall QueryProcessCycleTime ; Win 7
+;@ stdcall QueryThreadCycleTime ; Win 7
+;@ stdcall QueryThreadProfiling ; Win 7
+;@ stdcall QueryThreadpoolStackInformation ; Win 7
+;@ stdcall -arch=x86_64 QueryUmsThreadInformation
+;@ stdcall QueryUnbiasedInterruptTime ; Win 7
+@ stdcall QueryWin31IniFilesMappedToRegistry(long long long long) ; missing in Win 7
@ stdcall QueueUserAPC(ptr long long)
@ stdcall QueueUserWorkItem(ptr ptr long)
@ stdcall RaiseException(long long long ptr)
+;@ stdcall RaiseFailFastException ; Win 7
@ stub ReOpenFile ;@ stdcall ReOpenFile(ptr long long long)
@ stdcall ReadConsoleA(long ptr long ptr ptr)
@ stdcall ReadConsoleInputA(long ptr long ptr)
@ stdcall ReadFileEx(long ptr long ptr ptr)
@ stdcall ReadFileScatter(long ptr long ptr ptr)
@ stdcall ReadProcessMemory(long ptr ptr long ptr)
+;@ stdcall ReadThreadProfilingData ; Win 7
+;@ stdcall RegCloseKey ; Win 7
+;@ stdcall RegCreateKeyExA ; Win 7
+;@ stdcall RegCreateKeyExW ; Win 7
+;@ stdcall RegDeleteKeyExA ; Win 7
+;@ stdcall RegDeleteKeyExW ; Win 7
+;@ stdcall RegDeleteTreeA ; Win 7
+;@ stdcall RegDeleteTreeW ; Win 7
+;@ stdcall RegDeleteValueA ; Win 7
+;@ stdcall RegDeleteValueW ; Win 7
+;@ stdcall RegDisablePredefinedCacheEx ; Win 7
+;@ stdcall RegEnumKeyExA ; Win 7
+;@ stdcall RegEnumKeyExW ; Win 7
+;@ stdcall RegEnumValueA ; Win 7
+;@ stdcall RegEnumValueW ; Win 7
+;@ stdcall RegFlushKey ; Win 7
+;@ stdcall RegGetKeySecurity ; Win 7
+;@ stdcall RegGetValueA ; Win 7
+;@ stdcall RegGetValueW ; Win 7
+;@ stdcall RegKrnGetGlobalState ; Win 7
+;@ stdcall RegKrnInitialize ; Win 7
+;@ stdcall RegLoadKeyA ; Win 7
+;@ stdcall RegLoadKeyW ; Win 7
+;@ stdcall RegLoadMUIStringA ; Win 7
+;@ stdcall RegLoadMUIStringW ; Win 7
+;@ stdcall RegNotifyChangeKeyValue ; Win 7
+;@ stdcall RegOpenCurrentUser ; Win 7
+;@ stdcall RegOpenKeyExA ; Win 7
+;@ stdcall RegOpenKeyExW ; Win 7
+;@ stdcall RegOpenUserClassesRoot ; Win 7
+;@ stdcall RegQueryInfoKeyA ; Win 7
+;@ stdcall RegQueryInfoKeyW ; Win 7
+;@ stdcall RegQueryValueExA ; Win 7
+;@ stdcall RegQueryValueExW ; Win 7
+;@ stdcall RegRestoreKeyA ; Win 7
+;@ stdcall RegRestoreKeyW ; Win 7
+;@ stdcall RegSaveKeyExA ; Win 7
+;@ stdcall RegSaveKeyExW ; Win 7
+;@ stdcall RegSetKeySecurity ; Win 7
+;@ stdcall RegSetValueExA ; Win 7
+;@ stdcall RegSetValueExW ; Win 7
+;@ stdcall RegUnLoadKeyA ; Win 7
+;@ stdcall RegUnLoadKeyW ; Win 7
+;@ stdcall RegisterApplicationRecoveryCallback ; Win 7
@ stdcall RegisterApplicationRestart(wstr long)
@ stdcall RegisterConsoleIME(ptr ptr)
@ stdcall RegisterConsoleOS2(long)
@ stdcall RegisterConsoleVDM(long long long long long long long long long long long)
-@ stub RegisterServiceProcess ; missing in XP SP3
-@ stub RegisterSysMsgHandler ; missing in XP SP3
+@ stub RegisterServiceProcess ; missing in XP SP3 and Win 7
+@ stub RegisterSysMsgHandler ; missing in XP SP3 and win 7
@ stdcall RegisterWaitForInputIdle(ptr)
@ stdcall RegisterWaitForSingleObject(ptr long ptr ptr long long)
@ stdcall RegisterWaitForSingleObjectEx(long ptr ptr long long)
@ stdcall RegisterWowExec(long)
@ stdcall ReleaseActCtx(ptr)
@ stdcall ReleaseMutex(long)
-@ stdcall ReleaseSemaphore(long long ptr)
+;@ stdcall ReleaseMutexWhenCallbackReturns ntdll.TpCallbackReleaseMutexOnCompletion ; Win 7
@ stdcall ReleaseSRWLockExclusive(ptr) ntdll.RtlReleaseSRWLockExclusive
@ stdcall ReleaseSRWLockShared(ptr) ntdll.RtlReleaseSRWLockShared
+@ stdcall ReleaseSemaphore(long long ptr)
+;@ stdcall ReleaseSemaphoreWhenCallbackReturns ntdll.TpCallbackReleaseSemaphoreOnCompletion ; Win 7
@ stdcall RemoveDirectoryA(str)
+;@ stdcall RemoveDirectoryTransactedA ; Win 7
+;@ stdcall RemoveDirectoryTransactedW ; Win 7
@ stdcall RemoveDirectoryW(wstr)
@ stdcall RemoveLocalAlternateComputerNameA(str long)
@ stdcall RemoveLocalAlternateComputerNameW(wstr long)
+;@ stdcall RemoveSecureMemoryCacheCallback ; Win 7
@ stdcall RemoveVectoredContinueHandler(ptr) ntdll.RtlRemoveVectoredContinueHandler
@ stdcall RemoveVectoredExceptionHandler(ptr) ntdll.RtlRemoveVectoredExceptionHandler
@ stdcall ReplaceFile(wstr wstr wstr long ptr ptr) ReplaceFileW
@ stdcall ReplaceFileA(str str str long ptr ptr)
@ stdcall ReplaceFileW(wstr wstr wstr long ptr ptr)
+;@ stdcall ReplacePartitionUnit ; Win 7
@ stdcall RequestDeviceWakeup(long)
@ stdcall RequestWakeupLatency(long)
@ stdcall ResetEvent(long)
@ stdcall ResetWriteWatch(ptr long)
+;@ stdcall ResolveLocaleName ; Win 7
@ stdcall RestoreLastError(long) ntdll.RtlRestoreLastWin32Error
@ stdcall ResumeThread(long)
+@ stdcall -arch=x86_64 RtlAddFunctionTable(ptr long double)
@ stdcall RtlCaptureContext(ptr) ntdll.RtlCaptureContext
@ stdcall RtlCaptureStackBackTrace(long long ptr ptr) ntdll.RtlCaptureStackBackTrace
+@ stdcall -arch=x86_64 RtlCompareMemory(ptr ptr ptr)
+@ stdcall -arch=x86_64 RtlCopyMemory(ptr ptr ptr)
+@ stdcall -arch=x86_64 RtlDeleteFunctionTable(ptr)
@ stdcall RtlFillMemory(ptr long long) ntdll.RtlFillMemory
+@ stdcall -arch=x86_64 RtlInstallFunctionTableCallback(double double long ptr ptr ptr)
+@ stdcall -arch=x86_64 RtlLookupFunctionEntry(ptr ptr ptr) ntdll.RtlLookupFunctionEntry
@ stdcall RtlMoveMemory(ptr ptr long) ntdll.RtlMoveMemory
+@ stdcall -arch=x86_64 RtlPcToFileHeader(ptr ptr) ntdll.RtlPcToFileHeader
+@ stdcall -arch=x86_64 RtlRaiseException(ptr) ntdll.RtlRaiseException
+@ stdcall -arch=x86_64 RtlRestoreContext(ptr ptr) ntdll.RtlRestoreContext
@ stdcall RtlUnwind(ptr ptr ptr long) ntdll.RtlUnwind
-@ stdcall RtlVirtualUnwind(ptr ptr ptr long) ntdll.RtlVirtualUnwind
-@ stdcall RtlLookupFunctionEntry(ptr ptr ptr) ntdll.RtlLookupFunctionEntry
+@ stdcall -arch=x86_64 RtlUnwindEx(ptr ptr ptr ptr ptr ptr) ntdll.RtlUnwindEx
+@ stdcall -arch=x86_64 RtlVirtualUnwind(ptr ptr ptr long) ntdll.RtlVirtualUnwind
@ stdcall RtlZeroMemory(ptr long) ntdll.RtlZeroMemory
@ stdcall ScrollConsoleScreenBufferA(long ptr ptr ptr ptr)
@ stdcall ScrollConsoleScreenBufferW(long ptr ptr ptr ptr)
@ stdcall SearchPathA(str str str long ptr ptr)
@ stdcall SearchPathW(wstr wstr wstr long ptr ptr)
-@ stdcall SetCPGlobal(long)
+@ stdcall SetCPGlobal(long) ; missing in Win 7
@ stdcall SetCalendarInfoA(long long long str)
@ stdcall SetCalendarInfoW(long long long wstr)
@ stdcall SetClientTimeZoneInformation(ptr)
@ stdcall SetComputerNameW(wstr)
@ stdcall SetConsoleActiveScreenBuffer(long)
@ stdcall SetConsoleCP(long)
-@ stdcall SetConsoleCommandHistoryMode(long)
+@ stdcall SetConsoleCommandHistoryMode(long) ; missing in win 7
@ stdcall SetConsoleCtrlHandler(ptr long)
@ stdcall SetConsoleCursor(long long)
@ stdcall SetConsoleCursorInfo(long ptr)
@ stdcall SetConsoleDisplayMode(long long ptr)
@ stdcall SetConsoleFont(long long)
@ stdcall SetConsoleHardwareState(long long long)
+;@ stdcall SetConsoleHistoryInfo ; Win 7
@ stdcall SetConsoleIcon(ptr)
@ stdcall SetConsoleInputExeNameA(ptr)
@ stdcall SetConsoleInputExeNameW(ptr)
@ stdcall SetConsoleOS2OemFormat(long)
@ stdcall SetConsoleOutputCP(long)
@ stdcall SetConsolePalette(long long long)
+;@ stdcall SetConsoleScreenBufferInfoEx ; Win 7
@ stdcall SetConsoleScreenBufferSize(long long)
@ stdcall SetConsoleTextAttribute(long long)
@ stdcall SetConsoleTitleA(str)
@ stdcall SetConsoleTitleW(wstr)
@ stdcall SetConsoleWindowInfo(long long ptr)
@ stdcall SetCriticalSectionSpinCount(ptr long) ntdll.RtlSetCriticalSectionSpinCount
+;@ stdcall SetCurrentConsoleFontEx ; Win 7
@ stdcall SetCurrentDirectoryA(str)
@ stdcall SetCurrentDirectoryW(wstr)
-@ stub SetDaylightFlag ; missing in XP SP3
+@ stub SetDaylightFlag ; missing in XP SP3 and Win 7
@ stdcall SetDefaultCommConfigA(str ptr long)
@ stdcall SetDefaultCommConfigW(wstr ptr long)
@ stdcall SetDllDirectoryA(str)
@ stdcall SetDllDirectoryW(wstr)
+;@ stdcall SetDynamicTimeZoneInformation ; Win 7
@ stdcall SetEndOfFile(long)
+;@ stdcall SetEnvironmentStringsA ; Win 7
+;@ stdcall SetEnvironmentStringsW ; Win 7
@ stdcall SetEnvironmentVariableA(str str)
@ stdcall SetEnvironmentVariableW(wstr wstr)
@ stdcall SetErrorMode(long)
@ stdcall SetEvent(long)
+;@ stdcall SetEventWhenCallbackReturns ntdll.TpCallbackSetEventOnCompletion ; Win 7
+;@ stdcall SetExtendedFeaturesMask api-ms-win-core-xstate-l1-1-0.RtlSetExtendedFeaturesMask ; Win 7
@ stdcall SetFileApisToANSI()
@ stdcall SetFileApisToOEM()
@ stdcall SetFileAttributesA(str long)
+;@ stdcall SetFileAttributesTransactedA ; Win 7
+;@ stdcall SetFileAttributesTransactedW ; Win 7
@ stdcall SetFileAttributesW(wstr long)
+;@ stdcall SetFileBandwidthReservation ; Win 7
+;@ stdcall SetFileCompletionNotificationModes ; Win 7
+;@ stdcall SetFileInformationByHandle ; Win 7
+;@ stdcall SetFileIoOverlappedRange ; Win 7
@ stdcall SetFilePointer(long long ptr long)
@ stdcall SetFilePointerEx(long double ptr long)
@ stdcall SetFileShortNameA(long str)
@ stdcall SetFileValidData(long double)
@ stdcall SetFirmwareEnvironmentVariableA(str str ptr long)
@ stdcall SetFirmwareEnvironmentVariableW(wstr wstr ptr long)
-@ stdcall SetHandleContext(long long)
+@ stdcall SetHandleContext(long long) ; missing in Win 7 x64
@ stdcall SetHandleCount(long)
@ stdcall SetHandleInformation(long long long)
@ stdcall SetInformationJobObject(long long ptr long)
@ stdcall SetLocaleInfoW(long long wstr)
@ stdcall SetMailslotInfo(long long)
@ stdcall SetMessageWaitingIndicator(long double)
+;@ stdcall SetNamedPipeAttribute ; Win 7
@ stdcall SetNamedPipeHandleState(long ptr ptr ptr)
@ stdcall SetPriorityClass(long long)
@ stdcall SetProcessAffinityMask(long long)
+;@ stdcall SetProcessAffinityUpdateMode ; Win 7
+;@ stdcall SetProcessDEPPolicy ; Win 7
+;@ stdcall SetProcessPreferredUILanguages ; Win 7
@ stdcall SetProcessPriorityBoost(long long)
@ stdcall SetProcessShutdownParameters(long long)
@ stdcall SetProcessWorkingSetSize(long long long)
+;@ stdcall SetProcessWorkingSetSizeEx ; Win 7
+;@ stdcall SetSearchPathMode ; Win 7
@ stdcall SetStdHandle(long long)
+;@ stdcall SetStdHandleEx ; Win 7
+;@ stdcall SetSystemFileCacheSize ; Win 7
@ stdcall SetSystemPowerState(long long)
@ stdcall SetSystemTime(ptr)
@ stdcall SetSystemTimeAdjustment(long long)
@ stdcall SetTermsrvAppInstallMode(long)
@ stdcall SetThreadAffinityMask(long long)
@ stdcall SetThreadContext(long ptr)
+;@ stdcall SetThreadErrorMode ; Win 7
@ stdcall SetThreadExecutionState(long)
+;@ stdcall SetThreadGroupAffinity ; Win 7
@ stdcall SetThreadIdealProcessor(long long)
+;@ stdcall SetThreadIdealProcessorEx ; Win 7
@ stdcall SetThreadLocale(long)
+;@ stdcall SetThreadPreferredUILanguages ; Win 7
@ stdcall SetThreadPriority(long long)
@ stdcall SetThreadPriorityBoost(long long)
+;@ stdcall SetThreadStackGuarantee ; Win 7
+;@ stdcall SetThreadToken api-ms-win-core-processthreads-l1-1-0.SetThreadToken ; Win 7
@ stdcall SetThreadUILanguage(long)
+;@ stdcall SetThreadpoolStackInformation ; Win 7
+;@ stdcall SetThreadpoolThreadMaximum ntdll.TpSetPoolMaxThreads ; Win 7
+;@ stdcall SetThreadpoolThreadMinimum ; Win 7
+;@ stdcall SetThreadpoolTimer ntdll.TpSetTimer ; Win 7
+;@ stdcall SetThreadpoolWait ntdll.TpSetWait ; Win 7
@ stdcall SetTimeZoneInformation(ptr)
@ stdcall SetTimerQueueTimer(long ptr ptr long long long)
+;@ stdcall -arch?x86_64 SetUmsThreadInformation
@ stdcall SetUnhandledExceptionFilter(ptr)
@ stdcall SetUserGeoID(long)
@ stdcall SetVDMCurrentDirectories(long long)
@ stdcall SetVolumeMountPointA(str str)
@ stdcall SetVolumeMountPointW(wstr wstr)
@ stdcall SetWaitableTimer(long ptr long ptr ptr long)
+;@ stdcall SetWaitableTimerEx api-ms-win-core-threadpool-l1-1-0.SetWaitableTimerEx ; Win 7
@ stdcall SetupComm(long long long)
@ stdcall ShowConsoleCursor(long long)
@ stdcall SignalObjectAndWait(long long long long)
@ stdcall SizeofResource(long long)
@ stdcall Sleep(long)
+;@ stdcall SleepConditionVariableCS ; Win 7
+;@ stdcall SleepConditionVariableSRW ; Win 7
@ stdcall SleepEx(long long)
+;@ stdcall SortCloseHandle ; Win 7
+;@ stdcall SortGetHandle ; Win 7
+;@ stdcall StartThreadpoolIo ntdll.TpStartAsyncIoOperation ; Win 7
+;@ stdcall SubmitThreadpoolWork ntdll.TpPostWork ; Win 7
@ stdcall SuspendThread(long)
@ stdcall SwitchToFiber(ptr)
@ stdcall SwitchToThread()
@ stdcall Thread32First(long ptr)
@ stdcall Thread32Next(long ptr)
@ stdcall TlsAlloc()
-@ stub TlsAllocInternal ; missing in XP SP3
+@ stub TlsAllocInternal ; missing in XP SP3 and Win 7
@ stdcall TlsFree(long)
-@ stub TlsFreeInternal ; missing in XP SP3
+@ stub TlsFreeInternal ; missing in XP SP3 and Win 7
@ stdcall TlsGetValue(long)
@ stdcall TlsSetValue(long ptr)
@ stdcall Toolhelp32ReadProcessMemory(long ptr ptr long ptr)
@ stdcall TransactNamedPipe(long ptr long ptr long ptr ptr)
@ stdcall TransmitCommChar(long long)
-@ stdcall TrimVirtualBuffer(ptr)
+@ stdcall TrimVirtualBuffer(ptr) ; missing in Win 7
+;@ stdcall TryAcquireSRWLockExclusive ntdll.RtlTryAcquireSRWLockExclusive ; Win 7
+;@ stdcall TryAcquireSRWLockShared ntdll.RtlTryAcquireSRWLockShared ; Win 7
@ stdcall TryEnterCriticalSection(ptr) ntdll.RtlTryEnterCriticalSection
+;@ stdcall TrySubmitThreadpoolCallback ; Win 7
@ stdcall TzSpecificLocalTimeToSystemTime(ptr ptr ptr)
@ stdcall UTRegister(long str str str ptr ptr ptr)
@ stdcall UTUnRegister(long)
+;@ stdcall -arch=x86_64 UmsThreadYield
@ stdcall UnhandledExceptionFilter(ptr)
@ stdcall UnlockFile(long long long long long)
@ stdcall UnlockFileEx(long long long long ptr)
@ stdcall UnmapViewOfFile(ptr)
+;@ stdcall UnregisterApplicationRecoveryCallback ; Win 7
+;@ stdcall UnregisterApplicationRestart ; Win 7
@ stdcall UnregisterConsoleIME()
@ stdcall UnregisterWait(long)
@ stdcall UnregisterWaitEx(long long)
+;@ stdcall UpdateCalendarDayOfWeek ; Win 7
+;@ stdcall UpdateProcThreadAttribute api-ms-win-core-processthreads-l1-1-0.UpdateProcThreadAttribute ; Win 7
@ stdcall UpdateResourceA(long str str long ptr long)
@ stdcall UpdateResourceW(long wstr wstr long ptr long)
@ stdcall VDMConsoleOperation(long long)
@ stdcall VDMOperationStarted(long)
-@ stub ValidateCType ; missing in XP SP3
-@ stub ValidateLocale ; missing in XP SP3
+@ stub ValidateCType ; missing in XP SP3 and Win 7
+@ stub ValidateLocale ; missing in XP SP3 and Win 7
@ stdcall VerLanguageNameA(long str long)
@ stdcall VerLanguageNameW(long wstr long)
@ stdcall -ret64 VerSetConditionMask(long long long long) ntdll.VerSetConditionMask
@ stdcall VerifyConsoleIoHandle(long)
+;@ stdcall VerifyScripts ; Win 7
@ stdcall VerifyVersionInfoA(long long double)
@ stdcall VerifyVersionInfoW(long long double)
@ stdcall VirtualAlloc(ptr long long long)
@ stdcall VirtualAllocEx(long ptr long long long)
-@ stdcall VirtualBufferExceptionHandler(long long long)
+;@ stdcall VirtualAllocExNuma ; Win 7
+@ stdcall VirtualBufferExceptionHandler(long long long) ; missing in Win 7
@ stdcall VirtualFree(ptr long long)
@ stdcall VirtualFreeEx(long ptr long long)
@ stdcall VirtualLock(ptr long)
@ stdcall VirtualQuery(ptr ptr long)
@ stdcall VirtualQueryEx(long ptr ptr long)
@ stdcall VirtualUnlock(ptr long)
-@ stdcall WakeAllConditionVariable(ptr) ntdll.RtlWakeAllConditionVariable
-@ stdcall WakeConditionVariable(ptr) ntdll.RtlWakeConditionVariable
+;@ stdcall WTSGetActiveConsoleSessionId ; Win 7
@ stdcall WaitCommEvent(long ptr ptr)
@ stdcall WaitForDebugEvent(ptr long)
@ stdcall WaitForMultipleObjects(long ptr long long)
@ stdcall WaitForMultipleObjectsEx(long ptr long long long)
@ stdcall WaitForSingleObject(long long)
@ stdcall WaitForSingleObjectEx(long long long)
+;@ stdcall WaitForThreadpoolIoCallbacks ntdll.TpWaitForIoCompletion ; Win 7
+;@ stdcall WaitForThreadpoolTimerCallbacks ntdll.TpWaitForTimer ; Win 7
+;@ stdcall WaitForThreadpoolWaitCallbacks ntdll.TpWaitForWait ; Win 7
+;@ stdcall WaitForThreadpoolWorkCallbacks ntdll.TpWaitForWork ; Win 7
@ stdcall WaitNamedPipeA (str long)
@ stdcall WaitNamedPipeW (wstr long)
+@ stdcall WakeAllConditionVariable(ptr) ntdll.RtlWakeAllConditionVariable
+@ stdcall WakeConditionVariable(ptr) ntdll.RtlWakeConditionVariable
+;@ stdcall WerGetFlags ; Win 7
+;@ stdcall WerRegisterFile ; Win 7
+;@ stdcall WerRegisterMemoryBlock ; Win 7
+;@ stdcall WerRegisterRuntimeExceptionModule ; Win 7
+;@ stdcall WerSetFlags ; Win 7
+;@ stdcall WerUnregisterFile ; Win 7
+;@ stdcall WerUnregisterMemoryBlock ; Win 7
+;@ stdcall WerUnregisterRuntimeExceptionModule ; Win 7
+;@ stdcall WerpCleanupMessageMapping ; Win 7
+;@ stdcall WerpInitiateRemoteRecovery ; Win 7
+;@ stdcall WerpNotifyLoadStringResource ; Win 7
+;@ stdcall WerpNotifyLoadStringResourceEx ; Win 7
+;@ stdcall WerpNotifyUseStringResource ; Win 7
+;@ stdcall WerpStringLookup ; Win 7
@ stdcall WideCharToMultiByte(long long wstr long ptr long ptr ptr)
@ stdcall WinExec(str long)
-#ifdef _M_AMD64
-@ stdcall Wow64EnableWow64FsRedirection(long)
@ stdcall Wow64DisableWow64FsRedirection(long)
+@ stdcall Wow64EnableWow64FsRedirection(long)
+;@ stdcall Wow64GetThreadContext ; Win 7
+;@ stdcall Wow64GetThreadSelectorEntry ; Win 7
@ stdcall Wow64RevertWow64FsRedirection(long)
-#endif
+;@ stdcall Wow64SetThreadContext ; Win 7
+;@ stdcall Wow64SuspendThread ; Win 7
@ stdcall WriteConsoleA(long ptr long ptr ptr)
@ stdcall WriteConsoleInputA(long ptr long ptr)
@ stdcall WriteConsoleInputVDMA(long long long long)
@ stdcall _lclose(long)
@ stdcall _lcreat(str long)
@ stdcall _llseek(long long long)
+;@ stdcall -arch=x86_64 _local_unwind ntdll._local_unwind; Win 7
@ stdcall _lopen(str long)
@ stdcall _lread(long ptr long) _hread
@ stdcall _lwrite(long ptr long) _hwrite
-@ stub dprintf ; missing in XP SP3
+@ stub dprintf ; missing in XP SP3 and Win 7
@ stdcall lstrcat(str str) lstrcatA
@ stdcall lstrcatA(str str)
@ stdcall lstrcatW(wstr wstr)
@ stdcall lstrlen(str) lstrlenA
@ stdcall lstrlenA(str)
@ stdcall lstrlenW(wstr)
-
-; Functions added in Win Vista
-@ stdcall QueryFullProcessImageNameA(ptr long str ptr)
-@ stdcall QueryFullProcessImageNameW(ptr long wstr ptr)
+;@ stdcall -arch=x86_64 uaw_lstrcmpW ; Win 7
+;@ stdcall -arch=x86_64 uaw_lstrcmpiW ; Win 7
+;@ stdcall -arch=x86_64 uaw_lstrlenW ; Win 7
+;@ stdcall -arch=x86_64 uaw_wcschr ; Win 7
+;@ stdcall -arch=x86_64 uaw_wcscpy ; Win 7
+;@ stdcall -arch=x86_64 uaw_wcsicmp ; Win 7
+;@ stdcall -arch=x86_64 uaw_wcslen ; Win 7
+;@ stdcall -arch=x86_64 uaw_wcsrchr ; Win 7
<?xml version="1.0"?>
<!DOCTYPE group SYSTEM "../../../tools/rbuild/project.dtd">
-<module name="kernel32" type="win32dll" crt="dll" baseaddress="${BASEADDRESS_KERNEL32}" installbase="system32" installname="kernel32.dll">
+<module name="kernel32" type="win32dll" crt="dll" baseaddress="${BASEADDRESS_KERNEL32}" installbase="system32" installname="kernel32.dll" allowwarnings="true">
<importlibrary definition="kernel32.pspec" />
<include base="kernel32">.</include>
<include base="kernel32" root="intermediate">.</include>
<define name="_KERNEL32_" />
<redefine name="_WIN32_WINNT">0x0600</redefine>
<dependency>errcodes</dependency>
- <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269
<pch>k32.h</pch>
- -->
<group compilerset="gcc">
- <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
- <compilerflag>-fno-unit-at-a-time</compilerflag>
<compilerflag compiler="cxx">-fno-exceptions</compilerflag>
<compilerflag compiler="cxx">-fno-rtti</compilerflag>
</group>
<file>thread.S</file>
</directory>
</if>
+ <if property="ARCH" value="amd64">
+ <directory name="amd64">
+ <file>fiber.S</file>
+ <file>thread.S</file>
+ </directory>
+ </if>
</directory>
<directory name="misc">
<file>icustubs.cpp</file>
ReadProcessMemory(IN HANDLE hProcess,
IN LPCVOID lpBaseAddress,
IN LPVOID lpBuffer,
- IN DWORD nSize,
- OUT LPDWORD lpNumberOfBytesRead)
+ IN SIZE_T nSize,
+ OUT SIZE_T* lpNumberOfBytesRead)
{
NTSTATUS Status;
{
/* Free the memory */
Status = NtFreeVirtualMemory(hProcess,
- (PVOID *)&lpAddress,
- (PULONG)&dwSize,
+ &lpAddress,
+ &dwSize,
dwFreeType);
if (!NT_SUCCESS(Status))
{
return TRUE;
}
+#undef InterlockedIncrement
LONG
WINAPI
InterlockedIncrement(IN OUT LONG volatile *lpAddend)
return _InterlockedIncrement(lpAddend);
}
+#undef InterlockedDecrement
LONG
WINAPI
InterlockedDecrement(IN OUT LONG volatile *lpAddend)
return _InterlockedDecrement(lpAddend);
}
+#undef InterlockedExchange
LONG
WINAPI
InterlockedExchange(IN OUT LONG volatile *Target,
return _InterlockedExchange(Target, Value);
}
+#undef InterlockedExchangeAdd
LONG
WINAPI
InterlockedExchangeAdd(IN OUT LONG volatile *Addend,
return _InterlockedExchangeAdd(Addend, Value);
}
+#undef InterlockedCompareExchange
LONG
WINAPI
InterlockedCompareExchange(IN OUT LONG volatile *Destination,
{
PRTL_USER_PROCESS_PARAMETERS Ppb = NtCurrentPeb()->ProcessParameters;
- switch ((ULONG)hHandle)
+ switch ((ULONG_PTR)hHandle)
{
case STD_INPUT_HANDLE: return Ppb->StandardInput;
case STD_OUTPUT_HANDLE: return Ppb->StandardOutput;
STUB;
return FALSE;
}
+
+BOOL WINAPI TermsrvAppInstallMode(void)
+{
+ STUB;
+ return FALSE;
+}
+
+DWORD WINAPI SetTermsrvAppInstallMode(BOOL bInstallMode)
+{
+ STUB;
+ return 0;
+}
+
HANDLE hSection;
PTH32SNAPSHOT Snapshot;
ULONG_PTR DataOffset;
- ULONG ViewSize, i;
- ULONG nProcesses = 0, nThreads = 0, nHeaps = 0, nModules = 0;
+ SIZE_T ViewSize;
+ ULONG i, nProcesses = 0, nThreads = 0, nHeaps = 0, nModules = 0;
ULONG RequiredSnapshotSize = sizeof(TH32SNAPSHOT);
PRTL_PROCESS_HEAPS hi = NULL;
PRTL_PROCESS_MODULES mi = NULL;
ProcessListEntry->dwSize = sizeof(PROCESSENTRY32W);
ProcessListEntry->cntUsage = 0; /* no longer used */
- ProcessListEntry->th32ProcessID = (ULONG)ProcessInfo->UniqueProcessId;
+ ProcessListEntry->th32ProcessID = (ULONG_PTR)ProcessInfo->UniqueProcessId;
ProcessListEntry->th32DefaultHeapID = 0; /* no longer used */
ProcessListEntry->th32ModuleID = 0; /* no longer used */
ProcessListEntry->cntThreads = ProcessInfo->NumberOfThreads;
- ProcessListEntry->th32ParentProcessID = (ULONG)ProcessInfo->InheritedFromUniqueProcessId;
+ ProcessListEntry->th32ParentProcessID = (ULONG_PTR)ProcessInfo->InheritedFromUniqueProcessId;
ProcessListEntry->pcPriClassBase = ProcessInfo->BasePriority;
ProcessListEntry->dwFlags = 0; /* no longer used */
if(ProcessInfo->ImageName.Buffer != NULL)
{
ThreadListEntry->dwSize = sizeof(THREADENTRY32);
ThreadListEntry->cntUsage = 0; /* no longer used */
- ThreadListEntry->th32ThreadID = (ULONG)ThreadInfo->ClientId.UniqueThread;
- ThreadListEntry->th32OwnerProcessID = (ULONG)ThreadInfo->ClientId.UniqueProcess;
+ ThreadListEntry->th32ThreadID = (ULONG_PTR)ThreadInfo->ClientId.UniqueThread;
+ ThreadListEntry->th32OwnerProcessID = (ULONG_PTR)ThreadInfo->ClientId.UniqueProcess;
ThreadListEntry->tpBasePri = ThreadInfo->BasePriority;
ThreadListEntry->tpDeltaPri = 0; /* no longer used */
ThreadListEntry->dwFlags = 0; /* no longer used */
{
PTH32SNAPSHOT Snapshot;
LARGE_INTEGER SOffset;
- ULONG ViewSize;
+ SIZE_T ViewSize;
NTSTATUS Status;
CHECK_PARAM_SIZE(lphl, sizeof(HEAPLIST32));
{
PTH32SNAPSHOT Snapshot;
LARGE_INTEGER SOffset;
- ULONG ViewSize;
+ SIZE_T ViewSize;
NTSTATUS Status;
CHECK_PARAM_SIZE(lphl, sizeof(HEAPLIST32));
{
PTH32SNAPSHOT Snapshot;
LARGE_INTEGER SOffset;
- ULONG ViewSize;
+ SIZE_T ViewSize;
NTSTATUS Status;
CHECK_PARAM_SIZE(lpme, sizeof(MODULEENTRY32W));
{
PTH32SNAPSHOT Snapshot;
LARGE_INTEGER SOffset;
- ULONG ViewSize;
+ SIZE_T ViewSize;
NTSTATUS Status;
CHECK_PARAM_SIZE(lpme, sizeof(MODULEENTRY32W));
{
PTH32SNAPSHOT Snapshot;
LARGE_INTEGER SOffset;
- ULONG ViewSize;
+ SIZE_T ViewSize;
NTSTATUS Status;
CHECK_PARAM_SIZE(lppe, sizeof(PROCESSENTRY32W));
{
PTH32SNAPSHOT Snapshot;
LARGE_INTEGER SOffset;
- ULONG ViewSize;
+ SIZE_T ViewSize;
NTSTATUS Status;
CHECK_PARAM_SIZE(lppe, sizeof(PROCESSENTRY32W));
{
PTH32SNAPSHOT Snapshot;
LARGE_INTEGER SOffset;
- ULONG ViewSize;
+ SIZE_T ViewSize;
NTSTATUS Status;
CHECK_PARAM_SIZE(lpte, sizeof(THREADENTRY32));
{
PTH32SNAPSHOT Snapshot;
LARGE_INTEGER SOffset;
- ULONG ViewSize;
+ SIZE_T ViewSize;
NTSTATUS Status;
CHECK_PARAM_SIZE(lpte, sizeof(THREADENTRY32));
BOOL
WINAPI
Toolhelp32ReadProcessMemory(DWORD th32ProcessID, LPCVOID lpBaseAddress,
- LPVOID lpBuffer, DWORD cbRead, LPDWORD lpNumberOfBytesRead)
+ LPVOID lpBuffer, SIZE_T cbRead, SIZE_T* lpNumberOfBytesRead)
{
HANDLE hProcess = OpenProcess(PROCESS_VM_READ, FALSE, th32ProcessID);
if(hProcess != NULL)
#include <k32.h>
#ifdef _M_IX86
#include "i386/ketypes.h"
+#elif defined _M_AMD64
+#include "amd64/ketypes.h"
#endif
#define NDEBUG
BasepFreeStack(HANDLE hProcess,
PINITIAL_TEB InitialTeb)
{
- ULONG Dummy = 0;
+ SIZE_T Dummy = 0;
/* Free the Stack */
NtFreeVirtualMemory(hProcess,
IN PVOID StackAddress,
IN ULONG ContextType)
{
-#ifdef _M_IX86
+#ifdef __i386__
DPRINT("BasepInitializeContext: %p\n", Context);
/* Setup the Initial Win32 Thread Context */
}
else if (ContextType == 2) /* For Fibers */
{
- //Context->Eip = (ULONG)BaseFiberStartup;
+ Context->Eip = (ULONG)BaseFiberStartup;
}
else /* For first thread in a Process */
{
/* Give it some room for the Parameter */
Context->Esp -= sizeof(PVOID);
+#elif defined(__x86_64__)
+ DPRINT("BasepInitializeContext: %p\n", Context);
+
+ /* Setup the Initial Win32 Thread Context */
+ Context->Rax = (ULONG_PTR)StartAddress;
+ Context->Rbx = (ULONG_PTR)Parameter;
+ Context->Rsp = (ULONG_PTR)StackAddress;
+ /* The other registers are undefined */
+
+ /* Setup the Segments */
+ Context->SegGs = KGDT_64_DATA | RPL_MASK;
+ Context->SegEs = KGDT_64_DATA | RPL_MASK;
+ Context->SegDs = KGDT_64_DATA | RPL_MASK;
+ Context->SegCs = KGDT_64_R3_CODE | RPL_MASK;
+ Context->SegSs = KGDT_64_DATA | RPL_MASK;
+ Context->SegFs = KGDT_32_R3_TEB;
+
+ /* Set the EFLAGS */
+ Context->EFlags = 0x3000; /* IOPL 3 */
+
+ if (ContextType == 1) /* For Threads */
+ {
+ Context->Rip = (ULONG_PTR)BaseThreadStartupThunk;
+ }
+ else if (ContextType == 2) /* For Fibers */
+ {
+ Context->Rip = (ULONG_PTR)BaseFiberStartup;
+ }
+ else /* For first thread in a Process */
+ {
+ Context->Rip = (ULONG_PTR)BaseProcessStartThunk;
+ }
+
+ /* Set the Context Flags */
+ Context->ContextFlags = CONTEXT_FULL;
+
+ /* Give it some room for the Parameter */
+ Context->Rsp -= sizeof(PVOID);
#else
#warning Unknown architecture
UNIMPLEMENTED;
*/
BOOL WINAPI
GetProcessAffinityMask (HANDLE hProcess,
- LPDWORD lpProcessAffinityMask,
- LPDWORD lpSystemAffinityMask)
+ PDWORD_PTR lpProcessAffinityMask,
+ PDWORD_PTR lpSystemAffinityMask)
{
PROCESS_BASIC_INFORMATION ProcessInfo;
SYSTEM_BASIC_INFORMATION SystemInfo;
*/
BOOL WINAPI
SetProcessAffinityMask (HANDLE hProcess,
- DWORD dwProcessAffinityMask)
+ DWORD_PTR dwProcessAffinityMask)
{
NTSTATUS Status;
{
NTSTATUS Status;
HANDLE DuplicatedHandle;
- ULONG Dummy;
+ SIZE_T Dummy;
DPRINT("BasepDuplicateAndWriteHandle. hProcess: %lx, Handle: %lx,"
"Address: %p\n", ProcessHandle, StandardHandle, Address);
return FALSE;
}
- ClientId.UniqueProcess = (HANDLE)dwProcessId;
+ ClientId.UniqueProcess = (HANDLE)(ULONG_PTR)dwProcessId;
ClientId.UniqueThread = 0;
InitializeObjectAttributes(&ObjectAttributes, NULL, 0, NULL, NULL);
return TRUE;
}
+/*
+ * @implemented
+ */
+BOOL WINAPI InitializeCriticalSectionEx(OUT LPCRITICAL_SECTION lpCriticalSection,
+ IN DWORD dwSpinCount,
+ IN DWORD flags )
+{
+ NTSTATUS Status;
+
+ /* FIXME: Flags ignored */
+
+ /* Initialize the critical section */
+ Status = RtlInitializeCriticalSectionAndSpinCount(
+ (PRTL_CRITICAL_SECTION)lpCriticalSection,
+ dwSpinCount);
+ if (!NT_SUCCESS(Status))
+ {
+ /* Set failure code */
+ SetLastErrorByStatus(Status);
+ return FALSE;
+ }
+
+ /* Success */
+ return TRUE;
+}
+
/* EOF */
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * FILE: lib/kernel32/thread/i386/fiber.S
+ * PURPOSE: Fiber context switch code for the x86 architecture
+ * PROGRAMMERS: Alex Ionescu (alex@relsoft.net)
+ * KJK::Hyperion <noog@libero.it>
+ */
+
+#include <ndk/asm.h>
+
+.globl _SwitchToFiber
+.intel_syntax noprefix
+
+_SwitchToFiber:
+ /* FIXME: TODO */
+ ret 4
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * FILE: lib/kernel32/thread/i386/thread.S
+ * PURPOSE: Thread Start Thunks
+ * PROGRAMMER: Alex Ionescu (alex@relsoft.net)
+ */
+
+.globl _BaseThreadStartupThunk
+.globl _BaseProcessStartThunk
+.intel_syntax noprefix
+
+_BaseThreadStartupThunk:
+
+ /* Start out fresh */
+ xor rbp, rbp
+
+ push rbx /* lpParameter */
+ push rax /* lpStartAddress */
+ push 0 /* Return RIP */
+ jmp _BaseThreadStartup
+
+_BaseProcessStartThunk:
+
+ /* Start out fresh */
+ xor rbp, rbp
+
+ push rax /* lpStartAddress */
+ push 0 /* Return RIP */
+ jmp _BaseProcessStartup
+
+/* EOF */
pTeb->HasFiberData = FALSE;
/* free the fiber */
- if(pTeb->Tib.FiberData != NULL)
+ if(pTeb->NtTib.FiberData != NULL)
{
- RtlFreeHeap(GetProcessHeap(), 0, pTeb->Tib.FiberData);
+ RtlFreeHeap(GetProcessHeap(), 0, pTeb->NtTib.FiberData);
}
/* success */
DPRINT1("Converting Thread to Fiber\n");
/* the current thread is already a fiber */
- if(pTeb->HasFiberData && pTeb->Tib.FiberData) return pTeb->Tib.FiberData;
+ if(pTeb->HasFiberData && pTeb->NtTib.FiberData) return pTeb->NtTib.FiberData;
/* allocate the fiber */
pfCurFiber = (PFIBER)RtlAllocateHeap(GetProcessHeap(),
/* copy some contextual data from the thread to the fiber */
pfCurFiber->Parameter = lpParameter;
- pfCurFiber->ExceptionList = pTeb->Tib.ExceptionList;
- pfCurFiber->StackBase = pTeb->Tib.StackBase;
- pfCurFiber->StackLimit = pTeb->Tib.StackLimit;
+ pfCurFiber->ExceptionList = pTeb->NtTib.ExceptionList;
+ pfCurFiber->StackBase = pTeb->NtTib.StackBase;
+ pfCurFiber->StackLimit = pTeb->NtTib.StackLimit;
pfCurFiber->DeallocationStack = pTeb->DeallocationStack;
pfCurFiber->FlsData = pTeb->FlsData;
pfCurFiber->GuaranteedStackBytes = pTeb->GuaranteedStackBytes;
}
/* associate the fiber to the current thread */
- pTeb->Tib.FiberData = pfCurFiber;
+ pTeb->NtTib.FiberData = pfCurFiber;
pTeb->HasFiberData = TRUE;
/* success */
RtlFreeHeap(GetProcessHeap(), 0, lpFiber);
/* the fiber is deleting itself: let the system deallocate the stack */
- if(NtCurrentTeb()->Tib.FiberData == lpFiber) ExitThread(1);
+ if(NtCurrentTeb()->NtTib.FiberData == lpFiber) ExitThread(1);
/* deallocate the stack */
NtFreeVirtualMemory(NtCurrentProcess(),
DPRINT1("Starting Fiber\n");
BaseThreadStartup((LPTHREAD_START_ROUTINE)Fiber->Context.Eax,
(LPVOID)Fiber->Context.Ebx);
+#elif defined(__x86_64__)
+ PFIBER Fiber = GetFiberData();
+
+ /* Call the Thread Startup Routine */
+ DPRINT1("Starting Fiber\n");
+ BaseThreadStartup((LPTHREAD_START_ROUTINE)Fiber->Context.Rax,
+ (LPVOID)Fiber->Context.Rbx);
#else
#warning Unknown architecture
UNIMPLEMENTED;
&retLen);
if (NT_SUCCESS(Status))
{
- /* Allocate the Activation Context Stack */
- Status = RtlAllocateActivationContextStack(&ActivationContextStack);
+ /* Allocate the Activation Context Stack */
+ Status = RtlAllocateActivationContextStack(&ActivationContextStack);
}
if (NT_SUCCESS(Status))
{
- Teb = ThreadBasicInfo.TebBaseAddress;
+ Teb = ThreadBasicInfo.TebBaseAddress;
- /* Save it */
- Teb->ActivationContextStackPointer = ActivationContextStack;
+ /* Save it */
+ Teb->ActivationContextStackPointer = ActivationContextStack;
#ifndef SXS_SUPPORT_FIXME
- /* Query the Context */
- Status = RtlQueryInformationActivationContext(1,
- 0,
- NULL,
- ActivationContextBasicInformation,
- &ActivationCtxInfo,
- sizeof(ActivationCtxInfo),
+ /* Query the Context */
+ Status = RtlQueryInformationActivationContext(1,
+ 0,
+ NULL,
+ ActivationContextBasicInformation,
+ &ActivationCtxInfo,
+ sizeof(ActivationCtxInfo),
&retLen);
if (NT_SUCCESS(Status))
{
- /* Does it need to be activated? */
- if (!ActivationCtxInfo.hActCtx)
- {
- /* Activate it */
+ /* Does it need to be activated? */
+ if (!ActivationCtxInfo.hActCtx)
+ {
+ /* Activate it */
Status = RtlActivateActivationContext(1,
- ActivationCtxInfo.hActCtx,
- &Cookie);
+ ActivationCtxInfo.hActCtx,
+ &Cookie);
if (!NT_SUCCESS(Status))
DPRINT1("RtlActivateActivationContext failed %x\n", Status);
- }
- }
+ }
+ }
else
DPRINT1("RtlQueryInformationActivationContext failed %x\n", Status);
#endif
IN DWORD dwSelector,
OUT LPLDT_ENTRY lpSelectorEntry)
{
+#ifdef _M_IX86
DESCRIPTOR_TABLE_ENTRY DescriptionTableEntry;
NTSTATUS Status;
/* Success, return the selector */
*lpSelectorEntry = DescriptionTableEntry.Descriptor;
return TRUE;
+#else
+ DPRINT1("Calling GetThreadSelectorEntry!\n");
+ return FALSE;
+#endif
}
/*
message = (session_info->device_type == WaveOutDevice) ? WOM_DONE :
WIM_DATA;
- DPRINT("Notifying client that buffer 0x%p is done\n", header);
+ DPRINT("Notifying client that buffer 0x%x is done\n", header);
/* Notify the client */
NotifyClient(session_info, message, (DWORD_PTR) header, 0);
-<module name="msafd" type="win32dll" baseaddress="${BASEADDRESS_MSAFD}" installbase="system32" installname="msafd.dll" unicode="yes">
+<module name="msafd" type="win32dll" baseaddress="${BASEADDRESS_MSAFD}" installbase="system32" installname="msafd.dll" unicode="yes" allowwarnings="true">
<importlibrary definition="msafd.spec" />
<include base="msafd">.</include>
<include base="msafd">include</include>
--- /dev/null
+;
+; ReactOS MSVCRT Library
+;
+LIBRARY msvcrt.dll
+
+EXPORTS
+ $I10_OUTPUT=MSVCRT_I10_OUTPUT @57
+ ??0__non_rtti_object@@QAE@ABV0@@Z=MSVCRT___non_rtti_object_copy_ctor @1
+ ??0__non_rtti_object@@QAE@PBD@Z=MSVCRT___non_rtti_object_ctor @2
+; ??0bad_cast@@AAE@PBQBD@Z @3
+ ??0bad_cast@@QAE@ABQBD@Z=MSVCRT_bad_cast_ctor @4
+ ??0bad_cast@@QAE@ABV0@@Z=MSVCRT_bad_cast_copy_ctor @5
+; ??0bad_cast@@QAE@PBD@Z @6
+ ??0bad_typeid@@QAE@ABV0@@Z=MSVCRT_bad_typeid_copy_ctor @7
+ ??0bad_typeid@@QAE@PBD@Z=MSVCRT_bad_typeid_ctor @8
+ ??0exception@@QAE@ABQBD@Z=MSVCRT_exception_ctor @9
+; ??0exception@@QAE@ABQBDH@Z @10
+ ??0exception@@QAE@ABV0@@Z=MSVCRT_exception_copy_ctor @11
+ ??0exception@@QAE@XZ=MSVCRT_exception_default_ctor @12
+ ??1__non_rtti_object@@UAE@XZ=MSVCRT___non_rtti_object_dtor @13
+ ??1bad_cast@@UAE@XZ=MSVCRT_bad_cast_dtor @14
+ ??1bad_typeid@@UAE@XZ=MSVCRT_bad_typeid_dtor @15
+ ??1exception@@UAE@XZ=MSVCRT_exception_dtor @16
+ ??1type_info@@UAE@XZ=MSVCRT_type_info_dtor @17
+ ??2@YAPAXI@Z=MSVCRT_operator_new @18
+ ??3@YAXPAX@Z=MSVCRT_operator_delete @19
+ ??4__non_rtti_object@@QAEAAV0@ABV0@@Z=MSVCRT___non_rtti_object_opequals @20
+ ??4bad_cast@@QAEAAV0@ABV0@@Z=MSVCRT_bad_cast_opequals @21
+ ??4bad_typeid@@QAEAAV0@ABV0@@Z=MSVCRT_bad_typeid_opequals @22
+ ??4exception@@QAEAAV0@ABV0@@Z=MSVCRT_exception_opequals @23
+ ??8type_info@@QBEHABV0@@Z=MSVCRT_type_info_opequals_equals @24
+ ??9type_info@@QBEHABV0@@Z=MSVCRT_type_info_opnot_equals @25
+ ??_7__non_rtti_object@@6B@=MSVCRT___non_rtti_object_vtable@@6B@ @26 DATA
+ ??_7bad_cast@@6B@=MSVCRT_bad_cast_vtable @27 DATA
+ ??_7bad_typeid@@6B@=MSVCRT_bad_typeid_vtable @28 DATA
+ ??_7exception@@6B@=MSVCRT_exception_vtable @29 DATA
+ ??_E__non_rtti_object@@UAEPAXI@Z=MSVCRT___non_rtti_object_vector_dtor @30
+ ??_Ebad_cast@@UAEPAXI@Z=MSVCRT_bad_cast_vector_dtor @31
+ ??_Ebad_typeid@@UAEPAXI@Z=MSVCRT_bad_typeid_vector_dtor @32
+ ??_Eexception@@UAEPAXI@Z=MSVCRT_exception_vector_dtor @33
+; ??_Fbad_cast@@QAEXXZ @34
+; ??_Fbad_typeid@@QAEXXZ @35
+ ??_G__non_rtti_object@@UAEPAXI@Z=MSVCRT___non_rtti_object_scalar_dtor @36
+ ??_Gbad_cast@@UAEPAXI@Z=MSVCRT_bad_cast_scalar_dtor @37
+ ??_Gbad_typeid@@UAEPAXI@Z=MSVCRT_bad_typeid_scalar_dtor @38
+ ??_Gexception@@UAEPAXI@Z=MSVCRT_exception_scalar_dtor @39
+ ??_U@YAPAXI@Z=MSVCRT_operator_new @40
+ ??_V@YAXPAX@Z=MSVCRT_operator_delete @41
+ ?_query_new_handler@@YAP6AHI@ZXZ=MSVCRT__query_new_handler @43
+ ?_query_new_mode@@YAHXZ=MSVCRT__query_new_mode @44
+ ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z=MSVCRT__set_new_handler @45
+ ?_set_new_mode@@YAHH@Z=MSVCRT__set_new_mode @46
+ ?_set_se_translator@@YAP6AXIPAU_EXCEPTION_POINTERS@@@ZP6AXI0@Z@Z=MSVCRT__set_se_translator @47
+ ?before@type_info@@QBEHABV1@@Z=MSVCRT_type_info_before @48
+ ?name@type_info@@QBEPBDXZ=MSVCRT_type_info_name @49
+ ?raw_name@type_info@@QBEPBDXZ=MSVCRT_type_info_raw_name @50
+ ?set_new_handler@@YAP6AXXZP6AXXZ@Z=MSVCRT__set_new_handler @51
+ ?set_terminate@@YAP6AXXZP6AXXZ@Z=MSVCRT_set_terminate @52
+ ?set_unexpected@@YAP6AXXZP6AXXZ@Z=MSVCRT_set_unexpected @53
+ ?terminate@@YAXXZ=MSVCRT_terminate @54
+ ?unexpected@@YAXXZ=MSVCRT_unexpected @55
+ ?what@exception@@UBEPBDXZ=MSVCRT_what_exception @56
+ _CIacos @58
+ _CIasin @59
+ _CIatan @60
+ _CIatan2 @61
+ _CIcos @62
+ _CIcosh @63
+ _CIexp @64
+ _CIfmod @65
+ _CIlog @66
+ _CIlog10 @67
+ _CIpow @68
+ _CIsin @69
+ _CIsinh @70
+ _CIsqrt @71
+ _CItan @72
+ _CItanh @73
+ _CxxThrowException @74
+; _EH_prolog @75 ???
+ _Getdays @76
+ _Getmonths @77
+ _Gettnames @78
+ _HUGE @79 DATA
+ _Strftime @80
+ _XcptFilter @81
+ __CppXcptFilter @82
+; __CxxCallUnwindDtor @83
+; __CxxCallUnwindVecDtor @84
+ __CxxDetectRethrow @85
+; __CxxExceptionFilter @86
+; __CxxFrameHandler @87 ???
+; __CxxFrameHandler2 @88
+; __CxxLongjmpUnwind @89 ???
+ __CxxQueryExceptionSize @90
+; __CxxRegisterExceptionObject @91
+; __CxxUnregisterExceptionObject @92
+; __DestructExceptionObject @93
+ __RTCastToVoid=MSVCRT___RTCastToVoid @94
+ __RTDynamicCast=MSVCRT___RTDynamicCast @95
+ __RTtypeid=MSVCRT___RTtypeid @96
+ __STRINGTOLD @97
+; ___lc_codepage_func @98
+; ___lc_collate_cp_func @99
+; ___lc_handle_func @100
+; ___mb_cur_max_func @101
+ ___setlc_active_func @102
+ ___unguarded_readlc_active_add_func @103
+ __argc @104 DATA
+ __argv @105 DATA
+ __badioinfo @106 DATA
+ __crtCompareStringA=kernel32.CompareStringA @107
+ __crtCompareStringW=kernel32.CompareStringW @108
+ __crtGetLocaleInfoW=kernel32.GetLocaleInfo @109
+ __crtGetStringTypeW=kernel32.GetStringTypeW @110
+ __crtLCMapStringA @111
+; __crtLCMapStringW @112
+ __dllonexit @113
+ __doserrno @114
+ __fpecode @115
+ __getmainargs @116
+ __initenv @117
+ __iob_func=__p__iob @118
+ __isascii @119
+ __iscsym @120
+ __iscsymf @121
+ __lc_codepage @122 DATA
+ __lc_collate_cp @123 DATA
+ __lc_handle @124 DATA
+ __lconv_init @125
+ __mb_cur_max @126 DATA
+ __p___argc @127
+ __p___argv @128
+ __p___initenv @129
+ __p___mb_cur_max @130
+ __p___wargv @131
+ __p___winitenv @132
+ __p__acmdln @133
+ __p__amblksiz @134
+ __p__commode @135
+ __p__daylight @136
+ __p__dstbias @137
+ __p__environ @138
+; __p__fileinfo @139
+ __p__fmode @140
+ __p__iob @141
+; __p__mbcasemap @142
+ __p__mbctype @143
+ __p__osver @144
+ __p__pctype @145
+ __p__pgmptr @146
+ __p__pwctype @147
+ __p__timezone @148
+ __p__tzname @149
+ __p__wcmdln @150
+ __p__wenviron @151
+ __p__winmajor @152
+ __p__winminor @153
+ __p__winver @154
+ __p__wpgmptr @155
+; __pctype_func @156
+ __pioinfo @157 DATA
+; __pwctype_func @158
+ __pxcptinfoptrs @159
+ __set_app_type @160
+ __setlc_active @161 DATA
+ __setusermatherr @162
+ __threadhandle @163
+ __threadid @164
+ __toascii @165
+ __unDName @166
+ __unDNameEx @167
+; __uncaught_exception @42
+ __unguarded_readlc_active @168 DATA
+ __wargv @169 DATA
+; __wcserror @170
+ __wgetmainargs @171
+ __winitenv @172 DATA
+ _abnormal_termination @173
+; _abs64 @174
+ _access @175
+ _acmdln @176 DATA
+ _adj_fdiv_m16i @177
+ _adj_fdiv_m32 @178
+ _adj_fdiv_m32i @179
+ _adj_fdiv_m64 @180
+ _adj_fdiv_r @181
+ _adj_fdivr_m16i @182
+ _adj_fdivr_m32 @183
+ _adj_fdivr_m32i @184
+ _adj_fdivr_m64 @185
+ _adj_fpatan @186
+ _adj_fprem @187
+ _adj_fprem1 @188
+ _adj_fptan @189
+ _adjust_fdiv @190 DATA
+ _aexit_rtn @191
+ _aligned_free @192
+ _aligned_malloc @193
+ _aligned_offset_malloc @194
+ _aligned_offset_realloc @195
+ _aligned_realloc @196
+ _amsg_exit @197
+ _assert @198
+; _atodbl @199
+ _atoi64 @200
+ _atoldbl @201
+ _beep @202
+ _beginthread @203
+ _beginthreadex @204
+ _c_exit @205
+ _cabs @206
+ _callnewh @207
+ _cexit @208
+ _cgets @209
+; _cgetws @210
+ _chdir @211
+ _chdrive @212
+ _chgsign @213
+ _chkesp @214
+ _chmod @215
+ _chsize @216
+ _clearfp @217
+ _close @218
+ _commit @219
+ _commode @220 DATA
+ _control87 @221
+ _controlfp @222
+ _copysign @223
+ _cprintf @224
+ _cputs @225
+; _cputws @226
+ _creat @227
+ _cscanf @228
+ _ctime64 @229
+ _ctype @230 DATA
+ _cwait @231
+; _cwprintf @232
+; _cwscanf @233
+ _daylight @234 DATA
+ _dstbias @235 DATA
+ _dup @236
+ _dup2 @237
+ _ecvt @238
+ _endthread @239
+ _endthreadex @240
+ _environ @241 DATA
+ _eof @242
+ _errno @243
+ _except_handler2 @244
+ _except_handler3 @245
+ _execl @246
+ _execle @247
+ _execlp @248
+ _execlpe @249
+ _execv @250
+ _execve @251
+ _execvp @252
+ _execvpe @253
+ _exit @254
+ _expand @255
+ _fcloseall @256
+ _fcvt @257
+ _fdopen @258
+ _fgetchar @259
+ _fgetwchar @260
+ _filbuf @261
+; _fileinfo @262
+ _filelength @263
+ _filelengthi64 @264
+ _fileno @265
+ _findclose @266
+ _findfirst @267
+ _findfirst64 @268
+ _findfirsti64 @269
+ _findnext @270
+ _findnext64 @271
+ _findnexti64 @272
+ _finite @273
+ _flsbuf @274
+ _flushall @275
+ _fmode @276 DATA
+ _fpclass @277
+ _fpieee_flt @278
+ _fpreset @279
+ _fputchar @280
+ _fputwchar @281
+ _fsopen @282
+ _fstat @283
+ _fstat64 @284
+ _fstati64 @285
+ _ftime @286
+; _ftime64 @287 ???
+; _ftol @288 ???
+ _fullpath @289
+ _futime @290
+; _futime64 @291
+ _gcvt @292
+; _get_heap_handle @293
+ _get_osfhandle @294
+ _get_sbh_threshold @295
+ _getch @296
+ _getche @297
+ _getcwd @298
+ _getdcwd @299
+ _getdiskfree @300
+ _getdllprocaddr @301
+ _getdrive @302
+ _getdrives=kernel32.GetLogicalDrives @303
+ _getmaxstdio @304
+ _getmbcp @305
+ _getpid=kernel32.GetCurrentProcessId @306
+ _getsystime @307
+ _getw @308
+; _getwch @309
+; _getwche @310
+ _getws @311
+ _global_unwind2 @312
+ _gmtime64=gmtime @313
+ _heapadd @314
+ _heapchk @315
+ _heapmin @316
+ _heapset @317
+; _heapused @318
+ _heapwalk @319
+ _hypot @320
+ _i64toa @321
+ _i64tow @322
+ _initterm @323
+; _inp @324
+; _inpd @325
+; _inpw @326
+ _iob @327 DATA
+ _isatty @328
+ _isctype @329
+ _ismbbalnum @330
+ _ismbbalpha @331
+ _ismbbgraph @332
+ _ismbbkalnum @333
+ _ismbbkana @334
+; _ismbbkprint @335
+ _ismbbkpunct @336
+ _ismbblead @337
+ _ismbbprint @338
+ _ismbbpunct @339
+ _ismbbtrail @340
+ _ismbcalnum @341
+ _ismbcalpha @342
+ _ismbcdigit @343
+ _ismbcgraph @344
+ _ismbchira @345
+ _ismbckata @346
+ _ismbcl0 @347
+ _ismbcl1 @348
+ _ismbcl2 @349
+ _ismbclegal @350
+ _ismbclower @351
+ _ismbcprint @352
+ _ismbcpunct @353
+ _ismbcspace @354
+ _ismbcsymbol @355
+ _ismbcupper @356
+ _ismbslead @357
+ _ismbstrail @358
+ _isnan @359
+ _itoa @360
+ _itow @361
+; FIXME: these aren't actually implemented in CRT
+; _j0 @362
+; _j1 @363
+; _jn @364
+ _kbhit @365
+ _lfind @366
+ _loaddll @367
+ _local_unwind2 @368
+ _localtime64 @369
+ _lock @370
+ _locking @371
+ _logb @372
+ _longjmpex=longjmp @373
+ _lrotl @374
+ _lrotr @375
+ _lsearch @376
+ _lseek @377
+ _lseeki64 @378
+ _ltoa @379
+ _ltow @380
+ _makepath @381
+ _mbbtombc @382
+ _mbbtype @383
+; _mbcasemap @384
+ _mbccpy @385
+ _mbcjistojms @386
+ _mbcjmstojis @387
+ _mbclen @388
+ _mbctohira @389
+ _mbctokata @390
+ _mbctolower @391
+ _mbctombb @392
+ _mbctoupper @393
+ _mbctype @394 DATA
+ _mbsbtype @395
+ _mbscat @396
+ _mbschr @397
+ _mbscmp @398
+ _mbscoll @399
+ _mbscpy @400
+ _mbscspn @401
+ _mbsdec @402
+ _mbsdup @403
+ _mbsicmp @404
+ _mbsicoll @405
+ _mbsinc @406
+ _mbslen @407
+ _mbslwr @408
+ _mbsnbcat @409
+ _mbsnbcmp @410
+ _mbsnbcnt @411
+ _mbsnbcoll @412
+ _mbsnbcpy @413
+ _mbsnbicmp @414
+ _mbsnbicoll @415
+ _mbsnbset @416
+ _mbsncat @417
+ _mbsnccnt @418
+ _mbsncmp @419
+ _mbsncoll @420
+ _mbsncpy @421
+ _mbsnextc @422
+ _mbsnicmp @423
+ _mbsnicoll @424
+ _mbsninc @425
+ _mbsnset @426
+ _mbspbrk @427
+ _mbsrchr @428
+ _mbsrev @429
+ _mbsset @430
+ _mbsspn @431
+ _mbsspnp @432
+ _mbsstr @433
+ _mbstok @434
+ _mbstrlen @435
+ _mbsupr @436
+ _memccpy @437
+ _memicmp @438
+ _mkdir @439
+ _mkgmtime @440
+ _mkgmtime64 @441
+ _mktemp @442
+ _mktime64 @443
+ _msize @444
+ _nextafter @445
+ _onexit @446
+ _open @447
+ _open_osfhandle @448
+; _osplatform @449
+ _osver @450 DATA
+; _outp @451
+; _outpd @452
+; _outpw @453
+ _pclose @454
+ _pctype @455 DATA
+ _pgmptr @456 DATA
+ _pipe @457
+ _popen @458
+ _purecall @459
+ _putch @460
+ _putenv @461
+ _putw @462
+; _putwch @463
+ _putws @464
+ _pwctype @465
+ _read @466
+; _resetstkoflw @467
+ _rmdir @468
+ _rmtmp @469
+ _rotl @470
+; _rotl64 @471
+ _rotr @472
+; _rotr64 @473
+ _safe_fdiv @474
+ _safe_fdivr @475
+ _safe_fprem @476
+ _safe_fprem1 @477
+ _scalb @478
+; _scprintf @479
+; _scwprintf @480
+ _searchenv @481
+; _seh_longjmp_unwind @482 ???
+; _set_SSE2_enable @483
+ _set_error_mode @484
+ _set_sbh_threshold @485
+ _seterrormode @486
+ _setjmp @487
+ _setjmpex @488
+ _setmaxstdio @489
+ _setmbcp @490
+ _setmode @491
+ _setsystime @492
+ _sleep @493
+ _snprintf @494
+; _snscanf @495
+ _snwprintf @496
+; _snwscanf @497
+ _sopen @498
+ _spawnl @499
+ _spawnle @500
+ _spawnlp @501
+ _spawnlpe @502
+ _spawnv @503
+ _spawnve @504
+ _spawnvp @505
+ _spawnvpe @506
+ _splitpath @507
+ _stat @508
+ _stat64 @509
+ _stati64 @510
+ _statusfp @511
+ _strcmpi @512
+ _strdate @513
+ _strdup @514
+ _strerror @515
+ _stricmp @516
+ _stricoll @517
+ _strlwr @518
+ _strncoll @519
+ _strnicmp @520
+ _strnicoll @521
+ _strnset @522
+ _strrev @523
+ _strset @524
+ _strtime @525
+; _strtoi64 @526
+ _strtoui64=strtoull @527
+ _strupr @528
+ _swab @529
+ _sys_errlist @530 DATA
+ _sys_nerr @531 DATA
+ _tell @532
+ _telli64 @533
+ _tempnam @534
+ _time64 @535
+ _timezone @536 DATA
+ _tolower @537
+ _toupper @538
+ _tzname @539 DATA
+ _tzset @540
+ _ui64toa @541
+ _ui64tow @542
+ _ultoa @543
+ _ultow @544
+ _umask @545
+ _ungetch @546
+; _ungetwch @547
+ _unlink @548
+ _unloaddll @549
+ _unlock @550
+ _utime @551
+; _utime64 @552
+; _vscprintf @553
+; _vscwprintf @554
+ _vsnprintf @555
+ _vsnwprintf @556
+ _waccess @557
+ _wasctime @558
+ _wchdir @559
+ _wchmod @560
+ _wcmdln @561
+ _wcreat @562
+ _wcsdup @563
+; _wcserror @564
+ _wcsicmp @565
+ _wcsicoll @566
+ _wcslwr @567
+ _wcsncoll @568
+ _wcsnicmp @569
+ _wcsnicoll @570
+ _wcsnset @571
+ _wcsrev @572
+ _wcsset @573
+; _wcstoi64 @574
+; _wcstoui64 @575
+ _wcsupr @576
+ _wctime @577
+; _wctime64 @578
+; _wctype @579
+ _wenviron @580 DATA
+ _wexecl @581
+ _wexecle @582
+ _wexeclp @583
+ _wexeclpe @584
+ _wexecv @585
+ _wexecve @586
+ _wexecvp @587
+ _wexecvpe @588
+ _wfdopen @589
+ _wfindfirst @590
+; _wfindfirst64 @591
+ _wfindfirsti64 @592
+ _wfindnext @593
+; _wfindnext64 @594
+ _wfindnexti64 @595
+ _wfopen @596
+ _wfreopen @597
+ _wfsopen @598
+ _wfullpath @599
+ _wgetcwd @600
+ _wgetdcwd @601
+ _wgetenv @602
+ _winmajor @603 DATA
+ _winminor @604 DATA
+ _winver @605 DATA
+ _wmakepath @606
+ _wmkdir @607
+ _wmktemp @608
+ _wopen @609
+ _wperror @610
+ _wpgmptr @611 DATA
+ _wpopen @612
+ _wputenv @613
+ _wremove @614
+ _wrename @615
+ _write @616
+ _wrmdir @617
+ _wsearchenv @618
+ _wsetlocale @619
+ _wsopen @620
+ _wspawnl @621
+ _wspawnle @622
+ _wspawnlp @623
+ _wspawnlpe @624
+ _wspawnv @625
+ _wspawnve @626
+ _wspawnvp @627
+ _wspawnvpe @628
+ _wsplitpath @629
+ _wstat @630
+ _wstat64 @631
+ _wstati64 @632
+ _wstrdate @633
+ _wstrtime @634
+ _wsystem @635
+ _wtempnam @636
+ _wtmpnam @637
+; _wtof @638
+ _wtoi @639
+ _wtoi64 @640
+ _wtol @641
+ _wunlink @642
+ _wutime @643
+; _wutime64 @644
+; FIXME: these aren't actually implemented in CRT
+; _y0 @645
+; _y1 @646
+; _yn @647
+ abort @648
+ abs @649
+ acos @650
+ asctime @651
+ asin @652
+ atan @653
+ atan2 @654
+ atexit @655
+ atof @656
+ atoi @657
+ atol @658
+ bsearch @659
+ calloc @660
+ ceil @661
+ clearerr @662
+ clock @663
+ cos @664
+ cosh @665
+ ctime @666
+ difftime @667
+ div @668
+ exit @669
+ exp @670
+ fabs @671
+ fclose @672
+ feof @673
+ ferror @674
+ fflush @675
+ fgetc @676
+ fgetpos @677
+ fgets @678
+ fgetwc @679
+ fgetws @680
+ floor @681
+ fmod @682
+ fopen @683
+ fprintf @684
+ fputc @685
+ fputs @686
+ fputwc @687
+ fputws @688
+ fread @689
+ free @690
+ freopen @691
+ frexp @692
+ fscanf @693
+ fseek @694
+ fsetpos @695
+ ftell @696
+ fwprintf @697
+ fwrite @698
+ fwscanf @699
+ getc @700
+ getchar @701
+ getenv @702
+ gets @703
+ getwc @704
+ getwchar @705
+ gmtime @706
+ is_wctype @707
+ isalnum @708
+ isalpha @709
+ iscntrl @710
+ isdigit @711
+ isgraph @712
+ isleadbyte @713
+ islower @714
+ isprint @715
+ ispunct @716
+ isspace @717
+ isupper @718
+ iswalnum @719
+ iswalpha @720
+ iswascii @721
+ iswcntrl @722
+ iswctype @723
+ iswdigit @724
+ iswgraph @725
+ iswlower @726
+ iswprint @727
+ iswpunct @728
+ iswspace @729
+ iswupper @730
+ iswxdigit @731
+ isxdigit @732
+ labs @733
+ ldexp @734
+ ldiv @735
+ localeconv @736
+; localtime @737 ???
+ log @738
+ log10 @739
+ longjmp @740
+ malloc @741
+ mblen @742
+ mbstowcs @743
+ mbtowc @744
+ memchr @745
+ memcmp @746
+ memcpy=memmove @747
+ memmove @748
+ memset @749
+ mktime @750
+ modf @751
+ perror @752
+ pow @753
+ printf @754
+ putc @755
+ putchar @756
+ puts @757
+ putwc=fputwc @758
+ putwchar=_fputwchar @759
+ qsort @760
+ raise @761
+ rand @762
+ realloc @763
+ remove @764
+ rename @765
+ rewind @766
+ scanf @767
+ setbuf @768
+ setlocale @769
+ setvbuf @770
+ signal @771
+ sin @772
+ sinh @773
+ sprintf @774
+ sqrt @775
+ srand @776
+ sscanf @777
+ strcat @778
+ strchr @779
+ strcmp @780
+ strcoll @781
+ strcpy @782
+ strcspn @783
+ strerror @784
+ strftime @785
+ strlen @786
+ strncat @787
+ strncmp @788
+ strncpy @789
+ strpbrk @790
+ strrchr @791
+ strspn @792
+ strstr @793
+ strtod @794
+ strtok @795
+ strtol @796
+ strtoul @797
+ strxfrm @798
+ swprintf @799
+ swscanf @800
+ system @801
+ tan @802
+ tanh @803
+ time @804
+ tmpfile @805
+ tmpnam @806
+ tolower @807
+ toupper @808
+ towlower @809
+ towupper @810
+ ungetc @811
+ ungetwc @812
+ vfprintf @813
+ vfwprintf @814
+ vprintf @815
+ vsprintf @816
+ vswprintf @817
+ vwprintf @818
+ wcscat @819
+ wcschr @820
+ wcscmp @821
+ wcscoll @822
+ wcscpy @823
+ wcscspn @824
+ wcsftime @825
+ wcslen @826
+ wcsncat @827
+ wcsncmp @828
+ wcsncpy @829
+ wcspbrk @830
+ wcsrchr @831
+ wcsspn @832
+ wcsstr @833
+ wcstod @834
+ wcstok @835
+ wcstol @836
+ wcstombs @837
+ wcstoul @838
+ wcsxfrm @839
+ wctomb @840
+ wprintf @841
+ wscanf @842
_mbsnbcpy_s
wcscpy_s
wcsncpy_s
- _wcsupr_s
_ftol2=_ftol
_ftol2_sse=_ftol
strcat_s
<module name="msvcrt" type="win32dll" baseaddress="${BASEADDRESS_MSVCRT}" installbase="system32" installname="msvcrt.dll" iscrt="yes">
- <importlibrary definition="msvcrt.def" />
+ <importlibrary definition="msvcrt-$(ARCH).def" />
<include base="msvcrt">.</include>
<include base="crt">include</include>
<define name="USE_MSVCRT_PREFIX" />
<include base="ReactOS">include/reactos/wine</include>
<define name="__WINESRC__" />
<library>wine</library>
+ <library>advapi32</library>
<file>proxyodbc.c</file>
</module>
-</group>
+</group>
\ No newline at end of file
86 stub ODBSetTryWaitValue
89 stub ODBCSharedPerfMon
90 stub ODBCSharedVSFlag
-106 stub SQLColAttributesW
-107 stub SQLConnectW
-108 stub SQLDescribeColW
-110 stub SQLErrorW
-111 stub SQLExecDirectW
-117 stub SQLGetCursorNameW
-119 stub SQLPrepareW
-121 stub SQLSetCursorNameW
-127 stub SQLColAttributeW
-132 stub SQLGetConnectAttrW
-133 stub SQLGetDescFieldW
-134 stub SQLGetDescRecW
-135 stub SQLGetDiagFieldW
-136 stub SQLGetDiagRecW
-138 stub SQLGetStmtAttrW
-139 stub SQLSetConnectAttrW
-140 stub SQLColumnsW
-141 stub SQLDriverConnectW
-142 stub SQLGetConnectOptionW
-145 stub SQLGetInfoW
-147 stub SQLGetTypeInfoW
-150 stub SQLSetConnectOptionW
-152 stub SQLSpecialColumnsW
-153 stub SQLStatisticsW
-154 stub SQLTablesW
-155 stub SQLBrowseConnectW
-156 stub SQLColumnPrivilegesW
-157 stub SQLDataSourcesW
-160 stub SQLForeignKeysW
-162 stub SQLNativeSqlW
-165 stub SQLPrimaryKeysW
-166 stub SQLProcedureColumnsW
-167 stub SQLProceduresW
-170 stub SQLTablePrivilegesW
-171 stub SQLDriversW
-173 stub SQLSetDescFieldW
-176 stub SQLSetStmtAttrW
+106 stdcall SQLColAttributesW(long long long ptr long ptr ptr)
+107 stdcall SQLConnectW(long wstr long wstr long wstr long)
+108 stdcall SQLDescribeColW(long long wstr long ptr ptr ptr ptr ptr)
+110 stdcall SQLErrorW(long long long wstr ptr wstr long ptr)
+111 stdcall SQLExecDirectW(long wstr long)
+117 stdcall SQLGetCursorNameW(long wstr long ptr)
+119 stdcall SQLPrepareW(long wstr long)
+121 stdcall SQLSetCursorNameW(long wstr long)
+127 stdcall SQLColAttributeW(long long long ptr long ptr ptr)
+132 stdcall SQLGetConnectAttrW(long long ptr long ptr)
+133 stdcall SQLGetDescFieldW(long long long ptr long ptr)
+134 stdcall SQLGetDescRecW(long long wstr long ptr ptr ptr ptr ptr ptr ptr)
+135 stdcall SQLGetDiagFieldW(long long long long ptr long ptr)
+136 stdcall SQLGetDiagRecW(long long long wstr ptr wstr long ptr)
+138 stdcall SQLGetStmtAttrW(long long ptr long ptr)
+139 stdcall SQLSetConnectAttrW(long long ptr long)
+140 stdcall SQLColumnsW(long wstr long wstr long wstr long wstr long)
+141 stdcall SQLDriverConnectW(long long wstr long wstr long wstr long)
+142 stdcall SQLGetConnectOptionW(long long ptr)
+145 stdcall SQLGetInfoW(long long ptr long ptr)
+147 stdcall SQLGetTypeInfoW(long long)
+150 stdcall SQLSetConnectOptionW(long long long)
+152 stdcall SQLSpecialColumnsW(long long wstr long wstr long wstr long long long)
+153 stdcall SQLStatisticsW(long wstr long wstr long wstr long long long)
+154 stdcall SQLTablesW(long wstr long wstr long wstr long wstr long)
+155 stdcall SQLBrowseConnectW(long wstr long wstr long ptr)
+156 stdcall SQLColumnPrivilegesW(long wstr long wstr long wstr long wstr long)
+157 stdcall SQLDataSourcesW(long long wstr long ptr wstr long ptr)
+160 stdcall SQLForeignKeysW(long wstr long wstr long wstr long wstr long wstr long wstr long)
+162 stdcall SQLNativeSqlW(long wstr long wstr long ptr)
+165 stdcall SQLPrimaryKeysW(long wstr long wstr long wstr long)
+166 stdcall SQLProcedureColumnsW(long wstr long wstr long wstr long wstr long)
+167 stdcall SQLProceduresW(long wstr long wstr long wstr long)
+170 stdcall SQLTablePrivilegesW(long wstr long wstr long wstr long)
+171 stdcall SQLDriversW(long long wstr long ptr wstr long ptr)
+173 stdcall SQLSetDescFieldW(long long long ptr long)
+176 stdcall SQLSetStmtAttrW(long long ptr long)
206 stub SQLColAttributesA
207 stub SQLConnectA
208 stub SQLDescribeColA
--- /dev/null
+Index: proxyodbc.c
+===================================================================
+--- proxyodbc.c (Revision 41027)
++++ proxyodbc.c (Arbeitskopie)
+@@ -733,8 +733,8 @@
+ */
+ SQLRETURN WINAPI SQLBindCol(SQLHSTMT StatementHandle,
+ SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType,
+- SQLPOINTER TargetValue, SQLINTEGER BufferLength,
+- SQLINTEGER *StrLen_or_Ind)
++ SQLPOINTER TargetValue, SQLLEN BufferLength,
++ SQLLEN *StrLen_or_Ind)
+ {
+ TRACE("\n");
+
+@@ -756,9 +756,9 @@
+ */
+ SQLRETURN WINAPI SQLBindParam(SQLHSTMT StatementHandle,
+ SQLUSMALLINT ParameterNumber, SQLSMALLINT ValueType,
+- SQLSMALLINT ParameterType, SQLUINTEGER LengthPrecision,
++ SQLSMALLINT ParameterType, SQLULEN LengthPrecision,
+ SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue,
+- SQLINTEGER *StrLen_or_Ind)
++ SQLLEN *StrLen_or_Ind)
+ {
+ TRACE("\n");
+
+@@ -926,7 +926,7 @@
+ SQLRETURN WINAPI SQLDescribeCol(SQLHSTMT StatementHandle,
+ SQLUSMALLINT ColumnNumber, SQLCHAR *ColumnName,
+ SQLSMALLINT BufferLength, SQLSMALLINT *NameLength,
+- SQLSMALLINT *DataType, SQLUINTEGER *ColumnSize,
++ SQLSMALLINT *DataType, SQLULEN *ColumnSize,
+ SQLSMALLINT *DecimalDigits, SQLSMALLINT *Nullable)
+ {
+ TRACE("\n");
+@@ -1040,7 +1040,7 @@
+ /*************************************************************************
+ * SQLFetchScroll [ODBC32.030]
+ */
+-SQLRETURN WINAPI SQLFetchScroll(SQLHSTMT StatementHandle, SQLSMALLINT FetchOrientation, SQLINTEGER FetchOffset)
++SQLRETURN WINAPI SQLFetchScroll(SQLHSTMT StatementHandle, SQLSMALLINT FetchOrientation, SQLLEN FetchOffset)
+ {
+ TRACE("\n");
+
+@@ -1177,8 +1177,8 @@
+ */
+ SQLRETURN WINAPI SQLGetData(SQLHSTMT StatementHandle,
+ SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType,
+- SQLPOINTER TargetValue, SQLINTEGER BufferLength,
+- SQLINTEGER *StrLen_or_Ind)
++ SQLPOINTER TargetValue, SQLLEN BufferLength,
++ SQLLEN *StrLen_or_Ind)
+ {
+ TRACE("\n");
+
+@@ -1217,7 +1217,7 @@
+ SQLSMALLINT RecNumber, SQLCHAR *Name,
+ SQLSMALLINT BufferLength, SQLSMALLINT *StringLength,
+ SQLSMALLINT *Type, SQLSMALLINT *SubType,
+- SQLINTEGER *Length, SQLSMALLINT *Precision,
++ SQLLEN *Length, SQLSMALLINT *Precision,
+ SQLSMALLINT *Scale, SQLSMALLINT *Nullable)
+ {
+ TRACE("\n");
+@@ -1413,7 +1413,7 @@
+ /*************************************************************************
+ * SQLPutData [ODBC32.049]
+ */
+-SQLRETURN WINAPI SQLPutData(SQLHSTMT StatementHandle, SQLPOINTER Data, SQLINTEGER StrLen_or_Ind)
++SQLRETURN WINAPI SQLPutData(SQLHSTMT StatementHandle, SQLPOINTER Data, SQLLEN StrLen_or_Ind)
+ {
+ TRACE("\n");
+
+@@ -1428,7 +1428,7 @@
+ /*************************************************************************
+ * SQLRowCount [ODBC32.020]
+ */
+-SQLRETURN WINAPI SQLRowCount(SQLHSTMT StatementHandle, SQLINTEGER *RowCount)
++SQLRETURN WINAPI SQLRowCount(SQLHSTMT StatementHandle, SQLLEN *RowCount)
+ {
+ TRACE("\n");
+
+@@ -1459,7 +1459,7 @@
+ /*************************************************************************
+ * SQLSetConnectOption [ODBC32.050]
+ */
+-SQLRETURN WINAPI SQLSetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLUINTEGER Value)
++SQLRETURN WINAPI SQLSetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLULEN Value)
+ {
+ TRACE("\n");
+
+@@ -1508,10 +1508,10 @@
+ */
+ SQLRETURN WINAPI SQLSetDescRec(SQLHDESC DescriptorHandle,
+ SQLSMALLINT RecNumber, SQLSMALLINT Type,
+- SQLSMALLINT SubType, SQLINTEGER Length,
++ SQLSMALLINT SubType, SQLLEN Length,
+ SQLSMALLINT Precision, SQLSMALLINT Scale,
+- SQLPOINTER Data, SQLINTEGER *StringLength,
+- SQLINTEGER *Indicator)
++ SQLPOINTER Data, SQLLEN *StringLength,
++ SQLLEN *Indicator)
+ {
+ TRACE("\n");
+
+@@ -1546,9 +1546,9 @@
+ */
+ SQLRETURN WINAPI SQLSetParam(SQLHSTMT StatementHandle,
+ SQLUSMALLINT ParameterNumber, SQLSMALLINT ValueType,
+- SQLSMALLINT ParameterType, SQLUINTEGER LengthPrecision,
++ SQLSMALLINT ParameterType, SQLULEN LengthPrecision,
+ SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue,
+- SQLINTEGER *StrLen_or_Ind)
++ SQLLEN *StrLen_or_Ind)
+ {
+ TRACE("\n");
+
+@@ -1581,7 +1581,7 @@
+ /*************************************************************************
+ * SQLSetStmtOption [ODBC32.051]
+ */
+-SQLRETURN WINAPI SQLSetStmtOption(SQLHSTMT StatementHandle, SQLUSMALLINT Option, SQLUINTEGER Value)
++SQLRETURN WINAPI SQLSetStmtOption(SQLHSTMT StatementHandle, SQLUSMALLINT Option, SQLULEN Value)
+ {
+ TRACE("\n");
+
+@@ -1717,7 +1717,7 @@
+ SQLPOINTER rgbDesc,
+ SQLSMALLINT cbDescMax,
+ SQLSMALLINT *pcbDesc,
+- SQLINTEGER *pfDesc)
++ SQLLEN *pfDesc)
+ {
+ TRACE("\n");
+
+@@ -1761,7 +1761,7 @@
+ SQLHSTMT hstmt,
+ SQLUSMALLINT ipar,
+ SQLSMALLINT *pfSqlType,
+- SQLUINTEGER *pcbParamDef,
++ SQLULEN *pcbParamDef,
+ SQLSMALLINT *pibScale,
+ SQLSMALLINT *pfNullable)
+ {
+@@ -2039,11 +2039,11 @@
+ SQLSMALLINT fParamType,
+ SQLSMALLINT fCType,
+ SQLSMALLINT fSqlType,
+- SQLUINTEGER cbColDef,
++ SQLULEN cbColDef,
+ SQLSMALLINT ibScale,
+ SQLPOINTER rgbValue,
+- SQLINTEGER cbValueMax,
+- SQLINTEGER *pcbValue)
++ SQLLEN cbValueMax,
++ SQLLEN *pcbValue)
+ {
+ TRACE("\n");
+
+@@ -2086,7 +2086,7 @@
+ SQLRETURN WINAPI SQLSetScrollOptions(
+ SQLHSTMT statement_handle,
+ SQLUSMALLINT f_concurrency,
+- SQLINTEGER crow_keyset,
++ SQLLEN crow_keyset,
+ SQLUSMALLINT crow_rowset )
+ {
+ TRACE("\n");
+@@ -2138,7 +2138,7 @@
+ SQLPOINTER rgbDesc,
+ SQLSMALLINT cbDescMax,
+ SQLSMALLINT *pcbDesc,
+- SQLINTEGER *pfDesc)
++ SQLLEN *pfDesc)
+ {
+ SQLRETURN iResult;
+
+@@ -2200,9 +2200,9 @@
+ * SQLDescribeColW [ODBC32.108]
+ */
+ SQLRETURN WINAPI SQLDescribeColW(SQLHSTMT StatementHandle,
+- SQLUSMALLINT ColumnNumber, WCHAR *ColumnName,
++ SQLUSMALLINT ColumnNumber, SQLWCHAR *ColumnName,
+ SQLSMALLINT BufferLength, SQLSMALLINT *NameLength,
+- SQLSMALLINT *DataType, SQLUINTEGER *ColumnSize,
++ SQLSMALLINT *DataType, SQLULEN *ColumnSize,
+ SQLSMALLINT *DecimalDigits, SQLSMALLINT *Nullable)
+ {
+ SQLRETURN iResult;
+@@ -2378,10 +2378,10 @@
+ * SQLGetDescRecW [ODBC32.134]
+ */
+ SQLRETURN WINAPI SQLGetDescRecW(SQLHDESC DescriptorHandle,
+- SQLSMALLINT RecNumber, WCHAR *Name,
++ SQLSMALLINT RecNumber, SQLWCHAR *Name,
+ SQLSMALLINT BufferLength, SQLSMALLINT *StringLength,
+ SQLSMALLINT *Type, SQLSMALLINT *SubType,
+- SQLINTEGER *Length, SQLSMALLINT *Precision,
++ SQLLEN *Length, SQLSMALLINT *Precision,
+ SQLSMALLINT *Scale, SQLSMALLINT *Nullable)
+ {
+ TRACE("\n");
+@@ -2573,7 +2573,7 @@
+ /*************************************************************************
+ * SQLSetConnectOptionW [ODBC32.150]
+ */
+-SQLRETURN WINAPI SQLSetConnectOptionW(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLUINTEGER Value)
++SQLRETURN WINAPI SQLSetConnectOptionW(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLULEN Value)
+ {
+ TRACE("\n");
+
+@@ -2588,9 +2588,9 @@
+ * SQLSpecialColumnsW [ODBC32.152]
+ */
+ SQLRETURN WINAPI SQLSpecialColumnsW(SQLHSTMT StatementHandle,
+- SQLUSMALLINT IdentifierType, SQLCHAR *CatalogName,
+- SQLSMALLINT NameLength1, SQLCHAR *SchemaName,
+- SQLSMALLINT NameLength2, SQLCHAR *TableName,
++ SQLUSMALLINT IdentifierType, SQLWCHAR *CatalogName,
++ SQLSMALLINT NameLength1, SQLWCHAR *SchemaName,
++ SQLSMALLINT NameLength2, SQLWCHAR *TableName,
+ SQLSMALLINT NameLength3, SQLUSMALLINT Scope,
+ SQLUSMALLINT Nullable)
+ {
+@@ -2607,9 +2607,9 @@
+ * SQLStatisticsW [ODBC32.153]
+ */
+ SQLRETURN WINAPI SQLStatisticsW(SQLHSTMT StatementHandle,
+- SQLCHAR *CatalogName, SQLSMALLINT NameLength1,
+- SQLCHAR *SchemaName, SQLSMALLINT NameLength2,
+- SQLCHAR *TableName, SQLSMALLINT NameLength3,
++ SQLWCHAR *CatalogName, SQLSMALLINT NameLength1,
++ SQLWCHAR *SchemaName, SQLSMALLINT NameLength2,
++ SQLWCHAR *TableName, SQLSMALLINT NameLength3,
+ SQLUSMALLINT Unique, SQLUSMALLINT Reserved)
+ {
+ TRACE("\n");
+@@ -2626,10 +2626,10 @@
+ * SQLTablesW [ODBC32.154]
+ */
+ SQLRETURN WINAPI SQLTablesW(SQLHSTMT StatementHandle,
+- SQLCHAR *CatalogName, SQLSMALLINT NameLength1,
+- SQLCHAR *SchemaName, SQLSMALLINT NameLength2,
+- SQLCHAR *TableName, SQLSMALLINT NameLength3,
+- SQLCHAR *TableType, SQLSMALLINT NameLength4)
++ SQLWCHAR *CatalogName, SQLSMALLINT NameLength1,
++ SQLWCHAR *SchemaName, SQLSMALLINT NameLength2,
++ SQLWCHAR *TableName, SQLSMALLINT NameLength3,
++ SQLWCHAR *TableType, SQLSMALLINT NameLength4)
+ {
+ TRACE("\n");
+
+@@ -2646,9 +2646,9 @@
+ */
+ SQLRETURN WINAPI SQLBrowseConnectW(
+ SQLHDBC hdbc,
+- SQLCHAR *szConnStrIn,
++ SQLWCHAR *szConnStrIn,
+ SQLSMALLINT cbConnStrIn,
+- SQLCHAR *szConnStrOut,
++ SQLWCHAR *szConnStrOut,
+ SQLSMALLINT cbConnStrOutMax,
+ SQLSMALLINT *pcbConnStrOut)
+ {
+@@ -2666,13 +2666,13 @@
+ */
+ SQLRETURN WINAPI SQLColumnPrivilegesW(
+ SQLHSTMT hstmt,
+- SQLCHAR *szCatalogName,
++ SQLWCHAR *szCatalogName,
+ SQLSMALLINT cbCatalogName,
+- SQLCHAR *szSchemaName,
++ SQLWCHAR *szSchemaName,
+ SQLSMALLINT cbSchemaName,
+- SQLCHAR *szTableName,
++ SQLWCHAR *szTableName,
+ SQLSMALLINT cbTableName,
+- SQLCHAR *szColumnName,
++ SQLWCHAR *szColumnName,
+ SQLSMALLINT cbColumnName)
+ {
+ TRACE("\n");
+@@ -2727,17 +2727,17 @@
+ */
+ SQLRETURN WINAPI SQLForeignKeysW(
+ SQLHSTMT hstmt,
+- SQLCHAR *szPkCatalogName,
++ SQLWCHAR *szPkCatalogName,
+ SQLSMALLINT cbPkCatalogName,
+- SQLCHAR *szPkSchemaName,
++ SQLWCHAR *szPkSchemaName,
+ SQLSMALLINT cbPkSchemaName,
+- SQLCHAR *szPkTableName,
++ SQLWCHAR *szPkTableName,
+ SQLSMALLINT cbPkTableName,
+- SQLCHAR *szFkCatalogName,
++ SQLWCHAR *szFkCatalogName,
+ SQLSMALLINT cbFkCatalogName,
+- SQLCHAR *szFkSchemaName,
++ SQLWCHAR *szFkSchemaName,
+ SQLSMALLINT cbFkSchemaName,
+- SQLCHAR *szFkTableName,
++ SQLWCHAR *szFkTableName,
+ SQLSMALLINT cbFkTableName)
+ {
+ TRACE("\n");
+@@ -2756,9 +2756,9 @@
+ */
+ SQLRETURN WINAPI SQLNativeSqlW(
+ SQLHDBC hdbc,
+- SQLCHAR *szSqlStrIn,
++ SQLWCHAR *szSqlStrIn,
+ SQLINTEGER cbSqlStrIn,
+- SQLCHAR *szSqlStr,
++ SQLWCHAR *szSqlStr,
+ SQLINTEGER cbSqlStrMax,
+ SQLINTEGER *pcbSqlStr)
+ {
+@@ -2776,11 +2776,11 @@
+ */
+ SQLRETURN WINAPI SQLPrimaryKeysW(
+ SQLHSTMT hstmt,
+- SQLCHAR *szCatalogName,
++ SQLWCHAR *szCatalogName,
+ SQLSMALLINT cbCatalogName,
+- SQLCHAR *szSchemaName,
++ SQLWCHAR *szSchemaName,
+ SQLSMALLINT cbSchemaName,
+- SQLCHAR *szTableName,
++ SQLWCHAR *szTableName,
+ SQLSMALLINT cbTableName)
+ {
+ TRACE("\n");
+@@ -2798,13 +2798,13 @@
+ */
+ SQLRETURN WINAPI SQLProcedureColumnsW(
+ SQLHSTMT hstmt,
+- SQLCHAR *szCatalogName,
++ SQLWCHAR *szCatalogName,
+ SQLSMALLINT cbCatalogName,
+- SQLCHAR *szSchemaName,
++ SQLWCHAR *szSchemaName,
+ SQLSMALLINT cbSchemaName,
+- SQLCHAR *szProcName,
++ SQLWCHAR *szProcName,
+ SQLSMALLINT cbProcName,
+- SQLCHAR *szColumnName,
++ SQLWCHAR *szColumnName,
+ SQLSMALLINT cbColumnName)
+ {
+ TRACE("\n");
+@@ -2822,11 +2822,11 @@
+ */
+ SQLRETURN WINAPI SQLProceduresW(
+ SQLHSTMT hstmt,
+- SQLCHAR *szCatalogName,
++ SQLWCHAR *szCatalogName,
+ SQLSMALLINT cbCatalogName,
+- SQLCHAR *szSchemaName,
++ SQLWCHAR *szSchemaName,
+ SQLSMALLINT cbSchemaName,
+- SQLCHAR *szProcName,
++ SQLWCHAR *szProcName,
+ SQLSMALLINT cbProcName)
+ {
+ TRACE("\n");
+@@ -2844,11 +2844,11 @@
+ */
+ SQLRETURN WINAPI SQLTablePrivilegesW(
+ SQLHSTMT hstmt,
+- SQLCHAR *szCatalogName,
++ SQLWCHAR *szCatalogName,
+ SQLSMALLINT cbCatalogName,
+- SQLCHAR *szSchemaName,
++ SQLWCHAR *szSchemaName,
+ SQLSMALLINT cbSchemaName,
+- SQLCHAR *szTableName,
++ SQLWCHAR *szTableName,
+ SQLSMALLINT cbTableName)
+ {
+ TRACE("\n");
+@@ -2867,10 +2867,10 @@
+ SQLRETURN WINAPI SQLDriversW(
+ SQLHENV henv,
+ SQLUSMALLINT fDirection,
+- SQLCHAR *szDriverDesc,
++ SQLWCHAR *szDriverDesc,
+ SQLSMALLINT cbDriverDescMax,
+ SQLSMALLINT *pcbDriverDesc,
+- SQLCHAR *szDriverAttributes,
++ SQLWCHAR *szDriverAttributes,
+ SQLSMALLINT cbDriverAttrMax,
+ SQLSMALLINT *pcbDriverAttr)
+ {
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* NOTES:
- * Proxy ODBC driver manager. This manager delegates all ODBC
- * calls to a real ODBC driver manager named by the environment
+ * Proxy ODBC driver manager. This manager delegates all ODBC
+ * calls to a real ODBC driver manager named by the environment
* variable LIB_ODBC_DRIVER_MANAGER, or to libodbc.so if the
* variable is not set.
*
#include "windef.h"
#include "winbase.h"
-#include "wine/debug.h"
-//#include "wine/library.h"
-
-#undef TRACE_ON
+#include "winreg.h"
#include "sql.h"
#include "sqltypes.h"
#include "sqlext.h"
+#undef TRACE_ON
+
+#include "wine/debug.h"
+#include "wine/library.h"
+#include "wine/unicode.h"
+
#include "proxyodbc.h"
static BOOL ODBC_LoadDriverManager(void);
static const DM_FUNC template_func[] =
{
- /* 00 */ { SQL_API_SQLALLOCCONNECT, "SQLAllocConnect", SQLAllocConnect, NULL },
- /* 01 */ { SQL_API_SQLALLOCENV, "SQLAllocEnv", SQLAllocEnv, NULL },
- /* 02 */ { SQL_API_SQLALLOCHANDLE, "SQLAllocHandle", SQLAllocHandle, NULL },
- /* 03 */ { SQL_API_SQLALLOCSTMT, "SQLAllocStmt", SQLAllocStmt, NULL },
- /* 04 */ { SQL_API_SQLALLOCHANDLESTD, "SQLAllocHandleStd", SQLAllocHandleStd, NULL },
- /* 05 */ { SQL_API_SQLBINDCOL, "SQLBindCol", SQLBindCol, NULL },
- /* 06 */ { SQL_API_SQLBINDPARAM, "SQLBindParam", SQLBindParam, NULL },
- /* 07 */ { SQL_API_SQLBINDPARAMETER, "SQLBindParameter", SQLBindParameter, NULL },
- /* 08 */ { SQL_API_SQLBROWSECONNECT, "SQLBrowseConnect", SQLBrowseConnect, NULL },
- /* 09 */ { SQL_API_SQLBULKOPERATIONS, "SQLBulkOperations", SQLBulkOperations, NULL },
- /* 10 */ { SQL_API_SQLCANCEL, "SQLCancel", SQLCancel, NULL },
- /* 11 */ { SQL_API_SQLCLOSECURSOR, "SQLCloseCursor", SQLCloseCursor, NULL },
- /* 12 */ { SQL_API_SQLCOLATTRIBUTE, "SQLColAttribute", SQLColAttribute, NULL },
- /* 13 */ { SQL_API_SQLCOLATTRIBUTES, "SQLColAttributes", SQLColAttributes, NULL },
- /* 14 */ { SQL_API_SQLCOLUMNPRIVILEGES, "SQLColumnPrivileges", SQLColumnPrivileges, NULL },
- /* 15 */ { SQL_API_SQLCOLUMNS, "SQLColumns", SQLColumns, NULL },
- /* 16 */ { SQL_API_SQLCONNECT, "SQLConnect", SQLConnect, NULL },
- /* 17 */ { SQL_API_SQLCOPYDESC, "SQLCopyDesc", SQLCopyDesc, NULL },
- /* 18 */ { SQL_API_SQLDATASOURCES, "SQLDataSources", SQLDataSources, NULL },
- /* 19 */ { SQL_API_SQLDESCRIBECOL, "SQLDescribeCol", SQLDescribeCol, NULL },
- /* 20 */ { SQL_API_SQLDESCRIBEPARAM, "SQLDescribeParam", SQLDescribeParam, NULL },
- /* 21 */ { SQL_API_SQLDISCONNECT, "SQLDisconnect", SQLDisconnect, NULL },
- /* 22 */ { SQL_API_SQLDRIVERCONNECT, "SQLDriverConnect", SQLDriverConnect, NULL },
- /* 23 */ { SQL_API_SQLDRIVERS, "SQLDrivers", SQLDrivers, NULL },
- /* 24 */ { SQL_API_SQLENDTRAN, "SQLEndTran", SQLEndTran, NULL },
- /* 25 */ { SQL_API_SQLERROR, "SQLError", SQLError, NULL },
- /* 26 */ { SQL_API_SQLEXECDIRECT, "SQLExecDirect", SQLExecDirect, NULL },
- /* 27 */ { SQL_API_SQLEXECUTE, "SQLExecute", SQLExecute, NULL },
- /* 28 */ { SQL_API_SQLEXTENDEDFETCH, "SQLExtendedFetch", SQLExtendedFetch, NULL },
- /* 29 */ { SQL_API_SQLFETCH, "SQLFetch", SQLFetch, NULL },
- /* 30 */ { SQL_API_SQLFETCHSCROLL, "SQLFetchScroll", SQLFetchScroll, NULL },
- /* 31 */ { SQL_API_SQLFOREIGNKEYS, "SQLForeignKeys", SQLForeignKeys, NULL },
- /* 32 */ { SQL_API_SQLFREEENV, "SQLFreeEnv", SQLFreeEnv, NULL },
- /* 33 */ { SQL_API_SQLFREEHANDLE, "SQLFreeHandle", SQLFreeHandle, NULL },
- /* 34 */ { SQL_API_SQLFREESTMT, "SQLFreeStmt", SQLFreeStmt, NULL },
- /* 35 */ { SQL_API_SQLFREECONNECT, "SQLFreeConnect", SQLFreeConnect, NULL },
- /* 36 */ { SQL_API_SQLGETCONNECTATTR, "SQLGetConnectAttr", SQLGetConnectAttr, NULL },
- /* 37 */ { SQL_API_SQLGETCONNECTOPTION, "SQLGetConnectOption", SQLGetConnectOption, NULL },
- /* 38 */ { SQL_API_SQLGETCURSORNAME, "SQLGetCursorName", SQLGetCursorName, NULL },
- /* 39 */ { SQL_API_SQLGETDATA, "SQLGetData", SQLGetData, NULL },
- /* 40 */ { SQL_API_SQLGETDESCFIELD, "SQLGetDescField", SQLGetDescField, NULL },
- /* 41 */ { SQL_API_SQLGETDESCREC, "SQLGetDescRec", SQLGetDescRec, NULL },
- /* 42 */ { SQL_API_SQLGETDIAGFIELD, "SQLGetDiagField", SQLGetDiagField, NULL },
- /* 43 */ { SQL_API_SQLGETENVATTR, "SQLGetEnvAttr", SQLGetEnvAttr, NULL },
- /* 44 */ { SQL_API_SQLGETFUNCTIONS, "SQLGetFunctions", SQLGetFunctions, NULL },
- /* 45 */ { SQL_API_SQLGETINFO, "SQLGetInfo", SQLGetInfo, NULL },
- /* 46 */ { SQL_API_SQLGETSTMTATTR, "SQLGetStmtAttr", SQLGetStmtAttr, NULL },
- /* 47 */ { SQL_API_SQLGETSTMTOPTION, "SQLGetStmtOption", SQLGetStmtOption, NULL },
- /* 48 */ { SQL_API_SQLGETTYPEINFO, "SQLGetTypeInfo", SQLGetTypeInfo, NULL },
- /* 49 */ { SQL_API_SQLMORERESULTS, "SQLMoreResults", SQLMoreResults, NULL },
- /* 50 */ { SQL_API_SQLNATIVESQL, "SQLNativeSql", SQLNativeSql, NULL },
- /* 51 */ { SQL_API_SQLNUMPARAMS, "SQLNumParams", SQLNumParams, NULL },
- /* 52 */ { SQL_API_SQLNUMRESULTCOLS, "SQLNumResultCols", SQLNumResultCols, NULL },
- /* 53 */ { SQL_API_SQLPARAMDATA, "SQLParamData", SQLParamData, NULL },
- /* 54 */ { SQL_API_SQLPARAMOPTIONS, "SQLParamOptions", SQLParamOptions, NULL },
- /* 55 */ { SQL_API_SQLPREPARE, "SQLPrepare", SQLPrepare, NULL },
- /* 56 */ { SQL_API_SQLPRIMARYKEYS, "SQLPrimaryKeys", SQLPrimaryKeys, NULL },
- /* 57 */ { SQL_API_SQLPROCEDURECOLUMNS, "SQLProcedureColumns", SQLProcedureColumns, NULL },
- /* 58 */ { SQL_API_SQLPROCEDURES, "SQLProcedures", SQLProcedures, NULL },
- /* 59 */ { SQL_API_SQLPUTDATA, "SQLPutData", SQLPutData, NULL },
- /* 60 */ { SQL_API_SQLROWCOUNT, "SQLRowCount", SQLRowCount, NULL },
- /* 61 */ { SQL_API_SQLSETCONNECTATTR, "SQLSetConnectAttr", SQLSetConnectAttr, NULL },
- /* 62 */ { SQL_API_SQLSETCONNECTOPTION, "SQLSetConnectOption", SQLSetConnectOption, NULL },
- /* 63 */ { SQL_API_SQLSETCURSORNAME, "SQLSetCursorName", SQLSetCursorName, NULL },
- /* 64 */ { SQL_API_SQLSETDESCFIELD, "SQLSetDescField", SQLSetDescField, NULL },
- /* 65 */ { SQL_API_SQLSETDESCREC, "SQLSetDescRec", SQLSetDescRec, NULL },
- /* 66 */ { SQL_API_SQLSETENVATTR, "SQLSetEnvAttr", SQLSetEnvAttr, NULL },
- /* 67 */ { SQL_API_SQLSETPARAM, "SQLSetParam", SQLSetParam, NULL },
- /* 68 */ { SQL_API_SQLSETPOS, "SQLSetPos", SQLSetPos, NULL },
- /* 69 */ { SQL_API_SQLSETSCROLLOPTIONS, "SQLSetScrollOptions", SQLSetScrollOptions, NULL },
- /* 70 */ { SQL_API_SQLSETSTMTATTR, "SQLSetStmtAttr", SQLSetStmtAttr, NULL },
- /* 71 */ { SQL_API_SQLSETSTMTOPTION, "SQLSetStmtOption", SQLSetStmtOption, NULL },
- /* 72 */ { SQL_API_SQLSPECIALCOLUMNS, "SQLSpecialColumns", SQLSpecialColumns, NULL },
- /* 73 */ { SQL_API_SQLSTATISTICS, "SQLStatistics", SQLStatistics, NULL },
- /* 74 */ { SQL_API_SQLTABLEPRIVILEGES, "SQLTablePrivileges", SQLTablePrivileges, NULL },
- /* 75 */ { SQL_API_SQLTABLES, "SQLTables", SQLTables, NULL },
- /* 76 */ { SQL_API_SQLTRANSACT, "SQLTransact", SQLTransact, NULL },
- /* 77 */ { SQL_API_SQLGETDIAGREC, "SQLGetDiagRec", SQLGetDiagRec, NULL },
+ /* 00 */ { SQL_API_SQLALLOCCONNECT, "SQLAllocConnect", SQLAllocConnect, NULL, NULL },
+ /* 01 */ { SQL_API_SQLALLOCENV, "SQLAllocEnv", SQLAllocEnv, NULL, NULL },
+ /* 02 */ { SQL_API_SQLALLOCHANDLE, "SQLAllocHandle", SQLAllocHandle, NULL, NULL },
+ /* 03 */ { SQL_API_SQLALLOCSTMT, "SQLAllocStmt", SQLAllocStmt, NULL, NULL },
+ /* 04 */ { SQL_API_SQLALLOCHANDLESTD, "SQLAllocHandleStd", SQLAllocHandleStd, NULL, NULL },
+ /* 05 */ { SQL_API_SQLBINDCOL, "SQLBindCol", SQLBindCol, NULL, NULL },
+ /* 06 */ { SQL_API_SQLBINDPARAM, "SQLBindParam", SQLBindParam, NULL, NULL },
+ /* 07 */ { SQL_API_SQLBINDPARAMETER, "SQLBindParameter", SQLBindParameter, NULL, NULL },
+ /* 08 */ { SQL_API_SQLBROWSECONNECT, "SQLBrowseConnect", SQLBrowseConnect, NULL, NULL },
+ /* 09 */ { SQL_API_SQLBULKOPERATIONS, "SQLBulkOperations", SQLBulkOperations, NULL, NULL },
+ /* 10 */ { SQL_API_SQLCANCEL, "SQLCancel", SQLCancel, NULL, NULL },
+ /* 11 */ { SQL_API_SQLCLOSECURSOR, "SQLCloseCursor", SQLCloseCursor, NULL, NULL },
+ /* 12 */ { SQL_API_SQLCOLATTRIBUTE, "SQLColAttribute", SQLColAttribute, NULL, NULL },
+ /* 13 */ { SQL_API_SQLCOLATTRIBUTES, "SQLColAttributes", SQLColAttributes, NULL, NULL },
+ /* 14 */ { SQL_API_SQLCOLUMNPRIVILEGES, "SQLColumnPrivileges", SQLColumnPrivileges, NULL, NULL },
+ /* 15 */ { SQL_API_SQLCOLUMNS, "SQLColumns", SQLColumns, NULL, NULL },
+ /* 16 */ { SQL_API_SQLCONNECT, "SQLConnect", SQLConnect, NULL, NULL },
+ /* 17 */ { SQL_API_SQLCOPYDESC, "SQLCopyDesc", SQLCopyDesc, NULL, NULL },
+ /* 18 */ { SQL_API_SQLDATASOURCES, "SQLDataSources", SQLDataSources, NULL, NULL },
+ /* 19 */ { SQL_API_SQLDESCRIBECOL, "SQLDescribeCol", SQLDescribeCol, NULL, NULL },
+ /* 20 */ { SQL_API_SQLDESCRIBEPARAM, "SQLDescribeParam", SQLDescribeParam, NULL, NULL },
+ /* 21 */ { SQL_API_SQLDISCONNECT, "SQLDisconnect", SQLDisconnect, NULL, NULL },
+ /* 22 */ { SQL_API_SQLDRIVERCONNECT, "SQLDriverConnect", SQLDriverConnect, NULL, NULL },
+ /* 23 */ { SQL_API_SQLDRIVERS, "SQLDrivers", SQLDrivers, NULL, NULL },
+ /* 24 */ { SQL_API_SQLENDTRAN, "SQLEndTran", SQLEndTran, NULL, NULL },
+ /* 25 */ { SQL_API_SQLERROR, "SQLError", SQLError, NULL, NULL },
+ /* 26 */ { SQL_API_SQLEXECDIRECT, "SQLExecDirect", SQLExecDirect, NULL, NULL },
+ /* 27 */ { SQL_API_SQLEXECUTE, "SQLExecute", SQLExecute, NULL, NULL },
+ /* 28 */ { SQL_API_SQLEXTENDEDFETCH, "SQLExtendedFetch", SQLExtendedFetch, NULL, NULL },
+ /* 29 */ { SQL_API_SQLFETCH, "SQLFetch", SQLFetch, NULL, NULL },
+ /* 30 */ { SQL_API_SQLFETCHSCROLL, "SQLFetchScroll", SQLFetchScroll, NULL, NULL },
+ /* 31 */ { SQL_API_SQLFOREIGNKEYS, "SQLForeignKeys", SQLForeignKeys, NULL, NULL },
+ /* 32 */ { SQL_API_SQLFREEENV, "SQLFreeEnv", SQLFreeEnv, NULL, NULL },
+ /* 33 */ { SQL_API_SQLFREEHANDLE, "SQLFreeHandle", SQLFreeHandle, NULL, NULL },
+ /* 34 */ { SQL_API_SQLFREESTMT, "SQLFreeStmt", SQLFreeStmt, NULL, NULL },
+ /* 35 */ { SQL_API_SQLFREECONNECT, "SQLFreeConnect", SQLFreeConnect, NULL, NULL },
+ /* 36 */ { SQL_API_SQLGETCONNECTATTR, "SQLGetConnectAttr", SQLGetConnectAttr, NULL, NULL },
+ /* 37 */ { SQL_API_SQLGETCONNECTOPTION, "SQLGetConnectOption", SQLGetConnectOption, NULL, NULL },
+ /* 38 */ { SQL_API_SQLGETCURSORNAME, "SQLGetCursorName", SQLGetCursorName, NULL, NULL },
+ /* 39 */ { SQL_API_SQLGETDATA, "SQLGetData", SQLGetData, NULL, NULL },
+ /* 40 */ { SQL_API_SQLGETDESCFIELD, "SQLGetDescField", SQLGetDescField, NULL, NULL },
+ /* 41 */ { SQL_API_SQLGETDESCREC, "SQLGetDescRec", SQLGetDescRec, NULL, NULL },
+ /* 42 */ { SQL_API_SQLGETDIAGFIELD, "SQLGetDiagField", SQLGetDiagField, NULL, NULL },
+ /* 43 */ { SQL_API_SQLGETENVATTR, "SQLGetEnvAttr", SQLGetEnvAttr, NULL, NULL },
+ /* 44 */ { SQL_API_SQLGETFUNCTIONS, "SQLGetFunctions", SQLGetFunctions, NULL, NULL },
+ /* 45 */ { SQL_API_SQLGETINFO, "SQLGetInfo", SQLGetInfo, NULL, NULL },
+ /* 46 */ { SQL_API_SQLGETSTMTATTR, "SQLGetStmtAttr", SQLGetStmtAttr, NULL, NULL },
+ /* 47 */ { SQL_API_SQLGETSTMTOPTION, "SQLGetStmtOption", SQLGetStmtOption, NULL, NULL },
+ /* 48 */ { SQL_API_SQLGETTYPEINFO, "SQLGetTypeInfo", SQLGetTypeInfo, NULL, NULL },
+ /* 49 */ { SQL_API_SQLMORERESULTS, "SQLMoreResults", SQLMoreResults, NULL, NULL },
+ /* 50 */ { SQL_API_SQLNATIVESQL, "SQLNativeSql", SQLNativeSql, NULL, NULL },
+ /* 51 */ { SQL_API_SQLNUMPARAMS, "SQLNumParams", SQLNumParams, NULL, NULL },
+ /* 52 */ { SQL_API_SQLNUMRESULTCOLS, "SQLNumResultCols", SQLNumResultCols, NULL, NULL },
+ /* 53 */ { SQL_API_SQLPARAMDATA, "SQLParamData", SQLParamData, NULL, NULL },
+ /* 54 */ { SQL_API_SQLPARAMOPTIONS, "SQLParamOptions", SQLParamOptions, NULL, NULL },
+ /* 55 */ { SQL_API_SQLPREPARE, "SQLPrepare", SQLPrepare, NULL, NULL },
+ /* 56 */ { SQL_API_SQLPRIMARYKEYS, "SQLPrimaryKeys", SQLPrimaryKeys, NULL, NULL },
+ /* 57 */ { SQL_API_SQLPROCEDURECOLUMNS, "SQLProcedureColumns", SQLProcedureColumns, NULL, NULL },
+ /* 58 */ { SQL_API_SQLPROCEDURES, "SQLProcedures", SQLProcedures, NULL, NULL },
+ /* 59 */ { SQL_API_SQLPUTDATA, "SQLPutData", SQLPutData, NULL, NULL },
+ /* 60 */ { SQL_API_SQLROWCOUNT, "SQLRowCount", SQLRowCount, NULL, NULL },
+ /* 61 */ { SQL_API_SQLSETCONNECTATTR, "SQLSetConnectAttr", SQLSetConnectAttr, NULL, NULL },
+ /* 62 */ { SQL_API_SQLSETCONNECTOPTION, "SQLSetConnectOption", SQLSetConnectOption, NULL, NULL },
+ /* 63 */ { SQL_API_SQLSETCURSORNAME, "SQLSetCursorName", SQLSetCursorName, NULL, NULL },
+ /* 64 */ { SQL_API_SQLSETDESCFIELD, "SQLSetDescField", SQLSetDescField, NULL, NULL },
+ /* 65 */ { SQL_API_SQLSETDESCREC, "SQLSetDescRec", SQLSetDescRec, NULL, NULL },
+ /* 66 */ { SQL_API_SQLSETENVATTR, "SQLSetEnvAttr", SQLSetEnvAttr, NULL, NULL },
+ /* 67 */ { SQL_API_SQLSETPARAM, "SQLSetParam", SQLSetParam, NULL, NULL },
+ /* 68 */ { SQL_API_SQLSETPOS, "SQLSetPos", SQLSetPos, NULL, NULL },
+ /* 69 */ { SQL_API_SQLSETSCROLLOPTIONS, "SQLSetScrollOptions", SQLSetScrollOptions, NULL, NULL },
+ /* 70 */ { SQL_API_SQLSETSTMTATTR, "SQLSetStmtAttr", SQLSetStmtAttr, NULL, NULL },
+ /* 71 */ { SQL_API_SQLSETSTMTOPTION, "SQLSetStmtOption", SQLSetStmtOption, NULL, NULL },
+ /* 72 */ { SQL_API_SQLSPECIALCOLUMNS, "SQLSpecialColumns", SQLSpecialColumns, NULL, NULL },
+ /* 73 */ { SQL_API_SQLSTATISTICS, "SQLStatistics", SQLStatistics, NULL, NULL },
+ /* 74 */ { SQL_API_SQLTABLEPRIVILEGES, "SQLTablePrivileges", SQLTablePrivileges, NULL, NULL },
+ /* 75 */ { SQL_API_SQLTABLES, "SQLTables", SQLTables, NULL, NULL },
+ /* 76 */ { SQL_API_SQLTRANSACT, "SQLTransact", SQLTransact, NULL, NULL },
+ /* 77 */ { SQL_API_SQLGETDIAGREC, "SQLGetDiagRec", SQLGetDiagRec, NULL, NULL },
};
static PROXYHANDLE gProxyHandle;
} \
}
-SQLRETURN SQLDummyFunc()
+static SQLRETURN SQLDummyFunc(void)
{
- TRACE("SQLDummyFunc: \n");
+ TRACE("SQLDummyFunc:\n");
return SQL_SUCCESS;
}
+/***********************************************************************
+ * ODBC_ReplicateODBCInstToRegistry
+ *
+ * PARAMS
+ *
+ * RETURNS
+ *
+ * Utility to ODBC_ReplicateToRegistry to replicate the drivers of the
+ * ODBCINST.INI settings
+ *
+ * The driver settings are not replicated to the registry. If we were to
+ * replicate them we would need to decide whether to replicate all settings
+ * or to do some translation; whether to remove any entries present only in
+ * the windows registry, etc.
+ */
+
+static void ODBC_ReplicateODBCInstToRegistry (SQLHENV hEnv)
+{
+ HKEY hODBCInst;
+ LONG reg_ret;
+ int success;
+
+ success = 0;
+ TRACE ("Driver settings are not currently replicated to the registry\n");
+ if ((reg_ret = RegCreateKeyExA (HKEY_LOCAL_MACHINE,
+ "Software\\ODBC\\ODBCINST.INI", 0, NULL,
+ REG_OPTION_NON_VOLATILE,
+ KEY_ALL_ACCESS /* a couple more than we need */, NULL,
+ &hODBCInst, NULL)) == ERROR_SUCCESS)
+ {
+ HKEY hDrivers;
+ if ((reg_ret = RegCreateKeyExA (hODBCInst, "ODBC Drivers", 0,
+ NULL, REG_OPTION_NON_VOLATILE,
+ KEY_ALL_ACCESS /* overkill */, NULL, &hDrivers, NULL))
+ == ERROR_SUCCESS)
+ {
+ SQLRETURN sql_ret;
+ SQLUSMALLINT dirn;
+ CHAR desc [256];
+ SQLSMALLINT sizedesc;
+
+ success = 1;
+ dirn = SQL_FETCH_FIRST;
+ while ((sql_ret = SQLDrivers (hEnv, dirn, (SQLCHAR*)desc, sizeof(desc),
+ &sizedesc, NULL, 0, NULL)) == SQL_SUCCESS ||
+ sql_ret == SQL_SUCCESS_WITH_INFO)
+ {
+ /* FIXME Do some proper handling of the SUCCESS_WITH_INFO */
+ dirn = SQL_FETCH_NEXT;
+ if (sizedesc == lstrlenA(desc))
+ {
+ HKEY hThis;
+ if ((reg_ret = RegQueryValueExA (hDrivers, desc, NULL,
+ NULL, NULL, NULL)) == ERROR_FILE_NOT_FOUND)
+ {
+ if ((reg_ret = RegSetValueExA (hDrivers, desc, 0,
+ REG_SZ, (const BYTE *)"Installed", 10)) != ERROR_SUCCESS)
+ {
+ TRACE ("Error %d replicating driver %s\n",
+ reg_ret, desc);
+ success = 0;
+ }
+ }
+ else if (reg_ret != ERROR_SUCCESS)
+ {
+ TRACE ("Error %d checking for %s in drivers\n",
+ reg_ret, desc);
+ success = 0;
+ }
+ if ((reg_ret = RegCreateKeyExA (hODBCInst, desc, 0,
+ NULL, REG_OPTION_NON_VOLATILE,
+ KEY_ALL_ACCESS, NULL, &hThis, NULL))
+ == ERROR_SUCCESS)
+ {
+ /* FIXME This is where the settings go.
+ * I suggest that if the disposition says it
+ * exists then we leave it alone. Alternatively
+ * include an extra value to flag that it is
+ * a replication of the unixODBC/iODBC/...
+ */
+ if ((reg_ret = RegCloseKey (hThis)) !=
+ ERROR_SUCCESS)
+ TRACE ("Error %d closing %s key\n", reg_ret,
+ desc);
+ }
+ else
+ {
+ TRACE ("Error %d ensuring driver key %s\n",
+ reg_ret, desc);
+ success = 0;
+ }
+ }
+ else
+ {
+ WARN ("Unusually long driver name %s not replicated\n",
+ desc);
+ success = 0;
+ }
+ }
+ if (sql_ret != SQL_NO_DATA)
+ {
+ TRACE ("Error %d enumerating drivers\n", (int)sql_ret);
+ success = 0;
+ }
+ if ((reg_ret = RegCloseKey (hDrivers)) != ERROR_SUCCESS)
+ {
+ TRACE ("Error %d closing hDrivers\n", reg_ret);
+ }
+ }
+ else
+ {
+ TRACE ("Error %d opening HKLM\\S\\O\\OI\\Drivers\n", reg_ret);
+ }
+ if ((reg_ret = RegCloseKey (hODBCInst)) != ERROR_SUCCESS)
+ {
+ TRACE ("Error %d closing HKLM\\S\\O\\ODBCINST.INI\n", reg_ret);
+ }
+ }
+ else
+ {
+ TRACE ("Error %d opening HKLM\\S\\O\\ODBCINST.INI\n", reg_ret);
+ }
+ if (!success)
+ {
+ WARN ("May not have replicated all ODBC drivers to the registry\n");
+ }
+}
+
+/***********************************************************************
+ * ODBC_ReplicateODBCToRegistry
+ *
+ * PARAMS
+ *
+ * RETURNS
+ *
+ * Utility to ODBC_ReplicateToRegistry to replicate either the USER or
+ * SYSTEM dsns
+ *
+ * For now simply place the "Driver description" (as returned by SQLDataSources)
+ * into the registry as the driver. This is enough to satisfy Crystal's
+ * requirement that there be a driver entry. (It doesn't seem to care what
+ * the setting is).
+ * A slightly more accurate setting would be to access the registry to find
+ * the actual driver library for the given description (which appears to map
+ * to one of the HKLM/Software/ODBC/ODBCINST.INI keys). (If you do this note
+ * that this will add a requirement that this function be called after
+ * ODBC_ReplicateODBCInstToRegistry)
+ */
+static void ODBC_ReplicateODBCToRegistry (int is_user, SQLHENV hEnv)
+{
+ HKEY hODBC;
+ LONG reg_ret;
+ SQLRETURN sql_ret;
+ SQLUSMALLINT dirn;
+ CHAR dsn [SQL_MAX_DSN_LENGTH + 1];
+ SQLSMALLINT sizedsn;
+ CHAR desc [256];
+ SQLSMALLINT sizedesc;
+ int success;
+ const char *which = is_user ? "user" : "system";
+
+ success = 0;
+ if ((reg_ret = RegCreateKeyExA (
+ is_user ? HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE,
+ "Software\\ODBC\\ODBC.INI", 0, NULL, REG_OPTION_NON_VOLATILE,
+ KEY_ALL_ACCESS /* a couple more than we need */, NULL, &hODBC,
+ NULL)) == ERROR_SUCCESS)
+ {
+ success = 1;
+ dirn = is_user ? SQL_FETCH_FIRST_USER : SQL_FETCH_FIRST_SYSTEM;
+ while ((sql_ret = SQLDataSources (hEnv, dirn,
+ (SQLCHAR*)dsn, sizeof(dsn), &sizedsn,
+ (SQLCHAR*)desc, sizeof(desc), &sizedesc)) == SQL_SUCCESS
+ || sql_ret == SQL_SUCCESS_WITH_INFO)
+ {
+ /* FIXME Do some proper handling of the SUCCESS_WITH_INFO */
+ dirn = SQL_FETCH_NEXT;
+ if (sizedsn == lstrlenA(dsn) && sizedesc == lstrlenA(desc))
+ {
+ HKEY hDSN;
+ if ((reg_ret = RegCreateKeyExA (hODBC, dsn, 0,
+ NULL, REG_OPTION_NON_VOLATILE,
+ KEY_ALL_ACCESS, NULL, &hDSN, NULL))
+ == ERROR_SUCCESS)
+ {
+ static const char DRIVERKEY[] = "Driver";
+ if ((reg_ret = RegQueryValueExA (hDSN, DRIVERKEY,
+ NULL, NULL, NULL, NULL))
+ == ERROR_FILE_NOT_FOUND)
+ {
+ if ((reg_ret = RegSetValueExA (hDSN, DRIVERKEY, 0,
+ REG_SZ, (LPBYTE)desc, sizedesc)) != ERROR_SUCCESS)
+ {
+ TRACE ("Error %d replicating description of "
+ "%s(%s)\n", reg_ret, dsn, desc);
+ success = 0;
+ }
+ }
+ else if (reg_ret != ERROR_SUCCESS)
+ {
+ TRACE ("Error %d checking for description of %s\n",
+ reg_ret, dsn);
+ success = 0;
+ }
+ if ((reg_ret = RegCloseKey (hDSN)) != ERROR_SUCCESS)
+ {
+ TRACE ("Error %d closing %s DSN key %s\n",
+ reg_ret, which, dsn);
+ }
+ }
+ else
+ {
+ TRACE ("Error %d opening %s DSN key %s\n",
+ reg_ret, which, dsn);
+ success = 0;
+ }
+ }
+ else
+ {
+ WARN ("Unusually long %s data source name %s (%s) not "
+ "replicated\n", which, dsn, desc);
+ success = 0;
+ }
+ }
+ if (sql_ret != SQL_NO_DATA)
+ {
+ TRACE ("Error %d enumerating %s datasources\n",
+ (int)sql_ret, which);
+ success = 0;
+ }
+ if ((reg_ret = RegCloseKey (hODBC)) != ERROR_SUCCESS)
+ {
+ TRACE ("Error %d closing %s ODBC.INI registry key\n", reg_ret,
+ which);
+ }
+ }
+ else
+ {
+ TRACE ("Error %d creating/opening %s ODBC.INI registry key\n",
+ reg_ret, which);
+ }
+ if (!success)
+ {
+ WARN ("May not have replicated all %s ODBC DSNs to the registry\n",
+ which);
+ }
+}
+
+/***********************************************************************
+ * ODBC_ReplicateToRegistry
+ *
+ * PARAMS
+ *
+ * RETURNS
+ *
+ * Unfortunately some of the functions that Windows documents as being part
+ * of the ODBC API it implements directly during compilation or something
+ * in terms of registry access functions.
+ * e.g. SQLGetInstalledDrivers queries the list at
+ * HKEY_LOCAL_MACHINE\Software\ODBC\ODBCINST.INI\ODBC Drivers
+ *
+ * This function is called when the driver manager is loaded and is used
+ * to replicate the appropriate details into the Wine registry
+ */
+
+static void ODBC_ReplicateToRegistry (void)
+{
+ SQLRETURN sql_ret;
+ SQLHENV hEnv;
+
+ if ((sql_ret = SQLAllocEnv (&hEnv)) == SQL_SUCCESS)
+ {
+ ODBC_ReplicateODBCInstToRegistry (hEnv);
+ ODBC_ReplicateODBCToRegistry (0 /* system dsns */, hEnv);
+ ODBC_ReplicateODBCToRegistry (1 /* user dsns */, hEnv);
+
+ if ((sql_ret = SQLFreeEnv (hEnv)) != SQL_SUCCESS)
+ {
+ TRACE ("Error %d freeing the SQL environment.\n", (int)sql_ret);
+ }
+ }
+ else
+ {
+ TRACE ("Error %d opening an SQL environment.\n", (int)sql_ret);
+ WARN ("The external ODBC settings have not been replicated to the"
+ " Wine registry\n");
+ }
+}
+
/***********************************************************************
* DllMain [Internal] Initializes the internal 'ODBC32.DLL'.
*
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
int i;
- TRACE("Initializing or Finalizing proxy ODBC: %p,%lx,%p\n", hinstDLL, fdwReason, lpvReserved);
+ TRACE("Initializing or Finalizing proxy ODBC: %p,%x,%p\n", hinstDLL, fdwReason, lpvReserved);
if (fdwReason == DLL_PROCESS_ATTACH)
{
TRACE("Loading ODBC...\n");
DisableThreadLibraryCalls(hinstDLL);
if (ODBC_LoadDriverManager())
+ {
ODBC_LoadDMFunctions();
+ ODBC_ReplicateToRegistry();
+ }
}
else if (fdwReason == DLL_PROCESS_DETACH)
{
gProxyHandle.functions[i].func = SQLDummyFunc;
}
}
-#ifndef __REACTOS__
+
if (gProxyHandle.dmHandle)
{
wine_dlclose(gProxyHandle.dmHandle,NULL,0);
gProxyHandle.dmHandle = NULL;
}
-#endif
}
return TRUE;
}
-
/***********************************************************************
* ODBC_LoadDriverManager [Internal] Load ODBC library.
*
static BOOL ODBC_LoadDriverManager(void)
{
const char *s = getenv("LIB_ODBC_DRIVER_MANAGER");
-#ifndef __REACTOS__
char error[256];
-#endif
TRACE("\n");
gProxyHandle.bFunctionReady = FALSE;
- gProxyHandle.nErrorType = ERROR_LIBRARY_NOT_FOUND;
- if (s!= NULL && strlen (s) >= sizeof(gProxyHandle.dmLibName))
- {
- ERR("Driver name too long (%s)\n",s);
- return FALSE;
- }
- if (s == NULL || strlen(s) == 0)
- s = "libodbc.so";
- strcpy(gProxyHandle.dmLibName, s);
-#ifndef __REACTOS__
- gProxyHandle.dmHandle = wine_dlopen(gProxyHandle.dmLibName, RTLD_LAZY, error, sizeof(error));
+#ifdef SONAME_LIBODBC
+ if (!s || !s[0]) s = SONAME_LIBODBC;
+#endif
+ if (!s || !s[0]) goto failed;
- if (gProxyHandle.dmHandle == NULL) /* fail to load unixODBC driver manager */
- {
- WARN("failed to open library %s: %s\n", gProxyHandle.dmLibName, error);
- gProxyHandle.dmLibName[0] = '\0';
- gProxyHandle.nErrorType = ERROR_LIBRARY_NOT_FOUND;
- return FALSE;
- }
- else
+ gProxyHandle.dmHandle = wine_dlopen(s, RTLD_LAZY | RTLD_GLOBAL, error, sizeof(error));
+
+ if (gProxyHandle.dmHandle != NULL)
{
gProxyHandle.nErrorType = ERROR_FREE;
return TRUE;
}
-#else
+failed:
+ WARN("failed to open library %s: %s\n", debugstr_a(s), error);
+ gProxyHandle.nErrorType = ERROR_LIBRARY_NOT_FOUND;
return FALSE;
-#endif
}
static BOOL ODBC_LoadDMFunctions(void)
{
-#ifndef __REACTOS__
int i;
char error[256];
-#endif
if (gProxyHandle.dmHandle == NULL)
return FALSE;
-#ifndef __REACTOS__
+
for ( i = 0; i < NUM_SQLFUNC; i ++ )
{
+ char * pFuncNameW;
+
gProxyHandle.functions[i] = template_func[i];
gProxyHandle.functions[i].func = wine_dlsym(gProxyHandle.dmHandle,
gProxyHandle.functions[i].name, error, sizeof(error));
ERR("Failed to load function %s\n",gProxyHandle.functions[i].name);
gProxyHandle.functions[i].func = SQLDummyFunc;
}
+ else
+ {
+ /* Build Unicode function name for this function */
+ pFuncNameW = HeapAlloc(GetProcessHeap(), 0, strlen(gProxyHandle.functions[i].name) + 2);
+ strcpy(pFuncNameW, gProxyHandle.functions[i].name);
+ pFuncNameW[strlen(gProxyHandle.functions[i].name) + 1] = '\0';
+ pFuncNameW[strlen(gProxyHandle.functions[i].name)] = 'W';
+
+ gProxyHandle.functions[i].funcW = wine_dlsym(gProxyHandle.dmHandle,
+ pFuncNameW, error, sizeof(error));
+ if (error[0])
+ {
+/* TRACE("Failed to load function %s, possibly no Unicode version is required\n", pFuncNameW); */
+ gProxyHandle.functions[i].funcW = NULL;
+ }
+ HeapFree(GetProcessHeap(), 0, pFuncNameW);
+ }
}
gProxyHandle.bFunctionReady = TRUE;
-#endif
+
return TRUE;
}
if (!gProxyHandle.bFunctionReady || gProxyHandle.dmHandle == NULL)
{
if (gProxyHandle.nErrorType == ERROR_LIBRARY_NOT_FOUND)
- WARN("ProxyODBC: Can not load ODBC driver manager library.\n");
+ WARN("ProxyODBC: Cannot load ODBC driver manager library.\n");
if (HandleType == SQL_HANDLE_ENV)
*OutputHandle = SQL_NULL_HENV;
SQLRETURN WINAPI SQLAllocHandleStd( SQLSMALLINT HandleType,
SQLHANDLE InputHandle, SQLHANDLE *OutputHandle)
{
- TRACE("ProxyODBC: SQLAllocHandelStd.\n");
+ TRACE("ProxyODBC: SQLAllocHandleStd.\n");
if (!gProxyHandle.bFunctionReady || gProxyHandle.dmHandle == NULL)
{
if (gProxyHandle.nErrorType == ERROR_LIBRARY_NOT_FOUND)
- WARN("ProxyODBC: Can not load ODBC driver manager library.\n");
+ WARN("ProxyODBC: Cannot load ODBC driver manager library.\n");
if (HandleType == SQL_HANDLE_ENV)
*OutputHandle = SQL_NULL_HENV;
*/
SQLRETURN WINAPI SQLBindCol(SQLHSTMT StatementHandle,
SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType,
- SQLPOINTER TargetValue, SQLINTEGER BufferLength,
- SQLINTEGER *StrLen_or_Ind)
+ SQLPOINTER TargetValue, SQLLEN BufferLength,
+ SQLLEN *StrLen_or_Ind)
{
TRACE("\n");
*/
SQLRETURN WINAPI SQLBindParam(SQLHSTMT StatementHandle,
SQLUSMALLINT ParameterNumber, SQLSMALLINT ValueType,
- SQLSMALLINT ParameterType, SQLUINTEGER LengthPrecision,
+ SQLSMALLINT ParameterType, SQLULEN LengthPrecision,
SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue,
- SQLINTEGER *StrLen_or_Ind)
+ SQLLEN *StrLen_or_Ind)
{
TRACE("\n");
CHECK_READY_AND_dmHandle();
- strcpy(gProxyHandle.ServerName, (const char*)ServerName);
- strcpy(gProxyHandle.UserName, (const char*)UserName);
+ strcpy( (LPSTR)gProxyHandle.ServerName, (LPSTR)ServerName );
+ strcpy( (LPSTR)gProxyHandle.UserName, (LPSTR)UserName );
assert(gProxyHandle.functions[SQLAPI_INDEX_SQLCONNECT].func);
ret=(gProxyHandle.functions[SQLAPI_INDEX_SQLCONNECT].func)
(EnvironmentHandle, Direction, ServerName,
BufferLength1, NameLength1, Description, BufferLength2, NameLength2);
- if (WINE_TRACE_ON(odbc))
+ if (TRACE_ON(odbc))
{
TRACE("returns: %d \t", ret);
if (*NameLength1 > 0)
SQLRETURN WINAPI SQLDescribeCol(SQLHSTMT StatementHandle,
SQLUSMALLINT ColumnNumber, SQLCHAR *ColumnName,
SQLSMALLINT BufferLength, SQLSMALLINT *NameLength,
- SQLSMALLINT *DataType, SQLUINTEGER *ColumnSize,
+ SQLSMALLINT *DataType, SQLULEN *ColumnSize,
SQLSMALLINT *DecimalDigits, SQLSMALLINT *Nullable)
{
TRACE("\n");
/*************************************************************************
* SQLFetchScroll [ODBC32.030]
*/
-SQLRETURN WINAPI SQLFetchScroll(SQLHSTMT StatementHandle, SQLSMALLINT FetchOrientation, SQLINTEGER FetchOffset)
+SQLRETURN WINAPI SQLFetchScroll(SQLHSTMT StatementHandle, SQLSMALLINT FetchOrientation, SQLLEN FetchOffset)
{
TRACE("\n");
*/
SQLRETURN WINAPI SQLGetData(SQLHSTMT StatementHandle,
SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType,
- SQLPOINTER TargetValue, SQLINTEGER BufferLength,
- SQLINTEGER *StrLen_or_Ind)
+ SQLPOINTER TargetValue, SQLLEN BufferLength,
+ SQLLEN *StrLen_or_Ind)
{
TRACE("\n");
SQLSMALLINT RecNumber, SQLCHAR *Name,
SQLSMALLINT BufferLength, SQLSMALLINT *StringLength,
SQLSMALLINT *Type, SQLSMALLINT *SubType,
- SQLINTEGER *Length, SQLSMALLINT *Precision,
+ SQLLEN *Length, SQLSMALLINT *Precision,
SQLSMALLINT *Scale, SQLSMALLINT *Nullable)
{
TRACE("\n");
/*************************************************************************
* SQLPutData [ODBC32.049]
*/
-SQLRETURN WINAPI SQLPutData(SQLHSTMT StatementHandle, SQLPOINTER Data, SQLINTEGER StrLen_or_Ind)
+SQLRETURN WINAPI SQLPutData(SQLHSTMT StatementHandle, SQLPOINTER Data, SQLLEN StrLen_or_Ind)
{
TRACE("\n");
/*************************************************************************
* SQLRowCount [ODBC32.020]
*/
-SQLRETURN WINAPI SQLRowCount(SQLHSTMT StatementHandle, SQLINTEGER *RowCount)
+SQLRETURN WINAPI SQLRowCount(SQLHSTMT StatementHandle, SQLLEN *RowCount)
{
TRACE("\n");
/*************************************************************************
* SQLSetConnectOption [ODBC32.050]
*/
-SQLRETURN WINAPI SQLSetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLUINTEGER Value)
+SQLRETURN WINAPI SQLSetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLULEN Value)
{
TRACE("\n");
*/
SQLRETURN WINAPI SQLSetDescRec(SQLHDESC DescriptorHandle,
SQLSMALLINT RecNumber, SQLSMALLINT Type,
- SQLSMALLINT SubType, SQLINTEGER Length,
+ SQLSMALLINT SubType, SQLLEN Length,
SQLSMALLINT Precision, SQLSMALLINT Scale,
- SQLPOINTER Data, SQLINTEGER *StringLength,
- SQLINTEGER *Indicator)
+ SQLPOINTER Data, SQLLEN *StringLength,
+ SQLLEN *Indicator)
{
TRACE("\n");
*/
SQLRETURN WINAPI SQLSetParam(SQLHSTMT StatementHandle,
SQLUSMALLINT ParameterNumber, SQLSMALLINT ValueType,
- SQLSMALLINT ParameterType, SQLUINTEGER LengthPrecision,
+ SQLSMALLINT ParameterType, SQLULEN LengthPrecision,
SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue,
- SQLINTEGER *StrLen_or_Ind)
+ SQLLEN *StrLen_or_Ind)
{
TRACE("\n");
/*************************************************************************
* SQLSetStmtOption [ODBC32.051]
*/
-SQLRETURN WINAPI SQLSetStmtOption(SQLHSTMT StatementHandle, SQLUSMALLINT Option, SQLUINTEGER Value)
+SQLRETURN WINAPI SQLSetStmtOption(SQLHSTMT StatementHandle, SQLUSMALLINT Option, SQLULEN Value)
{
TRACE("\n");
SQLPOINTER rgbDesc,
SQLSMALLINT cbDescMax,
SQLSMALLINT *pcbDesc,
- SQLINTEGER *pfDesc)
+ SQLLEN *pfDesc)
{
TRACE("\n");
SQLHSTMT hstmt,
SQLUSMALLINT ipar,
SQLSMALLINT *pfSqlType,
- SQLUINTEGER *pcbParamDef,
+ SQLULEN *pcbParamDef,
SQLSMALLINT *pibScale,
SQLSMALLINT *pfNullable)
{
SQLSMALLINT fParamType,
SQLSMALLINT fCType,
SQLSMALLINT fSqlType,
- SQLUINTEGER cbColDef,
+ SQLULEN cbColDef,
SQLSMALLINT ibScale,
SQLPOINTER rgbValue,
- SQLINTEGER cbValueMax,
- SQLINTEGER *pcbValue)
+ SQLLEN cbValueMax,
+ SQLLEN *pcbValue)
{
TRACE("\n");
SQLRETURN WINAPI SQLSetScrollOptions(
SQLHSTMT statement_handle,
SQLUSMALLINT f_concurrency,
- SQLINTEGER crow_keyset,
+ SQLLEN crow_keyset,
SQLUSMALLINT crow_rowset )
{
TRACE("\n");
(statement_handle, f_concurrency, crow_keyset, crow_rowset);
}
+static int SQLColAttributes_KnownStringAttribute(SQLUSMALLINT fDescType)
+{
+ static const SQLUSMALLINT attrList[] =
+ {
+ SQL_COLUMN_OWNER_NAME,
+ SQL_COLUMN_QUALIFIER_NAME,
+ SQL_COLUMN_LABEL,
+ SQL_COLUMN_NAME,
+ SQL_COLUMN_TABLE_NAME,
+ SQL_COLUMN_TYPE_NAME,
+ SQL_DESC_BASE_COLUMN_NAME,
+ SQL_DESC_BASE_TABLE_NAME,
+ SQL_DESC_CATALOG_NAME,
+ SQL_DESC_LABEL,
+ SQL_DESC_LITERAL_PREFIX,
+ SQL_DESC_LITERAL_SUFFIX,
+ SQL_DESC_LOCAL_TYPE_NAME,
+ SQL_DESC_NAME,
+ SQL_DESC_SCHEMA_NAME,
+ SQL_DESC_TABLE_NAME,
+ SQL_DESC_TYPE_NAME,
+ };
+ unsigned int i;
+
+ for (i = 0; i < sizeof(attrList) / sizeof(SQLUSMALLINT); i++) {
+ if (attrList[i] == fDescType) return 1;
+ }
+ return 0;
+}
+
+/*************************************************************************
+ * SQLColAttributesW [ODBC32.106]
+ */
+SQLRETURN WINAPI SQLColAttributesW(
+ SQLHSTMT hstmt,
+ SQLUSMALLINT icol,
+ SQLUSMALLINT fDescType,
+ SQLPOINTER rgbDesc,
+ SQLSMALLINT cbDescMax,
+ SQLSMALLINT *pcbDesc,
+ SQLLEN *pfDesc)
+{
+ SQLRETURN iResult;
+
+ TRACE("hstmt=0x%08lx icol=%d fDescType=%d rgbDesc=%p cbDescMax=%d pcbDesc=%p pfDesc=%p\n",
+ hstmt, icol, fDescType, rgbDesc, cbDescMax, pcbDesc, pfDesc);
+
+ CHECK_dmHandle();
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLCOLATTRIBUTES].funcW);
+ iResult = (gProxyHandle.functions[SQLAPI_INDEX_SQLCOLATTRIBUTES].funcW)
+ (hstmt, icol, fDescType, rgbDesc, cbDescMax, pcbDesc, pfDesc);
+ if (iResult == SQL_SUCCESS && rgbDesc != NULL && SQLColAttributes_KnownStringAttribute(fDescType)) {
+ /*
+ TRACE("Dumping values fetched via SQLColAttributesW:\n");
+ TRACE(" Attribute name : %s\n", debugstr_w(rgbDesc));
+ TRACE(" Declared length: %d\n", *pcbDesc);
+ */
+ if (*pcbDesc != lstrlenW(rgbDesc) * 2) {
+ TRACE("CHEAT: resetting name length for ADO\n");
+ *pcbDesc = lstrlenW(rgbDesc) * 2;
+ }
+ }
+ return iResult;
+}
+
+/*************************************************************************
+ * SQLConnectW [ODBC32.107]
+ */
+SQLRETURN WINAPI SQLConnectW(SQLHDBC ConnectionHandle,
+ WCHAR *ServerName, SQLSMALLINT NameLength1,
+ WCHAR *UserName, SQLSMALLINT NameLength2,
+ WCHAR *Authentication, SQLSMALLINT NameLength3)
+{
+ SQLRETURN ret;
+ TRACE("(Server=%.*s)\n",NameLength1+3, debugstr_w(ServerName));
+
+ CHECK_READY_AND_dmHandle();
+
+ WideCharToMultiByte(
+ CP_UTF8, 0,
+ ServerName, NameLength1,
+ gProxyHandle.ServerName, sizeof(gProxyHandle.ServerName),
+ NULL, NULL);
+ WideCharToMultiByte(
+ CP_UTF8, 0,
+ UserName, NameLength2,
+ gProxyHandle.UserName, sizeof(gProxyHandle.UserName),
+ NULL, NULL);
+
+ assert(gProxyHandle.functions[SQLAPI_INDEX_SQLCONNECT].funcW);
+ ret=(gProxyHandle.functions[SQLAPI_INDEX_SQLCONNECT].funcW)
+ (ConnectionHandle, ServerName, NameLength1,
+ UserName, NameLength2, Authentication, NameLength3);
+
+ TRACE("returns %d\n",ret);
+ return ret;
+}
+
+/*************************************************************************
+ * SQLDescribeColW [ODBC32.108]
+ */
+SQLRETURN WINAPI SQLDescribeColW(SQLHSTMT StatementHandle,
+ SQLUSMALLINT ColumnNumber, SQLWCHAR *ColumnName,
+ SQLSMALLINT BufferLength, SQLSMALLINT *NameLength,
+ SQLSMALLINT *DataType, SQLULEN *ColumnSize,
+ SQLSMALLINT *DecimalDigits, SQLSMALLINT *Nullable)
+{
+ SQLRETURN iResult;
+ TRACE("\n");
+
+ CHECK_READY_AND_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLDESCRIBECOL].funcW);
+ iResult = (gProxyHandle.functions[SQLAPI_INDEX_SQLDESCRIBECOL].funcW)
+ (StatementHandle, ColumnNumber, ColumnName,
+ BufferLength, NameLength, DataType, ColumnSize, DecimalDigits, Nullable);
+ if (iResult >= 0) {
+ TRACE("Successfully recovered the following column information:\n");
+ TRACE("\tRequested column index: %d\n", ColumnNumber);
+ TRACE("\tAvailable length for column name: %d\n", BufferLength);
+ if (NameLength != NULL)
+ TRACE("\tActual length for column name: %d\n", *NameLength);
+ else TRACE("\tActual length for column name: (null)\n");
+ TRACE("\tReturned column name: %s\n", debugstr_w(ColumnName));
+ }
+ return iResult;
+}
+
+/*************************************************************************
+ * SQLErrorW [ODBC32.110]
+ */
+SQLRETURN WINAPI SQLErrorW(SQLHENV EnvironmentHandle,
+ SQLHDBC ConnectionHandle, SQLHSTMT StatementHandle,
+ WCHAR *Sqlstate, SQLINTEGER *NativeError,
+ WCHAR *MessageText, SQLSMALLINT BufferLength,
+ SQLSMALLINT *TextLength)
+{
+ TRACE("\n");
+
+ CHECK_READY_AND_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLERROR].funcW);
+ return (gProxyHandle.functions[SQLAPI_INDEX_SQLERROR].funcW)
+ (EnvironmentHandle, ConnectionHandle, StatementHandle,
+ Sqlstate, NativeError, MessageText, BufferLength, TextLength);
+}
+
+/*************************************************************************
+ * SQLExecDirectW [ODBC32.111]
+ */
+SQLRETURN WINAPI SQLExecDirectW(SQLHSTMT StatementHandle,
+ WCHAR *StatementText, SQLINTEGER TextLength)
+{
+ TRACE("\n");
+
+ CHECK_READY_AND_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLEXECDIRECT].funcW);
+ return (gProxyHandle.functions[SQLAPI_INDEX_SQLEXECDIRECT].funcW)
+ (StatementHandle, StatementText, TextLength);
+}
+
+/*************************************************************************
+ * SQLGetCursorNameW [ODBC32.117]
+ */
+SQLRETURN WINAPI SQLGetCursorNameW(SQLHSTMT StatementHandle,
+ WCHAR *CursorName, SQLSMALLINT BufferLength,
+ SQLSMALLINT *NameLength)
+{
+ TRACE("\n");
+
+ CHECK_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLGETCURSORNAME].funcW);
+ return (gProxyHandle.functions[SQLAPI_INDEX_SQLGETCURSORNAME].funcW)
+ (StatementHandle, CursorName, BufferLength, NameLength);
+}
+
+/*************************************************************************
+ * SQLPrepareW [ODBC32.119]
+ */
+SQLRETURN WINAPI SQLPrepareW(SQLHSTMT StatementHandle,
+ WCHAR *StatementText, SQLINTEGER TextLength)
+{
+ TRACE("\n");
+
+ CHECK_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLPREPARE].funcW);
+ return (gProxyHandle.functions[SQLAPI_INDEX_SQLPREPARE].funcW)
+ (StatementHandle, StatementText, TextLength);
+}
+
+/*************************************************************************
+ * SQLSetCursorNameW [ODBC32.121]
+ */
+SQLRETURN WINAPI SQLSetCursorNameW(SQLHSTMT StatementHandle, WCHAR *CursorName, SQLSMALLINT NameLength)
+{
+ TRACE("\n");
+
+ CHECK_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLSETCURSORNAME].funcW);
+ return (gProxyHandle.functions[SQLAPI_INDEX_SQLSETCURSORNAME].funcW)
+ (StatementHandle, CursorName, NameLength);
+}
+
+/*************************************************************************
+ * SQLColAttributeW [ODBC32.127]
+ */
+SQLRETURN WINAPI SQLColAttributeW (SQLHSTMT StatementHandle,
+ SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier,
+ SQLPOINTER CharacterAttribute, SQLSMALLINT BufferLength,
+ SQLSMALLINT *StringLength, SQLPOINTER NumericAttribute)
+{
+ SQLRETURN iResult;
+
+ TRACE("StatementHandle=0x%08lx ColumnNumber=%d FieldIdentifier=%d CharacterAttribute=%p BufferLength=%d StringLength=%p NumericAttribute=%p\n",
+ StatementHandle, ColumnNumber, FieldIdentifier,
+ CharacterAttribute, BufferLength, StringLength, NumericAttribute);
+
+ CHECK_READY_AND_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLCOLATTRIBUTE].funcW);
+ iResult = (gProxyHandle.functions[SQLAPI_INDEX_SQLCOLATTRIBUTE].funcW)
+ (StatementHandle, ColumnNumber, FieldIdentifier,
+ CharacterAttribute, BufferLength, StringLength, NumericAttribute);
+ if (iResult == SQL_SUCCESS && CharacterAttribute != NULL && SQLColAttributes_KnownStringAttribute(FieldIdentifier)) {
+ /*
+ TRACE("Dumping values fetched via SQLColAttributeW:\n");
+ TRACE(" Attribute name : %s\n", debugstr_w(rgbDesc));
+ TRACE(" Declared length: %d\n", *pcbDesc);
+ */
+ if (*StringLength != lstrlenW(CharacterAttribute) * 2) {
+ TRACE("CHEAT: resetting name length for ADO\n");
+ *StringLength = lstrlenW(CharacterAttribute) * 2;
+ }
+ }
+ return iResult;
+}
+
+/*************************************************************************
+ * SQLGetConnectAttrW [ODBC32.132]
+ */
+SQLRETURN WINAPI SQLGetConnectAttrW(SQLHDBC ConnectionHandle,
+ SQLINTEGER Attribute, SQLPOINTER Value,
+ SQLINTEGER BufferLength, SQLINTEGER *StringLength)
+{
+ TRACE("\n");
+
+ CHECK_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLGETCONNECTATTR].funcW);
+ return (gProxyHandle.functions[SQLAPI_INDEX_SQLGETCONNECTATTR].funcW)
+ (ConnectionHandle, Attribute, Value,
+ BufferLength, StringLength);
+}
+
+/*************************************************************************
+ * SQLGetDescFieldW [ODBC32.133]
+ */
+SQLRETURN WINAPI SQLGetDescFieldW(SQLHDESC DescriptorHandle,
+ SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier,
+ SQLPOINTER Value, SQLINTEGER BufferLength,
+ SQLINTEGER *StringLength)
+{
+ TRACE("\n");
+
+ CHECK_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLGETDESCFIELD].funcW);
+ return (gProxyHandle.functions[SQLAPI_INDEX_SQLGETDESCFIELD].funcW)
+ (DescriptorHandle, RecNumber, FieldIdentifier,
+ Value, BufferLength, StringLength);
+}
+
+/*************************************************************************
+ * SQLGetDescRecW [ODBC32.134]
+ */
+SQLRETURN WINAPI SQLGetDescRecW(SQLHDESC DescriptorHandle,
+ SQLSMALLINT RecNumber, SQLWCHAR *Name,
+ SQLSMALLINT BufferLength, SQLSMALLINT *StringLength,
+ SQLSMALLINT *Type, SQLSMALLINT *SubType,
+ SQLLEN *Length, SQLSMALLINT *Precision,
+ SQLSMALLINT *Scale, SQLSMALLINT *Nullable)
+{
+ TRACE("\n");
+
+ CHECK_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLGETDESCREC].funcW);
+ return (gProxyHandle.functions[SQLAPI_INDEX_SQLGETDESCREC].funcW)
+ (DescriptorHandle, RecNumber, Name, BufferLength,
+ StringLength, Type, SubType, Length, Precision, Scale, Nullable);
+}
+
+/*************************************************************************
+ * SQLGetDiagFieldW [ODBC32.135]
+ */
+SQLRETURN WINAPI SQLGetDiagFieldW(SQLSMALLINT HandleType, SQLHANDLE Handle,
+ SQLSMALLINT RecNumber, SQLSMALLINT DiagIdentifier,
+ SQLPOINTER DiagInfo, SQLSMALLINT BufferLength,
+ SQLSMALLINT *StringLength)
+{
+ TRACE("\n");
+
+ CHECK_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLGETDIAGFIELD].funcW);
+ return (gProxyHandle.functions[SQLAPI_INDEX_SQLGETDIAGFIELD].funcW)
+ (HandleType, Handle, RecNumber, DiagIdentifier,
+ DiagInfo, BufferLength, StringLength);
+}
+
+/*************************************************************************
+ * SQLGetDiagRecW [ODBC32.136]
+ */
+SQLRETURN WINAPI SQLGetDiagRecW(SQLSMALLINT HandleType, SQLHANDLE Handle,
+ SQLSMALLINT RecNumber, WCHAR *Sqlstate,
+ SQLINTEGER *NativeError, WCHAR *MessageText,
+ SQLSMALLINT BufferLength, SQLSMALLINT *TextLength)
+{
+ TRACE("\n");
+
+ CHECK_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLGETDIAGREC].funcW);
+ return (gProxyHandle.functions[SQLAPI_INDEX_SQLGETDIAGREC].funcW)
+ (HandleType, Handle, RecNumber, Sqlstate, NativeError,
+ MessageText, BufferLength, TextLength);
+}
+
+/*************************************************************************
+ * SQLGetStmtAttrW [ODBC32.138]
+ */
+SQLRETURN WINAPI SQLGetStmtAttrW(SQLHSTMT StatementHandle,
+ SQLINTEGER Attribute, SQLPOINTER Value,
+ SQLINTEGER BufferLength, SQLINTEGER *StringLength)
+{
+ SQLRETURN iResult;
+
+ TRACE("Attribute = (%02ld) Value = %p BufferLength = (%ld) StringLength = %p\n",
+ Attribute, Value, BufferLength, StringLength);
+
+ if (Value == NULL) {
+ WARN("Unexpected NULL in Value return address\n");
+ iResult = SQL_ERROR;
+/*
+ } else if (StringLength == NULL) {
+ WARN("Unexpected NULL in StringLength return address\n");
+ iResult = SQL_ERROR;
+*/
+ } else {
+ CHECK_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLGETSTMTATTR].funcW);
+ iResult = (gProxyHandle.functions[SQLAPI_INDEX_SQLGETSTMTATTR].funcW)
+ (StatementHandle, Attribute, Value, BufferLength, StringLength);
+ TRACE("returning %d...\n", iResult);
+ }
+ return iResult;
+}
+
+/*************************************************************************
+ * SQLSetConnectAttrW [ODBC32.139]
+ */
+SQLRETURN WINAPI SQLSetConnectAttrW(SQLHDBC ConnectionHandle, SQLINTEGER Attribute,
+ SQLPOINTER Value, SQLINTEGER StringLength)
+{
+ TRACE("\n");
+
+ CHECK_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLSETCONNECTATTR].funcW);
+ return (gProxyHandle.functions[SQLAPI_INDEX_SQLSETCONNECTATTR].funcW)
+ (ConnectionHandle, Attribute, Value, StringLength);
+}
+
+/*************************************************************************
+ * SQLColumnsW [ODBC32.140]
+ */
+SQLRETURN WINAPI SQLColumnsW(SQLHSTMT StatementHandle,
+ WCHAR *CatalogName, SQLSMALLINT NameLength1,
+ WCHAR *SchemaName, SQLSMALLINT NameLength2,
+ WCHAR *TableName, SQLSMALLINT NameLength3,
+ WCHAR *ColumnName, SQLSMALLINT NameLength4)
+{
+ TRACE("\n");
+
+ CHECK_READY_AND_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLCOLUMNS].funcW);
+ return (gProxyHandle.functions[SQLAPI_INDEX_SQLCOLUMNS].funcW)
+ (StatementHandle, CatalogName, NameLength1,
+ SchemaName, NameLength2, TableName, NameLength3, ColumnName, NameLength4);
+}
+
+/*************************************************************************
+ * SQLDriverConnectW [ODBC32.141]
+ */
+SQLRETURN WINAPI SQLDriverConnectW(
+ SQLHDBC hdbc,
+ SQLHWND hwnd,
+ WCHAR *conn_str_in,
+ SQLSMALLINT len_conn_str_in,
+ WCHAR *conn_str_out,
+ SQLSMALLINT conn_str_out_max,
+ SQLSMALLINT *ptr_conn_str_out,
+ SQLUSMALLINT driver_completion )
+{
+ TRACE("ConnStrIn (%d bytes) --> %s\n", len_conn_str_in, debugstr_w(conn_str_in));
+
+ CHECK_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLDRIVERCONNECT].funcW);
+ return (gProxyHandle.functions[SQLAPI_INDEX_SQLDRIVERCONNECT].funcW)
+ (hdbc, hwnd, conn_str_in, len_conn_str_in, conn_str_out,
+ conn_str_out_max, ptr_conn_str_out, driver_completion);
+}
+
+/*************************************************************************
+ * SQLGetConnectOptionW [ODBC32.142]
+ */
+SQLRETURN WINAPI SQLGetConnectOptionW(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLPOINTER Value)
+{
+ TRACE("\n");
+
+ CHECK_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLGETCONNECTOPTION].funcW);
+ return (gProxyHandle.functions[SQLAPI_INDEX_SQLGETCONNECTOPTION].funcW)
+ (ConnectionHandle, Option, Value);
+}
+
+/*************************************************************************
+ * SQLGetInfoW [ODBC32.145]
+ */
+SQLRETURN WINAPI SQLGetInfoW(SQLHDBC ConnectionHandle,
+ SQLUSMALLINT InfoType, SQLPOINTER InfoValue,
+ SQLSMALLINT BufferLength, SQLSMALLINT *StringLength)
+{
+ SQLRETURN iResult;
+
+ TRACE("InfoType = (%02u), InfoValue = %p, BufferLength = %d bytes\n", InfoType, InfoValue, BufferLength);
+ if (InfoValue == NULL) {
+ WARN("Unexpected NULL in InfoValue address\n");
+ iResult = SQL_ERROR;
+ } else {
+ CHECK_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLGETINFO].funcW);
+ iResult = (gProxyHandle.functions[SQLAPI_INDEX_SQLGETINFO].funcW)
+ (ConnectionHandle, InfoType, InfoValue, BufferLength, StringLength);
+ TRACE("returning %d...\n", iResult);
+ }
+ return iResult;
+}
+
+/*************************************************************************
+ * SQLGetTypeInfoW [ODBC32.147]
+ */
+SQLRETURN WINAPI SQLGetTypeInfoW(SQLHSTMT StatementHandle, SQLSMALLINT DataType)
+{
+ TRACE("\n");
+
+ CHECK_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLGETTYPEINFO].funcW);
+ return (gProxyHandle.functions[SQLAPI_INDEX_SQLGETTYPEINFO].funcW)
+ (StatementHandle, DataType);
+}
+
+/*************************************************************************
+ * SQLSetConnectOptionW [ODBC32.150]
+ */
+SQLRETURN WINAPI SQLSetConnectOptionW(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLULEN Value)
+{
+ TRACE("\n");
+
+ CHECK_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLSETCONNECTOPTION].funcW);
+ return (gProxyHandle.functions[SQLAPI_INDEX_SQLSETCONNECTOPTION].funcW)
+ (ConnectionHandle, Option, Value);
+}
+
+/*************************************************************************
+ * SQLSpecialColumnsW [ODBC32.152]
+ */
+SQLRETURN WINAPI SQLSpecialColumnsW(SQLHSTMT StatementHandle,
+ SQLUSMALLINT IdentifierType, SQLWCHAR *CatalogName,
+ SQLSMALLINT NameLength1, SQLWCHAR *SchemaName,
+ SQLSMALLINT NameLength2, SQLWCHAR *TableName,
+ SQLSMALLINT NameLength3, SQLUSMALLINT Scope,
+ SQLUSMALLINT Nullable)
+{
+
+ CHECK_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLSPECIALCOLUMNS].funcW);
+ return (gProxyHandle.functions[SQLAPI_INDEX_SQLSPECIALCOLUMNS].funcW)
+ (StatementHandle, IdentifierType, CatalogName, NameLength1, SchemaName,
+ NameLength2, TableName, NameLength3, Scope, Nullable);
+}
+
+/*************************************************************************
+ * SQLStatisticsW [ODBC32.153]
+ */
+SQLRETURN WINAPI SQLStatisticsW(SQLHSTMT StatementHandle,
+ SQLWCHAR *CatalogName, SQLSMALLINT NameLength1,
+ SQLWCHAR *SchemaName, SQLSMALLINT NameLength2,
+ SQLWCHAR *TableName, SQLSMALLINT NameLength3,
+ SQLUSMALLINT Unique, SQLUSMALLINT Reserved)
+{
+ TRACE("\n");
+
+ CHECK_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLSTATISTICS].funcW);
+ return (gProxyHandle.functions[SQLAPI_INDEX_SQLSTATISTICS].funcW)
+ (StatementHandle, CatalogName, NameLength1, SchemaName, NameLength2,
+ TableName, NameLength3, Unique, Reserved);
+}
+
+/*************************************************************************
+ * SQLTablesW [ODBC32.154]
+ */
+SQLRETURN WINAPI SQLTablesW(SQLHSTMT StatementHandle,
+ SQLWCHAR *CatalogName, SQLSMALLINT NameLength1,
+ SQLWCHAR *SchemaName, SQLSMALLINT NameLength2,
+ SQLWCHAR *TableName, SQLSMALLINT NameLength3,
+ SQLWCHAR *TableType, SQLSMALLINT NameLength4)
+{
+ TRACE("\n");
+
+ CHECK_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLTABLES].funcW);
+ return (gProxyHandle.functions[SQLAPI_INDEX_SQLTABLES].funcW)
+ (StatementHandle, CatalogName, NameLength1,
+ SchemaName, NameLength2, TableName, NameLength3, TableType, NameLength4);
+}
+
+/*************************************************************************
+ * SQLBrowseConnectW [ODBC32.155]
+ */
+SQLRETURN WINAPI SQLBrowseConnectW(
+ SQLHDBC hdbc,
+ SQLWCHAR *szConnStrIn,
+ SQLSMALLINT cbConnStrIn,
+ SQLWCHAR *szConnStrOut,
+ SQLSMALLINT cbConnStrOutMax,
+ SQLSMALLINT *pcbConnStrOut)
+{
+ TRACE("\n");
+
+ CHECK_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLBROWSECONNECT].funcW);
+ return (gProxyHandle.functions[SQLAPI_INDEX_SQLBROWSECONNECT].funcW)
+ (hdbc, szConnStrIn, cbConnStrIn, szConnStrOut, cbConnStrOutMax, pcbConnStrOut);
+}
+
+/*************************************************************************
+ * SQLColumnPrivilegesW [ODBC32.156]
+ */
+SQLRETURN WINAPI SQLColumnPrivilegesW(
+ SQLHSTMT hstmt,
+ SQLWCHAR *szCatalogName,
+ SQLSMALLINT cbCatalogName,
+ SQLWCHAR *szSchemaName,
+ SQLSMALLINT cbSchemaName,
+ SQLWCHAR *szTableName,
+ SQLSMALLINT cbTableName,
+ SQLWCHAR *szColumnName,
+ SQLSMALLINT cbColumnName)
+{
+ TRACE("\n");
+
+ CHECK_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLCOLUMNPRIVILEGES].funcW);
+ return (gProxyHandle.functions[SQLAPI_INDEX_SQLCOLUMNPRIVILEGES].funcW)
+ (hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName,
+ szTableName, cbTableName, szColumnName, cbColumnName);
+}
+
+/*************************************************************************
+ * SQLDataSourcesW [ODBC32.157]
+ */
+SQLRETURN WINAPI SQLDataSourcesW(SQLHENV EnvironmentHandle,
+ SQLUSMALLINT Direction, WCHAR *ServerName,
+ SQLSMALLINT BufferLength1, SQLSMALLINT *NameLength1,
+ WCHAR *Description, SQLSMALLINT BufferLength2,
+ SQLSMALLINT *NameLength2)
+{
+ SQLRETURN ret;
+
+ TRACE("EnvironmentHandle = %p\n", (LPVOID)EnvironmentHandle);
+
+ if (!gProxyHandle.bFunctionReady || gProxyHandle.dmHandle == NULL)
+ {
+ ERR("Error: empty dm handle (gProxyHandle.dmHandle == NULL)\n");
+ return SQL_ERROR;
+ }
+
+ assert(gProxyHandle.functions[SQLAPI_INDEX_SQLDATASOURCES].funcW);
+ ret = (gProxyHandle.functions[SQLAPI_INDEX_SQLDATASOURCES].funcW)
+ (EnvironmentHandle, Direction, ServerName,
+ BufferLength1, NameLength1, Description, BufferLength2, NameLength2);
+
+ if (TRACE_ON(odbc))
+ {
+ TRACE("returns: %d \t", ret);
+ if (*NameLength1 > 0)
+ TRACE("DataSource = %s,", debugstr_w(ServerName));
+ if (*NameLength2 > 0)
+ TRACE(" Description = %s", debugstr_w(Description));
+ TRACE("\n");
+ }
+
+ return ret;
+}
+
+/*************************************************************************
+ * SQLForeignKeysW [ODBC32.160]
+ */
+SQLRETURN WINAPI SQLForeignKeysW(
+ SQLHSTMT hstmt,
+ SQLWCHAR *szPkCatalogName,
+ SQLSMALLINT cbPkCatalogName,
+ SQLWCHAR *szPkSchemaName,
+ SQLSMALLINT cbPkSchemaName,
+ SQLWCHAR *szPkTableName,
+ SQLSMALLINT cbPkTableName,
+ SQLWCHAR *szFkCatalogName,
+ SQLSMALLINT cbFkCatalogName,
+ SQLWCHAR *szFkSchemaName,
+ SQLSMALLINT cbFkSchemaName,
+ SQLWCHAR *szFkTableName,
+ SQLSMALLINT cbFkTableName)
+{
+ TRACE("\n");
+
+ CHECK_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLFOREIGNKEYS].funcW);
+ return (gProxyHandle.functions[SQLAPI_INDEX_SQLFOREIGNKEYS].funcW)
+ (hstmt, szPkCatalogName, cbPkCatalogName, szPkSchemaName, cbPkSchemaName,
+ szPkTableName, cbPkTableName, szFkCatalogName, cbFkCatalogName, szFkSchemaName,
+ cbFkSchemaName, szFkTableName, cbFkTableName);
+}
+
+/*************************************************************************
+ * SQLNativeSqlW [ODBC32.162]
+ */
+SQLRETURN WINAPI SQLNativeSqlW(
+ SQLHDBC hdbc,
+ SQLWCHAR *szSqlStrIn,
+ SQLINTEGER cbSqlStrIn,
+ SQLWCHAR *szSqlStr,
+ SQLINTEGER cbSqlStrMax,
+ SQLINTEGER *pcbSqlStr)
+{
+ TRACE("\n");
+
+ CHECK_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLNATIVESQL].funcW);
+ return (gProxyHandle.functions[SQLAPI_INDEX_SQLNATIVESQL].funcW)
+ (hdbc, szSqlStrIn, cbSqlStrIn, szSqlStr, cbSqlStrMax, pcbSqlStr);
+}
+
+/*************************************************************************
+ * SQLPrimaryKeysW [ODBC32.165]
+ */
+SQLRETURN WINAPI SQLPrimaryKeysW(
+ SQLHSTMT hstmt,
+ SQLWCHAR *szCatalogName,
+ SQLSMALLINT cbCatalogName,
+ SQLWCHAR *szSchemaName,
+ SQLSMALLINT cbSchemaName,
+ SQLWCHAR *szTableName,
+ SQLSMALLINT cbTableName)
+{
+ TRACE("\n");
+
+ CHECK_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLPRIMARYKEYS].funcW);
+ return (gProxyHandle.functions[SQLAPI_INDEX_SQLPRIMARYKEYS].funcW)
+ (hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName,
+ szTableName, cbTableName);
+}
+
+/*************************************************************************
+ * SQLProcedureColumnsW [ODBC32.166]
+ */
+SQLRETURN WINAPI SQLProcedureColumnsW(
+ SQLHSTMT hstmt,
+ SQLWCHAR *szCatalogName,
+ SQLSMALLINT cbCatalogName,
+ SQLWCHAR *szSchemaName,
+ SQLSMALLINT cbSchemaName,
+ SQLWCHAR *szProcName,
+ SQLSMALLINT cbProcName,
+ SQLWCHAR *szColumnName,
+ SQLSMALLINT cbColumnName)
+{
+ TRACE("\n");
+
+ CHECK_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLPROCEDURECOLUMNS].funcW);
+ return (gProxyHandle.functions[SQLAPI_INDEX_SQLPROCEDURECOLUMNS].funcW)
+ (hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName,
+ szProcName, cbProcName, szColumnName, cbColumnName);
+}
+
+/*************************************************************************
+ * SQLProceduresW [ODBC32.167]
+ */
+SQLRETURN WINAPI SQLProceduresW(
+ SQLHSTMT hstmt,
+ SQLWCHAR *szCatalogName,
+ SQLSMALLINT cbCatalogName,
+ SQLWCHAR *szSchemaName,
+ SQLSMALLINT cbSchemaName,
+ SQLWCHAR *szProcName,
+ SQLSMALLINT cbProcName)
+{
+ TRACE("\n");
+
+ CHECK_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLPROCEDURES].funcW);
+ return (gProxyHandle.functions[SQLAPI_INDEX_SQLPROCEDURES].funcW)
+ (hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName,
+ szProcName, cbProcName);
+}
+
+/*************************************************************************
+ * SQLTablePrivilegesW [ODBC32.170]
+ */
+SQLRETURN WINAPI SQLTablePrivilegesW(
+ SQLHSTMT hstmt,
+ SQLWCHAR *szCatalogName,
+ SQLSMALLINT cbCatalogName,
+ SQLWCHAR *szSchemaName,
+ SQLSMALLINT cbSchemaName,
+ SQLWCHAR *szTableName,
+ SQLSMALLINT cbTableName)
+{
+ TRACE("\n");
+
+ CHECK_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLTABLEPRIVILEGES].funcW);
+ return (gProxyHandle.functions[SQLAPI_INDEX_SQLTABLEPRIVILEGES].funcW)
+ (hstmt, szCatalogName, cbCatalogName, szSchemaName, cbSchemaName,
+ szTableName, cbTableName);
+}
+
+/*************************************************************************
+ * SQLDriversW [ODBC32.171]
+ */
+SQLRETURN WINAPI SQLDriversW(
+ SQLHENV henv,
+ SQLUSMALLINT fDirection,
+ SQLWCHAR *szDriverDesc,
+ SQLSMALLINT cbDriverDescMax,
+ SQLSMALLINT *pcbDriverDesc,
+ SQLWCHAR *szDriverAttributes,
+ SQLSMALLINT cbDriverAttrMax,
+ SQLSMALLINT *pcbDriverAttr)
+{
+ TRACE("\n");
+
+ CHECK_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLDRIVERS].funcW);
+ return (gProxyHandle.functions[SQLAPI_INDEX_SQLDRIVERS].funcW)
+ (henv, fDirection, szDriverDesc, cbDriverDescMax, pcbDriverDesc,
+ szDriverAttributes, cbDriverAttrMax, pcbDriverAttr);
+}
+
+/*************************************************************************
+ * SQLSetDescFieldW [ODBC32.173]
+ */
+SQLRETURN WINAPI SQLSetDescFieldW(SQLHDESC DescriptorHandle,
+ SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier,
+ SQLPOINTER Value, SQLINTEGER BufferLength)
+{
+ TRACE("\n");
+
+ CHECK_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLSETDESCFIELD].funcW);
+ return (gProxyHandle.functions[SQLAPI_INDEX_SQLSETDESCFIELD].funcW)
+ (DescriptorHandle, RecNumber, FieldIdentifier, Value, BufferLength);
+}
+
+/*************************************************************************
+ * SQLSetStmtAttrW [ODBC32.176]
+ */
+SQLRETURN WINAPI SQLSetStmtAttrW(SQLHSTMT StatementHandle,
+ SQLINTEGER Attribute, SQLPOINTER Value,
+ SQLINTEGER StringLength)
+{
+ SQLRETURN iResult;
+ TRACE("Attribute = (%02ld) Value = %p StringLength = (%ld)\n",
+ Attribute, Value, StringLength);
+
+ CHECK_dmHandle();
+
+ assert (gProxyHandle.functions[SQLAPI_INDEX_SQLSETSTMTATTR].funcW);
+ iResult = (gProxyHandle.functions[SQLAPI_INDEX_SQLSETSTMTATTR].funcW)
+ (StatementHandle, Attribute, Value, StringLength);
+ if (iResult == SQL_ERROR && (Attribute == SQL_ROWSET_SIZE || Attribute == SQL_ATTR_ROW_ARRAY_SIZE)) {
+ TRACE("CHEAT: returning SQL_SUCCESS to ADO...\n");
+ iResult = SQL_SUCCESS;
+ } else {
+ TRACE("returning %d...\n", iResult);
+ }
+ return iResult;
+}
+
+
/* End of file */
const char *name;
void *d_func;
SQLRETURN (*func)();
+ SQLRETURN (*funcW)();
} DM_FUNC;
typedef struct proxyhandle
int nErrorType;
DM_FUNC functions[NUM_SQLFUNC]; /* entry point for driver manager functions */
char driverLibName[200]; /* ODBC driver SO name */
- char dmLibName[200]; /* driver manager library name */
char ServerName[200]; /* keep server name */
char UserName[50]; /* keep username */
} PROXYHANDLE;
<file>dcom.idl</file>
<file>irot.idl</file>
<include base="ole32" root="intermediate">.</include>
- <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
- <compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
</module>
<module name="ole32_irot_server" type="rpcserver">
<file>irot.idl</file>
@ stdcall WriteClassStm(ptr ptr)
@ stdcall WriteFmtUserTypeStg(ptr long ptr)
@ stub WriteOleStg
-@ stub WriteStringStream
+@ stub WriteStringStream
\ No newline at end of file
<library>epsapi</library>
<library>pseh</library>
<library>ntdll</library>
- <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269
<pch>precomp.h</pch>
- -->
+
<file>malloc.c</file>
<file>psapi.c</file>
<file>psapi.rc</file>
- <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
- <compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
</module>
<library>rpcrt4</library>
<library>pseh</library>
<file>version.rc</file> <!-- we need at least one file in the module -->
- <compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
</module>
<module name="qmgrprxy_interface" type="idlinterface">
<file>qmgrprxy.idl</file>
{
RpcConnection common;
int sock;
- int cancel_fds[2];
+ SOCKET cancel_fds[2];
} RpcConnection_tcp;
static RpcConnection *rpcrt4_conn_tcp_alloc(void)
for (ai_cur = ai; ai_cur; ai_cur = ai_cur->ai_next)
{
- int val;
+ char val;
if (TRACE_ON(rpc))
{
static void rpcrt4_conn_tcp_cancel_call(RpcConnection *Connection)
{
RpcConnection_tcp *tcpc = (RpcConnection_tcp *) Connection;
- char dummy = 1;
+ SOCKET dummy = 1;
TRACE("%p\n", Connection);
RpcServerProtseq_sock *ps = HeapAlloc(GetProcessHeap(), 0, sizeof(*ps));
if (ps)
{
- int fds[2];
+ SOCKET fds[2];
if (!socketpair(PF_UNIX, SOCK_DGRAM, 0, fds))
{
fcntl(fds[0], F_SETFL, O_NONBLOCK);
<file>rpcrt4.rc</file>
<file>epm.idl</file>
<include base="rpcrt4" root="intermediate">.</include>
- <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
- <compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
</module>
<module name="rpcrt4_epm_client" type="rpcclient">
<file>epm.idl</file>
0,
Reply->d.LogonUserReply.ProfileBufferLength);
memcpy(*ProfileBuffer,
- (PVOID)((ULONG)Reply->d.LogonUserReply.Data +
- (ULONG)Reply->d.LogonUserReply.ProfileBuffer),
+ (PVOID)((ULONG_PTR)Reply->d.LogonUserReply.Data +
+ (ULONG_PTR)Reply->d.LogonUserReply.ProfileBuffer),
Reply->d.LogonUserReply.ProfileBufferLength);
*LogonId = Reply->d.LogonUserReply.LogonId;
*Token = Reply->d.LogonUserReply.Token;
if (!*buffer) *result = 0;
else
{
- res = strtol( buffer, &end, 0 );
+ res = strtol( buffer, &end, 0 );
if (end != buffer && !*end) *result = res;
else
- {
+ {
SetLastError( ERROR_INVALID_DATA );
ret = FALSE;
- }
+ }
}
done:
<file>stubs.c</file>
<file>rpc.c</file>
<file>setupapi.rc</file>
- <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
- <compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
</module>
static const WCHAR lbName[] = {'L','i','s','t','B','o','x',0};
TRACE("(%p)->(0x%08lx, %p, %s, %s)\n",
- This, (long)hwndEdit, punkACL, debugstr_w(pwzsRegKeyPath), debugstr_w(pwszQuickComplete));
+ This, hwndEdit, punkACL, debugstr_w(pwzsRegKeyPath), debugstr_w(pwszQuickComplete));
if (This->options & ACO_AUTOSUGGEST) TRACE(" ACO_AUTOSUGGEST\n");
if (This->options & ACO_AUTOAPPEND) TRACE(" ACO_AUTOAPPEND\n");
{
0, 0, &SHELL32_ChangenotifyCS,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
- 0, 0, { (DWORD_PTR)(__FILE__ ": SHELL32_ChangenotifyCS") }
+ 0, 0, { (DWORD_PTR)0/*(__FILE__ ": SHELL32_ChangenotifyCS")*/ }
};
static CRITICAL_SECTION SHELL32_ChangenotifyCS = { &critsect_debug, -1, 0, 0, 0, 0 };
LeaveCriticalSection(&SHELL32_ChangenotifyCS);
- return (ULONG)item;
+ return PtrToUlong(item);
}
/*************************************************************************
EnterCriticalSection(&SHELL32_ChangenotifyCS);
- node = FindNode((HANDLE)hNotify);
+ node = FindNode((HANDLE)UlongToPtr(hNotify));
if( node )
DeleteNode(node);
{
case WM_INITDIALOG:
pIconContext = (PPICK_ICON_CONTEXT)lParam;
- SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG)pIconContext);
+ SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pIconContext);
pIconContext->hDlgCtrl = GetDlgItem(hwndDlg, IDC_PICKICON_LIST);
EnumResourceNamesW(pIconContext->hLibrary, RT_ICON, EnumPickIconResourceProc, (LPARAM)pIconContext);
if (PathUnExpandEnvStringsW(pIconContext->szName, szText, MAX_PATH))
}
-BOOL
+INT_PTR
CALLBACK
FormatDriveDlg(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
<group>
-<module name="shell32" type="win32dll" baseaddress="${BASEADDRESS_SHELL32}" installbase="system32" installname="shell32.dll" crt="msvcrt">
+<module name="shell32" type="win32dll" baseaddress="${BASEADDRESS_SHELL32}" installbase="system32" installname="shell32.dll" crt="msvcrt" allowwarnings="true">
<autoregister infsection="OleControlDlls" type="Both" />
<importlibrary definition="shell32.spec" />
<include base="shell32">.</include>
psfi->dwAttributes = 0xffffffff;
}
if (psfParent)
- IShellFolder_GetAttributesOf( psfParent, 1, (LPCITEMIDLIST*)&pidlLast,
+ IShellFolder_GetAttributesOf( psfParent, 1, (LPCITEMIDLIST*)&pidlLast,
&(psfi->dwAttributes) );
}
if (ret != 0 && ret != 0xFFFFFFFF)
{
IconNotYetLoaded=FALSE;
- psfi->iIcon = icon_idx;
- }
+ psfi->iIcon = icon_idx;
}
}
}
}
+ }
else
{
if (!(PidlToSicIndex(psfParent, pidlLast, !(flags & SHGFI_SMALLICON),
* RETURNS
* Success: TRUE
* Failure: FALSE
- */
+ */
BOOL WINAPI IsUserAnAdmin(VOID)
{
SID_IDENTIFIER_AUTHORITY Authority = {SECURITY_NT_AUTHORITY};
}
-static BOOL CALLBACK
+static INT_PTR CALLBACK
StatusMessageWindowProc(
IN HWND hwndDlg,
IN UINT uMsg,
<file>logfile.c</file>
<file>wizard.c</file>
<file>syssetup.rc</file>
- <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
- <compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
</module>
extern WDML_CONV* WDML_FindConv(WDML_INSTANCE* pInstance, WDML_SIDE side,
HSZ hszService, HSZ hszTopic);
extern BOOL WDML_PostAck(WDML_CONV* pConv, WDML_SIDE side, WORD appRetCode,
- BOOL fBusy, BOOL fAck, UINT pmt, LPARAM lParam, UINT oldMsg);
+ BOOL fBusy, BOOL fAck, UINT_PTR pmt, LPARAM lParam, UINT oldMsg);
extern void WDML_AddLink(WDML_INSTANCE* pInstance, HCONV hConv, WDML_SIDE side,
UINT wType, HSZ hszItem, UINT wFmt);
extern WDML_LINK* WDML_FindLink(WDML_INSTANCE* pInstance, HCONV hConv, WDML_SIDE side,
}
EXTINLINE DWORD WINAPI
-DragObject(HWND hwnd1, HWND hwnd2, UINT u1, DWORD dw1, HCURSOR hc1)
+DragObject(HWND hwnd1, HWND hwnd2, UINT u1, ULONG_PTR dw1, HCURSOR hc1)
{
return NtUserDragObject(hwnd1, hwnd2, u1, dw1, hc1);
}
return NtUserKillTimer(hWnd, IDEvent);
}
-EXTINLINE UINT_PTR WINAPI
+EXTINLINE UINT WINAPI // FIXME: wine compatibility definition, should be UINT_PTR
SetSystemTimer(HWND hWnd, UINT_PTR IDEvent, UINT Period, TIMERPROC TimerFunc)
{
return NtUserSetSystemTimer(hWnd, IDEvent, Period, TimerFunc);
/* NOTE: This is slow as it requires a call to win32k. This should only be
neccessary if a thread wants to access an object on a different
desktop */
- return NtUserGetDesktopMapping(Ptr);
+ return (PVOID)NtUserGetDesktopMapping(Ptr);
}
}
(BOOL)NtUserCallNoParam(NOPARAM_ROUTINE_ANYPOPUP)
#define NtUserValidateRgn(hWnd, hRgn) \
- (BOOL)NtUserCallTwoParam((DWORD)hWnd, (DWORD)hRgn, TWOPARAM_ROUTINE_VALIDATERGN)
+ (BOOL)NtUserCallTwoParam((DWORD_PTR)hWnd, (DWORD_PTR)hRgn, TWOPARAM_ROUTINE_VALIDATERGN)
#define NtUserSetWindowContextHelpId(hWnd, dwContextHelpId) \
(BOOL)NtUserCallHwndParam(hWnd, dwContextHelpId, HWNDPARAM_ROUTINE_SETWNDCONTEXTHLPID)
#define NtUserSetCaretPos(X, Y) \
- (BOOL)NtUserCallTwoParam((DWORD)X, (DWORD)Y, TWOPARAM_ROUTINE_SETCARETPOS)
+ (BOOL)NtUserCallTwoParam((DWORD_PTR)X, (DWORD_PTR)Y, TWOPARAM_ROUTINE_SETCARETPOS)
#define NtUserSetGUIThreadHandle(field, hwnd) \
- (BOOL)NtUserCallTwoParam((DWORD)field, (DWORD)hwnd, TWOPARAM_ROUTINE_SETGUITHRDHANDLE)
+ (BOOL)NtUserCallTwoParam((DWORD_PTR)field, (DWORD_PTR)hwnd, TWOPARAM_ROUTINE_SETGUITHRDHANDLE)
#define NtUserSetMenuBarHeight(menu, height) \
- (BOOL)NtUserCallTwoParam((DWORD)menu, (DWORD)height, TWOPARAM_ROUTINE_SETMENUBARHEIGHT)
+ (BOOL)NtUserCallTwoParam((DWORD_PTR)menu, (DWORD_PTR)height, TWOPARAM_ROUTINE_SETMENUBARHEIGHT)
#define NtUserRegisterLogonProcess(hproc, x) \
- (BOOL)NtUserCallTwoParam((DWORD)hproc, (DWORD)x, TWOPARAM_ROUTINE_REGISTERLOGONPROC)
+ (BOOL)NtUserCallTwoParam((DWORD_PTR)hproc, (DWORD_PTR)x, TWOPARAM_ROUTINE_REGISTERLOGONPROC)
#define NtUserGetSysColorBrushes(HBrushes, count) \
- (BOOL)NtUserCallTwoParam((DWORD)(HBrushes), (DWORD)(count), TWOPARAM_ROUTINE_GETSYSCOLORBRUSHES)
+ (BOOL)NtUserCallTwoParam((DWORD_PTR)(HBrushes), (DWORD_PTR)(count), TWOPARAM_ROUTINE_GETSYSCOLORBRUSHES)
#define NtUserGetSysColors(ColorRefs, count) \
- (BOOL)NtUserCallTwoParam((DWORD)(ColorRefs), (DWORD)(count), TWOPARAM_ROUTINE_GETSYSCOLORS)
+ (BOOL)NtUserCallTwoParam((DWORD_PTR)(ColorRefs), (DWORD_PTR)(count), TWOPARAM_ROUTINE_GETSYSCOLORS)
#define NtUserSetCaretBlinkTime(uMSeconds) \
- (BOOL)NtUserCallOneParam((DWORD)uMSeconds, ONEPARAM_ROUTINE_SETCARETBLINKTIME)
+ (BOOL)NtUserCallOneParam((DWORD_PTR)uMSeconds, ONEPARAM_ROUTINE_SETCARETBLINKTIME)
/*
#define NtUserEnumClipboardFormats(format) \
*/
#define NtUserWindowFromDC(hDC) \
- (HWND)NtUserCallOneParam((DWORD)hDC, ONEPARAM_ROUTINE_WINDOWFROMDC)
+ (HWND)NtUserCallOneParam((DWORD_PTR)hDC, ONEPARAM_ROUTINE_WINDOWFROMDC)
#define NtUserSwitchCaretShowing(CaretInfo) \
- (BOOL)NtUserCallOneParam((DWORD)CaretInfo, ONEPARAM_ROUTINE_SWITCHCARETSHOWING)
+ (BOOL)NtUserCallOneParam((DWORD_PTR)CaretInfo, ONEPARAM_ROUTINE_SWITCHCARETSHOWING)
#define NtUserSwapMouseButton(fSwap) \
- (BOOL)NtUserCallOneParam((DWORD)fSwap, ONEPARAM_ROUTINE_SWAPMOUSEBUTTON)
+ (BOOL)NtUserCallOneParam((DWORD_PTR)fSwap, ONEPARAM_ROUTINE_SWAPMOUSEBUTTON)
#define NtUserSetMessageExtraInfo(lParam) \
- (LPARAM)NtUserCallOneParam((DWORD)lParam, ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO)
+ (LPARAM)NtUserCallOneParam((DWORD_PTR)lParam, ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO)
#define NtUserGetWindowContextHelpId(hwnd) \
- NtUserCallOneParam((DWORD)hwnd, ONEPARAM_ROUTINE_GETWNDCONTEXTHLPID)
+ NtUserCallOneParam((DWORD_PTR)hwnd, ONEPARAM_ROUTINE_GETWNDCONTEXTHLPID)
#define NtUserGetCursorPos(lpPoint) \
- (BOOL)NtUserCallOneParam((DWORD)lpPoint, ONEPARAM_ROUTINE_GETCURSORPOSITION)
+ (BOOL)NtUserCallOneParam((DWORD_PTR)lpPoint, ONEPARAM_ROUTINE_GETCURSORPOSITION)
#define NtUserIsWindowInDestroy(hWnd) \
- (BOOL)NtUserCallOneParam((DWORD)hWnd, ONEPARAM_ROUTINE_ISWINDOWINDESTROY)
+ (BOOL)NtUserCallOneParam((DWORD_PTR)hWnd, ONEPARAM_ROUTINE_ISWINDOWINDESTROY)
#define NtUserEnableProcessWindowGhosting(bEnable) \
- NtUserCallOneParam((DWORD)bEnable, ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING)
+ NtUserCallOneParam((DWORD_PTR)bEnable, ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING)
#define NtUserShowCursor(bShow) \
- NtUserCallOneParam((DWORD)bShow, ONEPARAM_ROUTINE_SHOWCURSOR)
+ NtUserCallOneParam((DWORD_PTR)bShow, ONEPARAM_ROUTINE_SHOWCURSOR)
#define NtUserGetDesktopMapping(Ptr) \
- (PVOID)NtUserCallOneParam((DWORD)Ptr, ONEPARAM_ROUTINE_GETDESKTOPMAPPING)
+ (PVOID)NtUserCallOneParam((DWORD_PTR)Ptr, ONEPARAM_ROUTINE_GETDESKTOPMAPPING)
#define ShowCaret(hwnd) \
NtUserShowCaret(hwnd)
BOOL Unicode);
HWND* WIN_ListChildren (HWND hWndparent);
-ULONG_PTR FASTCALL IntGetWndProc(PWND, BOOL);
+WNDPROC FASTCALL IntGetWndProc(PWND, BOOL);
DWORD WINAPI GetRealWindowOwner(HWND);
{
0, 0, &WDML_CritSect,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
- 0, 0, { (DWORD_PTR)(__FILE__ ": WDML_CritSect") }
+ 0, 0, { (DWORD_PTR)0/*(__FILE__ ": WDML_CritSect")*/ }
};
CRITICAL_SECTION WDML_CritSect = { &critsect_debug, -1, 0, 0, 0, 0 };
TRACE("invoking CB[%p] (%x %x %p %p %p %p %lx %lx)\n",
pInstance->callback, uType, uFmt,
hConv, hsz1, hsz2, hdata, dwData1, dwData2);
- ret = pInstance->callback(uType, uFmt, hConv, hsz1, hsz2, hdata, dwData1, dwData2);
+ ret = pInstance->callback(uType, uFmt, hConv, hsz1, hsz2, hdata, dwData1, dwData2);
TRACE("done => %p\n", ret);
return ret;
}
Init(VOID)
{
USERCONNECT UserCon;
+ PVOID *KernelCallbackTable;
/* Set up the kernel callbacks. */
- NtCurrentPeb()->KernelCallbackTable[USER32_CALLBACK_WINDOWPROC] =
+ KernelCallbackTable = NtCurrentPeb()->KernelCallbackTable;
+ KernelCallbackTable[USER32_CALLBACK_WINDOWPROC] =
(PVOID)User32CallWindowProcFromKernel;
- NtCurrentPeb()->KernelCallbackTable[USER32_CALLBACK_SENDASYNCPROC] =
+ KernelCallbackTable[USER32_CALLBACK_SENDASYNCPROC] =
(PVOID)User32CallSendAsyncProcForKernel;
- NtCurrentPeb()->KernelCallbackTable[USER32_CALLBACK_LOADSYSMENUTEMPLATE] =
+ KernelCallbackTable[USER32_CALLBACK_LOADSYSMENUTEMPLATE] =
(PVOID)User32LoadSysMenuTemplateForKernel;
- NtCurrentPeb()->KernelCallbackTable[USER32_CALLBACK_LOADDEFAULTCURSORS] =
+ KernelCallbackTable[USER32_CALLBACK_LOADDEFAULTCURSORS] =
(PVOID)User32SetupDefaultCursors;
- NtCurrentPeb()->KernelCallbackTable[USER32_CALLBACK_HOOKPROC] =
+ KernelCallbackTable[USER32_CALLBACK_HOOKPROC] =
(PVOID)User32CallHookProcFromKernel;
- NtCurrentPeb()->KernelCallbackTable[USER32_CALLBACK_EVENTPROC] =
+ KernelCallbackTable[USER32_CALLBACK_EVENTPROC] =
(PVOID)User32CallEventProcFromKernel;
- NtCurrentPeb()->KernelCallbackTable[USER32_CALLBACK_LOADMENU] =
+ KernelCallbackTable[USER32_CALLBACK_LOADMENU] =
(PVOID)User32CallLoadMenuFromKernel;
- NtCurrentPeb()->KernelCallbackTable[USER32_CALLBACK_CLIENTTHREADSTARTUP] =
+ KernelCallbackTable[USER32_CALLBACK_CLIENTTHREADSTARTUP] =
(PVOID)User32CallClientThreadSetupFromKernel;
NtUserProcessConnect( NtCurrentProcess(),
NTSTATUS Status;
CsrRequest = MAKE_CSR_API(REGISTER_SERVICES_PROCESS, CSR_GUI);
- Request.Data.RegisterServicesProcessRequest.ProcessId = (HANDLE)ServicesProcessId;
+ Request.Data.RegisterServicesProcessRequest.ProcessId = LongToHandle(ServicesProcessId);
Status = CsrClientCallServer(&Request,
NULL,
RegisterLogonProcess(DWORD dwProcessId, BOOL bRegister)
{
return NtUserCallTwoParam(dwProcessId,
- (DWORD)bRegister,
+ (DWORD_PTR)bRegister,
TWOPARAM_ROUTINE_REGISTERLOGONPROC);
}
return TRUE;
else
return (NtUserQueryWindow(Wnd->head.h, QUERY_WINDOW_UNIQUE_PROCESS_ID) ==
- (DWORD)NtCurrentTeb()->ClientId.UniqueProcess );
+ (DWORD_PTR)NtCurrentTeb()->ClientId.UniqueProcess );
}
BOOL
INT Index;
USHORT generation;
- Index = (((UINT)handle & 0xffff) - FIRST_USER_HANDLE) >> 1;
+ Index = (((UINT_PTR)handle & 0xffff) - FIRST_USER_HANDLE) >> 1;
if (Index < 0 || Index >= gHandleTable->nb_handles)
return NULL;
if (!gHandleEntries[Index].type || !gHandleEntries[Index].ptr)
return NULL;
- generation = (UINT)handle >> 16;
+ generation = (UINT_PTR)handle >> 16;
if (generation == gHandleEntries[Index].generation || !generation || generation == 0xffff)
return &gHandleEntries[Index];
return FALSE;
}
- ConfigRet = UnRegNotify((ULONG) Handle );
+ ConfigRet = UnRegNotify( HandleToUlong(Handle) );
if (ConfigRet != CR_SUCCESS)
{
switch (ConfigRet)
WINAPI
UserRealizePalette ( HDC hDC )
{
- return NtUserCallOneParam((DWORD) hDC, ONEPARAM_ROUTINE_REALIZEPALETTE);
+ return NtUserCallOneParam((DWORD_PTR) hDC, ONEPARAM_ROUTINE_REALIZEPALETTE);
}
SysColorBrushes[i] = pBrushes[i];
}
- return (DWORD) pOldCol; /* FIXME: pointer truncation */
+ return PtrToLong(pOldCol); /* FIXME: pointer truncation */
}
if (!pPens && !pBrushes) /* "restore" call */
{
- LPVOID pOldCol = (LPVOID)n; /* FIXME: not 64-bit safe */
+ LPVOID pOldCol = LongToPtr(n); /* FIXME: not 64-bit safe */
LPVOID p = pOldCol;
DWORD nCount = *(DWORD *)p;
p = (char*)p + sizeof(DWORD);
*/
BOOL
WINAPI
-WinHelpA(HWND hWnd, LPCSTR lpszHelp, UINT uCommand, DWORD dwData)
+WinHelpA(HWND hWnd, LPCSTR lpszHelp, UINT uCommand, ULONG_PTR dwData)
{
static WORD WM_WINHELP = 0;
HWND hDest;
*/
BOOL
WINAPI
-WinHelpW(HWND hWnd, LPCWSTR lpszHelp, UINT uCommand, DWORD dwData)
+WinHelpW(HWND hWnd, LPCWSTR lpszHelp, UINT uCommand, ULONG_PTR dwData)
{
INT len;
LPSTR file;
<library>pseh</library>
<library>ntdll</library>
<compilerflag compilerset="gcc">-fms-extensions</compilerflag>
- <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269
<directory name="include">
<pch>user32.h</pch>
</directory>
- -->
<directory name="controls">
<file>button.c</file>
<file>combo.c</file>
<file>winpos.c</file>
</directory>
<file>user32.rc</file>
- <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
- <compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
</module>
//
// Based on IntGetClsWndProc
//
-ULONG_PTR FASTCALL
+WNDPROC FASTCALL
IntGetWndProc(PWND pWnd, BOOL Ansi)
{
INT i;
- ULONG_PTR gcpd, Ret = 0;
+ WNDPROC gcpd, Ret = 0;
PCLS Class = DesktopPtrToUser(pWnd->pcls);
if (!Class) return Ret;
if (GETPFNSERVER(i) == pWnd->lpfnWndProc)
{
if (Ansi)
- Ret = (ULONG_PTR)GETPFNCLIENTA(i);
+ Ret = GETPFNCLIENTA(i);
else
- Ret = (ULONG_PTR)GETPFNCLIENTW(i);
+ Ret = GETPFNCLIENTW(i);
}
}
return Ret;
is treated specially.
*/
if (Class->fnid == FNID_EDIT)
- Ret = (ULONG_PTR)pWnd->lpfnWndProc;
+ Ret = pWnd->lpfnWndProc;
else
{
// Set return proc.
- Ret = (ULONG_PTR)pWnd->lpfnWndProc;
+ Ret = pWnd->lpfnWndProc;
if (Class->fnid <= FNID_GHOST && Class->fnid >= FNID_BUTTON)
{
if (Ansi)
{
if (GETPFNCLIENTW(Class->fnid) == pWnd->lpfnWndProc)
- Ret = (ULONG_PTR)GETPFNCLIENTA(Class->fnid);
+ Ret = GETPFNCLIENTA(Class->fnid);
}
else
{
if (GETPFNCLIENTA(Class->fnid) == pWnd->lpfnWndProc)
- Ret = (ULONG_PTR)GETPFNCLIENTW(Class->fnid);
+ Ret = GETPFNCLIENTW(Class->fnid);
}
}
// Return on the change.
- if ( Ret != (ULONG_PTR)pWnd->lpfnWndProc)
+ if ( Ret != pWnd->lpfnWndProc)
return Ret;
}
if ( Ansi == !!(pWnd->state & WNDS_ANSIWINDOWPROC) )
return Ret;
- gcpd = NtUserGetCPD( UserHMGetHandle(pWnd),
- (Ansi ? UserGetCPDA2U : UserGetCPDU2A )|UserGetCPDWindow,
- Ret);
+ gcpd = (WNDPROC)NtUserGetCPD( UserHMGetHandle(pWnd),
+ (Ansi ? UserGetCPDA2U : UserGetCPDU2A )|UserGetCPDWindow,
+ (ULONG_PTR)&Ret);
return (gcpd ? gcpd : Ret);
}
return Ret;
}
+#ifdef _WIN64
+/*
+ * @unimplemented
+ */
+ULONG_PTR
+WINAPI
+GetClassLongPtrA(HWND hWnd,
+ INT nIndex)
+{
+ UNIMPLEMENTED;
+ return 0;
+}
+
+/*
+ * @unimplemented
+ */
+ULONG_PTR
+WINAPI
+GetClassLongPtrW(HWND hWnd,
+ INT nIndex)
+{
+ UNIMPLEMENTED;
+ return 0;
+}
+#endif
+
/*
* @implemented
}
-/*
- * @implemented
- */
-LONG
-WINAPI
-GetWindowLongA ( HWND hWnd, int nIndex )
+LONG_PTR IntGetWindowLong( HWND hwnd, INT offset, UINT size, BOOL unicode )
{
- PWND Wnd;
+ LONG_PTR retvalue = 0;
+ WND *wndPtr;
- Wnd = ValidateHwnd(hWnd);
- if (Wnd == NULL)
+ if (offset == GWLP_HWNDPARENT)
+ {
+ HWND parent = GetAncestor( hwnd, GA_PARENT );
+ if (parent == GetDesktopWindow()) parent = GetWindow( hwnd, GW_OWNER );
+ return (ULONG_PTR)parent;
+ }
+
+ if (!(wndPtr = ValidateHwnd( hwnd )))
+ {
+ SetLastError( ERROR_INVALID_WINDOW_HANDLE );
return 0;
+ }
- if (nIndex >= 0)
+ if (offset >= 0)
{
- if ((DWORD)nIndex + sizeof(LONG) > Wnd->cbwndExtra)
+ if (offset > (int)(wndPtr->cbwndExtra - size))
{
- SetLastError(ERROR_INVALID_PARAMETER);
+ WARN("Invalid offset %d\n", offset );
+ SetLastError( ERROR_INVALID_INDEX );
return 0;
}
- return *((LONG *)((PCHAR)(Wnd + 1) + nIndex));
+ retvalue = *((LONG_PTR *)((PCHAR)(wndPtr + 1) + offset));
+
+ /* WINE: special case for dialog window procedure */
+ //if ((offset == DWLP_DLGPROC) && (size == sizeof(LONG_PTR)) && (wndPtr->flags & WIN_ISDIALOG))
+ // retvalue = (LONG_PTR)IntGetWndProc( (WNDPROC)retvalue, unicode );
+ return retvalue;
}
- else
- {
- switch (nIndex)
- {
- case GWL_EXSTYLE:
- return Wnd->ExStyle;
- case GWL_STYLE:
- return Wnd->style;
- case GWL_HINSTANCE:
- return (LONG)Wnd->hModule;
- case GWL_ID:
- return Wnd->IDMenu;
- case GWL_USERDATA:
- return Wnd->dwUserData;
-
- case GWL_HWNDPARENT:
- {
- HWND parent = GetAncestor( hWnd, GA_PARENT );
- if (parent == GetDesktopWindow()) parent = GetWindow( hWnd, GW_OWNER );
- return (LONG)parent;
- }
- case GWL_WNDPROC:
- if (!TestWindowProcess(Wnd))
- {
- SetLastError(ERROR_ACCESS_DENIED);
- return 0;
- }
- return IntGetWndProc(Wnd, TRUE);
- default:
- SetLastError(ERROR_INVALID_PARAMETER);
- return 0;
- }
+ switch(offset)
+ {
+ case GWLP_USERDATA: retvalue = wndPtr->dwUserData; break;
+ case GWL_STYLE: retvalue = wndPtr->style; break;
+ case GWL_EXSTYLE: retvalue = wndPtr->ExStyle; break;
+ case GWLP_ID: retvalue = wndPtr->IDMenu; break;
+ case GWLP_HINSTANCE: retvalue = (ULONG_PTR)wndPtr->hModule; break;
+ case GWLP_WNDPROC:
+ {
+ if (!TestWindowProcess(wndPtr))
+ {
+ SetLastError(ERROR_ACCESS_DENIED);
+ retvalue = 0;
+ }
+ retvalue = (ULONG_PTR)IntGetWndProc(wndPtr, unicode);
+ break;
+ }
+ default:
+ WARN("Unknown offset %d\n", offset );
+ SetLastError( ERROR_INVALID_INDEX );
+ break;
}
-}
+ return retvalue;
+}
+/*
+ * @implemented
+ */
+LONG
+WINAPI
+GetWindowLongA ( HWND hWnd, int nIndex )
+{
+ return IntGetWindowLong( hWnd, nIndex, sizeof(LONG), FALSE );
+}
/*
* @implemented
WINAPI
GetWindowLongW(HWND hWnd, int nIndex)
{
- PWND Wnd;
-
- Wnd = ValidateHwnd(hWnd);
- if (Wnd == NULL)
- return 0;
-
- if (nIndex >= 0)
- {
- if ((DWORD)nIndex + sizeof(LONG) > Wnd->cbwndExtra)
- {
- SetLastError(ERROR_INVALID_PARAMETER);
- return 0;
- }
- return *((LONG *)((PCHAR)(Wnd + 1) + nIndex));
- }
- else
- {
- switch (nIndex)
- {
- case GWL_EXSTYLE:
- return Wnd->ExStyle;
- case GWL_STYLE:
- return Wnd->style;
- case GWL_HINSTANCE:
- return (LONG)Wnd->hModule;
- case GWL_ID:
- return Wnd->IDMenu;
- case GWL_USERDATA:
- return Wnd->dwUserData;
-
- case GWL_HWNDPARENT:
- {
- HWND parent = GetAncestor( hWnd, GA_PARENT );
- if (parent == GetDesktopWindow()) parent = GetWindow( hWnd, GW_OWNER );
- return (LONG)parent;
- }
- case GWL_WNDPROC:
- if (!TestWindowProcess(Wnd))
- {
- SetLastError(ERROR_ACCESS_DENIED);
- return 0;
- }
- return IntGetWndProc(Wnd, FALSE);
+ return IntGetWindowLong( hWnd, nIndex, sizeof(LONG), TRUE );
+}
- default:
- SetLastError(ERROR_INVALID_PARAMETER);
- return 0;
- }
- }
+#ifdef _WIN64
+/*
+ * @implemented
+ */
+LONG_PTR
+WINAPI
+GetWindowLongPtrA(HWND hWnd,
+ INT nIndex)
+{
+ return IntGetWindowLong( hWnd, nIndex, sizeof(LONG_PTR), FALSE );
}
/*
* @implemented
*/
-WORD
+LONG_PTR
WINAPI
-GetWindowWord(HWND hWnd, int nIndex)
+GetWindowLongPtrW(HWND hWnd,
+ INT nIndex)
{
- return (WORD)GetWindowLongW(hWnd, nIndex);
+ return IntGetWindowLong( hWnd, nIndex, sizeof(LONG_PTR), TRUE );
+
}
+#endif // _WIN64
/*
* @implemented
*/
WORD
WINAPI
-SetWindowWord ( HWND hWnd,int nIndex,WORD wNewWord )
+GetWindowWord(HWND hWnd, int nIndex)
{
- return (WORD)NtUserSetWindowLong ( hWnd, nIndex, (LONG)wNewWord, TRUE );
+ switch(nIndex)
+ {
+ case GWLP_ID:
+ case GWLP_HINSTANCE:
+ case GWLP_HWNDPARENT:
+ break;
+ default:
+ if (nIndex < 0)
+ {
+ WARN("Invalid offset %d\n", nIndex );
+ SetLastError( ERROR_INVALID_INDEX );
+ return 0;
+ }
+ break;
+ }
+ return IntGetWindowLong( hWnd, nIndex, sizeof(WORD), FALSE );
}
/*
int nIndex,
LONG dwNewLong)
{
- PSTR lpStr = (PSTR)dwNewLong;
+ PSTR lpStr = (PSTR)(ULONG_PTR)dwNewLong;
UNICODE_STRING Value = {0};
BOOL Allocated = FALSE;
DWORD Ret;
else
Value.Buffer = (PWSTR)lpStr;
- dwNewLong = (LONG)&Value;
+ dwNewLong = (LONG_PTR)&Value;
}
else if (nIndex == GCW_ATOM && lpStr != NULL)
{
else
Value.Buffer = (PWSTR)lpStr;
- dwNewLong = (LONG)&Value;
+ dwNewLong = (LONG_PTR)&Value;
}
Ret = (DWORD)NtUserSetClassLong(hWnd,
int nIndex,
LONG dwNewLong)
{
- PWSTR lpStr = (PWSTR)dwNewLong;
+ PWSTR lpStr = (PWSTR)(ULONG_PTR)dwNewLong;
UNICODE_STRING Value = {0};
TRACE("%p %d %lx\n", hWnd, nIndex, dwNewLong);
else
Value.Buffer = lpStr;
- dwNewLong = (LONG)&Value;
+ dwNewLong = (LONG_PTR)&Value;
}
else if (nIndex == GCW_ATOM && lpStr != NULL)
{
else
Value.Buffer = lpStr;
- dwNewLong = (LONG)&Value;
+ dwNewLong = (LONG_PTR)&Value;
}
return (DWORD)NtUserSetClassLong(hWnd,
FALSE);
}
+#ifdef _WIN64
+/*
+ * @unimplemented
+ */
+ULONG_PTR
+WINAPI
+SetClassLongPtrA(HWND hWnd,
+ INT nIndex,
+ LONG_PTR dwNewLong)
+{
+ UNIMPLEMENTED;
+ return 0;
+}
+
+/*
+ * @unimplemented
+ */
+ULONG_PTR
+WINAPI
+SetClassLongPtrW(HWND hWnd,
+ INT nIndex,
+ LONG_PTR dwNewLong)
+{
+ UNIMPLEMENTED;
+ return 0;
+}
+#endif // _WIN64
/*
* @implemented
return (WORD) SetClassLongW ( hWnd, nIndex, wNewWord );
}
+/*
+ * @implemented
+ */
+WORD
+WINAPI
+SetWindowWord ( HWND hWnd,int nIndex,WORD wNewWord )
+{
+ switch(nIndex)
+ {
+ case GWLP_ID:
+ case GWLP_HINSTANCE:
+ case GWLP_HWNDPARENT:
+ break;
+ default:
+ if (nIndex < 0)
+ {
+ WARN("Invalid offset %d\n", nIndex );
+ SetLastError( ERROR_INVALID_INDEX );
+ return 0;
+ }
+ break;
+ }
+ return NtUserSetWindowLong( hWnd, nIndex, wNewWord, FALSE );
+}
/*
* @implemented
return NtUserSetWindowLong(hWnd, nIndex, dwNewLong, TRUE);
}
-
/*
* @implemented
*/
return NtUserSetWindowLong(hWnd, nIndex, dwNewLong, FALSE);
}
+#ifdef _WIN64
+/*
+ * @implemented
+ */
+LONG_PTR
+WINAPI
+SetWindowLongPtrA(HWND hWnd,
+ INT nIndex,
+ LONG_PTR dwNewLong)
+{
+ return NtUserSetWindowLong(hWnd, nIndex, dwNewLong, FALSE);
+}
+
+/*
+ * @implemented
+ */
+LONG_PTR
+WINAPI
+SetWindowLongPtrW(HWND hWnd,
+ INT nIndex,
+ LONG_PTR dwNewLong)
+{
+ return NtUserSetWindowLong(hWnd, nIndex, dwNewLong, FALSE);
+}
+#endif
/*
* @implemented
{
HGLOBAL hGlobal = NULL;
PVOID pGlobal = NULL;
- DWORD size = 0;
+ DWORD_PTR size = 0;
/* dealing with bitmap object */
if (uFormat != CF_BITMAP)
{
- size = (DWORD)NtUserGetClipboardData(uFormat, NULL);
+ size = NtUserGetClipboardData(uFormat, NULL);
if (size)
{
hGlobal = GlobalAlloc(GMEM_DDESHARE | GMEM_MOVEABLE, size);
pGlobal = GlobalLock(hGlobal);
- size = (DWORD)NtUserGetClipboardData(uFormat, pGlobal);
+ size = NtUserGetClipboardData(uFormat, pGlobal);
GlobalUnlock(hGlobal);
}
}
else
{
- hGlobal = NtUserGetClipboardData(CF_BITMAP, NULL);
+ hGlobal = (HANDLE)NtUserGetClipboardData(CF_BITMAP, NULL);
}
return hGlobal;
GdiReleaseDC ( hDC ); // Release locals.
// Win 3.1 throw back, hWnd is ignored and not used.
- return NtUserCallOneParam((DWORD) hDC, ONEPARAM_ROUTINE_RELEASEDC);
+ return NtUserCallOneParam((DWORD_PTR) hDC, ONEPARAM_ROUTINE_RELEASEDC);
}
/* Pack the information and call win32k */
if (Change)
{
- if (!NtUserCallTwoParam((DWORD)hWnd, (DWORD)Flags | ((DWORD)Action << 3), TWOPARAM_ROUTINE_ROS_UPDATEUISTATE))
+ if (!NtUserCallTwoParam((DWORD_PTR)hWnd, (DWORD_PTR)Flags | ((DWORD_PTR)Action << 3), TWOPARAM_ROUTINE_ROS_UPDATEUISTATE))
break;
}
SETDLGINFO( hWnd, dlgInfo );
- NtUserCallHwndParam( hWnd, (DWORD)dlgInfo, HWNDPARAM_ROUTINE_SETDIALOGPOINTER );
+ NtUserCallHwndParam( hWnd, (DWORD_PTR)dlgInfo, HWNDPARAM_ROUTINE_SETDIALOGPOINTER );
}
else
{
MulDiv(info.y, dlgInfo->yBaseUnit, 8),
MulDiv(info.cx, dlgInfo->xBaseUnit, 4),
MulDiv(info.cy, dlgInfo->yBaseUnit, 8),
- hwnd, (HMENU)info.id,
+ hwnd, (HMENU)(ULONG_PTR)info.id,
hInst, (LPVOID)info.data );
}
else
MulDiv(info.y, dlgInfo->yBaseUnit, 8),
MulDiv(info.cx, dlgInfo->xBaseUnit, 4),
MulDiv(info.cy, dlgInfo->yBaseUnit, 8),
- hwnd, (HMENU)info.id,
+ hwnd, (HMENU)(ULONG_PTR)info.id,
hInst, (LPVOID)info.data );
}
else
p++;
break;
case 0xffff:
- result->menuName = (LPCWSTR)(UINT)GET_WORD( p + 1 );
+ result->menuName = (LPCWSTR)(UINT_PTR)GET_WORD( p + 1 );
p += 2;
break;
default:
p++;
break;
case 0xffff:
- result->className = (LPCWSTR)(UINT)GET_WORD( p + 1 );
+ result->className = (LPCWSTR)(UINT_PTR)GET_WORD( p + 1 );
p += 2;
break;
default:
if (hbr <= (HBRUSH)(COLOR_MENUBAR + 1))
{
- hbr = GetSysColorBrush((int)hbr - 1);
+ hbr = GetSysColorBrush(PtrToUlong(hbr) - 1);
}
if ((prevhbr = SelectObject(hDC, hbr)) == NULL)
{
WINAPI
UnhookWindowsHook ( int nCode, HOOKPROC pfnFilterProc )
{
- return NtUserCallTwoParam(nCode, (DWORD)pfnFilterProc, TWOPARAM_ROUTINE_UNHOOKWINDOWSHOOK);
+ return NtUserCallTwoParam(nCode, (DWORD_PTR)pfnFilterProc, TWOPARAM_ROUTINE_UNHOOKWINDOWSHOOK);
}
/*
if (NULL != CbtCreatewndExtra->Cs.lpszName)
{
Csw.lpszName = (LPCWSTR)((PCHAR) CbtCreatewndExtra
- + (ULONG) CbtCreatewndExtra->Cs.lpszName);
+ + (ULONG_PTR) CbtCreatewndExtra->Cs.lpszName);
}
if (0 != HIWORD(CbtCreatewndExtra->Cs.lpszClass))
{
Csw.lpszClass = (LPCWSTR)((PCHAR) CbtCreatewndExtra
- + LOWORD((ULONG) CbtCreatewndExtra->Cs.lpszClass));
+ + LOWORD((ULONG_PTR) CbtCreatewndExtra->Cs.lpszClass));
}
wParam = Common->wParam;
if (Common->Ansi)
HKL WINAPI
GetKeyboardLayout(DWORD idThread)
{
- return (HKL)NtUserCallOneParam((DWORD) idThread, ONEPARAM_ROUTINE_GETKEYBOARDLAYOUT);
+ return (HKL)NtUserCallOneParam((DWORD_PTR) idThread, ONEPARAM_ROUTINE_GETKEYBOARDLAYOUT);
}
int WINAPI
GetKeyboardType(int nTypeFlag)
{
-return (int)NtUserCallOneParam((DWORD) nTypeFlag, ONEPARAM_ROUTINE_GETKEYBOARDTYPE);
+return (int)NtUserCallOneParam((DWORD_PTR) nTypeFlag, ONEPARAM_ROUTINE_GETKEYBOARDTYPE);
}
case (INT_PTR) HBMMENU_SYSTEM:
if (0 != lpitem->dwItemData)
{
- Bmp = (HBITMAP) lpitem->dwItemData;
+ Bmp = (HBITMAP)(ULONG_PTR) lpitem->dwItemData;
break;
}
/* fall through */
case WM_CREATE:
{
CREATESTRUCTA *cs = (CREATESTRUCTA *) lParam;
- SetWindowLongPtrA(Wnd, 0, (LONG) cs->lpCreateParams);
+ SetWindowLongPtrA(Wnd, 0, (LONG_PTR)cs->lpCreateParams);
return 0;
}
case WM_CREATE:
{
CREATESTRUCTW *cs = (CREATESTRUCTW *) lParam;
- SetWindowLongPtrW(Wnd, 0, (LONG) cs->lpCreateParams);
+ SetWindowLongPtrW(Wnd, 0, (LONG_PTR)cs->lpCreateParams);
return 0;
}
resinfo = GET_WORD(res);
res += sizeof(WORD);
/* Align the text on a word boundary. */
- res += (~((int)res - 1)) & 1;
+ res += (~((UINT_PTR)res - 1)) & 1;
mii.dwTypeData = (LPWSTR) res;
res += (1 + strlenW(mii.dwTypeData)) * sizeof(WCHAR);
/* Align the following fields on a dword boundary. */
- res += (~((int)res - 1)) & 3;
+ res += (~((UINT_PTR)res - 1)) & 3;
if (resinfo & 1) /* Pop-up? */
{
}
mii.fMask |= MIIM_SUBMENU;
mii.fType |= MF_POPUP;
- mii.wID = (UINT) mii.hSubMenu;
+ mii.wID = (UINT_PTR) mii.hSubMenu;
}
else if(!*mii.dwTypeData && !(mii.fType & MF_SEPARATOR))
{
if(!(res = MENU_ParseResource(res, hSubMenu, unicode)))
return NULL;
if(!unicode)
- AppendMenuA(hMenu, flags, (UINT)hSubMenu, str);
+ AppendMenuA(hMenu, flags, (UINT_PTR)hSubMenu, str);
else
- AppendMenuW(hMenu, flags, (UINT)hSubMenu, (LPCWSTR)str);
+ AppendMenuW(hMenu, flags, (UINT_PTR)hSubMenu, (LPCWSTR)str);
}
else /* Not a popup */
{
if(!unicode)
{
- if (*str == 0)
- flags = MF_SEPARATOR;
+ if (*str == 0)
+ flags = MF_SEPARATOR;
}
else
{
{
mii->fType |= MFT_OWNERDRAW;
mii->fMask |= MIIM_DATA;
- mii->dwItemData = (DWORD) NewItem;
+ mii->dwItemData = (DWORD_PTR) NewItem;
}
else if (Flags & MF_SEPARATOR)
{
HMENU WINAPI
GetMenu(HWND hWnd)
{
- PWND Wnd = ValidateHwnd(hWnd);
-
- if (!Wnd)
- return NULL;
-
- return (HMENU)Wnd->IDMenu;
+ HMENU retvalue = (HMENU)GetWindowLongPtrW( hWnd, GWLP_ID );
+ TRACE("for %p returning %p\n", hWnd, retvalue);
+ return retvalue;
}
{
DdeLparam->Packed = TRUE;
if (! UnpackDDElParam(UMMsg->message, UMMsg->lParam,
- &DdeLparam->Value.Packed.uiLo,
- &DdeLparam->Value.Packed.uiHi))
+ (PUINT_PTR)&DdeLparam->Value.Packed.uiLo,
+ (PUINT_PTR)&DdeLparam->Value.Packed.uiHi))
{
return FALSE;
}
if (0 != HIWORD(DdeLparam->Value.Packed.uiHi))
{
/* uiHi should contain a hMem from WM_DDE_EXECUTE */
- HGLOBAL h = DdeGetPair((HGLOBAL) DdeLparam->Value.Packed.uiHi);
+ HGLOBAL h = DdeGetPair((HGLOBAL)(ULONG_PTR)DdeLparam->Value.Packed.uiHi);
if (NULL != h)
{
- GlobalFree((HGLOBAL) DdeLparam->Value.Packed.uiHi);
- DdeLparam->Value.Packed.uiHi = (UINT) h;
+ GlobalFree((HGLOBAL)(ULONG_PTR)DdeLparam->Value.Packed.uiHi);
+ DdeLparam->Value.Packed.uiHi = (UINT_PTR) h;
}
}
FreeDDElParam(UMMsg->message, UMMsg->lParam);
return FALSE;
}
CsA->lpszName = AnsiString.Buffer;
- if (HIWORD((ULONG)CsW->lpszClass) != 0)
+ if (HIWORD((ULONG_PTR)CsW->lpszClass) != 0)
{
RtlInitUnicodeString(&UnicodeString, CsW->lpszClass);
Status = RtlUnicodeStringToAnsiString(&AnsiString, &UnicodeString, TRUE);
Cs = (CREATESTRUCTA*) AnsiMsg->lParam;
RtlInitAnsiString(&AnsiString, Cs->lpszName);
RtlFreeAnsiString(&AnsiString);
- if (HIWORD((ULONG)Cs->lpszClass) != 0)
+ if (HIWORD((ULONG_PTR)Cs->lpszClass) != 0)
{
RtlInitAnsiString(&AnsiString, Cs->lpszClass);
RtlFreeAnsiString(&AnsiString);
MSG UnicodeMsg;
MSG AnsiMsg;
PMSG FinalMsg;
- ULONG LParamSize;
+ SIZE_T LParamSize;
} MSGCONVERSION, *PMSGCONVERSION;
static PMSGCONVERSION MsgConversions = NULL;
* @implemented
*/
BOOL WINAPI
-TranslateMessageEx(CONST MSG *lpMsg, DWORD unk)
+TranslateMessageEx(CONST MSG *lpMsg, UINT Flags)
{
switch (lpMsg->message)
{
case WM_KEYUP:
case WM_SYSKEYDOWN:
case WM_SYSKEYUP:
- return(NtUserTranslateMessage((LPMSG)lpMsg, (HKL)unk));
+ return(NtUserTranslateMessage((LPMSG)lpMsg, Flags));
default:
if ( lpMsg->message & ~WM_MAXIMUM )
}
/* create static for text */
- dest = (BYTE*)(((DWORD)dest + 3) & ~3);
+ dest = (BYTE*)(((UINT_PTR)dest + 3) & ~3);
itxt = (DLGITEMTEMPLATE *)dest;
itxt->style = WS_CHILD | WS_VISIBLE | SS_NOPREFIX;
if(lpMsgBoxParams->dwStyle & MB_RIGHT)
btnrect.left = btnrect.top = 0;
for(i = 0; i < nButtons; i++)
{
- dest = (BYTE*)(((DWORD)dest + 3) & ~3);
+ dest = (BYTE*)(((UINT_PTR)dest + 3) & ~3);
ibtn[i] = (DLGITEMTEMPLATE *)dest;
ibtn[i]->style = WS_CHILD | WS_VISIBLE | WS_TABSTOP;
if(!defbtn && (i == ((lpMsgBoxParams->dwStyle & MB_DEFMASK) >> 8)))
UNICODE_STRING textW, captionW, iconW;
int ret;
- if (HIWORD((UINT)lpMsgBoxParams->lpszText))
+ if (HIWORD((UINT_PTR)lpMsgBoxParams->lpszText))
{
RtlCreateUnicodeStringFromAsciiz(&textW, (PCSZ)lpMsgBoxParams->lpszText);
/*
else
textW.Buffer = (LPWSTR)lpMsgBoxParams->lpszText;
- if (HIWORD((UINT)lpMsgBoxParams->lpszCaption))
+ if (HIWORD((UINT_PTR)lpMsgBoxParams->lpszCaption))
{
RtlCreateUnicodeStringFromAsciiz(&captionW, (PCSZ)lpMsgBoxParams->lpszCaption);
/*
if(lpMsgBoxParams->dwStyle & MB_USERICON)
{
- if (HIWORD((UINT)lpMsgBoxParams->lpszIcon))
+ if (HIWORD((UINT_PTR)lpMsgBoxParams->lpszIcon))
{
RtlCreateUnicodeStringFromAsciiz(&iconW, (PCSZ)lpMsgBoxParams->lpszIcon);
/*
ret = MessageBoxTimeoutIndirectW(&msgboxW, (UINT)-1);
- if (HIWORD((UINT)lpMsgBoxParams->lpszText))
+ if (HIWORD((UINT_PTR)lpMsgBoxParams->lpszText))
RtlFreeUnicodeString(&textW);
- if (HIWORD((UINT)lpMsgBoxParams->lpszCaption))
+ if (HIWORD((UINT_PTR)lpMsgBoxParams->lpszCaption))
RtlFreeUnicodeString(&captionW);
- if ((lpMsgBoxParams->dwStyle & MB_USERICON) && HIWORD((UINT)iconW.Buffer))
+ if ((lpMsgBoxParams->dwStyle & MB_USERICON) && HIWORD((UINT_PTR)iconW.Buffer))
RtlFreeUnicodeString(&iconW);
return ret;
UNICODE_STRING textW, captionW;
int ret;
- if (HIWORD((UINT)lpText))
+ if (HIWORD((UINT_PTR)lpText))
RtlCreateUnicodeStringFromAsciiz(&textW, (PCSZ)lpText);
else
textW.Buffer = (LPWSTR)lpText;
- if (HIWORD((UINT)lpCaption))
+ if (HIWORD((UINT_PTR)lpCaption))
RtlCreateUnicodeStringFromAsciiz(&captionW, (PCSZ)lpCaption);
else
captionW.Buffer = (LPWSTR)lpCaption;
{
HICON hIcon = 0;
- SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL2, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon);
+ SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL2, 0, SMTO_ABORTIFHUNG, 1000, (PDWORD_PTR)&hIcon);
if (!hIcon)
- SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon);
+ SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL, 0, SMTO_ABORTIFHUNG, 1000, (PDWORD_PTR)&hIcon);
if (!hIcon)
- SendMessageTimeout(hwnd, WM_GETICON, ICON_BIG, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon);
+ SendMessageTimeout(hwnd, WM_GETICON, ICON_BIG, 0, SMTO_ABORTIFHUNG, 1000, (PDWORD_PTR)&hIcon);
if (!hIcon)
hIcon = (HICON)GetClassLongPtr(hwnd, GCL_HICONSM);
HWND hWnd,
HRGN hRgn)
{
- return (int)NtUserCallTwoParam((DWORD)hWnd, (DWORD)hRgn, TWOPARAM_ROUTINE_GETWINDOWRGN);
+ return (int)NtUserCallTwoParam((DWORD_PTR)hWnd, (DWORD_PTR)hRgn, TWOPARAM_ROUTINE_GETWINDOWRGN);
}
HWND hWnd,
LPRECT lprc)
{
- return (int)NtUserCallTwoParam((DWORD)hWnd, (DWORD)lprc, TWOPARAM_ROUTINE_GETWINDOWRGNBOX);
+ return (int)NtUserCallTwoParam((DWORD_PTR)hWnd, (DWORD_PTR)lprc, TWOPARAM_ROUTINE_GETWINDOWRGNBOX);
}
}
else
{
- Atom = LOWORD((DWORD)lpString);
+ Atom = LOWORD((DWORD_PTR)lpString);
}
Prop = IntGetProp(hWnd, Atom);
if (Prop != NULL) Data = Prop->Data;
}
else
{
- Atom = LOWORD((DWORD)lpString);
+ Atom = LOWORD((DWORD_PTR)lpString);
}
return(NtUserRemoveProp(hWnd, Atom));
}
}
else
{
- Atom = LOWORD((DWORD)lpString);
+ Atom = LOWORD((DWORD_PTR)lpString);
}
return(NtUserSetProp(hWnd, Atom, hData));
/* save and restore error code over the next call */
save_error = GetLastError();
/* special code to detect a property sheet dialog */
- if ((GetClassLongPtrW(sp_e->msg_hwnd, GCW_ATOM) == (LONG)WC_DIALOG) &&
+ if ((GetClassLongPtrW(sp_e->msg_hwnd, GCW_ATOM) == (ULONG_PTR)WC_DIALOG) &&
(GetPropW(sp_e->msg_hwnd, PropSheetInfoStr))) {
strcpyW(sp_e->wnd_class, WC_PROPSHEETW);
}
{
SendMessageA(hWnd, WM_SYSCOMMAND, SC_CLOSE, 0);
- return (BOOL)(hWnd);
+ return HandleToUlong(hWnd);
}
MDI_CalcDefaultChildPos(hWndParent, -1, mPos, 0, &id);
- if (!(dwStyle & WS_POPUP)) hMenu = (HMENU)id;
+ if (!(dwStyle & WS_POPUP)) hMenu = UlongToHandle(id);
if (dwStyle & (WS_CHILD | WS_POPUP))
{
MDI_CalcDefaultChildPos(hWndParent, -1, mPos, 0, &id);
- if (!(dwStyle & WS_POPUP)) hMenu = (HMENU)id;
+ if (!(dwStyle & WS_POPUP)) hMenu = UlongToHandle(id);
if (dwStyle & (WS_CHILD | WS_POPUP))
{
* Once that's fixed, we shouldn't have to check for a NULL HWND
* here
*/
- if (!(ULONG)pHwnd[i]) /* don't enumerate a NULL HWND */
+ if (!pHwnd[i]) /* don't enumerate a NULL HWND */
continue;
if (!(*lpfn)(pHwnd[i], lParam))
{
{ // We are current.
//FIXME("Current!\n");
if (lpdwProcessId)
- *lpdwProcessId = (DWORD)NtCurrentTeb()->ClientId.UniqueProcess;
- Ret = (DWORD)NtCurrentTeb()->ClientId.UniqueThread;
+ *lpdwProcessId = (DWORD_PTR)NtCurrentTeb()->ClientId.UniqueProcess;
+ Ret = (DWORD_PTR)NtCurrentTeb()->ClientId.UniqueThread;
}
else
{ // Ask kernel for info.
ShowOwnedPopups(HWND hWnd,
BOOL fShow)
{
- return (BOOL)NtUserCallTwoParam((DWORD)hWnd, fShow, TWOPARAM_ROUTINE_SHOWOWNEDPOPUPS);
+ return (BOOL)NtUserCallTwoParam((DWORD_PTR)hWnd, fShow, TWOPARAM_ROUTINE_SHOWOWNEDPOPUPS);
}
<file>mmixer.c</file>
<file>legacy.c</file>
<file>wdmaud.rc</file>
-</module>
+</module>
\ No newline at end of file
static const WCHAR wszSystemIni[] = {'S','Y','S','T','E','M','.','I','N','I',0};
WCHAR wsznull = '\0';
- /* This takes us as far as Windows NT\CurrentVersion */
- lRet = RegOpenKeyExW(HKEY_LOCAL_MACHINE, HKLM_BASE, 0, KEY_QUERY_VALUE, &hKey);
-
- if (lRet == ERROR_SUCCESS)
- {
- /* Now we descend into the section name that we were given */
- lRet = RegOpenKeyExW(hKey, sectName, 0, KEY_QUERY_VALUE, &hSecKey);
+ TRACE("registry: %s, %s, %p, %d\n", debugstr_w(keyName), debugstr_w(sectName), buf, sz);
- if (lRet == ERROR_SUCCESS)
- {
- /* Retrieve the desired value - this is the filename of the lib */
+ lRet = RegOpenKeyExW(HKEY_LOCAL_MACHINE, HKLM_BASE, 0, KEY_QUERY_VALUE, &hKey);
+ if (lRet == ERROR_SUCCESS) {
+ lRet = RegOpenKeyExW(hKey, sectName, 0, KEY_QUERY_VALUE, &hSecKey);
+ if (lRet == ERROR_SUCCESS) {
bufLen = sz;
- lRet = RegQueryValueExW(hSecKey, keyName, 0, 0, (void*)buf, &bufLen);
- RegCloseKey( hSecKey );
- }
-
+ lRet = RegQueryValueExW(hSecKey, keyName, 0, 0, (void*)buf, &bufLen);
+ RegCloseKey( hSecKey );
+ }
RegCloseKey( hKey );
}
-
- /* Finish up if we've got what we want from the registry */
- if (lRet == ERROR_SUCCESS)
- return TRUE;
+ if (lRet == ERROR_SUCCESS) return TRUE;
/* default to system.ini if we can't find it in the registry,
* to support native installations where system.ini is still used */
+ TRACE("system.ini: %s, %s, %p, %d\n", debugstr_w(keyName), debugstr_w(sectName), buf, sz);
return GetPrivateProfileStringW(sectName, keyName, &wsznull, buf, sz / sizeof(WCHAR), wszSystemIni);
}
TRACE("(%s, %08lX);\n", debugstr_w(fn), lParam2);
- if ((ptr = strchrW(fn, ' ')) != NULL)
- {
- *ptr++ = '\0';
-
- while (*ptr == ' ')
- ptr++;
-
- if (*ptr == '\0')
- ptr = NULL;
+ if ((ptr = strchrW(fn, ' ')) != NULL) {
+ *ptr++ = '\0';
+ while (*ptr == ' ') ptr++;
+ if (*ptr == '\0') ptr = NULL;
}
lpDrv = HeapAlloc(GetProcessHeap(), 0, sizeof(WINE_DRIVER));
+ if (lpDrv == NULL) {cause = "OOM"; goto exit;}
- if (lpDrv == NULL)
- {
- cause = "OOM";
- goto exit;
- }
-
- if ((hModule = LoadLibraryW(fn)) == 0)
- {
- cause = "Not a 32 bit lib";
- goto exit;
- }
+ if ((hModule = LoadLibraryW(fn)) == 0) {cause = "Not a 32 bit lib"; goto exit;}
lpDrv->lpDrvProc = (DRIVERPROC)GetProcAddress(hModule, "DriverProc");
+ if (lpDrv->lpDrvProc == NULL) {cause = "no DriverProc"; goto exit;}
- if (lpDrv->lpDrvProc == NULL)
- {
- cause = "no DriverProc";
- goto exit;
- }
-
- lpDrv->dwFlags = 0;
+ lpDrv->dwFlags = 0;
lpDrv->hModule = hModule;
lpDrv->dwDriverID = 0;
cause = "load1 failed";
goto exit;
}
+ lpDrv->dwFlags |= WINE_GDF_SESSION;
return ret;
}
if (!DRIVER_AddToList(lpDrv, (LPARAM)ptr, lParam2))
- {
- cause = "load failed";
- goto exit;
- }
+ {cause = "load failed"; goto exit;}
TRACE("=> %p\n", lpDrv);
return lpDrv;
-
exit:
FreeLibrary(hModule);
HeapFree(GetProcessHeap(), 0, lpDrv);
HDRVR WINAPI OpenDriver(LPCWSTR lpDriverName, LPCWSTR lpSectionName, LPARAM lParam)
{
LPWINE_DRIVER lpDrv = NULL;
- WCHAR libName[128];
+ WCHAR libName[MAX_PATH + 1];
LPCWSTR lsn = lpSectionName;
TRACE("(%s, %s, 0x%08lx);\n",
debugstr_w(lpDriverName), debugstr_w(lpSectionName), lParam);
- /* If no section name is specified, either the caller is intending on
- opening a driver by filename, or wants to open a user-installable
- driver that has an entry in the Drivers32 key in the registry */
- if (lsn == NULL)
- {
- /* Default registry key */
- static const WCHAR wszDrivers32[] = {'D','r','i','v','e','r','s','3','2',0};
-
- lstrcpynW(libName, lpDriverName, sizeof(libName) / sizeof(WCHAR));
-
- /* Try and open the driver by filename */
- if ( (lpDrv = DRIVER_TryOpenDriver32(libName, lParam)) )
- goto the_end;
+ DRIVER_Dump("BEFORE:");
- /* If we got here, the file wasn't found. So we assume the caller
- wanted a driver specified under the Drivers32 registry key */
- lsn = wszDrivers32;
- }
+ if (lsn == NULL) {
+ static const WCHAR wszDrivers32[] = {'D','r','i','v','e','r','s','3','2',0};
+ lstrcpynW(libName, lpDriverName, sizeof(libName) / sizeof(WCHAR));
- /* Attempt to locate the driver filename in the registry */
- if ( DRIVER_GetLibName(lpDriverName, lsn, libName, sizeof(libName)) )
- {
- /* Now we have the filename, we can try and load it */
- if ( (lpDrv = DRIVER_TryOpenDriver32(libName, lParam)) )
- goto the_end;
+ if ((lpDrv = DRIVER_TryOpenDriver32(libName, lParam)))
+ goto the_end;
+ lsn = wszDrivers32;
}
+ if (DRIVER_GetLibName(lpDriverName, lsn, libName, sizeof(libName)) &&
+ (lpDrv = DRIVER_TryOpenDriver32(libName, lParam)))
+ goto the_end;
- /* now we will try a 16 bit driver (and add all the glue to make it work... which
- * is located in our mmsystem implementation)
- * so ensure, we can load our mmsystem, otherwise just fail
- */
- WINMM_CheckForMMSystem();
-#if 0
- if (pFnOpenDriver16 &&
- (lpDrv = pFnOpenDriver16(lpDriverName, lpSectionName, lParam)))
- {
- if (DRIVER_AddToList(lpDrv, 0, lParam)) goto the_end;
- HeapFree(GetProcessHeap(), 0, lpDrv);
- }
TRACE("Failed to open driver %s from system.ini file, section %s\n",
debugstr_w(lpDriverName), debugstr_w(lpSectionName));
-#endif
- return 0;
- the_end:
- if (lpDrv) TRACE("=> %08lx\n", (DWORD)lpDrv);
+the_end:
+ TRACE("=> %p\n", lpDrv);
+
+ DRIVER_Dump("AFTER:");
+
return (HDRVR)lpDrv;
}
wmd->lpfnYieldProc = MCI_DefYieldProc;
wmd->dwYieldData = VK_CANCEL;
- wmd->CreatorThread = GetCurrentThreadId();
+ wmd->CreatorThread = GetCurrentThread();
EnterCriticalSection(&WINMM_cs);
/* wmd must be inserted in list before sending opening the driver, because it
{
static const WCHAR wszLd [] = {'%','l','d',0};
static const WCHAR wszLd4 [] = {'%','l','d',' ','%','l','d',' ','%','l','d',' ','%','l','d',0};
- static const WCHAR wszCol3[] = {'%','d',':','%','d',':','%','d',0};
- static const WCHAR wszCol4[] = {'%','d',':','%','d',':','%','d',':','%','d',0};
+ static const WCHAR wszCol3[] = {'%','0','2','d',':','%','0','2','d',':','%','0','2','d',0};
+ static const WCHAR wszCol4[] = {'%','0','2','d',':','%','0','2','d',':','%','0','2','d',':','%','0','2','d',0};
if (lpstrRet) {
switch (retType) {
tmp = devType; devType = dev; dev = tmp;
dwFlags |= MCI_OPEN_TYPE;
- data[2] = (DWORD)devType;
+ data[2] = (DWORD_PTR)devType;
devType = str_dup_upper(devType);
dwFlags |= MCI_OPEN_ELEMENT;
- data[3] = (DWORD)dev;
+ data[3] = (DWORD_PTR)dev;
} else if (DRIVER_GetLibName(dev, wszMci, buf, sizeof(buf))) {
/* this is the name of a mci driver's type */
tmp = strchrW(dev, ' ');
if (tmp) *tmp = '\0';
- data[2] = (DWORD)dev;
+ data[2] = (DWORD_PTR)dev;
devType = str_dup_upper(dev);
if (tmp) *tmp = ' ';
dwFlags |= MCI_OPEN_TYPE;
devType = str_dup_upper(buf);
}
dwFlags |= MCI_OPEN_ELEMENT;
- data[3] = (DWORD)dev;
+ data[3] = (DWORD_PTR)dev;
}
if ((devAlias = strstrW(args, wszSAliasS))) {
WCHAR* tmp2;
tmp2 = HeapAlloc(GetProcessHeap(), 0, (tmp - devAlias + 1) * sizeof(WCHAR) );
memcpy( tmp2, devAlias, (tmp - devAlias) * sizeof(WCHAR) );
tmp2[tmp - devAlias] = 0;
- data[4] = (DWORD)tmp2;
+ data[4] = (DWORD_PTR)tmp2;
/* should be done in regular options parsing */
/* dwFlags |= MCI_OPEN_ALIAS; */
} else if (dev == 0) {
switch (retType = MCI_GetReturnType(lpCmd)) {
case 0: offset = 1; break;
case MCI_INTEGER: offset = 2; break;
- case MCI_STRING: data[1] = (DWORD)lpstrRet; data[2] = uRetLen; offset = 3; break;
+ case MCI_STRING: data[1] = (DWORD_PTR)lpstrRet; data[2] = uRetLen; offset = 3; break;
case MCI_RECT: offset = 5; break;
default: ERR("oops\n");
}
/* set up call back */
if (dwFlags & MCI_NOTIFY) {
- data[0] = (DWORD)hwndCallback;
+ data[0] = (DWORD_PTR)hwndCallback;
}
/* FIXME: the command should get it's own notification window set up and
* ask for device closing while processing the notification mechanism
*/
if (lpstrRet && uRetLen) *lpstrRet = '\0';
-
+/*
TRACE("[%d, %s, %08x, %08x/%s %08x/%s %08x/%s %08x/%s %08x/%s %08x/%s]\n",
wmd->wDeviceID, MCI_MessageToString(MCI_GetMessage(lpCmd)), dwFlags,
data[0], debugstr_w((WCHAR *)data[0]), data[1], debugstr_w((WCHAR *)data[1]),
data[2], debugstr_w((WCHAR *)data[2]), data[3], debugstr_w((WCHAR *)data[3]),
data[4], debugstr_w((WCHAR *)data[4]), data[5], debugstr_w((WCHAR *)data[5]));
-
+*/
if (strcmpW(verb, wszOpen) == 0) {
if ((dwRet = MCI_FinishOpen(wmd, (LPMCI_OPEN_PARMSW)data, dwFlags)))
MCI_UnLoadMciDriver(wmd);
BOOL WINAPI mciExecute(LPCSTR lpstrCommand)
{
char strRet[256];
- DWORD ret;
+ int ret;
TRACE("(%s)!\n", lpstrCommand);
ret = mciSendStringA(lpstrCommand, strRet, sizeof(strRet), 0);
if (ret != 0) {
if (!mciGetErrorStringA(ret, strRet, sizeof(strRet))) {
- sprintf(strRet, "Unknown MCI error (%lu)", ret);
+ sprintf(strRet, "Unknown MCI error (%d)", ret);
}
MessageBoxA(0, strRet, "Error in mciExecute()", MB_OK);
}
TRACE("(%04x, %08X, %p)\n", wDevID, dwParam, lpParms);
- if (wDevID == (UINT16)MCI_ALL_DEVICE_ID) {
+ if (wDevID == MCI_ALL_DEVICE_ID) {
/* FIXME: shall I notify once after all is done, or for
* each of the open drivers ? if the latest, which notif
* to return when only one fails ?
LPWINE_MCIDRIVER wmd;
HKEY hKey;
- if (lpParms == NULL || lpParms->lpstrReturn == NULL)
- return MCIERR_NULL_PARAMETER_BLOCK;
+ if (lpParms == NULL) return MCIERR_NULL_PARAMETER_BLOCK;
+ if (lpParms->lpstrReturn == NULL) return MCIERR_PARAM_OVERFLOW;
TRACE("(%08x, %08X, %p[num=%d, wDevTyp=%u])\n",
uDevID, dwFlags, lpParms, lpParms->dwNumber, lpParms->wDeviceType);
/**************************************************************************
* mciGetCreatorTask [WINMM.@]
*/
-HTASK WINAPI mciGetCreatorTask(MCIDEVICEID uDeviceID)
+HANDLE WINAPI mciGetCreatorTask(MCIDEVICEID uDeviceID)
{
LPWINE_MCIDRIVER wmd;
- HTASK ret = 0;
+ HANDLE ret = 0;
- if ((wmd = MCI_GetDriver(uDeviceID))) ret = (HTASK)wmd->CreatorThread;
+ if ((wmd = MCI_GetDriver(uDeviceID))) ret = wmd->CreatorThread;
TRACE("(%u) => %p\n", uDeviceID, ret);
return ret;
if (MIDIMAP_LoadSettings(mom))
{
- *lpdwUser = (DWORD)mom;
+ *lpdwUser = (DWORD_PTR)mom;
mom->self = mom;
return MMSYSERR_NOERROR;
/**************************************************************************
* modMessage (MIDIMAP.@)
*/
-DWORD WINAPI MIDIMAP_modMessage(UINT wDevID, UINT wMsg, DWORD dwUser,
- DWORD dwParam1, DWORD dwParam2)
+DWORD WINAPI MIDIMAP_modMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
+ DWORD_PTR dwParam1, DWORD_PTR dwParam2)
{
TRACE("(%u, %04X, %08lX, %08lX, %08lX);\n",
wDevID, wMsg, dwUser, dwParam1, dwParam2);
/**************************************************************************
* DriverProc (MIDIMAP.@)
*/
-LONG CALLBACK MIDIMAP_DriverProc(DWORD dwDevID, HDRVR hDriv, DWORD wMsg,
- DWORD dwParam1, DWORD dwParam2)
+LRESULT CALLBACK MIDIMAP_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg,
+ LPARAM dwParam1, LPARAM dwParam2)
{
/* EPP TRACE("(%08lX, %04X, %08lX, %08lX, %08lX)\n", */
/* EPP dwDevID, hDriv, wMsg, dwParam1, dwParam2); */
(LPARAM)szFileName, 0, FALSE);
/* grab file size, when possible */
- wm->dwFileSize = GetFileSize((HANDLE)wm->info.adwInfo[0], NULL);
+ wm->dwFileSize = GetFileSize(LongToHandle(wm->info.adwInfo[0]), NULL);
if (refmminfo->wErrorRet == 0)
return wm->info.hmmio;
typedef struct tagWINE_MCIDRIVER {
UINT wDeviceID;
UINT wType;
- LPWSTR lpstrElementName;
+ LPWSTR lpstrElementName;
LPWSTR lpstrDeviceType;
LPWSTR lpstrAlias;
HDRVR hDriver;
- DWORD_PTR dwPrivate;
+ DWORD_PTR dwPrivate;
YIELDPROC lpfnYieldProc;
- DWORD dwYieldData;
- DWORD CreatorThread;
+ DWORD dwYieldData;
+ HANDLE CreatorThread;
UINT uTypeCmdTable;
UINT uSpecificCmdTable;
struct tagWINE_MCIDRIVER*lpNext;
TRACE("(%04X, %p) !\n", uDeviceID, lpdwVolume);
- if ((wmld = MMDRV_Get((HANDLE)uDeviceID, MMDRV_AUX, TRUE)) == NULL)
+ if ((wmld = MMDRV_Get(UlongToHandle(uDeviceID), MMDRV_AUX, TRUE)) == NULL)
return MMSYSERR_INVALHANDLE;
return MMDRV_Message(wmld, AUXDM_GETVOLUME, (DWORD_PTR)lpdwVolume, 0L);
}
TRACE("(%04X, %u) !\n", uDeviceID, dwVolume);
- if ((wmld = MMDRV_Get((HANDLE)uDeviceID, MMDRV_AUX, TRUE)) == NULL)
+ if ((wmld = MMDRV_Get(UlongToHandle(uDeviceID), MMDRV_AUX, TRUE)) == NULL)
return MMSYSERR_INVALHANDLE;
return MMDRV_Message(wmld, AUXDM_SETVOLUME, dwVolume, 0L);
}
{
LPWINE_MLD wmld;
- if ((wmld = MMDRV_Get((HANDLE)uDeviceID, MMDRV_AUX, TRUE)) == NULL)
+ if ((wmld = MMDRV_Get(UlongToHandle(uDeviceID), MMDRV_AUX, TRUE)) == NULL)
return MMSYSERR_INVALHANDLE;
return MMDRV_Message(wmld, uMessage, dw1, dw2);
/**************************************************************************
* midiOutOpen [WINMM.@]
*/
-UINT WINAPI midiOutOpen(LPHMIDIOUT lphMidiOut, UINT uDeviceID,
+MMRESULT WINAPI midiOutOpen(LPHMIDIOUT lphMidiOut, UINT_PTR uDeviceID,
DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD dwFlags)
{
HMIDIOUT hMidiOut;
/**************************************************************************
* midiInOpen [WINMM.@]
*/
-UINT WINAPI midiInOpen(HMIDIIN* lphMidiIn, UINT uDeviceID,
+MMRESULT WINAPI midiInOpen(HMIDIIN* lphMidiIn, UINT_PTR uDeviceID,
DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD dwFlags)
{
HANDLE hMidiIn;
return FALSE;
}
- *lpMidiStrm = (WINE_MIDIStream*)lpwm->mod.rgIds.dwStreamID;
+ *lpMidiStrm = (WINE_MIDIStream*)(ULONG_PTR)lpwm->mod.rgIds.dwStreamID;
return *lpMidiStrm != NULL;
}
#endif
if (((LPMIDIEVENT)lpData)->dwStreamID != 0 &&
((LPMIDIEVENT)lpData)->dwStreamID != 0xFFFFFFFF &&
- ((LPMIDIEVENT)lpData)->dwStreamID != (DWORD)lpMidiStrm) {
+ ((LPMIDIEVENT)lpData)->dwStreamID != PtrToLong(lpMidiStrm)) {
FIXME("Dropping bad %s lpMidiHdr (streamID=%08x)\n",
(lpMidiHdr->dwFlags & MHDR_ISSTRM) ? "stream" : "regular",
((LPMIDIEVENT)lpData)->dwStreamID);
lpMidiStrm->dwTimeDiv = 480; /* 480 is 120 quarter notes per minute *//* FIXME ??*/
lpMidiStrm->dwPositionMS = 0;
- mosm.dwStreamID = (DWORD)lpMidiStrm;
+ mosm.dwStreamID = PtrToLong(lpMidiStrm);
/* FIXME: the correct value is not allocated yet for MAPPER */
mosm.wDeviceID = *lpuDeviceID;
lpwm = MIDI_OutAlloc(&hMidiOut, &dwCallback, &dwInstance, &fdwOpen, 1, &mosm);
<file>asn.c</file>
<file>softpub.c</file>
<file>version.rc</file>
- <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
- <compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
</module>
<library>pseh</library>
<library>ntdll</library>
<file>main.c</file>
- <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
- <compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
</module>
return SOCKET_ERROR;
}
- if (!ReferenceProviderByHandle((HANDLE)s, &Provider))
+ if (!ReferenceProviderByHandle((HANDLE)(ULONG_PTR)(s), &Provider))
{
WSASetLastError(WSAENOTSOCK);
return SOCKET_ERROR;
-<module name="ws2_32" type="win32dll" baseaddress="${BASEADDRESS_WS2_32}" installbase="system32" installname="ws2_32.dll" unicode="yes">
+<module name="ws2_32" type="win32dll" baseaddress="${BASEADDRESS_WS2_32}" installbase="system32" installname="ws2_32.dll" unicode="yes" allowwarnings="true">
<importlibrary definition="ws2_32.spec" />
<include base="ws2_32">include</include>
<include base="ReactOS">include/reactos/wine</include>
-<module name="ws2_32_new" type="win32dll" baseaddress="${BASEADDRESS_WS2_32}" installbase="system32" installname="ws2_32_new.dll">
+<module name="ws2_32_new" type="win32dll" baseaddress="${BASEADDRESS_WS2_32}" installbase="system32" installname="ws2_32_new.dll" allowwarnings="true">
<importlibrary definition="ws2_32.spec" />
<include base="ws2_32_new">inc</include>
<include base="ReactOS">include/reactos/winsock</include>
-<module name="ws2help" type="win32dll" baseaddress="${BASEADDRESS_WS2HELP}" installbase="system32" installname="ws2help.dll">
+<module name="ws2help" type="win32dll" baseaddress="${BASEADDRESS_WS2HELP}" installbase="system32" installname="ws2help.dll" allowwarnings="true">
<importlibrary definition="ws2help.spec" />
<include base="ws2help">.</include>
<include base="ReactOS">include/reactos/winsock</include>
<include base="bootvid">.</include>
<library>ntoskrnl</library>
<library>hal</library>
- <if property="ARCH" value="i386">
+ <if property="PLATFORM" value="PC">
<directory name="i386">
<file>bootvid.c</file>
<file>bootdata.c</file>
NTAPI
VidInitialize(IN BOOLEAN SetMode)
{
- ULONG Context = 0;
+ ULONG_PTR Context = 0;
PHYSICAL_ADDRESS TranslatedAddress;
PHYSICAL_ADDRESS NullAddress = {{0, 0}};
ULONG AddressSpace = 1;
do
{
/* Write value in the new position so that we can do the scroll */
- WRITE_REGISTER_UCHAR((PUCHAR)j,
- READ_REGISTER_UCHAR((PUCHAR)j + i));
+ WRITE_REGISTER_UCHAR(UlongToPtr(j),
+ READ_REGISTER_UCHAR(UlongToPtr(j + i)));
/* Move to the next memory location to write to */
j++;
__outpw(0x3CE, 7);
/* Calculate pixel position for the read */
- Offset = VgaBase + (Top * 80) + (PUCHAR)LeftOffset;
+ Offset = VgaBase + (Top * 80) + (PUCHAR)(ULONG_PTR)LeftOffset;
/* Select the bitmask register and write the mask */
__outpw(0x3CE, (USHORT)lMask);
if (Distance)
{
/* Calculate new pixel position */
- Offset = VgaBase + (Top * 80) + (PUCHAR)RightOffset;
+ Offset = VgaBase + (Top * 80) + (PUCHAR)(ULONG_PTR)RightOffset;
Distance--;
/* Select the bitmask register and write the mask */
if (Distance)
{
/* Calculate new pixel position */
- Offset = VgaBase + (Top * 80) + (PUCHAR)(LeftOffset + 1);
+ Offset = VgaBase + (Top * 80) + (PUCHAR)(ULONG_PTR)(LeftOffset + 1);
/* Set the bitmask to 0xFF for all 4 planes */
__outpw(0x3CE, 0xFF08);
* PURPOSE: Serial i/o functions for the kernel debugger.
* PROGRAMMER: Alex Ionescu
* Hervé Poussineau
+ * Timo Kreuzer
*/
/* INCLUDES *****************************************************************/
#define NDEBUG
#include <halfuncs.h>
#include <stdio.h>
+#include <stdlib.h>
#include <debug.h>
#include "arc/arc.h"
#include "windbgkd.h"
{
ULONG ComPort;
ULONG BaudRate;
- ULONG BaseAddress;
+ ULONG_PTR BaseAddress;
} KD_PORT_INFORMATION, *PKD_PORT_INFORMATION;
BOOLEAN
IN PKD_PORT_INFORMATION PortInformation,
IN UCHAR ByteToSend);
+/* serial debug connection */
+#define DEFAULT_DEBUG_PORT 2 /* COM2 */
+#define DEFAULT_DEBUG_COM1_IRQ 4 /* COM1 IRQ */
+#define DEFAULT_DEBUG_COM2_IRQ 3 /* COM2 IRQ */
+#define DEFAULT_DEBUG_BAUD_RATE 115200 /* 115200 Baud */
+
#define DEFAULT_BAUD_RATE 19200
#ifdef _M_IX86
const ULONG BaseArray[3] = {0, 0x80006000, 0x80007000};
#elif defined(_M_ARM)
const ULONG BaseArray[2] = {0, 0xF1012000};
+#elif defined(_M_AMD64)
+const ULONG BaseArray[5] = {0, 0x3F8, 0x2F8, 0x3E8, 0x2E8};
#else
#error Unknown architecture
#endif
/* GLOBAL VARIABLES *********************************************************/
+ULONG CurrentPacketId = INITIAL_PACKET_ID;
+
/* STATIC VARIABLES *********************************************************/
static KD_PORT_INFORMATION DefaultPort = { 0, 0, 0 };
/* The com port must only be initialized once! */
static BOOLEAN PortInitialized = FALSE;
+ULONG KdpPort;
+ULONG KdpPortIrq;
+
+// HACK!!!
+typedef ULONG (*DBGRNT)(const char *Format, ...);
+DBGRNT FrLdrDbgPrint = 0;
/* STATIC FUNCTIONS *********************************************************/
static BOOLEAN
KdpDoesComPortExist(
- IN ULONG BaseAddress)
+ IN ULONG_PTR BaseAddress)
{
BOOLEAN found;
UCHAR mcr;
/* FUNCTIONS ****************************************************************/
+NTSTATUS
+DriverEntry(
+ IN PDRIVER_OBJECT DriverObject,
+ IN PUNICODE_STRING RegistryPath)
+{
+ return STATUS_SUCCESS;
+}
+
/* HAL.KdPortInitialize */
BOOLEAN
NTAPI
IN ULONG Unknown1,
IN ULONG Unknown2)
{
- ULONG ComPortBase;
+ ULONG_PTR ComPortBase;
CHAR buffer[80];
ULONG divisor;
UCHAR lcr;
return TRUE;
}
-/*
- * @unimplemented
+/* NEW INTERNAL FUNCTIONS ****************************************************/
+
+/******************************************************************************
+ * \name KdpCalculateChecksum
+ * \brief Calculates the checksum for the packet data.
+ * \param Buffer Pointer to the packet data.
+ * \param Length Length of data in bytes.
+ * \return The calculated checksum.
+ * \sa http://www.vista-xp.co.uk/forums/technical-reference-library/2540-basics-debugging.html
+ */
+ULONG
+NTAPI
+KdpCalculateChecksum(
+ IN PVOID Buffer,
+ IN ULONG Length)
+{
+ ULONG i, Checksum = 0;
+
+ for (i = 0; i < Length; i++)
+ {
+ Checksum += ((PUCHAR)Buffer)[i];
+ }
+ return Checksum;
+}
+
+/******************************************************************************
+ * \name KdpSendBuffer
+ * \brief Sends a buffer of data to the KD port.
+ * \param Buffer Pointer to the data.
+ * \param Size Size of data in bytes.
+ */
+VOID
+NTAPI
+KdpSendBuffer(
+ IN PVOID Buffer,
+ IN ULONG Size)
+{
+ INT i;
+ for (i = 0; i < Size; i++)
+ {
+ KdPortPutByteEx(&DefaultPort, ((PUCHAR)Buffer)[i]);
+ }
+}
+
+
+/******************************************************************************
+ * \name KdpReceiveBuffer
+ * \brief Recieves data from the KD port and fills a buffer.
+ * \param Buffer Pointer to a buffer that receives the data.
+ * \param Size Size of data to receive in bytes.
+ * \return KdPacketReceived if successful.
+ * KdPacketTimedOut if the receice timed out (10 seconds).
+ * \todo Handle timeout.
+ */
+KDSTATUS
+NTAPI
+KdpReceiveBuffer(
+ OUT PVOID Buffer,
+ IN ULONG Size)
+{
+ ULONG i;
+ PUCHAR ByteBuffer = Buffer;
+ BOOLEAN Ret, TimeOut;
+
+ for (i = 0; i < Size; i++)
+ {
+ do
+ {
+ Ret = KdPortGetByteEx(&DefaultPort, &ByteBuffer[i]);
+ TimeOut = FALSE; // FIXME timeout after 10 Sec
+ }
+ while (!Ret || TimeOut);
+
+ if (TimeOut)
+ {
+ return KdPacketTimedOut;
+ }
+// FrLdrDbgPrint("Received byte: %x\n", ByteBuffer[i]);
+ }
+
+ return KdPacketReceived;
+}
+
+KDSTATUS
+NTAPI
+KdpReceivePacketLeader(
+ OUT PULONG PacketLeader)
+{
+ UCHAR Byte, PrevByte;
+ ULONG i, Temp;
+ KDSTATUS RcvCode;
+
+ Temp = 0;
+ PrevByte = 0;
+ for (i = 0; i < 4; i++)
+ {
+ RcvCode = KdpReceiveBuffer(&Byte, sizeof(UCHAR));
+ Temp = (Temp << 8) | Byte;
+ if ( (RcvCode != KdPacketReceived) ||
+ ((Byte != PACKET_LEADER_BYTE) &&
+ (Byte != CONTROL_PACKET_LEADER_BYTE)) ||
+ (PrevByte != 0 && Byte != PrevByte) )
+ {
+ return KdPacketNeedsResend;
+ }
+ PrevByte = Byte;
+ }
+
+ *PacketLeader = Temp;
+
+ return KdPacketReceived;
+}
+
+
+VOID
+NTAPI
+KdpSendControlPacket(
+ IN USHORT PacketType,
+ IN ULONG PacketId OPTIONAL)
+{
+ KD_PACKET Packet;
+
+ Packet.PacketLeader = CONTROL_PACKET_LEADER;
+ Packet.PacketId = PacketId;
+ Packet.ByteCount = 0;
+ Packet.Checksum = 0;
+ Packet.PacketType = PacketType;
+
+ KdpSendBuffer(&Packet, sizeof(KD_PACKET));
+}
+
+
+/* NEW PUBLIC FUNCTIONS ******************************************************/
+
+/******************************************************************************
+ * \name KdDebuggerInitialize0
+ * \brief Phase 0 initialization.
+ * \param [opt] LoaderBlock Pointer to the Loader parameter block. Can be NULL.
+ * \return Status
*/
NTSTATUS
NTAPI
KdDebuggerInitialize0(
IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL)
{
- return STATUS_NOT_IMPLEMENTED;
+ ULONG Value;
+ PCHAR CommandLine, Port, BaudRate, Irq;
+
+ /* Apply default values */
+ KdpPortIrq = 0;
+ DefaultPort.ComPort = DEFAULT_DEBUG_PORT;
+ DefaultPort.BaudRate = DEFAULT_DEBUG_BAUD_RATE;
+
+ /* Check if e have a LoaderBlock */
+ if (LoaderBlock)
+ {
+ /* Get the Command Line */
+ CommandLine = LoaderBlock->LoadOptions;
+
+ /* Upcase it */
+ _strupr(CommandLine);
+
+ /* Get the port and baud rate */
+ Port = strstr(CommandLine, "DEBUGPORT");
+ BaudRate = strstr(CommandLine, "BAUDRATE");
+ Irq = strstr(CommandLine, "IRQ");
+
+ /* Check if we got the /DEBUGPORT parameter */
+ if (Port)
+ {
+ /* Move past the actual string, to reach the port*/
+ Port += strlen("DEBUGPORT");
+
+ /* Now get past any spaces and skip the equal sign */
+ while (*Port == ' ') Port++;
+ Port++;
+
+ /* Do we have a serial port? */
+ if (strncmp(Port, "COM", 3) != 0)
+ {
+ return STATUS_INVALID_PARAMETER;
+ }
+
+ /* Gheck for a valid Serial Port */
+ Port += 3;
+ Value = atol(Port);
+ if (Value > 4)
+ {
+ return STATUS_INVALID_PARAMETER;
+ }
+
+ /* Set the port to use */
+ DefaultPort.ComPort = Value;
+ }
+
+ /* Check if we got a baud rate */
+ if (BaudRate)
+ {
+ /* Move past the actual string, to reach the rate */
+ BaudRate += strlen("BAUDRATE");
+
+ /* Now get past any spaces */
+ while (*BaudRate == ' ') BaudRate++;
+
+ /* And make sure we have a rate */
+ if (*BaudRate)
+ {
+ /* Read and set it */
+ Value = atol(BaudRate + 1);
+ if (Value) DefaultPort.BaudRate = Value;
+ }
+ }
+
+ /* Check Serial Port Settings [IRQ] */
+ if (Irq)
+ {
+ /* Move past the actual string, to reach the rate */
+ Irq += strlen("IRQ");
+
+ /* Now get past any spaces */
+ while (*Irq == ' ') Irq++;
+
+ /* And make sure we have an IRQ */
+ if (*Irq)
+ {
+ /* Read and set it */
+ Value = atol(Irq + 1);
+ if (Value) KdpPortIrq = Value;
+ }
+ }
+ }
+
+ // HACK use com1 for FrLdrDbg, com2 for WinDbg
+ DefaultPort.ComPort = 2;
+
+ /* Get base address */
+ DefaultPort.BaseAddress = BaseArray[DefaultPort.ComPort];
+
+ /* Check if the COM port does exist */
+ if (!KdpDoesComPortExist(DefaultPort.BaseAddress))
+ {
+ return STATUS_INVALID_PARAMETER;
+ }
+
+ /* Initialize the port */
+ KdPortInitializeEx(&DefaultPort, 0, 0);
+ PortInitialized = TRUE;
+
+ return STATUS_SUCCESS;
}
-/*
- * @unimplemented
+/******************************************************************************
+ * \name KdDebuggerInitialize1
+ * \brief Phase 1 initialization.
+ * \param [opt] LoaderBlock Pointer to the Loader parameter block. Can be NULL.
+ * \return Status
*/
NTSTATUS
NTAPI
KdDebuggerInitialize1(
IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL)
{
+ // HACK: misuse this function to get a pointer to FrLdrDbgPrint
+ FrLdrDbgPrint = (PVOID)LoaderBlock;
return STATUS_NOT_IMPLEMENTED;
}
IN PSTRING MessageData,
IN OUT PKD_CONTEXT Context)
{
- UNIMPLEMENTED;
+ KD_PACKET Packet;
+ KDSTATUS RcvCode;
+
+ for (;;)
+ {
+ /* Initialize a KD_PACKET */
+ Packet.PacketLeader = PACKET_LEADER;
+ Packet.PacketType = PacketType;
+ Packet.ByteCount = MessageHeader->Length;
+ Packet.Checksum = KdpCalculateChecksum(MessageHeader->Buffer,
+ MessageHeader->Length);
+
+ /* If we have message data, add it to the packet */
+ if (MessageData)
+ {
+ Packet.ByteCount += MessageData->Length;
+ Packet.Checksum += KdpCalculateChecksum(MessageData->Buffer,
+ MessageData->Length);
+ }
+
+ /* Set the packet id */
+ Packet.PacketId = CurrentPacketId;
+
+ /* Send the packet header to the KD port */
+ KdpSendBuffer(&Packet, sizeof(KD_PACKET));
+
+ /* Send the message header */
+ KdpSendBuffer(MessageHeader->Buffer, MessageHeader->Length);
+
+ /* If we have meesage data, also send it */
+ if (MessageData)
+ {
+ KdpSendBuffer(MessageData->Buffer, MessageData->Length);
+ }
+
+ /* Finalize with a trailing byte */
+ KdPortPutByte(PACKET_TRAILING_BYTE);
+
+ /* Wait for acknowledge */
+ RcvCode = KdReceivePacket(PACKET_TYPE_KD_ACKNOWLEDGE,
+ NULL,
+ NULL,
+ 0,
+ NULL);
+
+ /* Did we succeed? */
+ if (RcvCode == KdPacketReceived)
+ {
+ CurrentPacketId &= ~SYNC_PACKET_ID;
+ break;
+ }
+
+ /* PACKET_TYPE_KD_DEBUG_IO is allowed to instantly timeout */
+ if (PacketType == PACKET_TYPE_KD_DEBUG_IO)
+ {
+ /* No response, silently fail. */
+// return;
+ }
+
+ /* Packet timed out, send it again */
+ }
+
return;
}
-/*
- * @unimplemented
+
+/******************************************************************************
+ * \name KdReceivePacket
+ * \brief Receive a packet from the KD port.
+ * \param [in] PacketType Describes the type of the packet to receive.
+ * This can be one of the PACKET_TYPE_ constants.
+ * \param [out] MessageHeader Pointer to a STRING structure for the header.
+ * \param [out] MessageData Pointer to a STRING structure for the data.
+ * \return KdPacketReceived if successful, KdPacketTimedOut if the receive
+ * timed out, KdPacketNeedsResend to signal that the last packet needs
+ * to be sent again.
+ * \note If PacketType is PACKET_TYPE_KD_POLL_BREAKIN, the function doesn't
+ * wait for any data, but returns KdPacketTimedOut instantly if no breakin
+ * packet byte is received.
+ * \sa http://www.nynaeve.net/?p=169
*/
KDSTATUS
NTAPI
OUT PULONG DataLength,
IN OUT PKD_CONTEXT Context)
{
- UNIMPLEMENTED;
- return 0;
+ UCHAR Byte = 0;
+ KDSTATUS RcvCode;
+ KD_PACKET Packet;
+ ULONG Checksum;
+
+ /* Special handling for breakin packet */
+ if(PacketType == PACKET_TYPE_KD_POLL_BREAKIN)
+ {
+ if (KdPortGetByteEx(&DefaultPort, &Byte))
+ {
+ if (Byte == BREAKIN_PACKET_BYTE)
+ {
+ return KdPacketReceived;
+ }
+ }
+ return KdPacketTimedOut;
+ }
+
+ for (;;)
+ {
+ /* Step 1 - Read PacketLeader */
+ RcvCode = KdpReceivePacketLeader(&Packet.PacketLeader);
+ if (RcvCode != KdPacketReceived)
+ {
+ /* Couldn't read a correct packet leader. Start over. */
+ continue;
+ }
+
+ /* Step 2 - Read PacketType */
+ RcvCode = KdpReceiveBuffer(&Packet.PacketType, sizeof(USHORT));
+ if (RcvCode != KdPacketReceived)
+ {
+ /* Didn't receive a PacketType or PacketType is bad. Start over. */
+ continue;
+ }
+
+ /* Step 3 - Read ByteCount */
+ RcvCode = KdpReceiveBuffer(&Packet.ByteCount, sizeof(USHORT));
+ if (RcvCode != KdPacketReceived || Packet.ByteCount > PACKET_MAX_SIZE)
+ {
+ /* Didn't receive ByteCount or it's too big. Start over. */
+ continue;
+ }
+
+ /* Step 4 - Read PacketId */
+ RcvCode = KdpReceiveBuffer(&Packet.PacketId, sizeof(ULONG));
+ if (RcvCode != KdPacketReceived)
+ {
+ /* Didn't receive PacketId. Start over. */
+ continue;
+ }
+
+/*
+ if (Packet.PacketId != ExpectedPacketId)
+ {
+ // Ask for a resend!
+ continue;
+ }
+*/
+
+ /* Step 5 - Read Checksum */
+ RcvCode = KdpReceiveBuffer(&Packet.Checksum, sizeof(ULONG));
+ if (RcvCode != KdPacketReceived)
+ {
+ /* Didn't receive Checksum. Start over. */
+ continue;
+ }
+
+ /* Step 6 - Handle control packets */
+ if (Packet.PacketLeader == CONTROL_PACKET_LEADER)
+ {
+ switch (Packet.PacketType)
+ {
+ case PACKET_TYPE_KD_ACKNOWLEDGE:
+ if (PacketType == PACKET_TYPE_KD_ACKNOWLEDGE)
+ {
+ /* Remote acknowledges the last packet */
+ CurrentPacketId ^= 1;
+ return KdPacketReceived;
+ }
+ /* That's not what we were waiting for, start over. */
+ continue;
+
+ case PACKET_TYPE_KD_RESET:
+ FrLdrDbgPrint("KdReceivePacket - got a reset packet\n");
+ KdpSendControlPacket(PACKET_TYPE_KD_RESET, 0);
+ CurrentPacketId = INITIAL_PACKET_ID;
+ /* Fall through */
+
+ case PACKET_TYPE_KD_RESEND:
+ /* Remote wants us to resend the last packet */
+ return KdPacketNeedsResend;
+
+ default:
+ FrLdrDbgPrint("KdReceivePacket - got unknown control packet\n");
+ return KdPacketNeedsResend;
+ }
+ }
+
+ /* Did we wait for an ack packet? */
+ if (PacketType == PACKET_TYPE_KD_ACKNOWLEDGE)
+ {
+ /* We received something different, start over */
+ continue;
+ }
+
+ /* Did we get the right packet type? */
+ if (PacketType != Packet.PacketType)
+ {
+ /* We received something different, start over */
+ continue;
+ }
+
+ /* Get size of the message header */
+ switch (Packet.PacketType)
+ {
+ case PACKET_TYPE_KD_STATE_CHANGE64:
+ MessageHeader->Length = sizeof(DBGKD_WAIT_STATE_CHANGE64);
+ break;
+
+ case PACKET_TYPE_KD_STATE_MANIPULATE:
+ MessageHeader->Length = sizeof(DBGKD_MANIPULATE_STATE64);
+ break;
+
+ case PACKET_TYPE_KD_DEBUG_IO:
+ MessageHeader->Length = sizeof(DBGKD_DEBUG_IO);
+ break;
+
+ default:
+ FrLdrDbgPrint("KdReceivePacket - unknown PacketType\n");
+ return KdPacketNeedsResend;
+ }
+
+//FrLdrDbgPrint("KdReceivePacket - got normal PacketType\n");
+
+ /* Packet smaller than expected? */
+ if (MessageHeader->Length > Packet.ByteCount)
+ {
+ FrLdrDbgPrint("KdReceivePacket - too few data (%d) for type %d\n",
+ Packet.ByteCount, MessageHeader->Length);
+ MessageHeader->Length = Packet.ByteCount;
+ }
+
+//FrLdrDbgPrint("KdReceivePacket - got normal PacketType, Buffer = %p\n", MessageHeader->Buffer);
+
+ /* Receive the message header data */
+ RcvCode = KdpReceiveBuffer(MessageHeader->Buffer,
+ MessageHeader->Length);
+ if (RcvCode != KdPacketReceived)
+ {
+ /* Didn't receive data. Start over. */
+ FrLdrDbgPrint("KdReceivePacket - Didn't receive message header data. Start over\n");
+ continue;
+ }
+
+//FrLdrDbgPrint("KdReceivePacket - got normal PacketType 3\n");
+
+ /* Calculate checksum for the header data */
+ Checksum = KdpCalculateChecksum(MessageHeader->Buffer,
+ MessageHeader->Length);
+
+ /* Shall we receive messsage data? */
+ if (MessageData)
+ {
+ /* Calculate the length of the message data */
+ MessageData->Length = Packet.ByteCount - MessageHeader->Length;
+
+ /* Do we have data? */
+ if (MessageData->Length)
+ {
+ FrLdrDbgPrint("KdReceivePacket - got data\n");
+
+ /* Receive the message data */
+ RcvCode = KdpReceiveBuffer(MessageData->Buffer,
+ MessageData->Length);
+ if (RcvCode != KdPacketReceived)
+ {
+ /* Didn't receive data. Start over. */
+ FrLdrDbgPrint("KdReceivePacket - Didn't receive message data. Start over\n");
+ continue;
+ }
+
+ /* Add cheksum for message data */
+ Checksum += KdpCalculateChecksum(MessageData->Buffer,
+ MessageData->Length);
+ }
+ }
+
+ /* Compare checksum */
+ if (Packet.Checksum != Checksum)
+ {
+ KdpSendControlPacket(PACKET_TYPE_KD_RESEND, CurrentPacketId);
+ FrLdrDbgPrint("KdReceivePacket - wrong cheksum, got %x, calculated %x\n",
+ Packet.Checksum, Checksum);
+ continue;
+ }
+
+ /* We must receive a PACKET_TRAILING_BYTE now */
+ RcvCode = KdpReceiveBuffer(&Byte, sizeof(UCHAR));
+
+ /* Acknowledge the received packet */
+ KdpSendControlPacket(PACKET_TYPE_KD_ACKNOWLEDGE, Packet.PacketId);
+
+//FrLdrDbgPrint("KdReceivePacket - all ok\n");
+
+ return KdPacketReceived;
+ }
+
+ return KdPacketReceived;
}
/* EOF */
if (KdStatus != KDP_PACKET_RECEIVED)
{
/* Didn't receive a PacketType. */
+ KDDBGPRINT("KdReceivePacket - Didn't receive a PacketType.\n");
return KdStatus;
}
if (Packet.PacketLeader == CONTROL_PACKET_LEADER &&
Packet.PacketType == PACKET_TYPE_KD_RESEND)
{
+ KDDBGPRINT("KdReceivePacket - PACKET_TYPE_KD_RESEND.\n");
return KDP_PACKET_RESEND;
}
if (KdStatus != KDP_PACKET_RECEIVED)
{
/* Didn't receive ByteCount. */
+ KDDBGPRINT("KdReceivePacket - Didn't receive ByteCount.\n");
return KdStatus;
}
if (KdStatus != KDP_PACKET_RECEIVED)
{
/* Didn't receive PacketId. */
+ KDDBGPRINT("KdReceivePacket - Didn't receive PacketId.\n");
return KdStatus;
}
if (KdStatus != KDP_PACKET_RECEIVED)
{
/* Didn't receive Checksum. */
+ KDDBGPRINT("KdReceivePacket - Didn't receive Checksum.\n");
return KdStatus;
}
/* Do we have data? */
if (MessageData->Length)
{
- KDDBGPRINT("KdReceivePacket - got data\n");
+ KDDBGPRINT("KdReceivePacket - 0x%lx bytes data\n", *DataLength);
/* Receive the message data */
KdStatus = KdpReceiveBuffer(MessageData->Buffer,
if (Packet.PacketId != RemotePacketId)
{
/* Continue with next packet */
+ KDDBGPRINT("KdReceivePacket - Wrong PacketId.\n");
continue;
}
acpi_ds_get_predicate_value (
ACPI_WALK_STATE *walk_state,
ACPI_PARSE_OBJECT *op,
- u32 has_result_obj)
+ NATIVE_UINT has_result_obj)
{
ACPI_STATUS status = AE_OK;
ACPI_OPERAND_OBJECT *obj_desc;
(walk_state->control_state->common.state ==
CONTROL_PREDICATE_EXECUTING) &&
(walk_state->control_state->control.predicate_op == op)) {
- status = acpi_ds_get_predicate_value (walk_state, op, (u32) result_obj);
+ status = acpi_ds_get_predicate_value (walk_state, op, (NATIVE_UINT) result_obj);
result_obj = NULL;
}
acpi_ev_asynch_execute_gpe_method (
void *context)
{
- u32 gpe_number = (u32) context;
+ NATIVE_UINT gpe_number = (NATIVE_UINT) context;
ACPI_GPE_LEVEL_INFO gpe_info;
acpi_ds_get_predicate_value (
ACPI_WALK_STATE *walk_state,
ACPI_PARSE_OBJECT *op,
- u32 has_result_obj);
+ NATIVE_UINT has_result_obj);
ACPI_STATUS
acpi_ds_exec_begin_op (
*/
-#ifdef _IA64
+#if defined (_IA64) || defined(_AMD64_)
/*
* 64-bit type definitions
*/
-typedef unsigned char UINT8;
-typedef unsigned char BOOLEAN;
-typedef unsigned char UCHAR;
-typedef unsigned short UINT16;
-typedef int INT32;
-typedef unsigned int UINT32;
-typedef COMPILER_DEPENDENT_UINT64 UINT64;
+//typedef unsigned char UINT8;
+//typedef unsigned char BOOLEAN;
+//typedef unsigned char UCHAR;
+//typedef unsigned short UINT16;
+//typedef int INT32;
+//typedef unsigned int UINT32;
+//typedef COMPILER_DEPENDENT_UINT64 UINT64;
typedef UINT64 NATIVE_UINT;
typedef INT64 NATIVE_INT;
} while (0)
/*! [End] no source code translation !*/
+#elif defined (_AMD64_)
+
+#define COMPILER_DEPENDENT_UINT64 unsigned long long
+#define ACPI_ASM_MACROS
+#define causeinterrupt(level)
+#define BREAKPOINT3
+#define disable() __cli()
+#define enable() __sti()
+#define halt() __asm__ __volatile__ ("sti; hlt":::"memory")
+#define wbinvd()
+
+/*! [Begin] no source code translation
+ *
+ * A brief explanation as GNU inline assembly is a bit hairy
+ * %0 is the output parameter in EAX ("=a")
+ * %1 and %2 are the input parameters in ECX ("c")
+ * and an immediate value ("i") respectively
+ * All actual register references are preceded with "%%" as in "%%edx"
+ * Immediate values in the assembly are preceded by "$" as in "$0x1"
+ * The final asm parameter are the operation altered non-output registers.
+ */
+
+// FIXME: These are only sonly stubs to make it compile
+
+#define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) \
+ do { \
+ int dummy; \
+ asm("1: movl (%1),%%eax;" \
+ "movl %%eax,%%edx;" \
+ :"=a"(Acq),"=c"(dummy):"c"(GLptr),"i"(~1L):"dx"); \
+ } while(0)
+
+#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) \
+ do { \
+ int dummy; \
+ asm("1: movl (%1),%%eax;" \
+ "movl %%eax,%%edx;" \
+ :"=a"(Acq),"=c"(dummy):"c"(GLptr),"i"(~3L):"dx"); \
+ } while(0)
+
+/*! [End] no source code translation !*/
#else /* DO IA32 */
+
#define COMPILER_DEPENDENT_UINT64 unsigned long long
#define ACPI_ASM_MACROS
#define causeinterrupt(level)
case io:
{
IO_RESOURCE *io_data = (IO_RESOURCE*) &resource->data;
- if (KdComPortInUse == (PUCHAR)io_data->min_base_address)
+ if (KdComPortInUse == UlongToPtr(io_data->min_base_address))
{
ExFreePool(Buffer.pointer);
return TRUE;
CurrentEntry = CurrentEntry->Flink;
}
- Irp->IoStatus.Information = (ULONG)Relations;
+ Irp->IoStatus.Information = (ULONG_PTR)Relations;
return Status;
}
u8
acpi_os_mem_in8 (ACPI_PHYSICAL_ADDRESS phys_addr)
{
- return (*(PUCHAR)(ULONG)phys_addr);
+ return (*(PUCHAR)(ULONG_PTR)phys_addr);
}
u16
acpi_os_mem_in16 (ACPI_PHYSICAL_ADDRESS phys_addr)
{
- return (*(PUSHORT)(ULONG)phys_addr);
+ return (*(PUSHORT)(ULONG_PTR)phys_addr);
}
u32
acpi_os_mem_in32 (ACPI_PHYSICAL_ADDRESS phys_addr)
{
- return (*(PULONG)(ULONG)phys_addr);
+ return (*(PULONG)(ULONG_PTR)phys_addr);
}
void
acpi_os_mem_out8 (ACPI_PHYSICAL_ADDRESS phys_addr, u8 value)
{
- *(PUCHAR)(ULONG)phys_addr = value;
+ *(PUCHAR)(ULONG_PTR)phys_addr = value;
}
void
acpi_os_mem_out16 (ACPI_PHYSICAL_ADDRESS phys_addr, u16 value)
{
- *(PUSHORT)(ULONG)phys_addr = value;
+ *(PUSHORT)(ULONG_PTR)phys_addr = value;
}
void
acpi_os_mem_out32 (ACPI_PHYSICAL_ADDRESS phys_addr, u32 value)
{
- *(PULONG)(ULONG)phys_addr = value;
+ *(PULONG)(ULONG_PTR)phys_addr = value;
}
ACPI_STATUS
u32
acpi_os_get_thread_id (void)
{
- return (ULONG)PsGetCurrentThreadId() + 1;
+ return (ULONG_PTR)PsGetCurrentThreadId() + 1;
}
MODULE_NAME ("cminit")
-#define ACPI_OFFSET(d,o) ((u32) &(((d *)0)->o))
+#define ACPI_OFFSET(d,o) ((NATIVE_INT) &(((d *)0)->o))
#define ACPI_FADT_OFFSET(o) ACPI_OFFSET (FADT_DESCRIPTOR, o)
/*******************************************************************************
}
#endif
-static __inline VOID SetReadDataPort(ULONG Port)
+static __inline VOID SetReadDataPort(ULONG_PTR Port)
{
IsaPnPReadPort = (PUCHAR)Port;
WriteUchar(0x00, (UCHAR) (Port >> 2));
#define READ_DATA_PORT_STEP 32 /* Minimum is 4 */
-static ULONG FindNextReadPort(VOID)
+static ULONG_PTR FindNextReadPort(VOID)
{
- ULONG Port;
+ ULONG_PTR Port;
- Port = (ULONG)IsaPnPReadPort;
+ Port = (ULONG_PTR)IsaPnPReadPort;
while (TRUE) {
static BOOLEAN IsolateReadDataPortSelect(VOID)
{
- ULONG Port;
+ ULONG_PTR Port;
SendWait();
SendKey();
KeStallExecutionProcessor(250);
iteration++;
SendWake(0x00);
- SetReadDataPort((ULONG)IsaPnPReadPort);
+ SetReadDataPort((ULONG_PTR)IsaPnPReadPort);
KeStallExecutionProcessor(1000);
WriteAddress(0x01);
KeStallExecutionProcessor(1000);
do {
Status = BuildResourceList(LogicalDevice, p, Priority);
if (NT_SUCCESS(Status)) {
- p = (PIO_RESOURCE_LIST)((ULONG)p + SingleListSize);
+ p = (PIO_RESOURCE_LIST)((ULONG_PTR)p + SingleListSize);
Priority++;
}
} while (Status != STATUS_NOT_FOUND);
CurrentEntry = CurrentEntry->Flink;
}
- Irp->IoStatus.Information = (ULONG)Relations;
+ Irp->IoStatus.Information = (ULONG_PTR)Relations;
return Status;
}
FASTCALL
VerifyObjectOwner(PDD_ENTRY pEntry)
{
- DWORD Pid = (DWORD) PsGetCurrentProcessId() & 0xFFFFFFFC;
+ DWORD Pid = (DWORD)(DWORD_PTR)PsGetCurrentProcessId() & 0xFFFFFFFC;
DWORD check = pEntry->ObjectOwner.ulObj & 0xFFFFFFFE;
return ( (check == Pid) || (!check));
}
DdHmgLock(HANDLE DdHandle, UCHAR ObjectType, BOOLEAN LockOwned)
{
- DWORD Index = (DWORD)DdHandle & 0x1FFFFF;
+ DWORD Index = (DWORD)(DWORD_PTR)DdHandle & 0x1FFFFF;
PDD_ENTRY pEntry = NULL;
PVOID Object = NULL;
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
-<module name="ext2fs" type="kernelmodedriver" installbase="system32/drivers" installname="ext2.sys">
+<module name="ext2fs" type="kernelmodedriver" installbase="system32/drivers" installname="ext2.sys" allowwarnings="true">
<bootstrap installbase="$(CDOUTPUT)" />
<include base="ext2fs">inc</include>
<compilerflag compilerset="msc">/wd4003</compilerflag>
*lcn = 0;
- for (run = (PUCHAR)((ULONG)NresAttr + NresAttr->RunArrayOffset);
+ for (run = (PUCHAR)((ULONG_PTR)NresAttr + NresAttr->RunArrayOffset);
*run != 0; run += RunLength(run))
{
*lcn += RunLCN(run);
{
Name.Length = Attribute->NameLength * sizeof(WCHAR);
Name.MaximumLength = Name.Length;
- Name.Buffer = (PWCHAR)((ULONG)Attribute + Attribute->NameOffset);
+ Name.Buffer = (PWCHAR)((ULONG_PTR)Attribute + Attribute->NameOffset);
DbgPrint("'%wZ' ", &Name);
}
/* Register GUID_DEVICE_SYS_BUTTON interface and report capability */
if (DeviceExtension->NewCaps != DeviceExtension->ReportedCaps)
{
- WaitingIrp = InterlockedExchangePointer(&DeviceExtension->PowerIrp, NULL);
+ WaitingIrp = InterlockedExchangePointer((PVOID)&DeviceExtension->PowerIrp, NULL);
if (WaitingIrp)
{
/* Cancel the current power irp, as capability changed */
}
/* Directly complete the IOCTL_GET_SYS_BUTTON_EVENT Irp (if any) */
- WaitingIrp = InterlockedExchangePointer(&DeviceExtension->PowerIrp, NULL);
+ WaitingIrp = InterlockedExchangePointer((PVOID)&DeviceExtension->PowerIrp, NULL);
if (WaitingIrp)
{
PULONG pEvent = (PULONG)WaitingIrp->AssociatedIrp.SystemBuffer;
else
{
WaitingIrp = InterlockedCompareExchangePointer(
- &DeviceExtension->PowerIrp,
+ (PVOID)&DeviceExtension->PowerIrp,
Irp,
NULL);
/* Check if an Irp is already pending */
PowerKey = InterlockedExchange((PLONG)&DeviceExtension->LastPowerKey, 0);
if (PowerKey != 0)
{
- (VOID)InterlockedCompareExchangePointer(&DeviceExtension->PowerIrp, NULL, Irp);
+ (VOID)InterlockedCompareExchangePointer((PVOID)&DeviceExtension->PowerIrp, NULL, Irp);
*(PULONG)Irp->AssociatedIrp.SystemBuffer = PowerKey;
Status = STATUS_SUCCESS;
Irp->IoStatus.Status = Status;
<file>misc.c</file>
<file>setup.c</file>
<file>kbdclass.rc</file>
- <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
- <compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
</module>
<file>misc.c</file>
<file>mouclass.c</file>
<file>mouclass.rc</file>
- <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
- <compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
</module>
{
/* release object */
ObDereferenceObject(EventEntry->Object);
- }
+}
/* free event entry */
ExFreePool(EventEntry);
{
/* signal event */
KeSetEvent(EntryEvent->Object, EntryEvent->Reserved, FALSE);
- }
+}
else if (EntryEvent->NotificationType == KSEVENTF_SEMAPHORE_HANDLE || EntryEvent->NotificationType == KSEVENTF_SEMAPHORE_OBJECT)
{
/* release semaphore */
<library>ntoskrnl</library>
<library>hal</library>
<directory name="include">
- <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269
<pch>afd.h</pch>
- -->
</directory>
<directory name="afd">
<file>bind.c</file>
<file>write.c</file>
</directory>
<file>afd.rc</file>
- <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
- <compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
</module>
if( !HandleArray[i].Handle ) continue;
if( NT_SUCCESS(Status) ) {
Status = ObReferenceObjectByHandle
- ( (PVOID)HandleArray[i].Handle,
+ ( (PVOID)(ULONG_PTR)HandleArray[i].Handle,
FILE_ALL_ACCESS,
NULL,
KernelMode,
for( i = 0; i < HandleCount; i++ ) {
if( HandleArray[i].Handle )
- ObDereferenceObject( (PVOID)HandleArray[i].Handle );
+ ObDereferenceObject( (PVOID)(ULONG_PTR)HandleArray[i].Handle );
}
ExFreePool( HandleArray );
for( i = 0; i < Len; i++ ) {
if( i && !(i & 0xf) ) DbgPrint( "\n" );
- if( !(i & 0xf) ) DbgPrint( "%08x: ", (UINT)(Data + i) );
+ if( !(i & 0xf) ) DbgPrint( "%08x: ", (UINT_PTR)(Data + i) );
DbgPrint( " %02x", Data[i] & 0xff );
}
DbgPrint("\n");
NDIS_MINIPORT_INTERRUPT Interrupt;
/* I/O base address and interrupt number of adapter */
- ULONG IoBaseAddress;
+ ULONG_PTR IoBaseAddress;
ULONG InterruptLevel;
ULONG InterruptVector;
BOOLEAN InterruptShared;
VOID NICReadDataAlign(
PNIC_ADAPTER Adapter,
PUSHORT Target,
- ULONG Source,
+ ULONG_PTR Source,
USHORT Length);
VOID NICWriteDataAlign(
PNIC_ADAPTER Adapter,
- ULONG Target,
+ ULONG_PTR Target,
PUSHORT Source,
USHORT Length);
VOID NICReadData(
PNIC_ADAPTER Adapter,
PUCHAR Target,
- ULONG Source,
+ ULONG_PTR Source,
USHORT Length);
VOID NICWriteData(
PNIC_ADAPTER Adapter,
- ULONG Target,
+ ULONG_PTR Target,
PUCHAR Source,
USHORT Length);
#include <debug.h>
/* Null-terminated array of ports to probe. This is "semi-risky" (Don Becker). */
-ULONG ProbeAddressList[] = { 0x280, 0x300, 0x320, 0x340, 0x360, 0x380, 0 };
+ULONG_PTR ProbeAddressList[] = { 0x280, 0x300, 0x320, 0x340, 0x360, 0x380, 0 };
static BOOLEAN ProbeAddressForNIC(
- ULONG address)
+ ULONG_PTR address)
/*
* FUNCTION: Probes an address for a NIC
* ARGUMENTS:
* Start at 1KB and test for every 1KB up to 64KB
*/
{
- ULONG Base;
+ ULONG_PTR Base;
NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
RtlZeroMemory(Descriptor, sizeof(RECEIVE_DESCRIPTOR));
Descriptor->RBADR =
- (ULONG)(Adapter->ReceiveBufferPtrPhys + Adapter->CurrentReceiveDescriptorIndex * BUFFER_SIZE);
+ (ULONG_PTR)(Adapter->ReceiveBufferPtrPhys + Adapter->CurrentReceiveDescriptorIndex * BUFFER_SIZE);
Descriptor->BCNT = (-BUFFER_SIZE) | 0xf000;
Descriptor->FLAGS |= RD_OWN;
return NDIS_STATUS_RESOURCES;
}
- if(((ULONG)Adapter->InitializationBlockVirt & 0x00000003) != 0)
+ if(((ULONG_PTR)Adapter->InitializationBlockVirt & 0x00000003) != 0)
{
DPRINT("address 0x%x not dword-aligned\n", Adapter->InitializationBlockVirt);
BREAKPOINT;
return NDIS_STATUS_RESOURCES;
}
- Adapter->InitializationBlockPhys = (PINITIALIZATION_BLOCK)NdisGetPhysicalAddressLow(PhysicalAddress);
+ Adapter->InitializationBlockPhys = (PINITIALIZATION_BLOCK)(ptrdiff_t)NdisGetPhysicalAddressLow(PhysicalAddress);
/* allocate the transport descriptor ring */
Adapter->TransmitDescriptorRingLength = sizeof(TRANSMIT_DESCRIPTOR) * NUMBER_OF_BUFFERS;
return NDIS_STATUS_RESOURCES;
}
- if(((ULONG)Adapter->TransmitDescriptorRingVirt & 0x00000003) != 0)
+ if(((ULONG_PTR)Adapter->TransmitDescriptorRingVirt & 0x00000003) != 0)
{
DPRINT("address 0x%x not dword-aligned\n", Adapter->TransmitDescriptorRingVirt);
BREAKPOINT;
return NDIS_STATUS_RESOURCES;
}
- Adapter->TransmitDescriptorRingPhys = (PTRANSMIT_DESCRIPTOR)NdisGetPhysicalAddressLow(PhysicalAddress);
+ Adapter->TransmitDescriptorRingPhys = (PTRANSMIT_DESCRIPTOR)(ptrdiff_t)NdisGetPhysicalAddressLow(PhysicalAddress);
RtlZeroMemory(Adapter->TransmitDescriptorRingVirt, sizeof(TRANSMIT_DESCRIPTOR) * NUMBER_OF_BUFFERS);
/* allocate the receive descriptor ring */
return NDIS_STATUS_RESOURCES;
}
- if(((ULONG)Adapter->ReceiveDescriptorRingVirt & 0x00000003) != 0)
+ if(((ULONG_PTR)Adapter->ReceiveDescriptorRingVirt & 0x00000003) != 0)
{
DPRINT("address 0x%x not dword-aligned\n", Adapter->ReceiveDescriptorRingVirt);
BREAKPOINT;
return NDIS_STATUS_RESOURCES;
}
- Adapter->ReceiveDescriptorRingPhys = (PRECEIVE_DESCRIPTOR)NdisGetPhysicalAddressLow(PhysicalAddress);
+ Adapter->ReceiveDescriptorRingPhys = (PRECEIVE_DESCRIPTOR)(ptrdiff_t)NdisGetPhysicalAddressLow(PhysicalAddress);
RtlZeroMemory(Adapter->ReceiveDescriptorRingVirt, sizeof(RECEIVE_DESCRIPTOR) * NUMBER_OF_BUFFERS);
/* allocate transmit buffers */
return NDIS_STATUS_RESOURCES;
}
- if(((ULONG)Adapter->TransmitBufferPtrVirt & 0x00000003) != 0)
+ if(((ULONG_PTR)Adapter->TransmitBufferPtrVirt & 0x00000003) != 0)
{
DPRINT("address 0x%x not dword-aligned\n", Adapter->TransmitBufferPtrVirt);
BREAKPOINT;
return NDIS_STATUS_RESOURCES;
}
- Adapter->TransmitBufferPtrPhys = (PCHAR)NdisGetPhysicalAddressLow(PhysicalAddress);
+ Adapter->TransmitBufferPtrPhys = (PCHAR)(ULONG_PTR)NdisGetPhysicalAddressLow(PhysicalAddress);
RtlZeroMemory(Adapter->TransmitBufferPtrVirt, BUFFER_SIZE * NUMBER_OF_BUFFERS);
/* allocate receive buffers */
return NDIS_STATUS_RESOURCES;
}
- if(((ULONG)Adapter->ReceiveBufferPtrVirt & 0x00000003) != 0)
+ if(((ULONG_PTR)Adapter->ReceiveBufferPtrVirt & 0x00000003) != 0)
{
DPRINT("address 0x%x not dword-aligned\n", Adapter->ReceiveBufferPtrVirt);
BREAKPOINT;
return NDIS_STATUS_RESOURCES;
}
- Adapter->ReceiveBufferPtrPhys = (PCHAR)NdisGetPhysicalAddressLow(PhysicalAddress);
+ Adapter->ReceiveBufferPtrPhys = (PCHAR)(ULONG_PTR)NdisGetPhysicalAddressLow(PhysicalAddress);
RtlZeroMemory(Adapter->ReceiveBufferPtrVirt, BUFFER_SIZE * NUMBER_OF_BUFFERS);
/* initialize tx descriptors */
TransmitDescriptor = Adapter->TransmitDescriptorRingVirt;
for(i = 0; i < NUMBER_OF_BUFFERS; i++)
{
- (TransmitDescriptor+i)->TBADR = (ULONG)Adapter->TransmitBufferPtrPhys + i * BUFFER_SIZE;
+ (TransmitDescriptor+i)->TBADR = (ULONG_PTR)Adapter->TransmitBufferPtrPhys + i * BUFFER_SIZE;
(TransmitDescriptor+i)->BCNT = 0xf000 | -BUFFER_SIZE; /* 2's compliment + set top 4 bits */
(TransmitDescriptor+i)->FLAGS = TD1_STP | TD1_ENP;
}
ReceiveDescriptor = Adapter->ReceiveDescriptorRingVirt;
for(i = 0; i < NUMBER_OF_BUFFERS; i++)
{
- (ReceiveDescriptor+i)->RBADR = (ULONG)Adapter->ReceiveBufferPtrPhys + i * BUFFER_SIZE;
+ (ReceiveDescriptor+i)->RBADR = (ULONG_PTR)Adapter->ReceiveBufferPtrPhys + i * BUFFER_SIZE;
(ReceiveDescriptor+i)->BCNT = 0xf000 | -BUFFER_SIZE; /* 2's compliment + set top 4 bits */
(ReceiveDescriptor+i)->FLAGS = RD_OWN;
}
/* set up receive ring */
DPRINT("Receive ring physical address: 0x%x\n", Adapter->ReceiveDescriptorRingPhys);
- Adapter->InitializationBlockVirt->RDRA = (ULONG)Adapter->ReceiveDescriptorRingPhys;
+ Adapter->InitializationBlockVirt->RDRA = (ULONG_PTR)Adapter->ReceiveDescriptorRingPhys;
Adapter->InitializationBlockVirt->RLEN = (LOG_NUMBER_OF_BUFFERS << 4) & 0xf0;
/* set up transmit ring */
DPRINT("Transmit ring physical address: 0x%x\n", Adapter->TransmitDescriptorRingPhys);
- Adapter->InitializationBlockVirt->TDRA = (ULONG)Adapter->TransmitDescriptorRingPhys;
+ Adapter->InitializationBlockVirt->TDRA = (ULONG_PTR)Adapter->TransmitDescriptorRingPhys;
Adapter->InitializationBlockVirt->TLEN = (LOG_NUMBER_OF_BUFFERS << 4) & 0xf0;
}
if(Adapter->InitializationBlockVirt)
{
- PhysicalAddress.u.LowPart = (ULONG)Adapter->InitializationBlockPhys;
+ PhysicalAddress.u.LowPart = (ULONG_PTR)Adapter->InitializationBlockPhys;
NdisMFreeSharedMemory(Adapter->MiniportAdapterHandle, Adapter->InitializationBlockLength,
FALSE, Adapter->InitializationBlockVirt, PhysicalAddress);
}
if(Adapter->TransmitDescriptorRingVirt)
{
- PhysicalAddress.u.LowPart = (ULONG)Adapter->TransmitDescriptorRingPhys;
+ PhysicalAddress.u.LowPart = (ULONG_PTR)Adapter->TransmitDescriptorRingPhys;
NdisMFreeSharedMemory(Adapter->MiniportAdapterHandle, Adapter->TransmitDescriptorRingLength,
FALSE, Adapter->TransmitDescriptorRingVirt, PhysicalAddress);
}
if(Adapter->ReceiveDescriptorRingVirt)
{
- PhysicalAddress.u.LowPart = (ULONG)Adapter->ReceiveDescriptorRingPhys;
+ PhysicalAddress.u.LowPart = (ULONG_PTR)Adapter->ReceiveDescriptorRingPhys;
NdisMFreeSharedMemory(Adapter->MiniportAdapterHandle, Adapter->ReceiveDescriptorRingLength,
FALSE, Adapter->ReceiveDescriptorRingVirt, PhysicalAddress);
}
if(Adapter->TransmitBufferPtrVirt)
{
- PhysicalAddress.u.LowPart = (ULONG)Adapter->TransmitBufferPtrPhys;
+ PhysicalAddress.u.LowPart = (ULONG_PTR)Adapter->TransmitBufferPtrPhys;
NdisMFreeSharedMemory(Adapter->MiniportAdapterHandle, Adapter->TransmitBufferLength,
FALSE, Adapter->TransmitBufferPtrVirt, PhysicalAddress);
}
if(Adapter->ReceiveBufferPtrVirt)
{
- PhysicalAddress.u.LowPart = (ULONG)Adapter->ReceiveBufferPtrPhys;
+ PhysicalAddress.u.LowPart = (ULONG_PTR)Adapter->ReceiveBufferPtrPhys;
NdisMFreeSharedMemory(Adapter->MiniportAdapterHandle, Adapter->ReceiveBufferLength,
FALSE, Adapter->ReceiveBufferPtrVirt, PhysicalAddress);
}
/* set up csr1 and csr2 with init block */
NdisRawWritePortUshort(Adapter->PortOffset + RAP, CSR1);
- NdisRawWritePortUshort(Adapter->PortOffset + RDP, (USHORT)((ULONG)Adapter->InitializationBlockPhys & 0xffff));
+ NdisRawWritePortUshort(Adapter->PortOffset + RDP, (USHORT)((ULONG_PTR)Adapter->InitializationBlockPhys & 0xffff));
NdisRawWritePortUshort(Adapter->PortOffset + RAP, CSR2);
- NdisRawWritePortUshort(Adapter->PortOffset + RDP, (USHORT)((ULONG)Adapter->InitializationBlockPhys >> 16) & 0xffff);
+ NdisRawWritePortUshort(Adapter->PortOffset + RDP, (USHORT)((ULONG_PTR)Adapter->InitializationBlockPhys >> 16) & 0xffff);
DPRINT("programmed with init block\n");
ExGetCurrentProcessorCpuUsage(
PULONG CpuUsage);
+/* portability fixes */
+#ifdef _M_AMD64
+#define KfReleaseSpinLock KeReleaseSpinLock
+#define KefAcquireSpinLockAtDpcLevel KeAcquireSpinLockAtDpcLevel
+#define KefReleaseSpinLockFromDpcLevel KeReleaseSpinLockFromDpcLevel
+#endif
+
#endif /* __NDISSYS_H */
/* EOF */
--- /dev/null
+; NDIS Kernel Module - ReactOS Operating System
+
+LIBRARY NDIS.SYS
+
+EXPORTS
+ArcFilterDprIndicateReceive
+ArcFilterDprIndicateReceiveComplete
+EthFilterDprIndicateReceive
+EthFilterDprIndicateReceiveComplete
+FddiFilterDprIndicateReceive
+FddiFilterDprIndicateReceiveComplete
+NDIS_BUFFER_TO_SPAN_PAGES
+NdisAcquireReadWriteLock
+NdisAcquireSpinLock
+NdisAdjustBufferLength
+NdisAllocateBuffer
+NdisAllocateBufferPool
+NdisAllocateDmaChannel
+NdisAllocateMemory
+NdisAllocateFromBlockPool
+NdisAllocateMemoryWithTag
+NdisAllocatePacket
+NdisAllocatePacketPool
+NdisAllocatePacketPoolEx
+NdisAllocateSharedMemory
+NdisAllocateSpinLock
+NdisAnsiStringToUnicodeString
+NdisBufferLength
+NdisBufferVirtualAddress
+NdisCancelSendPackets
+NdisCancelTimer
+NdisClAddParty
+NdisClCloseAddressFamily
+NdisClCloseCall
+NdisClDeregisterSap
+NdisClDropParty
+NdisClGetProtocolVcContextFromTapiCallId
+NdisClIncomingCallComplete
+NdisClMakeCall
+NdisClModifyCallQoS
+NdisClOpenAddressFamily
+NdisClRegisterSap
+NdisCloseAdapter
+NdisCloseConfiguration
+NdisCloseFile
+NdisCmActivateVc
+NdisCmAddPartyComplete
+NdisCmCloseAddressFamilyComplete
+NdisCmCloseCallComplete
+NdisCmDeactivateVc
+NdisCmDeregisterSapComplete
+NdisCmDispatchCallConnected
+NdisCmDispatchIncomingCall
+NdisCmDispatchIncomingCallQoSChange
+NdisCmDispatchIncomingCloseCall
+NdisCmDispatchIncomingDropParty
+NdisCmDropPartyComplete
+NdisCmMakeCallComplete
+NdisCmModifyCallQoSComplete
+NdisCmOpenAddressFamilyComplete
+NdisCmRegisterAddressFamily
+NdisCmRegisterSapComplete
+NdisCoAssignInstanceName
+NdisCoCreateVc
+NdisCoDeleteVc
+NdisCoGetTapiCallId
+NdisCoRequest
+NdisCoRequestComplete
+NdisCoSendPackets
+NdisCompareAnsiString
+NdisCompareUnicodeString
+NdisCompleteBindAdapter
+NdisCompleteCloseAdapter
+NdisCompleteDmaTransfer
+NdisCompleteOpenAdapter
+NdisCompletePnPEvent
+NdisCompleteQueryStatistics
+NdisCompleteUnbindAdapter
+NdisConvertStringToAtmAddress
+NdisCopyBuffer
+NdisCopyFromPacketToPacket
+NdisCopyFromPacketToPacketSafe
+NdisCreateBlockPool
+NdisDeregisterAdapter
+NdisDeregisterAdapterShutdownHandler
+NdisDeregisterMac
+NdisDeregisterProtocol
+NdisDeregisterTdiCallBack
+NdisDestroyBlockPool
+NdisDprAcquireSpinLock
+NdisDprAllocatePacket
+NdisDprAllocatePacketNonInterlocked
+NdisDprFreePacket
+NdisDprFreePacketNonInterlocked
+NdisDprReleaseSpinLock
+NdisEqualString
+NdisFreeBuffer
+NdisFreeBufferPool
+NdisFreeDmaChannel
+NdisFreeToBlockPool
+NdisFreeMemory
+NdisFreePacket
+NdisFreePacketPool
+NdisFreeSharedMemory
+NdisFreeSpinLock
+NdisGeneratePartialCancelId
+NdisGetBufferPhysicalArraySize
+NdisGetCurrentProcessorCounts
+NdisGetCurrentProcessorCpuUsage
+NdisGetCurrentSystemTime
+NdisGetDriverHandle
+NdisGetFirstBufferFromPacket
+NdisGetFirstBufferFromPacketSafe
+NdisGetPacketCancelId
+NdisGetPoolFromPacket
+NdisGetReceivedPacket
+NdisGetRoutineAddress
+NdisGetSharedDataAlignment
+NdisGetSystemUpTime
+NdisGetVersion
+NdisIMAssociateMiniport
+NdisIMCancelInitializeDeviceInstance
+NdisIMCopySendCompletePerPacketInfo
+NdisIMCopySendPerPacketInfo
+NdisIMDeInitializeDeviceInstance
+NdisIMDeregisterLayeredMiniport
+NdisIMGetBindingContext
+NdisIMGetCurrentPacketStack
+NdisIMGetDeviceContext
+NdisIMInitializeDeviceInstance
+NdisIMInitializeDeviceInstanceEx
+NdisIMNotifyPnPEvent
+NdisImmediateReadPciSlotInformation
+NdisImmediateReadPortUchar
+NdisImmediateReadPortUlong
+NdisImmediateReadPortUshort
+NdisImmediateReadSharedMemory
+NdisImmediateWritePciSlotInformation
+NdisImmediateWritePortUchar
+NdisImmediateWritePortUlong
+NdisImmediateWritePortUshort
+NdisImmediateWriteSharedMemory
+NdisIMQueueMiniportCallback
+NdisIMRegisterLayeredMiniport
+NdisIMRevertBack
+NdisIMSwitchToMiniport
+NdisInitAnsiString
+NdisInitializeEvent
+NdisInitializeReadWriteLock
+NdisInitializeString
+NdisInitializeTimer
+NdisInitializeWrapper
+NdisInitUnicodeString
+NdisInterlockedAddLargeInteger
+NdisInterlockedAddUlong
+NdisInterlockedDecrement
+NdisInterlockedIncrement
+NdisInterlockedInsertHeadList
+NdisInterlockedInsertTailList
+NdisInterlockedPopEntrySList
+NdisInterlockedPushEntrySList
+NdisInterlockedRemoveHeadList
+NdisMAllocateMapRegisters
+NdisMAllocateSharedMemory
+NdisMAllocateSharedMemoryAsync
+NdisMapFile
+NdisMapIoSpace
+;NdisMatchPdoWithPacket ?
+NdisMCancelTimer
+NdisMCloseLog
+NdisMCmActivateVc
+NdisMCmCreateVc
+NdisMCmDeactivateVc
+NdisMCmDeleteVc
+NdisMCmRegisterAddressFamily
+NdisMCmRequest
+NdisMCoActivateVcComplete
+NdisMCoDeactivateVcComplete
+NdisMCoIndicateReceivePacket
+NdisMCoIndicateStatus
+NdisMCompleteBufferPhysicalMapping
+NdisMCoReceiveComplete
+NdisMCoRequestComplete
+NdisMCoSendComplete
+NdisMCreateLog
+NdisMDeregisterAdapterShutdownHandler
+NdisMDeregisterDevice
+NdisMDeregisterDmaChannel
+NdisMDeregisterInterrupt
+NdisMDeregisterIoPortRange
+NdisMFlushLog
+NdisMFreeMapRegisters
+NdisMFreeSharedMemory
+NdisMGetDeviceProperty
+NdisMGetDmaAlignment
+NdisMIndicateStatus
+NdisMIndicateStatusComplete
+NdisMInitializeScatterGatherDma
+NdisMInitializeTimer
+NdisMMapIoSpace
+NdisMPciAssignResources
+NdisMPromoteMiniport
+NdisMQueryAdapterInstanceName
+NdisMQueryAdapterResources
+NdisMQueryInformationComplete
+NdisMReadDmaCounter
+NdisMRegisterAdapterShutdownHandler
+NdisMRegisterDevice
+NdisMRegisterDmaChannel
+NdisMRegisterInterrupt
+NdisMRegisterIoPortRange
+NdisMRegisterMiniport
+NdisMRegisterUnloadHandler
+NdisMRemoveMiniport
+NdisMResetComplete
+NdisMSendComplete
+NdisMSendResourcesAvailable
+NdisMSetAttributes
+NdisMSetAttributesEx
+NdisMSetInformationComplete
+NdisMSetMiniportSecondary
+NdisMSetPeriodicTimer
+NdisMSetTimer
+NdisMSleep
+NdisMStartBufferPhysicalMapping
+NdisMSynchronizeWithInterrupt
+NdisMTransferDataComplete
+NdisMUnmapIoSpace
+NdisMWanIndicateReceive
+NdisMWanIndicateReceiveComplete
+NdisMWanSendComplete
+NdisMWriteLogData
+NdisOpenAdapter
+NdisOpenConfiguration
+NdisOpenConfigurationKeyByIndex
+NdisOpenConfigurationKeyByName
+NdisOpenFile
+NdisOpenProtocolConfiguration
+NdisOverrideBusNumber
+NdisPacketPoolUsage
+NdisPacketSize
+NdisPciAssignResources
+NdisQueryAdapterInstanceName
+NdisQueryBindInstanceName
+NdisQueryBuffer
+NdisQueryBufferOffset
+NdisQueryBufferSafe
+NdisQueryMapRegisterCount
+NdisQueryPendingIOCount
+NdisReadConfiguration
+NdisReadEisaSlotInformation
+NdisReadEisaSlotInformationEx
+NdisReadMcaPosInformation
+NdisReadNetworkAddress
+NdisReadPciSlotInformation
+NdisReadPcmciaAttributeMemory
+NdisReEnumerateProtocolBindings
+NdisRegisterAdapter
+NdisRegisterAdapterShutdownHandler
+NdisRegisterProtocol
+NdisRegisterTdiCallBack
+NdisReleaseAdapterResources
+NdisReleaseReadWriteLock
+NdisReleaseSpinLock
+NdisRequest
+NdisReset
+NdisResetEvent
+NdisReturnPackets
+NdisSend
+NdisSendPackets
+NdisSetEvent
+NdisSetPacketCancelId
+NdisSetPacketPoolProtocolId
+NdisSetPacketStatus
+NdisSetProtocolFilter
+NdisSetTimer
+NdisSetTimerEx
+NdisSetupDmaTransfer
+NdisSystemProcessorCount
+NdisTerminateWrapper
+NdisTransferData
+NdisUnchainBufferAtBack
+NdisUnchainBufferAtFront
+NdisUnicodeStringToAnsiString
+NdisUnmapFile
+NdisUpcaseUnicodeString
+NdisUpdateSharedMemory
+NdisWaitEvent
+NdisWriteConfiguration
+NdisWriteErrorLogEntry
+NdisWritePciSlotInformation
+NdisWritePcmciaAttributeMemory
+TrFilterDprIndicateReceive
+TrFilterDprIndicateReceiveComplete
+NdisScheduleWorkItem
+
+; EOF
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
<module name="ndis" type="kernelmodedriver" installbase="system32/drivers" installname="ndis.sys">
- <importlibrary definition="ndis.def"></importlibrary>
+ <importlibrary definition="ndis-$(ARCH).def"></importlibrary>
<include base="ndis">include</include>
<define name="NDIS_WRAPPER" />
<define name="NDIS51" />
OUT PUCHAR Data)
{
NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
- *Data = READ_PORT_UCHAR((PUCHAR)Port); // FIXME: What to do with WrapperConfigurationContext?
+ *Data = READ_PORT_UCHAR(UlongToPtr(Port)); // FIXME: What to do with WrapperConfigurationContext?
}
\f
OUT PULONG Data)
{
NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
- *Data = READ_PORT_ULONG((PULONG)Port); // FIXME: What to do with WrapperConfigurationContext?
+ *Data = READ_PORT_ULONG(UlongToPtr(Port)); // FIXME: What to do with WrapperConfigurationContext?
}
\f
OUT PUSHORT Data)
{
NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
- *Data = READ_PORT_USHORT((PUSHORT)Port); // FIXME: What to do with WrapperConfigurationContext?
+ *Data = READ_PORT_USHORT(UlongToPtr(Port)); // FIXME: What to do with WrapperConfigurationContext?
}
\f
IN UCHAR Data)
{
NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
- WRITE_PORT_UCHAR((PUCHAR)Port, Data); // FIXME: What to do with WrapperConfigurationContext?
+ WRITE_PORT_UCHAR(UlongToPtr(Port), Data); // FIXME: What to do with WrapperConfigurationContext?
}
\f
IN ULONG Data)
{
NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
- WRITE_PORT_ULONG((PULONG)Port, Data); // FIXME: What to do with WrapperConfigurationContext?
+ WRITE_PORT_ULONG(UlongToPtr(Port), Data); // FIXME: What to do with WrapperConfigurationContext?
}
\f
IN USHORT Data)
{
NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
- WRITE_PORT_USHORT((PUSHORT)Port, Data); // FIXME: What to do with WrapperConfigurationContext?
+ WRITE_PORT_USHORT(UlongToPtr(Port), Data); // FIXME: What to do with WrapperConfigurationContext?
}
\f
if(AddressSpace)
{
ASSERT(TranslatedAddress.u.HighPart == 0);
- *PortOffset = (PVOID) TranslatedAddress.u.LowPart;
+ *PortOffset = (PVOID)(ULONG_PTR)TranslatedAddress.QuadPart;
NDIS_DbgPrint(MAX_TRACE, ("Returning 0x%x\n", *PortOffset));
return NDIS_STATUS_SUCCESS;
}
PLOGICAL_ADAPTER Adapter = (PLOGICAL_ADAPTER)DeviceObject->DeviceExtension;
PIO_STACK_LOCATION Stack = IoGetCurrentIrpStackLocation(Irp);
NDIS_STATUS Status = STATUS_NOT_SUPPORTED;
+ ULONG Written;
Irp->IoStatus.Information = 0;
*(PNDIS_OID)Irp->AssociatedIrp.SystemBuffer,
Stack->Parameters.DeviceIoControl.OutputBufferLength,
MmGetSystemAddressForMdl(Irp->MdlAddress),
- &Irp->IoStatus.Information);
+ &Written);
+ Irp->IoStatus.Information = Written;
break;
default:
* NDIS 5.0
*/
{
- return ExInterlockedPopEntrySList ( ListHead, Lock );
+ return (PSINGLE_LIST_ENTRY)ExInterlockedPopEntrySList ( ListHead, Lock );
}
* NDIS 5.0
*/
{
- return ExInterlockedPushEntrySList ( ListHead, ListEntry, Lock );
+ return (PSINGLE_LIST_ENTRY)ExInterlockedPushEntrySList ( ListHead, (PSLIST_ENTRY)ListEntry, Lock );
}
if (Adapter->MTU < Size) {
/* This is NOT a pointer. MSDN explicitly says so. */
NDIS_PER_PACKET_INFO_FROM_PACKET(NdisPacket,
- TcpLargeSendPacketInfo) = (PVOID)((ULONG)Adapter->MTU);
+ TcpLargeSendPacketInfo) = (PVOID)((ULONG_PTR)Adapter->MTU);
}
TcpipAcquireSpinLock( &Adapter->Lock, &OldIrql );
<library>chew</library>
<library>ntoskrnl</library>
<library>hal</library>
- <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269
<directory name="include">
<pch>precomp.h</pch>
</directory>
- -->
<directory name="datalink">
<file>lan.c</file>
</directory>
<file>wait.c</file>
</directory>
<file>tcpip.rc</file>
- <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
- <compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
</module>
DisType->Context = TranContext->Handle.ConnectionContext;
DisType->Irp = Irp;
- TCPRemoveIRP( TranContext->Handle.ConnectionContext, Irp );
+ TCPRemoveIRP( TranContext->Handle.ConnectionContext, Irp );
if (!ChewCreate(DispDoDisconnect, DisType))
exFreePool(DisType);
AddressInfo = (PTDI_ADDRESS_INFO)MmGetSystemAddressForMdl(Irp->MdlAddress);
Address = (PTA_IP_ADDRESS)&AddressInfo->Address;
- switch ((ULONG)IrpSp->FileObject->FsContext2) {
+ switch ((ULONG_PTR)IrpSp->FileObject->FsContext2) {
case TDI_TRANSPORT_ADDRESS_FILE:
AddrFile = (PADDRESS_FILE)TranContext->Handle.AddressHandle;
AddressInfo = (PTDI_CONNECTION_INFORMATION)
MmGetSystemAddressForMdl(Irp->MdlAddress);
- switch ((ULONG)IrpSp->FileObject->FsContext2) {
+ switch ((ULONG_PTR)IrpSp->FileObject->FsContext2) {
case TDI_TRANSPORT_ADDRESS_FILE:
AddrFile = (PADDRESS_FILE)TranContext->Handle.AddressHandle;
Endpoint = AddrFile ? AddrFile->Connection : NULL;
(*((PADDRESS_FILE)Request.Handle.AddressHandle)->Send)));
if( (*((PADDRESS_FILE)Request.Handle.AddressHandle)->Send != NULL) )
+ {
+ ULONG DataUsed = 0;
Status = (*((PADDRESS_FILE)Request.Handle.AddressHandle)->Send)(
Request.Handle.AddressHandle,
DgramInfo->SendDatagramInformation,
DataBuffer,
BufferSize,
- &Irp->IoStatus.Information);
+ &DataUsed);
+ Irp->IoStatus.Information = DataUsed;
+ }
else
Status = STATUS_UNSUCCESSFUL;
}
TranContext = (PTRANSPORT_CONTEXT)IrpSp->FileObject->FsContext;
- switch ((ULONG)IrpSp->FileObject->FsContext2) {
+ switch ((ULONG_PTR)IrpSp->FileObject->FsContext2) {
case TDI_TRANSPORT_ADDRESS_FILE:
Request.Handle.AddressHandle = TranContext->Handle.AddressHandle;
break;
TranContext = (PTRANSPORT_CONTEXT)IrpSp->FileObject->FsContext;
Info = (PTCP_REQUEST_SET_INFORMATION_EX)Irp->AssociatedIrp.SystemBuffer;
- switch ((ULONG)IrpSp->FileObject->FsContext2) {
+ switch ((ULONG_PTR)IrpSp->FileObject->FsContext2) {
case TDI_TRANSPORT_ADDRESS_FILE:
Request.Handle.AddressHandle = TranContext->Handle.AddressHandle;
break;
+++ /dev/null
-; $Id$
-;
-; TDI.SYS Kernel Module - ReactOS Operating System
-;
-LIBRARY TDI.SYS
-
-EXPORTS
-CTEAllocateString@8
-CTEBlock@4
-CTEInitEvent@8
-CTEInitString@8
-CTEInitTimer@4
-CTEInitialize@0
-CTELogEvent@28
-CTEScheduleEvent@8
-CTESignal@8
-CTEStartTimer@16
-CTESystemUpTime@0
-TdiBuildNetbiosAddress@12
-TdiBuildNetbiosAddressEa@12
-TdiCopyBufferToMdl@24
-TdiCopyMdlToBuffer@24
-TdiDefaultChainedRcvDatagramHandler@40
-TdiDefaultChainedRcvExpeditedHandler@28
-TdiDefaultChainedReceiveHandler@28
-TdiDefaultConnectHandler@36
-TdiDefaultDisconnectHandler@28
-TdiDefaultErrorHandler@8
-TdiDefaultRcvDatagramHandler@44
-TdiDefaultRcvExpeditedHandler@32
-TdiDefaultReceiveHandler@32
-TdiDefaultSendPossibleHandler@12
-TdiDeregisterAddressChangeHandler@4
-TdiDeregisterDeviceObject@4
-TdiDeregisterNetAddress@4
-TdiDeregisterNotificationHandler@4
-TdiInitialize@4
-TdiMapBuffer@4
-TdiMapUserRequest@12
-TdiOpenNetbiosAddress@16
-TdiRegisterAddressChangeHandler@12
-TdiRegisterDeviceObject@8
-TdiRegisterNetAddress@8
-TdiRegisterNotificationHandler@12
-TdiReturnChainedReceives@8
-TdiUnmapBuffer@4
-; EOF
--- /dev/null
+ @ stdcall CTEAllocateString(long long)
+ @ stdcall CTEBlock(long)
+ @ stdcall CTEInitEvent(long long)
+ @ stdcall CTEInitString(long long)
+ @ stdcall CTEInitTimer(long)
+ @ stdcall CTEInitialize()
+ @ stdcall CTELogEvent(long long long long long long long)
+ @ stdcall CTEScheduleEvent(long long)
+ @ stdcall CTESignal(long long)
+ @ stdcall CTEStartTimer(long long long long)
+ @ stdcall CTESystemUpTime()
+ @ stdcall TdiBuildNetbiosAddress(str long ptr)
+ @ stdcall TdiBuildNetbiosAddressEa(str long str)
+ @ stdcall TdiCopyBufferToMdl(ptr long long ptr long ptr)
+ @ stdcall TdiCopyMdlToBuffer(ptr long long ptr long ptr)
+ @ stdcall TdiDefaultChainedRcvDatagramHandler(ptr long ptr long ptr long long long ptr ptr)
+ @ stdcall TdiDefaultChainedRcvExpeditedHandler(ptr ptr long long long ptr ptr)
+ @ stdcall TdiDefaultChainedReceiveHandler(ptr ptr long long long ptr ptr)
+ @ stdcall TdiDefaultConnectHandler(ptr long ptr long ptr long ptr ptr ptr)
+ @ stdcall TdiDefaultDisconnectHandler(ptr ptr long ptr long ptr long)
+ @ stdcall TdiDefaultErrorHandler(ptr long)
+ @ stdcall TdiDefaultRcvDatagramHandler(ptr long ptr long ptr long long long ptr ptr ptr)
+ @ stdcall TdiDefaultRcvExpeditedHandler(ptr ptr long long long ptr ptr ptr)
+ @ stdcall TdiDefaultReceiveHandler(ptr ptr long long long ptr ptr ptr)
+ @ stdcall TdiDefaultSendPossibleHandler(ptr ptr long)
+ @ stdcall TdiDeregisterAddressChangeHandler(ptr)
+ @ stdcall TdiDeregisterDeviceObject(ptr)
+ @ stdcall TdiDeregisterNetAddress(ptr)
+ @ stdcall TdiDeregisterNotificationHandler(ptr)
+ @ stdcall TdiInitialize(ptr)
+ @ stdcall TdiMapBuffer(ptr)
+ @ stdcall TdiMapUserRequest(ptr ptr ptr)
+ @ stdcall TdiOpenNetbiosAddress(long long long long)
+ @ stdcall TdiRegisterAddressChangeHandler(long long long)
+ @ stdcall TdiRegisterDeviceObject(long long)
+ @ stdcall TdiRegisterNetAddress(long long)
+ @ stdcall TdiRegisterNotificationHandler(long long long)
+ @ stdcall TdiReturnChainedReceives(ptr long)
+ @ stdcall TdiUnmapBuffer(ptr)
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
<module name="tdi" type="kernelmodedriver" installbase="system32/drivers" installname="tdi.sys">
- <importlibrary definition="misc/tdi.def"></importlibrary>
+ <importlibrary definition="misc/tdi.spec"></importlibrary>
<library>ntoskrnl</library>
<library>hal</library>
<directory name="cte">
/* Fill the read buffer */
TRACE_(SERENUM, "Fill the read buffer\n");
- Status = ReadBytes(LowerDevice, Buffer, sizeof(Buffer)/sizeof(Buffer[0]), &Count);
+ Status = ReadBytes(LowerDevice, Buffer, sizeof(Buffer)/sizeof(Buffer[0]), (PVOID)&Count);
if (!NT_SUCCESS(Status)) goto ByeBye;
RtlInitUnicodeString(&DeviceId, L"Serenum\\Mouse");
* as pending, it might be possible to complete the
* Irp before pending it, leading to a crash! */
WaitingIrp = InterlockedCompareExchangePointer(
- &DeviceExtension->WaitOnMaskIrp,
+ (PVOID)&DeviceExtension->WaitOnMaskIrp,
Irp,
NULL);
// The data buffer must be aligned.
//
- srb->DataBuffer = (PVOID) (((ULONG) (context + 1) + (alignment - 1)) &
+ srb->DataBuffer = (PVOID) (((ULONG_PTR) (context + 1) + (alignment - 1)) &
~(alignment - 1));
irpStack = IoGetCurrentIrpStackLocation(irp);
if (irpStack->Parameters.Others.Argument3) {
- ULONG count;
+ ULONG_PTR count;
//
// Decrement the countdown timer and put the IRP back in the list.
PIO_STACK_LOCATION irpStack;
NTSTATUS status;
BOOLEAN retry;
- ULONG retryCount;
+ ULONG_PTR retryCount;
ULONG lastSector;
PIRP originalIrp;
PCDROM_DATA cddata;
// of original IRP.
//
- nextIrpStack->Parameters.Others.Argument1 = (PVOID) irpCount;
+ nextIrpStack->Parameters.Others.Argument1 = (PVOID)(ULONG_PTR) irpCount;
for (i = 0; i < irpCount; i++) {
srb,
irpStack->MajorFunction,
irpStack->MajorFunction == IRP_MJ_DEVICE_CONTROL ? irpStack->Parameters.DeviceIoControl.IoControlCode : 0,
- MAXIMUM_RETRIES - ((ULONG)irpStack->Parameters.Others.Argument4),
+ MAXIMUM_RETRIES - ((ULONG_PTR)irpStack->Parameters.Others.Argument4),
&status);
//
retry = TRUE;
}
- if (retry && (irpStack->Parameters.Others.Argument4 = (PVOID)((ULONG)irpStack->Parameters.Others.Argument4-1))) {
+ if (retry && (irpStack->Parameters.Others.Argument4 = (PVOID)((ULONG_PTR)irpStack->Parameters.Others.Argument4-1))) {
//
// Retry request.
srb,
irpStack->MajorFunction,
irpStack->MajorFunction == IRP_MJ_DEVICE_CONTROL ? irpStack->Parameters.DeviceIoControl.IoControlCode : 0,
- MAXIMUM_RETRIES - ((ULONG)irpStack->Parameters.Others.Argument4),
+ MAXIMUM_RETRIES - ((ULONG_PTR)irpStack->Parameters.Others.Argument4),
&status);
//
retry = TRUE;
}
- if (retry && (irpStack->Parameters.Others.Argument4 = (PVOID)((ULONG)irpStack->Parameters.Others.Argument4-1))) {
+ if (retry && (irpStack->Parameters.Others.Argument4 = (PVOID)((ULONG_PTR)irpStack->Parameters.Others.Argument4-1))) {
//
// Retry request. If the class driver has supplied a StartIo,
if(AddressSpace == 0)
gControllerInfo[gNumberOfControllers].BaseAddress = MmMapIoSpace(TranslatedAddress, FDC_PORT_BYTES, MmNonCached);
else
- gControllerInfo[gNumberOfControllers].BaseAddress = (PUCHAR)TranslatedAddress.u.LowPart;
+ gControllerInfo[gNumberOfControllers].BaseAddress = (PUCHAR)(ULONG_PTR)TranslatedAddress.QuadPart;
}
else if(PartialDescriptor->Type == CmResourceTypeDma)
{
PHW_DEVICE_EXTENSION deviceExtension = HwDeviceExtension;
- ULONG nativeModeAdapterTableIndex = (ULONG)Context;
+ ULONG nativeModeAdapterTableIndex = (ULONG_PTR)Context;
ULONG channel;
PUCHAR ioSpace;
BOOLEAN atapiOnly,
newStatus = ScsiPortInitialize(DriverObject,
Argument2,
&hwInitializationData,
- (PVOID) i);
+ (PVOID)(ULONG_PTR)i);
if (newStatus < statusToReturn)
statusToReturn = newStatus;
}
DDKFASTAPI
AtapiWritePort4(
IN PHW_CHANNEL chan,
- IN ULONG port,
+ IN ULONG_PTR port,
IN ULONG data
);
DDKFASTAPI
AtapiWritePort2(
IN PHW_CHANNEL chan,
- IN ULONG port,
+ IN ULONG_PTR port,
IN USHORT data
);
DDKFASTAPI
AtapiWritePort1(
IN PHW_CHANNEL chan,
- IN ULONG port,
+ IN ULONG_PTR port,
IN UCHAR data
);
DDKFASTAPI
AtapiWritePortEx4(
IN PHW_CHANNEL chan,
- IN ULONG port,
+ IN ULONG_PTR port,
IN ULONG offs,
IN ULONG data
);
DDKFASTAPI
AtapiWritePortEx1(
IN PHW_CHANNEL chan,
- IN ULONG port,
+ IN ULONG_PTR port,
IN ULONG offs,
IN UCHAR data
);
DDKFASTAPI
AtapiReadPort4(
IN PHW_CHANNEL chan,
- IN ULONG port
+ IN ULONG_PTR port
);
USHORT
DDKFASTAPI
AtapiReadPort2(
IN PHW_CHANNEL chan,
- IN ULONG port
+ IN ULONG_PTR port
);
UCHAR
DDKFASTAPI
AtapiReadPort1(
IN PHW_CHANNEL chan,
- IN ULONG port
+ IN ULONG_PTR port
);
ULONG
DDKFASTAPI
AtapiReadPortEx4(
IN PHW_CHANNEL chan,
- IN ULONG port,
+ IN ULONG_PTR port,
IN ULONG offs
);
DDKFASTAPI
AtapiReadPortEx1(
IN PHW_CHANNEL chan,
- IN ULONG port,
+ IN ULONG_PTR port,
IN ULONG offs
);
DDKFASTAPI
AtapiWriteBuffer4(
IN PHW_CHANNEL chan,
- IN ULONG _port,
+ IN ULONG_PTR _port,
IN PVOID Buffer,
IN ULONG Count,
IN ULONG Timing
DDKFASTAPI
AtapiWriteBuffer2(
IN PHW_CHANNEL chan,
- IN ULONG _port,
+ IN ULONG_PTR _port,
IN PVOID Buffer,
IN ULONG Count,
IN ULONG Timing
DDKFASTAPI
AtapiReadBuffer4(
IN PHW_CHANNEL chan,
- IN ULONG _port,
+ IN ULONG_PTR _port,
IN PVOID Buffer,
IN ULONG Count,
IN ULONG Timing
DDKFASTAPI
AtapiReadBuffer2(
IN PHW_CHANNEL chan,
- IN ULONG _port,
+ IN ULONG_PTR _port,
IN PVOID Buffer,
IN ULONG Count,
IN ULONG Timing
DDKFASTAPI \
AtapiWritePort##sz( \
IN PHW_CHANNEL chan, \
- IN ULONG _port, \
+ IN ULONG_PTR _port, \
IN _type data \
) \
{ \
DDKFASTAPI \
AtapiWritePortEx##sz( \
IN PHW_CHANNEL chan, \
- IN ULONG _port, \
+ IN ULONG_PTR _port, \
IN ULONG offs, \
IN _type data \
) \
DDKFASTAPI \
AtapiReadPort##sz( \
IN PHW_CHANNEL chan, \
- IN ULONG _port \
+ IN ULONG_PTR _port \
) \
{ \
PIORES res; \
DDKFASTAPI \
AtapiReadPortEx##sz( \
IN PHW_CHANNEL chan, \
- IN ULONG _port, \
+ IN ULONG_PTR _port, \
IN ULONG offs \
) \
{ \
DDKFASTAPI \
AtapiReadBuffer##sz( \
IN PHW_CHANNEL chan, \
- IN ULONG _port, \
+ IN ULONG_PTR _port, \
IN PVOID Buffer, \
IN ULONG Count, \
IN ULONG Timing \
DDKFASTAPI \
AtapiWriteBuffer##sz( \
IN PHW_CHANNEL chan, \
- IN ULONG _port, \
+ IN ULONG_PTR _port, \
IN PVOID Buffer, \
IN ULONG Count, \
IN ULONG Timing \
goto default_reset;
offset = ((Channel & 1) << 7) + ((Channel & 2) << 8);
/* disable PHY state change interrupt */
- AtapiWritePortEx4(NULL, (ULONG)(&deviceExtension->BaseIoAddressSATA_0), 0x148 + offset, 0);
+ AtapiWritePortEx4(NULL, (ULONG_PTR)&deviceExtension->BaseIoAddressSATA_0, 0x148 + offset, 0);
UniataSataClearErr(HwDeviceExtension, j, UNIATA_SATA_IGNORE_CONNECT);
/* reset controller part for this channel */
- AtapiWritePortEx4(NULL, (ULONG)(&deviceExtension->BaseIoAddressSATA_0), 0x48,
- AtapiReadPortEx4(NULL, (ULONG)(&deviceExtension->BaseIoAddressSATA_0), 0x48) | (0xc0 >> Channel));
+ AtapiWritePortEx4(NULL, (ULONG_PTR)&deviceExtension->BaseIoAddressSATA_0, 0x48,
+ AtapiReadPortEx4(NULL, (ULONG_PTR)&deviceExtension->BaseIoAddressSATA_0, 0x48) | (0xc0 >> Channel));
AtapiStallExecution(1000);
- AtapiWritePortEx4(NULL, (ULONG)(&deviceExtension->BaseIoAddressSATA_0), 0x48,
- AtapiReadPortEx4(NULL, (ULONG)(&deviceExtension->BaseIoAddressSATA_0), 0x48) & ~(0xc0 >> Channel));
+ AtapiWritePortEx4(NULL, (ULONG_PTR)&deviceExtension->BaseIoAddressSATA_0, 0x48,
+ AtapiReadPortEx4(NULL, (ULONG_PTR)&deviceExtension->BaseIoAddressSATA_0, 0x48) & ~(0xc0 >> Channel));
break; }
switch(ChipType) {
case PROLD:
case PRNEW:
- status = AtapiReadPortEx4(chan, (ULONG)(&deviceExtension->BaseIoAddressBM_0),0x1c);
+ status = AtapiReadPortEx4(chan, (ULONG_PTR)&deviceExtension->BaseIoAddressBM_0,0x1c);
if (!DmaTransfer)
break;
if (!(status &
}
break;
case PRMIO:
- status = AtapiReadPortEx4(chan, (ULONG)(&deviceExtension->BaseIoAddressBM_0),0x0040);
+ status = AtapiReadPortEx4(chan, (ULONG_PTR)&deviceExtension->BaseIoAddressBM_0,0x0040);
if(ChipFlags & PRSATA) {
- pr_status = AtapiReadPortEx4(chan, (ULONG)(&deviceExtension->BaseIoAddressBM_0),0x006c);
- AtapiWritePortEx4(chan, (ULONG)(&deviceExtension->BaseIoAddressBM_0),0x006c, pr_status & 0x000000ff);
+ pr_status = AtapiReadPortEx4(chan, (ULONG_PTR)&deviceExtension->BaseIoAddressBM_0,0x006c);
+ AtapiWritePortEx4(chan, (ULONG_PTR)&deviceExtension->BaseIoAddressBM_0,0x006c, pr_status & 0x000000ff);
}
if(pr_status & (0x11 << Channel)) {
// TODO: reset channel
/* get and clear interrupt status */
if(ChipFlags & NVQ) {
- pr_status = AtapiReadPortEx4(chan, (ULONG)(&deviceExtension->BaseIoAddressSATA_0),offs);
- AtapiWritePortEx4(chan, (ULONG)(&deviceExtension->BaseIoAddressSATA_0),offs, (0x0fUL << shift) | 0x00f000f0);
+ pr_status = AtapiReadPortEx4(chan, (ULONG_PTR)&deviceExtension->BaseIoAddressSATA_0,offs);
+ AtapiWritePortEx4(chan, (ULONG_PTR)&deviceExtension->BaseIoAddressSATA_0,offs, (0x0fUL << shift) | 0x00f000f0);
} else {
- pr_status = AtapiReadPortEx1(chan, (ULONG)(&deviceExtension->BaseIoAddressSATA_0),offs);
- AtapiWritePortEx1(chan, (ULONG)(&deviceExtension->BaseIoAddressSATA_0),offs, (0x0f << shift));
+ pr_status = AtapiReadPortEx1(chan,(ULONG_PTR)&deviceExtension->BaseIoAddressSATA_0,offs);
+ AtapiWritePortEx1(chan, (ULONG_PTR)&deviceExtension->BaseIoAddressSATA_0,offs, (0x0f << shift));
}
KdPrint2((PRINT_PREFIX " pr_status %x\n", pr_status));
return FALSE;
}
//KdPrint2((PRINT_PREFIX " checkpoint 3\n" ));
- if((ULONG)data & deviceExtension->AlignmentMask) {
+ if((ULONG_PTR)data & deviceExtension->AlignmentMask) {
KdPrint2((PRINT_PREFIX "AtapiDmaSetup: unaligned data: %#x (%#x)\n", data, deviceExtension->AlignmentMask));
return FALSE;
}
return FALSE;
}
- dma_count = min(count, (PAGE_SIZE - ((ULONG)data & PAGE_MASK)));
+ dma_count = min(count, (PAGE_SIZE - ((ULONG_PTR)data & PAGE_MASK)));
data += dma_count;
count -= dma_count;
i = 0;
if(ChipType == PRNEW) {
ULONG Channel = deviceExtension->Channel + lChannel;
if(chan->ChannelCtrlFlags & CTRFLAGS_LBA48) {
- AtapiWritePortEx1(chan, (ULONG)(&deviceExtension->BaseIoAddressBM_0),0x11,
- AtapiReadPortEx1(chan, (ULONG)(&deviceExtension->BaseIoAddressBM_0),0x11) |
+ AtapiWritePortEx1(chan, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11,
+ AtapiReadPortEx1(chan, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11) |
(Channel ? 0x08 : 0x02));
- AtapiWritePortEx4(chan, (ULONG)(&deviceExtension->BaseIoAddressBM_0),(Channel ? 0x24 : 0x20),
+ AtapiWritePortEx4(chan, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0),(Channel ? 0x24 : 0x20),
((Srb->SrbFlags & SRB_FLAGS_DATA_IN) ? 0x05000000 : 0x06000000) | (Srb->DataTransferLength >> 1)
);
}
if(ChipType == PRNEW) {
ULONG Channel = deviceExtension->Channel + lChannel;
if(chan->ChannelCtrlFlags & CTRFLAGS_LBA48) {
- AtapiWritePortEx1(chan, (ULONG)(&deviceExtension->BaseIoAddressBM_0),0x11,
- AtapiReadPortEx1(chan, (ULONG)(&deviceExtension->BaseIoAddressBM_0),0x11) &
+ AtapiWritePortEx1(chan, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11,
+ AtapiReadPortEx1(chan, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11) &
~(Channel ? 0x08 : 0x02));
- AtapiWritePortEx4(chan, (ULONG)(&deviceExtension->BaseIoAddressBM_0),(Channel ? 0x24 : 0x20),
+ AtapiWritePortEx4(chan, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0),(Channel ? 0x24 : 0x20),
0
);
}
apiomode = 4;
for(i=udmamode; i>=0; i--) {
if(AtaSetTransferMode(deviceExtension, DeviceNumber, lChannel, LunExt, ATA_UDMA0 + i)) {
- AtapiWritePortEx4(chan, (ULONG)(&deviceExtension->BaseIoAddressBM_0), mode_reg, cyr_udmatiming[udmamode]);
+ AtapiWritePortEx4(chan, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0), mode_reg, cyr_udmatiming[udmamode]);
return;
}
}
for(i=wdmamode; i>=0; i--) {
if(AtaSetTransferMode(deviceExtension, DeviceNumber, lChannel, LunExt, ATA_WDMA0 + i)) {
- AtapiWritePortEx4(chan, (ULONG)(&deviceExtension->BaseIoAddressBM_0), mode_reg, cyr_wdmatiming[wdmamode]);
+ AtapiWritePortEx4(chan, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0), mode_reg, cyr_wdmatiming[wdmamode]);
return;
}
}
if(AtaSetTransferMode(deviceExtension, DeviceNumber, lChannel, LunExt, ATA_PIO0 + apiomode)) {
- AtapiWritePortEx4(chan, (ULONG)(&deviceExtension->BaseIoAddressBM_0), mode_reg, cyr_piotiming[apiomode]);
+ AtapiWritePortEx4(chan, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0), mode_reg, cyr_piotiming[apiomode]);
return;
}
return;
case ATA_WDMA2: reg24 = 0x00002020; break;
case ATA_UDMA2: reg24 = 0x00911030; break;
}
- AtapiWritePortEx4(NULL, (ULONG)(&deviceExtension->BaseIoAddressBM_0),(dev*8) + 0x20, reg20);
- AtapiWritePortEx4(NULL, (ULONG)(&deviceExtension->BaseIoAddressBM_0),(dev*8) + 0x24, reg24);
+ AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0),(dev*8) + 0x20, reg20);
+ AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0),(dev*8) + 0x24, reg24);
} // cyrix_timing()
VOID
KdPrint2((PRINT_PREFIX "BaseIoAddressSATA_0=%x\n", deviceExtension->BaseIoAddressSATA_0.Addr));
if(ChipFlags & NVQ) {
/* clear interrupt status */
- AtapiWritePortEx4(NULL, (ULONG)(&deviceExtension->BaseIoAddressSATA_0),offs, 0x00ff00ff);
+ AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressSATA_0),offs, 0x00ff00ff);
/* enable device and PHY state change interrupts */
- AtapiWritePortEx4(NULL, (ULONG)(&deviceExtension->BaseIoAddressSATA_0),offs+4, 0x000d000d);
+ AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressSATA_0),offs+4, 0x000d000d);
/* disable NCQ support */
- AtapiWritePortEx4(NULL, (ULONG)(&deviceExtension->BaseIoAddressSATA_0),0x0400,
- AtapiReadPortEx4(NULL, (ULONG)(&deviceExtension->BaseIoAddressSATA_0),0x0400) & 0xfffffff9);
+ AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressSATA_0),0x0400,
+ AtapiReadPortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressSATA_0),0x0400) & 0xfffffff9);
} else {
/* clear interrupt status */
- AtapiWritePortEx1(NULL, (ULONG)(&deviceExtension->BaseIoAddressSATA_0),offs, 0xff);
+ AtapiWritePortEx1(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressSATA_0),offs, 0xff);
/* enable device and PHY state change interrupts */
- AtapiWritePortEx1(NULL, (ULONG)(&deviceExtension->BaseIoAddressSATA_0),offs+1, 0xdd);
+ AtapiWritePortEx1(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressSATA_0),offs+1, 0xdd);
}
/* enable PCI interrupt */
ChangePciConfig2(offsetof(PCI_COMMON_CONFIG, Command), (a & ~0x0400));
/* setup clocks */
if(c == CHAN_NOT_SPECIFIED) {
// ATA_OUTB(ctlr->r_res1, 0x11, ATA_INB(ctlr->r_res1, 0x11) | 0x0a);
- AtapiWritePortEx1(NULL, (ULONG)(&deviceExtension->BaseIoAddressBM_0),0x11,
- AtapiReadPortEx1(NULL, (ULONG)(&deviceExtension->BaseIoAddressBM_0),0x11) | 0x0a );
+ AtapiWritePortEx1(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11,
+ AtapiReadPortEx1(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0),0x11) | 0x0a );
}
/* FALLTHROUGH */
case PROLD:
/* enable burst mode */
// ATA_OUTB(ctlr->r_res1, 0x1f, ATA_INB(ctlr->r_res1, 0x1f) | 0x01);
if(c == CHAN_NOT_SPECIFIED) {
- AtapiWritePortEx1(NULL, (ULONG)(&deviceExtension->BaseIoAddressBM_0),0x1f,
- AtapiReadPortEx1(NULL, (ULONG)(&deviceExtension->BaseIoAddressBM_0),0x1f) | 0x01 );
+ AtapiWritePortEx1(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0),0x1f,
+ AtapiReadPortEx1(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0),0x1f) | 0x01 );
} else {
// check 80-pin cable
chan = &deviceExtension->chan[c];
case PRMIO:
if(c == CHAN_NOT_SPECIFIED) {
if(ChipFlags & PRSATA) {
- AtapiWritePortEx4(NULL, (ULONG)(&deviceExtension->BaseIoAddressBM_0),0x6c, 0x000000ff);
+ AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressBM_0),0x6c, 0x000000ff);
}
} else {
chan = &deviceExtension->chan[c];
unit10 = (c & 2);
if(ChipFlags & SIINOSATAIRQ) {
KdPrint2((PRINT_PREFIX "Disable broken SATA intr on c=%x\n", c));
- AtapiWritePortEx4(NULL, (ULONG)(&deviceExtension->BaseIoAddressSATA_0), 0x148 + (unit01 << 7) + (unit10 << 8),0);
+ AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressSATA_0), 0x148 + (unit01 << 7) + (unit10 << 8),0);
}
}
} else {
if(ChipFlags & SIINOSATAIRQ) {
KdPrint2((PRINT_PREFIX "Disable broken SATA intr on c=%x\n", c));
- AtapiWritePortEx4(NULL, (ULONG)(&deviceExtension->BaseIoAddressSATA_0), 0x148 + (unit01 << 7) + (unit10 << 8),0);
+ AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressSATA_0), 0x148 + (unit01 << 7) + (unit10 << 8),0);
} else {
KdPrint2((PRINT_PREFIX "Enable SATA intr on c=%x\n", c));
- AtapiWritePortEx4(NULL, (ULONG)(&deviceExtension->BaseIoAddressSATA_0), 0x148 + (unit01 << 7) + (unit10 << 8),(1 << 16));
+ AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressSATA_0), 0x148 + (unit01 << 7) + (unit10 << 8),(1 << 16));
}
}
}
// Enable 3rd and 4th channels
if (ChipFlags & SII4CH) {
KdPrint2((PRINT_PREFIX "SII4CH\n"));
- AtapiWritePortEx4(NULL, (ULONG)(&deviceExtension->BaseIoAddressSATA_0),0x0200, 0x00000002);
+ AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressSATA_0),0x0200, 0x00000002);
}
} else {
chan = &deviceExtension->chan[c];
/* dont block interrupts */
//ChangePciConfig4(0x48, (a & ~0x03c00000));
- tmp32 = AtapiReadPortEx4(NULL, (ULONG)(&deviceExtension->BaseIoAddressSATA_0),0x48);
- AtapiWritePortEx4(NULL, (ULONG)(&deviceExtension->BaseIoAddressSATA_0),0x48, (1 << 22) << c);
+ tmp32 = AtapiReadPortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressSATA_0),0x48);
+ AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressSATA_0),0x48, (1 << 22) << c);
// flush
- tmp32 = AtapiReadPortEx4(NULL, (ULONG)(&deviceExtension->BaseIoAddressSATA_0),0x48);
+ tmp32 = AtapiReadPortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAddressSATA_0),0x48);
/* Initialize FIFO PCI bus arbitration */
GetPciConfig1(offsetof(PCI_COMMON_CONFIG, CacheLineSize), tmp8);
for(c=0; c<deviceExtension->NumberChannels; c++) {
chan = &deviceExtension->chan[c];
for (i=0; i<IDX_BM_IO_SZ; i++) {
- chan->RegTranslation[IDX_BM_IO+i].Addr = BaseIoAddressBM_0 ? ((ULONG)BaseIoAddressBM_0 + i) : 0;
+ chan->RegTranslation[IDX_BM_IO+i].Addr = BaseIoAddressBM_0 ? ((ULONG_PTR)BaseIoAddressBM_0 + i) : 0;
chan->RegTranslation[IDX_BM_IO+i].MemIo = MemIo;
}
if(BaseIoAddressBM_0) {
ULONG i;
for (i=0; i<IDX_IO1_SZ; i++) {
- chan->RegTranslation[IDX_IO1+i].Addr = BaseIoAddress1 ? ((ULONG)BaseIoAddress1 + i) : 0;
+ chan->RegTranslation[IDX_IO1+i].Addr = BaseIoAddress1 ? ((ULONG_PTR)BaseIoAddress1 + i) : 0;
chan->RegTranslation[IDX_IO1+i].MemIo = FALSE;
}
for (i=0; i<IDX_IO2_SZ; i++) {
- chan->RegTranslation[IDX_IO2+i].Addr = BaseIoAddress2 ? ((ULONG)BaseIoAddress2 + i) : 0;
+ chan->RegTranslation[IDX_IO2+i].Addr = BaseIoAddress2 ? ((ULONG_PTR)BaseIoAddress2 + i) : 0;
chan->RegTranslation[IDX_IO2+i].MemIo = FALSE;
}
UniataInitSyncBaseIO(chan);
IN ULONG length
)
{
- ULONG io_start = 0;
+ ULONG_PTR io_start = 0;
KdPrint2((PRINT_PREFIX " AtapiGetIoRange:\n"));
if(ConfigInfo->NumberOfAccessRanges <= rid)
if((*ConfigInfo->AccessRanges)[rid].RangeInMemory) {
io_start =
// Get the system physical address for this IO range.
- ((ULONG)ScsiPortGetDeviceBase(HwDeviceExtension,
+ ((ULONG_PTR)ScsiPortGetDeviceBase(HwDeviceExtension,
PCIBus /*ConfigInfo->AdapterInterfaceType*/,
SystemIoBusNumber /*ConfigInfo->SystemIoBusNumber*/,
ScsiPortConvertUlongToPhysicalAddress(
ULONG dev_id;
PCI_SLOT_NUMBER slotData;
- ULONG i;
+ ULONG_PTR i;
ULONG channel;
ULONG c = 0;
PUCHAR ioSpace;
KdPrint2((PRINT_PREFIX "AdapterInterfaceType: Isa\n"));
}
if(InDriverEntry) {
- i = (ULONG)Context;
+ i = (ULONG_PTR)Context;
if(i & 0x80000000) {
AltInit = TRUE;
}
}
if(i >= BMListLen) {
KdPrint2((PRINT_PREFIX "unexpected device arrival\n"));
- i = (ULONG)Context;
+ i = (ULONG_PTR)Context;
if(FirstMasterOk) {
channel = 1;
}
BaseIoAddressBM_0,
(*ConfigInfo->AccessRanges)[4].RangeInMemory ? TRUE : FALSE);
deviceExtension->BusMaster = TRUE;
- deviceExtension->BaseIoAddressBM_0.Addr = (ULONG)BaseIoAddressBM_0;
+ deviceExtension->BaseIoAddressBM_0.Addr = (ULONG_PTR)BaseIoAddressBM_0;
if((*ConfigInfo->AccessRanges)[4].RangeInMemory) {
deviceExtension->BaseIoAddressBM_0.MemIo = TRUE;
}
ULONG dev_id;
PCI_SLOT_NUMBER slotData;
- ULONG i;
+ ULONG_PTR i;
// PUCHAR ioSpace;
// UCHAR statusByte;
*Again = FALSE;
if(InDriverEntry) {
- i = (ULONG)Context;
+ i = (ULONG_PTR)Context;
} else {
for(i=0; i<BMListLen; i++) {
if(BMList[i].slotNumber == ConfigInfo->SlotNumber &&
BaseIoAddressBM_0,
(*ConfigInfo->AccessRanges)[4].RangeInMemory ? TRUE : FALSE);
deviceExtension->BusMaster = TRUE;
- deviceExtension->BaseIoAddressBM_0.Addr = (ULONG)BaseIoAddressBM_0;
+ deviceExtension->BaseIoAddressBM_0.Addr = (ULONG_PTR)BaseIoAddressBM_0;
if((*ConfigInfo->AccessRanges)[4].RangeInMemory) {
deviceExtension->BaseIoAddressBM_0.MemIo = TRUE;
}
ioSpace = (PUCHAR)ScsiPortGetDeviceBase(HwDeviceExtension,
ConfigInfo->AdapterInterfaceType,
ConfigInfo->SystemIoBusNumber,
- ScsiPortConvertUlongToPhysicalAddress((ULONG)BaseIoAddress1 + 0x0E),
+ ScsiPortConvertUlongToPhysicalAddress((ULONG_PTR)BaseIoAddress1 + 0x0E),
ATA_ALTIOSIZE,
TRUE);
} else {
ioSpace = (PUCHAR)ScsiPortGetDeviceBase(HwDeviceExtension,
ConfigInfo->AdapterInterfaceType,
ConfigInfo->SystemIoBusNumber,
- ScsiPortConvertUlongToPhysicalAddress((ULONG)BaseIoAddress1 + ATA_ALTOFFSET),
+ ScsiPortConvertUlongToPhysicalAddress((ULONG_PTR)BaseIoAddress1 + ATA_ALTOFFSET),
ATA_ALTIOSIZE,
TRUE);
}
ULONGLONG base;
/* reset AHCI controller */
- AtapiWritePortEx4(NULL, (ULONG)&deviceExtension->BaseIoAHCI_0, IDX_AHCI_GHC,
- AtapiReadPortEx4(NULL, (ULONG)&deviceExtension->BaseIoAHCI_0, IDX_AHCI_GHC) | AHCI_GHC_HR);
+ AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), IDX_AHCI_GHC,
+ AtapiReadPortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), IDX_AHCI_GHC) | AHCI_GHC_HR);
AtapiStallExecution(1000000);
- if(AtapiReadPortEx4(NULL, (ULONG)&deviceExtension->BaseIoAHCI_0, IDX_AHCI_GHC) & AHCI_GHC_HR) {
+ if(AtapiReadPortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), IDX_AHCI_GHC) & AHCI_GHC_HR) {
KdPrint2((PRINT_PREFIX " AHCI reset failed\n"));
return FALSE;
}
/* enable AHCI mode */
- AtapiWritePortEx4(NULL, (ULONG)&deviceExtension->BaseIoAHCI_0, IDX_AHCI_GHC,
- AtapiReadPortEx4(NULL, (ULONG)&deviceExtension->BaseIoAHCI_0, IDX_AHCI_GHC) | AHCI_GHC_AE);
+ AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), IDX_AHCI_GHC,
+ AtapiReadPortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), IDX_AHCI_GHC) | AHCI_GHC_AE);
- CAP = AtapiReadPortEx4(NULL, (ULONG)&deviceExtension->BaseIoAHCI_0, IDX_AHCI_CAP);
- PI = AtapiReadPortEx4(NULL, (ULONG)&deviceExtension->BaseIoAHCI_0, IDX_AHCI_PI);
+ CAP = AtapiReadPortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), IDX_AHCI_CAP);
+ PI = AtapiReadPortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), IDX_AHCI_PI);
/* get the number of HW channels */
for(i=PI, n=0; i; n++, i=i>>1);
deviceExtension->NumberChannels =
}
/* clear interrupts */
- AtapiWritePortEx4(NULL, (ULONG)&deviceExtension->BaseIoAHCI_0, IDX_AHCI_IS,
- AtapiReadPortEx4(NULL, (ULONG)&deviceExtension->BaseIoAHCI_0, IDX_AHCI_IS));
+ AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), IDX_AHCI_IS,
+ AtapiReadPortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), IDX_AHCI_IS));
/* enable AHCI interrupts */
- AtapiWritePortEx4(NULL, (ULONG)&deviceExtension->BaseIoAHCI_0, IDX_AHCI_GHC,
- AtapiReadPortEx4(NULL, (ULONG)&deviceExtension->BaseIoAHCI_0, IDX_AHCI_GHC) | AHCI_GHC_IE);
+ AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), IDX_AHCI_GHC,
+ AtapiReadPortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), IDX_AHCI_GHC) | AHCI_GHC_IE);
- version = AtapiReadPortEx4(NULL, (ULONG)&deviceExtension->BaseIoAHCI_0, IDX_AHCI_VS);
+ version = AtapiReadPortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), IDX_AHCI_VS);
KdPrint2((PRINT_PREFIX " AHCI version %x%x.%x%x controller with %d ports (mask %x) detected\n",
(version >> 24) & 0xff, (version >> 16) & 0xff,
(version >> 8) & 0xff, version & 0xff, deviceExtension->NumberChannels, PI));
KdPrint2((PRINT_PREFIX " AHCI buffer allocation failed\n"));
return FALSE;
}
- AtapiWritePortEx4(NULL, (ULONG)&deviceExtension->BaseIoAHCI_0, offs + IDX_AHCI_P_CLB,
+ AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), offs + IDX_AHCI_P_CLB,
(ULONG)(base & 0xffffffff));
- AtapiWritePortEx4(NULL, (ULONG)&deviceExtension->BaseIoAHCI_0, offs + IDX_AHCI_P_CLB + 4,
+ AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), offs + IDX_AHCI_P_CLB + 4,
(ULONG)((base >> 32) & 0xffffffff));
base = chan->AHCI_CL_PhAddr + ATA_AHCI_MAX_TAGS;
- AtapiWritePortEx4(NULL, (ULONG)&deviceExtension->BaseIoAHCI_0, offs + IDX_AHCI_P_FB,
+ AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), offs + IDX_AHCI_P_FB,
(ULONG)(base & 0xffffffff));
- AtapiWritePortEx4(NULL, (ULONG)&deviceExtension->BaseIoAHCI_0, offs + IDX_AHCI_P_FB + 4,
+ AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), offs + IDX_AHCI_P_FB + 4,
(ULONG)((base >> 32) & 0xffffffff));
chan->ChannelCtrlFlags |= CTRFLAGS_NO_SLAVE;
SATA_SSTATUS_REG SStatus;
SATA_SERROR_REG SError;
ULONG offs = sizeof(IDE_AHCI_REGISTERS) + Channel*sizeof(IDE_AHCI_PORT_REGISTERS);
- ULONG base;
+ ULONG_PTR base;
ULONG tag=0;
KdPrint(("UniataAhciStatus:\n"));
- hIS = AtapiReadPortEx4(NULL, (ULONG)&deviceExtension->BaseIoAHCI_0, IDX_AHCI_IS);
+ hIS = AtapiReadPortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), IDX_AHCI_IS);
KdPrint((" hIS %x\n", hIS));
hIS &= (1 << Channel);
if(!hIS) {
return 0;
}
- base = (ULONG)&deviceExtension->BaseIoAHCI_0 + offs;
+ base = (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0 + offs);
IS.Reg = AtapiReadPort4(chan, base + IDX_AHCI_P_IS);
CI = AtapiReadPort4(chan, base + IDX_AHCI_P_CI);
SStatus.Reg = AtapiReadPort4(chan, IDX_SATA_SStatus);
SError.Reg = AtapiReadPort4(chan, IDX_SATA_SError);
/* clear interrupt(s) */
- AtapiWritePortEx4(NULL, (ULONG)&deviceExtension->BaseIoAHCI_0, IDX_AHCI_IS, hIS);
+ AtapiWritePortEx4(NULL, (ULONG_PTR)(&deviceExtension->BaseIoAHCI_0), IDX_AHCI_IS, hIS);
AtapiWritePort4(chan, base + IDX_AHCI_P_IS, IS.Reg);
AtapiWritePort4(chan, IDX_SATA_SError, SError.Reg);
#ifndef __CROSSNT_MISC__H__
#define __CROSSNT_MISC__H__
+#if defined(_M_X86_)
extern "C"
void
__fastcall
void* b // EDX
);
#define XCHG_DD(a,b) _XCHG_DD(&(a),&(b))
+#endif
#endif // __CROSSNT_MISC__H__
}
#define DEC_TO_BCD(x) (((x / 10) << 4) + (x % 10))
-/*
-#if defined _X86_ && !defined(__GNUC__)
+
+#if defined(_M_X86_) && defined(_MSC_VER)
#define MOV_DD_SWP(a,b) \
{ \
__asm mov [ebx],eax \
}
-#else // NO X86 optimization , use generic C/C++
+#elif !defined(_M_X86_) // NO X86 optimization , use generic C/C++
#define MOV_DD_SWP(a,b) \
{ \
_to_->Byte3 = _from_->Byte0; \
}
+#define MOV_SWP_DW2DD(a,b) \
+{ \
+ PFOUR_BYTE _from_, _to_; \
+ _from_ = ((PFOUR_BYTE)&(b)); \
+ _to_ = ((PFOUR_BYTE)&(a)); \
+ *((PUSHORT)_to_) = 0; \
+ _to_->Byte0 = _from_->Byte1; \
+ _to_->Byte1 = _from_->Byte0; \
+}
+
+
#define MOV_MSF(a,b) \
{ \
PFOUR_BYTE _from_, _to_; \
#define MOV_3B_SWP(a,b) MOV_MSF_SWP(a,b)
-*/
+
#ifdef DBG
<directory name="ros_glue">
<file>ros_glue.cpp</file>
- <file>ros_glue_asm.s</file>
+ <if property="ARCH" value="i386">
+ <file>ros_glue_asm.s</file>
+ </if>
</directory>
</module>
--- /dev/null
+/* $Id: diskdump.c 29690 2007-10-19 23:21:45Z dreimer $
+ *
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS Kernel
+ * FILE: services/storage/diskdump/diskdump.c
+ * PURPOSE: Dumping crash data to the pagefile
+ * PROGRAMMER:
+ */
+
+/* INCLUDES *****************************************************************/
+
+#include <ntddk.h>
+#include <scsi.h>
+#include <ntdddisk.h>
+#include <ntddscsi.h>
+#include <../class/include/class2.h>
+#include <diskdump/diskdump.h>
+#include <ndk/rtlfuncs.h>
+
+#include "../scsiport/scsiport_int.h"
+
+#define NDEBUG
+#include <debug.h>
+
+/* It's already defined in scsiport_int.h */
+#undef VERSION
+#define VERSION "0.0.1"
+
+#undef KeGetCurrentIrql
+/* PROTOTYPES ***************************************************************/
+
+NTSTATUS NTAPI
+DiskDumpPrepare(PDEVICE_OBJECT DeviceObject, PDUMP_POINTERS DumpPointers);
+VOID
+DiskDumpScsiInvalid(VOID);
+VOID
+_DiskDumpScsiPortNotification(IN SCSI_NOTIFICATION_TYPE NotificationType,
+ IN PVOID HwDeviceExtension,
+ ...);
+NTSTATUS NTAPI
+DiskDumpInit(VOID);
+NTSTATUS NTAPI
+DiskDumpFinish(VOID);
+NTSTATUS NTAPI
+DiskDumpWrite(LARGE_INTEGER StartAddress, PMDL Mdl);
+
+typedef VOID (*SCSIPORTNOTIFICATION)(IN SCSI_NOTIFICATION_TYPE NotificationType,
+ IN PVOID HwDeviceExtension,
+ ...);
+
+/* GLOBALS ******************************************************************/
+
+MM_CORE_DUMP_FUNCTIONS DiskDumpFunctions =
+ {
+ (PVOID)DiskDumpPrepare,
+ (PVOID)DiskDumpInit,
+ (PVOID)DiskDumpWrite,
+ (PVOID)DiskDumpFinish,
+ };
+
+typedef struct
+{
+ PCH Name;
+ ULONG Ordinal;
+ PVOID OldFunction;
+ PVOID NewFunction;
+} SUBSTITUTE_EXPORT;
+
+static SCSI_REQUEST_BLOCK CoreDumpSrb;
+static DUMP_POINTERS CoreDumpPointers;
+static PDEVICE_OBJECT CoreDumpClassDevice;
+static PDEVICE_EXTENSION CoreDumpClass2DeviceExtension;
+static PDEVICE_OBJECT CoreDumpPortDevice;
+static SCSI_PORT_DEVICE_EXTENSION* CoreDumpPortDeviceExtension;
+BOOLEAN IsDumping = FALSE;
+static PDRIVER_OBJECT DiskDumpDriver;
+static UCHAR DiskDumpSenseData[SENSE_BUFFER_SIZE];
+static BOOLEAN IrqComplete, IrqNextRequest;
+PVOID OldScsiPortNotification;
+static SUBSTITUTE_EXPORT DiskDumpExports[] =
+ {
+ {"ScsiPortConvertPhysicalAddressToUlong", 2, NULL, NULL},
+ {"ScsiPortConvertUlongToPhysicalAddress", 3, NULL, NULL},
+ {"ScsiPortFreeDeviceBase", 5, NULL, DiskDumpScsiInvalid},
+ {"ScsiPortGetBusData", 6, NULL, DiskDumpScsiInvalid},
+ {"ScsiPortGetDeviceBase", 7, NULL, DiskDumpScsiInvalid},
+ {"ScsiPortInitialize", 13, NULL, DiskDumpScsiInvalid},
+ {"ScsiPortNotification", 17, NULL, _DiskDumpScsiPortNotification},
+ {"ScsiPortReadPortBufferUlong", 19, NULL, NULL},
+ {"ScsiPortReadPortBufferUshort", 20, NULL, NULL},
+ {"ScsiPortReadPortUchar", 21, NULL, NULL},
+ {"ScsiPortReadPortUshort", 23, NULL, NULL},
+ {"ScsiPortStallExecution", 31, NULL, NULL},
+ {"ScsiPortWritePortBufferUlong", 34, NULL, NULL},
+ {"ScsiPortWritePortBufferUshort", 35, NULL, NULL},
+ {"ScsiPortWritePortUchar", 36, NULL, NULL},
+ {"ScsiDebugPrint", 0, NULL, NULL},
+ };
+
+/* FUNCTIONS ****************************************************************/
+
+
+
+VOID
+DiskDumpScsiPortNotification(IN SCSI_NOTIFICATION_TYPE NotificationType,
+ IN PVOID HwDeviceExtension,
+ ...)
+{
+ if (NotificationType == RequestComplete)
+ {
+ IrqComplete = TRUE;
+ }
+ if (NotificationType == NextRequest)
+ {
+ IrqNextRequest = TRUE;
+ }
+}
+
+VOID
+DiskDumpScsiInvalid(VOID)
+{
+ DbgPrint("DISKDUMP: Error: Miniport called a function not supported at dump time.\n");
+ KeBugCheck(0);
+}
+
+VOID NTAPI
+DiskDumpBuildRequest(LARGE_INTEGER StartingOffset, PMDL Mdl)
+{
+ LARGE_INTEGER StartingBlock;
+ PSCSI_REQUEST_BLOCK Srb;
+ PCDB Cdb;
+ ULONG LogicalBlockAddress;
+ USHORT TransferBlocks;
+
+ /* Calculate logical block address */
+ StartingBlock.QuadPart = StartingOffset.QuadPart >> CoreDumpClass2DeviceExtension->SectorShift;
+ LogicalBlockAddress = (ULONG)StartingBlock.u.LowPart;
+
+ DPRINT("Logical block address: %lu\n", LogicalBlockAddress);
+
+ /* Allocate and initialize an SRB */
+ Srb = &CoreDumpSrb;
+
+ Srb->SrbFlags = 0;
+ Srb->Length = sizeof(SCSI_REQUEST_BLOCK); //SCSI_REQUEST_BLOCK_SIZE;
+ Srb->OriginalRequest = NULL;
+ Srb->PathId = CoreDumpClass2DeviceExtension->PathId;
+ Srb->TargetId = CoreDumpClass2DeviceExtension->TargetId;
+ Srb->Lun = CoreDumpClass2DeviceExtension->Lun;
+ Srb->Function = SRB_FUNCTION_EXECUTE_SCSI;
+ Srb->DataBuffer = Mdl->MappedSystemVa;
+ Srb->DataTransferLength = PAGE_SIZE;
+ Srb->QueueAction = SRB_SIMPLE_TAG_REQUEST;
+ Srb->QueueSortKey = LogicalBlockAddress;
+
+ Srb->SenseInfoBuffer = DiskDumpSenseData;
+ Srb->SenseInfoBufferLength = SENSE_BUFFER_SIZE;
+
+ Srb->TimeOutValue =
+ ((Srb->DataTransferLength + 0xFFFF) >> 16) * CoreDumpClass2DeviceExtension->TimeOutValue;
+
+ Srb->SrbStatus = SRB_STATUS_SUCCESS;
+ Srb->ScsiStatus = 0;
+ Srb->NextSrb = 0;
+
+ Srb->CdbLength = 10;
+ Cdb = (PCDB)Srb->Cdb;
+
+ /* Initialize ATAPI packet (12 bytes) */
+ RtlZeroMemory(Cdb, MAXIMUM_CDB_SIZE);
+
+ Cdb->CDB10.LogicalUnitNumber = CoreDumpClass2DeviceExtension->Lun;
+ TransferBlocks = (USHORT)(PAGE_SIZE >>
+ CoreDumpClass2DeviceExtension->SectorShift);
+
+ /* Copy little endian values into CDB in big endian format */
+ Cdb->CDB10.LogicalBlockByte0 = ((PFOUR_BYTE)&LogicalBlockAddress)->Byte3;
+ Cdb->CDB10.LogicalBlockByte1 = ((PFOUR_BYTE)&LogicalBlockAddress)->Byte2;
+ Cdb->CDB10.LogicalBlockByte2 = ((PFOUR_BYTE)&LogicalBlockAddress)->Byte1;
+ Cdb->CDB10.LogicalBlockByte3 = ((PFOUR_BYTE)&LogicalBlockAddress)->Byte0;
+
+ Cdb->CDB10.TransferBlocksMsb = ((PFOUR_BYTE)&TransferBlocks)->Byte1;
+ Cdb->CDB10.TransferBlocksLsb = ((PFOUR_BYTE)&TransferBlocks)->Byte0;
+
+
+ /* Write Command. */
+ Srb->SrbFlags |= SRB_FLAGS_DATA_OUT;
+ Cdb->CDB10.OperationCode = SCSIOP_WRITE;
+
+ /* Leave caching disabled. */
+}
+
+BOOLEAN NTAPI
+DiskDumpIsr(PKINTERRUPT Interrupt, PVOID ServiceContext)
+{
+ if (!CoreDumpPortDeviceExtension->HwInterrupt(&CoreDumpPortDeviceExtension->MiniPortDeviceExtension))
+ {
+ return(FALSE);
+ }
+ return(TRUE);
+}
+
+NTSTATUS NTAPI
+DiskDumpInit(VOID)
+{
+ KIRQL CurrentIrql = KeGetCurrentIrql();
+ IsDumping = TRUE;
+ if (CurrentIrql >= CoreDumpPortDeviceExtension->Interrupt->SynchronizeIrql)
+ {
+ DbgPrint("DISKDUMP: Error: Crash inside high priority interrupt routine.\n");
+ return(STATUS_UNSUCCESSFUL);
+ }
+ CoreDumpPortDeviceExtension->Interrupt->ServiceRoutine = DiskDumpIsr;
+
+ return(STATUS_SUCCESS);
+}
+
+NTSTATUS NTAPI
+DiskDumpFinish(VOID)
+{
+ return(STATUS_SUCCESS);
+}
+
+NTSTATUS NTAPI
+DiskDumpWrite(LARGE_INTEGER Address, PMDL Mdl)
+{
+ KIRQL OldIrql = 0, OldIrql2 = 0;
+ KIRQL CurrentIrql = KeGetCurrentIrql();
+
+ if (CurrentIrql < (CoreDumpPortDeviceExtension->Interrupt->SynchronizeIrql - 1))
+ {
+ KeRaiseIrql(CoreDumpPortDeviceExtension->Interrupt->SynchronizeIrql - 1, &OldIrql);
+ }
+
+ /* Adjust the address for the start of the partition. */
+ Address.QuadPart +=
+ (CoreDumpClass2DeviceExtension->StartingOffset.QuadPart + CoreDumpClass2DeviceExtension->DMByteSkew);
+
+ /* Assume the device is always able to transfer a page so no need to split up the transfer. */
+
+ /* Build an SRB to describe the write. */
+ DiskDumpBuildRequest(Address, Mdl);
+
+ /* Start i/o on the HBA. */
+ IrqComplete = IrqNextRequest = FALSE;
+ KeRaiseIrql(CoreDumpPortDeviceExtension->Interrupt->SynchronizeIrql, &OldIrql2);
+ if (!CoreDumpPortDeviceExtension->HwStartIo(&CoreDumpPortDeviceExtension->MiniPortDeviceExtension,
+ &CoreDumpSrb))
+ {
+ KeLowerIrql(OldIrql);
+ DbgPrint("DISKDUMP: Error: Miniport HwStartIo failed.\n");
+ return(STATUS_UNSUCCESSFUL);
+ }
+ KeLowerIrql(OldIrql2);
+
+ /* Wait for the miniport to finish. */
+ __asm__ ("sti\n\t");
+ while (!IrqComplete || !IrqNextRequest)
+ {
+ __asm__ ("hlt\n\t");
+ }
+ if (CurrentIrql < (CoreDumpPortDeviceExtension->Interrupt->SynchronizeIrql - 1))
+ {
+ KeLowerIrql(OldIrql);
+ }
+ __asm__("cli\n\t");
+
+ /* Check the result. */
+ if (SRB_STATUS(CoreDumpSrb.SrbStatus) != SRB_STATUS_SUCCESS)
+ {
+ DbgPrint("DISKDUMP: Error: SRB failed.\n");
+ return(STATUS_UNSUCCESSFUL);
+ }
+ return(STATUS_SUCCESS);
+}
+
+NTSTATUS NTAPI
+DiskDumpPrepare(PDEVICE_OBJECT DeviceObject, PDUMP_POINTERS DumpPointers)
+{
+ PIMAGE_NT_HEADERS NtHeader;
+ PVOID ImportDirectory;
+ ULONG ImportDirectorySize;
+ PIMAGE_IMPORT_DESCRIPTOR ImportModuleDirectory;
+ PVOID DriverBase;
+ PCH Name;
+ ULONG i;
+ ULONG Hint;
+ PVOID* ImportAddressList;
+ PULONG FunctionNameList;
+
+ /* Save the information from the kernel. */
+ CoreDumpClassDevice = DeviceObject;
+ CoreDumpPointers = *DumpPointers;
+ CoreDumpClass2DeviceExtension = (PDEVICE_EXTENSION)CoreDumpClassDevice->DeviceExtension;
+ CoreDumpPortDevice = DumpPointers->DeviceObject;
+ CoreDumpPortDeviceExtension = CoreDumpPortDevice->DeviceExtension;
+
+ /* Replace all the miniport driver's imports with our functions. */
+ DriverBase = CoreDumpPortDevice->DriverObject->DriverStart;
+ NtHeader = RtlImageNtHeader(DriverBase);
+ ImportDirectory = RtlImageDirectoryEntryToData(DriverBase,
+ TRUE,
+ IMAGE_DIRECTORY_ENTRY_IMPORT,
+ &ImportDirectorySize);
+ if (ImportDirectory == NULL || ImportDirectorySize == 0)
+ {
+ DbgPrint("DISKDUMP: Error: Miniport has no imports?\n");
+ return(STATUS_UNSUCCESSFUL);
+ }
+ /* Process each import module */
+ ImportModuleDirectory = (PIMAGE_IMPORT_DESCRIPTOR)ImportDirectory;
+ DPRINT("Processeing import directory at %p\n", ImportModuleDirectory);
+ while (ImportModuleDirectory->Name)
+ {
+ /* Check to make sure that import lib is kernel */
+ Name = (PCHAR) DriverBase + ImportModuleDirectory->Name;
+
+ if (strcmp(Name, "scsiport.sys") != 0)
+ {
+ DbgPrint("DISKDUMP: Warning: Miniport has illegal imports.\n");
+ ImportModuleDirectory++;
+ continue;
+ }
+
+ /* Get the import address list */
+ ImportAddressList = (PVOID *) ((PUCHAR)DriverBase +
+ (ULONG_PTR)ImportModuleDirectory->FirstThunk);
+
+ /* Get the list of functions to import */
+ if (ImportModuleDirectory->OriginalFirstThunk != 0)
+ {
+ FunctionNameList = (PULONG) ((PUCHAR)DriverBase +
+ (ULONG_PTR)ImportModuleDirectory->OriginalFirstThunk);
+ }
+ else
+ {
+ FunctionNameList = (PULONG) ((PUCHAR)DriverBase +
+ (ULONG_PTR)ImportModuleDirectory->FirstThunk);
+ }
+ /* Walk through function list and fixup addresses */
+ while (*FunctionNameList != 0L)
+ {
+ if ((*FunctionNameList) & 0x80000000) // hint
+ {
+ Name = NULL;
+
+ Hint = (*FunctionNameList) & 0xffff;
+ }
+ else // hint-name
+ {
+ Name = (PCHAR)((ULONG_PTR)DriverBase +
+ (ULONG_PTR)*FunctionNameList + 2);
+ Hint = *(PUSHORT)((ULONG_PTR)DriverBase + (ULONG_PTR)*FunctionNameList);
+ }
+#if 0
+ DPRINT(" Hint:%04x Name:%s\n", Hint, pName);
+#endif
+
+ for (i = 0; i < (sizeof(DiskDumpExports) / sizeof(DiskDumpExports[0])); i++)
+ {
+ if (DiskDumpExports[i].Ordinal == Hint ||
+ (Name != NULL && strcmp(DiskDumpExports[i].Name, Name) == 0))
+ {
+ break;
+ }
+ }
+ if (i == (sizeof(DiskDumpExports) / sizeof(DiskDumpExports[0])))
+ {
+ DbgPrint("DISKDUMP: Error: Miniport imports unknown symbol %s.\n", Name);
+ return(STATUS_UNSUCCESSFUL);
+ }
+ if (strcmp(Name, "ScsiPortNotification") == 0)
+ {
+ OldScsiPortNotification = *ImportAddressList;
+ }
+ DiskDumpExports[i].OldFunction = *ImportAddressList;
+ if (DiskDumpExports[i].NewFunction != NULL)
+ {
+ *ImportAddressList = DiskDumpExports[i].NewFunction;
+ }
+
+ ImportAddressList++;
+ FunctionNameList++;
+ }
+ ImportModuleDirectory++;
+ }
+ return(STATUS_SUCCESS);
+}
+
+/**********************************************************************
+ * NAME EXPORTED
+ * DriverEntry
+ *
+ * DESCRIPTION
+ * This function initializes the driver, locates and claims
+ * hardware resources, and creates various NT objects needed
+ * to process I/O requests.
+ *
+ * RUN LEVEL
+ * PASSIVE_LEVEL
+ *
+ * ARGUMENTS
+ * DriverObject
+ * System allocated Driver Object for this driver
+ *
+ * RegistryPath
+ * Name of registry driver service key
+ *
+ * RETURN VALUE
+ * Status
+ */
+
+NTSTATUS NTAPI
+DriverEntry(IN PDRIVER_OBJECT DriverObject,
+ IN PUNICODE_STRING RegistryPath)
+{
+ DiskDumpDriver = DriverObject;
+ return(STATUS_SUCCESS);
+}
+
+
+/* EOF */
--- /dev/null
+<?xml version="1.0"?>
+<!DOCTYPE module SYSTEM "../../../../tools/rbuild/project.dtd">
+<module name="diskdump" type="kernelmodedriver" installbase="system32/drivers" installname="diskdump.sys">
+ <bootstrap installbase="$(CDOUTPUT)" />
+ <importlibrary definition="diskdump.spec" />
+ <include base="ReactOS">include/reactos/drivers</include>
+ <library>ntoskrnl</library>
+ <library>hal</library>
+ <library>class2</library>
+ <include base="diskdump">..</include>
+ <file>diskdump.c</file>
+ <file>diskdump_helper.S</file>
+ <file>diskdump.rc</file>
+</module>
--- /dev/null
+/* $Id: diskdump.rc 21842 2006-05-07 19:16:11Z ion $ */
+
+#define REACTOS_VERSION_DLL
+#define REACTOS_STR_FILE_DESCRIPTION "Crash Dump Disk Driver\0"
+#define REACTOS_STR_INTERNAL_NAME "diskdump\0"
+#define REACTOS_STR_ORIGINAL_FILENAME "diskdump.sys\0"
+#include <reactos/version.rc>
--- /dev/null
+@ extern DiskDumpFunctions
--- /dev/null
+.globl __DiskDumpScsiPortNotification
+__DiskDumpScsiPortNotification:
+ cmp $0, _IsDumping
+ je .l1
+ jmp _DiskDumpScsiPortNotification
+.l1:
+ jmp *_OldScsiPortNotification
+.L2:
+ jmp .L2
/* i/o space */
if (AddressSpace != 0)
- return((PVOID)TranslatedAddress.u.LowPart);
+ return((PVOID)(ULONG_PTR)TranslatedAddress.QuadPart);
MappedAddress = MmMapIoSpace(TranslatedAddress,
NumberOfBytes,
PortConfig->AccessRanges = (PVOID)(PortConfig+1);
/* Align to LONGLONG */
- PortConfig->AccessRanges = (PVOID)((ULONG)(PortConfig->AccessRanges) + 7);
- PortConfig->AccessRanges = (PVOID)((ULONG)(PortConfig->AccessRanges) & ~7);
+ PortConfig->AccessRanges = (PVOID)((ULONG_PTR)(PortConfig->AccessRanges) + 7);
+ PortConfig->AccessRanges = (PVOID)((ULONG_PTR)(PortConfig->AccessRanges) & ~7);
/* Copy the data */
RtlCopyMemory(PortConfig->AccessRanges,
--- /dev/null
+#ifdef __x86_64__
+#define MAYBEFWD(x)
+#else
+#define MAYBEFWD(x) x
+#endif
+
+@ cdecl ScsiDebugPrint()
+@ stdcall ScsiPortCompleteRequest(ptr long long long long)
+@ stdcall ScsiPortConvertPhysicalAddressToUlong(long long)
+@ stdcall ScsiPortConvertUlongToPhysicalAddress(long) MAYBEFWD(NTOSKRNL.RtlConvertUlongToLargeInteger)
+@ stdcall ScsiPortFlushDma(ptr)
+@ stdcall ScsiPortFreeDeviceBase(ptr ptr)
+@ stdcall ScsiPortGetBusData(ptr long long long ptr long)
+@ stdcall ScsiPortGetDeviceBase(ptr long long long long long long)
+@ stdcall ScsiPortGetLogicalUnit(ptr long long long)
+@ stdcall ScsiPortGetPhysicalAddress(ptr ptr ptr long)
+@ stdcall ScsiPortGetSrb(ptr long long long long)
+@ stdcall ScsiPortGetUncachedExtension(ptr ptr long)
+@ stdcall ScsiPortGetVirtualAddress(ptr long long)
+@ stdcall ScsiPortInitialize(ptr ptr ptr ptr)
+@ stdcall ScsiPortIoMapTransfer(ptr ptr long long)
+@ stdcall ScsiPortLogError(ptr ptr long long long long long)
+@ stdcall ScsiPortMoveMemory(ptr ptr long)
+@ cdecl ScsiPortNotification()
+@ stdcall ScsiPortReadPortBufferUchar(ptr ptr long) MAYBEFWD(HAL.READ_PORT_BUFFER_UCHAR)
+@ stdcall ScsiPortReadPortBufferUshort(ptr ptr long) MAYBEFWD(HAL.READ_PORT_BUFFER_USHORT)
+@ stdcall ScsiPortReadPortBufferUlong(ptr ptr long) MAYBEFWD(HAL.READ_PORT_BUFFER_ULONG)
+@ stdcall ScsiPortReadPortUchar(ptr) MAYBEFWD(HAL.READ_PORT_UCHAR)
+@ stdcall ScsiPortReadPortUshort(ptr) MAYBEFWD(HAL.READ_PORT_USHORT)
+@ stdcall ScsiPortReadPortUlong(ptr) MAYBEFWD(HAL.READ_PORT_ULONG)
+@ stdcall ScsiPortReadRegisterBufferUchar(ptr ptr long) MAYBEFWD(NTOSKRNL.READ_REGISTER_BUFFER_UCHAR)
+@ stdcall ScsiPortReadRegisterBufferUshort(ptr ptr long) MAYBEFWD(NTOSKRNL.READ_REGISTER_BUFFER_USHORT)
+@ stdcall ScsiPortReadRegisterBufferUlong(ptr ptr long) MAYBEFWD(NTOSKRNL.READ_REGISTER_BUFFER_ULONG)
+@ stdcall ScsiPortReadRegisterUchar(ptr) MAYBEFWD(NTOSKRNL.READ_REGISTER_UCHAR)
+@ stdcall ScsiPortReadRegisterUshort(ptr) MAYBEFWD(NTOSKRNL.READ_REGISTER_USHORT)
+@ stdcall ScsiPortReadRegisterUlong(ptr) MAYBEFWD(NTOSKRNL.READ_REGISTER_ULONG)
+@ stdcall ScsiPortSetBusDataByOffset(ptr long long long ptr long long)
+@ stdcall ScsiPortStallExecution(long) HAL.KeStallExecutionProcessor
+@ stdcall ScsiPortValidateRange(ptr long long long long long long)
+@ stdcall ScsiPortWritePortBufferUchar(ptr ptr long) MAYBEFWD(HAL.WRITE_PORT_BUFFER_UCHAR)
+@ stdcall ScsiPortWritePortBufferUshort(ptr ptr long) MAYBEFWD(HAL.WRITE_PORT_BUFFER_USHORT)
+@ stdcall ScsiPortWritePortBufferUlong(ptr ptr long) MAYBEFWD(HAL.WRITE_PORT_BUFFER_ULONG)
+@ stdcall ScsiPortWritePortUchar(ptr long) MAYBEFWD(HAL.WRITE_PORT_UCHAR)
+@ stdcall ScsiPortWritePortUshort(ptr long) MAYBEFWD(HAL.WRITE_PORT_USHORT)
+@ stdcall ScsiPortWritePortUlong(ptr long) MAYBEFWD(HAL.WRITE_PORT_ULONG)
+@ stdcall ScsiPortWriteRegisterBufferUchar(ptr ptr long) MAYBEFWD(NTOSKRNL.WRITE_REGISTER_BUFFER_UCHAR)
+@ stdcall ScsiPortWriteRegisterBufferUshort(ptr ptr long) MAYBEFWD(NTOSKRNL.WRITE_REGISTER_BUFFER_USHORT)
+@ stdcall ScsiPortWriteRegisterBufferUlong(ptr ptr long) MAYBEFWD(NTOSKRNL.WRITE_REGISTER_BUFFER_ULONG)
+@ stdcall ScsiPortWriteRegisterUchar(ptr long) MAYBEFWD(NTOSKRNL.WRITE_REGISTER_UCHAR)
+@ stdcall ScsiPortWriteRegisterUshort(ptr long) MAYBEFWD(NTOSKRNL.WRITE_REGISTER_USHORT)
+@ stdcall ScsiPortWriteRegisterUlong(ptr long) MAYBEFWD(NTOSKRNL.WRITE_REGISTER_ULONG)
<module name="scsiport" type="kernelmodedriver" installbase="system32/drivers" installname="scsiport.sys">
<bootstrap installbase="$(CDOUTPUT)" />
<define name="_SCSIPORT_" />
- <importlibrary definition="scsiport.spec" />
+ <importlibrary definition="scsiport.pspec" />
<include base="scsiport">.</include>
<library>ntoskrnl</library>
<library>hal</library>
<file>scsiport.c</file>
+ <file>stubs.c</file>
<file>scsiport.rc</file>
</module>
+++ /dev/null
-@ cdecl ScsiDebugPrint()
-@ stdcall ScsiPortCompleteRequest(ptr long long long long)
-@ stdcall ScsiPortConvertPhysicalAddressToUlong(long long)
-@ stdcall ScsiPortConvertUlongToPhysicalAddress(long) NTOSKRNL.RtlConvertUlongToLargeInteger
-@ stdcall ScsiPortFlushDma(ptr)
-@ stdcall ScsiPortFreeDeviceBase(ptr ptr)
-@ stdcall ScsiPortGetBusData(ptr long long long ptr long)
-@ stdcall ScsiPortGetDeviceBase(ptr long long long long long long)
-@ stdcall ScsiPortGetLogicalUnit(ptr long long long)
-@ stdcall ScsiPortGetPhysicalAddress(ptr ptr ptr long)
-@ stdcall ScsiPortGetSrb(ptr long long long long)
-@ stdcall ScsiPortGetUncachedExtension(ptr ptr long)
-@ stdcall ScsiPortGetVirtualAddress(ptr long long)
-@ stdcall ScsiPortInitialize(ptr ptr ptr ptr)
-@ stdcall ScsiPortIoMapTransfer(ptr ptr long long)
-@ stdcall ScsiPortLogError(ptr ptr long long long long long)
-@ stdcall ScsiPortMoveMemory(ptr ptr long)
-@ cdecl ScsiPortNotification()
-@ stdcall ScsiPortReadPortBufferUchar(ptr ptr long) HAL.READ_PORT_BUFFER_UCHAR
-@ stdcall ScsiPortReadPortBufferUshort(ptr ptr long) HAL.READ_PORT_BUFFER_USHORT
-@ stdcall ScsiPortReadPortBufferUlong(ptr ptr long) HAL.READ_PORT_BUFFER_ULONG
-@ stdcall ScsiPortReadPortUchar(ptr) HAL.READ_PORT_UCHAR
-@ stdcall ScsiPortReadPortUshort(ptr) HAL.READ_PORT_USHORT
-@ stdcall ScsiPortReadPortUlong(ptr) HAL.READ_PORT_ULONG
-@ stdcall ScsiPortReadRegisterBufferUchar(ptr ptr long) NTOSKRNL.READ_REGISTER_BUFFER_UCHAR
-@ stdcall ScsiPortReadRegisterBufferUshort(ptr ptr long) NTOSKRNL.READ_REGISTER_BUFFER_USHORT
-@ stdcall ScsiPortReadRegisterBufferUlong(ptr ptr long) NTOSKRNL.READ_REGISTER_BUFFER_ULONG
-@ stdcall ScsiPortReadRegisterUchar(ptr) NTOSKRNL.READ_REGISTER_UCHAR
-@ stdcall ScsiPortReadRegisterUshort(ptr) NTOSKRNL.READ_REGISTER_USHORT
-@ stdcall ScsiPortReadRegisterUlong(ptr) NTOSKRNL.READ_REGISTER_ULONG
-@ stdcall ScsiPortSetBusDataByOffset(ptr long long long ptr long long)
-@ stdcall ScsiPortStallExecution(long) HAL.KeStallExecutionProcessor
-@ stdcall ScsiPortValidateRange(ptr long long long long long long)
-@ stdcall ScsiPortWritePortBufferUchar(ptr ptr long) HAL.WRITE_PORT_BUFFER_UCHAR
-@ stdcall ScsiPortWritePortBufferUshort(ptr ptr long) HAL.WRITE_PORT_BUFFER_USHORT
-@ stdcall ScsiPortWritePortBufferUlong(ptr ptr long) HAL.WRITE_PORT_BUFFER_ULONG
-@ stdcall ScsiPortWritePortUchar(ptr long) HAL.WRITE_PORT_UCHAR
-@ stdcall ScsiPortWritePortUshort(ptr long) HAL.WRITE_PORT_USHORT
-@ stdcall ScsiPortWritePortUlong(ptr long) HAL.WRITE_PORT_ULONG
-@ stdcall ScsiPortWriteRegisterBufferUchar(ptr ptr long) NTOSKRNL.WRITE_REGISTER_BUFFER_UCHAR
-@ stdcall ScsiPortWriteRegisterBufferUshort(ptr ptr long) NTOSKRNL.WRITE_REGISTER_BUFFER_USHORT
-@ stdcall ScsiPortWriteRegisterBufferUlong(ptr ptr long) NTOSKRNL.WRITE_REGISTER_BUFFER_ULONG
-@ stdcall ScsiPortWriteRegisterUchar(ptr long) NTOSKRNL.WRITE_REGISTER_UCHAR
-@ stdcall ScsiPortWriteRegisterUshort(ptr long) NTOSKRNL.WRITE_REGISTER_USHORT
-@ stdcall ScsiPortWriteRegisterUlong(ptr long) NTOSKRNL.WRITE_REGISTER_ULONG
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS Storage Stack
+ * FILE: drivers/storage/scsiport/stubs.c
+ * PURPOSE: SCSI port driver
+ * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES *****************************************************************/
+
+#include <ntddk.h>
+#include <srb.h>
+
+#define NDEBUG
+#include <debug.h>
+
+#ifdef _MSC_VER
+ #define DDKAPI
+#endif
+
+SCSI_PHYSICAL_ADDRESS
+DDKAPI
+ScsiPortConvertUlongToPhysicalAddress(
+ IN ULONG UlongAddress)
+{
+ return RtlConvertUlongToLargeInteger(UlongAddress);
+}
+
+VOID
+DDKAPI
+ScsiPortReadPortBufferUchar(
+ IN PUCHAR Port,
+ IN PUCHAR Buffer,
+ IN ULONG Count)
+{
+ READ_PORT_BUFFER_UCHAR(Port, Buffer, Count);
+}
+
+VOID
+DDKAPI
+ScsiPortReadPortBufferUshort(
+ IN PUSHORT Port,
+ IN PUSHORT Buffer,
+ IN ULONG Count)
+{
+ READ_PORT_BUFFER_USHORT(Port, Buffer, Count);
+}
+
+VOID
+DDKAPI
+ScsiPortReadPortBufferUlong(
+ IN PULONG Port,
+ IN PULONG Buffer,
+ IN ULONG Count)
+{
+ READ_PORT_BUFFER_ULONG(Port, Buffer, Count);
+}
+
+UCHAR
+DDKAPI
+ScsiPortReadPortUchar(
+ IN PUCHAR Port)
+{
+ return READ_PORT_UCHAR(Port);
+}
+
+USHORT
+DDKAPI
+ScsiPortReadPortUshort(
+ IN PUSHORT Port)
+{
+ return READ_PORT_USHORT(Port);
+}
+
+ULONG
+DDKAPI
+ScsiPortReadPortUlong(
+ IN PULONG Port)
+{
+ return READ_PORT_ULONG(Port);
+}
+
+VOID
+DDKAPI
+ScsiPortReadRegisterBufferUchar(
+ IN PUCHAR Register,
+ IN PUCHAR Buffer,
+ IN ULONG Count)
+{
+ READ_REGISTER_BUFFER_UCHAR(Register, Buffer, Count);
+}
+
+VOID
+DDKAPI
+ScsiPortReadRegisterBufferUshort(
+ IN PUSHORT Register,
+ IN PUSHORT Buffer,
+ IN ULONG Count)
+{
+ READ_REGISTER_BUFFER_USHORT(Register, Buffer, Count);
+}
+
+VOID
+DDKAPI
+ScsiPortReadRegisterBufferUlong(
+ IN PULONG Register,
+ IN PULONG Buffer,
+ IN ULONG Count)
+{
+ READ_REGISTER_BUFFER_ULONG(Register, Buffer, Count);
+}
+
+UCHAR
+DDKAPI
+ScsiPortReadRegisterUchar(
+ IN PUCHAR Register)
+{
+ return READ_REGISTER_UCHAR(Register);
+}
+
+USHORT
+DDKAPI
+ScsiPortReadRegisterUshort(
+ IN PUSHORT Register)
+{
+ return READ_REGISTER_USHORT(Register);
+}
+
+ULONG
+DDKAPI
+ScsiPortReadRegisterUlong(
+ IN PULONG Register)
+{
+ return READ_REGISTER_ULONG(Register);
+}
+
+VOID
+DDKAPI
+ScsiPortWritePortBufferUchar(
+ IN PUCHAR Port,
+ IN PUCHAR Buffer,
+ IN ULONG Count)
+{
+ WRITE_PORT_BUFFER_UCHAR(Port, Buffer, Count);
+}
+
+VOID
+DDKAPI
+ScsiPortWritePortBufferUshort(
+ IN PUSHORT Port,
+ IN PUSHORT Buffer,
+ IN ULONG Count)
+{
+ WRITE_PORT_BUFFER_USHORT(Port, Buffer, Count);
+}
+
+VOID
+DDKAPI
+ScsiPortWritePortBufferUlong(
+ IN PULONG Port,
+ IN PULONG Buffer,
+ IN ULONG Count)
+{
+ WRITE_PORT_BUFFER_ULONG(Port, Buffer, Count);
+}
+
+VOID
+DDKAPI
+ScsiPortWritePortUchar(
+ IN PUCHAR Port,
+ IN UCHAR Value)
+{
+ WRITE_PORT_UCHAR(Port, Value);
+}
+
+VOID
+DDKAPI
+ScsiPortWritePortUshort(
+ IN PUSHORT Port,
+ IN USHORT Value)
+{
+ WRITE_PORT_USHORT(Port, Value);
+}
+
+VOID
+DDKAPI
+ScsiPortWritePortUlong(
+ IN PULONG Port,
+ IN ULONG Value)
+{
+ WRITE_PORT_ULONG(Port, Value);
+}
+
+VOID
+DDKAPI
+ScsiPortWriteRegisterBufferUchar(
+ IN PUCHAR Register,
+ IN PUCHAR Buffer,
+ IN ULONG Count)
+{
+ WRITE_REGISTER_BUFFER_UCHAR(Register, Buffer, Count);
+}
+
+VOID
+DDKAPI
+ScsiPortWriteRegisterBufferUshort(
+ IN PUSHORT Register,
+ IN PUSHORT Buffer,
+ IN ULONG Count)
+{
+ WRITE_REGISTER_BUFFER_USHORT(Register, Buffer, Count);
+}
+
+VOID
+DDKAPI
+ScsiPortWriteRegisterBufferUlong(
+ IN PULONG Register,
+ IN PULONG Buffer,
+ IN ULONG Count)
+{
+ WRITE_REGISTER_BUFFER_ULONG(Register, Buffer, Count);
+}
+
+VOID
+DDKAPI
+ScsiPortWriteRegisterUchar(
+ IN PUCHAR Register,
+ IN ULONG Value)
+{
+ WRITE_REGISTER_UCHAR(Register, Value);
+}
+
+VOID
+DDKAPI
+ScsiPortWriteRegisterUshort(
+ IN PUSHORT Register,
+ IN USHORT Value)
+{
+ WRITE_REGISTER_USHORT(Register, Value);
+}
+
+VOID
+DDKAPI
+ScsiPortWriteRegisterUlong(
+ IN PULONG Register,
+ IN ULONG Value)
+{
+ WRITE_REGISTER_ULONG(Register, Value);
+}
+
<?xml version="1.0"?>
<!DOCTYPE group SYSTEM "../../tools/rbuild/project.dtd">
<group xmlns:xi="http://www.w3.org/2001/XInclude">
- <directory name="nt4compat">
+ <!--directory name="nt4compat">
<xi:include href="nt4compat/directory.rbuild" />
- </directory>
+ </directory-->
<!--directory name="usbd">
<xi:include href="usbd/usbd.rbuild" />
</directory>
/* next DEVMODE entry */
OutputModes--;
- DM = (PDEVMODEW) ( ((ULONG)DM) + sizeof(DEVMODEW) + DRIVER_EXTRA_SIZE);
+ DM = (PDEVMODEW) ( ((ULONG_PTR)DM) + sizeof(DEVMODEW) + DRIVER_EXTRA_SIZE);
OutputSize += (sizeof(DEVMODEW) + DRIVER_EXTRA_SIZE);
}
{
PBMFD_FILE pfile = (PBMFD_FILE)iFile;
PBMFD_FACE pface;
- ULONG i, j, cjOffset, cjSize, cGlyphs, cRuns;
+ ULONG i, j, cjSize, cGlyphs, cRuns;
CHAR ch, chFirst, ach[256];
WCHAR wc, awc[256];
PFD_GLYPHSET pGlyphSet;
pwcrun[0].wcLow = awc[0];
pwcrun[0].cGlyphs = 1;
pwcrun[0].phg = phglyphs;
- phglyphs[0] = (HGLYPH)pface->pCharTable;
+ phglyphs[0] = 0;
/* Walk through all supported chars */
for (i = 1, j = 0; i < cGlyphs; i++)
{
- /* Use pointer to glyph entry as hglyph */
- cjOffset = (ach[i] - chFirst) * pface->cjEntrySize;
- phglyphs[i] = (HGLYPH)(pface->pCharTable + cjOffset);
+ /* Use offset to glyph entry as hglyph */
+ phglyphs[i] = (ach[i] - chFirst) * pface->cjEntrySize;
/* Check whether we can append the wchar to a run */
if (awc[i] == awc[i - 1] + 1)
ULONG cjSize)
{
PBMFD_FACE pface = pfont->pface;
- PGLYPHENTRY pge = (PGLYPHENTRY)hg;
+ PGLYPHENTRY pge = (PGLYPHENTRY)(pface->pCharTable + hg);
ULONG xSrc, ySrc, cxSrc, cySrc;
ULONG xDst, yDst, cxDst, cyDst;
ULONG xScale, yScale;
else /* ProcessHandle != NULL */
{
/* Release some virtual memory */
- ULONG Size = Pages * PAGE_SIZE;
+ SIZE_T Size = Pages * PAGE_SIZE;
ULONG OffsetInBytes = Offset * PAGE_SIZE;
BaseAddress = (PVOID)((ULONG_PTR)VirtualMapping->MappedAddress +
OffsetInBytes);
else /* ProcessHandle != NULL */
{
/* Unmap the section view */
- ULONG Size = Pages * PAGE_SIZE;
+ SIZE_T Size = Pages * PAGE_SIZE;
ULONG OffsetInBytes = Offset * PAGE_SIZE;
BaseAddress = (PVOID)((ULONG_PTR)VirtualMapping->MappedAddress +
OffsetInBytes);
else /* ProcessHandle != NULL */
{
/* Release the allocated virtual memory */
- ULONG Size = VirtualMapping->AgpMapping->NumberOfPages * PAGE_SIZE;
+ SIZE_T Size = VirtualMapping->AgpMapping->NumberOfPages * PAGE_SIZE;
Status = ZwFreeVirtualMemory(VirtualMapping->ProcessHandle,
&VirtualMapping->MappedAddress,
&Size, MEM_RELEASE);
else /* ProcessHandle != NULL */
{
/* Reserve memory for usermode */
- ULONG Size = AgpMapping->NumberOfPages * PAGE_SIZE;
+ SIZE_T Size = AgpMapping->NumberOfPages * PAGE_SIZE;
MappedAddress = NULL;
Status = ZwAllocateVirtualMemory(ProcessHandle, &MappedAddress, 0, &Size,
MEM_RESERVE, PAGE_NOACCESS);
/* PRIVATE FUNCTIONS **********************************************************/
+#if defined(_M_IX86)
VP_STATUS NTAPI
IntInt10AllocateBuffer(
IN PVOID Context,
IntDetachFromCSRSS(&CallingProcess, &ApcState);
return Status;
}
+#endif
/* PUBLIC FUNCTIONS ***********************************************************/
IN PVOID HwDeviceExtension,
IN PVIDEO_X86_BIOS_ARGUMENTS BiosArguments)
{
+#if defined(_M_IX86)
CONTEXT BiosContext;
NTSTATUS Status;
PKPROCESS CallingProcess = (PKPROCESS)PsGetCurrentProcess();
IntDetachFromCSRSS(&CallingProcess, &ApcState);
return Status;
+#else
+ /* Not implemented for anything else than X86*/
+ DPRINT1("Int10 not available on non-x86!\n");
+ return ERROR_INVALID_FUNCTION;
+#endif
}
NTAPI
VideoPortEnableInterrupt(IN PVOID HwDeviceExtension)
{
- PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
+#ifndef _M_AMD64
+ PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
BOOLEAN InterruptValid;
/* Get the device extension */
- DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
+ DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
/* Fail if the driver didn't register an ISR */
if (!DeviceExtension->DriverExtension->InitializationData.HwInterrupt)
/* Re-enable the interrupt and return */
InterruptValid = HalEnableSystemInterrupt(DeviceExtension->InterruptVector,
- 0,
- DeviceExtension->InterruptLevel);
+ 0,
+ DeviceExtension->InterruptLevel);
/* Make sure the interrupt was valid */
ASSERT(InterruptValid == TRUE);
/* Return to caller */
return NO_ERROR;
+#else
+ /* FIXME: Function still present? If so what to use instead of HalEnableSystemInterrupt? */
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+#endif
}
/*
NTAPI
VideoPortDisableInterrupt(IN PVOID HwDeviceExtension)
{
- PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
+#ifndef _M_AMD64
+ PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
/* Get the device extension */
- DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
+ DeviceExtension = VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension);
/* Fail if the driver didn't register an ISR */
if (!DeviceExtension->DriverExtension->InitializationData.HwInterrupt)
/* Disable the interrupt and return */
HalDisableSystemInterrupt(DeviceExtension->InterruptVector,
- 0);
+ 0);
return NO_ERROR;
+#else
+ /* FIXME: Function still present? If so what to use instead of HalDisableSystemInterrupt? */
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+#endif
}
if (Status)
*Status = NO_ERROR;
- return (PVOID)TranslatedAddress.u.LowPart;
+ return (PVOID)(ULONG_PTR)TranslatedAddress.u.LowPart;
}
/* user space */
Status = ZwUnmapViewOfSection(NtCurrentProcess(), MappedAddress);
if (!NT_SUCCESS(Status))
{
- WARN_(VIDEOPRT, "Warning: Mapping for address 0x%x not found!\n", (ULONG)MappedAddress);
+ WARN_(VIDEOPRT, "Warning: Mapping for address 0x%p not found!\n", MappedAddress);
}
}
switch (ServicesType)
{
+#if defined(_M_IX86)
case VideoPortServicesInt10:
if (Interface->Version >= VIDEO_PORT_INT10_INTERFACE_VERSION_1 ||
Interface->Size >= sizeof(VIDEO_PORT_INT10_INTERFACE))
return NO_ERROR;
}
break;
-
+#endif
case VideoPortServicesAGP:
if ((Interface->Version == VIDEO_PORT_AGP_INTERFACE_VERSION_2 &&
Interface->Size >= sizeof(VIDEO_PORT_AGP_INTERFACE_2)) ||
{
WCHAR DeviceVideoBuffer[20];
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
- ULONG Size;
+ SIZE_T Size;
NTSTATUS Status;
VIDEO_PORT_CONFIG_INFO ConfigInfo;
SYSTEM_BASIC_INFORMATION SystemBasicInfo;
+;ScsiPortNotification // vista64
@ stdcall VideoPortAcquireDeviceLock(ptr)
@ stdcall VideoPortAcquireSpinLock(ptr ptr ptr)
@ stdcall VideoPortAcquireSpinLockAtDpcLevel(ptr ptr)
@ stdcall VideoPortAllocatePool(ptr long long long)
@ stdcall VideoPortAssociateEventsWithDmaHandle(ptr ptr ptr ptr)
@ stdcall VideoPortCheckForDeviceExistence(ptr long long long long long long)
+;VideoPortCheckForDeviceExistence there's a second dummy export with the same name on ms videoprt
@ stdcall VideoPortClearEvent(ptr ptr)
@ stdcall VideoPortCompareMemory(ptr ptr long) NTOSKRNL.RtlCompareMemory
@ stdcall VideoPortCompleteDma(ptr ptr ptr long)
@ stdcall VideoPortCreateSecondaryDisplay(ptr ptr long)
@ stdcall VideoPortCreateSpinLock(ptr ptr)
@ stdcall VideoPortDDCMonitorHelper(ptr ptr ptr long)
+;VideoPortDbgReportComplete // vista64
+;VideoPortDbgReportCreate // vista64
+;VideoPortDbgReportSecondaryData // vista64
@ cdecl VideoPortDebugPrint(long ptr)
@ stdcall VideoPortDeleteEvent(ptr ptr)
@ stdcall VideoPortDeleteSpinLock(ptr ptr)
@ fastcall VideoPortInterlockedExchange(ptr long) NTOSKRNL.InterlockedExchange
@ fastcall VideoPortInterlockedIncrement(ptr) NTOSKRNL.InterlockedIncrement
@ stdcall VideoPortLockBuffer(ptr ptr long long)
+;VideoPortIsNoVesa // 2003 and later
@ stdcall VideoPortLockPages(ptr ptr ptr ptr long)
@ stdcall VideoPortLogError(ptr ptr long long)
@ stdcall VideoPortMapBankedMemory(ptr long long ptr ptr ptr long long ptr ptr)
@ stdcall VideoPortMapDmaMemory(ptr ptr double ptr ptr ptr ptr ptr)
@ stdcall VideoPortMapMemory(ptr long long ptr ptr ptr)
@ stdcall VideoPortMoveMemory(ptr ptr long) NTOSKRNL.RtlMoveMemory
+;VideoPortNotification
@ stdcall VideoPortPutDmaAdapter(ptr ptr)
@ stdcall VideoPortQueryPerformanceCounter(ptr ptr)
@ stdcall VideoPortQueryServices(ptr long ptr)
@ stdcall VideoPortQuerySystemTime(ptr) NTOSKRNL.KeQuerySystemTime
@ stdcall VideoPortQueueDpc(ptr ptr ptr)
-@ stdcall VideoPortReadPortUchar(ptr) HAL.READ_PORT_UCHAR
-@ stdcall VideoPortReadPortUshort(ptr) HAL.READ_PORT_USHORT
-@ stdcall VideoPortReadPortUlong(ptr) HAL.READ_PORT_ULONG
@ stdcall VideoPortReadPortBufferUchar(ptr ptr long) HAL.READ_PORT_BUFFER_UCHAR
-@ stdcall VideoPortReadPortBufferUshort(ptr ptr long) HAL.READ_PORT_BUFFER_USHORT
@ stdcall VideoPortReadPortBufferUlong(ptr ptr long) HAL.READ_PORT_BUFFER_ULONG
-@ stdcall VideoPortReadRegisterUchar(ptr) NTOSKRNL.READ_REGISTER_UCHAR
-@ stdcall VideoPortReadRegisterUshort(ptr) NTOSKRNL.READ_REGISTER_USHORT
-@ stdcall VideoPortReadRegisterUlong(ptr) NTOSKRNL.READ_REGISTER_ULONG
+@ stdcall VideoPortReadPortBufferUshort(ptr ptr long) HAL.READ_PORT_BUFFER_USHORT
+@ stdcall VideoPortReadPortUchar(ptr) HAL.READ_PORT_UCHAR
+@ stdcall VideoPortReadPortUlong(ptr) HAL.READ_PORT_ULONG
+@ stdcall VideoPortReadPortUshort(ptr) HAL.READ_PORT_USHORT
@ stdcall VideoPortReadRegisterBufferUchar(ptr ptr long) NTOSKRNL.READ_REGISTER_BUFFER_UCHAR
-@ stdcall VideoPortReadRegisterBufferUshort(ptr ptr long) NTOSKRNL.READ_REGISTER_BUFFER_USHORT
@ stdcall VideoPortReadRegisterBufferUlong(ptr ptr long) NTOSKRNL.READ_REGISTER_BUFFER_ULONG
+@ stdcall VideoPortReadRegisterBufferUshort(ptr ptr long) NTOSKRNL.READ_REGISTER_BUFFER_USHORT
+@ stdcall VideoPortReadRegisterUchar(ptr) NTOSKRNL.READ_REGISTER_UCHAR
+@ stdcall VideoPortReadRegisterUlong(ptr) NTOSKRNL.READ_REGISTER_ULONG
+@ stdcall VideoPortReadRegisterUshort(ptr) NTOSKRNL.READ_REGISTER_USHORT
@ stdcall VideoPortReadStateEvent(ptr ptr)
@ stdcall VideoPortRegisterBugcheckCallback(ptr long ptr long)
@ stdcall VideoPortReleaseBuffer(ptr ptr)
@ stdcall VideoPortUnmapMemory(ptr ptr ptr)
@ stdcall VideoPortVerifyAccessRanges(ptr long ptr)
@ stdcall VideoPortWaitForSingleObject(ptr ptr ptr)
-@ stdcall VideoPortWritePortUchar(ptr long) HAL.WRITE_PORT_UCHAR
-@ stdcall VideoPortWritePortUshort(ptr long) HAL.WRITE_PORT_USHORT
-@ stdcall VideoPortWritePortUlong(ptr long) HAL.WRITE_PORT_ULONG
@ stdcall VideoPortWritePortBufferUchar(ptr ptr long) HAL.WRITE_PORT_BUFFER_UCHAR
-@ stdcall VideoPortWritePortBufferUshort(ptr ptr long) HAL.WRITE_PORT_BUFFER_USHORT
@ stdcall VideoPortWritePortBufferUlong(ptr ptr long) HAL.WRITE_PORT_BUFFER_ULONG
-@ stdcall VideoPortWriteRegisterUchar(ptr long) NTOSKRNL.WRITE_REGISTER_UCHAR
-@ stdcall VideoPortWriteRegisterUshort(ptr long) NTOSKRNL.WRITE_REGISTER_USHORT
-@ stdcall VideoPortWriteRegisterUlong(ptr long) NTOSKRNL.WRITE_REGISTER_ULONG
+@ stdcall VideoPortWritePortBufferUshort(ptr ptr long) HAL.WRITE_PORT_BUFFER_USHORT
+@ stdcall VideoPortWritePortUchar(ptr long) HAL.WRITE_PORT_UCHAR
+@ stdcall VideoPortWritePortUlong(ptr long) HAL.WRITE_PORT_ULONG
+@ stdcall VideoPortWritePortUshort(ptr long) HAL.WRITE_PORT_USHORT
@ stdcall VideoPortWriteRegisterBufferUchar(ptr ptr long) NTOSKRNL.WRITE_REGISTER_BUFFER_UCHAR
-@ stdcall VideoPortWriteRegisterBufferUshort(ptr ptr long) NTOSKRNL.WRITE_REGISTER_BUFFER_USHORT
@ stdcall VideoPortWriteRegisterBufferUlong(ptr ptr long) NTOSKRNL.WRITE_REGISTER_BUFFER_ULONG
-@ stdcall VideoPortZeroMemory(ptr long) NTOSKRNL.RtlZeroMemory
+@ stdcall VideoPortWriteRegisterBufferUshort(ptr ptr long) NTOSKRNL.WRITE_REGISTER_BUFFER_USHORT
+@ stdcall VideoPortWriteRegisterUchar(ptr long) NTOSKRNL.WRITE_REGISTER_UCHAR
+@ stdcall VideoPortWriteRegisterUlong(ptr long) NTOSKRNL.WRITE_REGISTER_ULONG
+@ stdcall VideoPortWriteRegisterUshort(ptr long) NTOSKRNL.WRITE_REGISTER_USHORT
@ stdcall VideoPortZeroDeviceMemory(ptr long) NTOSKRNL.RtlZeroMemory
+@ stdcall VideoPortZeroMemory(ptr long) NTOSKRNL.RtlZeroMemory
@ stdcall VpNotifyEaData(ptr ptr)
<?xml version="1.0"?>
<!DOCTYPE group SYSTEM "../../../../tools/rbuild/project.dtd">
<group xmlns:xi="http://www.w3.org/2001/XInclude">
- <directory name="audio_test">
+ <!-- directory name="audio_test">
<xi:include href="audio_test/audio_test.rbuild" />
- </directory>
+ </directory -->
<directory name="portcls">
<xi:include href="portcls/portcls.rbuild" />
</directory>
#pragma code_seg()
int __cdecl _purecall (void)
{
- return 0;
+ return 0;
}
#else
<?xml version="1.0"?>
<!DOCTYPE group SYSTEM "../../../../tools/rbuild/project.dtd">
<group xmlns:xi="http://www.w3.org/2001/XInclude">
- <directory name="mpu401">
+ <!--directory name="mpu401">
<xi:include href="mpu401/mpu401.rbuild" />
- </directory>
- <directory name="CMIDriver">
+ </directory-->
+ <!--directory name="CMIDriver">
<xi:include href="CMIDriver/cmidriver.rbuild" />
- </directory>
+ </directory-->
<!--directory name="sb16">
<xi:include href="sb16/sb16.rbuild" />
{
ObDereferenceObject(ClientInfo->hPins[Index].NotifyEvent);
ClientInfo->hPins[Index].NotifyEvent = NULL;
- }
+ }
}
}
KeReleaseSpinLock(&DeviceExtension->Lock, OldIrql);
/* check if all audio pins have been closed */
- for (Index = 0; Index < pClient->NumPins; Index++)
- {
- DPRINT("Index %u Pin %p Type %x\n", Index, pClient->hPins[Index].Handle, pClient->hPins[Index].Type);
- if (pClient->hPins[Index].Handle && pClient->hPins[Index].Type != MIXER_DEVICE_TYPE)
- {
+ for (Index = 0; Index < pClient->NumPins; Index++)
+ {
+ DPRINT("Index %u Pin %p Type %x\n", Index, pClient->hPins[Index].Handle, pClient->hPins[Index].Type);
+ if (pClient->hPins[Index].Handle && pClient->hPins[Index].Type != MIXER_DEVICE_TYPE)
+ {
/* found an still open audio pin */
- ZwClose(pClient->hPins[Index].Handle);
- }
- }
+ ZwClose(pClient->hPins[Index].Handle);
+ }
+ }
/* free pin array */
- if (pClient->hPins)
- ExFreePool(pClient->hPins);
+ if (pClient->hPins)
+ ExFreePool(pClient->hPins);
/* free client context struct */
- ExFreePool(pClient);
+ ExFreePool(pClient);
/* clear old client pointer */
- IoStack->FileObject->FsContext = NULL;
+ IoStack->FileObject->FsContext = NULL;
/* complete request */
Irp->IoStatus.Status = STATUS_SUCCESS;
{
KSSTREAM_HEADER Header;
SOUND_DEVICE_TYPE DeviceType;
- ULONG DeviceIndex;
+ ULONG_PTR DeviceIndex;
HANDLE hDevice;
ULONG DeviceCount;
Input->dwValue = dwValue;
}
else
- {
+ {
/* notify clients of a line change */
NotifyWdmAudClients(DeviceObject, MM_MIXM_CONTROL_CHANGE, DeviceInfo->hDevice, MixerControl->dwControlID);
}
- return Status;
-}
+ return Status;
+ }
NTSTATUS
NTAPI
{
/* no events available */
return SetIrpIoStatus(Irp, STATUS_UNSUCCESSFUL, 0);
- }
+}
/* store event result */
DeviceInfo->u.MixerEvent.hMixer = Event->hMixer;
VOID
NTAPI
HalDisableSystemInterrupt(ULONG Vector,
- KIRQL Irql)
+ KIRQL Irql)
{
- UNIMPLEMENTED;
+ UNIMPLEMENTED;
}
</module>
</if>
<if property="ARCH" value="i386">
- <module ifnot="false" name="halupalias" type="alias" installbase="system32" installname="hal.dll" aliasof="halup">
+ <module ifnot="false" name="halupalias" type="alias" aliasof="halup">
</module>
- <module if="false" name="halmpalias" type="alias" installbase="system32" installname="hal.dll" aliasof="halmp">
+ <module if="false" name="halmpalias" type="alias" aliasof="halmp">
</module>
</if>
<if property="ARCH" value="powerpc">
- <module name="halupalias" type="alias" installbase="system32" installname="hal.dll" aliasof="halppc_up"/>
+ <module name="halupalias" type="alias" aliasof="halppc_up"/>
</if>
<if property="ARCH" value="amd64">
<module name="hal" type="kernelmodedll">
IoReadPartitionTable
IoSetPartitionInformation
IoWritePartitionTable
-KdComPortInUse=_KdComPortInUse DATA
+KdComPortInUse DATA
KeFlushWriteBuffer
KeQueryPerformanceCounter
KeStallExecutionProcessor
--- /dev/null
+; Hardware Abstraction Layer - ReactOS Operating System
+
+LIBRARY hal.dll
+
+EXPORTS
+@ExAcquireFastMutex@4=@ExiAcquireFastMutex@4
+@ExReleaseFastMutex@4=@ExiReleaseFastMutex@4
+@ExTryToAcquireFastMutex@4=@ExiTryToAcquireFastMutex@4
+@HalClearSoftwareInterrupt@4
+@HalRequestSoftwareInterrupt@4
+@HalSystemVectorDispatchEntry@12
+@KeAcquireInStackQueuedSpinLock@8
+@KeAcquireInStackQueuedSpinLockRaiseToSynch@8
+@KeAcquireSpinLockRaiseToSynch@4
+@KeAcquireQueuedSpinLock@4
+@KeAcquireQueuedSpinLockRaiseToSynch@4
+@KeReleaseInStackQueuedSpinLock@4
+@KeReleaseQueuedSpinLock@8
+@KeTryToAcquireQueuedSpinLock@8
+@KeTryToAcquireQueuedSpinLockRaiseToSynch@8
+@KfAcquireSpinLock@4
+@KfLowerIrql@4
+@KfRaiseIrql@4
+@KfReleaseSpinLock@8
+
+HalAcquireDisplayOwnership@4
+HalAdjustResourceList@4
+HalAllProcessorsStarted@0
+HalAllocateAdapterChannel@16
+HalAllocateCommonBuffer@16
+HalAllocateCrashDumpRegisters@8
+HalAssignSlotResources@32
+HalBeginSystemInterrupt@12
+HalCalibratePerformanceCounter@12
+HalDisableSystemInterrupt@8
+HalDisplayString@4
+HalEnableSystemInterrupt@12
+HalEndSystemInterrupt@8
+HalFlushCommonBuffer@20
+HalFreeCommonBuffer@24
+HalGetAdapter@8
+HalGetBusData@20
+HalGetBusDataByOffset@24
+HalGetEnvironmentVariable@12
+HalGetInterruptVector@24
+HalHandleNMI@4
+HalInitSystem@8
+HalInitializeProcessor@8
+HalMakeBeep@4
+HalProcessorIdle@0
+HalQueryDisplayParameters@16
+HalQueryRealTimeClock@4
+HalReadDmaCounter@4
+HalReportResourceUsage@0
+HalRequestIpi@4
+HalReturnToFirmware@4
+HalSetBusData@20
+HalSetBusDataByOffset@24
+HalSetDisplayParameters@8
+HalSetEnvironmentVariable@8
+HalSetProfileInterval@4
+HalSetRealTimeClock@4
+HalSetTimeIncrement@4
+HalStartNextProcessor@8
+HalStartProfileInterrupt@4
+HalStopProfileInterrupt@4
+HalTranslateBusAddress@24
+IoAssignDriveLetters@16=HalpAssignDriveLetters@16
+IoFlushAdapterBuffers@24
+IoFreeAdapterChannel@4
+IoFreeMapRegisters@12
+IoMapTransfer@24
+IoReadPartitionTable@16=HalpReadPartitionTable@16
+IoSetPartitionInformation@16=HalpSetPartitionInformation@16
+IoWritePartitionTable@20=HalpWritePartitionTable@20
+KeAcquireSpinLock@8
+KdComPortInUse=_KdComPortInUse DATA
+KeFlushWriteBuffer@0
+KeGetCurrentIrql@0
+KeLowerIrql@4
+KeQueryPerformanceCounter@4
+KeRaiseIrql@8
+KeRaiseIrqlToDpcLevel@0
+KeRaiseIrqlToSynchLevel@0
+KeReleaseSpinLock@8
+KeStallExecutionProcessor@4
+READ_PORT_BUFFER_UCHAR@12
+READ_PORT_BUFFER_ULONG@12
+READ_PORT_BUFFER_USHORT@12
+READ_PORT_UCHAR@4
+READ_PORT_ULONG@4
+READ_PORT_USHORT@4
+WRITE_PORT_BUFFER_UCHAR@12
+WRITE_PORT_BUFFER_ULONG@12
+WRITE_PORT_BUFFER_USHORT@12
+WRITE_PORT_UCHAR@8
+WRITE_PORT_ULONG@8
+WRITE_PORT_USHORT@8
<module name="hal_generic" type="objectlibrary">
<include base="hal_generic">../include</include>
<include base="ntoskrnl">include</include>
+ <define name="_DISABLE_TIDENTS" />
<define name="_NTHAL_" />
<file>halinit.c</file>
<file>irq.S</file>
<file>misc.c</file>
<file>mps.S</file>
<file>systimer.S</file>
+ <file>usage.c</file>
<pch>../include/hal.h</pch>
</module>
</group>
}
else if (BootPhase == 1)
{
- /* Initialize the default HAL stubs for bus handling functions */
- HalpInitNonBusHandler();
+ /* Initialize bus handlers */
+ //HalpInitBusHandler();
/* Enable the clock interrupt */
PKIDTENTRY64 IdtEntry = &((PKIPCR)KeGetPcr())->IdtBase[0x30];
_HalpLastPerfCounterHigh: .long 0
_HalpPerfCounterLow: .long 0
_HalpPerfCounterHigh: .long 0
+_HalpSystemHardwareFlags: .long 0
_UnhandledMsg:
.asciz "\n\x7\x7!!! Unhandled or Unexpected Code at line: %lx!!!\n"
/* FUNCTIONS *****************************************************************/
+.global _HalpReleaseCmosSpinLock
+.func HalpReleaseCmosSpinLock
+_HalpReleaseCmosSpinLock:
+
+.endfunc
+
+.global _HalpAcquireSystemHardwareSpinLock
+.func HalpAcquireSystemHardwareSpinLock
+_HalpAcquireSystemHardwareSpinLock:
+
+.endfunc
+
+.global _HalpCalibrateStallExecution@0
+.func HalpCalibrateStallExecution@0
+_HalpCalibrateStallExecution@0:
+
+.endfunc
+
+.globl _HalpProfileInterrupt
+.func HalpProfileInterrupt
+_HalpProfileInterrupt:
+
+.endfunc
+
+
.globl _KeStallExecutionProcessor
.func KeStallExecutionProcessor
_KeStallExecutionProcessor:
ret 4
.endfunc
+
+.globl _HalpQuery8254Counter
+.func HalpQuery8254Counter
+_HalpQuery8254Counter:
+
+ /* Save EFLAGS and disable interrupts */
+ pushfq
+ cli
+
+ /* Set timer data */
+ mov al, 0
+ out 0x43, al
+ jmp $+2
+
+ /* Read current timer */
+ in al, 0x40
+ jmp $+2
+ movzx ecx, al
+ in al, 0x40
+ mov ch, al
+
+ /* Return it and restore interrupt state */
+ mov eax, ecx
+ popfq
+ ret
+.endfunc
+
+
.global _KeQueryPerformanceCounter
.func KeQueryPerformanceCounter
_KeQueryPerformanceCounter:
--- /dev/null
+/*
+ * PROJECT: ReactOS HAL
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: hal/halx86/generic/usage.c
+ * PURPOSE: HAL Resource Report Routines
+ * PROGRAMMERS:
+ */
+
+/* INCLUDES *******************************************************************/
+
+#include <hal.h>
+#define NDEBUG
+#include <debug.h>
+
+/* GLOBALS ********************************************************************/
+
+PUCHAR KdComPortInUse;
+
+/* FUNCTIONS ******************************************************************/
+#if 0
+VOID
+NTAPI
+HalpReportResourceUsage(IN PUNICODE_STRING HalName,
+ IN INTERFACE_TYPE InterfaceType)
+{
+ DbgPrint("%wZ has been initialized\n", HalName);
+}
+
+VOID
+NTAPI
+HalpRegisterVector(IN UCHAR Flags,
+ IN ULONG BusVector,
+ IN ULONG SystemVector,
+ IN KIRQL Irql)
+{
+ UNIMPLEMENTED;
+}
+
+VOID
+NTAPI
+HalpEnableInterruptHandler(IN UCHAR Flags,
+ IN ULONG BusVector,
+ IN ULONG SystemVector,
+ IN KIRQL Irql,
+ IN PVOID Handler,
+ IN KINTERRUPT_MODE Mode)
+{
+ UNIMPLEMENTED;
+}
+
+/*
+ * @unimplemented
+ */
+VOID
+NTAPI
+HalReportResourceUsage(VOID)
+{
+ UNIMPLEMENTED;
+}
+#endif
+
+++ /dev/null
-/*
- * PROJECT: ReactOS HAL
- * LICENSE: GPL - See COPYING in the top level directory
- * FILE: hal/halamd64/
- * PURPOSE: I/O HAL Routines for Disk Access
- * PROGRAMMERS: Timo Kreuzer (timo.kreuzer@reactos.org)
- */
-
-/* INCLUDES ******************************************************************/
-
-#include <hal.h>
-#define NDEBUG
-#include <debug.h>
-
-/* FUNCTIONS *****************************************************************/
-
-
-
-
-NTSTATUS
-NTAPI
-HalpSetPartitionInformation(IN PDEVICE_OBJECT DeviceObject,
- IN ULONG SectorSize,
- IN ULONG PartitionNumber,
- IN ULONG PartitionType)
-{
- /* Call the kernel */
- return IoSetPartitionInformation(DeviceObject,
- SectorSize,
- PartitionNumber,
- PartitionType);
-}
-
-
+++ /dev/null
-<?xml version="1.0"?>
-<!DOCTYPE group SYSTEM "../../../tools/rbuild/project.dtd">
-<group>
- <module name="hal_generic" type="objectlibrary">
- <include>include</include>
- <include base="ntoskrnl">include</include>
- <define name="_NTHAL_" />
- <file>hal_generic.c</file>
- </module>
-</group>
<bootstrap installbase="$(CDOUTPUT)" nameoncd="hal.dll" />
<include base="halup">../include</include>
<include base="ntoskrnl">include</include>
+ <define name="_DISABLE_TIDENTS" />
<define name="_NTHAL_" />
<library>hal_generic_amd64</library>
<library>hal_generic</library>
{
/* Enable interrupts and halt the processor */
_enable();
- Ke386HaltProcessor();
+ __halt();
}
/*
VOID
NTAPI
HalDisableSystemInterrupt(ULONG Vector,
- KIRQL Irql)
+ KIRQL Irql)
{
- UNIMPLEMENTED;
+ UNIMPLEMENTED;
}
VOID
.long 0 /* IRQL 31 */
HalpSpecialDismissTable:
- .rept 7
+.rept 7
.long GenericIRQ /* IRQ 0-7 */
- .endr
+.endr
.long IRQ7 /* IRQ 7 */
.rept 5
.long GenericIRQ /* IRQ 8-12 */
- .endr
+.endr
.long IRQ13 /* IRQ 13 */
.long GenericIRQ /* IRQ 14 */
.long IRQ15 /* IRQ 15 */
- .rept 20
+.rept 20
.long GenericIRQ /* IRQ 16-35 */
- .endr
+.endr
#if DBG
.rept 172
.long InvalidIRQ /* IRQ 36-207 */
/* FIXME */
//UNHANDLED_PATH
-/* Restore interrupts and return */
+ /* Restore interrupts and return */
NoEisa:
popf
pop esi
and ecx, 0xFF
/* Validate IRQL */
- #if DBG
+#if DBG
cmp cl, PCR[KPCR_IRQL]
ja InvalidIrql
- #endif
+#endif
/* Save flags since we'll disable interrupts */
pushf
_@KfRaiseIrql@4:
@KfRaiseIrql@4:
- /* Get the IRQL */
+ /* Get the IRQL */
movzx ecx, cl
mov eax, PCR[KPCR_IRQL]
<module name="hal_generic_amd64" type="objectlibrary">
<include>include</include>
<include base="ntoskrnl">include</include>
+ <define name="_DISABLE_TIDENTS" />
<define name="_NTHAL_" />
<directory name="generic">
<directory name="bus">
<?xml version="1.0"?>
<!DOCTYPE group SYSTEM "../../tools/rbuild/project.dtd">
<group xmlns:xi="http://www.w3.org/2001/XInclude">
- <module name="halup" type="kernelmodedll" entrypoint="0" installname="hal.dll">
+ <module name="halup" type="kernelmodedll" entrypoint="0" installbase="system32" installname="hal.dll">
<importlibrary base="hal" definition="hal.pspec" />
<bootstrap installbase="$(CDOUTPUT)" />
<include>include</include>
LONG tt1, tt2;
BOOLEAN TSCPresent;
+ t1.QuadPart = 0;
+
DPRINT("Calibrating APIC timer for CPU %d\n", CPU);
APICSetupLVTT(1000000000);
#ifdef CONFIG_SMP
SetInterruptGate(IPI_VECTOR, (ULONG_PTR)MpsIpiInterrupt);
#endif
- DPRINT("APIC is mapped at 0x%X\n", APICBase);
+ DPRINT1("APIC is mapped at 0x%p\n", (PVOID)APICBase);
if (VerifyLocalAPIC())
{
}
else
{
- DPRINT("No APIC found\n");
+ DPRINT1("No APIC found\n");
ASSERT(FALSE);
}
VOID
NTAPI
-HalDisableSystemInterrupt(ULONG Vector,
- KIRQL Irql)
+HalDisableSystemInterrupt (ULONG Vector,
+ KIRQL Irql)
{
ULONG irq;
#define _CRT_UNUSED(x) (void)x
#endif
+#define __MINGW_USE_UNDERSCORE_PREFIX 1
+
+#if __MINGW_USE_UNDERSCORE_PREFIX == 0
+#define __MINGW_IMP_SYMBOL(sym) _imp_##sym
+#define __MINGW_USYMBOL(sym) sym
+#else
+#define __MINGW_IMP_SYMBOL(sym) _imp__##sym
+#define __MINGW_USYMBOL(sym) _##sym
+#endif
+
#endif /* !_INC_MINGW */
#define _AddressOfReturnAddress() (&(((void **)(__builtin_frame_address(0)))[1]))
/* TODO: __getcallerseflags but how??? */
+/* Maybe the same for x86? */
+#ifdef _x86_64
+#define _alloca(s) __builtin_alloca(s)
+#endif
/*** Atomic operations ***/
#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40100
-__INTRIN_INLINE char _InterlockedCompareExchange8(volatile char * const Destination, const char Exchange, const char Comperand)
+__INTRIN_INLINE char _InterlockedCompareExchange8(volatile char * Destination, const char Exchange, const char Comperand)
{
return __sync_val_compare_and_swap(Destination, Comperand, Exchange);
}
-__INTRIN_INLINE short _InterlockedCompareExchange16(volatile short * const Destination, const short Exchange, const short Comperand)
+__INTRIN_INLINE short _InterlockedCompareExchange16(volatile short * Destination, const short Exchange, const short Comperand)
{
return __sync_val_compare_and_swap(Destination, Comperand, Exchange);
}
-__INTRIN_INLINE long _InterlockedCompareExchange(volatile long * const Destination, const long Exchange, const long Comperand)
+__INTRIN_INLINE long _InterlockedCompareExchange(volatile long * Destination, const long Exchange, const long Comperand)
{
return __sync_val_compare_and_swap(Destination, Comperand, Exchange);
}
-__INTRIN_INLINE void * _InterlockedCompareExchangePointer(void * volatile * const Destination, void * const Exchange, void * const Comperand)
+__INTRIN_INLINE void * _InterlockedCompareExchangePointer(void * volatile * Destination, void * const Exchange, void * const Comperand)
{
return __sync_val_compare_and_swap(Destination, Comperand, Exchange);
}
-__INTRIN_INLINE long _InterlockedExchange(volatile long * const Target, const long Value)
+__INTRIN_INLINE long _InterlockedExchange(volatile long * Target, const long Value)
{
/* NOTE: __sync_lock_test_and_set would be an acquire barrier, so we force a full barrier */
__sync_synchronize();
}
#if defined(_M_AMD64)
-__INTRIN_INLINE long long _InterlockedExchange64(volatile long long * const Target, const long long Value)
+__INTRIN_INLINE long long _InterlockedExchange64(volatile long long * Target, const long long Value)
{
/* NOTE: __sync_lock_test_and_set would be an acquire barrier, so we force a full barrier */
__sync_synchronize();
}
#endif
-__INTRIN_INLINE void * _InterlockedExchangePointer(void * volatile * const Target, void * const Value)
+__INTRIN_INLINE void * _InterlockedExchangePointer(void * volatile * Target, void * const Value)
{
/* NOTE: ditto */
__sync_synchronize();
return __sync_lock_test_and_set(Target, Value);
}
-__INTRIN_INLINE long _InterlockedExchangeAdd16(volatile short * const Addend, const short Value)
+__INTRIN_INLINE long _InterlockedExchangeAdd16(volatile short * Addend, const short Value)
{
return __sync_fetch_and_add(Addend, Value);
}
-__INTRIN_INLINE long _InterlockedExchangeAdd(volatile long * const Addend, const long Value)
+__INTRIN_INLINE long _InterlockedExchangeAdd(volatile long * Addend, const long Value)
{
return __sync_fetch_and_add(Addend, Value);
}
#if defined(_M_AMD64)
-__INTRIN_INLINE long long _InterlockedExchangeAdd64(volatile long long * const Addend, const long long Value)
+__INTRIN_INLINE long long _InterlockedExchangeAdd64(volatile long long * Addend, const long long Value)
{
return __sync_fetch_and_add(Addend, Value);
}
#endif
-__INTRIN_INLINE char _InterlockedAnd8(volatile char * const value, const char mask)
+__INTRIN_INLINE char _InterlockedAnd8(volatile char * value, const char mask)
{
return __sync_fetch_and_and(value, mask);
}
-__INTRIN_INLINE short _InterlockedAnd16(volatile short * const value, const short mask)
+__INTRIN_INLINE short _InterlockedAnd16(volatile short * value, const short mask)
{
return __sync_fetch_and_and(value, mask);
}
-__INTRIN_INLINE long _InterlockedAnd(volatile long * const value, const long mask)
+__INTRIN_INLINE long _InterlockedAnd(volatile long * value, const long mask)
{
return __sync_fetch_and_and(value, mask);
}
#if defined(_M_AMD64)
-__INTRIN_INLINE long _InterlockedAnd64(volatile long long * const value, const long long mask)
+__INTRIN_INLINE long _InterlockedAnd64(volatile long long * value, const long long mask)
{
return __sync_fetch_and_and(value, mask);
}
#endif
-__INTRIN_INLINE char _InterlockedOr8(volatile char * const value, const char mask)
+__INTRIN_INLINE char _InterlockedOr8(volatile char * value, const char mask)
{
return __sync_fetch_and_or(value, mask);
}
-__INTRIN_INLINE short _InterlockedOr16(volatile short * const value, const short mask)
+__INTRIN_INLINE short _InterlockedOr16(volatile short * value, const short mask)
{
return __sync_fetch_and_or(value, mask);
}
-__INTRIN_INLINE long _InterlockedOr(volatile long * const value, const long mask)
+__INTRIN_INLINE long _InterlockedOr(volatile long * value, const long mask)
{
return __sync_fetch_and_or(value, mask);
}
#if defined(_M_AMD64)
-__INTRIN_INLINE long _InterlockedOr64(volatile long long * const value, const long long mask)
+__INTRIN_INLINE long _InterlockedOr64(volatile long long * value, const long long mask)
{
return __sync_fetch_and_or(value, mask);
}
#endif
-__INTRIN_INLINE char _InterlockedXor8(volatile char * const value, const char mask)
+__INTRIN_INLINE char _InterlockedXor8(volatile char * value, const char mask)
{
return __sync_fetch_and_xor(value, mask);
}
-__INTRIN_INLINE short _InterlockedXor16(volatile short * const value, const short mask)
+__INTRIN_INLINE short _InterlockedXor16(volatile short * value, const short mask)
{
return __sync_fetch_and_xor(value, mask);
}
-__INTRIN_INLINE long _InterlockedXor(volatile long * const value, const long mask)
+__INTRIN_INLINE long _InterlockedXor(volatile long * value, const long mask)
{
return __sync_fetch_and_xor(value, mask);
}
#else
-__INTRIN_INLINE char _InterlockedCompareExchange8(volatile char * const Destination, const char Exchange, const char Comperand)
+__INTRIN_INLINE char _InterlockedCompareExchange8(volatile char * Destination, const char Exchange, const char Comperand)
{
char retval = Comperand;
__asm__("lock; cmpxchgb %b[Exchange], %[Destination]" : [retval] "+a" (retval) : [Destination] "m" (*Destination), [Exchange] "q" (Exchange) : "memory");
return retval;
}
-__INTRIN_INLINE short _InterlockedCompareExchange16(volatile short * const Destination, const short Exchange, const short Comperand)
+__INTRIN_INLINE short _InterlockedCompareExchange16(volatile short * Destination, const short Exchange, const short Comperand)
{
short retval = Comperand;
__asm__("lock; cmpxchgw %w[Exchange], %[Destination]" : [retval] "+a" (retval) : [Destination] "m" (*Destination), [Exchange] "q" (Exchange): "memory");
return retval;
}
-__INTRIN_INLINE long _InterlockedCompareExchange(volatile long * const Destination, const long Exchange, const long Comperand)
+__INTRIN_INLINE long _InterlockedCompareExchange(volatile long * Destination, const long Exchange, const long Comperand)
{
long retval = Comperand;
__asm__("lock; cmpxchgl %k[Exchange], %[Destination]" : [retval] "+a" (retval) : [Destination] "m" (*Destination), [Exchange] "q" (Exchange): "memory");
return retval;
}
-__INTRIN_INLINE void * _InterlockedCompareExchangePointer(void * volatile * const Destination, void * const Exchange, void * const Comperand)
+__INTRIN_INLINE void * _InterlockedCompareExchangePointer(void * volatile * Destination, void * const Exchange, void * const Comperand)
{
void * retval = (void *)Comperand;
__asm__("lock; cmpxchgl %k[Exchange], %[Destination]" : [retval] "=a" (retval) : "[retval]" (retval), [Destination] "m" (*Destination), [Exchange] "q" (Exchange) : "memory");
return retval;
}
-__INTRIN_INLINE long _InterlockedExchange(volatile long * const Target, const long Value)
+__INTRIN_INLINE long _InterlockedExchange(volatile long * Target, const long Value)
{
long retval = Value;
__asm__("xchgl %[retval], %[Target]" : [retval] "+r" (retval) : [Target] "m" (*Target) : "memory");
return retval;
}
-__INTRIN_INLINE void * _InterlockedExchangePointer(void * volatile * const Target, void * const Value)
+__INTRIN_INLINE void * _InterlockedExchangePointer(void * volatile * Target, void * const Value)
{
void * retval = Value;
__asm__("xchgl %[retval], %[Target]" : [retval] "+r" (retval) : [Target] "m" (*Target) : "memory");
return retval;
}
-__INTRIN_INLINE long _InterlockedExchangeAdd16(volatile short * const Addend, const short Value)
+__INTRIN_INLINE long _InterlockedExchangeAdd16(volatile short * Addend, const short Value)
{
long retval = Value;
__asm__("lock; xaddw %[retval], %[Addend]" : [retval] "+r" (retval) : [Addend] "m" (*Addend) : "memory");
return retval;
}
-__INTRIN_INLINE long _InterlockedExchangeAdd(volatile long * const Addend, const long Value)
+__INTRIN_INLINE long _InterlockedExchangeAdd(volatile long * Addend, const long Value)
{
long retval = Value;
__asm__("lock; xaddl %[retval], %[Addend]" : [retval] "+r" (retval) : [Addend] "m" (*Addend) : "memory");
return retval;
}
-__INTRIN_INLINE char _InterlockedAnd8(volatile char * const value, const char mask)
+__INTRIN_INLINE char _InterlockedAnd8(volatile char * value, const char mask)
{
char x;
char y;
return y;
}
-__INTRIN_INLINE short _InterlockedAnd16(volatile short * const value, const short mask)
+__INTRIN_INLINE short _InterlockedAnd16(volatile short * value, const short mask)
{
short x;
short y;
return y;
}
-__INTRIN_INLINE long _InterlockedAnd(volatile long * const value, const long mask)
+__INTRIN_INLINE long _InterlockedAnd(volatile long * value, const long mask)
{
long x;
long y;
return y;
}
-__INTRIN_INLINE char _InterlockedOr8(volatile char * const value, const char mask)
+__INTRIN_INLINE char _InterlockedOr8(volatile char * value, const char mask)
{
char x;
char y;
return y;
}
-__INTRIN_INLINE short _InterlockedOr16(volatile short * const value, const short mask)
+__INTRIN_INLINE short _InterlockedOr16(volatile short * value, const short mask)
{
short x;
short y;
return y;
}
-__INTRIN_INLINE long _InterlockedOr(volatile long * const value, const long mask)
+__INTRIN_INLINE long _InterlockedOr(volatile long * value, const long mask)
{
long x;
long y;
return y;
}
-__INTRIN_INLINE char _InterlockedXor8(volatile char * const value, const char mask)
+__INTRIN_INLINE char _InterlockedXor8(volatile char * value, const char mask)
{
char x;
char y;
return y;
}
-__INTRIN_INLINE short _InterlockedXor16(volatile short * const value, const short mask)
+__INTRIN_INLINE short _InterlockedXor16(volatile short * value, const short mask)
{
short x;
short y;
return y;
}
-__INTRIN_INLINE long _InterlockedXor(volatile long * const value, const long mask)
+__INTRIN_INLINE long _InterlockedXor(volatile long * value, const long mask)
{
long x;
long y;
#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40100 && defined(__x86_64__)
-__INTRIN_INLINE long long _InterlockedCompareExchange64(volatile long long * const Destination, const long long Exchange, const long long Comperand)
+__INTRIN_INLINE long long _InterlockedCompareExchange64(volatile long long * Destination, const long long Exchange, const long long Comperand)
{
return __sync_val_compare_and_swap(Destination, Comperand, Exchange);
}
#else
-__INTRIN_INLINE long long _InterlockedCompareExchange64(volatile long long * const Destination, const long long Exchange, const long long Comperand)
+__INTRIN_INLINE long long _InterlockedCompareExchange64(volatile long long * Destination, const long long Exchange, const long long Comperand)
{
long long retval = Comperand;
#endif
-__INTRIN_INLINE long _InterlockedAddLargeStatistic(volatile long long * const Addend, const long Value)
+__INTRIN_INLINE long _InterlockedAddLargeStatistic(volatile long long * Addend, const long Value)
{
__asm__
(
return Value;
}
-__INTRIN_INLINE long _InterlockedDecrement(volatile long * const lpAddend)
+__INTRIN_INLINE long _InterlockedDecrement(volatile long * lpAddend)
{
return _InterlockedExchangeAdd(lpAddend, -1) - 1;
}
-__INTRIN_INLINE long _InterlockedIncrement(volatile long * const lpAddend)
+__INTRIN_INLINE long _InterlockedIncrement(volatile long * lpAddend)
{
return _InterlockedExchangeAdd(lpAddend, 1) + 1;
}
-__INTRIN_INLINE short _InterlockedDecrement16(volatile short * const lpAddend)
+__INTRIN_INLINE short _InterlockedDecrement16(volatile short * lpAddend)
{
return _InterlockedExchangeAdd16(lpAddend, -1) - 1;
}
-__INTRIN_INLINE short _InterlockedIncrement16(volatile short * const lpAddend)
+__INTRIN_INLINE short _InterlockedIncrement16(volatile short * lpAddend)
{
return _InterlockedExchangeAdd16(lpAddend, 1) + 1;
}
#if defined(_M_AMD64)
-__INTRIN_INLINE long long _InterlockedDecrement64(volatile long long * const lpAddend)
+__INTRIN_INLINE long long _InterlockedDecrement64(volatile long long * lpAddend)
{
return _InterlockedExchangeAdd64(lpAddend, -1) - 1;
}
-__INTRIN_INLINE long long _InterlockedIncrement64(volatile long long * const lpAddend)
+__INTRIN_INLINE long long _InterlockedIncrement64(volatile long long * lpAddend)
{
return _InterlockedExchangeAdd64(lpAddend, 1) + 1;
}
#endif /* KJK_INTRIN_X86_H_ */
-/* EOF */
+/* EOF */
\ No newline at end of file
extern "C" {
#endif
+#ifndef _INC_SETJMPEX
+#define setjmp _setjmp
+#endif
+
#if (defined(_X86_) && !defined(__x86_64))
#define _JBLEN 16
unsigned long UnwindFunc;
unsigned long UnwindData[6];
} _JUMP_BUFFER;
+
#elif defined(__ia64__)
+
typedef _CRT_ALIGN(16) struct _SETJMP_FLOAT128 {
__int64 LowPart;
__int64 HighPart;
__int64 Preds;
} _JUMP_BUFFER;
+
#elif defined(__x86_64)
+
typedef _CRT_ALIGN(16) struct _SETJMP_FLOAT128 {
unsigned __int64 Part[2];
} SETJMP_FLOAT128;
SETJMP_FLOAT128 Xmm14;
SETJMP_FLOAT128 Xmm15;
} _JUMP_BUFFER;
+
#endif
+
#ifndef _JMP_BUF_DEFINED
typedef _JBTYPE jmp_buf[_JBLEN];
#define _JMP_BUF_DEFINED
#endif
+#if 0
void * __cdecl __MINGW_NOTHROW mingw_getsp(void);
#ifdef USE_MINGW_SETJMP_TWO_ARGS
int __cdecl __MINGW_NOTHROW setjmp(jmp_buf _Buf);
#endif
+#endif // 0
+
__declspec(noreturn) __MINGW_NOTHROW void __cdecl ms_longjmp(jmp_buf _Buf,int _Value)/* throw(...)*/;
__declspec(noreturn) __MINGW_NOTHROW void __cdecl longjmp(jmp_buf _Buf,int _Value);
+ int __cdecl setjmp(jmp_buf _Buf);
#ifdef __cplusplus
}
#endif
#define _STDIO_DEFINED
-#endif
+#endif // !_STDIO_DEFINED
#define _fgetc_nolock(_stream) (--(_stream)->_cnt >= 0 ? 0xff & *(_stream)->_ptr++ : _filbuf(_stream))
#define _fputc_nolock(_c,_stream) (--(_stream)->_cnt >= 0 ? 0xff & (*(_stream)->_ptr++ = (char)(_c)) : _flsbuf((_c),(_stream)))
_CRTIMP extern char *_sys_errlist[];
_CRTIMP extern int _sys_nerr;
-#if !defined(__x86_64)
+//#if !defined(__x86_64)// hack here!
_CRTIMP int *__cdecl __p___argc(void);
_CRTIMP char ***__cdecl __p___argv(void);
_CRTIMP wchar_t ***__cdecl __p___wargv(void);
_CRTIMP wchar_t ***__cdecl __p__wenviron(void);
_CRTIMP char **__cdecl __p__pgmptr(void);
_CRTIMP wchar_t **__cdecl __p__wpgmptr(void);
-#endif
+//#endif
#ifndef __argc
#ifdef _MSVCRT_
extern int __argc;
#define _countof(_Array) (sizeof(_Array) / sizeof(_Array[0]))
#else
extern "C++" {
- template <typename _CountofType,size_t _SizeOfArray> char (*__countof_helper(UNALIGNED _CountofType (&_Array)[_SizeOfArray]))[_SizeOfArray];
+ template <typename _CountofType,size_t _SizeOfArray>
+ char (*__countof_helper(/*UNALIGNED*/ _CountofType (&_Array)[_SizeOfArray]))[_SizeOfArray];
#define _countof(_Array) sizeof(*__countof_helper(_Array))
}
#endif
#define _tcscpy_s strcpy_s
#define _tcsdup _strdup
#define _tcslen strlen
-#if 0
#define _tcsnlen strnlen
-#endif
#define _tcsxfrm strxfrm
#define _tcsxfrm_l _strxfrm_l
#define _tcserror strerror
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
-#ifndef _TIME_H_
-#define _TIME_H_
+#ifndef _INC_TIME
+#define _INC_TIME
#include <crtdefs.h>
_CRT_OBSOLETE(GetLocalTime) unsigned __cdecl _getsystime(struct tm *_Tm);
_CRT_OBSOLETE(GetLocalTime) unsigned __cdecl _setsystime(struct tm *_Tm,unsigned _MilliSec);
+#ifdef __STDC_WANT_SECURE_LIB__
+ _CRTIMP errno_t __cdecl asctime_s(char *_Buf,size_t _SizeInWords,const struct tm *_Tm);
+#endif
_CRTIMP errno_t __cdecl _ctime32_s(char *_Buf,size_t _SizeInBytes,const __time32_t *_Time);
_CRTIMP errno_t __cdecl _gmtime32_s(struct tm *_Tm,const __time32_t *_Time);
_CRTIMP errno_t __cdecl _localtime32_s(struct tm *_Tm,const __time32_t *_Time);
_CRTIMP char *__cdecl ctime(const time_t *_Time);
_CRTIMP struct tm *__cdecl gmtime(const time_t *_Time);
_CRTIMP struct tm *__cdecl localtime(const time_t *_Time);
- _CRTIMP struct tm *__cdecl localtime_r(const time_t *_Time,struct tm *);
-
_CRTIMP time_t __cdecl mktime(struct tm *_Tm);
_CRTIMP time_t __cdecl _mkgmtime(struct tm *_Tm);
_CRTIMP time_t __cdecl time(time_t *_Time);
#pragma pack(pop)
-#include <sec_api/time_s.h>
-
-#endif /* End _TIME_H_ */
+#endif /* End _INC_TIME */
_CRTIMP int __cdecl is_wctype(wint_t _C,wctype_t _Type);
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || !defined (NO_OLDNAMES)
_CRTIMP int __cdecl iswblank(wint_t _C);
-#endif
+#endif
#endif
#ifndef _WDIRECT_DEFINED
#ifndef _WTIME_DEFINED
#define _WTIME_DEFINED
-
- _CRTIMP wchar_t *__cdecl _wasctime(const struct tm *_Tm);
- _CRTIMP wchar_t *__cdecl _wctime32(const __time32_t *_Time);
- size_t __cdecl wcsftime(wchar_t *_Buf,size_t _SizeInWords,const wchar_t *_Format,const struct tm *_Tm);
+ _CRTIMP _CRT_INSECURE_DEPRECATE(_wasctime_s) wchar_t *__cdecl _wasctime(const struct tm *_Tm);
+ _CRTIMP wchar_t *__cdecl _wctime(const time_t *_Time);
+ _CRTIMP _CRT_INSECURE_DEPRECATE(_wctime32_s) wchar_t *__cdecl _wctime32(const __time32_t *_Time);
+ _CRTIMP size_t __cdecl wcsftime(wchar_t *_Buf,size_t _SizeInWords,const wchar_t *_Format,const struct tm *_Tm);
_CRTIMP size_t __cdecl _wcsftime_l(wchar_t *_Buf,size_t _SizeInWords,const wchar_t *_Format,const struct tm *_Tm,_locale_t _Locale);
_CRTIMP wchar_t *__cdecl _wstrdate(wchar_t *_Buffer);
_CRTIMP wchar_t *__cdecl _wstrtime(wchar_t *_Buffer);
+
+ _CRTIMP errno_t __cdecl _wasctime_s(wchar_t *_Buf,size_t _SizeInWords,const struct tm *_Tm);
+ _CRTIMP errno_t __cdecl _wctime32_s(wchar_t *_Buf,size_t _SizeInWords,const __time32_t *_Time);
+ _CRTIMP errno_t __cdecl _wstrdate_s(wchar_t *_Buf,size_t _SizeInWords);
+ _CRTIMP errno_t __cdecl _wstrtime_s(wchar_t *_Buf,size_t _SizeInWords);
#if _INTEGRAL_MAX_BITS >= 64
- _CRTIMP wchar_t *__cdecl _wctime64(const __time64_t *_Time);
+ _CRTIMP _CRT_INSECURE_DEPRECATE(_wctime64_s) wchar_t *__cdecl _wctime64(const __time64_t *_Time);
+ _CRTIMP errno_t __cdecl _wctime64_s(wchar_t *_Buf,size_t _SizeInWords,const __time64_t *_Time);
#endif
#if !defined (RC_INVOKED) && !defined (_INC_WTIME_INL)
#define _INC_WTIME_INL
#ifdef _USE_32BIT_TIME_T
-__CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime32(_Time); }
+/* Do it like this to be compatible to msvcrt.dll on 32 bit windows XP and before */
+__CRT_INLINE wchar_t *__cdecl _wctime32(const time_t *_Time) { return _wctime(_Time); }
+__CRT_INLINE errno_t _wctime32_s(wchar_t *_Buffer, size_t _SizeInWords,const __time32_t *_Time) { return _wctime32_s(_Buffer, _SizeInWords, _Time); }
#else
__CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime64(_Time); }
+__CRT_INLINE errno_t _wctime_s(wchar_t *_Buffer, size_t _SizeInWords,const time_t *_Time) { return _wctime64_s(_Buffer, _SizeInWords, _Time); }
#endif
#endif
-#endif
+
+#endif /* !_WTIME_DEFINED */
typedef int mbstate_t;
typedef wchar_t _Wint_t;
return InterlockedExchangeAdd64(Addend, Value) + Value;
}
//#endif
+#define BitScanForward _BitScanForward
+#define BitScanReverse _BitScanReverse
+#endif
+
+#ifdef _M_AMD64
+#define InterlockedBitTestAndSet64 _interlockedbittestandset64
+#define InterlockedBitTestAndReset64 _interlockedbittestandreset64
#endif
#endif /* !__INTERLOCKED_DECLARED */
#define _SLIST_HEADER_
#if defined(_WIN64)
-typedef struct DECLSPEC_ALIGN(16) _SLIST_ENTRY *PSLIST_ENTRY;
+typedef struct _SLIST_ENTRY *PSLIST_ENTRY;
typedef struct DECLSPEC_ALIGN(16) _SLIST_ENTRY {
PSLIST_ENTRY Next;
} SLIST_ENTRY;
}
#endif
-#endif // _WDMDDK_
+#endif // _WDMDDK_
\ No newline at end of file
#define KTHREAD_INITIAL_STACK 0x28
#define KTHREAD_STACK_LIMIT 0x30
#define KTHREAD_WAIT_IRQL 0x156
-#define KTHREAD_TEB 0x0B0+0x10
-#define KTHREAD_KERNEL_STACK 0x038
-#define KTHREAD_NPX_STATE 0x85
-#define KTHREAD_SERVICE_TABLE 0x1E8
-#define KTHREAD_PREVIOUS_MODE 0x137
-#define KTHREAD_TRAP_FRAME 0x1D8
-#define KTHREAD_CALLBACK_STACK 0x1E0
-#define KTHREAD_APCSTATE_PROCESS 0x068
-#define KPROCESS_DIRECTORY_TABLE_BASE 0x028
//
// KPRCB Offsets
#define CONTEXT_LastExceptionToRip 0x4c0
#define CONTEXT_LastExceptionFromRip 0x4c8
+//
+// KEXCEPTION_FRAME offsets
+//
+#define KEXCEPTION_FRAME_P1Home 0x000
+#define KEXCEPTION_FRAME_P2Home 0x008
+#define KEXCEPTION_FRAME_P3Home 0x010
+#define KEXCEPTION_FRAME_P4Home 0x018
+#define KEXCEPTION_FRAME_P5 0x020
+#define KEXCEPTION_FRAME_InitialStack 0x028
+#define KEXCEPTION_FRAME_Xmm6 0x030
+#define KEXCEPTION_FRAME_Xmm7 0x040
+#define KEXCEPTION_FRAME_Xmm8 0x050
+#define KEXCEPTION_FRAME_Xmm9 0x060
+#define KEXCEPTION_FRAME_Xmm10 0x070
+#define KEXCEPTION_FRAME_Xmm11 0x080
+#define KEXCEPTION_FRAME_Xmm12 0x090
+#define KEXCEPTION_FRAME_Xmm13 0x0A0
+#define KEXCEPTION_FRAME_Xmm14 0x0B0
+#define KEXCEPTION_FRAME_Xmm15 0x0C0
+#define KEXCEPTION_FRAME_TrapFrame 0x0D0
+#define KEXCEPTION_FRAME_CallbackStack 0x0D8
+#define KEXCEPTION_FRAME_OutputBuffer 0x0E0
+#define KEXCEPTION_FRAME_OutputLength 0x0E8
+#define KEXCEPTION_FRAME_MxCsr 0x0F0
+#define KEXCEPTION_FRAME_Rbp 0x0F8
+#define KEXCEPTION_FRAME_Rbx 0x100
+#define KEXCEPTION_FRAME_Rdi 0x108
+#define KEXCEPTION_FRAME_Rsi 0x110
+#define KEXCEPTION_FRAME_R12 0x118
+#define KEXCEPTION_FRAME_R13 0x120
+#define KEXCEPTION_FRAME_R14 0x128
+#define KEXCEPTION_FRAME_R15 0x130
+#define KEXCEPTION_FRAME_Return 0x138
+#define SIZE_KEXCEPTION_FRAME 0x140
+
+
//
// EXCEPTION_RECORD Offsets
//
#define KGDT_TSS 0x0040
#define KGDT_32_R3_TEB 0x0050 // 53
-
//
// CR4
//
//
// EFlags
//
-#define EFLAGS_CF 0x01L
-#define EFLAGS_ZF 0x40L
-#define EFLAGS_TF 0x100L
-#define EFLAGS_INTERRUPT_MASK 0x200L
-#define EFLAGS_DF 0x400L
-#define EFLAGS_NESTED_TASK 0x4000L
-#define EFLAGS_V86_MASK 0x20000
+#define EFLAGS_CF 0x01
+#define EFLAGS_PF 0x04
+#define EFLAGS_AF 0x10
+#define EFLAGS_ZF 0x40
+#define EFLAGS_SF 0x80
+#define EFLAGS_TF 0x100
+#define EFLAGS_INTERRUPT_MASK 0x200
+#define EFLAGS_DF 0x400
+#define EFLAGS_OF 0x800
+#define EFLAGS_IOPL_MASK 0x3000
+#define EFLAGS_NESTED_TASK 0x4000
+#define EFLAGS_RF 0x10000
+#define EFLAGS_VM 0x20000
#define EFLAGS_ALIGN_CHECK 0x40000
#define EFLAGS_VIF 0x80000
#define EFLAGS_VIP 0x100000
+#define EFLAGS_ID 0x200000
#define EFLAGS_USER_SANITIZE 0x3F4DD7
-#define EFLAG_SIGN 0x8000
-#define EFLAG_ZERO 0x4000
//
// IPI Types
//
// Dummy LDT_ENTRY
//
+#ifndef _LDT_ENTRY_DEFINED
+#define _LDT_ENTRY_DEFINED
typedef ULONG LDT_ENTRY;
+#endif
//
// GDT Entry Definition
#define PKTSS PKTSS64
//
-// i386 CPUs don't have exception frames
+// KEXCEPTION_FRAME
//
-typedef struct _KEXCEPTION_FRAME KEXCEPTION_FRAME, *PKEXCEPTION_FRAME;
+typedef struct _KEXCEPTION_FRAME
+{
+ UINT64 P1Home;
+ UINT64 P2Home;
+ UINT64 P3Home;
+ UINT64 P4Home;
+ UINT64 P5;
+ UINT64 InitialStack;
+ M128A Xmm6;
+ M128A Xmm7;
+ M128A Xmm8;
+ M128A Xmm9;
+ M128A Xmm10;
+ M128A Xmm11;
+ M128A Xmm12;
+ M128A Xmm13;
+ M128A Xmm14;
+ M128A Xmm15;
+ UINT64 TrapFrame;
+ UINT64 CallbackStack;
+ UINT64 OutputBuffer;
+ UINT64 OutputLength;
+ UINT64 MxCsr;
+ UINT64 Rbp;
+ UINT64 Rbx;
+ UINT64 Rdi;
+ UINT64 Rsi;
+ UINT64 R12;
+ UINT64 R13;
+ UINT64 R14;
+ UINT64 R15;
+ UINT64 Return;
+} KEXCEPTION_FRAME, *PKEXCEPTION_FRAME;
//
// Inline function to get current KPRCB
//
// Include the right file for this architecture.
//
-#if defined(_M_IX86) || defined(_M_AMD64)
+#if defined(_M_IX86)
#include <i386/mmtypes.h>
#elif defined(_M_PPC)
#include <powerpc/mmtypes.h>
#elif defined(_M_ARM)
#include <arm/mmtypes.h>
+#elif defined(_M_AMD64)
+#include <amd64/mmtypes.h>
#else
#error "Unknown processor"
#endif
LARGE_INTEGER ValidDataGoal;
PVACB InitialVacbs[4];
PVACB *Vacbs;
- PFILE_OBJECT FileObject;
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+ EX_FAST_REF FileObjectFastRef;
+#else
+ PFILE_OBJECT FileObject;
+#endif
PVACB ActiveVacb;
PVOID NeedToZero;
ULONG ActivePage;
ULONG BcbSpinLock;
PVOID Reserved;
KEVENT Event;
- EX_PUSH_LOCK VacbPushLock;
+#if (NTDDI_VERSION >= NTDDI_LONGHORN) //guess
+ LARGE_INTEGER HighWaterMappingOffset;
+#else
+ EX_PUSH_LOCK VacbPushLock;
+#endif
PRIVATE_CACHE_MAP PrivateCacheMap;
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+ PVOID WriteBehindWorkQueueEntry;
+ PVOLUME_CACHE_MAP VolumeCacheMap;
+ ULONG ProcImagePathHash;
+ ULONG MappedWritesInProgress;
+#endif
} SHARED_CACHE_MAP, *PSHARED_CACHE_MAP;
#endif /* _NTIFS_INCLUDED_ */
ULONG Response;
ULONG NumberOfParameters;
ULONG UnicodeStringParameterMask;
- ULONG Parameters[MAXIMUM_HARDERROR_PARAMETERS];
+ ULONG_PTR Parameters[MAXIMUM_HARDERROR_PARAMETERS];
} HARDERROR_MSG, *PHARDERROR_MSG;
//
// NOTE: *NOT* THE SAME AS VM_COUNTERS!
//
SIZE_T PeakVirtualSize;
- ULONG VirtualSize;
- SIZE_T PageFaultCount;
+ SIZE_T VirtualSize;
+ ULONG PageFaultCount;
SIZE_T PeakWorkingSetSize;
SIZE_T WorkingSetSize;
SIZE_T QuotaPeakPagedPoolUsage;
#else
ULONG SpareFields0[1];
#endif
- CHAR VendorString[13];
+ UCHAR VendorString[13];
UCHAR InitialApicId;
UCHAR LogicalProcessorsPerPhysicalProcessor;
ULONG MHz;
DISPATCHER_HEADER Header;
LIST_ENTRY ProfileListHead;
#if (NTDDI_VERSION >= NTDDI_LONGHORN)
- ULONG DirectoryTableBase;
- ULONG Unused0;
+ ULONG_PTR DirectoryTableBase;
+ ULONG_PTR Unused0;
#else
- ULONG DirectoryTableBase[2];
+ ULONG_PTR DirectoryTableBase[2];
#endif
#if defined(_M_IX86)
KGDTENTRY LdtDescriptor;
typedef struct _LDR_DATA_TABLE_ENTRY
{
LIST_ENTRY InLoadOrderLinks;
- LIST_ENTRY InMemoryOrderModuleList;
- LIST_ENTRY InInitializationOrderModuleList;
+ LIST_ENTRY InMemoryOrderLinks;
+ LIST_ENTRY InInitializationOrderLinks;
PVOID DllBase;
PVOID EntryPoint;
ULONG SizeOfImage;
};
PVOID EntryPointActivationContext;
PVOID PatchInformation;
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+ LIST_ENTRY ForwarderLinks;
+ LIST_ENTRY ServiceTagLinks;
+ LIST_ENTRY StaticLinks;
+#endif
} LDR_DATA_TABLE_ENTRY, *PLDR_DATA_TABLE_ENTRY;
//
{
union
{
- ULONG Long;
+ ULONG_PTR Long;
HARDWARE_PTE Flush;
MMPTE_HARDWARE Hard;
+#ifdef _M_AMD64
+ MMPTE_HARDWARE_LARGEPAGE HardLarge;
+#endif
MMPTE_PROTOTYPE Proto;
MMPTE_SOFTWARE Soft;
MMPTE_TRANSITION Trans;
MMPTE_SUBSECTION Subsect;
MMPTE_LIST List;
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+ volatile ULONG_PTR VolatileLong;
+ MMPTE_TIMESTAMP TimeStamp;
+#endif
} u;
} MMPTE, *PMMPTE;
--- /dev/null
+
+#define PASTE2(x,y) x##y
+#define PASTE(x,y) PASTE2(x,y)
+
+#ifdef EXPLICIT_32BIT
+ #define STRUCT(x) PASTE(x,32)
+ #define PTR(x) ULONG
+#elif defined(EXPLICIT_64BIT)
+ #define STRUCT(x) PASTE(x,64)
+ #define PTR(x) ULONG64
+#else
+ #define STRUCT(x) x
+ #define PTR(x) x
+#endif
+
+#if defined(_WIN64) && !defined(EXPLICIT_32BIT)
+ #define GDI_HANDLE_BUFFER_SIZE 60
+#else
+ #define GDI_HANDLE_BUFFER_SIZE 34
+#endif
+
+typedef struct STRUCT(_PEB)
+{
+ BOOLEAN InheritedAddressSpace;
+ BOOLEAN ReadImageFileExecOptions;
+ BOOLEAN BeingDebugged;
+#if (NTDDI_VERSION >= NTDDI_WS03)
+ union
+ {
+ BOOLEAN BitField;
+ struct
+ {
+ BOOLEAN ImageUsesLargePages:1;
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+ BOOLEAN IsProtectedProcess:1;
+ BOOLEAN IsLegacyProcess:1;
+ BOOLEAN IsImageDynamicallyRelocated:1;
+ BOOLEAN SkipPatchingUser32Forwarders:1;
+ BOOLEAN SpareBits:3;
+#else
+ BOOLEAN SpareBits:7;
+#endif
+ };
+ };
+#else
+ BOOLEAN SpareBool;
+#endif
+ PTR(HANDLE) Mutant;
+ PTR(PVOID) ImageBaseAddress;
+ PTR(PPEB_LDR_DATA) Ldr;
+ PTR(struct _RTL_USER_PROCESS_PARAMETERS*) ProcessParameters;
+ PTR(PVOID) SubSystemData;
+ PTR(PVOID) ProcessHeap;
+ PTR(struct _RTL_CRITICAL_SECTION*) FastPebLock;
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+ PTR(PVOID) AltThunkSListPtr;
+ PTR(PVOID) IFEOKey;
+ union
+ {
+ ULONG CrossProcessFlags;
+ struct
+ {
+ ULONG ProcessInJob:1;
+ ULONG ProcessInitializing:1;
+ ULONG ProcessUsingVEH:1;
+ ULONG ProcessUsingVCH:1;
+ ULONG ReservedBits0:28;
+ };
+ };
+ union
+ {
+ PTR(PVOID) KernelCallbackTable;
+ PTR(PVOID) UserSharedInfoPtr;
+ };
+#elif (NTDDI_VERSION >= NTDDI_WS03)
+ PTR(PVOID) AltThunkSListPtr;
+ PTR(PVOID) SparePtr2;
+ ULONG EnvironmentUpdateCount;
+ PTR(PVOID) KernelCallbackTable;
+#else
+ PTR(PPEBLOCKROUTINE) FastPebLockRoutine;
+ PTR(PPEBLOCKROUTINE) FastPebUnlockRoutine;
+ ULONG EnvironmentUpdateCount;
+ PTR(PVOID) KernelCallbackTable;
+#endif
+ ULONG SystemReserved[1];
+ ULONG SpareUlong; // AtlThunkSListPtr32
+ PTR(PPEB_FREE_BLOCK) FreeList;
+ ULONG TlsExpansionCounter;
+ PTR(PVOID) TlsBitmap;
+ ULONG TlsBitmapBits[2];
+ PTR(PVOID) ReadOnlySharedMemoryBase;
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+ PTR(PVOID) HotpatchInformation;
+#else
+ PTR(PVOID) ReadOnlySharedMemoryHeap;
+#endif
+ PTR(PVOID*) ReadOnlyStaticServerData;
+ PTR(PVOID) AnsiCodePageData;
+ PTR(PVOID) OemCodePageData;
+ PTR(PVOID) UnicodeCaseTableData;
+ ULONG NumberOfProcessors;
+ ULONG NtGlobalFlag;
+ LARGE_INTEGER CriticalSectionTimeout;
+ PTR(ULONG_PTR) HeapSegmentReserve;
+ PTR(ULONG_PTR) HeapSegmentCommit;
+ PTR(ULONG_PTR) HeapDeCommitTotalFreeThreshold;
+ PTR(ULONG_PTR) HeapDeCommitFreeBlockThreshold;
+ ULONG NumberOfHeaps;
+ ULONG MaximumNumberOfHeaps;
+ PTR(PVOID*) ProcessHeaps;
+ PTR(PVOID) GdiSharedHandleTable;
+ PTR(PVOID) ProcessStarterHelper;
+ ULONG GdiDCAttributeList;
+ PTR(struct _RTL_CRITICAL_SECTION*) LoaderLock;
+ ULONG OSMajorVersion;
+ ULONG OSMinorVersion;
+ USHORT OSBuildNumber;
+ USHORT OSCSDVersion;
+ ULONG OSPlatformId;
+ ULONG ImageSubsystem;
+ ULONG ImageSubsystemMajorVersion;
+ ULONG ImageSubsystemMinorVersion;
+ PTR(ULONG_PTR) ImageProcessAffinityMask;
+ ULONG GdiHandleBuffer[GDI_HANDLE_BUFFER_SIZE];
+ PTR(PPOST_PROCESS_INIT_ROUTINE) PostProcessInitRoutine;
+ PTR(PVOID) TlsExpansionBitmap;
+ ULONG TlsExpansionBitmapBits[32];
+ ULONG SessionId;
+#if (NTDDI_VERSION >= NTDDI_WINXP)
+ ULARGE_INTEGER AppCompatFlags;
+ ULARGE_INTEGER AppCompatFlagsUser;
+ PTR(PVOID) pShimData;
+ PTR(PVOID) AppCompatInfo;
+ STRUCT(UNICODE_STRING) CSDVersion;
+ PTR(struct _ACTIVATION_CONTEXT_DATA*) ActivationContextData;
+ PTR(struct _ASSEMBLY_STORAGE_MAP*) ProcessAssemblyStorageMap;
+ PTR(struct _ACTIVATION_CONTEXT_DATA*) SystemDefaultActivationContextData;
+ PTR(struct _ASSEMBLY_STORAGE_MAP*) SystemAssemblyStorageMap;
+ PTR(ULONG_PTR) MinimumStackCommit;
+#endif
+#if (NTDDI_VERSION >= NTDDI_WS03)
+ PTR(PVOID*) FlsCallback;
+ STRUCT(LIST_ENTRY) FlsListHead;
+ PTR(PVOID) FlsBitmap;
+ ULONG FlsBitmapBits[4];
+ ULONG FlsHighIndex;
+#endif
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+ PTR(PVOID) WerRegistrationData;
+ PTR(PVOID) WerShipAssertPtr;
+#endif
+} STRUCT(PEB), *STRUCT(PPEB);
+
+
+#if defined(_WIN64) && !defined(EXPLICIT_32BIT)
+C_ASSERT(FIELD_OFFSET(STRUCT(PEB), Mutant) == 0x08);
+C_ASSERT(FIELD_OFFSET(STRUCT(PEB), Ldr) == 0x18);
+C_ASSERT(FIELD_OFFSET(STRUCT(PEB), FastPebLock) == 0x038);
+C_ASSERT(FIELD_OFFSET(STRUCT(PEB), TlsExpansionCounter) == 0x070);
+C_ASSERT(FIELD_OFFSET(STRUCT(PEB), NtGlobalFlag) == 0x0BC);
+C_ASSERT(FIELD_OFFSET(STRUCT(PEB), GdiSharedHandleTable) == 0x0F8);
+C_ASSERT(FIELD_OFFSET(STRUCT(PEB), LoaderLock) == 0x110);
+C_ASSERT(FIELD_OFFSET(STRUCT(PEB), ImageSubsystem) == 0x128);
+C_ASSERT(FIELD_OFFSET(STRUCT(PEB), ImageProcessAffinityMask) == 0x138);
+C_ASSERT(FIELD_OFFSET(STRUCT(PEB), PostProcessInitRoutine) == 0x230);
+C_ASSERT(FIELD_OFFSET(STRUCT(PEB), SessionId) == 0x2C0);
+#if (NTDDI_VERSION >= NTDDI_WS03)
+C_ASSERT(FIELD_OFFSET(STRUCT(PEB), FlsHighIndex) == 0x350);
+#endif
+#else
+C_ASSERT(FIELD_OFFSET(STRUCT(PEB), Mutant) == 0x04);
+C_ASSERT(FIELD_OFFSET(STRUCT(PEB), Ldr) == 0x0C);
+C_ASSERT(FIELD_OFFSET(STRUCT(PEB), FastPebLock) == 0x01C);
+C_ASSERT(FIELD_OFFSET(STRUCT(PEB), TlsExpansionCounter) == 0x03C);
+C_ASSERT(FIELD_OFFSET(STRUCT(PEB), NtGlobalFlag) == 0x068);
+C_ASSERT(FIELD_OFFSET(STRUCT(PEB), GdiSharedHandleTable) == 0x094);
+C_ASSERT(FIELD_OFFSET(STRUCT(PEB), LoaderLock) == 0x0A0);
+C_ASSERT(FIELD_OFFSET(STRUCT(PEB), ImageSubsystem) == 0x0B4);
+C_ASSERT(FIELD_OFFSET(STRUCT(PEB), ImageProcessAffinityMask) == 0x0C0);
+C_ASSERT(FIELD_OFFSET(STRUCT(PEB), PostProcessInitRoutine) == 0x14C);
+C_ASSERT(FIELD_OFFSET(STRUCT(PEB), SessionId) == 0x1D4);
+#if (NTDDI_VERSION >= NTDDI_WS03)
+C_ASSERT(FIELD_OFFSET(STRUCT(PEB), FlsHighIndex) == 0x22C);
+#endif
+#endif
+
+//
+// GDI Batch Descriptor
+//
+typedef struct STRUCT(_GDI_TEB_BATCH)
+{
+ ULONG Offset;
+ PTR(HANDLE) HDC;
+ ULONG Buffer[0x136];
+} STRUCT(GDI_TEB_BATCH), *STRUCT(PGDI_TEB_BATCH);
+
+//
+// Thread Environment Block (TEB)
+//
+typedef struct STRUCT(_TEB)
+{
+ STRUCT(NT_TIB) NtTib;
+ PTR(PVOID) EnvironmentPointer;
+ STRUCT(CLIENT_ID) ClientId;
+ PTR(PVOID) ActiveRpcHandle;
+ PTR(PVOID) ThreadLocalStoragePointer;
+ PTR(STRUCT(PPEB)) ProcessEnvironmentBlock;
+ ULONG LastErrorValue;
+ ULONG CountOfOwnedCriticalSections;
+ PTR(PVOID) CsrClientThread;
+ PTR(PVOID) Win32ThreadInfo;
+ ULONG User32Reserved[26];
+ ULONG UserReserved[5];
+ PTR(PVOID) WOW32Reserved;
+ LCID CurrentLocale;
+ ULONG FpSoftwareStatusRegister;
+ PTR(PVOID) SystemReserved1[54];
+ LONG ExceptionCode;
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+ PTR(struct _ACTIVATION_CONTEXT_STACK*) ActivationContextStackPointer;
+ UCHAR SpareBytes1[0x30 - 3 * sizeof(PTR(PVOID))];
+ ULONG TxFsContext;
+#elif (NTDDI_VERSION >= NTDDI_WS03)
+ PTR(struct _ACTIVATION_CONTEXT_STACK*) ActivationContextStackPointer;
+ UCHAR SpareBytes1[0x34 - 3 * sizeof(PTR(PVOID))];
+#else
+ ACTIVATION_CONTEXT_STACK ActivationContextStack;
+ UCHAR SpareBytes1[24];
+#endif
+ STRUCT(GDI_TEB_BATCH) GdiTebBatch;
+ STRUCT(CLIENT_ID) RealClientId;
+ PTR(PVOID) GdiCachedProcessHandle;
+ ULONG GdiClientPID;
+ ULONG GdiClientTID;
+ PTR(PVOID) GdiThreadLocalInfo;
+ PTR(SIZE_T) Win32ClientInfo[62];
+ PTR(PVOID) glDispatchTable[233];
+ PTR(SIZE_T) glReserved1[29];
+ PTR(PVOID) glReserved2;
+ PTR(PVOID) glSectionInfo;
+ PTR(PVOID) glSection;
+ PTR(PVOID) glTable;
+ PTR(PVOID) glCurrentRC;
+ PTR(PVOID) glContext;
+ NTSTATUS LastStatusValue;
+ STRUCT(UNICODE_STRING) StaticUnicodeString;
+ WCHAR StaticUnicodeBuffer[261];
+ PTR(PVOID) DeallocationStack;
+ PTR(PVOID) TlsSlots[64];
+ STRUCT(LIST_ENTRY) TlsLinks;
+ PTR(PVOID) Vdm;
+ PTR(PVOID) ReservedForNtRpc;
+ PTR(PVOID) DbgSsReserved[2];
+#if (NTDDI_VERSION >= NTDDI_WS03)
+ ULONG HardErrorMode;
+#else
+ ULONG HardErrorsAreDisabled;
+#endif
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+ PTR(PVOID) Instrumentation[13 - sizeof(GUID)/sizeof(PTR(PVOID))];
+ GUID ActivityId;
+ PTR(PVOID) SubProcessTag;
+ PTR(PVOID) EtwLocalData;
+ PTR(PVOID) EtwTraceData;
+#elif (NTDDI_VERSION >= NTDDI_WS03)
+ PTR(PVOID) Instrumentation[14];
+ PTR(PVOID) SubProcessTag;
+ PTR(PVOID) EtwLocalData;
+#else
+ PTR(PVOID) Instrumentation[16];
+#endif
+ PTR(PVOID) WinSockData;
+ ULONG GdiBatchCount;
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+ BOOLEAN SpareBool0;
+ BOOLEAN SpareBool1;
+ BOOLEAN SpareBool2;
+#else
+ BOOLEAN InDbgPrint;
+ BOOLEAN FreeStackOnTermination;
+ BOOLEAN HasFiberData;
+#endif
+ UCHAR IdealProcessor;
+#if (NTDDI_VERSION >= NTDDI_WS03)
+ ULONG GuaranteedStackBytes;
+#else
+ ULONG Spare3;
+#endif
+ PTR(PVOID) ReservedForPerf;
+ PTR(PVOID) ReservedForOle;
+ ULONG WaitingOnLoaderLock;
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+ PTR(PVOID) SavedPriorityState;
+ PTR(ULONG_PTR) SoftPatchPtr1;
+ PTR(ULONG_PTR) ThreadPoolData;
+#elif (NTDDI_VERSION >= NTDDI_WS03)
+ PTR(ULONG_PTR) SparePointer1;
+ PTR(ULONG_PTR) SoftPatchPtr1;
+ PTR(ULONG_PTR) SoftPatchPtr2;
+#else
+ Wx86ThreadState Wx86Thread;
+#endif
+ PTR(PVOID*) TlsExpansionSlots;
+#if defined(_WIN64) && !defined(EXPLICIT_32BIT)
+ PTR(PVOID) DeallocationBStore;
+ PTR(PVOID) BStoreLimit;
+#endif
+ ULONG ImpersonationLocale;
+ ULONG IsImpersonating;
+ PTR(PVOID) NlsCache;
+ PTR(PVOID) pShimData;
+ ULONG HeapVirtualAffinity;
+ PTR(HANDLE) CurrentTransactionHandle;
+ PTR(PTEB_ACTIVE_FRAME) ActiveFrame;
+#if (NTDDI_VERSION >= NTDDI_WS03)
+ PVOID FlsData;
+#endif
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+ PVOID PreferredLangauges;
+ PVOID UserPrefLanguages;
+ PVOID MergedPrefLanguages;
+ ULONG MuiImpersonation;
+ union
+ {
+ struct
+ {
+ USHORT SpareCrossTebFlags:16;
+ };
+ USHORT CrossTebFlags;
+ };
+ union
+ {
+ struct
+ {
+ USHORT DbgSafeThunkCall:1;
+ USHORT DbgInDebugPrint:1;
+ USHORT DbgHasFiberData:1;
+ USHORT DbgSkipThreadAttach:1;
+ USHORT DbgWerInShipAssertCode:1;
+ USHORT DbgIssuedInitialBp:1;
+ USHORT DbgClonedThread:1;
+ USHORT SpareSameTebBits:9;
+ };
+ USHORT SameTebFlags;
+ };
+ PTR(PVOID) TxnScopeEntercallback;
+ PTR(PVOID) TxnScopeExitCAllback;
+ PTR(PVOID) TxnScopeContext;
+ ULONG LockCount;
+ ULONG ProcessRundown;
+ ULONG64 LastSwitchTime;
+ ULONG64 TotalSwitchOutTime;
+ LARGE_INTEGER WaitReasonBitMap;
+#else
+ BOOLEAN SafeThunkCall;
+ BOOLEAN BooleanSpare[3];
+#endif
+} STRUCT(TEB), *STRUCT(PTEB);
+
+#if defined(_WIN64) && !defined(EXPLICIT_32BIT)
+C_ASSERT(FIELD_OFFSET(STRUCT(TEB), EnvironmentPointer) == 0x038);
+C_ASSERT(FIELD_OFFSET(STRUCT(TEB), ExceptionCode) == 0x2C0);
+C_ASSERT(FIELD_OFFSET(STRUCT(TEB), GdiTebBatch) == 0x2F0);
+C_ASSERT(FIELD_OFFSET(STRUCT(TEB), LastStatusValue) == 0x1250);
+C_ASSERT(FIELD_OFFSET(STRUCT(TEB), Vdm) == 0x1690);
+C_ASSERT(FIELD_OFFSET(STRUCT(TEB), HardErrorMode) == 0x16B0);
+C_ASSERT(FIELD_OFFSET(STRUCT(TEB), GdiBatchCount) == 0x1740);
+C_ASSERT(FIELD_OFFSET(STRUCT(TEB), IdealProcessor) == 0x1747);
+C_ASSERT(FIELD_OFFSET(STRUCT(TEB), WaitingOnLoaderLock) == 0x1760);
+C_ASSERT(FIELD_OFFSET(STRUCT(TEB), TlsExpansionSlots) == 0x1780);
+C_ASSERT(FIELD_OFFSET(STRUCT(TEB), WaitingOnLoaderLock) == 0x1760);
+C_ASSERT(FIELD_OFFSET(STRUCT(TEB), ActiveFrame) == 0x17C0);
+#else
+C_ASSERT(FIELD_OFFSET(STRUCT(TEB), EnvironmentPointer) == 0x01C);
+C_ASSERT(FIELD_OFFSET(STRUCT(TEB), ExceptionCode) == 0x1A4);
+C_ASSERT(FIELD_OFFSET(STRUCT(TEB), GdiTebBatch) == 0x1D4);
+C_ASSERT(FIELD_OFFSET(STRUCT(TEB), LastStatusValue) == 0xBF4);
+C_ASSERT(FIELD_OFFSET(STRUCT(TEB), Vdm) == 0xF18);
+C_ASSERT(FIELD_OFFSET(STRUCT(TEB), GdiBatchCount) == 0xF70);
+C_ASSERT(FIELD_OFFSET(STRUCT(TEB), TlsExpansionSlots) == 0xF94);
+C_ASSERT(FIELD_OFFSET(STRUCT(TEB), ActiveFrame) == 0xFB0);
+#endif
+
+#undef PTR
+#undef STRUCT
+#undef PASTE
+#undef PASTE2
+#undef GDI_HANDLE_BUFFER_SIZE
#include <ldrtypes.h>
#include <mmtypes.h>
#include <obtypes.h>
+#include <rtltypes.h>
#ifndef NTOS_MODE_USER
#include <extypes.h>
#include <setypes.h>
HANDLE Mutant;
} INITIAL_PEB, *PINITIAL_PEB;
-//
-// Process Environment Block (PEB)
-//
-typedef struct _PEB
-{
- BOOLEAN InheritedAddressSpace;
- BOOLEAN ReadImageFileExecOptions;
- BOOLEAN BeingDebugged;
-#if (NTDDI_VERSION >= NTDDI_WS03)
- struct
- {
- BOOLEAN ImageUsesLargePages:1;
- #if (NTDDI_VERSION >= NTDDI_LONGHORN)
- BOOLEAN IsProtectedProcess:1;
- BOOLEAN IsLegacyProcess:1;
- BOOLEAN SpareBits:5;
- #else
- BOOLEAN SpareBits:7;
- #endif
- };
-#else
- BOOLEAN SpareBool;
-#endif
- HANDLE Mutant;
- PVOID ImageBaseAddress;
- PPEB_LDR_DATA Ldr;
- struct _RTL_USER_PROCESS_PARAMETERS *ProcessParameters;
- PVOID SubSystemData;
- PVOID ProcessHeap;
-#if (NTDDI_VERSION >= NTDDI_LONGHORN)
- struct _RTL_CRITICAL_SECTION *FastPebLock;
- PVOID AltThunkSListPtr;
- PVOID IFEOKey;
- ULONG Spare;
- union
- {
- PVOID* KernelCallbackTable;
- PVOID UserSharedInfoPtr;
- };
- ULONG SystemReserved[1];
- ULONG SpareUlong;
-#else
- PVOID FastPebLock;
- PPEBLOCKROUTINE FastPebLockRoutine;
- PPEBLOCKROUTINE FastPebUnlockRoutine;
- ULONG EnvironmentUpdateCount;
- PVOID* KernelCallbackTable;
- PVOID EventLogSection;
- PVOID EventLog;
-#endif
- PPEB_FREE_BLOCK FreeList;
- ULONG TlsExpansionCounter;
- PVOID TlsBitmap;
- ULONG TlsBitmapBits[0x2];
- PVOID ReadOnlySharedMemoryBase;
- PVOID ReadOnlySharedMemoryHeap;
- PVOID* ReadOnlyStaticServerData;
- PVOID AnsiCodePageData;
- PVOID OemCodePageData;
- PVOID UnicodeCaseTableData;
- ULONG NumberOfProcessors;
- ULONG NtGlobalFlag;
- LARGE_INTEGER CriticalSectionTimeout;
- ULONG HeapSegmentReserve;
- ULONG HeapSegmentCommit;
- ULONG HeapDeCommitTotalFreeThreshold;
- ULONG HeapDeCommitFreeBlockThreshold;
- ULONG NumberOfHeaps;
- ULONG MaximumNumberOfHeaps;
- PVOID* ProcessHeaps;
- PVOID GdiSharedHandleTable;
- PVOID ProcessStarterHelper;
- ULONG GdiDCAttributeList;
-#if (NTDDI_VERSION >= NTDDI_LONGHORN)
- struct _RTL_CRITICAL_SECTION *LoaderLock;
-#else
- PVOID LoaderLock;
-#endif
- ULONG OSMajorVersion;
- ULONG OSMinorVersion;
- USHORT OSBuildNumber;
- USHORT OSCSDVersion;
- ULONG OSPlatformId;
- ULONG ImageSubSystem;
- ULONG ImageSubSystemMajorVersion;
- ULONG ImageSubSystemMinorVersion;
- ULONG ImageProcessAffinityMask;
- ULONG GdiHandleBuffer[0x22];
- PPOST_PROCESS_INIT_ROUTINE PostProcessInitRoutine;
- struct _RTL_BITMAP *TlsExpansionBitmap;
- ULONG TlsExpansionBitmapBits[0x20];
- ULONG SessionId;
-#if (NTDDI_VERSION >= NTDDI_WINXP)
- ULARGE_INTEGER AppCompatFlags;
- ULARGE_INTEGER AppCompatFlagsUser;
- PVOID pShimData;
- PVOID AppCompatInfo;
- UNICODE_STRING CSDVersion;
- struct _ACTIVATION_CONTEXT_DATA *ActivationContextData;
- struct _ASSEMBLY_STORAGE_MAP *ProcessAssemblyStorageMap;
- struct _ACTIVATION_CONTEXT_DATA *SystemDefaultActivationContextData;
- struct _ASSEMBLY_STORAGE_MAP *SystemAssemblyStorageMap;
- ULONG MinimumStackCommit;
-#endif
-#if (NTDDI_VERSION >= NTDDI_WS03)
- PVOID *FlsCallback;
- LIST_ENTRY FlsListHead;
- struct _RTL_BITMAP *FlsBitmap;
- ULONG FlsBitmapBits[4];
- ULONG FlsHighIndex;
-#endif
-#if (NTDDI_VERSION >= NTDDI_LONGHORN)
- PVOID WerRegistrationData;
- PVOID WerShipAssertPtr;
-#endif
-} PEB, *PPEB;
-
-//
-// GDI Batch Descriptor
-//
-typedef struct _GDI_TEB_BATCH
-{
- ULONG Offset;
- HANDLE HDC;
- ULONG Buffer[0x136];
-} GDI_TEB_BATCH, *PGDI_TEB_BATCH;
-
//
// Initial TEB
//
PTEB_ACTIVE_FRAME_CONTEXT Context;
} TEB_ACTIVE_FRAME, *PTEB_ACTIVE_FRAME;
+typedef struct _CLIENT_ID32
+{
+ ULONG UniqueProcess;
+ ULONG UniqueThread;
+} CLIENT_ID32, *PCLIENT_ID32;
+
+typedef struct _CLIENT_ID64
+{
+ ULONG64 UniqueProcess;
+ ULONG64 UniqueThread;
+} CLIENT_ID64, *PCLIENT_ID64;
+
+#if (NTDDI_VERSION < NTDDI_WS03)
+typedef struct _Wx86ThreadState
+{
+ PULONG CallBx86Eip;
+ PVOID DeallocationCpu;
+ BOOLEAN UseKnownWx86Dll;
+ CHAR OleStubInvoked;
+} Wx86ThreadState, *PWx86ThreadState;
+#endif
+
+
//
+// Process Environment Block (PEB)
// Thread Environment Block (TEB)
//
-typedef struct _TEB
-{
- NT_TIB Tib;
- PVOID EnvironmentPointer;
- CLIENT_ID ClientId;
- PVOID ActiveRpcHandle;
- PVOID ThreadLocalStoragePointer;
- struct _PEB *ProcessEnvironmentBlock;
- ULONG LastErrorValue;
- ULONG CountOfOwnedCriticalSections;
- PVOID CsrClientThread;
- struct _W32THREAD* Win32ThreadInfo;
- ULONG User32Reserved[0x1A];
- ULONG UserReserved[5];
- PVOID WOW32Reserved;
- LCID CurrentLocale;
- ULONG FpSoftwareStatusRegister;
- PVOID SystemReserved1[0x36];
- LONG ExceptionCode;
- struct _ACTIVATION_CONTEXT_STACK *ActivationContextStackPointer;
-#ifdef _WIN64
- UCHAR SpareBytes1[24];
-#else
- UCHAR SpareBytes1[0x24];
-#endif
- ULONG TxFsContext;
- GDI_TEB_BATCH GdiTebBatch;
- CLIENT_ID RealClientId;
- PVOID GdiCachedProcessHandle;
- ULONG GdiClientPID;
- ULONG GdiClientTID;
- PVOID GdiThreadLocalInfo;
- SIZE_T Win32ClientInfo[62];
- PVOID glDispatchTable[0xE9];
- SIZE_T glReserved1[0x1D];
- PVOID glReserved2;
- PVOID glSectionInfo;
- PVOID glSection;
- PVOID glTable;
- PVOID glCurrentRC;
- PVOID glContext;
- NTSTATUS LastStatusValue;
- UNICODE_STRING StaticUnicodeString;
- WCHAR StaticUnicodeBuffer[0x105];
- PVOID DeallocationStack;
- PVOID TlsSlots[0x40];
- LIST_ENTRY TlsLinks;
- PVOID Vdm;
- PVOID ReservedForNtRpc;
- PVOID DbgSsReserved[0x2];
- ULONG HardErrorDisabled;
+#include "peb_teb.h"
+
#ifdef _WIN64
- PVOID Instrumentation[11];
-#else
- PVOID Instrumentation[9];
-#endif
- GUID ActivityId;
- PVOID SubProcessTag;
- PVOID EtwTraceData;
-#if (NTDDI_VERSION >= NTDDI_LONGHORN)
- PVOID EtwLocalData;
-#endif
- PVOID WinSockData;
- ULONG GdiBatchCount;
-#if (NTDDI_VERSION >= NTDDI_LONGHORN)
- BOOLEAN SpareBool0;
- BOOLEAN SpareBool1;
- BOOLEAN SpareBool2;
-#else
- BOOLEAN InDbgPrint;
- BOOLEAN FreeStackOnTermination;
- BOOLEAN HasFiberData;
-#endif
- UCHAR IdealProcessor;
- ULONG GuaranteedStackBytes;
- PVOID ReservedForPerf;
- PVOID ReservedForOle;
- ULONG WaitingOnLoaderLock;
-#if (NTDDI_VERSION >= NTDDI_LONGHORN)
- PVOID SavedPriorityState;
-#else
- ULONG SparePointer1;
-#endif
- ULONG SoftPatchPtr1;
- ULONG SoftPatchPtr2;
- PVOID *TlsExpansionSlots;
- ULONG ImpersonationLocale;
- ULONG IsImpersonating;
- PVOID NlsCache;
- PVOID pShimData;
- ULONG HeapVirualAffinity;
- PVOID CurrentTransactionHandle;
- PTEB_ACTIVE_FRAME ActiveFrame;
-#if (NTDDI_VERSION >= NTDDI_WS03)
- PVOID FlsData;
-#endif
-#if (NTDDI_VERSION >= NTDDI_LONGHORN)
- PVOID PreferredLangauges;
- PVOID UserPrefLanguages;
- PVOID MergedPrefLanguages;
- ULONG MuiImpersonation;
- union
- {
- struct
- {
- USHORT SpareCrossTebFlags:16;
- };
- USHORT CrossTebFlags;
- };
- union
- {
- struct
- {
- USHORT DbgSafeThunkCall:1;
- USHORT DbgInDebugPrint:1;
- USHORT DbgHasFiberData:1;
- USHORT DbgSkipThreadAttach:1;
- USHORT DbgWerInShipAssertCode:1;
- USHORT DbgIssuedInitialBp:1;
- USHORT DbgClonedThread:1;
- USHORT SpareSameTebBits:9;
- };
- USHORT SameTebFlags;
- };
- PVOID TxnScopeEntercallback;
- PVOID TxnScopeExitCAllback;
- PVOID TxnScopeContext;
- ULONG LockCount;
- ULONG ProcessRundown;
- ULONGLONG LastSwitchTime;
- ULONGLONG TotalSwitchOutTime;
- LARGE_INTEGER WaitReasonBitMap;
-#else
- UCHAR SafeThunkCall;
- UCHAR BooleanSpare[3];
+//
+// Explicit 32 bit PEB/TEB
+//
+#define EXPLICIT_32BIT
+#include "peb_teb.h"
+#undef EXPLICIT_32BIT
+
+//
+// Explicit 64 bit PEB/TEB
+//
+#define EXPLICIT_64BIT
+#include "peb_teb.h"
+#undef EXPLICIT_64BIT
#endif
-} TEB, *PTEB;
#ifdef NTOS_MODE_USER
HARDWARE_PTE PageDirectoryPte;
ULONGLONG Filler;
};
- ULONG Session;
+ PVOID Session;
CHAR ImageFileName[16];
LIST_ENTRY JobLinks;
PVOID LockedPagesList;
#include <umtypes.h>
#include <ntnls.h>
#include <rtltypes.h>
+#include <pstypes.h>
#include <extypes.h>
#include "in6addr.h"
#include "inaddr.h"
// Dependencies
//
#include <umtypes.h>
-#include <pstypes.h>
+#include <mmtypes.h>
+#include <ldrtypes.h>
//
// Maximum Atom Length
} RTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED,
*PRTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED;
+#if (NTDDI_VERSION >= NTDDI_WS03)
typedef struct _ACTIVATION_CONTEXT_STACK
{
PRTL_ACTIVATION_CONTEXT_STACK_FRAME ActiveFrame;
ULONG StackId;
} ACTIVATION_CONTEXT_STACK,
*PACTIVATION_CONTEXT_STACK;
+#else
+typedef struct _ACTIVATION_CONTEXT_STACK
+{
+ ULONG Flags;
+ ULONG NextCookieSequenceNumber;
+ PVOID ActiveFrame;
+ LIST_ENTRY FrameListCache;
+} ACTIVATION_CONTEXT_STACK, *PACTIVATION_CONTEXT_STACK;
+#endif
#endif
CONST CHAR *Buffer;
} CSTRING, *PCSTRING;
+#endif
+
typedef struct _STRING32 {
USHORT Length;
USHORT MaximumLength;
UNICODE_STRING64, *PUNICODE_STRING64,
ANSI_STRING64, *PANSI_STRING64;
-#endif
typedef struct _OBJECT_ATTRIBUTES
{
BOOL WINAPI mciGetErrorStringA(MCIERROR,LPSTR,UINT);
BOOL WINAPI mciGetErrorStringW(MCIERROR,LPWSTR,UINT);
BOOL WINAPI mciSetYieldProc(MCIDEVICEID,YIELDPROC,DWORD);
-HTASK WINAPI mciGetCreatorTask(MCIDEVICEID);
+HANDLE WINAPI mciGetCreatorTask(MCIDEVICEID);
YIELDPROC WINAPI mciGetYieldProc(MCIDEVICEID,PDWORD);
#ifdef _WINE
--- /dev/null
+#ifndef __STRSAFE_H_
+#define __STRSAFE_H_
+
+#include <stdlib.h>
+#include <stdarg.h>
+
+#if defined(STRSAFE_NO_CCH_FUNCTIONS) && defined(STRSAFE_NO_CB_FUNCTIONS)
+#error Both STRSAFE_NO_CCH_FUNCTIONS and STRSAFE_NO_CB_FUNCTIONS are defined
+#endif
+
+#ifndef SUCCEEDED
+#define SUCCEEDED(Status) ((HRESULT)(Status) >= 0)
+#endif
+#define STRSAFE_MAX_CCH 2147483647
+#define STRSAFE_E_INVALID_PARAMETER ((HRESULT)0x80070057L)
+#define STRSAFE_E_INSUFFICIENT_BUFFER ((HRESULT)0x8007007AL)
+#define STRSAFE_E_END_OF_FILE ((HRESULT)0x80070026L)
+
+#define STRSAFE_FILL_BEHIND_NULL 0x00000200
+#define STRSAFE_IGNORE_NULLS 0x00000200
+#define STRSAFE_FILL_ON_FAILURE 0x00000400
+#define STRSAFE_NULL_ON_FAILURE 0x00000800
+#define STRSAFE_NO_TRUNCATION 0x00001000
+
+#ifndef S_OK
+#define S_OK ((HRESULT)0x00000000L)
+#endif
+
+#define STRSAFE_MIN(a,b) (((a) < (b))?(a):(b))
+
+#ifndef _HRESULT_DEFINED
+#define _HRESULT_DEFINED
+typedef long HRESULT;
+#endif
+
+typedef char * STRSAFE_LPSTR;
+typedef const char * STRSAFE_LPCSTR;
+typedef wchar_t * STRSAFE_LPWSTR;
+typedef const wchar_t * STRSAFE_LPCWSTR;
+typedef unsigned long STRSAFE_DWORD;
+
+#define STRSAFE_PASS2
+
+/* Implement Cb functions for ansi and unicode */
+#ifndef STRSAFE_NO_CB_FUNCTIONS
+#define STRSAFE_CB
+#define STRSAFE_UNICODE 0
+# include <strsafe.h>
+#undef STRSAFE_UNICODE
+#define STRSAFE_UNICODE 1
+# include <strsafe.h>
+#undef STRSAFE_UNICODE
+#undef STRSAFE_CB
+#endif // !STRSAFE_NO_CB_FUNCTIONS
+
+/* Implement Cch functions for ansi and unicode */
+#ifndef STRSAFE_NO_CCH_FUNCTIONS
+#define STRSAFE_UNICODE 0
+# include <strsafe.h>
+#undef STRSAFE_UNICODE
+#define STRSAFE_UNICODE 1
+# include <strsafe.h>
+#undef STRSAFE_UNICODE
+#endif // !STRSAFE_NO_CCH_FUNCTIONS
+
+#undef STRSAFE_PASS2
+
+/* Now define the functions depending on UNICODE */
+#if defined(UNICODE)
+# define STRSAFE_UNICODE 1
+#else
+# define STRSAFE_UNICODE 0
+#endif
+#include <strsafe.h>
+#undef STRSAFE_UNICODE
+
+#endif // !__STRSAFE_H_
+
+/*****************************************************************************/
+
+#if defined(STRSAFE_UNICODE)
+#if (STRSAFE_UNICODE == 1)
+
+#define STRSAFE_LPTSTR STRSAFE_LPWSTR
+#define STRSAFE_LPCTSTR STRSAFE_LPCWSTR
+#define STRSAFE_TCHAR wchar_t
+
+#define StringCbCat StringCbCatW
+#define StringCbCatEx StringCbCatExW
+#define StringCbCatN StringCbCatNW
+#define StringCbCatNEx StringCbCatNExW
+#define StringCbCatWorker StringCxxCatWorkerW
+#define StringCbCopy StringCbCopyW
+#define StringCbCopyEx StringCbCopyExW
+#define StringCbCopyN StringCbCopyNW
+#define StringCbCopyNEx StringCbCopyNExW
+#define StringCbGets StringCbGetsW
+#define StringCbGetsEx StringCbGetsExW
+#define StringCbLength StringCbLengthW
+#define StringCbPrintf StringCbPrintfW
+#define StringCbPrintfEx StringCbPrintfExW
+#define StringCbVPrintf StringCbVPrintfW
+#define StringCbVPrintfEx StringCbVPrintfExW
+#define StringCchCat StringCchCatW
+#define StringCchCatEx StringCchCatExW
+#define StringCchCatN StringCchCatNW
+#define StringCchCatNEx StringCchCatNExW
+#define StringCchCatWorker StringCchCatWorkerW
+#define StringCchCopy StringCchCopyW
+#define StringCchCopyEx StringCchCopyExW
+#define StringCchCopyN StringCchCopyNW
+#define StringCchCopyNEx StringCchCopyNExW
+#define StringCchGets StringCchGetsW
+#define StringCchGetsEx StringCchGetsExW
+#define StringCchLength StringCchLengthW
+#define StringCchPrintf StringCchPrintfW
+#define StringCchPrintfEx StringCchPrintfExW
+#define StringCchVPrintf StringCchVPrintfW
+#define StringCchVPrintfEx StringCchVPrintfExW
+
+#else // (STRSAFE_UNICODE != 1)
+
+#define STRSAFE_LPTSTR STRSAFE_LPSTR
+#define STRSAFE_LPCTSTR STRSAFE_LPCSTR
+#define STRSAFE_TCHAR char
+
+#define StringCbCat StringCbCatA
+#define StringCbCatEx StringCbCatExA
+#define StringCbCatN StringCbCatNA
+#define StringCbCatNEx StringCbCatNExA
+#define StringCbCatWorker StringCxxCatWorkerA
+#define StringCbCopy StringCbCopyA
+#define StringCbCopyEx StringCbCopyExA
+#define StringCbCopyN StringCbCopyNA
+#define StringCbCopyNEx StringCbCopyNExA
+#define StringCbGets StringCbGetsA
+#define StringCbGetsEx StringCbGetsExA
+#define StringCbLength StringCbLengthA
+#define StringCbPrintf StringCbPrintfA
+#define StringCbPrintfEx StringCbPrintfExA
+#define StringCbVPrintf StringCbVPrintfA
+#define StringCbVPrintfEx StringCbVPrintfExA
+#define StringCchCat StringCchCatA
+#define StringCchCatEx StringCchCatExA
+#define StringCchCatN StringCchCatNA
+#define StringCchCatNEx StringCchCatNExA
+#define StringCchCatWorker StringCchCatWorkerA
+#define StringCchCopy StringCchCopyA
+#define StringCchCopyEx StringCchCopyExA
+#define StringCchCopyN StringCchCopyNA
+#define StringCchCopyNEx StringCchCopyNExA
+#define StringCchGets StringCchGetsA
+#define StringCchGetsEx StringCchGetsExA
+#define StringCchLength StringCchLengthA
+#define StringCchPrintf StringCchPrintfA
+#define StringCchPrintfEx StringCchPrintfExA
+#define StringCchVPrintf StringCchVPrintfA
+#define StringCchVPrintfEx StringCchVPrintfExA
+
+#endif // (STRSAFE_UNICODE != 1)
+#endif // defined(STRSAFE_UNICODE)
+
+/*****************************************************************************/
+
+#if defined (STRSAFE_PASS2)
+
+#if defined(STRSAFE_CB)
+
+#define STRSAFE_CXXtoCB(x) (x)
+#define STRSAFE_CBtoCXX(x) (x)
+#define STRSAFE_CXXtoCCH(x) (x)*sizeof(STRSAFE_TCHAR)
+#define STRSAFE_CCHtoCXX(x) (x)/sizeof(STRSAFE_TCHAR)
+#define StringCxxCat StringCbCat
+#define StringCxxCatEx StringCbCatEx
+#define StringCxxCatN StringCbCatN
+#define StringCxxCatNEx StringCbCatNEx
+#define StringCxxCatWorker StringCbCatWorker
+#define StringCxxCopy StringCbCopy
+#define StringCxxCopyEx StringCbCopyEx
+#define StringCxxCopyN StringCbCopyN
+#define StringCxxCopyNEx StringCbCopyNEx
+#define StringCxxGets StringCbGets
+#define StringCxxGetsEx StringCbGetsEx
+#define StringCxxLength StringCbLength
+#define StringCxxPrintf StringCbPrintf
+#define StringCxxPrintfEx StringCbPrintfEx
+#define StringCxxVPrintf StringCbVPrintf
+#define StringCxxVPrintfEx StringCbVPrintfEx
+
+#else // !STRSAFE_CB
+
+#define STRSAFE_CXXtoCB(x) (x)/sizeof(STRSAFE_TCHAR)
+#define STRSAFE_CBtoCXX(x) (x)*sizeof(STRSAFE_TCHAR)
+#define STRSAFE_CXXtoCCH(x) (x)
+#define STRSAFE_CCHtoCXX(x) (x)
+#define StringCxxCat StringCchCat
+#define StringCxxCatEx StringCchCatEx
+#define StringCxxCatN StringCchCatN
+#define StringCxxCatNEx StringCchCatNEx
+#define StringCxxCatWorker StringCchCatWorker
+#define StringCxxCopy StringCchCopy
+#define StringCxxCopyEx StringCchCopyEx
+#define StringCxxCopyN StringCchCopyN
+#define StringCxxCopyNEx StringCchCopyNEx
+#define StringCxxGets StringCchGets
+#define StringCxxGetsEx StringCchGetsEx
+#define StringCxxLength StringCchLength
+#define StringCxxPrintf StringCchPrintf
+#define StringCxxPrintfEx StringCchPrintfEx
+#define StringCxxVPrintf StringCchVPrintf
+#define StringCxxVPrintfEx StringCchVPrintfEx
+
+#endif // !STRSAFE_CB
+
+#ifdef STRSAFE_LIB
+
+/* Normal function prototypes only */
+#define STRSAFEAPI HRESULT __stdcall
+
+STRSAFEAPI StringCxxCat(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPCTSTR pszSrc);
+STRSAFEAPI StringCxxCatEx(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPCTSTR pszSrc, STRSAFE_LPTSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags);
+STRSAFEAPI StringCxxCatN(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPCTSTR pszSrc, size_t cbMaxAppend);
+STRSAFEAPI StringCxxCatNEx(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPCTSTR pszSrc, size_t cbMaxAppend, STRSAFE_LPTSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags);
+STRSAFEAPI StringCxxCopy(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPCTSTR pszSrc);
+STRSAFEAPI StringCxxCopyEx(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPCTSTR pszSrc, STRSAFE_LPTSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags);
+STRSAFEAPI StringCxxCopyN(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPCTSTR pszSrc, size_t cbSrc);
+STRSAFEAPI StringCxxCopyNEx(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPCTSTR pszSrc, size_t cbSrc, STRSAFE_LPTSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags);
+STRSAFEAPI StringCxxGets(STRSAFE_LPTSTR pszDest, size_t cxDest);
+STRSAFEAPI StringCxxGetsEx(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPTSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags);
+STRSAFEAPI StringCxxLength(STRSAFE_LPCTSTR psz, size_t cxMax, size_t *pcb);
+STRSAFEAPI StringCxxPrintf(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPCTSTR pszFormat, ...);
+STRSAFEAPI StringCxxPrintfEx(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPTSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags, STRSAFE_LPCTSTR pszFormat, ...);
+STRSAFEAPI StringCxxVPrintf(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPCTSTR pszFormat, va_list args);
+STRSAFEAPI StringCxxVPrintfEx(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPTSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags, LPCTSTR pszFormat, va_list args);
+
+#else // !STRSAFE_LIB
+
+/* Create inlined versions */
+#define STRSAFEAPI HRESULT static __inline__
+
+STRSAFEAPI StringCxxCatWorker(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPCTSTR pszSrc, size_t cxMaxAppend, STRSAFE_LPTSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags, int UseN)
+{
+ HRESULT result;
+ STRSAFE_LPTSTR psz = pszDest;
+ size_t cch = STRSAFE_CXXtoCCH(cxDest);
+
+ if (!pszDest || !pszSrc || cch > STRSAFE_MAX_CCH || cch == 0)
+ {
+ return STRSAFE_E_INVALID_PARAMETER;
+ }
+
+ for (--psz; *(++psz) != 0 && --cch > 0;);
+ if (cch == 0)
+ {
+ return STRSAFE_E_INSUFFICIENT_BUFFER;
+ }
+
+ if (UseN)
+ {
+ cch = STRSAFE_MIN(cxDest, STRSAFE_CXXtoCCH(cxMaxAppend));
+ }
+
+ for (--pszSrc, --psz; (*(++psz) = *(++pszSrc)) != 0 && --cch > 0;);
+ if (cch == 0)
+ {
+ result = STRSAFE_E_INSUFFICIENT_BUFFER;
+ }
+ else
+ result = S_OK;
+
+ if (ppszDestEnd)
+ {
+ *ppszDestEnd = psz;
+ }
+
+ if (pcbRemaining)
+ {
+ *pcbRemaining = STRSAFE_CCHtoCXX(cch);
+ }
+
+ if (dwFlags & STRSAFE_FILL_BEHIND_NULL)
+ {
+ for (--psz, ++cch; --cch; *(++psz) = dwFlags & 0xff);
+ }
+
+ if (!SUCCEEDED(result))
+ {
+ if (dwFlags & STRSAFE_FILL_ON_FAILURE)
+ {
+ cch = STRSAFE_CXXtoCCH(cxDest);
+ for (--pszDest, ++cch; --cch; *(++pszDest) = dwFlags & 0xff);
+ }
+
+ if (dwFlags & STRSAFE_NULL_ON_FAILURE)
+ {
+ *pszDest = 0;
+ }
+ }
+
+ return result;
+}
+
+STRSAFEAPI StringCxxCatEx(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPCTSTR pszSrc, STRSAFE_LPTSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags)
+{
+ return StringCxxCatWorker(pszDest, cxDest, pszSrc, 0, ppszDestEnd, pcbRemaining, dwFlags, 0);
+}
+
+STRSAFEAPI StringCxxCat(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPCTSTR pszSrc)
+{
+ return StringCxxCatWorker(pszDest, cxDest, pszSrc, 0, NULL, NULL, 0, 0);
+}
+
+STRSAFEAPI StringCxxCatN(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPCTSTR pszSrc, size_t cbMaxAppend)
+{
+ return StringCxxCatWorker(pszDest, cxDest, pszSrc, cbMaxAppend, NULL, NULL, 0, 1);
+}
+
+STRSAFEAPI StringCxxCatNEx(STRSAFE_LPTSTR pszDest, size_t cxDest, STRSAFE_LPCTSTR pszSrc, size_t cbMaxAppend, STRSAFE_LPTSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags)
+{
+ return StringCxxCatWorker(pszDest, cxDest, pszSrc, cbMaxAppend, ppszDestEnd, pcbRemaining, dwFlags, 1);
+}
+
+STRSAFEAPI StringCxxCopy(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPCTSTR pszSrc)
+{
+ return 0; // FIXME
+}
+
+STRSAFEAPI StringCxxCopyEx(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPCTSTR pszSrc, STRSAFE_LPTSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags)
+{
+ return 0; // FIXME
+}
+
+STRSAFEAPI StringCxxCopyN(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPCTSTR pszSrc, size_t cbSrc)
+{
+ return 0; // FIXME
+}
+
+STRSAFEAPI StringCxxCopyNEx(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPCTSTR pszSrc, size_t cbSrc, STRSAFE_LPTSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags)
+{
+ return 0; // FIXME
+}
+
+STRSAFEAPI StringCxxGets(STRSAFE_LPTSTR pszDest, size_t cbDest)
+{
+ return 0; // FIXME
+}
+
+STRSAFEAPI StringCxxGetsEx(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPTSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags)
+{
+ return 0; // FIXME
+}
+
+STRSAFEAPI StringCxxLength(STRSAFE_LPCTSTR psz, size_t cxMax, size_t *pcx)
+{
+ size_t cch = STRSAFE_CXXtoCCH(cxMax);
+
+ /* Default return on error */
+ if (pcx)
+ *pcx = 0;
+
+ if (!psz || cch > STRSAFE_MAX_CCH || cch == 0)
+ {
+ return STRSAFE_E_INVALID_PARAMETER;
+ }
+
+ for (--psz; *(++psz) != 0 && --cch > 0;);
+
+ if (cch == 0)
+ {
+ return STRSAFE_E_INVALID_PARAMETER;
+ }
+
+ if (pcx)
+ *pcx = cxMax - STRSAFE_CCHtoCXX(cch);
+
+ return S_OK;
+}
+
+STRSAFEAPI StringCxxVPrintf(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPCTSTR pszFormat, va_list args)
+{
+ return 0; // FIXME
+}
+
+STRSAFEAPI StringCxxVPrintfEx(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPTSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags, STRSAFE_LPCTSTR pszFormat, va_list args)
+{
+ return 0; // FIXME
+}
+
+STRSAFEAPI StringCxxPrintf(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPCTSTR pszFormat, ...)
+{
+ HRESULT result;
+ va_list args;
+ va_start(args, pszFormat);
+ result = StringCxxVPrintf(pszDest, cbDest, pszFormat, args);
+ va_end(args);
+ return result;
+}
+
+STRSAFEAPI StringCxxPrintfEx(STRSAFE_LPTSTR pszDest, size_t cbDest, STRSAFE_LPTSTR *ppszDestEnd, size_t *pcbRemaining, STRSAFE_DWORD dwFlags, STRSAFE_LPCTSTR pszFormat, ...)
+{
+ HRESULT result;
+ va_list args;
+ va_start(args, pszFormat);
+ result = StringCxxVPrintfEx(pszDest, cbDest, ppszDestEnd, pcbRemaining, dwFlags, pszFormat, args);
+ va_end(args);
+ return result;
+}
+
+#endif // !STRSAFE_LIB
+
+/* Functions are implemented or defined, clear #defines for next pass */
+#undef StringCxxCat
+#undef StringCxxCatEx
+#undef StringCxxCatN
+#undef StringCxxCatNEx
+#undef StringCxxCatWorker
+#undef StringCxxCopy
+#undef StringCxxCopyEx
+#undef StringCxxCopyN
+#undef StringCxxCopyNEx
+#undef StringCxxGets
+#undef StringCxxGetsEx
+#undef StringCxxLength
+#undef StringCxxPrintf
+#undef StringCxxPrintfEx
+#undef StringCxxVPrintf
+#undef StringCxxVPrintfEx
+
+#undef StringCbCat
+#undef StringCbCatEx
+#undef StringCbCatN
+#undef StringCbCatNEx
+#undef StringCbCatWorker
+#undef StringCbCopy
+#undef StringCbCopyEx
+#undef StringCbCopyN
+#undef StringCbCopyNEx
+#undef StringCbGets
+#undef StringCbGetsEx
+#undef StringCbLength
+#undef StringCbPrintf
+#undef StringCbPrintfEx
+#undef StringCbVPrintf
+#undef StringCbVPrintfEx
+#undef StringCchCat
+#undef StringCchCatEx
+#undef StringCchCatN
+#undef StringCchCatNEx
+#undef StringCchCatWorker
+#undef StringCchCopy
+#undef StringCchCopyEx
+#undef StringCchCopyN
+#undef StringCchCopyNEx
+#undef StringCchGets
+#undef StringCchGetsEx
+#undef StringCchLength
+#undef StringCchPrintf
+#undef StringCchPrintfEx
+#undef StringCchVPrintf
+#undef StringCchVPrintfEx
+
+#undef STRSAFE_LPTSTR
+#undef STRSAFE_LPCTSTR
+#undef STRSAFE_TCHAR
+
+#undef STRSAFE_CXXtoCB
+#undef STRSAFE_CBtoCXX
+#undef STRSAFE_CXXtoCCH
+#undef STRSAFE_CCHtoCXX
+
+#endif // defined (STRSAFE_PASS2)
+
typedef int HFILE;
typedef HICON HCURSOR;
typedef DWORD COLORREF;
+typedef DWORD* LPCOLORREF;
#ifdef _WIN64
typedef INT_PTR (FAR WINAPI *FARPROC)();
typedef INT_PTR (NEAR WINAPI *NEARPROC)();
#ifndef _WINNT_H
#define _WINNT_H
+#ifndef _M_AMD64
#if !defined(__ROS_LONG64__)
#ifdef __WINESRC__
#define __ROS_LONG64__
#endif
#endif
+#endif
#ifdef __GNUC__
#include <msvctarget.h>
#undef UNALIGNED
#define UNALIGNED __unaligned
#else
+#undef UNALIGNED
#define UNALIGNED
#endif
BOOLEAN WINAPI RtlIsValidHandle(const RTL_HANDLE_TABLE *, const RTL_HANDLE *);
BOOLEAN WINAPI RtlIsValidIndexHandle(const RTL_HANDLE_TABLE *, ULONG Index, RTL_HANDLE **);
+#ifdef _M_AMD64
+#define RtlLargeIntegerAdd(x1, x2) ((x1)+(x2))
+#define RtlLargeIntegerArithmeticShift(x, s) ((x) >> (s))
+//#define RtlLargeIntegerDivide(a,b,c,d)
+#define RtlLargeIntegerNegate(x) (-(x))
+#define RtlLargeIntegerShiftLeft(x, s) ((x)<<(s))
+#define RtlLargeIntegerShiftRight(x, s) ((x)>>(s))
+#define RtlLargeIntegerSubtract(x1, x2) ((x1)-(x2))
+#else
LONGLONG WINAPI RtlLargeIntegerAdd(LONGLONG,LONGLONG);
LONGLONG WINAPI RtlLargeIntegerArithmeticShift(LONGLONG,INT);
ULONGLONG WINAPI RtlLargeIntegerDivide( ULONGLONG,ULONGLONG,ULONGLONG *);
LONGLONG WINAPI RtlLargeIntegerShiftLeft(LONGLONG,INT);
LONGLONG WINAPI RtlLargeIntegerShiftRight(LONGLONG,INT);
LONGLONG WINAPI RtlLargeIntegerSubtract(LONGLONG,LONGLONG);
+#endif
NTSTATUS WINAPI RtlLargeIntegerToChar(const ULONGLONG *,ULONG,ULONG,PCHAR);
NTSTATUS WINAPI RtlLeaveCriticalSection(RTL_CRITICAL_SECTION *);
DWORD WINAPI RtlLengthRequiredSid(DWORD);
int iVertSpacing;
int iTitleWrap;
LOGFONTA lfFont;
-} ICONMETRICSA,*LPICONMETRICSA;
+} ICONMETRICSA, *PICONMETRICSA, *LPICONMETRICSA;
typedef struct tagICONMETRICSW {
UINT cbSize;
int iVertSpacing;
int iTitleWrap;
LOGFONTW lfFont;
-} ICONMETRICSW,*LPICONMETRICSW;
+} ICONMETRICSW, *PICONMETRICSW, *LPICONMETRICSW;
#ifdef UNICODE
typedef ICONMETRICSW ICONMETRICS,*LPICONMETRICS;
#define wsprintf wsprintfW
#define wvsprintf wvsprintfW
-#ifndef NOGDI
+#if defined(_WINGDI_) && !defined(NOGDI)
#define ChangeDisplaySettings ChangeDisplaySettingsW
#define ChangeDisplaySettingsEx ChangeDisplaySettingsExW
#define CreateDesktop CreateDesktopW
#define EnumDisplaySettings EnumDisplaySettingsW
#define EnumDisplaySettingsEx EnumDisplaySettingsExW
#define EnumDisplayDevices EnumDisplayDevicesW
-#endif /* NOGDI */
+#endif /* _WINGDI_ && !NOGDI */
#else /* UNICODE */
#define EDITWORDBREAKPROC EDITWORDBREAKPROCA
#define PROPENUMPROC PROPENUMPROCA
ULONG VirtualBias;
} I386_LOADER_BLOCK, *PI386_LOADER_BLOCK;
+typedef struct _AMD64_LOADER_BLOCK
+{
+ PVOID DbgPrint;
+} AMD64_LOADER_BLOCK, *PAMD64_LOADER_BLOCK;
+
typedef struct _PPC_LOADER_BLOCK
{
PVOID BootInfo;
union
{
I386_LOADER_BLOCK I386;
+ AMD64_LOADER_BLOCK Amd64;
ALPHA_LOADER_BLOCK Alpha;
IA64_LOADER_BLOCK IA64;
PPC_LOADER_BLOCK PowerPC;
--- /dev/null
+#ifndef _HELPER_H
+#define _HELPER_H
+
+#ifndef ROUND_UP
+#define ROUND_UP(n, align) \
+ ROUND_DOWN(((ULONG)n) + (align) - 1, (align))
+#endif
+
+#ifndef ROUND_DOWN
+#define ROUND_DOWN(n, align) \
+ (((ULONG)n) & ~((align) - 1l))
+#endif
+
+#ifndef ROUNDUP
+#define ROUNDUP ROUND_UP
+#endif
+
+#ifndef ROUNDDOWN
+#define ROUNDDOWN ROUND_DOWN
+#endif
+
+#ifndef PAGE_ROUND_DOWN
+#define PAGE_ROUND_DOWN(x) (((ULONG_PTR)(x))&(~(PAGE_SIZE-1)))
+#endif
+
+#ifndef PAGE_ROUND_UP
+#define PAGE_ROUND_UP(x) ( (((ULONG_PTR)(x)) + PAGE_SIZE-1) & (~(PAGE_SIZE-1)) )
+#endif
+
+/* iterate through the list using a list entry.
+ * elem is set to NULL if the list is run thru without breaking out or if list is empty.
+ */
+#define LIST_FOR_EACH(elem, list, type, field) \
+ for ((elem) = CONTAINING_RECORD((list)->Flink, type, field); \
+ &(elem)->field != (list) || (elem == NULL); \
+ (elem) = CONTAINING_RECORD((elem)->field.Flink, type, field))
+
+/* iterate through the list using a list entry, with safety against removal
+ * elem is set to NULL if the list is run thru without breaking out or if list is empty.
+ */
+#define LIST_FOR_EACH_SAFE(cursor, cursor2, list, type, field) \
+ for ((cursor) = CONTAINING_RECORD((list)->Flink, type, field), \
+ (cursor2) = CONTAINING_RECORD((cursor)->field.Flink, type, field); \
+ &(cursor)->field != (list) || (cursor == NULL); \
+ (cursor) = (cursor2), \
+ (cursor2) = CONTAINING_RECORD((cursor)->field.Flink, type, field))
+
+#define OPTHDROFFSET(a) ((LPVOID)((BYTE *)a + \
+ ((PIMAGE_DOS_HEADER)a)->e_lfanew + \
+ sizeof (IMAGE_NT_SIGNATURE) + \
+ sizeof (IMAGE_FILE_HEADER)))
+#ifndef TAG
+#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
+#endif
+#define RVA(m, b) ((PVOID)((ULONG_PTR)(b) + (ULONG_PTR)(m)))
+#define NTSTAT_SEVERITY_SHIFT 30
+#define NTSTAT_SEVERITY_MASK 0x00000003
+#define NTSTAT_FACILITY_SHIFT 16
+#define NTSTAT_FACILITY_MASK 0x00000FFF
+#define NTSTAT_CUSTOMER_MASK 0x20000000
+#define NT_SEVERITY(StatCode) (((StatCode) >> NTSTAT_SEVERITY_SHIFT) & NTSTAT_SEVERITY_MASK)
+#define NT_FACILITY(StatCode) (((StatCode) >> NTSTAT_FACILITY_SHIFT) & NTSTAT_FACILITY_MASK)
+#define NT_CUSTOMER(StatCode) ((StatCode) & NTSTAT_CUSTOMER_MASK)
+#define RELATIVE_TIME(wait) (-(wait))
+#define NANOS_TO_100NS(nanos) (((LONGLONG)(nanos)) / 100)
+#define MICROS_TO_100NS(micros) (((LONGLONG)(micros)) * NANOS_TO_100NS(1000))
+#define MILLIS_TO_100NS(milli) (((LONGLONG)(milli)) * MICROS_TO_100NS(1000))
+#define SECONDS_TO_100NS(seconds) (((LONGLONG)(seconds)) * MILLIS_TO_100NS(1000))
+#define MINUTES_TO_100NS(minutes) (((LONGLONG)(minutes)) * SECONDS_TO_100NS(60))
+#define HOURS_TO_100NS(hours) (((LONGLONG)(hours)) * MINUTES_TO_100NS(60))
+#define UNICODIZE1(x) L##x
+#define UNICODIZE(x) UNICODIZE1(x)
+#define InsertAscendingListFIFO(ListHead, NewEntry, Type, ListEntryField, SortField)\
+{\
+ PLIST_ENTRY current;\
+\
+ current = (ListHead)->Flink;\
+ while (current != (ListHead))\
+ {\
+ if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >\
+ (NewEntry)->SortField)\
+ {\
+ break;\
+ }\
+ current = current->Flink;\
+ }\
+\
+ InsertTailList(current, &((NewEntry)->ListEntryField));\
+}
+
+#define InsertDescendingListFIFO(ListHead, NewEntry, Type, ListEntryField, SortField)\
+{\
+ PLIST_ENTRY current;\
+\
+ current = (ListHead)->Flink;\
+ while (current != (ListHead))\
+ {\
+ if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <\
+ (NewEntry)->SortField)\
+ {\
+ break;\
+ }\
+ current = current->Flink;\
+ }\
+\
+ InsertTailList(current, &((NewEntry)->ListEntryField));\
+}
+
+#define InsertAscendingList(ListHead, NewEntry, Type, ListEntryField, SortField)\
+{\
+ PLIST_ENTRY current;\
+\
+ current = (ListHead)->Flink;\
+ while (current != (ListHead))\
+ {\
+ if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >=\
+ (NewEntry)->SortField)\
+ {\
+ break;\
+ }\
+ current = current->Flink;\
+ }\
+\
+ InsertTailList(current, &((NewEntry)->ListEntryField));\
+}
+
+#define InsertDescendingList(ListHead, NewEntry, Type, ListEntryField, SortField)\
+{\
+ PLIST_ENTRY current;\
+\
+ current = (ListHead)->Flink;\
+ while (current != (ListHead))\
+ {\
+ if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <=\
+ (NewEntry)->SortField)\
+ {\
+ break;\
+ }\
+ current = current->Flink;\
+ }\
+\
+ InsertTailList(current, &((NewEntry)->ListEntryField));\
+}
+
+#endif
STMT_; \
}
-#ifdef _ARM_
+#if defined(_ARM_) || defined(_M_AMD64)
#define _SEH_TRY \
for(;;) \
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
+#ifdef _M_AMD64
+#include "pseh2_64.h"
+#else
#ifndef KJK_PSEH2_H_
#define KJK_PSEH2_H_
#endif
+#endif
#endif
/* EOF */
--- /dev/null
+#ifndef KJK_PSEH2_H_
+#define KJK_PSEH2_H_
+
+
+#define _SEH2_TRY if(1) {
+#define _SEH2_EXCEPT(...) } if(0) {
+#define _SEH2_END }
+#define _SEH2_YIELD(STMT_) STMT_
+#define _SEH2_LEAVE
+#define _SEH2_FINALLY } if(1) {
+#define _SEH2_GetExceptionInformation() (GetExceptionInformation())
+#define _SEH2_GetExceptionCode() (0)
+#define _SEH2_AbnormalTermination() (0)
+
+struct _EXCEPTION_RECORD;
+struct _EXCEPTION_POINTERS;
+struct _CONTEXT;
+
+typedef int (__cdecl * _SEH2FrameHandler_t)
+(
+ struct _EXCEPTION_RECORD *,
+ void *,
+ struct _CONTEXT *,
+ void *
+);
+
+typedef struct __SEH2Registration
+{
+ struct __SEH2Registration * SER_Prev;
+ _SEH2FrameHandler_t SER_Handler;
+}
+_SEH2Registration_t;
+
+
+#endif
+
+/* EOF */
MMRESULT
MmeCloseDevice(
- IN DWORD PrivateHandle);
+ IN DWORD_PTR PrivateHandle);
MMRESULT
MmeGetPosition(
IN MMDEVICE_TYPE DeviceType,
IN DWORD DeviceId,
- IN DWORD PrivateHandle,
+ IN DWORD_PTR PrivateHandle,
IN MMTIME* Time,
IN DWORD Size);
MMRESULT
MmeSetState(
- IN DWORD PrivateHandle,
+ IN DWORD_PTR PrivateHandle,
IN BOOL bStart);
MMRESULT
MmeResetWavePlayback(
- IN DWORD PrivateHandle);
+ IN DWORD_PTR PrivateHandle);
/*
typedef int (__cdecl *_PIFV)(void);
typedef void (__cdecl *_PVFI)(int);
-#if defined (SPECIAL_CRTEXE) && defined (_DLL)
+#if defined (SPECIAL_CRTEXE) && (defined (_DLL) || defined (__GNUC__))
extern int _commode;
#else
_CRTIMP extern int _commode;
#define _tm_unicode_safe(i) (_pioinfo_safe(i)->unicode)
#ifndef __badioinfo
- extern ioinfo ** _imp____badioinfo[];
-#define __badioinfo (*_imp____badioinfo)
+ extern ioinfo ** __MINGW_IMP_SYMBOL(__badioinfo)[];
+#define __badioinfo (* __MINGW_IMP_SYMBOL(__badioinfo))
#endif
#ifndef __pioinfo
- extern ioinfo ** _imp____pioinfo[];
-#define __pioinfo (*_imp____pioinfo)
+ extern ioinfo ** __MINGW_IMP_SYMBOL(__pioinfo)[];
+#define __pioinfo (* __MINGW_IMP_SYMBOL(__pioinfo))
#endif
#define _NO_CONSOLE_FILENO (intptr_t)-2
extern int _newmode;
#ifndef __winitenv
-extern wchar_t ***_imp____winitenv;
-#define __winitenv (*_imp____winitenv)
+extern wchar_t *** __MINGW_IMP_SYMBOL(__winitenv);
+#define __winitenv (* __MINGW_IMP_SYMBOL(__winitenv))
#endif
#ifndef __initenv
-extern char ***_imp____initenv;
-#define __initenv (*_imp____initenv)
+extern char *** __MINGW_IMP_SYMBOL(__initenv);
+#define __initenv (* __MINGW_IMP_SYMBOL(__initenv))
#endif
#ifndef _acmdln
-extern char **_imp___acmdln;
-#define _acmdln (*_imp___acmdln)
+extern char ** __MINGW_IMP_SYMBOL(_acmdln);
+#define _acmdln (* __MINGW_IMP_SYMBOL(_acmdln))
/* _CRTIMP extern char *_acmdln; */
#endif
#ifndef _wcmdln
-extern char **_imp___wcmdln;
-#define _wcmdln (*_imp___wcmdln)
+extern char ** __MINGW_IMP_SYMBOL(_wcmdln);
+#define _wcmdln (* __MINGW_IMP_SYMBOL(_wcmdln))
/* __CRTIMP extern wchar_t *_wcmdln; */
#endif
#include <errno.h>
void * __cdecl _encode_pointer(void *);
- void * __cdecl _encoded_null(void);
+ void * __cdecl _encoded_null();
void * __cdecl _decode_pointer(void *);
BOOL __cdecl _ValidateImageBase (PBYTE pImageBase);
--- /dev/null
+Index: internal.h
+===================================================================
+--- internal.h (Revision 43956)
++++ internal.h (Arbeitskopie)
+@@ -32,6 +32,12 @@
+ #define __IOINFO_TM_UTF8 1
+ #define __IOINFO_TM_UTF16LE 2
+
++#ifdef _MSC_VER
++#pragma warning(push)
++#pragma warning(disable:4214)
++#pragma warning(disable:4820)
++#endif
++
+ typedef struct {
+ intptr_t osfhnd;
+ char osfile;
+@@ -43,6 +49,10 @@
+ char pipech2[2];
+ } ioinfo;
+
++#ifdef _MSC_VER
++#pragma warning(pop)
++#endif
++
+ #define IOINFO_ARRAY_ELTS (1 << 5)
+
+ #define _pioinfo(i) (__pioinfo[(i) >> 5] + ((i) & (IOINFO_ARRAY_ELTS - 1)))
+Index: oscalls.h
+===================================================================
+--- oscalls.h (Revision 43956)
++++ oscalls.h (Arbeitskopie)
+@@ -30,6 +30,11 @@
+ #endif
+ #endif
+
++#ifdef _MSC_VER
++#pragma warning(push)
++#pragma warning(disable:4214)
++#endif
++
+ typedef struct _FTIME
+ {
+ unsigned short twosecs : 5;
+@@ -46,6 +51,10 @@
+ unsigned short year : 7;
+ } FDATE;
+
++#ifdef _MSC_VER
++#pragma warning(pop)
++#endif
++
+ typedef FDATE *PFDATE;
+
+ #endif
+Index: sect_attribs.h
+===================================================================
+--- sect_attribs.h (Revision 43956)
++++ sect_attribs.h (Arbeitskopie)
+@@ -10,7 +10,7 @@
+ #define _ATTRIBUTES shared
+ #endif
+
+-#if 0
++#if defined(_MSC_VER)
+ /* Reference list of existing section for msvcrt. */
+ #pragma section(".CRTMP$XCA",long,_ATTRIBUTES)
+ #pragma section(".CRTMP$XCZ",long,_ATTRIBUTES)
+@@ -55,6 +55,14 @@
+ #pragma section(".rtc$IZZ",long,read)
+ #pragma section(".rtc$TAA",long,read)
+ #pragma section(".rtc$TZZ",long,read)
++#pragma section(".tls",long,read,write)
++#pragma section(".tls$ZZZ",long,read,write)
+ #endif
+
++#if defined(_MSC_VER)
++#define _CRTALLOC(x) __declspec(allocate(x))
++#elif defined(__GNUC__)
+ #define _CRTALLOC(x) __attribute__ ((section (x) ))
++#else
++#error
++#endif
PPROCESSINFO ppi;
} CLIENTINFO, *PCLIENTINFO;
-/* Make sure it fits exactly into the TEB */
-C_ASSERT(sizeof(CLIENTINFO) == FIELD_OFFSET(TEB, glDispatchTable) - FIELD_OFFSET(TEB, Win32ClientInfo));
+/* Make sure it fits into the TEB */
+C_ASSERT(sizeof(CLIENTINFO) <= sizeof(((PTEB)0)->Win32ClientInfo));
#define GetWin32ClientInfo() ((PCLIENTINFO)(NtCurrentTeb()->Win32ClientInfo))
LPARAM lParam,
BOOL Ansi);
-DWORD
+DWORD_PTR
NTAPI
NtUserCallNoParam(
DWORD Routine);
-DWORD
+DWORD_PTR
NTAPI
NtUserCallOneParam(
- DWORD Param,
+ DWORD_PTR Param,
DWORD Routine);
-DWORD
+DWORD_PTR
NTAPI
NtUserCallTwoParam(
- DWORD Param1,
- DWORD Param2,
+ DWORD_PTR Param1,
+ DWORD_PTR Param2,
DWORD Routine);
BOOL
PUNICODE_STRING ClassName);
#endif
-HANDLE
+DWORD_PTR
NTAPI
NtUserGetClipboardData(
UINT uFormat,
THREADSTATE_GETINPUTSTATE
};
-DWORD
+DWORD_PTR
NTAPI
NtUserGetThreadState(
DWORD Routine);
NTAPI
NtUserTranslateMessage(
LPMSG lpMsg,
- HKL dwhkl );
+ UINT Flags );
BOOL
NTAPI
#define DBGKD_PARTITION_DEFAULT 0x00
#define DBGKD_PARTITION_ALTERNATE 0x01
+//
+// AMD64 Control Space types
+//
+#define AMD64_DEBUG_CONTROL_SPACE_KPCR 0
+#define AMD64_DEBUG_CONTROL_SPACE_KPRCB 1
+#define AMD64_DEBUG_CONTROL_SPACE_KSPECIAL 2
+#define AMD64_DEBUG_CONTROL_SPACE_KTHREAD 3
+
+
//
// KD Packet Structure
//
static inline EXCEPTION_REGISTRATION_RECORD *__wine_push_frame( EXCEPTION_REGISTRATION_RECORD *frame )
{
+#if defined(__i386__)
frame->Prev = (struct _EXCEPTION_REGISTRATION_RECORD *)__readfsdword(0);
__writefsdword(0, (unsigned long)frame);
return frame->Prev;
+#else
+ NT_TIB *teb = (NT_TIB *)NtCurrentTeb();
+ frame->Prev = teb->ExceptionList;
+ teb->ExceptionList = frame;
+ return frame->Prev;
+#endif
}
static inline EXCEPTION_REGISTRATION_RECORD *__wine_pop_frame( EXCEPTION_REGISTRATION_RECORD *frame )
{
+#if defined(__i386__)
__writefsdword(0, (unsigned long)frame->Prev);
return frame->Prev;
+#else
+ NT_TIB *teb = (NT_TIB *)NtCurrentTeb();
+ teb->ExceptionList = frame->Prev;
+ return frame->Prev;
+#endif
}
extern void __wine_enter_vm86( CONTEXT *context );
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
<module name="bzip2" type="kernelmodedll" installbase="system32/drivers" installname="unbzip2.dll">
- <importlibrary definition="unbzip2.def" />
+ <importlibrary definition="unbzip2.spec" />
<define name="BZ_NO_STDIO" />
<define name="BZ_DECOMPRESS_ONLY" />
<library>ntoskrnl</library>
- <library>hal</library>
<file>bzlib.c</file>
<file>randtable.c</file>
<file>crctable.c</file>
#endif
#ifdef _WIN32
-# define WINAPI __stdcall
+# ifndef WINAPI
+# define WINAPI __stdcall
+# endif
# ifdef small
/* windows.h define small to char */
# undef small
+++ /dev/null
-LIBRARY unbzip2.dll
-
-EXPORTS
-BZ2_bzBuffToBuffDecompress@24
--- /dev/null
+ @ stdcall BZ2_bzBuffToBuffDecompress(str ptr str long long long)
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../tools/rbuild/project.dtd">
-<module name="icu4ros" type="staticlibrary">
+<module name="icu4ros" type="staticlibrary" allowwarnings="true">
<define name="U_STATIC_IMPLEMENTATION" />
<define name="U_HAVE_INTTYPES_H" />
<define name="UCONFIG_NO_FILE_IO">1</define>
char *ret;
int idx;
- idx = interlocked_xchg_add( &pos, 1 ) % (sizeof(list)/sizeof(list[0]));
+ idx = InterlockedExchangeAdd( &pos, 1 ) % (sizeof(list)/sizeof(list[0]));
if ((ret = realloc( list[idx], size ))) list[idx] = ret;
return ret;
}
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
+void _fpreset (void);
+
void _fpreset (void)
{
#ifdef __GNUC__
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
-extern void (*_imp___fpreset)(void) ;
+#include <_mingw.h>
+
+extern void (* __MINGW_IMP_SYMBOL(_fpreset))(void);
+void _fpreset (void);
+
void _fpreset (void)
-{ (*_imp___fpreset)(); }
+{
+ (* __MINGW_IMP_SYMBOL(_fpreset))();
+}
#ifdef __GNUC__
void __attribute__ ((alias ("_fpreset"))) fpreset(void);
--- /dev/null
+/*
+ * CRT_glob.c
+ * This file has no copyright is assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within the package.
+ *
+ * Include this object file to set _dowildcard to a state that will turn on
+ * command line globbing by default. (wildcard.o which goes into libmingw32.a
+ * has a default state of off.)
+ *
+ * To use this object include the object file in your link command:
+ * gcc -o foo.exe foo.o CRT_glob.o
+ *
+ */
+
+int _dowildcard = -1;
+
_PVFV *__onexitend;
extern _CRTIMP _onexit_t __dllonexit (_onexit_t, _PVFV**, _PVFV**);
-extern _onexit_t (__cdecl *_imp___onexit) (_onexit_t func);
+extern _onexit_t (__cdecl * __MINGW_IMP_SYMBOL(_onexit)) (_onexit_t func);
/* Choose a different name to prevent name conflicts. The CRT one works fine. */
+_onexit_t __cdecl mingw_onexit(_onexit_t func);
+
_onexit_t __cdecl mingw_onexit(_onexit_t func)
{
_PVFV *onexitbegin;
onexitbegin = (_PVFV *) _decode_pointer (__onexitbegin);
if (onexitbegin == (_PVFV *) -1)
- return (*_imp___onexit) (func);
+ return (* __MINGW_IMP_SYMBOL(_onexit)) (func);
_lock (_EXIT_LOCK1);
onexitbegin = (_PVFV *) _decode_pointer (__onexitbegin);
onexitend = (_PVFV *) _decode_pointer (__onexitend);
--- /dev/null
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+
+#define SPECIAL_CRTEXE
+
+#include <fcntl.h>
+#include <stdlib.h>
#include <windows.h>
-int main (int flags, char **cmdline, char **inst)
+extern HINSTANCE __mingw_winmain_hInstance;
+extern LPSTR __mingw_winmain_lpCmdLine;
+extern DWORD __mingw_winmain_nShowCmd;
+
+/*ARGSUSED*/
+int main (int flags __attribute__ ((__unused__)),
+ char **cmdline __attribute__ ((__unused__)),
+ char **inst __attribute__ ((__unused__)))
{
- return (int) WinMain ((HINSTANCE) inst, NULL, (LPSTR) cmdline,(DWORD) flags);
+ return (int) WinMain (__mingw_winmain_hInstance, NULL,
+ __mingw_winmain_lpCmdLine, __mingw_winmain_nShowCmd);
}
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
-
#include <windows.h>
-extern void __main(void);
-
+/* Do the UNICODE prototyping of WinMain. Be aware that in winbase.h WinMain is a macro
+ defined to wWinMain. */
int WINAPI wWinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPWSTR lpCmdLine,int nShowCmd);
-int wmain (int flags, wchar_t **cmdline, wchar_t **inst)
+extern HINSTANCE __mingw_winmain_hInstance;
+extern LPWSTR __mingw_winmain_lpCmdLine;
+extern DWORD __mingw_winmain_nShowCmd;
+
+int wmain (int, wchar_t **, wchar_t **);
+
+/*ARGSUSED*/
+int wmain (int flags __attribute__ ((__unused__)),
+ wchar_t **cmdline __attribute__ ((__unused__)),
+ wchar_t **inst __attribute__ ((__unused__)))
{
- return (int) wWinMain ((HINSTANCE) inst, NULL, (LPWSTR) cmdline,(DWORD) flags);
+ return (int) wWinMain (__mingw_winmain_hInstance, NULL,
+ __mingw_winmain_lpCmdLine, __mingw_winmain_nShowCmd);
}
--- /dev/null
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+
+#include <windows.h>
+#include <excpt.h>
+#include <string.h>
+#include <stdlib.h>
+#include <malloc.h>
+#include <memory.h>
+#include <signal.h>
+#include <stdio.h>
+
+#if defined (_WIN64) && defined (__ia64__)
+#error FIXME: Unsupported __ImageBase implementation.
+#else
+#define __ImageBase _image_base__
+/* This symbol is defined by the linker. */
+extern IMAGE_DOS_HEADER __ImageBase;
+#endif
+
+#pragma pack(push,1)
+typedef struct _UNWIND_INFO {
+ BYTE VersionAndFlags;
+ BYTE PrologSize;
+ BYTE CountOfUnwindCodes;
+ BYTE FrameRegisterAndOffset;
+ ULONG AddressOfExceptionHandler;
+} UNWIND_INFO,*PUNWIND_INFO;
+#pragma pack(pop)
+
+PIMAGE_SECTION_HEADER _FindPESectionByName (const char *);
+PIMAGE_SECTION_HEADER _FindPESectionExec (size_t);
+PBYTE _GetPEImageBase (void);
+
+int __mingw_init_ehandler (void);
+
+#ifdef _WIN64
+EXCEPTION_DISPOSITION __mingw_SEH_error_handler(struct _EXCEPTION_RECORD *, void *, struct _CONTEXT *, void *);
+
+#define MAX_PDATA_ENTRIES 32
+static RUNTIME_FUNCTION emu_pdata[MAX_PDATA_ENTRIES];
+static UNWIND_INFO emu_xdata[MAX_PDATA_ENTRIES];
+
+int
+__mingw_init_ehandler (void)
+{
+ static int was_here = 0;
+ size_t e = 0;
+ PIMAGE_SECTION_HEADER pSec;
+ PBYTE _ImageBase = _GetPEImageBase ();
+
+ if (was_here || !_ImageBase)
+ return was_here;
+ was_here = 1;
+ if (_FindPESectionByName (".pdata") != NULL)
+ return 1;
+
+ /* Allocate # of e tables and entries. */
+ memset (emu_pdata, 0, sizeof (RUNTIME_FUNCTION) * MAX_PDATA_ENTRIES);
+ memset (emu_xdata, 0, sizeof (UNWIND_INFO) * MAX_PDATA_ENTRIES);
+
+ e = 0;
+ /* Fill tables and entries. */
+ while (e < MAX_PDATA_ENTRIES && (pSec = _FindPESectionExec (e)) != NULL)
+ {
+ emu_xdata[e].VersionAndFlags = 9; /* UNW_FLAG_EHANDLER | UNW_VERSION */
+ emu_xdata[e].AddressOfExceptionHandler =
+ (DWORD)(size_t) ((LPBYTE)__mingw_SEH_error_handler - _ImageBase);
+ emu_pdata[e].BeginAddress = pSec->VirtualAddress;
+ emu_pdata[e].EndAddress = pSec->VirtualAddress + pSec->Misc.VirtualSize;
+ emu_pdata[e].UnwindData =
+ (DWORD)(size_t)((LPBYTE)&emu_xdata[e] - _ImageBase);
+ ++e;
+ }
+#ifdef _DEBUG_CRT
+ if (!e || e > MAX_PDATA_ENTRIES)
+ abort ();
+#endif
+ /* RtlAddFunctionTable. */
+ if (e != 0)
+ RtlAddFunctionTable (emu_pdata, e, (DWORD64)_ImageBase);
+ return 1;
+}
+
+extern void _fpreset (void);
+
+EXCEPTION_DISPOSITION
+__mingw_SEH_error_handler (struct _EXCEPTION_RECORD* ExceptionRecord,
+ void *EstablisherFrame __attribute__ ((unused)),
+ struct _CONTEXT* ContextRecord __attribute__ ((unused)),
+ void *DispatcherContext __attribute__ ((unused)))
+{
+ EXCEPTION_DISPOSITION action = EXCEPTION_CONTINUE_SEARCH;
+ void (*old_handler) (int);
+ int reset_fpu = 0;
+
+ switch (ExceptionRecord->ExceptionCode)
+ {
+ case EXCEPTION_ACCESS_VIOLATION:
+ /* test if the user has set SIGSEGV */
+ old_handler = signal (SIGSEGV, SIG_DFL);
+ if (old_handler == SIG_IGN)
+ {
+ /* this is undefined if the signal was raised by anything other
+ than raise (). */
+ signal (SIGSEGV, SIG_IGN);
+ action = EXCEPTION_CONTINUE_EXECUTION;
+ }
+ else if (old_handler != SIG_DFL)
+ {
+ /* This means 'old' is a user defined function. Call it */
+ (*old_handler) (SIGSEGV);
+ action = EXCEPTION_CONTINUE_EXECUTION;
+ }
+ break;
+ case EXCEPTION_ILLEGAL_INSTRUCTION:
+ case EXCEPTION_PRIV_INSTRUCTION:
+ /* test if the user has set SIGILL */
+ old_handler = signal (SIGILL, SIG_DFL);
+ if (old_handler == SIG_IGN)
+ {
+ /* this is undefined if the signal was raised by anything other
+ than raise (). */
+ signal (SIGILL, SIG_IGN);
+ action = EXCEPTION_CONTINUE_EXECUTION;
+ }
+ else if (old_handler != SIG_DFL)
+ {
+ /* This means 'old' is a user defined function. Call it */
+ (*old_handler) (SIGILL);
+ action = EXCEPTION_CONTINUE_EXECUTION;
+ }
+ break;
+ case EXCEPTION_FLT_INVALID_OPERATION:
+ case EXCEPTION_FLT_DIVIDE_BY_ZERO:
+ case EXCEPTION_FLT_DENORMAL_OPERAND:
+ case EXCEPTION_FLT_OVERFLOW:
+ case EXCEPTION_FLT_UNDERFLOW:
+ case EXCEPTION_FLT_INEXACT_RESULT:
+ reset_fpu = 1;
+ /* fall through. */
+
+ case EXCEPTION_INT_DIVIDE_BY_ZERO:
+ /* test if the user has set SIGFPE */
+ old_handler = signal (SIGFPE, SIG_DFL);
+ if (old_handler == SIG_IGN)
+ {
+ signal (SIGFPE, SIG_IGN);
+ if (reset_fpu)
+ _fpreset ();
+ action = EXCEPTION_CONTINUE_EXECUTION;
+ }
+ else if (old_handler != SIG_DFL)
+ {
+ /* This means 'old' is a user defined function. Call it */
+ (*old_handler) (SIGFPE);
+ action = EXCEPTION_CONTINUE_EXECUTION;
+ }
+ break;
+ case EXCEPTION_DATATYPE_MISALIGNMENT:
+ case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
+ case EXCEPTION_FLT_STACK_CHECK:
+ case EXCEPTION_INT_OVERFLOW:
+ case EXCEPTION_INVALID_HANDLE:
+ /*case EXCEPTION_POSSIBLE_DEADLOCK: */
+ action = EXCEPTION_CONTINUE_EXECUTION;
+ break;
+ default:
+ break;
+ }
+ return action;
+}
+
+#endif
}
if (! nested)
{
- InterlockedExchangePointer ((volatile PVOID *) &__native_startup_lock, 0);
+ (void) InterlockedExchangePointer ((volatile PVOID *) &__native_startup_lock, 0);
}
- if (__dyn_tls_init_callback != NULL &&
- _IsNonwritableInCurrentImage ((PBYTE) &__dyn_tls_init_callback))
+ if (__dyn_tls_init_callback != NULL)
{
__dyn_tls_init_callback (hDllHandle, DLL_THREAD_ATTACH, lpreserved);
}
__onexitbegin = __onexitend = (_PVFV *) NULL;
}
__native_startup_state = __uninitialized;
- InterlockedExchangePointer ((volatile PVOID *) &__native_startup_lock, 0);
+ (void) InterlockedExchangePointer ((volatile PVOID *) &__native_startup_lock, 0);
}
}
return TRUE;
static BOOL __DllMainCRTStartup (HANDLE, DWORD, LPVOID);
+BOOL WINAPI DllMainCRTStartup (HANDLE, DWORD, LPVOID);
+int __mingw_init_ehandler (void);
+
BOOL WINAPI
-DllMainCRTStartup(HANDLE hDllHandle,DWORD dwReason,LPVOID lpreserved)
+DllMainCRTStartup (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
{
mingw_app_type = 0;
if (dwReason == DLL_PROCESS_ATTACH)
{
__security_init_cookie ();
+#ifdef _WIN64
+ __mingw_init_ehandler ();
+#endif
}
return __DllMainCRTStartup (hDllHandle, dwReason, lpreserved);
}
#include <intrin.h>
#ifndef __winitenv
-extern wchar_t ***_imp____winitenv;
-#define __winitenv (*_imp____winitenv)
+extern wchar_t *** __MINGW_IMP_SYMBOL(__winitenv);
+#define __winitenv (* __MINGW_IMP_SYMBOL(__winitenv))
#endif
#ifndef __initenv
-extern char ***_imp____initenv;
-#define __initenv (*_imp____initenv)
+extern char *** __MINGW_IMP_SYMBOL(__initenv);
+#define __initenv (* __MINGW_IMP_SYMBOL(__initenv))
#endif
/* Hack, for bug in ld. Will be removed soon. */
__declspec(dllimport) void __setusermatherr(int (__cdecl *)(struct _exception *));
-extern int *_imp___fmode;
-extern int *_imp___commode;
+extern int * __MINGW_IMP_SYMBOL(_fmode);
+extern int * __MINGW_IMP_SYMBOL(_commode);
#undef _fmode
extern int _fmode;
-extern int *_imp___commode;
-#define _commode (*_imp___commode)
+extern int * __MINGW_IMP_SYMBOL(_commode);
+#define _commode (* __MINGW_IMP_SYMBOL(_commode))
extern int _dowildcard;
#if defined(__GNUC__)
extern int mingw_app_type;
+HINSTANCE __mingw_winmain_hInstance;
+_TCHAR *__mingw_winmain_lpCmdLine;
+DWORD __mingw_winmain_nShowCmd;
+
static int argc;
#ifdef WPRFLAG
extern void __main(void);
static int managedapp;
static int has_cctor = 0;
static _startupinfo startinfo;
+static LPTOP_LEVEL_EXCEPTION_FILTER __mingw_oldexcpt_handler = NULL;
extern void _pei386_runtime_relocator (void);
static long CALLBACK _gnu_exception_handler (EXCEPTION_POINTERS * exception_data);
-//static LONG __mingw_vex(EXCEPTION_POINTERS * exception_data);
#ifdef WPRFLAG
static void duplicate_ppstrings (int ac, wchar_t ***av);
#else
static int __cdecl pre_c_init (void);
static void __cdecl pre_cpp_init (void);
-
+static void __cdecl __mingw_prepare_except_for_msvcr80_and_higher (void);
_CRTALLOC(".CRT$XIAA") _PIFV mingw_pcinit = pre_c_init;
_CRTALLOC(".CRT$XCAA") _PVFV mingw_pcppinit = pre_cpp_init;
__set_app_type (_CONSOLE_APP);
__onexitbegin = __onexitend = (_PVFV *) _encode_pointer ((_PVFV *)(-1));
- *_imp___fmode = _fmode;
- *_imp___commode = _commode;
+ * __MINGW_IMP_SYMBOL(_fmode) = _fmode;
+ * __MINGW_IMP_SYMBOL(_commode) = _commode;
#ifdef WPRFLAG
_wsetargv();
static int __tmainCRTStartup (void);
+int WinMainCRTStartup (void);
+
int WinMainCRTStartup (void)
{
mingw_app_type = 1;
return __tmainCRTStartup ();
}
+int mainCRTStartup (void);
+
+#ifdef _WIN64
+int __mingw_init_ehandler (void);
+#endif
+
int mainCRTStartup (void)
{
mingw_app_type = 0;
return __tmainCRTStartup ();
}
-
+static
__declspec(noinline) int
__tmainCRTStartup (void)
{
STARTUPINFO StartupInfo;
BOOL inDoubleQuote = FALSE;
memset (&StartupInfo, 0, sizeof (STARTUPINFO));
-
+
if (mingw_app_type)
GetStartupInfo (&StartupInfo);
{
_ASSERTE(__native_startup_state == __initialized);
if (! nested)
(VOID)InterlockedExchangePointer ((volatile PVOID *) &__native_startup_lock, 0);
-
- if (__dyn_tls_init_callback != NULL && _IsNonwritableInCurrentImage ((PBYTE) &__dyn_tls_init_callback))
+
+ if (__dyn_tls_init_callback != NULL)
__dyn_tls_init_callback (NULL, DLL_THREAD_ATTACH, NULL);
-
+
_pei386_runtime_relocator ();
-
-#if defined(__i386__) || defined(_M_IX86)
- __writefsdword(0, 0xffffffff);
+ __mingw_oldexcpt_handler = SetUnhandledExceptionFilter (_gnu_exception_handler);
+#ifdef _WIN64
+ __mingw_init_ehandler ();
#endif
- //AddVectoredExceptionHandler (0, (PVECTORED_EXCEPTION_HANDLER)__mingw_vex);
- SetUnhandledExceptionFilter (_gnu_exception_handler);
-
+ __mingw_prepare_except_for_msvcr80_and_higher ();
+
_fpreset ();
if (mingw_app_type)
#ifdef _MBCS
if (_ismbblead (*lpszCommandLine))
{
- if (lpszCommandLine)
+ if (*lpszCommandLine)
lpszCommandLine++;
}
#endif
while (*lpszCommandLine && (*lpszCommandLine <= SPACECHAR))
lpszCommandLine++;
-#ifdef WPRFLAG
- /* C++ initialization.
- gcc inserts this call automatically for a function called main, but not for wmain. */
- __main ();
- mainret = wmain (
- (int) (StartupInfo.dwFlags & STARTF_USESHOWWINDOW ? StartupInfo.wShowWindow : SW_SHOWDEFAULT),
- (wchar_t **) lpszCommandLine, (wchar_t **) (HINSTANCE) &__ImageBase);
-#else
- mainret = main (
- (int) (StartupInfo.dwFlags & STARTF_USESHOWWINDOW ? StartupInfo.wShowWindow : SW_SHOWDEFAULT),
- (char **) lpszCommandLine, (char **) (HINSTANCE) &__ImageBase);
-#endif
+ __mingw_winmain_hInstance = (HINSTANCE) &__ImageBase;
+ __mingw_winmain_lpCmdLine = lpszCommandLine;
+ __mingw_winmain_nShowCmd = StartupInfo.dwFlags & STARTF_USESHOWWINDOW ?
+ StartupInfo.wShowWindow : SW_SHOWDEFAULT;
}
- else
- {
duplicate_ppstrings (argc, &argv);
#ifdef WPRFLAG
__winitenv = envp;
__initenv = envp;
mainret = main (argc, argv, envp);
#endif
- }
if (!managedapp)
exit (mainret);
}
static long CALLBACK
-_gnu_exception_handler (EXCEPTION_POINTERS * exception_data)
+_gnu_exception_handler (EXCEPTION_POINTERS *exception_data)
{
void (*old_handler) (int);
long action = EXCEPTION_CONTINUE_SEARCH;
action = EXCEPTION_CONTINUE_EXECUTION;
}
break;
-
+#ifdef _WIN64
+ case EXCEPTION_DATATYPE_MISALIGNMENT:
+ case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
+ case EXCEPTION_FLT_STACK_CHECK:
+ case EXCEPTION_INT_OVERFLOW:
+ case EXCEPTION_INVALID_HANDLE:
+ /*case EXCEPTION_POSSIBLE_DEADLOCK: */
+ action = EXCEPTION_CONTINUE_EXECUTION;
+ break;
+#endif
default:
break;
}
- return action;
-}
-#if 0
-static LONG __mingw_vex(EXCEPTION_POINTERS * exception_data)
-{
- /* TODO this is not chainablem, therefore need rewrite. Disabled the ill code. */
- #if 0
- #ifdef _WIN64
- __asm__ __volatile__ (
- "movq %gs:0,%rax" "\n\t"
- "orq %rax,%rax\n\t"
- "jz l1\n\t"
- "jmp *8(%rax)\n\r"
- "l1:\n\t"
- "nop\n");
-#else
- __asm__ __volatile__ (
- "movl %fs:0,%eax" "\n\t"
- "orl %eax,%eax\n\t"
- "jz l1\n\t"
- "jmp *4(%eax)\n\r"
- "l1:\n\t"
- "nop\n");
-#endif
-#endif
- return _gnu_exception_handler(exception_data);
+ if (action == EXCEPTION_CONTINUE_SEARCH && __mingw_oldexcpt_handler)
+ action = (*__mingw_oldexcpt_handler)(exception_data);
+ return action;
}
-#endif
#ifdef WPRFLAG
-
static size_t wbytelen(const wchar_t *p)
{
size_t ret = 1;
char **avl;
int i;
char **n = (char **) malloc (sizeof (char *) * (ac + 1));
-
+
avl=*av;
for (i=0; i < ac; i++)
{
*av = n;
}
#endif
+
+static void
+__mingw_invalidParameterHandler (const wchar_t *expression __attribute__ ((__unused__)),
+ const wchar_t *function __attribute__ ((__unused__)),
+ const wchar_t *file __attribute__ ((__unused__)),
+ unsigned int line __attribute__ ((__unused__)),
+ uintptr_t pReserved __attribute__ ((__unused__)))
+{
+#ifdef __MINGW_SHOW_INVALID_PARAMETER_EXCEPTION
+ wprintf(L"Invalid parameter detected in function %s. File: %s Line: %d\n", function, file, line);
+ wprintf(L"Expression: %s\n", expression);
+#endif
+}
+
+static void __cdecl
+__mingw_prepare_except_for_msvcr80_and_higher (void)
+{
+ _invalid_parameter_handler (*fIPH)(_invalid_parameter_handler) = NULL;
+ HMODULE hmsv = GetModuleHandleA ("msvcr80.dll");
+ if(!hmsv)
+ hmsv = GetModuleHandleA ("msvcr70.dll");
+ if (!hmsv)
+ hmsv = GetModuleHandleA ("msvcrt.dll");
+ if (!hmsv)
+ hmsv = LoadLibraryA ("msvcrt.dll");
+ if (!hmsv)
+ return;
+ fIPH = (_invalid_parameter_handler (*)(_invalid_parameter_handler))
+ GetProcAddress (hmsv, "_set_invalid_parameter_handler");
+ if (fIPH)
+ (*fIPH)(__mingw_invalidParameterHandler);
+}
--- /dev/null
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+
+#ifdef CRTDLL
+#undef CRTDLL
+#endif
+
+#include <internal.h>
+
+extern int _dowildcard;
+
+#ifdef WPRFLAG
+int __CRTDECL
+__wsetargv (void)
+#else
+int __CRTDECL
+__setargv (void)
+#endif
+{
+ _dowildcard = 1;
+ return 0;
+}
#define _DECL_DLLMAIN
#include <process.h>
-BOOL WINAPI DllEntryPoint(HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
+BOOL WINAPI DllEntryPoint (HANDLE, DWORD, LPVOID);
+
+BOOL WINAPI DllEntryPoint (HANDLE hDllHandle __attribute__ ((__unused__)),
+ DWORD dwReason __attribute__ ((__unused__)),
+ LPVOID lpreserved __attribute__ ((__unused__)))
{
return TRUE;
}
#define _DECL_DLLMAIN
#include <process.h>
-BOOL WINAPI DllMain(HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
+BOOL WINAPI DllMain (HANDLE hDllHandle __attribute__ ((__unused__)),
+ DWORD dwReason __attribute__ ((__unused__)),
+ LPVOID lpreserved __attribute__ ((__unused__)))
{
return TRUE;
}
--- /dev/null
+/*
+ * mthr_stub.c
+ *
+ * Implement Mingw-w64 thread-support.
+ *
+ * This file is used by if gcc is built with --enable-threads=win32.
+ *
+ * Based on version created by Mumit Khan <khan@nanotech.wisc.edu>
+ *
+ */
+
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+#include <windows.h>
+#include <stdlib.h>
+
+BOOL __mingw_TLScallback (HANDLE hDllHandle, DWORD reason, LPVOID reserved);
+int ___w64_mingwthr_remove_key_dtor (DWORD key);
+int ___w64_mingwthr_add_key_dtor (DWORD key, void (*dtor)(void *));
+
+/* To protect the thread/key association data structure modifications. */
+static CRITICAL_SECTION __mingwthr_cs;
+static volatile int __mingwthr_cs_init = 0;
+
+typedef struct __mingwthr_key __mingwthr_key_t;
+
+/* The list of threads active with key/dtor pairs. */
+struct __mingwthr_key {
+ DWORD key;
+ void (*dtor)(void *);
+ __mingwthr_key_t volatile *next;
+};
+
+
+static __mingwthr_key_t volatile *key_dtor_list;
+
+int
+___w64_mingwthr_add_key_dtor (DWORD key, void (*dtor)(void *))
+{
+ __mingwthr_key_t *new_key;
+
+ if (__mingwthr_cs_init == 0)
+ return 0;
+ new_key = (__mingwthr_key_t *)malloc(sizeof (__mingwthr_key_t));
+
+ if (new_key == NULL)
+ return -1;
+
+ memset(new_key, 0,sizeof (__mingwthr_key_t));
+ new_key->key = key;
+ new_key->dtor = dtor;
+
+ EnterCriticalSection (&__mingwthr_cs);
+
+ new_key->next = key_dtor_list;
+ key_dtor_list = new_key;
+
+ LeaveCriticalSection (&__mingwthr_cs);
+ return 0;
+}
+
+int
+___w64_mingwthr_remove_key_dtor (DWORD key)
+{
+ __mingwthr_key_t volatile *prev_key;
+ __mingwthr_key_t volatile *cur_key;
+
+ if (__mingwthr_cs_init == 0)
+ return 0;
+
+ EnterCriticalSection (&__mingwthr_cs);
+
+ prev_key = NULL;
+ cur_key = key_dtor_list;
+
+ while (cur_key != NULL)
+ {
+ if ( cur_key->key == key)
+ {
+ if (prev_key == NULL)
+ key_dtor_list = cur_key->next;
+ else
+ prev_key->next = cur_key->next;
+
+ free ((void*)cur_key);
+ break;
+ }
+ prev_key = cur_key;
+ cur_key = cur_key->next;
+ }
+
+ LeaveCriticalSection (&__mingwthr_cs);
+ return 0;
+}
+
+static void
+__mingwthr_run_key_dtors (void)
+{
+ __mingwthr_key_t volatile *keyp;
+
+ if (__mingwthr_cs_init == 0)
+ return;
+ EnterCriticalSection (&__mingwthr_cs);
+
+ for (keyp = key_dtor_list; keyp; )
+ {
+ LPVOID value = TlsGetValue (keyp->key);
+ if (GetLastError () == ERROR_SUCCESS)
+ {
+ if (value)
+ (*keyp->dtor) (value);
+ }
+ keyp = keyp->next;
+ }
+
+ LeaveCriticalSection (&__mingwthr_cs);
+}
+
+BOOL
+__mingw_TLScallback (HANDLE hDllHandle __attribute__ ((__unused__)),
+ DWORD reason,
+ LPVOID reserved __attribute__ ((__unused__)))
+{
+ switch (reason)
+ {
+ case DLL_PROCESS_ATTACH:
+ if (__mingwthr_cs_init == 0)
+ InitializeCriticalSection (&__mingwthr_cs);
+ __mingwthr_cs_init = 1;
+ break;
+ case DLL_PROCESS_DETACH:
+ __mingwthr_run_key_dtors();
+ if (__mingwthr_cs_init == 1)
+ {
+ __mingwthr_cs_init = 0;
+ DeleteCriticalSection (&__mingwthr_cs);
+ }
+ break;
+ case DLL_THREAD_ATTACH:
+ break;
+ case DLL_THREAD_DETACH:
+ __mingwthr_run_key_dtors();
+ break;
+ }
+ return TRUE;
+}
+
extern func_ptr __DTOR_LIST__[];
static HMODULE hMsvcrt = NULL;
+static int free_Msvcrt = 0;
typedef void __cdecl flongjmp(jmp_buf _Buf,int _Value);
flongjmp *fctMsvcrtLongJmp = NULL;
+void __do_global_dtors (void);
+void __do_global_ctors (void);
+void __main (void);
+
void
__do_global_dtors (void)
{
(*(p)) ();
p++;
}
- if (hMsvcrt)
+ if (free_Msvcrt && hMsvcrt)
{
+ free_Msvcrt = 0;
FreeLibrary (hMsvcrt);
hMsvcrt = NULL;
}
unsigned long i;
if (!hMsvcrt) {
- hMsvcrt = LoadLibrary ("msvcrt.dll");
+ hMsvcrt = GetModuleHandleA ("msvcr80.dll");
+ if (!hMsvcrt)
+ hMsvcrt = GetModuleHandleA ("msvcr70.dll");
+ if (!hMsvcrt)
+ hMsvcrt = GetModuleHandleA ("msvcrt.dll");
+ if (!hMsvcrt) {
+ hMsvcrt = LoadLibraryA ("msvcrt.dll");
+ free_Msvcrt = 1;
+ }
fctMsvcrtLongJmp = (flongjmp *) GetProcAddress( hMsvcrt, "longjmp");
}
DECLSPEC_SELECTANY UINT_PTR __security_cookie = DEFAULT_SECURITY_COOKIE;
DECLSPEC_SELECTANY UINT_PTR __security_cookie_complement = ~(DEFAULT_SECURITY_COOKIE);
+void __cdecl __security_init_cookie (void);
+
void __cdecl
__security_init_cookie (void)
{
__security_cookie_complement = ~cookie;
}
+__declspec(noreturn) void __cdecl __report_gsfailure (ULONGLONG);
+
__declspec(noreturn) void __cdecl
__report_gsfailure (ULONGLONG StackCookie)
{
<group>
<module name="mingw_common" type="staticlibrary" isstartuplib="true" crt="dll">
<define name="_CRTBLD" />
+ <importlibrary definition="moldname-msvcrt.def" dllname="msvcrt.dll" />
<include base="ReactOS">include/reactos/mingw-w64</include>
<library>kernel32</library>
<file>_newmode.c</file>
<file>atonexit.c</file>
+ <file>binmode.c</file>
<file>charmax.c</file>
<file>cinitexe.c</file>
<file>CRT_fp10.c</file>
<file>CRT_fp8.c</file>
+ <file>CRT_glob.c</file>
+ <file>crt_handler.c</file>
<file>dllentry.c</file>
+ <file>dummy_mingwthrd.c</file>
<file>gccmain.c</file>
<file>getopt.c</file>
<file>gs_support.c</file>
<file>merr.c</file>
+ <!-- file>mingw_custom.c</file -->
<file>mingw_helpers.c</file>
+ <file>mingwthrd_nomt.c</file>
<file>natstart.c</file>
<file>pesect.c</file>
<file>pseudo-reloc.c</file>
<file>pseudo-reloc-list.c</file>
<file>tlssup.c</file>
+ <file>txtmode.c</file>
<file>wildcard.c</file>
<file>xncommod.c</file>
<file>xthdloc.c</file>
--- /dev/null
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+
+#include <_mingw.h>
+#include "../revstamp.h"
+
+const char *__mingw_get_crt_info (void)
+{
+ return "MinGW-W64 Runtime " __MINGW64_VERSION_STR " ("
+ __MINGW64_VERSION_STATE " - "
+ "rev. " __MINGW_W64_REV ") " __MINGW_W64_REV_STAMP;
+}
+
--- /dev/null
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+#include <windows.h>
+#include <stdlib.h>
+
+/* We support TLS cleanup code in any case. If shared version of libgcc is used _CRT_MT has value 1, otherwise
+ we do tls cleanup in runtime and _CRT_MT has value 2. */
+int _CRT_MT = 2;
+
+int __mingwthr_key_dtor (DWORD key, void (*dtor)(void *));
+int __mingwthr_remove_key_dtor (DWORD key);
+
+extern int ___w64_mingwthr_remove_key_dtor (DWORD key);
+extern int ___w64_mingwthr_add_key_dtor (DWORD key, void (*dtor)(void *));
+
+int
+__mingwthr_remove_key_dtor (DWORD key)
+{
+ return ___w64_mingwthr_remove_key_dtor (key);
+}
+
+int
+__mingwthr_key_dtor (DWORD key, void (*dtor)(void *))
+{
+ if (dtor)
+ return ___w64_mingwthr_add_key_dtor (key, dtor);
+
+ return 0;
+}
+LIBRARY msvcrt.dll
+
EXPORTS
-access
-chdir
-chmod
-chsize
-close
-creat
-cwait
-daylight DATA
-dup
-dup2
-ecvt
-eof
-execl
-execle
-execlp
-execlpe
-execv
-execve
-execvp
-execvpe
-fcvt
-fdopen
-fgetchar
-fgetwchar
-filelength
-fileno
-; fpreset
-fputchar
-fputwchar
-;fstat
-ftime
-gcvt
-getch
-getche
-getcwd
-getpid
-getw
-heapwalk
-isatty
-itoa
-kbhit
-lfind
-lsearch
-lseek
-ltoa
-memccpy
-memicmp
-mkdir
-mktemp
-open
-pclose
-popen
-putch
-putenv
-putw
-read
-rmdir
-rmtmp
-searchenv
-setmode
-sopen
-spawnl
-spawnle
-spawnlp
-spawnlpe
-spawnv
-spawnve
-spawnvp
-spawnvpe
-;stat
-strcmpi
-strdup
-stricmp
-stricoll
-strlwr
-strnicmp
-strnset
-strrev
-strset
-strupr
-swab
-tell
-tempnam
-timezone DATA
-tzname DATA
-tzset
-umask
-ungetch
-unlink
-utime
-wcsdup
-wcsicmp
-wcsicoll
-wcslwr
-wcsnicmp
-wcsnset
-wcsrev
-wcsset
-wcsupr
-wpopen
-write
+access==_access
+chdir==_chdir
+chmod==_chmod
+chsize==_chsize
+close==_close
+creat==_creat
+cwait==_cwait
+daylight==_daylight
+dup==_dup
+dup2==_dup2
+ecvt==_ecvt
+eof==_eof
+execl==_execl
+execle==_execle
+execlp==_execlp
+execlpe==_execlpe
+execv==_execv
+execve==_execve
+execvp==_execvp
+execvpe==_execvpe
+fcvt==_fcvt
+fdopen==_fdopen
+fgetchar==_fgetchar
+fgetwchar==_fgetwchar
+filelength==_filelength
+fileno==_fileno
+fpreset==_fpreset
+fputchar==_fputchar
+fputwchar==_fputwchar
+fstat==_fstat
+ftime==_ftime
+gcvt==_gcvt
+getch==_getch
+getche==_getche
+getcwd==_getcwd
+getpid==_getpid
+getw==_getw
+heapwalk==_heapwalk
+isatty==_isatty
+itoa==_itoa
+kbhit==_kbhit
+lfind==_lfind
+lsearch==_lsearch
+lseek==_lseek
+ltoa==_ltoa
+memccpy==_memccpy
+memicmp==_memicmp
+mkdir==_mkdir
+mktemp==_mktemp
+open==_open
+pclose==_pclose
+popen==_popen
+putch==_putch
+putenv==_putenv
+putw==_putw
+read==_read
+rmdir==_rmdir
+rmtmp==_rmtmp
+searchenv==_searchenv
+setmode==_setmode
+sopen==_sopen
+spawnl==_spawnl
+spawnle==_spawnle
+spawnlp==_spawnlp
+spawnlpe==_spawnlpe
+spawnv==_spawnv
+spawnve==_spawnve
+spawnvp==_spawnvp
+spawnvpe==_spawnvpe
+stat==_stat
+strcmpi==_strcmpi
+strdup==_strdup
+stricmp==_stricmp
+stricoll==_stricoll
+strlwr==_strlwr
+strnicmp==_strnicmp
+strnset==_strnset
+strrev==_strrev
+strset==_strset
+strupr==_strupr
+swab==_swab
+tell==_tell
+tempnam==_tempnam
+timezone==_timezone
+tzname==_tzname
+tzset==_tzset
+umask==_umask
+ungetch==_ungetch
+unlink==_unlink
+utime==_utime
+wcsdup==_wcsdup
+wcsicmp==_wcsicmp
+wcsicoll==_wcsicoll
+wcslwr==_wcslwr
+wcsnicmp==_wcsnicmp
+wcsnset==_wcsnset
+wcsrev==_wcsrev
+wcsset==_wcsset
+wcsupr==_wcsupr
+wpopen==_wpopen
+write==_write
; non-ANSI functions declared in math.h
-j0
-j1
-jn
-y0
-y1
-yn
-chgsign
-;scalb
-finite
-fpclass
+j0==_j0
+j1==_j1
+jn==_jn
+y0==_y0
+y1==_y1
+yn==_yn
+chgsign==_chgsign
+scalb==_scalb
+finite==_finite
+fpclass==_fpclass
; C99 functions
-cabs
-hypot
-logb
-nextafter
+cabs==_cabs
+hypot==_hypot
+logb==_logb
+nextafter==_nextafter
*/
#include <windows.h>
+#include <string.h>
#if defined (_WIN64) && defined (__ia64__)
#error FIXME: Unsupported __ImageBase implementation.
extern IMAGE_DOS_HEADER __ImageBase;
#endif
+BOOL _ValidateImageBase (PBYTE);
+
BOOL
_ValidateImageBase (PBYTE pImageBase)
{
return TRUE;
}
+PIMAGE_SECTION_HEADER _FindPESection (PBYTE, DWORD_PTR);
+
PIMAGE_SECTION_HEADER
_FindPESection (PBYTE pImageBase, DWORD_PTR rva)
{
return NULL;
}
+PIMAGE_SECTION_HEADER _FindPESectionByName (const char *);
+
+PIMAGE_SECTION_HEADER
+_FindPESectionByName (const char *pName)
+{
+ PBYTE pImageBase;
+ PIMAGE_NT_HEADERS pNTHeader;
+ PIMAGE_SECTION_HEADER pSection;
+ unsigned int iSection;
+
+ /* Long names aren't supported. */
+ if (strlen (pName) > IMAGE_SIZEOF_SHORT_NAME)
+ return NULL;
+
+ pImageBase = (PBYTE) &__ImageBase;
+ if (! _ValidateImageBase (pImageBase))
+ return NULL;
+
+ pNTHeader = (PIMAGE_NT_HEADERS) (pImageBase + ((PIMAGE_DOS_HEADER) pImageBase)->e_lfanew);
+
+ for (iSection = 0, pSection = IMAGE_FIRST_SECTION (pNTHeader);
+ iSection < pNTHeader->FileHeader.NumberOfSections;
+ ++iSection,++pSection)
+ {
+ if (!strncmp ((char *) &pSection->Name[0], pName, IMAGE_SIZEOF_SHORT_NAME))
+ return pSection;
+ }
+ return NULL;
+}
+
+PIMAGE_SECTION_HEADER _FindPESectionExec (size_t);
+
+PIMAGE_SECTION_HEADER
+_FindPESectionExec (size_t eNo)
+{
+ PBYTE pImageBase;
+ PIMAGE_NT_HEADERS pNTHeader;
+ PIMAGE_SECTION_HEADER pSection;
+ unsigned int iSection;
+
+ pImageBase = (PBYTE) &__ImageBase;
+ if (! _ValidateImageBase (pImageBase))
+ return NULL;
+
+ pNTHeader = (PIMAGE_NT_HEADERS) (pImageBase + ((PIMAGE_DOS_HEADER) pImageBase)->e_lfanew);
+
+ for (iSection = 0, pSection = IMAGE_FIRST_SECTION (pNTHeader);
+ iSection < pNTHeader->FileHeader.NumberOfSections;
+ ++iSection,++pSection)
+ {
+ if ((pSection->Characteristics & IMAGE_SCN_MEM_EXECUTE) != 0)
+ {
+ if (!eNo)
+ return pSection;
+ --eNo;
+ }
+ }
+ return NULL;
+}
+
+PBYTE _GetPEImageBase (void);
+
+PBYTE
+_GetPEImageBase (void)
+{
+ PBYTE pImageBase;
+ pImageBase = (PBYTE) &__ImageBase;
+ if (! _ValidateImageBase (pImageBase))
+ return NULL;
+ return pImageBase;
+}
+
+BOOL _IsNonwritableInCurrentImage (PBYTE);
+
BOOL
_IsNonwritableInCurrentImage (PBYTE pTarget)
{
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the w64 mingw-runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
+ *
+ * Contributed by Egor Duda <deo@logos-m.ru>
+ * Modified by addition of runtime_pseudo_reloc version 2
+ * by Kai Tietz <kai.tietz@onevision.com>
*/
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
+#include <assert.h>
extern char __RUNTIME_PSEUDO_RELOC_LIST__;
extern char __RUNTIME_PSEUDO_RELOC_LIST_END__;
} runtime_pseudo_reloc_v2;
static void
-__write_memory (void *addr,const void *src,size_t len)
+__write_memory (void *addr, const void *src, size_t len)
{
MEMORY_BASIC_INFORMATION b;
DWORD oldprot;
if (!len)
return;
- if (!VirtualQuery (addr, &b, sizeof(b)))
- abort ();
- // Protect
+ assert (VirtualQuery (addr, &b, sizeof(b)));
+ /* Temporarily allow write access to read-only protected memory. */
if (b.Protect != PAGE_EXECUTE_READWRITE && b.Protect != PAGE_READWRITE)
VirtualProtect (b.BaseAddress, b.RegionSize, PAGE_EXECUTE_READWRITE,
&oldprot);
#define RP_VERSION_V2 1
static void
-do_pseudo_reloc (void* start,void *end,void *base)
+do_pseudo_reloc (void *start, void *end, void *base)
{
ptrdiff_t addr_imp, reldata;
ptrdiff_t reloc_target = (ptrdiff_t) ((char *)end - (char*)start);
/* Check if this is a known version. */
if (v2_hdr->version != RP_VERSION_V2)
{
+#ifdef DEBUG
fprintf (stderr, "pseudo_relocation protocol version %d is unknown to this runtime.\n",
(int) v2_hdr->version);
+#endif
return;
}
/* Walk over header. */
#endif
default:
reldata=0;
+#ifdef DEBUG
fprintf(stderr, "Unknown pseudo relocation bit size %d\n",(int) (r->flags & 0xff));
+#endif
break;
}
reldata -= ((ptrdiff_t) base + r->sym);
}
}
+void _pei386_runtime_relocator (void);
+
void
-_pei386_runtime_relocator ()
+_pei386_runtime_relocator (void)
{
static int was_init = 0;
if (was_init)
--- /dev/null
+Index: CRT_fp10.c
+===================================================================
+--- CRT_fp10.c (Revision 43956)
++++ CRT_fp10.c (Arbeitskopie)
+@@ -7,6 +7,16 @@
+ void _fpreset (void);
+
+ void _fpreset (void)
+- { __asm__ ("fninit" ) ;}
++{
++#ifdef __GNUC__
++ __asm__ ("fninit" );
++#else
++ __asm fninit;
++#endif
++}
+
++#ifdef __GNUC__
+ void __attribute__ ((alias ("_fpreset"))) fpreset(void);
++#else
++void fpreset(void) { _fpreset(); }
++#endif
+Index: CRT_fp8.c
+===================================================================
+--- CRT_fp8.c (Revision 43956)
++++ CRT_fp8.c (Arbeitskopie)
+@@ -14,4 +14,8 @@
+ (* __MINGW_IMP_SYMBOL(_fpreset))();
+ }
+
++#ifdef __GNUC__
+ void __attribute__ ((alias ("_fpreset"))) fpreset(void);
++#else
++void fpreset(void) { _fpreset(); }
++#endif
+Index: crtexe.c
+===================================================================
+--- crtexe.c (Revision 43956)
++++ crtexe.c (Arbeitskopie)
+@@ -20,6 +20,7 @@
+ #include <tchar.h>
+ #include <sect_attribs.h>
+ #include <locale.h>
++#include <intrin.h>
+
+ #ifndef __winitenv
+ extern wchar_t *** __MINGW_IMP_SYMBOL(__winitenv);
+@@ -51,7 +52,11 @@
+ #define _commode (* __MINGW_IMP_SYMBOL(_commode))
+ extern int _dowildcard;
+
++#if defined(__GNUC__)
+ int _MINGW_INSTALL_DEBUG_MATHERR __attribute__((weak)) = 0;
++#else
++int _MINGW_INSTALL_DEBUG_MATHERR = 0;
++#endif
+ extern int __defaultmatherr;
+ extern _CRTIMP void __cdecl _initterm(_PVFV *, _PVFV *);
+
+Index: gs_support.c
+===================================================================
+--- gs_support.c (Revision 43956)
++++ gs_support.c (Arbeitskopie)
+@@ -112,6 +112,7 @@
+ else
+ #endif
+ {
++#ifdef __GNUC__
+ #ifdef _WIN64
+ GS_ContextRecord.Rip = (ULONGLONG) __builtin_return_address (0);
+ GS_ContextRecord.Rsp = (ULONGLONG) __builtin_frame_address (0) + 8;
+@@ -119,6 +120,15 @@
+ GS_ContextRecord.Eip = (DWORD) __builtin_return_address (0);
+ GS_ContextRecord.Esp = (DWORD) __builtin_frame_address (0) + 4;
+ #endif
++#else
++#ifdef _WIN64
++ GS_ContextRecord.Rip = (ULONGLONG) _ReturnAddress();
++ GS_ContextRecord.Rsp = (ULONGLONG) _AddressOfReturnAddress();
++#else
++ GS_ContextRecord.Eip = (DWORD) _ReturnAddress();
++ GS_ContextRecord.Esp = (DWORD) _AddressOfReturnAddress();
++#endif
++#endif
+ }
+
+ #ifdef _WIN64
#include <malloc.h>
#include <crtdbg.h>
+extern BOOL __mingw_TLScallback (HANDLE hDllHandle, DWORD reason, LPVOID reserved);
+
#define FUNCS_PER_NODE 30
typedef struct TlsDtorNode {
ULONG _tls_index = 0;
-_CRTALLOC(".tls") char _tls_start = 0;
+/* TLS raw template data start and end. */
+_CRTALLOC(".tls$AAA") char _tls_start = 0;
_CRTALLOC(".tls$ZZZ") char _tls_end = 0;
_CRTALLOC(".CRT$XLA") PIMAGE_TLS_CALLBACK __xl_a = 0;
_CRTALLOC(".CRT$XLZ") PIMAGE_TLS_CALLBACK __xl_z = 0;
#ifdef _WIN64
-_CRTALLOC(".rdata$T") const IMAGE_TLS_DIRECTORY64 _tls_used = {
- (ULONGLONG) &_tls_start, (ULONGLONG) &_tls_end, (ULONGLONG) &_tls_index,
+_CRTALLOC(".tls") const IMAGE_TLS_DIRECTORY64 _tls_used = {
+ (ULONGLONG) &_tls_start+1, (ULONGLONG) &_tls_end, (ULONGLONG) &_tls_index,
(ULONGLONG) (&__xl_a+1), (ULONG) 0, (ULONG) 0
};
#else
-_CRTALLOC(".rdata$T") const IMAGE_TLS_DIRECTORY _tls_used = {
- (ULONG)(ULONG_PTR) &_tls_start, (ULONG)(ULONG_PTR) &_tls_end,
+_CRTALLOC(".tls") const IMAGE_TLS_DIRECTORY _tls_used = {
+ (ULONG)(ULONG_PTR) &_tls_start+1, (ULONG)(ULONG_PTR) &_tls_end,
(ULONG)(ULONG_PTR) &_tls_index, (ULONG)(ULONG_PTR) (&__xl_a+1),
(ULONG) 0, (ULONG) 0
};
#ifdef HAVE_ATTRIBUTE_THREAD
#define __CRT_THREAD __declspec(thread)
#else
-#define __CRT_THREAD
+#define __CRT_THREAD __thread
#endif
#endif
+#define DISABLE_MS_TLS 1
+
static _CRTALLOC(".CRT$XDA") _PVFV __xd_a = 0;
static _CRTALLOC(".CRT$XDZ") _PVFV __xd_z = 0;
+
+#if !defined (DISABLE_MS_TLS)
static __CRT_THREAD TlsDtorNode *dtor_list;
static __CRT_THREAD TlsDtorNode dtor_list_head;
+#endif
+
+extern int _CRT_MT;
+
+BOOL WINAPI __dyn_tls_init (HANDLE, DWORD, LPVOID);
BOOL WINAPI
__dyn_tls_init (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
{
_PVFV *pfunc;
+ /* We don't let us trick here. */
+ if (_CRT_MT != 2)
+ _CRT_MT = 2;
+
if (dwReason != DLL_THREAD_ATTACH)
- return TRUE;
+ {
+ if (dwReason == DLL_PROCESS_ATTACH)
+ __mingw_TLScallback (hDllHandle, dwReason, lpreserved);
+ return TRUE;
+ }
for (pfunc = &__xd_a + 1; pfunc != &__xd_z; ++pfunc)
{
if (*pfunc != NULL)
(*pfunc)();
}
-
return TRUE;
}
const PIMAGE_TLS_CALLBACK __dyn_tls_init_callback = (const PIMAGE_TLS_CALLBACK) __dyn_tls_init;
_CRTALLOC(".CRT$XLC") PIMAGE_TLS_CALLBACK __xl_c = (PIMAGE_TLS_CALLBACK) __dyn_tls_init;
+int __cdecl __tlregdtor (_PVFV);
+
int __cdecl
__tlregdtor (_PVFV func)
{
+ if (!func)
+ return 0;
+#if !defined (DISABLE_MS_TLS)
if (dtor_list == NULL)
{
dtor_list = &dtor_list_head;
dtor_list->count = 0;
}
dtor_list->funcs[dtor_list->count++] = func;
+#endif
return 0;
}
static BOOL WINAPI
__dyn_tls_dtor (HANDLE hDllHandle, DWORD dwReason, LPVOID lpreserved)
{
+#if !defined (DISABLE_MS_TLS)
TlsDtorNode *pnode, *pnext;
int i;
+#endif
if (dwReason != DLL_THREAD_DETACH && dwReason != DLL_PROCESS_DETACH)
return TRUE;
-
- for (pnode = dtor_list; pnode != NULL; pnode = pnext)
+ /* As TLS variables are detroyed already by DLL_THREAD_DETACH
+ call, we have to avoid access on the possible DLL_PROCESS_DETACH
+ call the already destroyed TLS vars.
+ TODO: The used local thread based variables have to be handled
+ manually, so that we can control their lifetime here. */
+#if !defined (DISABLE_MS_TLS)
+ if (dwReason != DLL_PROCESS_DETACH)
{
- for (i = pnode->count - 1; i >= 0; --i)
- {
- if (pnode->funcs[i] != NULL)
- (*pnode->funcs[i])();
- }
- pnext = pnode->next;
- if (pnext != NULL)
- free ((void *) pnode);
+ for (pnode = dtor_list; pnode != NULL; pnode = pnext)
+ {
+ for (i = pnode->count - 1; i >= 0; --i)
+ {
+ if (pnode->funcs[i] != NULL)
+ (*pnode->funcs[i])();
+ }
+ pnext = pnode->next;
+ if (pnext != NULL)
+ free ((void *) pnode);
+ }
}
+#endif
+ __mingw_TLScallback (hDllHandle, dwReason, lpreserved);
return TRUE;
}
--- /dev/null
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the w64 mingw-runtime package.
+ * No warranty is given; refer to the file DISCLAIMER within this package.
+ */
+
+#include <fcntl.h>
+
+/* Set default file mode to text */
+
+/* Is this correct? Default value of _fmode in msvcrt.dll is 0. */
+
+int _fmode = _O_TEXT;
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
+/* _dowildcard is an int that controls the globbing of the command line.
+ * If _dowildcard is non-zero, the command line will be globbed: *.*
+ * will be expanded to be all files in the startup directory.
+ * In the mingw-w64 library the _dowildcard variable is defined as being
+ * 0, therefore command line globbing is DISABLED by default. To turn it
+ * on and to leave wildcard command line processing MS's globbing code,
+ * include a line in one of your source modules defining _dowildcard and
+ * setting it to -1, like so:
+ * int _dowildcard = -1;
+ */
+
int _dowildcard = 0;
+
class CComObjectRootBase
{
public:
- long m_dwRef;
+ LONG m_dwRef;
public:
CComObjectRootBase()
{
ULONG InternalAddRef()
{
ATLASSERT(m_dwRef >= 0);
- return ThreadModel::Increment(reinterpret_cast<int *>(&m_dwRef));
+ return ThreadModel::Increment(&m_dwRef);
}
ULONG InternalRelease()
{
ATLASSERT(m_dwRef > 0);
- return ThreadModel::Decrement(reinterpret_cast<int *>(&m_dwRef));
+ return ThreadModel::Decrement(&m_dwRef);
}
void Lock()
}
};
+#elif _AMD64_ //WARNING: NOT VERIFIED
+#pragma pack(push,1)
+struct thunkCode
+{
+ DWORD_PTR m_mov;
+ DWORD_PTR m_this;
+ BYTE m_jmp;
+ DWORD_PTR m_relproc;
+};
+#pragma pack(pop)
+
+class CWndProcThunk
+{
+public:
+ thunkCode m_thunk;
+ _AtlCreateWndData cd;
+public:
+ BOOL Init(WNDPROC proc, void *pThis)
+ {
+ m_thunk.m_mov = 0xffff8000042444C7LL;
+ m_thunk.m_this = (DWORD_PTR)pThis;
+ m_thunk.m_jmp = 0xe9;
+ m_thunk.m_relproc = DWORD_PTR(reinterpret_cast<char *>(proc) - (reinterpret_cast<char *>(this) + sizeof(thunkCode)));
+ return TRUE;
+ }
+
+ WNDPROC GetWNDPROC()
+ {
+ return reinterpret_cast<WNDPROC>(&m_thunk);
+ }
+};
#else
-#error Only X86 supported
+#error ARCH not supported
#endif
class CMessageMap
}
Connection->SignalState = 0;
- }
+ }
/* Things that can happen when we try the initial connection */
if( Connection->SignalState & SEL_CONNECT ) {
Connection = CONTAINING_RECORD( ListEntry, CONNECTION_ENDPOINT,
SignalList );
HandleSignalledConnection( Connection );
+ }
}
-}
PCONNECTION_ENDPOINT TCPAllocateConnectionEndpoint( PVOID ClientContext ) {
PCONNECTION_ENDPOINT Connection =
#ifndef _MACHINE_ANSI_H_
#define _MACHINE_ANSI_H_
+#include <stddef.h>
+
/*
* Types which are fundamental to the implementation and must be declared
* in more than one standard header are defined here. Standard headers
* #undef _BSD_SIZE_T_
* #endif
*/
-#define _BSD_CLOCK_T_ unsigned long /* clock() */
-#define _BSD_PTRDIFF_T_ int /* ptr1 - ptr2 */
+#define _BSD_CLOCK_T_ clock_t /* clock() */
+#define _BSD_PTRDIFF_T_ ptrdiff_t /* ptr1 - ptr2 */
#ifndef _BSD_SIZE_T_
-#define _BSD_SIZE_T_ unsigned int /* sizeof() */
+#define _BSD_SIZE_T_ size_t /* sizeof() */
#endif
-#define _BSD_SSIZE_T_ int /* byte count or error */
-#define _BSD_TIME_T_ long /* time() */
+#define _BSD_SSIZE_T_ ssize_t /* byte count or error */
+#define _BSD_TIME_T_ time_t /* time() */
/*
* Types which are fundamental to the implementation and must be used
* one (perhaps nonstandard) header are defined here. Standard headers
* use _BSD_XXX_T_ without undef'ing it.
*/
-#define _BSD_OFF_T_ long long /* file offset */
-#define _BSD_PID_T_ long /* process [group] */
-#define _BSD_VA_LIST_ char * /* va_list */
+#define _BSD_OFF_T_ off_t /* file offset */
+#define _BSD_PID_T_ pid_t /* process [group] */
+#define _BSD_VA_LIST_ va_list /* va_list */
/*
* Runes (wchar_t) is declared to be an ``int'' instead of the more natural
* and rune_t are typedef'd, _WCHAR_T_ will be undef'd, but _RUNE_T remains
* defined for ctype.h.
*/
-#define _BSD_WCHAR_T_ int /* wchar_t */
-#define _BSD_RUNE_T_ int /* rune_t */
+#define _BSD_WCHAR_T_ wchar_t /* wchar_t */
+#define _BSD_RUNE_T_ rune_t /* rune_t */
/*
* Frequencies of the clock ticks reported by clock() and times(). They
#include <sys/cdefs.h>
#endif
-#ifdef _MSC_VER
static inline unsigned long __byte_swap_long ( unsigned long i )
{
char dst[4];
dst[1] = src[0];
return *(unsigned short*)&dst[0];
}
-#else/*_MSC_VER*/
-#define __word_swap_long(x) \
-({ register u_long __X = (x); \
- __asm ("rorl $16, %1" \
- : "=r" (__X) \
- : "0" (__X)); \
- __X; })
-#if __GNUC__ >= 2
-#define __byte_swap_long(x) \
-__extension__ ({ register u_long __X = (x); \
- __asm ("xchgb %h1, %b1\n\trorl $16, %1\n\txchgb %h1, %b1" \
- : "=q" (__X) \
- : "0" (__X)); \
- __X; })
-#define __byte_swap_word(x) \
-__extension__ ({ register u_short __X = (x); \
- __asm ("xchgb %h1, %b1" \
- : "=q" (__X) \
- : "0" (__X)); \
- __X; })
-#else /* __GNUC__ >= 2 */
-#define __byte_swap_long(x) \
-({ register u_long __X = (x); \
- __asm ("rorw $8, %w1\n\trorl $16, %1\n\trorw $8, %w1" \
- : "=r" (__X) \
- : "0" (__X)); \
- __X; })
-#define __byte_swap_word(x) \
-({ register u_short __X = (x); \
- __asm ("rorw $8, %w1" \
- : "=r" (__X) \
- : "0" (__X)); \
- __X; })
-#endif /* __GNUC__ >= 2 */
-#endif /* _MSC_VER */
/*
* Macros for network/external number representation conversion.
#include <machine/ansi.h>
#include <machine/types.h>
-#ifdef _BSD_CLOCK_T_
-#define _CLOCK_T_DEFINED
-typedef _BSD_CLOCK_T_ clock_t;
-#undef _BSD_CLOCK_T_
-#endif
-
-#ifdef _BSD_SIZE_T_
-#define _SIZE_T_DEFINED
-typedef _BSD_SIZE_T_ size_t;
-#undef _BSD_SIZE_T_
-#endif
-
-#ifdef _BSD_SSIZE_T_
-typedef _BSD_SSIZE_T_ ssize_t;
-#define _SSIZE_T_DEFINED
-#undef _BSD_SSIZE_T_
-#endif
-
-#ifdef _BSD_TIME_T_
-#define _TIME_T_DEFINED
-typedef _BSD_TIME_T_ time_t;
-#undef _BSD_TIME_T_
-#endif
#ifndef _POSIX_SOURCE
#define NBBY 8 /* number of bits in a byte */
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
-<module name="oskittcp" type="staticlibrary">
+<module name="oskittcp" type="staticlibrary" allowwarnings="true">
<define name="__NTDRIVER__"/>
<define name="KERNEL"/>
<include base="oskittcp">include/freebsd</include>
DWORD
APIENTRY
auxMessage(
- DWORD DeviceId,
- DWORD Message,
- DWORD PrivateHandle,
- DWORD Parameter1,
- DWORD Parameter2)
+ UINT DeviceId,
+ UINT Message,
+ DWORD_PTR PrivateHandle,
+ DWORD_PTR Parameter1,
+ DWORD_PTR Parameter2)
{
MMRESULT Result = MMSYSERR_NOTSUPPORTED;
{
Result = MmeGetSoundDeviceCapabilities(AUX_DEVICE_TYPE,
DeviceId,
- (PVOID) Parameter1,
+ (PVOID)Parameter1,
Parameter2);
break;
}
DWORD
APIENTRY
midMessage(
- DWORD DeviceId,
- DWORD Message,
- DWORD PrivateHandle,
- DWORD Parameter1,
- DWORD Parameter2)
+ UINT DeviceId,
+ UINT Message,
+ DWORD_PTR PrivateHandle,
+ DWORD_PTR Parameter1,
+ DWORD_PTR Parameter2)
{
MMRESULT Result = MMSYSERR_NOTSUPPORTED;
{
Result = MmeGetSoundDeviceCapabilities(MIDI_IN_DEVICE_TYPE,
DeviceId,
- (PVOID) Parameter1,
+ (PVOID)Parameter1,
Parameter2);
break;
}
DWORD
APIENTRY
modMessage(
- DWORD DeviceId,
- DWORD Message,
- DWORD PrivateHandle,
- DWORD Parameter1,
- DWORD Parameter2)
+ UINT DeviceId,
+ UINT Message,
+ DWORD_PTR PrivateHandle,
+ DWORD_PTR Parameter1,
+ DWORD_PTR Parameter2)
{
MMRESULT Result = MMSYSERR_NOTSUPPORTED;
{
Result = MmeGetSoundDeviceCapabilities(MIDI_OUT_DEVICE_TYPE,
DeviceId,
- (PVOID) Parameter1,
+ (PVOID)Parameter1,
Parameter2);
break;
}
MMRESULT
MmeGetLineInfo(
IN DWORD Message,
- IN DWORD PrivateHandle,
- IN DWORD Parameter1,
- IN DWORD Parameter2)
+ IN DWORD_PTR PrivateHandle,
+ IN DWORD_PTR Parameter1,
+ IN DWORD_PTR Parameter2)
{
MMRESULT Result;
PSOUND_DEVICE_INSTANCE SoundDeviceInstance;
MMRESULT
MmeCloseMixerDevice(
- IN DWORD PrivateHandle)
+ IN DWORD_PTR PrivateHandle)
{
MMRESULT Result;
PSOUND_DEVICE_INSTANCE SoundDeviceInstance;
}
/* Store the device instance pointer in the private handle - is DWORD safe here? */
- *PrivateHandle = (DWORD) SoundDeviceInstance;
+ *PrivateHandle = (DWORD_PTR) SoundDeviceInstance;
/* Store the additional information we were given - FIXME: Need flags! */
SetSoundDeviceInstanceMmeData(SoundDeviceInstance,
DWORD
APIENTRY
mxdMessage(
- DWORD DeviceId,
- DWORD Message,
- DWORD PrivateHandle,
- DWORD Parameter1,
- DWORD Parameter2)
+ UINT DeviceId,
+ UINT Message,
+ DWORD_PTR PrivateHandle,
+ DWORD_PTR Parameter1,
+ DWORD_PTR Parameter2)
{
MMRESULT Result = MMSYSERR_NOTSUPPORTED;
{
Result = MmeGetSoundDeviceCapabilities(MIXER_DEVICE_TYPE,
DeviceId,
- (PVOID) Parameter1,
+ (PVOID)Parameter1,
Parameter2);
break;
}
MMRESULT
MmeSetState(
- IN DWORD PrivateHandle,
+ IN DWORD_PTR PrivateHandle,
IN BOOL bStart)
{
MMRESULT Result;
return TranslateInternalMmResult(Result);
}
- /* Store the device instance pointer in the private handle - is DWORD safe here? */
- *PrivateHandle = (DWORD) SoundDeviceInstance;
+ /* Store the device instance pointer in the private handle */
+ *PrivateHandle = (DWORD_PTR)SoundDeviceInstance;
/* Store the additional information we were given - FIXME: Need flags! */
SetSoundDeviceInstanceMmeData(SoundDeviceInstance,
MMRESULT
MmeCloseDevice(
- IN DWORD PrivateHandle)
+ IN DWORD_PTR PrivateHandle)
{
MMRESULT Result;
PSOUND_DEVICE_INSTANCE SoundDeviceInstance;
MMRESULT
MmeResetWavePlayback(
- IN DWORD PrivateHandle)
+ IN DWORD_PTR PrivateHandle)
{
PSOUND_DEVICE_INSTANCE SoundDeviceInstance;
MmeGetPosition(
IN MMDEVICE_TYPE DeviceType,
IN DWORD DeviceId,
- IN DWORD PrivateHandle,
+ IN DWORD_PTR PrivateHandle,
IN MMTIME* Time,
IN DWORD Size)
{
/* Safe to do this without thread protection, as we're done with the header */
NotifyMmeClient(SoundDeviceInstance,
DeviceType == WAVE_OUT_DEVICE_TYPE ? WOM_DONE : WIM_DATA,
- (DWORD) Header);
+ (DWORD_PTR)Header);
}
DWORD
APIENTRY
widMessage(
- DWORD DeviceId,
- DWORD Message,
- DWORD PrivateHandle,
- DWORD Parameter1,
- DWORD Parameter2)
+ UINT DeviceId,
+ UINT Message,
+ DWORD_PTR PrivateHandle,
+ DWORD_PTR Parameter1,
+ DWORD_PTR Parameter2)
{
MMRESULT Result = MMSYSERR_NOTSUPPORTED;
Result = MmeGetSoundDeviceCapabilities(WAVE_IN_DEVICE_TYPE,
DeviceId,
- (PVOID) Parameter1,
+ (PVOID)Parameter1,
Parameter2);
break;
}
DWORD
APIENTRY
wodMessage(
- DWORD DeviceId,
- DWORD Message,
- DWORD PrivateHandle,
- DWORD Parameter1,
- DWORD Parameter2)
+ UINT DeviceId,
+ UINT Message,
+ DWORD_PTR PrivateHandle,
+ DWORD_PTR Parameter1,
+ DWORD_PTR Parameter2)
{
MMRESULT Result = MMSYSERR_NOTSUPPORTED;
{
Result = MmeGetSoundDeviceCapabilities(WAVE_OUT_DEVICE_TYPE,
DeviceId,
- (PVOID) Parameter1,
+ (PVOID)Parameter1,
Parameter2);
break;
}
DeviceId,
(LPWAVEOPENDESC) Parameter1,
Parameter2,
- (DWORD*) PrivateHandle);
+ (DWORD*)PrivateHandle);
break;
}
INFSTATUS
InfpGetIntField(PINFCONTEXT Context,
ULONG FieldIndex,
- PLONG IntegerValue)
+ INT* IntegerValue)
{
PINFCACHELINE CacheLine;
PINFCACHEFIELD CacheField;
PULONG RequiredSize);
extern INFSTATUS InfpGetIntField(PINFCONTEXT Context,
ULONG FieldIndex,
- PLONG IntegerValue);
+ INT* IntegerValue);
extern INFSTATUS InfpGetMultiSzField(PINFCONTEXT Context,
ULONG FieldIndex,
PTSTR ReturnBuffer,
PULONG RequiredSize);
extern BOOLEAN InfGetIntField(PINFCONTEXT Context,
ULONG FieldIndex,
- PLONG IntegerValue);
+ PINT IntegerValue);
extern BOOLEAN InfGetMultiSzField(PINFCONTEXT Context,
ULONG FieldIndex,
PWSTR ReturnBuffer,
BOOLEAN
InfGetIntField(PINFCONTEXT Context,
ULONG FieldIndex,
- PLONG IntegerValue)
+ PINT IntegerValue)
{
return INF_SUCCESS(InfpGetIntField(Context, FieldIndex, IntegerValue));
}
#include <unicode/uidna.h>
+C_ASSERT(IDN_ALLOW_UNASSIGNED == UIDNA_ALLOW_UNASSIGNED);
+C_ASSERT(IDN_USE_STD3_ASCII_RULES == UIDNA_USE_STD3_RULES);
+
static
int32_t
IDNA_FlagsToICU
DWORD dwFlags
)
{
- C_ASSERT(IDN_ALLOW_UNASSIGNED == UIDNA_ALLOW_UNASSIGNED);
- C_ASSERT(IDN_USE_STD3_ASCII_RULES == UIDNA_USE_STD3_RULES);
return dwFlags;
}
#include <unicode/usprep.h>
+C_ASSERT(IDN_ALLOW_UNASSIGNED == USPREP_ALLOW_UNASSIGNED);
+
static
int32_t
NAMEPREP_FlagsToICU
DWORD dwFlags
)
{
- C_ASSERT(IDN_ALLOW_UNASSIGNED == USPREP_ALLOW_UNASSIGNED);
return dwFlags;
}
--- /dev/null
+// Copyright (c) 2004/2005 KJK::Hyperion
+
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to dos so, subject to the following conditions:
+
+// The above copyright notice and this permission notice shall be included in all
+// copies or substantial portions of the Software.
+
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+
+.text
+.intel_syntax noprefix
+
+.globl __SEHCleanHandlerEnvironment
+__SEHCleanHandlerEnvironment:
+ cld
+ ret
+
+.globl __SEHCurrentRegistration
+__SEHCurrentRegistration:
+ mov rax, [fs:0]
+ ret
+
+.globl __SEHRegisterFrame
+__SEHRegisterFrame:
+ mov rcx, [rsp+4]
+ mov rax, [fs:0]
+ mov [rcx+0], eax
+ mov [fs:0], ecx
+ ret
+
+.globl __SEHUnregisterFrame
+__SEHUnregisterFrame:
+ mov rcx, [fs:0]
+ mov rcx, [rcx+0]
+ mov [fs:0], rcx
+ ret
+
+.globl __SEHGlobalUnwind
+__SEHGlobalUnwind:
+
+.extern __SEHRtlUnwind
+
+// RtlUnwind clobbers all the "don't clobber" registers, so we save them
+ push rbx
+ mov rbx, [rsp+8]
+ push rsi
+ push rdi
+
+ push 0 // ReturnValue
+ push 0 // ExceptionRecord
+// push .RestoreRegisters // TargetIp
+ push rbx // TargetFrame
+// call [__SEHRtlUnwind]
+
+.RestoreRegisters:
+ pop rdi
+ pop rsi
+ pop rbx
+
+ ret
+
+// EOF
} \
}
-#ifdef _X86_
+#ifdef __i386__
#define _SEH_TRACE_CONTEXT(FRAME_, CONTEXT_) \
{ \
if((FRAME_)->SPF_Tracing & _SEH_DO_TRACE_CONTEXT) \
<file>framebased.S</file>
</directory>
</if>
+ <if property="ARCH" value="amd64">
+ <directory name="amd64">
+ <file>framebased.S</file>
+ </directory>
+ </if>
<file>framebased.c</file>
</module>
#define QUERY_ACTCTX_FLAG_ACTIVE (0x00000001)
#define ACTCTX_FLAGS_ALL (\
- ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID |\
- ACTCTX_FLAG_LANGID_VALID |\
- ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID |\
- ACTCTX_FLAG_RESOURCE_NAME_VALID |\
- ACTCTX_FLAG_SET_PROCESS_DEFAULT |\
- ACTCTX_FLAG_APPLICATION_NAME_VALID |\
- ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF |\
- ACTCTX_FLAG_HMODULE_VALID )
+ ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID |\
+ ACTCTX_FLAG_LANGID_VALID |\
+ ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID |\
+ ACTCTX_FLAG_RESOURCE_NAME_VALID |\
+ ACTCTX_FLAG_SET_PROCESS_DEFAULT |\
+ ACTCTX_FLAG_APPLICATION_NAME_VALID |\
+ ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF |\
+ ACTCTX_FLAG_HMODULE_VALID )
#define ACTCTX_MAGIC 0xC07E3E11
DPRINT( "looking for res %s in module %p %s\n", debugstr_w(resname),
hModule, debugstr_w(nameW.Buffer) );
RtlFreeUnicodeString( &nameW );
- }
+}
else DPRINT( "looking for res %s in module %p %s\n", debugstr_w(resname),
hModule, debugstr_w(filename) );
}
info.Type = (ULONG_PTR)RT_MANIFEST;
info.Language = lang;
if (!((ULONG_PTR)resname >> 16))
- {
+{
info.Name = (ULONG_PTR)resname;
status = LdrFindResource_U(hModule, &info, 3, &entry);
- }
+}
else if (resname[0] == '#')
{
ULONG value;
{
HANDLE module = (HMODULE)((ULONG_PTR)base | 1); /* make it a LOAD_LIBRARY_AS_DATAFILE handle */
status = get_manifest_in_module( acl, ai, filename, directory, shared, module, resname, lang );
- }
+}
else status = STATUS_INVALID_IMAGE_FORMAT;
NtUnmapViewOfSection( NtCurrentProcess(), base );
/* try to load the .manifest file associated to the file */
static NTSTATUS get_manifest_in_associated_manifest( struct actctx_loader* acl, struct assembly_identity* ai,
LPCWSTR filename, LPCWSTR directory, HMODULE module, LPCWSTR resname )
-{
+ {
static const WCHAR fmtW[] = { '.','%','l','u',0 };
WCHAR *buffer;
NTSTATUS status;
if (!RtlDosPathNameToNtPathName_U( name.Buffer, &nameW, NULL, NULL ))
status = STATUS_RESOURCE_DATA_NOT_FOUND;
RtlFreeUnicodeString( &name );
- }
+ }
if (status) return status;
}
else
* appdir\name.manifest
* appdir\name\name.dll
* appdir\name\name.manifest
- */
+ */
strcpyW( buffer, acl->actctx->appdir.info );
p = buffer + strlenW(buffer);
for (i = 0; i < 2; i++)
struct dll_redirect *dll = &assembly->dlls[j];
if (!strncmpiW(section_name->Buffer, dll->name, snlen) && !dll->name[snlen])
return fill_keyed_data(data, dll, assembly, i);
- }
+}
}
return STATUS_SXS_KEY_NOT_FOUND;
}
static NTSTATUS find_string(ACTIVATION_CONTEXT* actctx, ULONG section_kind,
const UNICODE_STRING *section_name,
DWORD flags, PACTCTX_SECTION_KEYED_DATA data)
-{
+ {
NTSTATUS status;
switch (section_kind)
if ((p = strrchrW( dir.Buffer, '\\' ))) p[1] = 0;
actctx->appdir.info = dir.Buffer;
- }
+}
nameW.Buffer = NULL;
if (pActCtx->lpSource)
*cookie = (ULONG_PTR)frame;
DPRINT( "%p cookie=%lx\n", handle, *cookie );
- return STATUS_SUCCESS;
+ return STATUS_SUCCESS;
}
top = frame;
}
- return STATUS_SUCCESS;
+ return STATUS_SUCCESS;
}
VOID
RtlReleaseActivationContext( frame->ActivationContext );
RtlFreeHeap( RtlGetProcessHeap(), 0, frame );
frame = prev;
- }
+}
NtCurrentTeb()->ActivationContextStackPointer->ActiveFrame = NULL;
}
{
*handle = NtCurrentTeb()->ActivationContextStackPointer->ActiveFrame->ActivationContext;
RtlAddRefActivationContext( *handle );
- }
+}
else
*handle = 0;
info->hActCtx = handle;
info->dwFlags = 0; /* FIXME */
if (!(flags & QUERY_ACTCTX_FLAG_NO_ADDREF)) RtlAddRefActivationContext( handle );
- }
+}
break;
case ActivationContextDetailedInformation:
- {
+{
ACTIVATION_CONTEXT_DETAILED_INFORMATION *acdi = buffer;
struct assembly *assembly = NULL;
SIZE_T len, manifest_len = 0, config_len = 0, appdir_len = 0;
if (!(actctx = check_actctx(handle))) return STATUS_INVALID_PARAMETER;
if (actctx->num_assemblies) assembly = actctx->assemblies;
-
+
if (assembly && assembly->manifest.info)
manifest_len = strlenW(assembly->manifest.info) + 1;
if (actctx->config.info) config_len = strlenW(actctx->config.info) + 1;
acdi->ulAppDirPathChars = actctx->appdir.info ? appdir_len - 1 : 0;
ptr = (LPWSTR)(acdi + 1);
if (manifest_len)
- {
+ {
acdi->lpRootManifestPath = ptr;
memcpy(ptr, assembly->manifest.info, manifest_len * sizeof(WCHAR));
ptr += manifest_len;
}
else acdi->lpRootManifestPath = NULL;
if (config_len)
- {
+ {
acdi->lpRootConfigurationPath = ptr;
memcpy(ptr, actctx->config.info, config_len * sizeof(WCHAR));
ptr += config_len;
- }
+ }
else acdi->lpRootConfigurationPath = NULL;
if (appdir_len)
- {
+ {
acdi->lpAppDirPath = ptr;
memcpy(ptr, actctx->appdir.info, appdir_len * sizeof(WCHAR));
- }
- else acdi->lpAppDirPath = NULL;
}
+ else acdi->lpAppDirPath = NULL;
+ }
break;
case AssemblyDetailedInformationInActivationContext:
- {
+ {
ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION *afdi = buffer;
struct assembly *assembly;
WCHAR *assembly_id;
if (retlen) *retlen = len;
if (!buffer || bufsize < len)
- {
+ {
RtlFreeHeap( RtlGetProcessHeap(), 0, assembly_id );
return STATUS_BUFFER_TOO_SMALL;
- }
+ }
afdi->ulFlags = 0; /* FIXME */
afdi->ulEncodedAssemblyIdentityLength = (id_len - 1) * sizeof(WCHAR);
memcpy( ptr, assembly_id, id_len * sizeof(WCHAR) );
ptr += id_len;
if (path_len)
- {
+ {
afdi->lpAssemblyManifestPath = ptr;
memcpy(ptr, assembly->manifest.info, path_len * sizeof(WCHAR));
ptr += path_len;
afdi->lpAssemblyDirectoryName = ptr;
memcpy(ptr, assembly->directory, ad_len * sizeof(WCHAR));
ptr += ad_len;
- }
+ }
else afdi->lpAssemblyDirectoryName = NULL;
RtlFreeHeap( RtlGetProcessHeap(), 0, assembly_id );
}
{
if (retlen) *retlen = len;
return STATUS_BUFFER_TOO_SMALL;
- }
+ }
if (retlen) *retlen = 0; /* yes that's what native does !! */
afdi->ulFlags = ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION;
afdi->ulFilenameLength = dll_len ? (dll_len - 1) * sizeof(WCHAR) : 0;
memcpy( ptr, dll->name, dll_len * sizeof(WCHAR) );
} else afdi->lpFileName = NULL;
afdi->lpFilePath = NULL; /* FIXME */
- }
+ }
break;
default:
NTAPI
RtlFindActivationContextSectionString( ULONG flags, const GUID *guid, ULONG section_kind,
UNICODE_STRING *section_name, PVOID ptr )
-{
+ {
PACTCTX_SECTION_KEYED_DATA data = ptr;
NTSTATUS status = STATUS_SXS_KEY_NOT_FOUND;
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS Run-Time Library
+ * PURPOSE: Debug Routines
+ * FILE: lib/rtl/i386/debug.S
+ * PROGRAMER: Alex Ionescu (alex@relsoft.net)
+ */
+
+.intel_syntax noprefix
+
+/* GLOBALS ****************************************************************/
+
+.globl _DbgBreakPoint
+.globl _DbgBreakPointWithStatus
+.globl _DbgUserBreakPoint
+.globl _DebugService
+.globl _DebugService2
+.globl _DbgBreakPointNoBugCheck
+.globl _RtlpBreakWithStatusInstruction
+
+/* FUNCTIONS ***************************************************************/
+
+.func DbgBreakPointNoBugCheck
+_DbgBreakPointNoBugCheck:
+ int 3
+ ret
+.endfunc
+
+.func DbgBreakPoint
+_DbgBreakPoint:
+_DbgUserBreakPoint:
+ int 3
+ ret
+.endfunc
+
+.func DbgBreakPointWithStatus
+_DbgBreakPointWithStatus:
+ mov eax, ecx
+
+_RtlpBreakWithStatusInstruction:
+ int 3
+ ret
+.endfunc
+
+.func DebugService2
+_DebugService2:
+ ret
+ /* Call the interrupt */
+// mov eax, [rbp+8]
+// int 0x2D
+// int 3
+
+.endfunc
+
+/******************************************************************************
+ * NTSTATUS NTAPI DebugService(
+ * IN ULONG Service, // <rcx> = [rsp + 8]
+ * IN PVOID Buffer, // <rdx> = [rsp + 16]
+ * IN ULONG Length, // <r8> = [rsp + 24]
+ * IN PVOID Argument1, // <r9> = [rsp + 32]
+ * IN PVOID Argument2); // [rsp + 40]
+ */
+.func DebugService
+_DebugService:
+
+ /* Prepare registers for interrupt */
+ mov eax, ecx // Service
+ mov rcx, rdx // Buffer
+ mov edx, r8d // Length
+ mov r8, r9 // Argument1
+ mov r9, [rsp + 40] // Argument2
+
+ /* Call the Interrupt */
+ int 0x2D
+ int 3
+
+ /* Return */
+ ret
+.endfunc
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS Runtime Library (RTL)
+ * FILE: lib/rtl/amd64/except_asm.S
+ * PURPOSE: Exception support for AMD64
+ * PROGRAMMERS: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ndk/asm.h>
+.intel_syntax noprefix
+
+/* FUNCTIONS *****************************************************************/
+
+/*
+ * VOID NTAPI
+ * RtlCaptureContext(
+ * PCONTEXT ContextRecord); <rcx>
+ */
+.func RtlCaptureContext
+.global _RtlCaptureContext
+_RtlCaptureContext:
+ .cfi_startproc
+
+ /* Push rflags */
+ pushfq
+ .cfi_adjust_cfa_offset 8
+
+ /* Save the basic register context */
+ mov [rcx + CONTEXT_Rax], rax
+ mov [rcx + CONTEXT_Rcx], rcx
+ mov [rcx + CONTEXT_Rdx], rdx
+
+ /* Load rflags into rax */
+ mov rax, [rsp]
+
+ mov [rcx + CONTEXT_Rbx], rbx
+ mov [rcx + CONTEXT_Rsi], rsi
+ mov [rcx + CONTEXT_Rdi], rdi
+
+ /* Store rflags */
+ mov [rcx + CONTEXT_EFlags], rax
+
+ mov [rcx + CONTEXT_Rbp], rbp
+ mov [rcx + CONTEXT_R8], r8
+ mov [rcx + CONTEXT_R9], r9
+
+ /* Load former stack pointer in rax */
+ lea rax, [rsp + 0x10]
+
+ mov [rcx + CONTEXT_R10], r10
+ mov [rcx + CONTEXT_R11], r11
+ mov [rcx + CONTEXT_R12], r12
+
+ /* Store stack pointer */
+ mov [rcx + CONTEXT_Rsp], rax
+
+ mov [rcx + CONTEXT_R13], r13
+ mov [rcx + CONTEXT_R14], r14
+ mov [rcx + CONTEXT_R15], r15
+
+ /* Load return address in rax */
+ mov rax, [rsp + 8]
+
+ /* Safe segment selectors */
+ mov [rcx + CONTEXT_SegCs], cs
+ mov [rcx + CONTEXT_SegDs], ds
+ mov [rcx + CONTEXT_SegEs], es
+ mov [rcx + CONTEXT_SegFs], fs
+ mov [rcx + CONTEXT_SegGs], gs
+ mov [rcx + CONTEXT_SegSs], ss
+
+ /* Store return address */
+ mov [rcx + CONTEXT_Rip], rax
+
+ /* Safe xmm registers */
+ movdqa [rcx + CONTEXT_Xmm0], xmm0
+ movdqa [rcx + CONTEXT_Xmm1], xmm1
+ movdqa [rcx + CONTEXT_Xmm2], xmm2
+ movdqa [rcx + CONTEXT_Xmm3], xmm3
+ movdqa [rcx + CONTEXT_Xmm4], xmm4
+ movdqa [rcx + CONTEXT_Xmm5], xmm5
+ movdqa [rcx + CONTEXT_Xmm6], xmm6
+ movdqa [rcx + CONTEXT_Xmm7], xmm7
+ movdqa [rcx + CONTEXT_Xmm8], xmm8
+ movdqa [rcx + CONTEXT_Xmm9], xmm9
+ movdqa [rcx + CONTEXT_Xmm10], xmm10
+ movdqa [rcx + CONTEXT_Xmm11], xmm11
+ movdqa [rcx + CONTEXT_Xmm12], xmm12
+ movdqa [rcx + CONTEXT_Xmm13], xmm13
+ movdqa [rcx + CONTEXT_Xmm14], xmm14
+ movdqa [rcx + CONTEXT_Xmm15], xmm15
+
+ /* Cleanup stack and return */
+ add rsp, 8
+ ret
+ .cfi_endproc
+.endfunc
+
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS Run-Time Library
+ * PURPOSE: Memory functions for amd64
+ * FILE: lib/rtl/i386/rtlswap.S
+ * PROGRAMER: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ndk/amd64/asmmacro.S>
+
+/* FUNCTIONS *****************************************************************/
+.intel_syntax noprefix
+
+/* SIZE_T
+ * RtlCompareMemory(
+ * IN CONST VOID *Source1, <rcx>
+ * IN CONST VOID *Source2, <rdx>
+ * IN SIZE_T Length <r8>
+ * );
+ */
+.proc RtlCompareMemory
+
+ /* Save registers */
+ push rsi
+ .pushreg rsi
+ push rdi
+ .pushreg rdi
+
+ /* Setup registers for compare */
+ mov rsi, rcx
+ mov rdi, rdx
+
+ /* Clear direction flag */
+ cli
+
+ /* Get number of qwords */
+ mov rcx, r8
+ shr rcx, 3
+ jz 2f
+
+ /* Compare qwords */
+ repe cmpsq
+ jnz 4f
+
+2: /* Compare rest */
+ mov rcx, r8
+ and rcx, 7
+ jz 3f
+
+ repe cmpsb
+ jnz 5f
+
+3: /* All equal */
+ /* Return the full count */
+ mov rax, rcx
+ jmp 6f
+
+4: /* Not equal after comparing qwords */
+ /* Compare the last qword */
+ sub rsi, 8
+ sub rdi, 8
+ mov rcx, 8
+ repe cmpsb
+
+5: /* Not equal after comparing bytes */
+ /* Return difference */
+ sub rdi, rdx
+ dec rdi
+ mov rax, rdi
+
+6: /* Cleanup and return */
+ pop rdi
+ pop rsi
+ ret
+.endproc
+
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * FILE: lib/rtl/amd64/interlck.S
+ * PURPOSE: Rtl Interlocked Functions for amd64
+ * PROGRAMMERS: Timo Kreuzer
+ */
+
+#include <ndk/asm.h>
+#include <ndk/amd64/asmmacro.S>
+.intel_syntax noprefix
+
+#define SLIST8A_DEPTH_MASK 0x000000000000FFFF
+#define SLIST8A_DEPTH_INC 0x0000000000000001
+#define SLIST8A_SEQUENCE_MASK 0x0000000001FF0000
+#define SLIST8A_SEQUENCE_INC 0x0000000000010000
+#define SLIST8A_NEXTENTRY_MASK 0xFFFFFFFFFE000000
+#define SLIST8A_NEXTENTRY_SHIFT 21
+#define SLIST8B_HEADERTYPE_MASK 0x0000000000000001
+#define SLIST8B_INIT_MASK 0x0000000000000002
+#define SLIST8B_REGION_MASK 0xE000000000000000
+#define SLIST8_POINTER_MASK 0x000007FFFFFFFFF0
+
+#define SLIST16A_DEPTH_MASK 0x000000000000FFFF
+#define SLIST16A_DEPTH_INC 0x0000000000000001
+#define SLIST16A_SEQUENCE_MASK 0xFFFFFFFFFFFF0000
+#define SLIST16A_SEQUENCE_INC 0x0000000000010000
+#define SLIST16B_HEADERTYPE_MASK 0x0000000000000001
+#define SLIST16B_INIT_MASK 0x0000000000000002
+#define SLIST16B_NEXTENTY_MASK 0xFFFFFFFFFFFFFFF0
+
+
+/* FUNCTIONS ****************************************************************/
+
+.global _ExpInterlockedPopEntrySList
+.global _ExpInterlockedPopEntrySListResume
+.global _ExpInterlockedPopEntrySListFault
+.global _ExpInterlockedPopEntrySListEnd
+.global _ExpInterlockedPopEntrySListResume16
+.global _ExpInterlockedPopEntrySListFault16
+.global _ExpInterlockedPopEntrySListEnd16
+.global _ExpInterlockedPushEntrySList
+.global _ExpInterlockedFlushSList
+
+/* PSLIST_ENTRY
+ * NTAPI
+ * RtlInterlockedPopEntrySList(
+ * IN PSLIST_HEADER ListHead);
+ */
+.proc RtlInterlockedPopEntrySList
+_ExpInterlockedPopEntrySList:
+
+ /* Load ListHead->Region into rdx */
+ mov rdx, [rcx + 8]
+
+ /* Load ListHead->Alignment into rax */
+ mov rax, [rcx]
+
+ /* Check what kind of header this is */
+ test rdx, SLIST8B_HEADERTYPE_MASK
+ jnz _RtlInterlockedPopEntrySList16
+
+ /* We have an 8 byte header */
+
+_ExpInterlockedPopEntrySListResume:
+
+ /* Check if ListHead->NextEntry is NULL */
+ mov r9, rax
+ and r9, SLIST8A_NEXTENTRY_MASK
+ jz _RtlInterlockedPopEntrySListEmpty
+
+ /* Copy Depth and Sequence number and adjust Depth */
+ lea r8, [rax - SLIST8A_DEPTH_INC]
+ and r8, SLIST8A_SEQUENCE_MASK | SLIST8A_DEPTH_MASK
+
+ /* Create a pointer template from rcx in rdx */
+ mov rdx, ~SLIST8_POINTER_MASK
+ and rdx, rcx
+
+ /* Shift the NextEntry pointer */
+ shr r9, SLIST8A_NEXTENTRY_SHIFT
+
+ /* Combine to new pointer in rdx */
+ or rdx, r9
+
+_ExpInterlockedPopEntrySListFault:
+
+ /* Load the next NextEntry pointer to r9 */
+ mov r9, [rdx]
+
+ /* Shift bits in place */
+ shl r9, SLIST8A_NEXTENTRY_SHIFT
+
+ /* Combine into r8 */
+ or r8, r9
+
+_ExpInterlockedPopEntrySListEnd:
+
+ /* If [rcx] equals rax, exchange it with r8 */
+ lock cmpxchg [rcx], r8
+
+ /* If not equal, retry with rax, being the content of [rcx] now */
+ jnz _ExpInterlockedPopEntrySListResume
+
+ /* Shift the pointer bits in place */
+ and rax, SLIST8A_NEXTENTRY_MASK
+ shr rax, SLIST8A_NEXTENTRY_SHIFT
+
+ /* Use rcx as pointer template */
+ mov rdx, ~SLIST8_POINTER_MASK
+ and rdx, rcx
+
+ /* Combine result and return */
+ or rax, rdx
+ ret
+
+_RtlInterlockedPopEntrySListEmpty:
+ xor rax, rax
+ ret
+
+_RtlInterlockedPopEntrySList16:
+ /* This is a 16 byte header */
+
+ /* Save rbx */
+ push rbx
+
+ /* Copy rcx to r8, as we need rcx for the exchange */
+ mov r8, rcx
+
+_ExpInterlockedPopEntrySListResume16:
+
+ /* Check if ListHead->NextEntry is NULL */
+ mov r9, rdx
+ and r9, SLIST16B_NEXTENTY_MASK
+ jz _RtlInterlockedPopEntrySListEmpty16
+
+_ExpInterlockedPopEntrySListFault16:
+
+ /* Get next pointer */
+ mov rcx, [r9]
+
+ /* Set ListHead->HeaderType = 1 and ListHead->Init = 1 */
+ or rcx, 0x3
+
+ /* Copy Depth and Sequence number and adjust Depth */
+ lea rbx, [rax - SLIST16A_DEPTH_INC]
+
+_ExpInterlockedPopEntrySListEnd16:
+
+ /* If [r8] equals rdx:rax, exchange it with rcx:rbx */
+ lock cmpxchg16b [r8]
+
+ /* If not equal, retry with rdx:rax, being the content of [r8] now */
+ jnz _ExpInterlockedPopEntrySListResume16
+
+ /* Copy the old NextEntry pointer to rax */
+ mov rax, rdx
+ and rax, SLIST16B_NEXTENTY_MASK
+
+ /* Return */
+ pop rbx
+ ret
+
+_RtlInterlockedPopEntrySListEmpty16:
+ xor rax, rax
+ pop rbx
+ ret
+
+.endproc
+
+
+/* PSLIST_ENTRY
+ * NTAPI
+ * RtlInterlockedPushEntrySList(
+ * IN PSLIST_HEADER ListHead,
+ * IN PSLIST_ENTRY ListEntry);
+ */
+.proc RtlInterlockedPushEntrySList
+_ExpInterlockedPushEntrySList:
+
+ /* Load ListHead->Alignment into rax */
+ mov rax, [rcx]
+
+ /* Load ListHead->Region into rdx */
+ mov r9, [rcx + 8]
+
+ /* Check what kind of header this is */
+ test r9, SLIST8B_HEADERTYPE_MASK
+ jnz _RtlInterlockedPushEntrySList16
+
+ /* We have an 8 byte header */
+
+_RtlInterlockedPushEntrySListLoop:
+
+ /* Get ListHead->NextEntry */
+ mov r8, rax
+ and r8, SLIST8A_NEXTENTRY_MASK
+ jz _RtlInterlockedPushEntrySListEmpty
+
+ /* Shift the NextEntry pointer */
+ shr r8, SLIST8A_NEXTENTRY_SHIFT
+
+ /* Create a pointer template from rcx in rdx */
+ mov r9, ~SLIST8_POINTER_MASK
+ and r9, rcx
+
+ /* Combine to new pointer and save as ListEntry->NextEntry */
+ or r8, r9
+
+_RtlInterlockedPushEntrySListEmpty:
+ /* Store the NextEntry pointer in the new ListEntry */
+ mov [rdx], r8
+
+ /* Shift and mask the new ListEntry pointer */
+ mov r8, rdx
+ shl r8, SLIST8A_NEXTENTRY_SHIFT
+ and r8, SLIST8A_NEXTENTRY_MASK
+
+ /* Copy and adjust depth and sequence number */
+ lea r9, [rax + SLIST8A_DEPTH_INC + SLIST8A_SEQUENCE_INC]
+ and r9, SLIST8A_SEQUENCE_MASK | SLIST8A_DEPTH_MASK
+
+ /* Combine to exchange value in r8 */
+ or r8, r9
+
+ /* Save the NextEntry in r9 */
+ mov r9, [rdx]
+
+ /* If [rcx] equals rax, exchange it with r8 */
+ lock cmpxchg [rcx], r8
+
+ /* If not equal, retry with rax, being the content of [rcx] now */
+ jnz _RtlInterlockedPushEntrySListLoop
+
+ /* Return the old NextEntry pointer */
+ mov rax, r9
+ ret
+
+_RtlInterlockedPushEntrySList16:
+ /* This is a 16 byte header */
+
+ /* Save rbx */
+ push rbx
+
+ /* Copy rcx/rdx to r8/r9, as we need rcx/rdx for the exchange */
+ mov r8, rcx
+ mov r9, rdx
+
+ /* Set ListHead->HeaderType = 1 and ListHead->Init = 1 */
+ mov rcx, rdx
+ or rcx, 0x3
+
+ mov rdx, [r8 + 8]
+
+_RtlInterlockedPushEntrySListLoop16:
+
+ /* Move ListHead->NextEntry to rbx */
+ mov rbx, rdx
+ and rbx, SLIST16B_NEXTENTY_MASK
+
+ /* Store next pointer in ListEntry->NextEntry */
+ mov [r9], rbx
+
+ /* Copy Depth and Sequence number and adjust Depth */
+ lea rbx, [rax + SLIST16A_DEPTH_INC + SLIST16A_SEQUENCE_INC]
+
+ /* If [r8] equals rdx:rax, exchange it with rcx:rbx */
+ lock cmpxchg16b [r8]
+
+ /* If not equal, retry with rdx:rax, being the content of [r8] now */
+ jnz _RtlInterlockedPushEntrySListLoop16
+
+ /* Copy the old NextEntry pointer to rax */
+ mov rax, rdx
+ and rax, SLIST16B_NEXTENTY_MASK
+
+ /* Return */
+ pop rbx
+ ret
+
+.endproc
+
+/* PSLIST_ENTRY
+ * NTAPI
+ * RtlInterlockedFlushSList(
+ * IN PSINGLE_LIST_ENTRY ListHead);
+ */
+.proc RtlInterlockedFlushSList
+_ExpInterlockedFlushSList:
+
+ /* Load ListHead->Region into rdx */
+ mov rax, [rcx + 8]
+
+ /* Check what kind of header this is */
+ test rax, SLIST8B_HEADERTYPE_MASK
+ jnz _RtlInterlockedFlushSList16
+
+ /* We have an 8 byte header */
+
+_RtlInterlockedFlushSListLoop:
+
+ /* Zero ListHead->Alignment */
+ xor r8, r8
+
+ /* If [rcx] equals rax, exchange it with r8 */
+ lock cmpxchg [rcx], r8
+
+ /* If not equal, retry with rax, being the content of [rcx] now */
+ jnz _RtlInterlockedFlushSListLoop
+
+ /* Use rcx as pointer template */
+ mov rdx, ~SLIST8_POINTER_MASK
+ or rdx, rcx
+
+ /* Combine result and return */
+ or rax, rdx
+ ret
+
+_RtlInterlockedFlushSList16:
+ /* We have a 16 byte header */
+ push rbx
+
+ mov rdx, [rcx + 8]
+ xor rbx, rbx
+ mov rcx, 0x3
+
+_RtlInterlockedFlushSListLoop16:
+
+ /* If [r8] equals rdx:rax, exchange it with rcx:rbx */
+ lock cmpxchg16b [r8]
+
+ /* If not equal, retry with rdx:rax, being the content of [r8] now */
+ jnz _RtlInterlockedFlushSListLoop16
+
+ /* Copy the old NextEntry pointer to rax */
+ mov rax, rdx
+ and rax, SLIST16B_NEXTENTY_MASK
+
+ /* Return */
+ pop rbx
+ ret
+
+.endproc
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS Run-Time Library
+ * PURPOSE: AMD64 stubs
+ * FILE: lib/rtl/amd64/stubs.c
+ * PROGRAMMERS: Stefan Ginsberg (stefan.ginsberg@reactos.org)
+ */
+
+/* INCLUDES *****************************************************************/
+
+#include <rtl.h>
+#define NDEBUG
+#include <debug.h>
+
+/* PUBLIC FUNCTIONS **********************************************************/
+
+/*
+ * @unimplemented
+ */
+VOID
+NTAPI
+RtlInitializeContext(IN HANDLE ProcessHandle,
+ OUT PCONTEXT ThreadContext,
+ IN PVOID ThreadStartParam OPTIONAL,
+ IN PTHREAD_START_ROUTINE ThreadStartAddress,
+ IN PINITIAL_TEB InitialTeb)
+{
+ UNIMPLEMENTED;
+ return;
+}
+
+/*
+ * @unimplemented
+ */
+PVOID
+NTAPI
+RtlpGetExceptionAddress(VOID)
+{
+ UNIMPLEMENTED;
+ return NULL;
+}
+
+/*
+ * @unimplemented
+ */
+BOOLEAN
+NTAPI
+RtlDispatchException(IN PEXCEPTION_RECORD ExceptionRecord,
+ IN PCONTEXT Context)
+{
+ UNIMPLEMENTED;
+ return FALSE;
+}
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * PURPOSE: Unwinding related functions
+ * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES *****************************************************************/
+
+#include <rtl.h>
+
+#define NDEBUG
+#include <debug.h>
+
+#define UNWIND_HISTORY_TABLE_NONE 0
+#define UNWIND_HISTORY_TABLE_GLOBAL 1
+#define UNWIND_HISTORY_TABLE_LOCAL 2
+
+#define UWOP_PUSH_NONVOL 0
+#define UWOP_ALLOC_LARGE 1
+#define UWOP_ALLOC_SMALL 2
+#define UWOP_SET_FPREG 3
+#define UWOP_SAVE_NONVOL 4
+#define UWOP_SAVE_NONVOL_FAR 5
+#define UWOP_SAVE_XMM 6
+#define UWOP_SAVE_XMM_FAR 7
+#define UWOP_SAVE_XMM128 8
+#define UWOP_SAVE_XMM128_FAR 9
+#define UWOP_PUSH_MACHFRAME 10
+
+#define UNW_FLAG_NHANDLER 0
+#define UNW_FLAG_EHANDLER 1
+#define UNW_FLAG_UHANDLER 2
+#define UNW_FLAG_CHAININFO 4
+
+typedef unsigned char UBYTE;
+
+typedef union _UNWIND_CODE
+{
+ struct
+ {
+ UBYTE CodeOffset;
+ UBYTE UnwindOp:4;
+ UBYTE OpInfo:4;
+ };
+ USHORT FrameOffset;
+} UNWIND_CODE, *PUNWIND_CODE;
+
+typedef struct _UNWIND_INFO
+{
+ UBYTE Version:3;
+ UBYTE Flags:5;
+ UBYTE SizeOfProlog;
+ UBYTE CountOfCodes;
+ UBYTE FrameRegister:4;
+ UBYTE FrameOffset:4;
+ UNWIND_CODE UnwindCode[1];
+/* union {
+ OPTIONAL ULONG ExceptionHandler;
+ OPTIONAL ULONG FunctionEntry;
+ };
+ OPTIONAL ULONG ExceptionData[];
+*/
+} UNWIND_INFO, *PUNWIND_INFO;
+
+/* FUNCTIONS *****************************************************************/
+
+/*! RtlLookupFunctionTable
+ * \brief Locates the table of RUNTIME_FUNCTION entries for a code address.
+ * \param ControlPc
+ * Address of the code, for which the table should be searched.
+ * \param ImageBase
+ * Pointer to a DWORD64 that receives the base address of the
+ * corresponding executable image.
+ * \param Length
+ * Pointer to an ULONG that receives the number of table entries
+ * present in the table.
+ */
+PRUNTIME_FUNCTION
+NTAPI
+RtlLookupFunctionTable(
+ IN DWORD64 ControlPc,
+ OUT PDWORD64 ImageBase,
+ OUT PULONG Length)
+{
+ PVOID Table;
+ ULONG Size;
+
+ /* Find corresponding file header from code address */
+ if (!RtlPcToFileHeader((PVOID)ControlPc, (PVOID*)ImageBase))
+ {
+ /* Nothing found */
+ return NULL;
+ }
+
+ /* Locate the exception directory */
+ Table = RtlImageDirectoryEntryToData((PVOID)*ImageBase,
+ TRUE,
+ IMAGE_DIRECTORY_ENTRY_EXCEPTION,
+ &Size);
+
+ /* Return the number of entries */
+ *Length = Size / sizeof(RUNTIME_FUNCTION);
+
+ /* Return the address of the table */
+ return Table;
+}
+
+/*! RtlLookupFunctionEntry
+ * \brief Locates the RUNTIME_FUNCTION entry corresponding to a code address.
+ * \ref http://msdn.microsoft.com/en-us/library/ms680597(VS.85).aspx
+ * \todo Implement HistoryTable
+ */
+PRUNTIME_FUNCTION
+NTAPI
+RtlLookupFunctionEntry(
+ IN DWORD64 ControlPc,
+ OUT PDWORD64 ImageBase,
+ OUT PUNWIND_HISTORY_TABLE HistoryTable)
+{
+ PRUNTIME_FUNCTION FunctionTable, FunctionEntry;
+ ULONG TableLength;
+ ULONG IndexLo, IndexHi, IndexMid;
+
+ /* Find the corresponding table */
+ FunctionTable = RtlLookupFunctionTable(ControlPc, ImageBase, &TableLength);
+
+ /* Fail, if no table is found */
+ if (!FunctionTable)
+ {
+ return NULL;
+ }
+
+ /* Use relative virtual address */
+ ControlPc -= *ImageBase;
+
+ /* Do a binary search */
+ IndexLo = 0;
+ IndexHi = TableLength;
+ while (IndexHi > IndexLo)
+ {
+ IndexMid = (IndexLo + IndexHi) / 2;
+ FunctionEntry = &FunctionTable[IndexMid];
+
+ if (ControlPc < FunctionEntry->BeginAddress)
+ {
+ /* Continue search in lower half */
+ IndexHi = IndexMid;
+ }
+ else if (ControlPc >= FunctionEntry->EndAddress)
+ {
+ /* Continue search in upper half */
+ IndexLo = IndexMid + 1;
+ }
+ else
+ {
+ /* ControlPc is within limits, return entry */
+ return FunctionEntry;
+ }
+ }
+
+ /* Nothing found, return NULL */
+ return NULL;
+}
+
+BOOLEAN
+NTAPI
+RtlAddFunctionTable(
+ IN PRUNTIME_FUNCTION FunctionTable,
+ IN DWORD EntryCount,
+ IN DWORD64 BaseAddress)
+{
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+BOOLEAN
+NTAPI
+RtlDeleteFunctionTable(
+ IN PRUNTIME_FUNCTION FunctionTable)
+{
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+BOOLEAN
+NTAPI
+RtlInstallFunctionTableCallback(
+ IN DWORD64 TableIdentifier,
+ IN DWORD64 BaseAddress,
+ IN DWORD Length,
+ IN PGET_RUNTIME_FUNCTION_CALLBACK Callback,
+ IN PVOID Context,
+ IN PCWSTR OutOfProcessCallbackDll)
+{
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+void
+FORCEINLINE
+SetReg(PCONTEXT Context, BYTE Reg, DWORD64 Value)
+{
+ ((DWORD64*)(&Context->Rax))[Reg] = Value;
+}
+
+DWORD64
+FORCEINLINE
+GetReg(PCONTEXT Context, BYTE Reg)
+{
+ return ((DWORD64*)(&Context->Rax))[Reg];
+}
+
+void
+FORCEINLINE
+PopReg(PCONTEXT Context, BYTE Reg)
+{
+ DWORD64 Value = *(DWORD64*)Context->Rsp;
+ Context->Rsp += 8;
+ SetReg(Context, Reg, Value);
+}
+
+/*! RtlpTryToUnwindEpilog
+ * \brief Helper function that tries to unwind epilog instructions.
+ * \return TRUE if we have been in an epilog and it could be unwound.
+ * FALSE if the instructions were not allowed for an epilog.
+ * \ref
+ * http://msdn.microsoft.com/en-us/library/8ydc79k6(VS.80).aspx
+ * http://msdn.microsoft.com/en-us/library/tawsa7cb.aspx
+ * \todo
+ * - Test and compare with Windows behaviour
+ */
+BOOLEAN
+static
+inline
+RtlpTryToUnwindEpilog(
+ PCONTEXT Context,
+ ULONG64 ImageBase,
+ PRUNTIME_FUNCTION FunctionEntry)
+{
+ CONTEXT LocalContext;
+ BYTE *InstrPtr;
+ DWORD Instr;
+ BYTE Reg, Mod;
+ ULONG64 EndAddress;
+
+ /* Make a local copy of the context */
+ LocalContext = *Context;
+
+ InstrPtr = (BYTE*)LocalContext.Rip;
+
+ /* Check if first instruction of epilog is "add rsp, x" */
+ Instr = *(DWORD*)InstrPtr;
+ if ( (Instr & 0x00fffdff) == 0x00c48148 )
+ {
+ if ( (Instr & 0x0000ff00) == 0x8300 )
+ {
+ /* This is "add rsp, 0x??" */
+ LocalContext.Rsp += Instr >> 24;
+ InstrPtr += 4;
+ }
+ else
+ {
+ /* This is "add rsp, 0x???????? */
+ LocalContext.Rsp += *(DWORD*)(InstrPtr + 3);
+ InstrPtr += 7;
+ }
+ }
+ /* Check if first instruction of epilog is "lea rsp, ..." */
+ else if ( (Instr & 0x38fffe) == 0x208d48 )
+ {
+ /* Get the register */
+ Reg = ((Instr << 8) | (Instr >> 16)) & 0x7;
+
+ LocalContext.Rsp = GetReg(&LocalContext, Reg);
+
+ /* Get adressing mode */
+ Mod = (Instr >> 22) & 0x3;
+ if (Mod == 0)
+ {
+ /* No displacement */
+ InstrPtr += 3;
+ }
+ else if (Mod == 1)
+ {
+ /* 1 byte displacement */
+ LocalContext.Rsp += Instr >> 24;
+ InstrPtr += 4;
+ }
+ else if (Mod == 2)
+ {
+ /* 4 bytes displacement */
+ LocalContext.Rsp += *(DWORD*)(InstrPtr + 3);
+ InstrPtr += 7;
+ }
+ }
+
+ /* Loop the following instructions */
+ EndAddress = FunctionEntry->EndAddress + ImageBase;
+ while((DWORD64)InstrPtr < EndAddress)
+ {
+ Instr = *(DWORD*)InstrPtr;
+
+ /* Check for a simple pop */
+ if ( (Instr & 0xf8) == 0x58 )
+ {
+ /* Opcode pops a basic register from stack */
+ Reg = Instr & 0x7;
+ PopReg(&LocalContext, Reg);
+ InstrPtr++;
+ continue;
+ }
+
+ /* Check for REX + pop */
+ if ( (Instr & 0xf8fb) == 0x5841 )
+ {
+ /* Opcode is pop r8 .. r15 */
+ Reg = (Instr & 0x7) + 8;
+ PopReg(&LocalContext, Reg);
+ InstrPtr += 2;
+ continue;
+ }
+
+ /* Check for retn / retf */
+ if ( (Instr & 0xf7) == 0xc3 )
+ {
+ /* We are finished */
+ break;
+ }
+
+ /* Opcode not allowed for Epilog */
+ return FALSE;
+ }
+
+ /* Unwind is finished, pop new Rip from Stack */
+ LocalContext.Rip = *(DWORD64*)LocalContext.Rsp;
+ LocalContext.Rsp += sizeof(DWORD64);
+
+ *Context = LocalContext;
+ return TRUE;
+}
+
+
+PEXCEPTION_ROUTINE
+NTAPI
+RtlVirtualUnwind(
+ IN ULONG HandlerType,
+ IN ULONG64 ImageBase,
+ IN ULONG64 ControlPc,
+ IN PRUNTIME_FUNCTION FunctionEntry,
+ IN OUT PCONTEXT Context,
+ OUT PVOID *HandlerData,
+ OUT PULONG64 EstablisherFrame,
+ IN OUT PKNONVOLATILE_CONTEXT_POINTERS ContextPointers)
+{
+ PUNWIND_INFO UnwindInfo;
+ ULONG CodeOffset;
+ ULONG i;
+ UNWIND_CODE UnwindCode;
+ BYTE Reg;
+
+ /* Use relative virtual address */
+ ControlPc -= ImageBase;
+
+ /* Sanity checks */
+ if ( (ControlPc < FunctionEntry->BeginAddress) ||
+ (ControlPc >= FunctionEntry->EndAddress) )
+ {
+ return NULL;
+ }
+
+ /* Get a pointer to the unwind info */
+ UnwindInfo = RVA(ImageBase, FunctionEntry->UnwindData);
+
+ /* Calculate relative offset to function start */
+ CodeOffset = ControlPc - FunctionEntry->BeginAddress;
+
+ /* Check if we are in the function epilog and try to finish it */
+ if (CodeOffset > UnwindInfo->SizeOfProlog)
+ {
+ if (RtlpTryToUnwindEpilog(Context, ImageBase, FunctionEntry))
+ {
+ /* There's no exception routine */
+ return NULL;
+ }
+ }
+
+ /* Skip all Ops with an offset greater than the current Offset */
+ i = 0;
+ while (i < UnwindInfo->CountOfCodes &&
+ CodeOffset < UnwindInfo->UnwindCode[i].CodeOffset)
+ {
+ UnwindCode = UnwindInfo->UnwindCode[i];
+ switch (UnwindCode.UnwindOp)
+ {
+ case UWOP_SAVE_NONVOL:
+ case UWOP_SAVE_XMM:
+ case UWOP_SAVE_XMM128:
+ i += 2;
+ break;
+
+ case UWOP_SAVE_NONVOL_FAR:
+ case UWOP_SAVE_XMM_FAR:
+ case UWOP_SAVE_XMM128_FAR:
+ i += 3;
+ break;
+
+ case UWOP_ALLOC_LARGE:
+ i += UnwindCode.OpInfo ? 3 : 2;
+ break;
+
+ default:
+ i++;
+ }
+ }
+
+ /* Process the left Ops */
+ while (i < UnwindInfo->CountOfCodes)
+ {
+ UnwindCode = UnwindInfo->UnwindCode[i];
+ switch (UnwindCode.UnwindOp)
+ {
+ case UWOP_PUSH_NONVOL:
+ Reg = UnwindCode.OpInfo;
+ SetReg(Context, Reg, *(DWORD64*)Context->Rsp);
+ Context->Rsp += sizeof(DWORD64);
+ i++;
+ break;
+
+ case UWOP_ALLOC_LARGE:
+ if (UnwindCode.OpInfo)
+ {
+ ULONG Offset = *(ULONG*)(&UnwindInfo->UnwindCode[i+1]);
+ Context->Rsp += Offset;
+ i += 3;
+ }
+ else
+ {
+ USHORT Offset = UnwindInfo->UnwindCode[i+1].FrameOffset;
+ Context->Rsp += Offset * 8;
+ i += 2;
+ }
+ break;
+
+ case UWOP_ALLOC_SMALL:
+ Context->Rsp += (UnwindCode.OpInfo + 1) * 8;
+ i++;
+ break;
+
+ case UWOP_SET_FPREG:
+ i++;
+ break;
+
+ case UWOP_SAVE_NONVOL:
+ i += 2;
+ break;
+
+ case UWOP_SAVE_NONVOL_FAR:
+ i += 3;
+ break;
+
+ case UWOP_SAVE_XMM:
+ i += 2;
+ break;
+
+ case UWOP_SAVE_XMM_FAR:
+ i += 3;
+ break;
+
+ case UWOP_SAVE_XMM128:
+ i += 2;
+ break;
+
+ case UWOP_SAVE_XMM128_FAR:
+ i += 3;
+ break;
+
+ case UWOP_PUSH_MACHFRAME:
+ i += 1;
+ break;
+ }
+ }
+
+ /* Unwind is finished, pop new Rip from Stack */
+ Context->Rip = *(DWORD64*)Context->Rsp;
+ Context->Rsp += sizeof(DWORD64);
+
+ return 0;
+}
+
+VOID
+NTAPI
+RtlUnwindEx(
+ IN ULONG64 TargetFrame,
+ IN ULONG64 TargetIp,
+ IN PEXCEPTION_RECORD ExceptionRecord,
+ IN PVOID ReturnValue,
+ OUT PCONTEXT OriginalContext,
+ IN PUNWIND_HISTORY_TABLE HistoryTable)
+{
+ UNIMPLEMENTED;
+ return;
+}
+
+VOID
+NTAPI
+RtlUnwind(
+ IN PVOID TargetFrame,
+ IN PVOID TargetIp,
+ IN PEXCEPTION_RECORD ExceptionRecord,
+ IN PVOID ReturnValue)
+{
+ UNIMPLEMENTED;
+ return;
+}
+
+ULONG
+NTAPI
+RtlWalkFrameChain(OUT PVOID *Callers,
+ IN ULONG Count,
+ IN ULONG Flags)
+{
+ CONTEXT Context;
+ ULONG64 ControlPc, ImageBase, EstablisherFrame;
+ ULONG64 StackLow, StackHigh;
+ PVOID HandlerData;
+ INT i;
+ PRUNTIME_FUNCTION FunctionEntry;
+
+ DPRINT("Enter RtlWalkFrameChain\n");
+
+ /* Capture the current Context */
+ RtlCaptureContext(&Context);
+ ControlPc = Context.Rip;
+
+ /* Get the stack limits */
+ RtlpGetStackLimits(&StackLow, &StackHigh);
+
+ /* Check if we want the user-mode stack frame */
+ if (Flags == 1)
+ {
+ }
+
+ /* Loop the frames */
+ for (i = 0; i < Count; i++)
+ {
+ /* Lookup the FunctionEntry for the current ControlPc */
+ FunctionEntry = RtlLookupFunctionEntry(ControlPc, &ImageBase, NULL);
+
+ /* Is this a leaf function? */
+ if (!FunctionEntry)
+ {
+ Context.Rip = *(DWORD64*)Context.Rsp;
+ Context.Rsp += sizeof(DWORD64);
+ DPRINT("leaf funtion, new Rip = %p, new Rsp = %p\n", (PVOID)Context.Rip, (PVOID)Context.Rsp);
+ }
+ else
+ {
+ RtlVirtualUnwind(0,
+ ImageBase,
+ ControlPc,
+ FunctionEntry,
+ &Context,
+ &HandlerData,
+ &EstablisherFrame,
+ NULL);
+ DPRINT("normal funtion, new Rip = %p, new Rsp = %p\n", (PVOID)Context.Rip, (PVOID)Context.Rsp);
+ }
+
+ /* Check if new Rip is valid */
+ if (!Context.Rip)
+ {
+ break;
+ }
+
+ /* Check, if we have left our stack */
+ if ((Context.Rsp < StackLow) || (Context.Rsp > StackHigh))
+ {
+ break;
+ }
+
+ /* Save this frame and continue with new Rip */
+ ControlPc = Context.Rip;
+ Callers[i] = (PVOID)ControlPc;
+ }
+
+ DPRINT("RtlWalkFrameChain returns %ld\n", i);
+ return i;
+}
+
+/*! RtlGetCallersAddress
+ * \ref http://undocumented.ntinternals.net/UserMode/Undocumented%20Functions/Debug/RtlGetCallersAddress.html
+ */
+#undef RtlGetCallersAddress
+VOID
+NTAPI
+RtlGetCallersAddress(
+ OUT PVOID *CallersAddress,
+ OUT PVOID *CallersCaller )
+{
+ PVOID Callers[4];
+ ULONG Number;
+
+ /* Get callers:
+ * RtlWalkFrameChain -> RtlGetCallersAddress -> x -> y */
+ Number = RtlWalkFrameChain(Callers, 4, 0);
+
+ if (CallersAddress)
+ {
+ *CallersAddress = (Number >= 3) ? Callers[2] : NULL;
+ }
+ if (CallersCaller)
+ {
+ *CallersCaller = (Number == 4) ? Callers[3] : NULL;
+ }
+
+ return;
+}
+
+// FIXME: move to different file
+VOID
+NTAPI
+RtlRaiseException(IN PEXCEPTION_RECORD ExceptionRecord)
+{
+ CONTEXT Context;
+ NTSTATUS Status = STATUS_INVALID_DISPOSITION;
+ ULONG64 ImageBase;
+ PRUNTIME_FUNCTION FunctionEntry;
+ PVOID HandlerData;
+ ULONG64 EstablisherFrame;
+
+ /* Capture the context */
+ RtlCaptureContext(&Context);
+
+ /* Get the function entry for this function */
+ FunctionEntry = RtlLookupFunctionEntry(Context.Rip,
+ &ImageBase,
+ NULL);
+
+ /* Check if we found it */
+ if (FunctionEntry)
+ {
+ /* Unwind to the caller of this function */
+ RtlVirtualUnwind(UNW_FLAG_NHANDLER,
+ ImageBase,
+ Context.Rip,
+ FunctionEntry,
+ &Context,
+ &HandlerData,
+ &EstablisherFrame,
+ NULL);
+
+ /* Save the exception address */
+ ExceptionRecord->ExceptionAddress = (PVOID)Context.Rip;
+
+ /* Write the context flag */
+ Context.ContextFlags = CONTEXT_FULL;
+
+ /* Check if user mode debugger is active */
+ if (RtlpCheckForActiveDebugger())
+ {
+ /* Raise an exception immediately */
+ Status = ZwRaiseException(ExceptionRecord, &Context, TRUE);
+ }
+ else
+ {
+ /* Dispatch the exception and check if we should continue */
+ if (!RtlDispatchException(ExceptionRecord, &Context))
+ {
+ /* Raise the exception */
+ Status = ZwRaiseException(ExceptionRecord, &Context, FALSE);
+ }
+ else
+ {
+ /* Continue, go back to previous context */
+ Status = ZwContinue(&Context, FALSE);
+ }
+ }
+ }
+
+ /* If we returned, raise a status */
+ RtlRaiseStatus(Status);
+}
+
/* FUNCTIONS ***************************************************************/
-#if !defined(_M_IX86)
+#if !defined(_M_IX86) && !defined(_M_AMD64)
/*
* @implemented
RtlRaiseStatus(Status);
}
+#endif
+
+#if !defined(_M_IX86)
+
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable:4717) // RtlRaiseStatus is recursive by design
<directory name="arm">
<file>debug_asm.S</file>
</directory>
- <file>mem.c</file>
- <file>memgen.c</file>
+ <file>mem.c</file>
+ <file>memgen.c</file>
+ </if>
+ <if property="ARCH" value="amd64">
+ <directory name="amd64">
+ <file>debug_asm.S</file>
+ <file>except_asm.S</file>
+ <file>slist.S</file>
+ <file>unwind.c</file>
+ <file>stubs.c</file>
+ </directory>
+ <file>mem.c</file>
+ <file>memgen.c</file>
</if>
<directory name="austin">
<file>avl.c</file>
<file>version.c</file>
<file>wait.c</file>
<file>workitem.c</file>
- <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269
<pch>rtl.h</pch>
- -->
- <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
- <compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
</module>
#define ROUND_UP(n, align) \
ROUND_DOWN(((ULONG)n) + (align) - 1, (align))
+#define RVA(m, b) ((PVOID)((ULONG_PTR)(b) + (ULONG_PTR)(m)))
+
VOID
NTAPI
-RtlpGetStackLimits(PULONG_PTR StackBase,
- PULONG_PTR StackLimit);
+RtlpGetStackLimits(PULONG_PTR LowLimit,
+ PULONG_PTR HighLimit);
PEXCEPTION_REGISTRATION_RECORD
NTAPI
RtlInitializeSListHead(IN PSLIST_HEADER ListHead)
{
#ifdef _WIN64
- UNIMPLEMENTED;
+ ListHead->Alignment = 0;
+ ListHead->Region = 0;
+ ListHead->Header8.Init = 1;
+ // ListHead->Header8.HeaderType = 1; // FIXME: depending on cmpxchg16b support?
#else
ListHead->Alignment = 0;
#endif
RtlFirstEntrySList(IN const SLIST_HEADER *ListHead)
{
#ifdef _WIN64
- UNIMPLEMENTED;
- return NULL;
+ if (ListHead->Header8.HeaderType)
+ {
+ return (PVOID)(ListHead->Region & ~0xF);
+ }
+ else
+ {
+ union {
+ PVOID P;
+ struct {
+ ULONG64 Reserved:4;
+ ULONG64 NextEntry:39;
+ ULONG64 Reserved2:21;
+ } Bits;
+ } Pointer;
+
+ Pointer.P = (PVOID)ListHead;
+ Pointer.Bits.NextEntry = ListHead->Header8.NextEntry;
+ return Pointer.P;
+ }
#else
return ListHead->Next.Next;
#endif
RtlQueryDepthSList(IN PSLIST_HEADER ListHead)
{
#ifdef _WIN64
- UNIMPLEMENTED;
- return 0;
+ return ListHead->Header8.HeaderType ?
+ ListHead->Header16.Sequence : ListHead->Header8.Sequence;
#else
return ListHead->Depth;
#endif
unsigned int sign:1;
} double_t;
+#if 0
static
__inline
int
x.__x = &__x;
return ( x.x->exponent == 0x7ff && ( x.x->mantissah != 0 || x.x->mantissal != 0 ));
}
-
+#endif
static
__inline
return buf;
}
+#if 0
static char *
numberf(char * buf, char * end, double num, int base, int size, int precision, int type)
{
}
return buf;
}
+#endif
static char*
string(char* buf, char* end, const char* s, int len, int field_width, int precision, int flags)
{
int len;
unsigned long long num;
- double _double;
+// double _double;
int base;
char *str, *end;
}
continue;
+#if 0
/* float number formats - set up the flags and "break" */
case 'e':
case 'E':
}
continue;
-
+#endif
/* integer number formats - set up the flags and "break" */
case 'o':
unsigned int exponent:11;
unsigned int sign:1;
} double_t;
-
+#if 0
static
__inline
int
x.__x = &__x;
return ( x.x->exponent == 0x7ff && ( x.x->mantissah != 0 || x.x->mantissal != 0 ));
}
-
+#endif
static
__inline
return buf;
}
+#if 0
static wchar_t *
numberf(wchar_t * buf, wchar_t * end, double num, int base, int size, int precision, int type)
{
}
return buf;
}
+#endif
static wchar_t*
string(wchar_t* buf, wchar_t* end, const char* s, int len, int field_width, int precision, int flags)
wchar_t * str, * end;
const char *s;
const wchar_t *sw;
+#if 0
const wchar_t *ss;
double _double;
+#endif
int flags; /* flags to number() */
*ip = (str - buf);
}
continue;
+#if 0
/* float number formats - set up the flags and "break" */
case 'e':
case 'E':
}
continue;
-
+#endif
/* integer number formats - set up the flags and "break" */
* ENABLE_ECHO_INPUT and ENABLE_LINE_INPUT if they're currently
* switched on.
*/
- ConsoleHandle = (HANDLE) _get_osfhandle(stdin->_file);
+ ConsoleHandle = (HANDLE)(ULONG_PTR) _get_osfhandle(stdin->_file);
RestoreMode = GetConsoleMode(ConsoleHandle, &ConsoleMode) &&
(0 != (ConsoleMode &
(ENABLE_ECHO_INPUT | ENABLE_LINE_INPUT)));
SetConsoleMode(ConsoleHandle,
ConsoleMode & (~ (ENABLE_ECHO_INPUT | ENABLE_LINE_INPUT)));
}
- ReadConsoleA((HANDLE)_get_osfhandle(stdin->_file),
+ ReadConsoleA((HANDLE)(ULONG_PTR)_get_osfhandle(stdin->_file),
&c,
1,
&NumberOfCharsRead,
<file>jn_yn.c</file>-->
</if>
<if property="ARCH" value="amd64">
- <directory name="i386">
- <file>atan2.c</file>
- <file>exp.c</file>
- <file>fmod.c</file>
- <file>ldexp.c</file>
+ <directory name="amd64">
+ <file>alldiv.S</file>
+ <file>atan.S</file>
+ <file>atan2.S</file>
+ <file>ceil.S</file>
+ <file>ceilf.S</file>
+ <file>cos.S</file>
+ <file>exp.S</file>
+ <file>fabs.S</file>
+ <file>floor.S</file>
+ <file>floorf.S</file>
+ <file>fmod.S</file>
+ <file>fmodf.S</file>
+ <file>ldexp.S</file>
+ <file>log.S</file>
+ <file>log10.S</file>
+ <file>pow.S</file>
+ <file>sin.S</file>
+ <file>sqrt.S</file>
+ <file>sqrtf.S</file>
+ <file>tan.S</file>
</directory>
<!-- FIXME: we don't actually implement these... they recursively call themselves through an alias -->
<!--<file>j0_y0.c</file>
<if property="ARCH" value="i386">
<directory name="i386">
<file>memchr_asm.s</file>
- <file>memcpy_asm.s</file>
<file>memmove_asm.s</file>
<file>memset_asm.s</file>
</directory>
</if>
<ifnot property="ARCH" value="i386">
<file>memchr.c</file>
- <file>memcpy.c</file>
<file>memmove.c</file>
<file>memset.c</file>
</ifnot>
<file>lfind.c</file>
<file>lsearch.c</file>
</directory>
+ <directory name="securecrt">
+ <file>getinvp.c</file>
+ <file>invalidp.c</file>
+ <file>setinvp.c</file>
+ </directory>
<directory name="setjmp">
<if property="ARCH" value="i386">
<directory name="i386">
<file>setjmp.s</file>
</directory>
</if>
+ <if property="ARCH" value="amd64">
+ <directory name="amd64">
+ <file>setjmp.s</file>
+ </directory>
+ </if>
</directory>
<directory name="signal">
<file>signal.c</file>
}
/* vtables */
+#ifdef _WIN64
+
+#define __ASM_VTABLE(name,funcs) \
+ __asm__(".data\n" \
+ "\t.align 8\n" \
+ "\t.quad " __ASM_NAME(#name "_rtti") "\n" \
+ "\t.globl " __ASM_NAME("MSVCRT_" #name "_vtable") "\n" \
+ __ASM_NAME("MSVCRT_" #name "_vtable") ":\n" \
+ "\t.quad " THISCALL_NAME(MSVCRT_ ## name ## _vector_dtor) "\n" \
+ funcs "\n\t.text");
+
+#define __ASM_EXCEPTION_VTABLE(name) \
+ __ASM_VTABLE(name, "\t.quad " THISCALL_NAME(MSVCRT_what_exception) )
+
+#else
#define __ASM_VTABLE(name,funcs) \
__asm__(".data\n" \
#define __ASM_EXCEPTION_VTABLE(name) \
__ASM_VTABLE(name, "\t.long " THISCALL_NAME(MSVCRT_what_exception) )
+#endif /* _WIN64 */
+
#ifndef __GNUC__
void __asm_dummy_vtables(void) {
#endif
#define MB_CUR_MAX __mb_cur_max
-int _isnanl(long double x);
-int _isinfl(long double x);
-int _isnan(double x);
-int _isinf(double x);
+//int _isnanl(long double x);
+//int _isinfl(long double x);
+//int _isnan(double x);
+//int _isinf(double x);
/* Flags for the iobuf structure (for reference) */
#if 0
wint_t _filwbuf(FILE *f);
-#if __MINGW32_MAJOR_VERSION < 3 || __MINGW32_MINOR_VERSION < 2
- int __cdecl _filbuf (FILE*);
- int __cdecl _flsbuf (int, FILE*);
-#endif
+//#if __MINGW32_MAJOR_VERSION < 3 || __MINGW32_MINOR_VERSION < 2
+// int __cdecl _filbuf (FILE*);
+// int __cdecl _flsbuf (int, FILE*);
+//#endif
#endif /* __dj_include_libc_file_h__ */
-
--- /dev/null
+
+extern void * __pInvalidArgHandler;
+
+void _invalid_parameter(
+ const wchar_t * expression,
+ const wchar_t * function,
+ const wchar_t * file,
+ unsigned int line,
+ uintptr_t pReserved);
+
static inline EXCEPTION_REGISTRATION_RECORD *__wine_push_frame( EXCEPTION_REGISTRATION_RECORD *frame )
{
+#if defined(__i386__)
frame->Next = (struct _EXCEPTION_REGISTRATION_RECORD *)__readfsdword(0);
__writefsdword(0, (unsigned long)frame);
return frame->Next;
+#else
+ NT_TIB *teb = (NT_TIB *)NtCurrentTeb();
+ frame->Next = teb->ExceptionList;
+ teb->ExceptionList = frame;
+ return frame->Next;
+#endif
}
static inline EXCEPTION_REGISTRATION_RECORD *__wine_pop_frame( EXCEPTION_REGISTRATION_RECORD *frame )
{
+#if defined(__i386__)
__writefsdword(0, (unsigned long)frame->Next);
return frame->Next;
+#else
+ NT_TIB *teb = (NT_TIB *)NtCurrentTeb();
+ teb->ExceptionList = frame->Next;
+ return frame->Next;
+#endif
}
#ifdef _MSC_VER
<file>seh.s</file>
</directory>
</if>
+ <if property="ARCH" value="amd64">
+ <directory name="amd64">
+ <file>chkstk_asm.s</file>
+ <file>seh.s</file>
+ </directory>
+ </if>
<if property="ARCH" value="powerpc">
<directory name="powerpc">
<file>chkstk_asm.s</file>
<file>tan_asm.s</file>
</directory>
</if>
+ <if property="ARCH" value="amd64">
+ <directory name="amd64">
+ <file>alldiv.S</file>
+ <file>atan.S</file>
+ <file>atan2.S</file>
+ <file>ceil.S</file>
+ <file>cos.S</file>
+ <file>exp.S</file>
+ <file>fabs.S</file>
+ <file>floor.S</file>
+ <file>fmod.S</file>
+ <file>ldexp.S</file>
+ <file>log.S</file>
+ <file>log10.S</file>
+ <file>pow.S</file>
+ <file>sin.S</file>
+ <file>sqrt.S</file>
+ <file>tan.S</file>
+ </directory>
+ </if>
<file>abs.c</file>
<file>div.c</file>
<file>labs.c</file>
<if property="ARCH" value="i386">
<directory name="i386">
<file>memchr_asm.s</file>
- <file>memcpy_asm.s</file>
<file>memmove_asm.s</file>
<file>memset_asm.s</file>
</directory>
</if>
<ifnot property="ARCH" value="i386">
<file>memchr.c</file>
- <file>memcpy.c</file>
<file>memmove.c</file>
<file>memset.c</file>
</ifnot>
<file>lfind.c</file>
</directory>
+ <directory name="setjmp">
+ <if property="ARCH" value="amd64">
+ <directory name="amd64">
+ <file>setjmp.s</file>
+ </directory>
+ </if>
+ </directory>
+
<directory name="stdlib">
<file>qsort.c</file>
</directory>
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * PURPOSE: Implementation of alldiv
+ * FILE: lib/sdk/crt/math/amd64/alldiv.S
+ * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ndk/amd64/asm.h>
+#include <ndk/amd64/asmmacro.S>
+
+.intel_syntax noprefix
+
+/* DATA *********************************************************************/
+
+ .globl __fltused
+__fltused:
+ .long 0x9875
+
+/* FUNCTIONS ****************************************************************/
+
+.proc alldiv
+ UNIMPLEMENTED alldiv
+ ret
+
+.endproc
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * PURPOSE: Implementation of atan
+ * FILE: lib/sdk/crt/math/amd64/atan.S
+ * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ndk/amd64/asm.h>
+#include <ndk/amd64/asmmacro.S>
+
+.intel_syntax noprefix
+
+
+.proc atan
+ UNIMPLEMENTED atan
+ ret
+
+.endproc
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * PURPOSE: Implementation of atan2
+ * FILE: lib/sdk/crt/math/amd64/atan2.S
+ * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ndk/amd64/asm.h>
+#include <ndk/amd64/asmmacro.S>
+
+.intel_syntax noprefix
+
+
+.proc atan2
+ UNIMPLEMENTED atan2
+ ret
+
+.endproc
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * PURPOSE: Implementation of ceil
+ * FILE: lib/sdk/crt/math/amd64/ceil.S
+ * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ndk/amd64/asm.h>
+#include <ndk/amd64/asmmacro.S>
+
+.intel_syntax noprefix
+
+
+.proc ceil
+ UNIMPLEMENTED ceil
+ ret
+
+.endproc
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * PURPOSE: Implementation of tan
+ * FILE: lib/sdk/crt/math/amd64/ceilf.S
+ * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ndk/amd64/asm.h>
+#include <ndk/amd64/asmmacro.S>
+
+.intel_syntax noprefix
+
+
+.proc ceilf
+ /* Put parameter on the stack */
+ movss [rsp - 0x10], xmm0
+ fld dword ptr [rsp]
+
+ /* Change fpu control word to round up */
+ fstcw [rsp - 0x10]
+ mov eax, [rsp - 0x10]
+ or eax, 0x00800
+ and eax, 0x0fbff
+ mov [rsp - 0x08], eax
+ fldcw [rsp - 0x08]
+
+ /* Round to integer */
+ frndint
+
+ /* Restore fpu control word */
+ fldcw [rsp - 0x10]
+
+ fstp dword ptr [rsp - 0x10]
+ movss xmm0, [rsp - 0x10]
+ ret
+
+.endproc
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * PURPOSE: Implementation of cos
+ * FILE: lib/sdk/crt/math/amd64/cos.S
+ * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ndk/amd64/asm.h>
+#include <ndk/amd64/asmmacro.S>
+
+.intel_syntax noprefix
+
+
+.proc cos
+ UNIMPLEMENTED cos
+ ret
+
+.endproc
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * PURPOSE: Implementation of exp
+ * FILE: lib/sdk/crt/math/amd64/exp.S
+ * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ndk/amd64/asm.h>
+#include <ndk/amd64/asmmacro.S>
+
+.intel_syntax noprefix
+
+
+.proc exp
+ UNIMPLEMENTED exp
+ ret
+
+.endproc
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * PURPOSE: Implementation of fabs
+ * FILE: lib/sdk/crt/math/amd64/fabs.S
+ * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ndk/amd64/asm.h>
+#include <ndk/amd64/asmmacro.S>
+
+.intel_syntax noprefix
+
+
+.proc fabs
+ UNIMPLEMENTED fabs
+ ret
+
+.endproc
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * PURPOSE: Implementation of floor
+ * FILE: lib/sdk/crt/math/amd64/floor.S
+ * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ndk/amd64/asm.h>
+#include <ndk/amd64/asmmacro.S>
+
+.intel_syntax noprefix
+
+
+.proc floor
+ UNIMPLEMENTED floor
+ ret
+
+.endproc
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * PURPOSE: Implementation of tan
+ * FILE: lib/sdk/crt/math/amd64/floorf.S
+ * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ndk/amd64/asm.h>
+#include <ndk/amd64/asmmacro.S>
+
+.intel_syntax noprefix
+
+
+.proc floorf
+ /* Put parameter on the stack */
+ movss [rsp - 0x10], xmm0
+ fld dword ptr [rsp]
+
+ /* Change fpu control word to round down */
+ fstcw [rsp - 0x10]
+ mov eax, [rsp - 0x10]
+ or eax, 0x00400
+ and eax, 0x0f7ff
+ mov [rsp - 0x08], eax
+ fldcw [rsp - 0x08]
+
+ /* Round to integer */
+ frndint
+
+ /* Restore fpu control word */
+ fldcw [rsp - 0x10]
+
+ fstp dword ptr [rsp - 0x10]
+ movss xmm0, [rsp - 0x10]
+ ret
+
+.endproc
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * PURPOSE: Implementation of fmod
+ * FILE: lib/sdk/crt/math/amd64/fmod.S
+ * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ndk/amd64/asm.h>
+#include <ndk/amd64/asmmacro.S>
+
+.intel_syntax noprefix
+
+
+.proc fmod
+ UNIMPLEMENTED fmod
+ ret
+
+.endproc
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * PURPOSE: Implementation of fmodf
+ * FILE: lib/sdk/crt/math/amd64/fmodf.S
+ * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ndk/amd64/asm.h>
+#include <ndk/amd64/asmmacro.S>
+
+.intel_syntax noprefix
+
+
+.proc fmodf
+ UNIMPLEMENTED fmodf
+ ret
+
+.endproc
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * PURPOSE: Implementation of ldexp
+ * FILE: lib/sdk/crt/math/amd64/ldexp.S
+ * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ndk/amd64/asm.h>
+#include <ndk/amd64/asmmacro.S>
+
+.intel_syntax noprefix
+
+
+.proc ldexp
+ UNIMPLEMENTED ldexp
+ ret
+
+.endproc
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * PURPOSE: Implementation of log
+ * FILE: lib/sdk/crt/math/amd64/log.S
+ * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ndk/amd64/asm.h>
+#include <ndk/amd64/asmmacro.S>
+
+.intel_syntax noprefix
+
+
+.proc log
+ UNIMPLEMENTED log
+ ret
+
+.endproc
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * PURPOSE: Implementation of log10
+ * FILE: lib/sdk/crt/math/amd64/log10.S
+ * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ndk/amd64/asm.h>
+#include <ndk/amd64/asmmacro.S>
+
+.intel_syntax noprefix
+
+
+.proc log10
+ UNIMPLEMENTED log10
+ ret
+
+.endproc
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * PURPOSE: Implementation of pow
+ * FILE: lib/sdk/crt/math/amd64/pow.S
+ * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ndk/amd64/asm.h>
+#include <ndk/amd64/asmmacro.S>
+
+.intel_syntax noprefix
+
+
+.proc pow
+ UNIMPLEMENTED pow
+ ret
+
+.endproc
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * PURPOSE: Implementation of sin
+ * FILE: lib/sdk/crt/math/amd64/sin.S
+ * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ndk/amd64/asm.h>
+#include <ndk/amd64/asmmacro.S>
+
+.intel_syntax noprefix
+
+
+.proc sin
+ UNIMPLEMENTED sin
+ ret
+
+.endproc
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * PURPOSE: Implementation of sqrt
+ * FILE: lib/sdk/crt/math/amd64/sqrt.S
+ * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ndk/amd64/asm.h>
+#include <ndk/amd64/asmmacro.S>
+
+.intel_syntax noprefix
+
+
+.proc sqrt
+ UNIMPLEMENTED sqrt
+ ret
+
+.endproc
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * PURPOSE: Implementation of tan
+ * FILE: lib/sdk/crt/math/amd64/sqrtf.S
+ * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ndk/amd64/asm.h>
+#include <ndk/amd64/asmmacro.S>
+
+.intel_syntax noprefix
+
+
+.proc sqrtf
+ sqrtss xmm0, xmm0
+ ret
+.endproc
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * PURPOSE: Implementation of tan
+ * FILE: lib/sdk/crt/math/amd64/tan.S
+ * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ndk/amd64/asm.h>
+#include <ndk/amd64/asmmacro.S>
+
+.intel_syntax noprefix
+
+
+.proc tan
+ UNIMPLEMENTED tan
+ ret
+
+.endproc
+++ /dev/null
-/*
- * void *memcpy (void *to, const void *from, size_t count)
- *
- * NOTE: This code is a duplicate of memmove function from memmove_asm.s
- */
-
-.globl _memcpy
-
-_memcpy:
- push %ebp
- mov %esp,%ebp
-
- push %esi
- push %edi
-
- mov 8(%ebp),%edi
- mov 12(%ebp),%esi
- mov 16(%ebp),%ecx
-
- cmp %esi,%edi
- jbe .CopyUp
- mov %ecx,%eax
- add %esi,%eax
- cmp %eax,%edi
- jb .CopyDown
-
-.CopyUp:
- cld
-
- cmp $16,%ecx
- jb .L1
- mov %ecx,%edx
- test $3,%edi
- je .L2
-/*
- * Make the destination dword aligned
- */
- mov %edi,%ecx
- and $3,%ecx
- sub $5,%ecx
- not %ecx
- sub %ecx,%edx
- rep movsb
- mov %edx,%ecx
-.L2:
- shr $2,%ecx
- rep movsl
- mov %edx,%ecx
- and $3,%ecx
-.L1:
- test %ecx,%ecx
- je .L3
- rep movsb
-.L3:
- mov 8(%ebp),%eax
- pop %edi
- pop %esi
- leave
- ret
-
-.CopyDown:
- std
-
- add %ecx,%edi
- add %ecx,%esi
-
- cmp $16,%ecx
- jb .L4
- mov %ecx,%edx
- test $3,%edi
- je .L5
-
-/*
- * Make the destination dword aligned
- */
- mov %edi,%ecx
- and $3,%ecx
- sub %ecx,%edx
- dec %esi
- dec %edi
- rep movsb
- mov %edx,%ecx
-
- sub $3,%esi
- sub $3,%edi
-.L6:
- shr $2,%ecx
- rep movsl
- mov %edx,%ecx
- and $3,%ecx
- je .L7
- add $3,%esi
- add $3,%edi
-.L8:
- rep movsb
-.L7:
- cld
- mov 8(%ebp),%eax
- pop %edi
- pop %esi
- leave
- ret
-.L5:
- sub $4,%edi
- sub $4,%esi
- jmp .L6
-
-.L4:
- test %ecx,%ecx
- je .L7
- dec %esi
- dec %edi
- jmp .L8
-
* NOTE: This code is duplicated in memcpy_asm.s
*/
+.globl _memcpy
.globl _memmove
+_memcpy:
_memmove:
push %ebp
mov %esp,%ebp
+++ /dev/null
-#include <string.h>
-
-/* NOTE: This code is a duplicate of memmove implementation! */
-void* memcpy(void* dest, const void* src, size_t count)
-{
- char *char_dest = (char *)dest;
- char *char_src = (char *)src;
-
- if ((char_dest <= char_src) || (char_dest >= (char_src+count)))
- {
- /* non-overlapping buffers */
- while(count > 0)
- {
- *char_dest = *char_src;
- char_dest++;
- char_src++;
- count--;
- }
- }
- else
- {
- /* overlaping buffers */
- char_dest = (char *)dest + count - 1;
- char_src = (char *)src + count - 1;
-
- while(count > 0)
- {
- *char_dest = *char_src;
- char_dest--;
- char_src--;
- count--;
- }
- }
-
- return dest;
-}
ThreadData->tnext = 1;
+ memset(&ThreadData->tmbuf, sizeof(struct tm), 0);
+ memset(&ThreadData->asctimebuf, 26 * sizeof(char), 0);
+ memset(&ThreadData->wasctimebuf, 26 * sizeof(wchar_t), 0);
+
/* FIXME: init more thread local data */
}
#include <internal/mbstring.h>
#include <internal/mtdll.h>
#include <internal/rterror.h>
+#include <internal/safecrt.h>
#include <internal/time.h>
#include <internal/tls.h>
#include <internal/printf.h>
--- /dev/null
+#include <precomp.h>
+
+_invalid_parameter_handler
+_get_invalid_parameter_handler(void)
+{
+ _invalid_parameter_handler oldhandler;
+
+ if (__pInvalidArgHandler)
+ {
+ oldhandler = DecodePointer(__pInvalidArgHandler);
+ }
+ else
+ {
+ oldhandler = NULL;
+ }
+ return oldhandler;
+}
--- /dev/null
+#include <precomp.h>
+
+void * __pInvalidArgHandler = NULL;
+
+void
+_invalid_parameter_default(
+ const wchar_t * expression,
+ const wchar_t * function,
+ const wchar_t * file,
+ unsigned int line,
+ uintptr_t pReserved)
+{
+ // TODO: launch Doc Watson or something like that
+ UNIMPLEMENTED;
+ ExitProcess(-1);
+}
+
+
+// http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=98835
+void
+_invalid_parameter(
+ const wchar_t * expression,
+ const wchar_t * function,
+ const wchar_t * file,
+ unsigned int line,
+ uintptr_t pReserved)
+{
+ _invalid_parameter_handler handler;
+
+ if (__pInvalidArgHandler)
+ {
+ handler = DecodePointer(__pInvalidArgHandler);
+ }
+ else
+ {
+ handler = _invalid_parameter_default;
+ }
+ handler(expression, function, file, line, pReserved);
+}
+
+// http://cowboyprogramming.com/2007/02/22/what-is-_invalid_parameter_noinfo-and-how-do-i-get-rid-of-it/
+void
+invalid_parameter_noinfo(void)
+{
+ _invalid_parameter(0, 0, 0, 0, 0);
+}
+
--- /dev/null
+#include <precomp.h>
+
+_invalid_parameter_handler
+_set_invalid_parameter_handler(_invalid_parameter_handler newhandler)
+{
+ _invalid_parameter_handler oldhandler;
+
+ if (__pInvalidArgHandler)
+ {
+ oldhandler = DecodePointer(__pInvalidArgHandler);
+ }
+ else
+ {
+ oldhandler = NULL;
+ }
+
+ if (newhandler)
+ {
+ __pInvalidArgHandler = EncodePointer(newhandler);
+ }
+ else
+ {
+ __pInvalidArgHandler = 0;
+ }
+
+ return oldhandler;
+}
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * PURPOSE: Implementation of _setjmp/longjmp
+ * FILE: lib/sdk/crt/setjmp/amd64/setjmp.s
+ * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ndk/amd64/asm.h>
+#include <ndk/amd64/asmmacro.S>
+
+.intel_syntax noprefix
+
+#define JUMP_BUFFER_Frame 0x00
+#define JUMP_BUFFER_Rbx 0x08
+#define JUMP_BUFFER_Rsp 0x10
+#define JUMP_BUFFER_Rbp 0x18
+#define JUMP_BUFFER_Rsi 0x20
+#define JUMP_BUFFER_Rdi 0x28
+#define JUMP_BUFFER_R12 0x30
+#define JUMP_BUFFER_R13 0x38
+#define JUMP_BUFFER_R14 0x40
+#define JUMP_BUFFER_R15 0x48
+#define JUMP_BUFFER_Rip 0x50
+#define JUMP_BUFFER_Spare 0x58
+#define JUMP_BUFFER_Xmm6 0x60
+#define JUMP_BUFFER_Xmm7 0x70
+#define JUMP_BUFFER_Xmm8 0x80
+#define JUMP_BUFFER_Xmm9 0x90
+#define JUMP_BUFFER_Xmm10 0xa0
+#define JUMP_BUFFER_Xmm11 0xb0
+#define JUMP_BUFFER_Xmm12 0xc0
+#define JUMP_BUFFER_Xmm13 0xd0
+#define JUMP_BUFFER_Xmm14 0xe0
+#define JUMP_BUFFER_Xmm15 0xf0
+
+
+/* FUNCTIONS ******************************************************************/
+
+/*
+ * int _setjmp(jmp_buf env);
+ *
+ * Parameters: <rcx> - jmp_buf env
+ * Returns: 0
+ * Notes: Sets up the jmp_buf
+ */
+.proc _setjmp
+ /* Load rsp as it was before the call into rax */
+ lea rax, [rsp + 8]
+ /* Load return address into r8 */
+ mov r8, [rsp]
+ mov qword ptr [rcx + JUMP_BUFFER_Frame], 0
+ mov [rcx + JUMP_BUFFER_Rbx], rbx
+ mov [rcx + JUMP_BUFFER_Rbp], rbp
+ mov [rcx + JUMP_BUFFER_Rsi], rsi
+ mov [rcx + JUMP_BUFFER_Rdi], rdi
+ mov [rcx + JUMP_BUFFER_R12], r12
+ mov [rcx + JUMP_BUFFER_R13], r13
+ mov [rcx + JUMP_BUFFER_R14], r14
+ mov [rcx + JUMP_BUFFER_R15], r15
+ mov [rcx + JUMP_BUFFER_Rsp], rax
+ mov [rcx + JUMP_BUFFER_Rip], r8
+ movdqa [rcx + JUMP_BUFFER_Xmm6], xmm6
+ movdqa [rcx + JUMP_BUFFER_Xmm7], xmm7
+ movdqa [rcx + JUMP_BUFFER_Xmm8], xmm8
+ movdqa [rcx + JUMP_BUFFER_Xmm9], xmm9
+ movdqa [rcx + JUMP_BUFFER_Xmm10], xmm10
+ movdqa [rcx + JUMP_BUFFER_Xmm11], xmm11
+ movdqa [rcx + JUMP_BUFFER_Xmm12], xmm12
+ movdqa [rcx + JUMP_BUFFER_Xmm13], xmm13
+ movdqa [rcx + JUMP_BUFFER_Xmm14], xmm14
+ movdqa [rcx + JUMP_BUFFER_Xmm15], xmm15
+ xor rax, rax
+ ret
+.endproc
+
+/*
+ * int _setjmpex(jmp_buf _Buf,void *_Ctx);
+ *
+ * Parameters: <rcx> - jmp_buf env
+ * <rdx> - frame
+ * Returns: 0
+ * Notes: Sets up the jmp_buf
+ */
+.proc _setjmpex
+ /* Load rsp as it was before the call into rax */
+ lea rax, [rsp + 8]
+ /* Load return address into r8 */
+ mov r8, [rsp]
+ mov [rcx + JUMP_BUFFER_Frame], rdx
+ mov [rcx + JUMP_BUFFER_Rbx], rbx
+ mov [rcx + JUMP_BUFFER_Rbp], rbp
+ mov [rcx + JUMP_BUFFER_Rsi], rsi
+ mov [rcx + JUMP_BUFFER_Rdi], rdi
+ mov [rcx + JUMP_BUFFER_R12], r12
+ mov [rcx + JUMP_BUFFER_R13], r13
+ mov [rcx + JUMP_BUFFER_R14], r14
+ mov [rcx + JUMP_BUFFER_R15], r15
+ mov [rcx + JUMP_BUFFER_Rsp], rax
+ mov [rcx + JUMP_BUFFER_Rip], r8
+ movdqa [rcx + JUMP_BUFFER_Xmm6], xmm6
+ movdqa [rcx + JUMP_BUFFER_Xmm7], xmm7
+ movdqa [rcx + JUMP_BUFFER_Xmm8], xmm8
+ movdqa [rcx + JUMP_BUFFER_Xmm9], xmm9
+ movdqa [rcx + JUMP_BUFFER_Xmm10], xmm10
+ movdqa [rcx + JUMP_BUFFER_Xmm11], xmm11
+ movdqa [rcx + JUMP_BUFFER_Xmm12], xmm12
+ movdqa [rcx + JUMP_BUFFER_Xmm13], xmm13
+ movdqa [rcx + JUMP_BUFFER_Xmm14], xmm14
+ movdqa [rcx + JUMP_BUFFER_Xmm15], xmm15
+ xor rax, rax
+ ret
+.endproc
+
+
+/*
+ * void longjmp(jmp_buf env, int value);
+ *
+ * Parameters: <rcx> - jmp_buf setup by _setjmp
+ * <rdx> - int value to return
+ * Returns: Doesn't return
+ * Notes: Non-local goto
+ */
+.proc longjmp
+
+ // FIXME: handle frame
+
+ mov rbx, [rcx + JUMP_BUFFER_Rbx]
+ mov rbp, [rcx + JUMP_BUFFER_Rbp]
+ mov rsi, [rcx + JUMP_BUFFER_Rsi]
+ mov rdi, [rcx + JUMP_BUFFER_Rdi]
+ mov r12, [rcx + JUMP_BUFFER_R12]
+ mov r13, [rcx + JUMP_BUFFER_R13]
+ mov r14, [rcx + JUMP_BUFFER_R14]
+ mov r15, [rcx + JUMP_BUFFER_R15]
+ mov rsp, [rcx + JUMP_BUFFER_Rsp]
+ mov r8, [rcx + JUMP_BUFFER_Rip]
+ movdqa xmm6, [rcx + JUMP_BUFFER_Xmm6]
+ movdqa xmm7, [rcx + JUMP_BUFFER_Xmm7]
+ movdqa xmm8, [rcx + JUMP_BUFFER_Xmm8]
+ movdqa xmm9, [rcx + JUMP_BUFFER_Xmm9]
+ movdqa xmm10, [rcx + JUMP_BUFFER_Xmm10]
+ movdqa xmm11, [rcx + JUMP_BUFFER_Xmm11]
+ movdqa xmm12, [rcx + JUMP_BUFFER_Xmm12]
+ movdqa xmm13, [rcx + JUMP_BUFFER_Xmm13]
+ movdqa xmm14, [rcx + JUMP_BUFFER_Xmm14]
+ movdqa xmm15, [rcx + JUMP_BUFFER_Xmm15]
+
+ /* return param2 or 1 if it was 0 */
+ mov rax, rdx
+ test rax, rax
+ jnz 2f
+ inc rax
+2: jmp r8
+.endproc
#define LOCK_FILES() do { EnterCriticalSection(&FILE_cs); } while (0)
#define UNLOCK_FILES() do { LeaveCriticalSection(&FILE_cs); } while (0)
+FILE *__cdecl __iob_func()
+{
+ return _iob;
+}
+
static inline BOOL is_valid_fd(int fd)
{
return fd >= 0 && fd < fdend && (fdesc[fd].wxflag & WX_OPEN);
<directory name="strmiids">
<xi:include href="strmiids/strmiids.rbuild" />
</directory>
+ <directory name="strsafe">
+ <xi:include href="strsafe/strsafe.rbuild" />
+ </directory>
<directory name="uuid">
<xi:include href="uuid/uuid.rbuild" />
</directory>
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbCatA _StringCbCatA
+#include <strsafe.h>
+
+#undef StringCbCatA
+HRESULT __stdcall
+StringCbCatA(
+ STRSAFE_LPSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCSTR pszSrc)
+{
+ /* Use the inlined version */
+ return _StringCbCatA(pszDest, cbDest, pszSrc);
+}
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbCatExA _StringCbCatExA
+#include <strsafe.h>
+
+#undef StringCbCatExA
+HRESULT __stdcall
+StringCbCatExA(
+ STRSAFE_LPSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCSTR pszSrc,
+ STRSAFE_LPSTR *ppszDestEnd,
+ size_t *pcbRemaining,
+ STRSAFE_DWORD dwFlags)
+
+{
+ /* Use the inlined version */
+ return _StringCbCatExA(pszDest, cbDest, pszSrc, ppszDestEnd, pcbRemaining, dwFlags);
+}
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbCatExW _StringCbCatExW
+#include <strsafe.h>
+
+#undef StringCbCatExW
+HRESULT __stdcall
+StringCbCatExW(
+ STRSAFE_LPWSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCWSTR pszSrc,
+ STRSAFE_LPWSTR *ppszDestEnd,
+ size_t *pcbRemaining,
+ STRSAFE_DWORD dwFlags)
+
+{
+ /* Use the inlined version */
+ return _StringCbCatExW(pszDest, cbDest, pszSrc, ppszDestEnd, pcbRemaining, dwFlags);
+}
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbCatNA _StringCbCatNA
+#include <strsafe.h>
+
+#undef StringCbCatNA
+HRESULT __stdcall
+StringCbCatNA(
+ STRSAFE_LPSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCSTR pszSrc,
+ size_t cbMaxAppend)
+{
+ /* Use the inlined version */
+ return _StringCbCatNA(pszDest, cbDest, pszSrc, cbMaxAppend);
+}
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbCatNExA _StringCbCatNExA
+#include <strsafe.h>
+
+#undef StringCbCatNExA
+HRESULT __stdcall
+StringCbCatNExA(
+ STRSAFE_LPSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCSTR pszSrc,
+ size_t cbMaxAppend,
+ STRSAFE_LPSTR *ppszDestEnd,
+ size_t *pcbRemaining,
+ STRSAFE_DWORD dwFlags)
+
+{
+ /* Use the inlined version */
+ return _StringCbCatNExA(pszDest, cbDest, pszSrc, cbMaxAppend, ppszDestEnd, pcbRemaining, dwFlags);
+}
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbCatNExW _StringCbCatNExW
+#include <strsafe.h>
+
+#undef StringCbCatNExW
+HRESULT __stdcall
+StringCbCatNExW(
+ STRSAFE_LPWSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCWSTR pszSrc,
+ size_t cbMaxAppend,
+ STRSAFE_LPWSTR *ppszDestEnd,
+ size_t *pcbRemaining,
+ STRSAFE_DWORD dwFlags)
+
+{
+ /* Use the inlined version */
+ return _StringCbCatNExW(pszDest, cbDest, pszSrc, cbMaxAppend, ppszDestEnd, pcbRemaining, dwFlags);
+}
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbCatNW _StringCbCatNW
+#include <strsafe.h>
+
+#undef StringCbCatNW
+HRESULT __stdcall
+StringCbCatNW(
+ STRSAFE_LPWSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCWSTR pszSrc,
+ size_t cbMaxAppend)
+{
+ /* Use the inlined version */
+ return _StringCbCatNW(pszDest, cbDest, pszSrc, cbMaxAppend);
+}
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbCatW _StringCbCatW
+#include <strsafe.h>
+
+#undef StringCbCatW
+HRESULT __stdcall
+StringCbCatW(
+ STRSAFE_LPWSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCWSTR pszSrc)
+{
+ /* Use the inlined version */
+ return _StringCbCatW(pszDest, cbDest, pszSrc);
+}
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbCopyA _StringCbCopyA
+#include <strsafe.h>
+
+#undef StringCbCopyA
+HRESULT __stdcall
+StringCbCopyA(
+ STRSAFE_LPSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCSTR pszSrc)
+{
+ /* Use the inlined version */
+ return _StringCbCopyA(pszDest, cbDest, pszSrc);
+}
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbCopyExA _StringCbCopyExA
+#include <strsafe.h>
+
+#undef StringCbCopyExA
+HRESULT __stdcall
+StringCbCopyExA(
+ STRSAFE_LPSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCSTR pszSrc,
+ STRSAFE_LPSTR *ppszDestEnd,
+ size_t *pcbRemaining,
+ STRSAFE_DWORD dwFlags)
+{
+ /* Use the inlined version */
+ return _StringCbCopyExA(pszDest, cbDest, pszSrc, ppszDestEnd, pcbRemaining, dwFlags);
+}
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbCopyExW _StringCbCopyExW
+#include <strsafe.h>
+
+#undef StringCbCopyExW
+HRESULT __stdcall
+StringCbCopyExW(
+ STRSAFE_LPWSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCWSTR pszSrc,
+ STRSAFE_LPWSTR *ppszDestEnd,
+ size_t *pcbRemaining,
+ STRSAFE_DWORD dwFlags)
+
+{
+ /* Use the inlined version */
+ return _StringCbCopyExW(pszDest, cbDest, pszSrc, ppszDestEnd, pcbRemaining, dwFlags);
+}
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbCopyNA _StringCbCopyNA
+#include <strsafe.h>
+
+#undef StringCbCopyNA
+HRESULT __stdcall
+StringCbCopyNA(
+ STRSAFE_LPSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCSTR pszSrc,
+ size_t cbSrc)
+{
+ /* Use the inlined version */
+ return _StringCbCopyNA(pszDest, cbDest, pszSrc, cbSrc);
+}
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbCopyNExA _StringCbCopyNExA
+#include <strsafe.h>
+
+#undef StringCbCopyNExA
+HRESULT __stdcall
+StringCbCopyNExA(
+ STRSAFE_LPSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCSTR pszSrc,
+ size_t cbMaxAppend,
+ STRSAFE_LPSTR *ppszDestEnd,
+ size_t *pcbRemaining,
+ STRSAFE_DWORD dwFlags)
+
+{
+ /* Use the inlined version */
+ return _StringCbCopyNExA(pszDest, cbDest, pszSrc, cbMaxAppend, ppszDestEnd, pcbRemaining, dwFlags);
+}
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbCopyNExW _StringCbCopyNExW
+#include <strsafe.h>
+
+#undef StringCbCopyNExW
+HRESULT __stdcall
+StringCbCopyNExW(
+ STRSAFE_LPWSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCWSTR pszSrc,
+ size_t cbMaxAppend,
+ STRSAFE_LPWSTR *ppszDestEnd,
+ size_t *pcbRemaining,
+ STRSAFE_DWORD dwFlags)
+
+{
+ /* Use the inlined version */
+ return _StringCbCopyNExW(pszDest, cbDest, pszSrc, cbMaxAppend, ppszDestEnd, pcbRemaining, dwFlags);
+}
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbCopyNW _StringCbCopyNW
+#include <strsafe.h>
+
+#undef StringCbCopyNW
+HRESULT __stdcall
+StringCbCopyNW(
+ STRSAFE_LPWSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCWSTR pszSrc,
+ size_t cbSrc)
+{
+ /* Use the inlined version */
+ return _StringCbCopyNW(pszDest, cbDest, pszSrc, cbSrc);
+}
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbCopyW _StringCbCopyW
+#include <strsafe.h>
+
+#undef StringCbCopyW
+HRESULT __stdcall
+StringCbCopyW(
+ STRSAFE_LPWSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCWSTR pszSrc)
+{
+ /* Use the inlined version */
+ return _StringCbCopyW(pszDest, cbDest, pszSrc);
+}
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbGetsA _StringCbGetsA
+#include <strsafe.h>
+
+#undef StringCbGetsA
+HRESULT __stdcall
+StringCbGetsA(
+ STRSAFE_LPSTR pszDest,
+ size_t cbDest)
+{
+ /* Use the inlined version */
+ return _StringCbGetsA(pszDest, cbDest);
+}
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbGetsExA _StringCbGetsExA
+#include <strsafe.h>
+
+#undef StringCbGetsExA
+HRESULT __stdcall
+StringCbGetsExA(
+ STRSAFE_LPSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPSTR *ppszDestEnd,
+ size_t *pcbRemaining,
+ STRSAFE_DWORD dwFlags)
+{
+ /* Use the inlined version */
+ return _StringCbGetsExA(pszDest, cbDest, ppszDestEnd, pcbRemaining, dwFlags);
+}
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbGetsExW _StringCbGetsExW
+#include <strsafe.h>
+
+#undef StringCbGetsExW
+HRESULT __stdcall
+StringCbGetsExW(
+ STRSAFE_LPWSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPWSTR *ppszDestEnd,
+ size_t *pcbRemaining,
+ STRSAFE_DWORD dwFlags)
+{
+ /* Use the inlined version */
+ return _StringCbGetsExW(pszDest, cbDest, ppszDestEnd, pcbRemaining, dwFlags);
+}
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbGetsW _StringCbGetsW
+#include <strsafe.h>
+
+#undef StringCbGetsW
+HRESULT __stdcall
+StringCbGetsW(
+ STRSAFE_LPWSTR pszDest,
+ size_t cbDest)
+{
+ /* Use the inlined version */
+ return _StringCbGetsW(pszDest, cbDest);
+}
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbLengthA _StringCbLengthA
+#include <strsafe.h>
+
+#undef StringCbLengthA
+HRESULT __stdcall
+StringCbLengthA(
+ STRSAFE_LPCSTR psz,
+ size_t cbMax,
+ size_t *pcb)
+{
+ /* Use the inlined version */
+ return _StringCbLengthA(psz, cbMax, pcb);
+}
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbLengthW _StringCbLengthW
+#include <strsafe.h>
+
+#undef StringCbLengthW
+HRESULT __stdcall
+StringCbLengthW(
+ STRSAFE_LPCWSTR psz,
+ size_t cbMax,
+ size_t *pcb)
+{
+ /* Use the inlined version */
+ return _StringCbLengthW(psz, cbMax, pcb);
+}
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbPrintfA _StringCbPrintfA
+#include <strsafe.h>
+
+#undef StringCbPrintfA
+HRESULT __stdcall
+StringCbPrintfA(
+ STRSAFE_LPSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCSTR pszFormat,
+ ...)
+{
+ HRESULT result;
+ va_list args;
+ va_start(args, pszFormat);
+ result = StringCbVPrintfA(pszDest, cbDest, pszFormat, args);
+ va_end(args);
+ return result;
+}
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbPrintfExA _StringCbPrintfExA
+#include <strsafe.h>
+
+#undef StringCbPrintfExA
+HRESULT __stdcall
+StringCbPrintfExA(
+ STRSAFE_LPSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPSTR *ppszDestEnd,
+ size_t *pcbRemaining,
+ STRSAFE_DWORD dwFlags,
+ STRSAFE_LPCSTR pszFormat,
+ ...)
+{
+ HRESULT result;
+ va_list args;
+ va_start(args, pszFormat);
+ result = StringCbVPrintfExA(pszDest, cbDest, ppszDestEnd, pcbRemaining, dwFlags, pszFormat, args);
+ va_end(args);
+ return result;
+}
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbPrintfExW _StringCbPrintfExW
+#include <strsafe.h>
+
+#undef StringCbPrintfExW
+HRESULT __stdcall
+StringCbPrintfExW(
+ STRSAFE_LPWSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPWSTR *ppszDestEnd,
+ size_t *pcbRemaining,
+ STRSAFE_DWORD dwFlags,
+ STRSAFE_LPCWSTR pszFormat,
+ ...)
+{
+ HRESULT result;
+ va_list args;
+ va_start(args, pszFormat);
+ result = StringCbVPrintfExW(pszDest, cbDest, ppszDestEnd, pcbRemaining, dwFlags, pszFormat, args);
+ va_end(args);
+ return result;
+}
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbPrintfW _StringCbPrintfW
+#include <strsafe.h>
+
+#undef StringCbPrintfW
+HRESULT __stdcall
+StringCbPrintfW(
+ STRSAFE_LPWSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCWSTR pszFormat,
+ ...)
+{
+ HRESULT result;
+ va_list args;
+ va_start(args, pszFormat);
+ result = StringCbVPrintfW(pszDest, cbDest, pszFormat, args);
+ va_end(args);
+ return result;
+}
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbVPrintfA _StringCbVPrintfA
+#include <strsafe.h>
+
+#undef StringCbVPrintfA
+HRESULT __stdcall
+StringCbVPrintfA(
+ STRSAFE_LPSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCSTR pszFormat,
+ va_list args)
+{
+ /* Use the inlined version */
+ return _StringCbVPrintfA(pszDest, cbDest, pszFormat, args);
+}
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbVPrintfExA _StringCbVPrintfExA
+#include <strsafe.h>
+
+#undef StringCbVPrintfExA
+HRESULT __stdcall
+StringCbVPrintfExA(
+ STRSAFE_LPSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPSTR *ppszDestEnd,
+ size_t *pcbRemaining,
+ STRSAFE_DWORD dwFlags,
+ STRSAFE_LPCSTR pszFormat,
+ va_list args)
+{
+ /* Use the inlined version */
+ return _StringCbVPrintfExA(pszDest, cbDest, ppszDestEnd, pcbRemaining, dwFlags, pszFormat, args);
+}
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbVPrintfExW _StringCbVPrintfExW
+#include <strsafe.h>
+
+#undef StringCbVPrintfExW
+HRESULT __stdcall
+StringCbVPrintfExW(
+ STRSAFE_LPWSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPWSTR *ppszDestEnd,
+ size_t *pcbRemaining,
+ STRSAFE_DWORD dwFlags,
+ STRSAFE_LPCWSTR pszFormat,
+ va_list args)
+{
+ /* Use the inlined version */
+ return _StringCbVPrintfExW(pszDest, cbDest, ppszDestEnd, pcbRemaining, dwFlags, pszFormat, args);
+}
--- /dev/null
+#define STRSAFE_NO_CCH_FUNCTIONS
+#define StringCbVPrintfW _StringCbVPrintfW
+#include <strsafe.h>
+
+#undef StringCbVPrintfW
+HRESULT __stdcall
+StringCbVPrintfW(
+ STRSAFE_LPWSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCWSTR pszFormat,
+ va_list args)
+{
+ /* Use the inlined version */
+ return _StringCbVPrintfW(pszDest, cbDest, pszFormat, args);
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchCatA _StringCchCatA
+#include <strsafe.h>
+
+#undef StringCchCatA
+HRESULT __stdcall
+StringCchCatA(
+ STRSAFE_LPSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCSTR pszSrc)
+{
+ /* Use the inlined version */
+ return _StringCchCatA(pszDest, cbDest, pszSrc);
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchCatExA _StringCchCatExA
+#include <strsafe.h>
+
+#undef StringCchCatExA
+HRESULT __stdcall
+StringCchCatExA(
+ STRSAFE_LPSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCSTR pszSrc,
+ STRSAFE_LPSTR *ppszDestEnd,
+ size_t *pcbRemaining,
+ STRSAFE_DWORD dwFlags)
+
+{
+ /* Use the inlined version */
+ return _StringCchCatExA(pszDest, cbDest, pszSrc, ppszDestEnd, pcbRemaining, dwFlags);
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchCatExW _StringCchCatExW
+#include <strsafe.h>
+
+#undef StringCchCatExW
+HRESULT __stdcall
+StringCchCatExW(
+ STRSAFE_LPWSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCWSTR pszSrc,
+ STRSAFE_LPWSTR *ppszDestEnd,
+ size_t *pcbRemaining,
+ STRSAFE_DWORD dwFlags)
+
+{
+ /* Use the inlined version */
+ return _StringCchCatExW(pszDest, cbDest, pszSrc, ppszDestEnd, pcbRemaining, dwFlags);
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchCatNA _StringCchCatNA
+#include <strsafe.h>
+
+#undef StringCchCatNA
+HRESULT __stdcall
+StringCbCatNA(
+ STRSAFE_LPSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCSTR pszSrc,
+ size_t cbMaxAppend)
+{
+ /* Use the inlined version */
+ return _StringCchCatNA(pszDest, cbDest, pszSrc, cbMaxAppend);
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchCatNExA _StringCchCatNExA
+#include <strsafe.h>
+
+#undef StringCchCatNExA
+HRESULT __stdcall
+StringCchCatNExA(
+ STRSAFE_LPSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCSTR pszSrc,
+ size_t cbMaxAppend,
+ STRSAFE_LPSTR *ppszDestEnd,
+ size_t *pcbRemaining,
+ STRSAFE_DWORD dwFlags)
+
+{
+ /* Use the inlined version */
+ return _StringCchCatNExA(pszDest, cbDest, pszSrc, cbMaxAppend, ppszDestEnd, pcbRemaining, dwFlags);
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchCatNExW _StringCchCatNExW
+#include <strsafe.h>
+
+#undef StringCchCatNExW
+HRESULT __stdcall
+StringCchCatNExW(
+ STRSAFE_LPWSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCWSTR pszSrc,
+ size_t cbMaxAppend,
+ STRSAFE_LPWSTR *ppszDestEnd,
+ size_t *pcbRemaining,
+ STRSAFE_DWORD dwFlags)
+
+{
+ /* Use the inlined version */
+ return _StringCchCatNExW(pszDest, cbDest, pszSrc, cbMaxAppend, ppszDestEnd, pcbRemaining, dwFlags);
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchCatNW _StringCchCatNW
+#include <strsafe.h>
+
+#undef StringCchCatNW
+HRESULT __stdcall
+StringCchCatNW(
+ STRSAFE_LPWSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCWSTR pszSrc,
+ size_t cbMaxAppend)
+{
+ /* Use the inlined version */
+ return _StringCchCatNW(pszDest, cbDest, pszSrc, cbMaxAppend);
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchCatW _StringCchCatW
+#include <strsafe.h>
+
+#undef StringCchCatW
+HRESULT __stdcall
+StringCchCatW(
+ STRSAFE_LPWSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCWSTR pszSrc)
+{
+ /* Use the inlined version */
+ return _StringCchCatW(pszDest, cbDest, pszSrc);
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchCopyA _StringCchCopyA
+#include <strsafe.h>
+
+#undef StringCchCopyA
+HRESULT __stdcall
+StringCbCopyA(
+ STRSAFE_LPSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCSTR pszSrc)
+{
+ /* Use the inlined version */
+ return _StringCchCopyA(pszDest, cbDest, pszSrc);
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchCopyExA _StringCchCopyExA
+#include <strsafe.h>
+
+#undef StringCchCopyExA
+HRESULT __stdcall
+StringCchCopyExA(
+ STRSAFE_LPSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCSTR pszSrc,
+ STRSAFE_LPSTR *ppszDestEnd,
+ size_t *pcbRemaining,
+ STRSAFE_DWORD dwFlags)
+{
+ /* Use the inlined version */
+ return _StringCchCopyExA(pszDest, cbDest, pszSrc, ppszDestEnd, pcbRemaining, dwFlags);
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchCopyExW _StringCchCopyExW
+#include <strsafe.h>
+
+#undef StringCchCopyExW
+HRESULT __stdcall
+StringCchCopyExW(
+ STRSAFE_LPWSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCWSTR pszSrc,
+ STRSAFE_LPWSTR *ppszDestEnd,
+ size_t *pcbRemaining,
+ STRSAFE_DWORD dwFlags)
+
+{
+ /* Use the inlined version */
+ return _StringCchCopyExW(pszDest, cbDest, pszSrc, ppszDestEnd, pcbRemaining, dwFlags);
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchCopyNA _StringCchCopyNA
+#include <strsafe.h>
+
+#undef StringCchCopyNA
+HRESULT __stdcall
+StringCchCopyNA(
+ STRSAFE_LPSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCSTR pszSrc,
+ size_t cbSrc)
+{
+ /* Use the inlined version */
+ return _StringCchCopyNA(pszDest, cbDest, pszSrc, cbSrc);
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchCopyNExA _StringCchCopyNExA
+#include <strsafe.h>
+
+#undef StringCchCopyNExA
+HRESULT __stdcall
+StringCchCopyNExA(
+ STRSAFE_LPSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCSTR pszSrc,
+ size_t cbMaxAppend,
+ STRSAFE_LPSTR *ppszDestEnd,
+ size_t *pcbRemaining,
+ STRSAFE_DWORD dwFlags)
+
+{
+ /* Use the inlined version */
+ return _StringCchCopyNExA(pszDest, cbDest, pszSrc, cbMaxAppend, ppszDestEnd, pcbRemaining, dwFlags);
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchCopyNExW _StringCchCopyNExW
+#include <strsafe.h>
+
+#undef StringCchCopyNExW
+HRESULT __stdcall
+StringCchCopyNExW(
+ STRSAFE_LPWSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCWSTR pszSrc,
+ size_t cbMaxAppend,
+ STRSAFE_LPWSTR *ppszDestEnd,
+ size_t *pcbRemaining,
+ STRSAFE_DWORD dwFlags)
+
+{
+ /* Use the inlined version */
+ return _StringCchCopyNExW(pszDest, cbDest, pszSrc, cbMaxAppend, ppszDestEnd, pcbRemaining, dwFlags);
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchCopyNW _StringCchCopyNW
+#include <strsafe.h>
+
+#undef StringCchCopyNW
+HRESULT __stdcall
+StringCchCopyNW(
+ STRSAFE_LPWSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCWSTR pszSrc,
+ size_t cbSrc)
+{
+ /* Use the inlined version */
+ return _StringCchCopyNW(pszDest, cbDest, pszSrc, cbSrc);
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchCopyW _StringCchCopyW
+#include <strsafe.h>
+
+#undef StringCchCopyW
+HRESULT __stdcall
+StringCchCopyW(
+ STRSAFE_LPWSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCWSTR pszSrc)
+{
+ /* Use the inlined version */
+ return _StringCchCopyW(pszDest, cbDest, pszSrc);
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchGetsA _StringCchGetsA
+#include <strsafe.h>
+
+#undef StringCchGetsA
+HRESULT __stdcall
+StringCchGetsA(
+ STRSAFE_LPSTR pszDest,
+ size_t cbDest)
+{
+ /* Use the inlined version */
+ return _StringCchGetsA(pszDest, cbDest);
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchGetsExA _StringCchGetsExA
+#include <strsafe.h>
+
+#undef StringCchGetsExA
+HRESULT __stdcall
+StringCchGetsExA(
+ STRSAFE_LPSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPSTR *ppszDestEnd,
+ size_t *pcbRemaining,
+ STRSAFE_DWORD dwFlags)
+{
+ /* Use the inlined version */
+ return _StringCchGetsExA(pszDest, cbDest, ppszDestEnd, pcbRemaining, dwFlags);
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchGetsExW _StringCchGetsExW
+#include <strsafe.h>
+
+#undef StringCchGetsExW
+HRESULT __stdcall
+StringCchGetsExW(
+ STRSAFE_LPWSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPWSTR *ppszDestEnd,
+ size_t *pcbRemaining,
+ STRSAFE_DWORD dwFlags)
+{
+ /* Use the inlined version */
+ return _StringCchGetsExW(pszDest, cbDest, ppszDestEnd, pcbRemaining, dwFlags);
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchGetsW _StringCchGetsW
+#include <strsafe.h>
+
+#undef StringCchGetsW
+HRESULT __stdcall
+StringCchGetsW(
+ STRSAFE_LPWSTR pszDest,
+ size_t cbDest)
+{
+ /* Use the inlined version */
+ return _StringCchGetsW(pszDest, cbDest);
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchLengthA _StringCchLengthA
+#include <strsafe.h>
+
+#undef StringCchLengthA
+HRESULT __stdcall
+StringCchLengthA(
+ STRSAFE_LPCSTR psz,
+ size_t cbMax,
+ size_t *pcb)
+{
+ /* Use the inlined version */
+ return _StringCchLengthA(psz, cbMax, pcb);
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchLengthW _StringCchLengthW
+#include <strsafe.h>
+
+#undef StringCchLengthW
+HRESULT __stdcall
+StringCchLengthW(
+ STRSAFE_LPCWSTR psz,
+ size_t cbMax,
+ size_t *pcb)
+{
+ /* Use the inlined version */
+ return _StringCchLengthW(psz, cbMax, pcb);
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchPrintfA _StringCchPrintfA
+#include <strsafe.h>
+
+#undef StringCchPrintfA
+HRESULT __stdcall
+StringCchPrintfA(
+ STRSAFE_LPSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCSTR pszFormat,
+ ...)
+{
+ HRESULT result;
+ va_list args;
+ va_start(args, pszFormat);
+ result = StringCchVPrintfA(pszDest, cbDest, pszFormat, args);
+ va_end(args);
+ return result;
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchPrintfExA _StringCchPrintfExA
+#include <strsafe.h>
+
+#undef StringCchPrintfExA
+HRESULT __stdcall
+StringCchPrintfExA(
+ STRSAFE_LPSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPSTR *ppszDestEnd,
+ size_t *pcbRemaining,
+ STRSAFE_DWORD dwFlags,
+ STRSAFE_LPCSTR pszFormat,
+ ...)
+{
+ HRESULT result;
+ va_list args;
+ va_start(args, pszFormat);
+ result = StringCchVPrintfExA(pszDest, cbDest, ppszDestEnd, pcbRemaining, dwFlags, pszFormat, args);
+ va_end(args);
+ return result;
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchPrintfExW _StringCchPrintfExW
+#include <strsafe.h>
+
+#undef StringCchPrintfExW
+HRESULT __stdcall
+StringCchPrintfExW(
+ STRSAFE_LPWSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPWSTR *ppszDestEnd,
+ size_t *pcbRemaining,
+ STRSAFE_DWORD dwFlags,
+ STRSAFE_LPCWSTR pszFormat,
+ ...)
+{
+ HRESULT result;
+ va_list args;
+ va_start(args, pszFormat);
+ result = StringCchVPrintfExW(pszDest, cbDest, ppszDestEnd, pcbRemaining, dwFlags, pszFormat, args);
+ va_end(args);
+ return result;
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchPrintfW _StringCchPrintfW
+#include <strsafe.h>
+
+#undef StringCchPrintfW
+HRESULT __stdcall
+StringCchPrintfW(
+ STRSAFE_LPWSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCWSTR pszFormat,
+ ...)
+{
+ HRESULT result;
+ va_list args;
+ va_start(args, pszFormat);
+ result = StringCchVPrintfW(pszDest, cbDest, pszFormat, args);
+ va_end(args);
+ return result;
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchVPrintfA _StringCchVPrintfA
+#include <strsafe.h>
+
+#undef StringCchVPrintfA
+HRESULT __stdcall
+StringCchVPrintfA(
+ STRSAFE_LPSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCSTR pszFormat,
+ va_list args)
+{
+ /* Use the inlined version */
+ return _StringCchVPrintfA(pszDest, cbDest, pszFormat, args);
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchVPrintfExA _StringCchVPrintfExA
+#include <strsafe.h>
+
+#undef StringCchVPrintfExA
+HRESULT __stdcall
+StringCchVPrintfExA(
+ STRSAFE_LPSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPSTR *ppszDestEnd,
+ size_t *pcbRemaining,
+ STRSAFE_DWORD dwFlags,
+ STRSAFE_LPCSTR pszFormat,
+ va_list args)
+{
+ /* Use the inlined version */
+ return _StringCchVPrintfExA(pszDest, cbDest, ppszDestEnd, pcbRemaining, dwFlags, pszFormat, args);
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchVPrintfExW _StringCchVPrintfExW
+#include <strsafe.h>
+
+#undef StringCchVPrintfExW
+HRESULT __stdcall
+StringCchVPrintfExW(
+ STRSAFE_LPWSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPWSTR *ppszDestEnd,
+ size_t *pcbRemaining,
+ STRSAFE_DWORD dwFlags,
+ STRSAFE_LPCWSTR pszFormat,
+ va_list args)
+{
+ /* Use the inlined version */
+ return _StringCchVPrintfExW(pszDest, cbDest, ppszDestEnd, pcbRemaining, dwFlags, pszFormat, args);
+}
--- /dev/null
+#define STRSAFE_NO_CB_FUNCTIONS
+#define StringCchVPrintfW _StringCchVPrintfW
+#include <strsafe.h>
+
+#undef StringCchVPrintfW
+HRESULT __stdcall
+StringCchVPrintfW(
+ STRSAFE_LPWSTR pszDest,
+ size_t cbDest,
+ STRSAFE_LPCWSTR pszFormat,
+ va_list args)
+{
+ /* Use the inlined version */
+ return _StringCchVPrintfW(pszDest, cbDest, pszFormat, args);
+}
--- /dev/null
+<?xml version="1.0"?>
+<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
+<module name="strsafe" type="staticlibrary">
+ <define name="_DISABLE_TIDENTS" />
+ <file>StringCbCatA.c</file>
+ <file>StringCbCatW.c</file>
+ <file>StringCbCatExA.c</file>
+ <file>StringCbCatExW.c</file>
+ <file>StringCbCatNA.c</file>
+ <file>StringCbCatNW.c</file>
+ <file>StringCbCatNExA.c</file>
+ <file>StringCbCatNExW.c</file>
+ <file>StringCbCopyA.c</file>
+ <file>StringCbCopyW.c</file>
+ <file>StringCbCopyExA.c</file>
+ <file>StringCbCopyExW.c</file>
+ <file>StringCbCopyNA.c</file>
+ <file>StringCbCopyNW.c</file>
+ <file>StringCbCopyNExA.c</file>
+ <file>StringCbCopyNExW.c</file>
+ <file>StringCbGetsA.c</file>
+ <file>StringCbGetsW.c</file>
+ <file>StringCbGetsExA.c</file>
+ <file>StringCbGetsExW.c</file>
+ <file>StringCbLengthA.c</file>
+ <file>StringCbLengthW.c</file>
+ <file>StringCbPrintfA.c</file>
+ <file>StringCbPrintfW.c</file>
+ <file>StringCbPrintfExA.c</file>
+ <file>StringCbPrintfExW.c</file>
+ <file>StringCbVPrintfA.c</file>
+ <file>StringCbVPrintfW.c</file>
+ <file>StringCbVPrintfExA.c</file>
+ <file>StringCbVPrintfExW.c</file>
+ <file>StringCchCatA.c</file>
+ <file>StringCchCatW.c</file>
+ <file>StringCchCatExA.c</file>
+ <file>StringCchCatExW.c</file>
+ <file>StringCchCatNA.c</file>
+ <file>StringCchCatNW.c</file>
+ <file>StringCchCatNExA.c</file>
+ <file>StringCchCatNExW.c</file>
+ <file>StringCchCopyA.c</file>
+ <file>StringCchCopyW.c</file>
+ <file>StringCchCopyExA.c</file>
+ <file>StringCchCopyExW.c</file>
+ <file>StringCchCopyNA.c</file>
+ <file>StringCchCopyNW.c</file>
+ <file>StringCchCopyNExA.c</file>
+ <file>StringCchCopyNExW.c</file>
+ <file>StringCchGetsA.c</file>
+ <file>StringCchGetsW.c</file>
+ <file>StringCchGetsExA.c</file>
+ <file>StringCchGetsExW.c</file>
+ <file>StringCchLengthA.c</file>
+ <file>StringCchLengthW.c</file>
+ <file>StringCchPrintfA.c</file>
+ <file>StringCchPrintfW.c</file>
+ <file>StringCchPrintfExA.c</file>
+ <file>StringCchPrintfExW.c</file>
+ <file>StringCchVPrintfA.c</file>
+ <file>StringCchVPrintfW.c</file>
+ <file>StringCchVPrintfExA.c</file>
+ <file>StringCchVPrintfExW.c</file>
+</module>
<?xml version="1.0"?>
<!DOCTYPE group SYSTEM "../../tools/rbuild/project.dtd">
<group>
- <installfile installbase="inf">audio.inf</installfile>
<installfile installbase="inf">acpi.inf</installfile>
+ <installfile installbase="inf">audio.inf</installfile>
<installfile installbase="inf">cdrom.inf</installfile>
+ <installfile installbase="inf">cpu.inf</installfile>
<installfile installbase="inf">display.inf</installfile>
+ <installfile installbase="inf">fdc.inf</installfile>
<installfile installbase="inf">font.inf</installfile>
<installfile installbase="inf">hdc.inf</installfile>
<installfile installbase="inf">intl.inf</installfile>
<installfile installbase="inf">ports.inf</installfile>
<installfile installbase="inf">scsi.inf</installfile>
<installfile installbase="inf" root="output">syssetup.inf</installfile>
+ <installfile installbase="inf">usb.inf</installfile>
<installfile installbase="inf">usbport.inf</installfile>
<installfile installbase="inf">usbstor.inf</installfile>
<installfile installbase="inf">xboxdisp.inf</installfile>
/* GLOBALS *******************************************************************/
-static PFN_TYPE CcZeroPage = 0;
+static PFN_NUMBER CcZeroPage = 0;
#define MAX_ZERO_LENGTH (256 * 1024)
#define MAX_RW_LENGTH (256 * 1024)
PCACHE_SEGMENT current2;
ULONG current_size;
ULONG i;
- PPFN_TYPE MdlPages;
+ PPFN_NUMBER MdlPages;
/*
* Count the maximum number of bytes we could read starting
Mdl->MdlFlags |= (MDL_PAGES_LOCKED | MDL_IO_PAGE_READ);
current2 = current;
current_size = 0;
- MdlPages = (PPFN_TYPE)(Mdl + 1);
+ MdlPages = (PPFN_NUMBER)(Mdl + 1);
while (current2 != NULL && !current2->Valid && current_size < MAX_RW_LENGTH)
{
PVOID address = current2->BaseAddress;
{
CurrentLength = Length;
}
- MmInitializeMdl(Mdl, (PVOID)WriteOffset.u.LowPart, CurrentLength);
+ MmInitializeMdl(Mdl, (PVOID)(ULONG_PTR)WriteOffset.QuadPart, CurrentLength);
Mdl->MdlFlags |= (MDL_PAGES_LOCKED | MDL_IO_PAGE_READ);
for (i = 0; i < ((Mdl->Size - sizeof(MDL)) / sizeof(ULONG)); i++)
{
- ((PPFN_TYPE)(Mdl + 1))[i] = CcZeroPage;
+ ((PPFN_NUMBER)(Mdl + 1))[i] = CcZeroPage;
}
KeInitializeEvent(&Event, NotificationEvent, FALSE);
Status = IoSynchronousPageWrite(FileObject, Mdl, &WriteOffset, &Event, &Iosb);
KeReleaseGuardedMutex(&ViewLock);
for (i = 0; i < current->Bcb->CacheSegmentSize / PAGE_SIZE; i++)
{
- PFN_TYPE Page;
- Page = (PFN_TYPE)(MmGetPhysicalAddress((char*)current->BaseAddress + i * PAGE_SIZE).QuadPart >> PAGE_SHIFT);
+ PFN_NUMBER Page;
+ Page = (PFN_NUMBER)(MmGetPhysicalAddress((char*)current->BaseAddress + i * PAGE_SIZE).QuadPart >> PAGE_SHIFT);
Status = MmPageOutPhysicalAddress(Page);
}
KeAcquireGuardedMutex(&ViewLock);
#else
static VOID
CcFreeCachePage(PVOID Context, MEMORY_AREA* MemoryArea, PVOID Address,
- PFN_TYPE Page, SWAPENTRY SwapEntry, BOOLEAN Dirty)
+ PFN_NUMBER Page, SWAPENTRY SwapEntry, BOOLEAN Dirty)
{
ASSERT(SwapEntry == 0);
if (Page != 0)
ULONG i;
ULONG RegionSize;
ULONG Base;
- PFN_TYPE Page;
+ PFN_NUMBER Page;
KIRQL oldIrql;
#endif
DPRINT("Freeing cache segment 0x%p\n", CacheSeg);
for (i = 0; i < 4; i++)
{
/* Add it into the list */
- if (!InterlockedCompareExchangePointer(&KeyBody->KeyControlBlock->
+ if (!InterlockedCompareExchangePointer((PVOID*)&KeyBody->KeyControlBlock->
KeyBodyArray[i],
KeyBody,
NULL))
for (i = 0; i < 4; i++)
{
/* Add it into the list */
- if (InterlockedCompareExchangePointer(&KeyBody->KeyControlBlock->
+ if (InterlockedCompareExchangePointer((VOID*)&KeyBody->KeyControlBlock->
KeyBodyArray[i],
NULL,
KeyBody) == KeyBody)
PAGED_CODE();
/* Get the hive index, make sure it makes sense */
- i = (ULONG)StartContext;
+ i = PtrToUlong(StartContext);
ASSERT(CmpMachineHiveList[i].Name != NULL);
/* We were started */
0,
NULL,
CmpLoadHiveThread,
- (PVOID)i);
+ UlongToPtr(i));
if (NT_SUCCESS(Status))
{
/* We don't care about the handle -- the thread self-terminates */
PVOID
NTAPI
-CmpAllocate(IN ULONG Size,
+CmpAllocate(IN SIZE_T Size,
IN BOOLEAN Paged,
IN ULONG Tag)
{
if (Prcb->VendorString)
{
/* Convert it to Unicode */
- RtlInitAnsiString(&TempString, Prcb->VendorString);
+ RtlInitAnsiString(&TempString, (PCHAR)Prcb->VendorString);
RtlAnsiStringToUnicodeString(&Data, &TempString, TRUE);
/* Add it to the registry */
wcsncpy(Teb->StaticUnicodeBuffer,
L"ntdll.dll",
sizeof(Teb->StaticUnicodeBuffer) / sizeof(WCHAR));
- Teb->Tib.ArbitraryUserPointer = Teb->StaticUnicodeBuffer;
+ Teb->NtTib.ArbitraryUserPointer = Teb->StaticUnicodeBuffer;
/* Return it in the debug event as well */
- LoadDll->NamePointer = &Teb->Tib.ArbitraryUserPointer;
+ LoadDll->NamePointer = &Teb->NtTib.ArbitraryUserPointer;
}
/* Get a handle */
--- /dev/null
+/*
+ * PROJECT: ReactOS Kernel
+ * LICENSE: BSD - See COPYING.ARM in the top level directory
+ * FILE: ntoskrnl/ex/fastinterlck.c
+ * PURPOSE: Portable Ex*Interlocked and REGISTER routines for amd64
+ * PROGRAMMERS: ReactOS Portable Systems Group
+ * Timo Kreuzer
+ */
+
+/* INCLUDES *******************************************************************/
+
+#include <ntoskrnl.h>
+#define NDEBUG
+#include <debug.h>
+
+#undef ExInterlockedAddLargeInteger
+#undef ExInterlockedAddUlong
+#undef ExInterlockedExtendZone
+#undef ExInterlockedInsertHeadList
+#undef ExInterlockedInsertTailList
+#undef ExInterlockedPopEntryList
+#undef ExInterlockedPushEntryList
+#undef ExInterlockedRemoveHeadList
+#undef ExpInterlockedFlushSList
+#undef ExpInterlockedPopEntrySList
+#undef ExpInterlockedPushEntrySList
+
+/* FUNCTIONS ******************************************************************/
+
+LARGE_INTEGER
+ExInterlockedAddLargeInteger(IN PLARGE_INTEGER Addend,
+ IN LARGE_INTEGER Increment,
+ IN PKSPIN_LOCK Lock)
+{
+ LARGE_INTEGER Int;
+ Int.QuadPart = _InterlockedExchangeAdd64(&Addend->QuadPart,
+ Increment.QuadPart);
+ return Int;
+}
+
+ULONG
+ExInterlockedAddUlong(IN PULONG Addend,
+ IN ULONG Increment,
+ PKSPIN_LOCK Lock)
+{
+ return (ULONG)_InterlockedExchangeAdd((PLONG)Addend, Increment);
+}
+
+PLIST_ENTRY
+ExInterlockedInsertHeadList(IN PLIST_ENTRY ListHead,
+ IN PLIST_ENTRY ListEntry,
+ IN PKSPIN_LOCK Lock)
+{
+ KIRQL OldIrql;
+ PLIST_ENTRY OldHead = NULL;
+ KeAcquireSpinLock(Lock, &OldIrql);
+ if (!IsListEmpty(ListHead)) OldHead = ListEntry->Flink;
+ InsertHeadList(ListHead, ListEntry);
+ KeReleaseSpinLock(Lock, OldIrql);
+ return OldHead;
+}
+
+PLIST_ENTRY
+ExInterlockedInsertTailList(IN PLIST_ENTRY ListHead,
+ IN PLIST_ENTRY ListEntry,
+ IN PKSPIN_LOCK Lock)
+{
+ KIRQL OldIrql;
+ PLIST_ENTRY OldHead = NULL;
+ KeAcquireSpinLock(Lock, &OldIrql);
+ if (!IsListEmpty(ListHead)) OldHead = ListEntry->Blink;
+ InsertTailList(ListHead, ListEntry);
+ KeReleaseSpinLock(Lock, OldIrql);
+ return OldHead;
+}
+
+PSINGLE_LIST_ENTRY
+ExInterlockedPopEntryList(IN PSINGLE_LIST_ENTRY ListHead,
+ IN PKSPIN_LOCK Lock)
+{
+ KIRQL OldIrql;
+ PSINGLE_LIST_ENTRY OldHead = NULL;
+ KeAcquireSpinLock(Lock, &OldIrql);
+ if (!ListHead->Next) OldHead = PopEntryList(ListHead);
+ KeReleaseSpinLock(Lock, OldIrql);
+ return OldHead;
+}
+
+PSINGLE_LIST_ENTRY
+ExInterlockedPushEntryList(IN PSINGLE_LIST_ENTRY ListHead,
+ IN PSINGLE_LIST_ENTRY ListEntry,
+ IN PKSPIN_LOCK Lock)
+{
+ KIRQL OldIrql;
+ PSINGLE_LIST_ENTRY OldHead = NULL;
+ KeAcquireSpinLock(Lock, &OldIrql);
+ if (!ListHead->Next) OldHead = PushEntryList(ListHead, ListEntry);
+ KeReleaseSpinLock(Lock, OldIrql);
+ return OldHead;
+}
+
+PLIST_ENTRY
+ExInterlockedRemoveHeadList(IN PLIST_ENTRY ListHead,
+ IN PKSPIN_LOCK Lock)
+{
+ KIRQL OldIrql;
+ PLIST_ENTRY OldHead = NULL;
+ KeAcquireSpinLock(Lock, &OldIrql);
+ if (!IsListEmpty(ListHead)) OldHead = RemoveHeadList(ListHead);
+ KeReleaseSpinLock(Lock, OldIrql);
+ return OldHead;
+}
+
EventInformation,
EventInformationLength,
ReturnLength,
+ NULL,
PreviousMode);
if(!NT_SUCCESS(Status))
{
{
Entry->Next = FirstEntry;
NextEntry = FirstEntry;
- FirstEntry = (PVOID)_InterlockedCompareExchange((PLONG)Head,
- (LONG)Entry,
- (LONG)FirstEntry);
+ FirstEntry = InterlockedCompareExchangePointer((PVOID*)Head,
+ (PVOID)Entry,
+ (PVOID)FirstEntry);
} while (FirstEntry != NextEntry);
return FirstEntry;
if (!FirstEntry) return NULL;
NextEntry = FirstEntry;
- FirstEntry = (PVOID)_InterlockedCompareExchange((PLONG)Head,
- (LONG)FirstEntry->Next,
- (LONG)FirstEntry);
+ FirstEntry = InterlockedCompareExchangePointer((PVOID*)Head,
+ (PVOID)FirstEntry->Next,
+ (PVOID)FirstEntry);
} while (FirstEntry != NextEntry);
return FirstEntry;
FASTCALL
ExInterlockedFlushSList(IN PSLIST_HEADER ListHead)
{
- return (PVOID)_InterlockedExchange((PLONG)&ListHead->Next.Next, (LONG)NULL);
+ return InterlockedExchangePointer((PVOID*)&ListHead->Next.Next, NULL);
}
PSLIST_ENTRY
/* Write the new level and attempt to change the table code */
TableBase = ((ULONG_PTR)Mid) | 1;
- Value = InterlockedExchangePointer(&HandleTable->TableCode, TableBase);
+ Value = InterlockedExchangePointer((PVOID*)&HandleTable->TableCode, (PVOID)TableBase);
}
else if (TableLevel == 1)
{
if (!Low) return FALSE;
/* Update the table */
- Value = InterlockedExchangePointer(&SecondLevel[i], Low);
+ Value = InterlockedExchangePointer((PVOID*)&SecondLevel[i], Low);
ASSERT(Value == NULL);
}
else
/* Write the new table and change the table code */
TableBase = ((ULONG_PTR)High) | 2;
- Value = InterlockedExchangePointer(&HandleTable->TableCode,
+ Value = InterlockedExchangePointer((PVOID*)&HandleTable->TableCode,
(PVOID)TableBase);
}
}
if (!Mid) return FALSE;
/* Update the table pointer */
- Value = InterlockedExchangePointer(&ThirdLevel[i], Mid);
+ Value = InterlockedExchangePointer((PVOID*)&ThirdLevel[i], Mid);
ASSERT(Value == NULL);
}
else
if (!Low) return FALSE;
/* Update the table pointer */
- Value = InterlockedExchangePointer(&ThirdLevel[i][j], Low);
+ Value = InterlockedExchangePointer((PVOID*)&ThirdLevel[i][j], Low);
ASSERT(Value == NULL);
}
}
/* It's not locked, remove the lock bit to lock it */
NewValue = OldValue & ~EXHANDLE_TABLE_ENTRY_LOCK_BIT;
if (InterlockedCompareExchangePointer(&HandleTableEntry->Object,
- NewValue,
- OldValue) == (PVOID)OldValue)
+ (PVOID)NewValue,
+ (PVOID)OldValue) == (PVOID)OldValue)
{
/* We locked it, get out */
return TRUE;
}
/* Clear the handle */
- Object = InterlockedExchangePointer(&HandleTableEntry->Object, NULL);
+ Object = InterlockedExchangePointer((PVOID*)&HandleTableEntry->Object, NULL);
/* Sanity checks */
ASSERT(Object != NULL);
IN ULONG ValidResponseOptions,
OUT PULONG Response)
{
- ULONG Size;
+ SIZE_T Size;
UNICODE_STRING CapturedParams[MAXIMUM_HARDERROR_PARAMETERS];
ULONG i;
PULONG_PTR UserData = NULL, ParameterBase;
ULONG ExpAnsiCodePageDataOffset, ExpOemCodePageDataOffset;
ULONG ExpUnicodeCaseTableDataOffset;
NLSTABLEINFO ExpNlsTableInfo;
-ULONG ExpNlsTableSize;
+SIZE_T ExpNlsTableSize;
PVOID ExpNlsSectionPointer;
/* CMOS Timer Sanity */
NTSTATUS Status;
HANDLE NlsSection;
PVOID SectionBase = NULL;
- ULONG ViewSize = 0;
+ SIZE_T ViewSize = 0;
LARGE_INTEGER SectionOffset = {{0, 0}};
PLIST_ENTRY ListHead, NextEntry;
PMEMORY_ALLOCATION_DESCRIPTOR MdBlock;
OUT PCHAR *ProcessEnvironment)
{
NTSTATUS Status;
- ULONG Size;
+ SIZE_T Size;
PWSTR p;
UNICODE_STRING NullString = RTL_CONSTANT_STRING(L"");
UNICODE_STRING SmssName, Environment, SystemDriveString, DebugString;
PLDR_DATA_TABLE_ENTRY NtosEntry;
PRTL_MESSAGE_RESOURCE_ENTRY MsgEntry;
ANSI_STRING CsdString;
- ULONG Remaining = 0;
+ SIZE_T Remaining = 0;
PCHAR RcEnd = NULL;
CHAR VersionBuffer [65];
}
/* Make sure interrupts are active now */
- _enable();
+// FIXME HAX!!!
+ //_enable();
/* Clear the crypto exponent */
SharedUserData->CryptoExponent = 0;
PCHAR StringBuffer, EndBuffer, BeginBuffer, MpString = "";
PINIT_BUFFER InitBuffer;
ANSI_STRING TempString;
- ULONG LastTzBias, Size, Length, YearHack = 0, Disposition, MessageCode = 0;
+ ULONG LastTzBias, Size, YearHack = 0, Disposition, MessageCode = 0;
+ SIZE_T Length;
PRTL_USER_PROCESS_INFORMATION ProcessInfo;
KEY_VALUE_PARTIAL_INFORMATION KeyPartialInfo;
UNICODE_STRING KeyName, DebugString;
KeyValuePartialInformation,
&KeyPartialInfo,
sizeof(KeyPartialInfo),
- &Length);
+ &Size);
if (!NT_SUCCESS(Status)) AlternateShell = FALSE;
}
ZwClose(ProcessInfo->ProcessHandle);
/* Free the initial process environment */
- Size = 0;
+ Length = 0;
ZwFreeVirtualMemory(NtCurrentProcess(),
(PVOID*)&Environment,
- &Size,
+ &Length,
MEM_RELEASE);
/* Free the initial process parameters */
- Size = 0;
+ Length = 0;
ZwFreeVirtualMemory(NtCurrentProcess(),
(PVOID*)&ProcessParameters,
- &Size,
+ &Length,
MEM_RELEASE);
/* Increase init phase */
List->Depth = 2;
List->Allocate = ExAllocatePoolWithTag;
List->Free = ExFreePool;
- List->ListHead.Next.Next = NULL;
- List->ListHead.Depth = 0;
- List->ListHead.Sequence = 0;
+ InitializeSListHead(&List->ListHead);
List->TotalAllocates = 0;
List->AllocateHits = 0;
List->TotalFrees = 0;
MutantInformation,
MutantInformationLength,
ResultLength,
+ NULL,
PreviousMode);
if(!NT_SUCCESS(Status))
{
/* PRIVATE FUNCTIONS *********************************************************/
+#ifdef _WIN64
+#define InterlockedAndPointer(ptr,val) InterlockedAnd64((PLONGLONG)ptr,(LONGLONG)val)
+#else
+#define InterlockedAndPointer(ptr,val) InterlockedAnd((PLONG)ptr,(LONG)val)
+#endif
+
/*++
* @name ExpInitializePushLocks
*
ASSERT(NewValue.Waiting);
/* Write the New Value */
- NewValue.Ptr = InterlockedCompareExchangePointer(PushLock,
+ NewValue.Ptr = InterlockedCompareExchangePointer(&PushLock->Ptr,
NewValue.Ptr,
OldValue.Ptr);
if (NewValue.Value == OldValue.Value) return;
}
/* Save the First Block */
- FirstWaitBlock = (PEX_PUSH_LOCK_WAIT_BLOCK)((ULONG_PTR)OldValue.Ptr &
+ FirstWaitBlock = (PEX_PUSH_LOCK_WAIT_BLOCK)(OldValue.Value &
~EX_PUSH_LOCK_PTR_BITS);
WaitBlock = FirstWaitBlock;
ASSERT(!NewValue.Waking);
/* Write the New Value */
- NewValue.Ptr = InterlockedCompareExchangePointer(PushLock,
+ NewValue.Ptr = InterlockedCompareExchangePointer(&PushLock->Ptr,
NewValue.Ptr,
OldValue.Ptr);
if (NewValue.Value == OldValue.Value) break;
ASSERT(PushLock->Waiting);
/* Remove waking bit from pushlock */
- InterlockedAnd((PLONG)PushLock, ~EX_PUSH_LOCK_WAKING);
+ InterlockedAndPointer(&PushLock->Value, ~EX_PUSH_LOCK_WAKING);
/* Leave the loop */
break;
}
/* Get the wait block */
- WaitBlock = (PEX_PUSH_LOCK_WAIT_BLOCK)((ULONG_PTR)OldValue.Ptr &
+ WaitBlock = (PEX_PUSH_LOCK_WAIT_BLOCK)(OldValue.Value &
~EX_PUSH_LOCK_PTR_BITS);
/* Loop the blocks */
ASSERT(!NewValue.Waking);
/* Update the value */
- NewValue.Ptr = InterlockedCompareExchangePointer(PushLock,
+ NewValue.Ptr = InterlockedCompareExchangePointer(&PushLock->Ptr,
NewValue.Ptr,
OldValue.Ptr);
ASSERT(NewValue.Locked);
/* Set the new value */
- if (InterlockedCompareExchangePointer(PushLock,
+ if (InterlockedCompareExchangePointer(&PushLock->Ptr,
NewValue.Ptr,
OldValue.Ptr) != OldValue.Ptr)
{
WaitBlock->ShareCount = 0;
/* Set the current Wait Block pointer */
- WaitBlock->Next = (PEX_PUSH_LOCK_WAIT_BLOCK)((ULONG_PTR)
- OldValue.Ptr &~ EX_PUSH_LOCK_PTR_BITS);
+ WaitBlock->Next = (PEX_PUSH_LOCK_WAIT_BLOCK)(
+ OldValue.Value &~ EX_PUSH_LOCK_PTR_BITS);
/* Point to ours */
NewValue.Value = (OldValue.Value & EX_PUSH_LOCK_MULTIPLE_SHARED) |
/* Write the new value */
TempValue = NewValue;
- NewValue.Ptr = InterlockedCompareExchangePointer(PushLock,
+ NewValue.Ptr = InterlockedCompareExchangePointer(&PushLock->Ptr,
NewValue.Ptr,
OldValue.Ptr);
if (NewValue.Value != OldValue.Value)
ASSERT(NewValue.Locked);
/* Set the new value */
- NewValue.Ptr = InterlockedCompareExchangePointer(PushLock,
+ NewValue.Ptr = InterlockedCompareExchangePointer(&PushLock->Ptr,
NewValue.Ptr,
OldValue.Ptr);
if (NewValue.Value != OldValue.Value)
if (OldValue.Waiting)
{
/* Set the current Wait Block pointer */
- WaitBlock->Next = (PEX_PUSH_LOCK_WAIT_BLOCK)((ULONG_PTR)
- OldValue.Ptr &~ EX_PUSH_LOCK_PTR_BITS);
+ WaitBlock->Next = (PEX_PUSH_LOCK_WAIT_BLOCK)(
+ OldValue.Value &~ EX_PUSH_LOCK_PTR_BITS);
/* Nobody is the last waiter yet */
WaitBlock->Last = NULL;
#endif
/* Write the new value */
- NewValue.Ptr = InterlockedCompareExchangePointer(PushLock,
+ NewValue.Ptr = InterlockedCompareExchangePointer(&PushLock->Ptr,
NewValue.Ptr,
OldValue.Ptr);
if (NewValue.Ptr != OldValue.Ptr)
}
/* Write the New Value */
- NewValue.Ptr = InterlockedCompareExchangePointer(PushLock,
+ NewValue.Ptr = InterlockedCompareExchangePointer(&PushLock->Ptr,
NewValue.Ptr,
OldValue.Ptr);
if (NewValue.Value == OldValue.Value) return;
if (OldValue.MultipleShared)
{
/* Get the wait block */
- WaitBlock = (PEX_PUSH_LOCK_WAIT_BLOCK)((ULONG_PTR)OldValue.Ptr &
+ WaitBlock = (PEX_PUSH_LOCK_WAIT_BLOCK)(OldValue.Value &
~EX_PUSH_LOCK_PTR_BITS);
/* Loop until we find the last wait block */
ASSERT(NewValue.Waking && !NewValue.Locked && !NewValue.MultipleShared);
/* Write the new value */
- NewValue.Ptr = InterlockedCompareExchangePointer(PushLock,
+ NewValue.Ptr = InterlockedCompareExchangePointer(&PushLock->Ptr,
NewValue.Ptr,
OldValue.Ptr);
if (NewValue.Value == OldValue.Value) return;
/* Write the new value */
WakeValue = NewValue;
- NewValue.Ptr = InterlockedCompareExchangePointer(PushLock,
+ NewValue.Ptr = InterlockedCompareExchangePointer(&PushLock->Ptr,
NewValue.Ptr,
OldValue.Ptr);
if (NewValue.Value != OldValue.Value) continue;
}
/* Write the New Value */
- NewValue.Ptr = InterlockedCompareExchangePointer(PushLock,
+ NewValue.Ptr = InterlockedCompareExchangePointer(&PushLock->Ptr,
NewValue.Ptr,
OldValue.Ptr);
if (NewValue.Value == OldValue.Value) return;
if (OldValue.MultipleShared)
{
/* Get the wait block */
- WaitBlock = (PEX_PUSH_LOCK_WAIT_BLOCK)((ULONG_PTR)OldValue.Ptr &
+ WaitBlock = (PEX_PUSH_LOCK_WAIT_BLOCK)(OldValue.Value &
~EX_PUSH_LOCK_PTR_BITS);
/* Loop until we find the last wait block */
ASSERT(NewValue.Waking && !NewValue.Locked && !NewValue.MultipleShared);
/* Write the new value */
- NewValue.Ptr = InterlockedCompareExchangePointer(PushLock,
+ NewValue.Ptr = InterlockedCompareExchangePointer(&PushLock->Ptr,
NewValue.Ptr,
OldValue.Ptr);
if (NewValue.Value == OldValue.Value) return;
/* Write the new value */
WakeValue = NewValue;
- NewValue.Ptr = InterlockedCompareExchangePointer(PushLock,
+ NewValue.Ptr = InterlockedCompareExchangePointer(&PushLock->Ptr,
NewValue.Ptr,
OldValue.Ptr);
if (NewValue.Value != OldValue.Value) continue;
/* Write the New Value. Save our original value for waking */
WakeValue = NewValue;
- NewValue.Ptr = InterlockedCompareExchangePointer(PushLock,
+ NewValue.Ptr = InterlockedCompareExchangePointer(&PushLock->Ptr,
NewValue.Ptr,
OldValue.Ptr);
ASSERT(NewValue.Waking && !NewValue.Waiting);
/* Write the New Value */
- NewValue.Ptr = InterlockedCompareExchangePointer(PushLock,
+ NewValue.Ptr = InterlockedCompareExchangePointer(&PushLock->Ptr,
NewValue.Ptr,
OldValue.Ptr);
NewValue.Waking = TRUE;
/* Write the New Value */
- if (InterlockedCompareExchangePointer(PushLock,
+ if (InterlockedCompareExchangePointer(&PushLock->Ptr,
NewValue.Ptr,
OldValue.Ptr) == OldValue.Ptr)
{
KeInitializeEvent(Event, SynchronizationEvent, FALSE);
/* Set it */
- if (InterlockedCompareExchangePointer(&Resource->ExclusiveWaiters,
+ if (InterlockedCompareExchangePointer((PVOID*)&Resource->ExclusiveWaiters,
Event,
NULL))
{
KeInitializeSemaphore(Semaphore, 0, MAXLONG);
/* Set it */
- if (InterlockedCompareExchangePointer(&Resource->SharedWaiters,
+ if (InterlockedCompareExchangePointer((PVOID*)&Resource->SharedWaiters,
Semaphore,
NULL))
{
SemaphoreInformation,
SemaphoreInformationLength,
ReturnLength,
+ NULL,
PreviousMode);
if (!NT_SUCCESS(Status))
{
/* Call the generic handler with the system module list */
Status = ExpQueryModuleInformation(&PsLoadedModuleList,
&MmLoadedUserImageList,
- (PRTL_PROCESS_MODULES)Buffer,
- Size,
- ReqSize);
+ (PRTL_PROCESS_MODULES)Buffer,
+ Size,
+ ReqSize);
/* Release list lock and return status */
ExReleaseResourceLite(&PsLoadedModuleResource);
for (Count = 0; HandleCount > 0 ; HandleCount--)
{
- Shi->Handles[i].UniqueProcessId = (USHORT)(ULONG)pr->UniqueProcessId;
+ Shi->Handles[i].UniqueProcessId = (USHORT)(ULONG_PTR)pr->UniqueProcessId;
Count++;
i++;
}
QSI_DEF(SystemInterruptInformation)
{
PKPRCB Prcb;
+ PKPCR Pcr;
LONG i;
ULONG ti;
PSYSTEM_INTERRUPT_INFORMATION sii = (PSYSTEM_INTERRUPT_INFORMATION)Buffer;
for (i = 0; i < KeNumberProcessors; i++)
{
Prcb = KiProcessorBlock[i];
- sii->ContextSwitches = KeGetContextSwitches(Prcb);
+#ifdef _M_AMD64
+ Pcr = CONTAINING_RECORD(Prcb, KPCR, CurrentPrcb);
+#else
+ Pcr = CONTAINING_RECORD(Prcb, KPCR, Prcb);
+#endif
+#ifdef _M_ARM // This code should probably be done differently
+ sii->ContextSwitches = Pcr->ContextSwitches;
+#else
+ sii->ContextSwitches = ((PKIPCR)Pcr)->ContextSwitches;
+#endif
sii->DpcCount = Prcb->DpcData[0].DpcCount;
sii->DpcRate = Prcb->DpcRequestRate;
sii->TimeIncrement = ti;
PVOID SectionPointer = Buffer;
/* Validate size */
- if (Size != sizeof(PVOID))
+ if(Size != sizeof(PVOID))
{
/* Incorrect length, fail */
return STATUS_INFO_LENGTH_MISMATCH;
- }
+ }
/* Only kernel mode can call this function */
if (ExGetPreviousMode() != KernelMode) return STATUS_PRIVILEGE_NOT_HELD;
/* Unload the image */
MmUnloadSystemImage(SectionPointer);
return STATUS_SUCCESS;
-}
+ }
/* Class 28 - Time Adjustment Information */
QSI_DEF(SystemTimeAdjustmentInformation)
{
PAGED_CODE();
-#if defined(_M_IX86)
+#if defined(_M_IX86) || defined(_M_AMD64)
__wbinvd();
#elif defined(_M_PPC)
__asm__ __volatile__("tlbsync");
TimerInformation,
TimerInformationLength,
ReturnLength,
+ NULL,
PreviousMode);
if (!NT_SUCCESS(Status)) return Status;
TimeoutPointer);
/* Check if we timed out and quit this loop in that case */
- if ((NTSTATUS)QueueEntry == STATUS_TIMEOUT) break;
+ if ((NTSTATUS)(ULONG_PTR)QueueEntry == STATUS_TIMEOUT) break;
/* Increment Processed Work Items */
InterlockedIncrement((PLONG)&WorkQueue->WorkItemsProcessed);
NULL,
NULL,
ExpWorkerThreadEntryPoint,
- (PVOID)Context);
+ UlongToPtr(Context));
/* If the thread is dynamic */
if (Dynamic)
PFAST_IO_DISPATCH FastIoDispatch;
PDEVICE_OBJECT Device;
BOOLEAN Result = TRUE;
- ULONG PageCount = ADDRESS_AND_SIZE_TO_SPAN_PAGES(FileOffset, Length);
+ ULONG PageCount = ADDRESS_AND_SIZE_TO_SPAN_PAGES(FileOffset,Length);
- PAGED_CODE();
+ PAGED_CODE();
ASSERT(FileObject);
ASSERT(FileObject->FsContext);
if (Length > MAXLONGLONG - FileOffset->QuadPart)
{
- IoStatus->Status = STATUS_INVALID_PARAMETER;
- IoStatus->Information = 0;
- return FALSE;
+ IoStatus->Status = STATUS_INVALID_PARAMETER;
+ IoStatus->Information = 0;
+ return FALSE;
}
/* Get the offset and FCB header */
{
/* Use a Resource Acquire */
FsRtlEnterFileSystem();
- CcFastReadWait++;
+ CcFastReadWait++;
ExAcquireResourceSharedLite(FcbHeader->Resource, TRUE);
}
else
FsRtlEnterFileSystem();
if (!ExAcquireResourceSharedLite(FcbHeader->Resource, FALSE))
{
- FsRtlExitFileSystem();
- FsRtlIncrementCcFastReadResourceMiss();
- return FALSE;
+ FsRtlExitFileSystem();
+ FsRtlIncrementCcFastReadResourceMiss();
+ return FALSE;
}
}
(FcbHeader->IsFastIoPossible == FastIoIsNotPossible))
{
/* It's not, so fail */
- Result = FALSE;
- goto Cleanup;
+ Result = FALSE;
+ goto Cleanup;
}
/* Check if we need to find out if fast I/O is available */
/* Get the Fast I/O table */
Device = IoGetRelatedDeviceObject(FileObject);
- FastIoDispatch = Device->DriverObject->FastIoDispatch;
+ FastIoDispatch = Device->DriverObject->FastIoDispatch;
/* Sanity check */
ASSERT(FastIoDispatch != NULL);
Result = FALSE;
goto Cleanup;
}
- }
+ }
/* Check if we read too much */
if (Offset.QuadPart > FcbHeader->FileSize.QuadPart)
}
/* Set this as top-level IRP */
- PsGetCurrentThread()->TopLevelIrp = FSRTL_FAST_IO_TOP_LEVEL_IRP;
+ PsGetCurrentThread()->TopLevelIrp = FSRTL_FAST_IO_TOP_LEVEL_IRP;
- _SEH2_TRY
- {
- /* Make sure the IO and file size is below 4GB */
+ _SEH2_TRY
+ {
+ /* Make sure the IO and file size is below 4GB */
if (Wait && !(Offset.HighPart | FcbHeader->FileSize.HighPart))
{
- /* Call the cache controller */
+ /* Call the cache controller */
CcFastCopyRead(FileObject,
FileOffset->LowPart,
Length,
Buffer,
IoStatus);
- /* File was accessed */
- FileObject->Flags |= FO_FILE_FAST_IO_READ;
+ /* File was accessed */
+ FileObject->Flags |= FO_FILE_FAST_IO_READ;
if (IoStatus->Status != STATUS_END_OF_FILE)
{
ASSERT(FcbHeader->FileSize.QuadPart >=
FileOffset->QuadPart + IoStatus->Information);
- }
+ }
}
else
{
IoStatus);
/* File was accessed */
- FileObject->Flags |= FO_FILE_FAST_IO_READ;
+ FileObject->Flags |= FO_FILE_FAST_IO_READ;
if (Result == TRUE)
{
- ASSERT((IoStatus->Status == STATUS_END_OF_FILE) ||
+ ASSERT( (IoStatus->Status == STATUS_END_OF_FILE) ||
((LONGLONG)(FileOffset->QuadPart + IoStatus->Information) <=
FcbHeader->FileSize.QuadPart));
- }
- }
+ }
+ }
/* Update the current file offset */
if (Result == TRUE)
{
- FileObject->CurrentByteOffset.QuadPart += IoStatus->Information;
- }
- }
+ FileObject->CurrentByteOffset.QuadPart += IoStatus->Information;
+ }
+ }
_SEH2_EXCEPT(FsRtlIsNtstatusExpected(_SEH2_GetExceptionCode()) ?
EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH)
- {
- Result = FALSE;
+ {
+ Result = FALSE;
}
_SEH2_END;
- PsGetCurrentThread()->TopLevelIrp = 0;
+ PsGetCurrentThread()->TopLevelIrp = 0;
/* Return to caller */
Cleanup:
if (Result == FALSE)
{
CcFastReadNotPossible += 1;
- }
+ }
return Result;
}
/* Nagar p.544.
* Check with Cc if we can write and check if the IO > 64kB (WDK macro).
*/
- if ((CcCanIWrite(FileObject, Length, Wait, FALSE) == FALSE) ||
- (CcCopyWriteWontFlush(FileObject, FileOffset, Length) == FALSE) ||
+ if ( (CcCanIWrite(FileObject, Length,Wait, FALSE) == FALSE) ||
+ (CcCopyWriteWontFlush(FileObject,FileOffset,Length) == FALSE) ||
((FileObject->Flags & FO_WRITE_THROUGH) == TRUE))
{
- return FALSE;
+ return FALSE;
}
/* No actual read */
if ((FileOffsetAppend == FALSE) &&
(Offset.LowPart <= FcbHeader->ValidDataLength.LowPart))
{
- ExAcquireResourceSharedLite(FcbHeader->Resource, TRUE);
- ResourceAquiredShared = TRUE;
+ ExAcquireResourceSharedLite(FcbHeader->Resource,TRUE);
+ ResourceAquiredShared = TRUE;
}
else
{
- ExAcquireResourceExclusiveLite(FcbHeader->Resource, TRUE);
+ ExAcquireResourceExclusiveLite(FcbHeader->Resource,TRUE);
}
/* Nagar p.544/545.
*/
if (FileOffsetAppend == TRUE)
{
- Offset.LowPart = FcbHeader->FileSize.LowPart;
- NewSize.LowPart = FcbHeader->FileSize.LowPart + Length;
- b_4GB = (NewSize.LowPart < FcbHeader->FileSize.LowPart);
+ Offset.LowPart = FcbHeader->FileSize.LowPart;
+ NewSize.LowPart = FcbHeader->FileSize.LowPart + Length;
+ b_4GB = (NewSize.LowPart < FcbHeader->FileSize.LowPart);
}
else
{
- Offset.LowPart = FileOffset->LowPart;
- NewSize.LowPart = FileOffset->LowPart + Length;
+ Offset.LowPart = FileOffset->LowPart;
+ NewSize.LowPart = FileOffset->LowPart + Length;
b_4GB = (NewSize.LowPart < FileOffset->LowPart) ||
(FileOffset->HighPart != 0);
}
* That we are not extending past the allocated size.
* That we are not creating a hole bigger than 8k.
* That we are not crossing the 4GB boundary.
- */
- if ((FileObject->PrivateCacheMap != NULL) &&
- (FcbHeader->IsFastIoPossible != FastIoIsNotPossible) &&
- (FcbHeader->AllocationSize.LowPart >= NewSize.LowPart) &&
+ */
+ if ( (FileObject->PrivateCacheMap != NULL) &&
+ (FcbHeader->IsFastIoPossible != FastIoIsNotPossible) &&
+ (FcbHeader->AllocationSize.LowPart >= NewSize.LowPart) &&
(Offset.LowPart < FcbHeader->ValidDataLength.LowPart + 0x2000) &&
!b_4GB)
{
if (ResourceAquiredShared &&
(NewSize.LowPart > FcbHeader->ValidDataLength.LowPart + 0x2000))
{
- /* Then we need to acquire the resource exclusive */
- ExReleaseResourceLite(FcbHeader->Resource);
- ExAcquireResourceExclusiveLite(FcbHeader->Resource, TRUE);
+ /* Then we need to acquire the resource exclusive */
+ ExReleaseResourceLite(FcbHeader->Resource);
+ ExAcquireResourceExclusiveLite(FcbHeader->Resource,TRUE);
if (FileOffsetAppend == TRUE)
{
- Offset.LowPart = FcbHeader->FileSize.LowPart; // ??
- NewSize.LowPart = FcbHeader->FileSize.LowPart + Length;
+ Offset.LowPart = FcbHeader->FileSize.LowPart; // ??
+ NewSize.LowPart = FcbHeader->FileSize.LowPart + Length;
- /* Make sure we don't cross the 4GB boundary */
- b_4GB = (NewSize.LowPart < Offset.LowPart);
- }
+ /* Make sure we don't cross the 4GB boundary */
+ b_4GB = (NewSize.LowPart < Offset.LowPart);
+ }
/* Recheck some of the conditions since we let the lock go */
- if ((FileObject->PrivateCacheMap != NULL) &&
- (FcbHeader->IsFastIoPossible != FastIoIsNotPossible) &&
- (FcbHeader->AllocationSize.LowPart >= NewSize.LowPart) &&
- (FcbHeader->AllocationSize.HighPart == 0) &&
+ if ( (FileObject->PrivateCacheMap != NULL) &&
+ (FcbHeader->IsFastIoPossible != FastIoIsNotPossible) &&
+ (FcbHeader->AllocationSize.LowPart >= NewSize.LowPart) &&
+ (FcbHeader->AllocationSize.HighPart == 0) &&
!b_4GB)
- {
+ {
/* Do nothing? */
}
else
- {
- goto FailAndCleanup;
- }
- }
+ {
+ goto FailAndCleanup;
+ }
+ }
}
else
{
- goto FailAndCleanup;
+ goto FailAndCleanup;
}
- /* Check if we need to find out if fast I/O is available */
- if (FcbHeader->IsFastIoPossible == FastIoIsQuestionable)
- {
- IO_STATUS_BLOCK FastIoCheckIfPossibleStatus;
+ /* Check if we need to find out if fast I/O is available */
+ if (FcbHeader->IsFastIoPossible == FastIoIsQuestionable)
+ {
+ IO_STATUS_BLOCK FastIoCheckIfPossibleStatus;
- /* Sanity check */
- ASSERT(!KeIsExecutingDpc());
+ /* Sanity check */
+ ASSERT(!KeIsExecutingDpc());
- /* Get the Fast I/O table */
- Device = IoGetRelatedDeviceObject(FileObject);
- FastIoDispatch = Device->DriverObject->FastIoDispatch;
+ /* Get the Fast I/O table */
+ Device = IoGetRelatedDeviceObject(FileObject);
+ FastIoDispatch = Device->DriverObject->FastIoDispatch;
- /* Sanity check */
- ASSERT(FastIoDispatch != NULL);
- ASSERT(FastIoDispatch->FastIoCheckIfPossible != NULL);
+ /* Sanity check */
+ ASSERT(FastIoDispatch != NULL);
+ ASSERT(FastIoDispatch->FastIoCheckIfPossible != NULL);
- /* Ask the driver if we can do it */
- if (!FastIoDispatch->FastIoCheckIfPossible(FileObject,
+ /* Ask the driver if we can do it */
+ if (!FastIoDispatch->FastIoCheckIfPossible(FileObject,
FileOffsetAppend ?
&FcbHeader->FileSize :
FileOffset,
- Length,
- TRUE,
- LockKey,
- FALSE,
- &FastIoCheckIfPossibleStatus,
- Device))
- {
- /* It's not, fail */
- goto FailAndCleanup;
- }
- }
+ Length,
+ TRUE,
+ LockKey,
+ FALSE,
+ &FastIoCheckIfPossibleStatus,
+ Device))
+ {
+ /* It's not, fail */
+ goto FailAndCleanup;
+ }
+ }
/* If we are going to extend the file then save
* the old file size in case the operation fails.
- */
+ */
if (NewSize.LowPart > FcbHeader->FileSize.LowPart)
{
- FileSizeModified = TRUE;
- OldFileSize.LowPart = FcbHeader->FileSize.LowPart;
- OldValidDataLength.LowPart = FcbHeader->ValidDataLength.LowPart;
- FcbHeader->FileSize.LowPart = NewSize.LowPart;
- }
+ FileSizeModified = TRUE;
+ OldFileSize.LowPart = FcbHeader->FileSize.LowPart;
+ OldValidDataLength.LowPart = FcbHeader->ValidDataLength.LowPart;
+ FcbHeader->FileSize.LowPart = NewSize.LowPart;
+ }
- /* Set this as top-level IRP */
- PsGetCurrentThread()->TopLevelIrp = FSRTL_FAST_IO_TOP_LEVEL_IRP;
+ /* Set this as top-level IRP */
+ PsGetCurrentThread()->TopLevelIrp = FSRTL_FAST_IO_TOP_LEVEL_IRP;
- _SEH2_TRY
- {
+ _SEH2_TRY
+ {
if (Offset.LowPart > FcbHeader->ValidDataLength.LowPart)
{
- LARGE_INTEGER OffsetVar;
- OffsetVar.LowPart = Offset.LowPart;
- OffsetVar.HighPart = 0;
- CcZeroData(FileObject, &FcbHeader->ValidDataLength, &OffsetVar, TRUE);
- }
-
- /* Call the cache manager */
- CcFastCopyWrite(FileObject, Offset.LowPart, Length, Buffer);
- }
+ LARGE_INTEGER OffsetVar;
+ OffsetVar.LowPart = Offset.LowPart;
+ OffsetVar.HighPart = 0;
+ CcZeroData(FileObject,&FcbHeader->ValidDataLength,&OffsetVar,TRUE);
+ }
+
+ /* Call the cache manager */
+ CcFastCopyWrite(FileObject,Offset.LowPart,Length,Buffer);
+ }
_SEH2_EXCEPT(FsRtlIsNtstatusExpected(_SEH2_GetExceptionCode()) ?
EXCEPTION_EXECUTE_HANDLER :
EXCEPTION_CONTINUE_SEARCH)
- {
- Result = FALSE;
+ {
+ Result = FALSE;
}
_SEH2_END;
/* Remove ourselves at the top level component after the IO is done */
- PsGetCurrentThread()->TopLevelIrp = 0;
+ PsGetCurrentThread()->TopLevelIrp = 0;
- /* Did the operation succeed? */
+ /* Did the operation succeed ? */
if (Result == TRUE)
{
- /* Update the valid file size if necessary */
+ /* Update the valid file size if necessary */
if (NewSize.LowPart > FcbHeader->ValidDataLength.LowPart)
{
- FcbHeader->ValidDataLength.LowPart = NewSize.LowPart;
- }
+ FcbHeader->ValidDataLength.LowPart = NewSize.LowPart ;
+ }
/* Flag the file as modified */
- FileObject->Flags |= FO_FILE_MODIFIED;
+ FileObject->Flags |= FO_FILE_MODIFIED;
- /* Update the strucutres if the file size changed */
+ /* Update the strucutres if the file size changed */
if (FileSizeModified)
{
SharedCacheMap =
(PSHARED_CACHE_MAP)FileObject->SectionObjectPointer->SharedCacheMap;
SharedCacheMap->FileSize.LowPart = NewSize.LowPart;
- FileObject->Flags |= FO_FILE_SIZE_CHANGED;
- }
+ FileObject->Flags |= FO_FILE_SIZE_CHANGED;
+ }
/* Update the file object current file offset */
- FileObject->CurrentByteOffset.QuadPart = NewSize.LowPart;
+ FileObject->CurrentByteOffset.QuadPart = NewSize.LowPart;
}
else
/* Result == FALSE if we get here */
if (FileSizeModified)
{
- /* If the file size was modified then restore the old file size */
+ /* If the file size was modified then restore the old file size */
if (FcbHeader->PagingIoResource != NULL)
{
/* Nagar P.544.
* Restore the old file size if operation didn't succeed.
*/
- ExAcquireResourceExclusiveLite(FcbHeader->PagingIoResource, TRUE);
- FcbHeader->FileSize.LowPart = OldFileSize.LowPart;
- FcbHeader->ValidDataLength.LowPart = OldValidDataLength.LowPart;
- ExReleaseResourceLite(FcbHeader->PagingIoResource);
+ ExAcquireResourceExclusiveLite(FcbHeader->PagingIoResource,TRUE);
+ FcbHeader->FileSize.LowPart = OldFileSize.LowPart;
+ FcbHeader->ValidDataLength.LowPart = OldValidDataLength.LowPart;
+ ExReleaseResourceLite(FcbHeader->PagingIoResource);
}
else
{
- /* If there is no lock and do it without */
- FcbHeader->FileSize.LowPart = OldFileSize.LowPart;
- FcbHeader->ValidDataLength.LowPart = OldValidDataLength.LowPart;
- }
- }
+ /* If there is no lock and do it without */
+ FcbHeader->FileSize.LowPart = OldFileSize.LowPart;
+ FcbHeader->ValidDataLength.LowPart = OldValidDataLength.LowPart;
+ }
+ }
else
{
/* Do nothing? */
- }
+ }
}
- goto Cleanup;
+ goto Cleanup;
}
else
{
OldFileSize.QuadPart = 0;
#endif
- /* Sanity check */
- ASSERT(!KeIsExecutingDpc());
+ /* Sanity check */
+ ASSERT(!KeIsExecutingDpc());
/* Nagar P.544.
* Check if we need to acquire the resource exclusive.
*/
- if ((FileOffsetAppend == FALSE) &&
+ if ( (FileOffsetAppend == FALSE) &&
(FileOffset->QuadPart + Length <= FcbHeader->ValidDataLength.QuadPart))
- {
- /* Acquire the resource shared */
+ {
+ /* Acquire the resource shared */
if (!ExAcquireResourceSharedLite(FcbHeader->Resource, Wait))
{
- goto LeaveCriticalAndFail;
- }
- ResourceAquiredShared = TRUE;
+ goto LeaveCriticalAndFail;
+ }
+ ResourceAquiredShared =TRUE;
}
else
{
- /* Acquire the resource exclusive */
+ /* Acquire the resource exclusive */
if (!ExAcquireResourceExclusiveLite(FcbHeader->Resource, Wait))
{
- goto LeaveCriticalAndFail;
- }
- }
+ goto LeaveCriticalAndFail;
+ }
+ }
- /* Check if we are appending */
+ /* Check if we are appending */
if (FileOffsetAppend == TRUE)
{
- Offset.QuadPart = FcbHeader->FileSize.QuadPart;
- NewSize.QuadPart = FcbHeader->FileSize.QuadPart + Length;
+ Offset.QuadPart = FcbHeader->FileSize.QuadPart;
+ NewSize.QuadPart = FcbHeader->FileSize.QuadPart + Length;
}
else
{
- Offset.QuadPart = FileOffset->QuadPart;
- NewSize.QuadPart += FileOffset->QuadPart + Length;
- }
+ Offset.QuadPart = FileOffset->QuadPart;
+ NewSize.QuadPart += FileOffset->QuadPart + Length;
+ }
/* Nagar p.544/545.
* Make sure that caching is initated.
* That fast are allowed for this file stream.
* That we are not extending past the allocated size.
* That we are not creating a hole bigger than 8k.
- */
- if ((FileObject->PrivateCacheMap != NULL) &&
- (FcbHeader->IsFastIoPossible != FastIoIsNotPossible) &&
+ */
+ if ( (FileObject->PrivateCacheMap != NULL) &&
+ (FcbHeader->IsFastIoPossible != FastIoIsNotPossible) &&
(FcbHeader->ValidDataLength.QuadPart + 0x2000 > Offset.QuadPart) &&
(Length <= MAXLONGLONG - Offset.QuadPart) &&
(FcbHeader->AllocationSize.QuadPart >= NewSize.QuadPart))
- {
- /* Check if we can keep the lock shared */
+ {
+ /* Check if we can keep the lock shared */
if (ResourceAquiredShared &&
(NewSize.QuadPart > FcbHeader->ValidDataLength.QuadPart))
{
- ExReleaseResourceLite(FcbHeader->Resource);
- if (!ExAcquireResourceExclusiveLite(FcbHeader->Resource, Wait))
- {
- goto LeaveCriticalAndFail;
- }
+ ExReleaseResourceLite(FcbHeader->Resource);
+ if(!ExAcquireResourceExclusiveLite(FcbHeader->Resource,Wait))
+ {
+ goto LeaveCriticalAndFail;
+ }
/* Compute the offset and the new filesize */
if (FileOffsetAppend)
{
- Offset.QuadPart = FcbHeader->FileSize.QuadPart;
- NewSize.QuadPart = FcbHeader->FileSize.QuadPart + Length;
- }
+ Offset.QuadPart = FcbHeader->FileSize.QuadPart;
+ NewSize.QuadPart = FcbHeader->FileSize.QuadPart + Length;
+ }
- /* Recheck the above points since we released and reacquire the lock */
- if ((FileObject->PrivateCacheMap != NULL) &&
- (FcbHeader->IsFastIoPossible != FastIoIsNotPossible) &&
+ /* Recheck the above points since we released and reacquire the lock */
+ if ( (FileObject->PrivateCacheMap != NULL) &&
+ (FcbHeader->IsFastIoPossible != FastIoIsNotPossible) &&
(FcbHeader->AllocationSize.QuadPart > NewSize.QuadPart))
- {
- /* Do nothing */
+ {
+ /* Do nothing */
}
else
{
- goto FailAndCleanup;
- }
- }
+ goto FailAndCleanup;
+ }
+ }
- /* Check if we need to find out if fast I/O is available */
- if (FcbHeader->IsFastIoPossible == FastIoIsQuestionable)
- {
- IO_STATUS_BLOCK FastIoCheckIfPossibleStatus;
+ /* Check if we need to find out if fast I/O is available */
+ if (FcbHeader->IsFastIoPossible == FastIoIsQuestionable)
+ {
+ IO_STATUS_BLOCK FastIoCheckIfPossibleStatus;
- /* Sanity check */
- ASSERT(!KeIsExecutingDpc());
+ /* Sanity check */
+ ASSERT(!KeIsExecutingDpc());
- /* Get the Fast I/O table */
- Device = IoGetRelatedDeviceObject(FileObject);
- FastIoDispatch = Device->DriverObject->FastIoDispatch;
+ /* Get the Fast I/O table */
+ Device = IoGetRelatedDeviceObject(FileObject);
+ FastIoDispatch = Device->DriverObject->FastIoDispatch;
- /* Sanity check */
- ASSERT(FastIoDispatch != NULL);
- ASSERT(FastIoDispatch->FastIoCheckIfPossible != NULL);
+ /* Sanity check */
+ ASSERT(FastIoDispatch != NULL);
+ ASSERT(FastIoDispatch->FastIoCheckIfPossible != NULL);
- /* Ask the driver if we can do it */
- if (!FastIoDispatch->FastIoCheckIfPossible(FileObject,
+ /* Ask the driver if we can do it */
+ if (!FastIoDispatch->FastIoCheckIfPossible(FileObject,
FileOffsetAppend ?
&FcbHeader->FileSize :
FileOffset,
- Length,
- TRUE,
- LockKey,
- FALSE,
- &FastIoCheckIfPossibleStatus,
- Device))
- {
- /* It's not, fail */
- goto FailAndCleanup;
- }
- }
+ Length,
+ TRUE,
+ LockKey,
+ FALSE,
+ &FastIoCheckIfPossibleStatus,
+ Device))
+ {
+ /* It's not, fail */
+ goto FailAndCleanup;
+ }
+ }
/* If we are going to modify the filesize,
* save the old fs in case the operation fails.
*/
if (NewSize.QuadPart > FcbHeader->FileSize.QuadPart)
{
- FileSizeModified = TRUE;
- OldFileSize.QuadPart = FcbHeader->FileSize.QuadPart;
- OldValidDataLength.QuadPart = FcbHeader->ValidDataLength.QuadPart;
+ FileSizeModified = TRUE;
+ OldFileSize.QuadPart = FcbHeader->FileSize.QuadPart;
+ OldValidDataLength.QuadPart = FcbHeader->ValidDataLength.QuadPart;
/* If the high part of the filesize is going
* to change, grab the Paging IoResouce.
if (NewSize.HighPart != FcbHeader->FileSize.HighPart &&
FcbHeader->PagingIoResource)
{
- ExAcquireResourceExclusiveLite(FcbHeader->PagingIoResource, TRUE);
- FcbHeader->FileSize.QuadPart = NewSize.QuadPart;
- ExReleaseResourceLite(FcbHeader->PagingIoResource);
+ ExAcquireResourceExclusiveLite(FcbHeader->PagingIoResource, TRUE);
+ FcbHeader->FileSize.QuadPart = NewSize.QuadPart;
+ ExReleaseResourceLite(FcbHeader->PagingIoResource);
}
else
{
- FcbHeader->FileSize.QuadPart = NewSize.QuadPart;
- }
- }
+ FcbHeader->FileSize.QuadPart = NewSize.QuadPart;
+ }
+ }
/* Nagar p.544.
* Set ourselves as top component.
*/
- PsGetCurrentThread()->TopLevelIrp = FSRTL_FAST_IO_TOP_LEVEL_IRP;
+ PsGetCurrentThread()->TopLevelIrp = FSRTL_FAST_IO_TOP_LEVEL_IRP;
- _SEH2_TRY
- {
- BOOLEAN CallCc = TRUE;
+ _SEH2_TRY
+ {
+ BOOLEAN CallCc = TRUE;
/* Check if there is a gap between the end of the file
* and the offset. If yes, then we have to zero the data.
- */
+ */
if (Offset.QuadPart > FcbHeader->ValidDataLength.QuadPart)
{
if (!(Result = CcZeroData(FileObject,
{
/* If this operation fails, then we have to exit. We can jump
* outside the SEH, so I a using a variable to exit normally.
- */
- CallCc = FALSE;
- }
- }
+ */
+ CallCc = FALSE;
+ }
+ }
/* Unless the CcZeroData failed, call the cache manager */
if (CallCc)
{
- Result = CcCopyWrite(FileObject, &Offset, Length, Wait, Buffer);
- }
+ Result = CcCopyWrite(FileObject,&Offset,Length, Wait, Buffer);
+ }
}
_SEH2_EXCEPT(FsRtlIsNtstatusExpected(_SEH2_GetExceptionCode()) ?
EXCEPTION_EXECUTE_HANDLER :
EXCEPTION_CONTINUE_SEARCH)
- {
- Result = FALSE;
+ {
+ Result = FALSE;
}
_SEH2_END;
/* Reset the top component */
- PsGetCurrentThread()->TopLevelIrp = FSRTL_FAST_IO_TOP_LEVEL_IRP;
+ PsGetCurrentThread()->TopLevelIrp = FSRTL_FAST_IO_TOP_LEVEL_IRP;
/* Did the operation suceeded */
if (Result)
{
- /* Check if we need to update the filesize */
+ /* Check if we need to update the filesize */
if (NewSize.QuadPart > FcbHeader->ValidDataLength.QuadPart)
{
if (NewSize.HighPart != FcbHeader->ValidDataLength.HighPart &&
FcbHeader->PagingIoResource)
{
- ExAcquireResourceExclusiveLite(FcbHeader->PagingIoResource, TRUE);
- FcbHeader->ValidDataLength.QuadPart = NewSize.QuadPart;
- ExReleaseResourceLite(FcbHeader->PagingIoResource);
+ ExAcquireResourceExclusiveLite(FcbHeader->PagingIoResource, TRUE);
+ FcbHeader->ValidDataLength.QuadPart = NewSize.QuadPart;
+ ExReleaseResourceLite(FcbHeader->PagingIoResource);
}
else
{
- FcbHeader->ValidDataLength.QuadPart = NewSize.QuadPart;
- }
- }
+ FcbHeader->ValidDataLength.QuadPart = NewSize.QuadPart;
+ }
+ }
/* Flag the file as modified */
- FileObject->Flags |= FO_FILE_MODIFIED;
+ FileObject->Flags |= FO_FILE_MODIFIED;
- /* Check if the filesize has changed */
+ /* Check if the filesize has changed */
if (FileSizeModified)
{
- /* Update the file sizes */
+ /* Update the file sizes */
SharedCacheMap =
(PSHARED_CACHE_MAP)FileObject->SectionObjectPointer->SharedCacheMap;
SharedCacheMap->FileSize.QuadPart = NewSize.QuadPart;
- FileObject->Flags |= FO_FILE_SIZE_CHANGED;
- }
-
- /* Update the current FO byte offset */
- FileObject->CurrentByteOffset.QuadPart = NewSize.QuadPart;
- }
- else
- {
+ FileObject->Flags |= FO_FILE_SIZE_CHANGED;
+ }
+
+ /* Update the current FO byte offset */
+ FileObject->CurrentByteOffset.QuadPart = NewSize.QuadPart;
+ }
+ else
+ {
/* The operation did not succeed.
* Reset the file size to what it should be.
- */
+ */
if (FileSizeModified)
{
if (FcbHeader->PagingIoResource)
{
- ExAcquireResourceExclusiveLite(FcbHeader->PagingIoResource, TRUE);
- FcbHeader->FileSize.QuadPart = OldFileSize.QuadPart;
- FcbHeader->ValidDataLength.QuadPart = OldValidDataLength.QuadPart;
- ExReleaseResourceLite(FcbHeader->PagingIoResource);
+ ExAcquireResourceExclusiveLite(FcbHeader->PagingIoResource, TRUE);
+ FcbHeader->FileSize.QuadPart = OldFileSize.QuadPart;
+ FcbHeader->ValidDataLength.QuadPart = OldValidDataLength.QuadPart;
+ ExReleaseResourceLite(FcbHeader->PagingIoResource);
}
else
{
- FcbHeader->FileSize.QuadPart = OldFileSize.QuadPart;
- FcbHeader->ValidDataLength.QuadPart = OldValidDataLength.QuadPart;
- }
- }
- }
+ FcbHeader->FileSize.QuadPart = OldFileSize.QuadPart;
+ FcbHeader->ValidDataLength.QuadPart = OldValidDataLength.QuadPart;
+ }
+ }
+ }
- goto Cleanup;
+ goto Cleanup;
}
else
{
- goto FailAndCleanup;
- }
- }
+ goto FailAndCleanup;
+ }
+ }
LeaveCriticalAndFail:
*/
NTSTATUS
NTAPI
-FsRtlGetFileSize(IN PFILE_OBJECT FileObject,
+FsRtlGetFileSize(IN PFILE_OBJECT FileObject,
IN OUT PLARGE_INTEGER FileSize)
{
FILE_STANDARD_INFORMATION Info;
/* Check if we support Fast Calls, and check FastIoQueryStandardInfo.
* Call the function and see if it succeeds.
*/
- if (!FastDispatch ||
- !FastDispatch->FastIoQueryStandardInfo ||
+ if ( !FastDispatch ||
+ !FastDispatch->FastIoQueryStandardInfo ||
!FastDispatch->FastIoQueryStandardInfo(FileObject,
TRUE,
&Info,
/* If any of the above failed, then we are going to send an
* IRP to the device object. Initialize the event for the IO.
*/
- KeInitializeEvent(&Event, NotificationEvent, FALSE);
+ KeInitializeEvent(&Event,NotificationEvent,FALSE);
/* Allocate the IRP */
- Irp = IoAllocateIrp(DeviceObject->StackSize, FALSE);
+ Irp = IoAllocateIrp(DeviceObject->StackSize,FALSE);
if (Irp == NULL)
{
FileStandardInformation;
/* Send the IRP to the related device object */
- Status = IoCallDriver(DeviceObject, Irp);
+ Status = IoCallDriver(DeviceObject,Irp);
/* Standard DDK IRP result processing */
if (Status == STATUS_PENDING)
{
- KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL);
+ KeWaitForSingleObject(&Event,Executive,KernelMode,FALSE,NULL);
}
/* If there was a synchronous error, signal it */
/* Check the sync/async IO result */
if (NT_SUCCESS(IoStatus.Status))
{
- /* Was the request for a directory? */
+ /* Was the request for a directory ? */
if (Info.Directory)
{
IoStatus.Status = STATUS_FILE_IS_A_DIRECTORY;
/*
* @implemented
*/
-BOOLEAN
-NTAPI
+ BOOLEAN
+ NTAPI
FsRtlMdlReadCompleteDev(IN PFILE_OBJECT FileObject,
IN PMDL MemoryDescriptorList,
IN PDEVICE_OBJECT DeviceObject)
_SEH2_EXCEPT(FsRtlIsNtstatusExpected(_SEH2_GetExceptionCode()) ?
EXCEPTION_EXECUTE_HANDLER :
EXCEPTION_CONTINUE_SEARCH)
- {
- Result = FALSE;
+ {
+ Result = FALSE;
}
_SEH2_END;
{
if (FileObject->Flags & FO_WRITE_THROUGH)
{
- return FALSE;
+ return FALSE;
}
/* Call the Cache Manager */
- CcMdlWriteComplete2(FileObject, FileOffset, MdlChain);
+ CcMdlWriteComplete2(FileObject,FileOffset,MdlChain);
return TRUE;
}
* Check with Cc if we can write.
*/
if (!CcCanIWrite(FileObject, Length, TRUE, FALSE) ||
- (FileObject->Flags & FO_WRITE_THROUGH))
+ (FileObject->Flags & FO_WRITE_THROUGH))
{
- return FALSE;
+ return FALSE;
}
IoStatus->Status = STATUS_SUCCESS;
FsRtlEnterFileSystem();
/* Check we are going to extend the file */
- if ((FileOffsetAppend == FALSE) &&
+ if ( (FileOffsetAppend == FALSE) &&
(FileOffset->QuadPart + Length <= FcbHeader->ValidDataLength.QuadPart))
- {
- /* Acquire the resource shared */
- ExAcquireResourceSharedLite(FcbHeader->Resource, TRUE);
- ResourceAquiredShared = TRUE;
+ {
+ /* Acquire the resource shared */
+ ExAcquireResourceSharedLite(FcbHeader->Resource,TRUE);
+ ResourceAquiredShared =TRUE;
}
else
- {
- /* Acquire the resource exclusive */
- ExAcquireResourceExclusiveLite(FcbHeader->Resource, TRUE);
- }
+ {
+ /* Acquire the resource exclusive */
+ ExAcquireResourceExclusiveLite(FcbHeader->Resource,TRUE);
+ }
- /* Check if we are appending */
+ /* Check if we are appending */
if (FileOffsetAppend == TRUE)
{
- Offset.QuadPart = FcbHeader->FileSize.QuadPart;
- NewSize.QuadPart = FcbHeader->FileSize.QuadPart + Length;
+ Offset.QuadPart = FcbHeader->FileSize.QuadPart;
+ NewSize.QuadPart = FcbHeader->FileSize.QuadPart + Length;
}
else
- {
- Offset.QuadPart = FileOffset->QuadPart;
- NewSize.QuadPart = FileOffset->QuadPart + Length;
- }
+ {
+ Offset.QuadPart = FileOffset->QuadPart;
+ NewSize.QuadPart = FileOffset->QuadPart + Length;
+ }
- if ((FileObject->PrivateCacheMap) &&
- (FcbHeader->IsFastIoPossible) &&
+ if ( (FileObject->PrivateCacheMap) &&
+ (FcbHeader->IsFastIoPossible) &&
(Length <= MAXLONGLONG - FileOffset->QuadPart) &&
- (NewSize.QuadPart <= FcbHeader->AllocationSize.QuadPart))
+ (NewSize.QuadPart <= FcbHeader->AllocationSize.QuadPart) )
{
/* Check if we can keep the lock shared */
if (ResourceAquiredShared &&
(NewSize.QuadPart > FcbHeader->ValidDataLength.QuadPart))
{
- ExReleaseResourceLite(FcbHeader->Resource);
- ExAcquireResourceExclusiveLite(FcbHeader->Resource, TRUE);
+ ExReleaseResourceLite(FcbHeader->Resource);
+ ExAcquireResourceExclusiveLite(FcbHeader->Resource,TRUE);
/* Compute the offset and the new filesize */
if (FileOffsetAppend)
{
- Offset.QuadPart = FcbHeader->FileSize.QuadPart;
- NewSize.QuadPart = FcbHeader->FileSize.QuadPart + Length;
- }
+ Offset.QuadPart = FcbHeader->FileSize.QuadPart;
+ NewSize.QuadPart = FcbHeader->FileSize.QuadPart + Length;
+ }
- /* Recheck the above points since we released and reacquire the lock */
- if ((FileObject->PrivateCacheMap != NULL) &&
- (FcbHeader->IsFastIoPossible != FastIoIsNotPossible) &&
+ /* Recheck the above points since we released and reacquire the lock */
+ if ( (FileObject->PrivateCacheMap != NULL) &&
+ (FcbHeader->IsFastIoPossible != FastIoIsNotPossible) &&
(FcbHeader->AllocationSize.QuadPart > NewSize.QuadPart))
- {
- /* Do nothing */
+ {
+ /* Do nothing */
}
else
{
- goto FailAndCleanup;
- }
- }
-
- /* Check if we need to find out if fast I/O is available */
- if (FcbHeader->IsFastIoPossible == FastIoIsQuestionable)
- {
- /* Sanity check */
- /* ASSERT(!KeIsExecutingDpc()); */
-
- /* Get the Fast I/O table */
- Device = IoGetRelatedDeviceObject(FileObject);
- FastIoDispatch = Device->DriverObject->FastIoDispatch;
-
- /* Sanity check */
- ASSERT(FastIoDispatch != NULL);
- ASSERT(FastIoDispatch->FastIoCheckIfPossible != NULL);
-
- /* Ask the driver if we can do it */
- if (!FastIoDispatch->FastIoCheckIfPossible(FileObject,
- FileOffset,
- Length,
- TRUE,
- LockKey,
- FALSE,
- IoStatus,
- Device))
- {
- /* It's not, fail */
- goto FailAndCleanup;
- }
- }
+ goto FailAndCleanup;
+ }
+ }
+
+ /* Check if we need to find out if fast I/O is available */
+ if (FcbHeader->IsFastIoPossible == FastIoIsQuestionable)
+ {
+ /* Sanity check */
+ /* ASSERT(!KeIsExecutingDpc()); */
+
+ /* Get the Fast I/O table */
+ Device = IoGetRelatedDeviceObject(FileObject);
+ FastIoDispatch = Device->DriverObject->FastIoDispatch;
+
+ /* Sanity check */
+ ASSERT(FastIoDispatch != NULL);
+ ASSERT(FastIoDispatch->FastIoCheckIfPossible != NULL);
+
+ /* Ask the driver if we can do it */
+ if (!FastIoDispatch->FastIoCheckIfPossible(FileObject,
+ FileOffset,
+ Length,
+ TRUE,
+ LockKey,
+ FALSE,
+ IoStatus,
+ Device))
+ {
+ /* It's not, fail */
+ goto FailAndCleanup;
+ }
+ }
/* If we are going to modify the filesize,
* save the old fs in case the operation fails.
*/
- if (NewSize.QuadPart > FcbHeader->FileSize.QuadPart)
- {
- FileSizeModified = TRUE;
- OldFileSize.QuadPart = FcbHeader->FileSize.QuadPart;
- OldValidDataLength.QuadPart = FcbHeader->ValidDataLength.QuadPart;
+ if (NewSize.QuadPart > FcbHeader->FileSize.QuadPart)
+ {
+ FileSizeModified = TRUE;
+ OldFileSize.QuadPart = FcbHeader->FileSize.QuadPart;
+ OldValidDataLength.QuadPart = FcbHeader->ValidDataLength.QuadPart;
/* If the high part of the filesize is going
* to change, grab the Paging IoResouce.
*/
if (NewSize.HighPart != FcbHeader->FileSize.HighPart &&
FcbHeader->PagingIoResource)
- {
- ExAcquireResourceExclusiveLite(FcbHeader->PagingIoResource, TRUE);
- FcbHeader->FileSize.QuadPart = NewSize.QuadPart;
- ExReleaseResourceLite(FcbHeader->PagingIoResource);
+ {
+ ExAcquireResourceExclusiveLite(FcbHeader->PagingIoResource, TRUE);
+ FcbHeader->FileSize.QuadPart = NewSize.QuadPart;
+ ExReleaseResourceLite(FcbHeader->PagingIoResource);
}
else
{
- FcbHeader->FileSize.QuadPart = NewSize.QuadPart;
- }
- }
+ FcbHeader->FileSize.QuadPart = NewSize.QuadPart;
+ }
+ }
/* Nagar p.544.
* Set ourselves as top component.
*/
- PsGetCurrentThread()->TopLevelIrp = FSRTL_FAST_IO_TOP_LEVEL_IRP;
- _SEH2_TRY
- {
+ PsGetCurrentThread()->TopLevelIrp = FSRTL_FAST_IO_TOP_LEVEL_IRP;
+ _SEH2_TRY
+ {
/* Check if there is a gap between the end of the file and the offset.
* If yes, then we have to zero the data.
- */
+ */
if (Offset.QuadPart > FcbHeader->ValidDataLength.QuadPart)
{
Result = CcZeroData(FileObject,
&FcbHeader->ValidDataLength,
&Offset,
TRUE);
- if (Result)
- {
+ if (Result)
+ {
CcPrepareMdlWrite(FileObject,
&Offset,
Length,
MdlChain,
IoStatus);
- }
+ }
}
else
{
- CcPrepareMdlWrite(FileObject, &Offset, Length, MdlChain, IoStatus);
- }
+ CcPrepareMdlWrite(FileObject,&Offset,Length,MdlChain,IoStatus);
+ }
}
_SEH2_EXCEPT(FsRtlIsNtstatusExpected(_SEH2_GetExceptionCode()) ?
EXCEPTION_EXECUTE_HANDLER :
EXCEPTION_CONTINUE_SEARCH)
- {
- Result = FALSE;
+ {
+ Result = FALSE;
}
_SEH2_END;
/* Reset the top component */
- PsGetCurrentThread()->TopLevelIrp = 0;
+ PsGetCurrentThread()->TopLevelIrp = 0;
/* Did the operation suceeded */
if (Result)
{
- /* Check if we need to update the filesize */
+ /* Check if we need to update the filesize */
if (NewSize.QuadPart > FcbHeader->ValidDataLength.QuadPart)
{
if (NewSize.HighPart != FcbHeader->ValidDataLength.HighPart &&
FcbHeader->PagingIoResource)
{
- ExAcquireResourceExclusiveLite(FcbHeader->PagingIoResource, TRUE);
- FcbHeader->ValidDataLength.QuadPart = NewSize.QuadPart;
- ExReleaseResourceLite(FcbHeader->PagingIoResource);
+ ExAcquireResourceExclusiveLite(FcbHeader->PagingIoResource, TRUE);
+ FcbHeader->ValidDataLength.QuadPart = NewSize.QuadPart;
+ ExReleaseResourceLite(FcbHeader->PagingIoResource);
}
else
{
- FcbHeader->ValidDataLength.QuadPart = NewSize.QuadPart;
- }
- }
+ FcbHeader->ValidDataLength.QuadPart = NewSize.QuadPart;
+ }
+ }
/* Flag the file as modified */
- FileObject->Flags |= FO_FILE_MODIFIED;
+ FileObject->Flags |= FO_FILE_MODIFIED;
- /* Check if the filesize has changed */
+ /* Check if the filesize has changed */
if (FileSizeModified)
{
SharedCacheMap =
(PSHARED_CACHE_MAP)FileObject->SectionObjectPointer->SharedCacheMap;
SharedCacheMap->FileSize.QuadPart = NewSize.QuadPart;
- FileObject->Flags |= FO_FILE_SIZE_CHANGED;
- }
- }
- else
- {
+ FileObject->Flags |= FO_FILE_SIZE_CHANGED;
+ }
+ }
+ else
+ {
/* The operation did not succeed.
* Reset the file size to what it should be.
- */
+ */
if (FileSizeModified)
{
if (FcbHeader->PagingIoResource)
{
- ExAcquireResourceExclusiveLite(FcbHeader->PagingIoResource, TRUE);
- FcbHeader->FileSize.QuadPart = OldFileSize.QuadPart;
- FcbHeader->ValidDataLength.QuadPart = OldValidDataLength.QuadPart;
- ExReleaseResourceLite(FcbHeader->PagingIoResource);
+ ExAcquireResourceExclusiveLite(FcbHeader->PagingIoResource, TRUE);
+ FcbHeader->FileSize.QuadPart = OldFileSize.QuadPart;
+ FcbHeader->ValidDataLength.QuadPart = OldValidDataLength.QuadPart;
+ ExReleaseResourceLite(FcbHeader->PagingIoResource);
}
else
{
- FcbHeader->FileSize.QuadPart = OldFileSize.QuadPart;
- FcbHeader->ValidDataLength.QuadPart = OldValidDataLength.QuadPart;
- }
- }
- }
+ FcbHeader->FileSize.QuadPart = OldFileSize.QuadPart;
+ FcbHeader->ValidDataLength.QuadPart = OldValidDataLength.QuadPart;
+ }
+ }
+ }
- goto Cleanup;
+ goto Cleanup;
}
else
{
--- /dev/null
+#ifndef _INTRIN_INTERNAL_
+#define _INTRIN_INTERNAL_
+
+#ifdef CONFIG_SMP
+#define LOCK "lock ; "
+#else
+#define LOCK ""
+#endif
+
+#define KeSetCurrentIrql(x) __writecr8(x)
+
+PKGDTENTRY64
+FORCEINLINE
+KiGetGdtEntry(PVOID pGdt, USHORT Selector)
+{
+ return (PKGDTENTRY64)((ULONG64)pGdt + (Selector & ~RPL_MASK));
+}
+
+PVOID
+FORCEINLINE
+KiGetGdtDescriptorBase(PKGDTENTRY Entry)
+{
+ return (PVOID)((ULONG64)Entry->BaseLow |
+ (ULONG64)Entry->Bytes.BaseMiddle << 16 |
+ (ULONG64)Entry->Bytes.BaseHigh << 24 |
+ (ULONG64)Entry->BaseUpper << 32);
+}
+
+VOID
+FORCEINLINE
+KiSetGdtDescriptorBase(PKGDTENTRY Entry, ULONG64 Base)
+{
+ Entry->BaseLow = Base & 0xffff;
+ Entry->Bits.BaseMiddle = (Base >> 16) & 0xff;
+ Entry->Bits.BaseHigh = (Base >> 24) & 0xff;
+ Entry->BaseUpper = Base >> 32;
+}
+
+VOID
+FORCEINLINE
+KiSetGdtDescriptorLimit(PKGDTENTRY Entry, ULONG Limit)
+{
+ Entry->LimitLow = Limit & 0xffff;
+ Entry->Bits.LimitHigh = Limit >> 16;
+}
+
+VOID
+FORCEINLINE
+KiInitGdtEntry(PKGDTENTRY64 Entry, ULONG64 Base, ULONG Size, UCHAR Type, UCHAR Dpl)
+{
+ KiSetGdtDescriptorBase(Entry, Base);
+ KiSetGdtDescriptorLimit(Entry, Size - 1);
+ Entry->Bits.Type = Type;
+ Entry->Bits.Dpl = Dpl;
+ Entry->Bits.Present = 1;
+ Entry->Bits.System = 0;
+ Entry->Bits.LongMode = 0;
+ Entry->Bits.DefaultBig = 0;
+ Entry->Bits.Granularity = 0;
+ Entry->MustBeZero = 0;
+}
+
+#if defined(__GNUC__)
+
+static __inline__ __attribute__((always_inline)) void __lgdt(void *Source)
+{
+ __asm__ __volatile__("lgdt %0" : : "m"(*(short*)Source));
+}
+
+static __inline__ __attribute__((always_inline)) void __sgdt(void *Destination)
+{
+ __asm__ __volatile__("sgdt %0" : : "m"(*(short*)Destination) : "memory");
+}
+
+static __inline__ __attribute__((always_inline)) void __lldt(void *Source)
+{
+ __asm__ __volatile__("lldt %0" : : "m"(*(short*)Source));
+}
+
+static __inline__ __attribute__((always_inline)) void __sldt(void *Destination)
+{
+ __asm__ __volatile__("sldt %0" : : "m"(*(short*)Destination) : "memory");
+}
+
+static __inline__ __attribute__((always_inline)) void __ldmxcsr(unsigned long *Source)
+{
+ __asm__ __volatile__("ldmxcsr %0" : : "m"(*Source));
+}
+
+static __inline__ __attribute__((always_inline)) void __stmxcsr(unsigned long *Destination)
+{
+ __asm__ __volatile__("stmxcsr %0" : : "m"(*Destination) : "memory");
+}
+
+static __inline__ __attribute__((always_inline)) void __ltr(unsigned short Source)
+{
+ __asm__ __volatile__("ltr %0" : : "rm"(Source));
+}
+
+static __inline__ __attribute__((always_inline)) void __str(unsigned short *Destination)
+{
+ __asm__ __volatile__("str %0" : : "m"(*Destination) : "memory");
+}
+
+
+#define _Ke386GetSeg(N) ({ \
+ unsigned int __d; \
+ __asm__("movl %%" #N ",%0\n\t" :"=r" (__d)); \
+ __d; \
+ })
+
+#define _Ke386SetSeg(N,X) __asm__ __volatile__("movl %0,%%" #N : :"r" (X));
+
+#define _Ke386GetDr(N) ({ \
+ unsigned int __d; \
+ __asm__("movq %%dr" #N ",%0\n\t" :"=r" (__d)); \
+ __d; \
+ })
+
+#define _Ke386SetDr(N,X) __asm__ __volatile__("movl %0,%%dr" #N : :"r" (X));
+
+
+static inline void Ki386Cpuid(ULONG Op, PULONG Eax, PULONG Ebx, PULONG Ecx, PULONG Edx)
+{
+ __asm__("cpuid"
+ : "=a" (*Eax), "=b" (*Ebx), "=c" (*Ecx), "=d" (*Edx)
+ : "0" (Op));
+}
+
+#define Ke386Rdmsr(msr,val1,val2) __asm__ __volatile__("rdmsr" : "=a" (val1), "=d" (val2) : "c" (msr))
+#define Ke386Wrmsr(msr,val1,val2) __asm__ __volatile__("wrmsr" : /* no outputs */ : "c" (msr), "a" (val1), "d" (val2))
+
+#define Ke386HaltProcessor() __asm__("hlt\n\t");
+
+#define Ke386FnInit() __asm__("fninit\n\t");
+
+
+//
+// CR Macros
+//
+#define Ke386SetCr2(X) __asm__ __volatile__("movq %0,%%cr2" : :"r" ((void*)X));
+
+//
+// DR Macros
+//
+#define Ke386GetDr0() _Ke386GetDr(0)
+#define Ke386GetDr1() _Ke386GetDr(1)
+#define Ke386SetDr0(X) _Ke386SetDr(0,X)
+#define Ke386SetDr1(X) _Ke386SetDr(1,X)
+#define Ke386GetDr2() _Ke386GetDr(2)
+#define Ke386SetDr2(X) _Ke386SetDr(2,X)
+#define Ke386GetDr3() _Ke386GetDr(3)
+#define Ke386SetDr3(X) _Ke386SetDr(3,X)
+#define Ke386GetDr4() _Ke386GetDr(4)
+#define Ke386SetDr4(X) _Ke386SetDr(4,X)
+#define Ke386GetDr6() _Ke386GetDr(6)
+#define Ke386SetDr6(X) _Ke386SetDr(6,X)
+#define Ke386GetDr7() _Ke386GetDr(7)
+#define Ke386SetDr7(X) _Ke386SetDr(7,X)
+
+//
+// Segment Macros
+//
+#define Ke386GetSs() _Ke386GetSeg(ss)
+#define Ke386GetFs() _Ke386GetSeg(fs)
+#define Ke386SetFs(X) _Ke386SetSeg(fs, X)
+#define Ke386SetGs(X) _Ke386SetSeg(gs, X)
+#define Ke386SetDs(X) _Ke386SetSeg(ds, X)
+#define Ke386SetEs(X) _Ke386SetSeg(es, X)
+#define Ke386SetSs(X) _Ke386SetSeg(ss, X)
+
+#elif defined(_MSC_VER)
+
+VOID
+FORCEINLINE
+Ke386Wrmsr(IN ULONG Register,
+ IN ULONG Var1,
+ IN ULONG Var2)
+{
+ __asm mov eax, Var1;
+ __asm mov edx, Var2;
+ __asm wrmsr;
+}
+
+ULONGLONG
+FORCEINLINE
+Ke386Rdmsr(IN ULONG Register,
+ IN ULONG Var1,
+ IN ULONG Var2)
+{
+ __asm mov eax, Var1;
+ __asm mov edx, Var2;
+ __asm rdmsr;
+}
+
+VOID
+FORCEINLINE
+Ki386Cpuid(IN ULONG Operation,
+ OUT PULONG Var1,
+ OUT PULONG Var2,
+ OUT PULONG Var3,
+ OUT PULONG Var4)
+{
+ __asm mov eax, Operation;
+ __asm cpuid;
+ __asm mov [Var1], eax;
+ __asm mov [Var2], ebx;
+ __asm mov [Var3], ecx;
+ __asm mov [Var4], edx;
+}
+
+VOID
+FORCEINLINE
+Ke386FnInit(VOID)
+{
+ __asm fninit;
+}
+
+VOID
+FORCEINLINE
+Ke386HaltProcessor(VOID)
+{
+ __asm hlt;
+}
+
+VOID
+FORCEINLINE
+Ke386GetInterruptDescriptorTable(OUT KDESCRIPTOR Descriptor)
+{
+ __asm sidt Descriptor;
+}
+
+VOID
+FORCEINLINE
+Ke386SetInterruptDescriptorTable(IN KDESCRIPTOR Descriptor)
+{
+ __asm lidt Descriptor;
+}
+
+VOID
+FORCEINLINE
+Ke386GetGlobalDescriptorTable(OUT KDESCRIPTOR Descriptor)
+{
+ __asm sgdt Descriptor;
+}
+
+VOID
+FORCEINLINE
+Ke386SetGlobalDescriptorTable(IN KDESCRIPTOR Descriptor)
+{
+ __asm lgdt Descriptor;
+}
+
+VOID
+FORCEINLINE
+Ke386GetLocalDescriptorTable(OUT USHORT Descriptor)
+{
+ __asm sldt Descriptor;
+}
+
+VOID
+FORCEINLINE
+Ke386SetLocalDescriptorTable(IN USHORT Descriptor)
+{
+ __asm lldt Descriptor;
+}
+
+VOID
+FORCEINLINE
+Ke386SaveFlags(IN ULONG Flags)
+{
+ __asm pushf;
+ __asm pop Flags;
+}
+
+VOID
+FORCEINLINE
+Ke386RestoreFlags(IN ULONG Flags)
+{
+ __asm push Flags;
+ __asm popf;
+}
+
+VOID
+FORCEINLINE
+Ke386SetTr(IN USHORT Tr)
+{
+ __asm ltr Tr;
+}
+
+USHORT
+FORCEINLINE
+Ke386GetTr(IN USHORT Tr)
+{
+ __asm str Tr;
+}
+
+//
+// CR Macros
+//
+VOID
+FORCEINLINE
+Ke386SetCr2(IN ULONG Value)
+{
+ __asm mov eax, Value;
+ __asm mov cr2, eax;
+}
+
+//
+// DR Macros
+//
+ULONG
+FORCEINLINE
+Ke386GetDr0(VOID)
+{
+ __asm mov eax, dr0;
+}
+
+ULONG
+FORCEINLINE
+Ke386GetDr1(VOID)
+{
+ __asm mov eax, dr1;
+}
+
+ULONG
+FORCEINLINE
+Ke386GetDr2(VOID)
+{
+ __asm mov eax, dr2;
+}
+
+ULONG
+FORCEINLINE
+Ke386GetDr3(VOID)
+{
+ __asm mov eax, dr3;
+}
+
+ULONG
+FORCEINLINE
+Ke386GetDr6(VOID)
+{
+ __asm mov eax, dr6;
+}
+
+ULONG
+FORCEINLINE
+Ke386GetDr7(VOID)
+{
+ __asm mov eax, dr7;
+}
+
+VOID
+FORCEINLINE
+Ke386SetDr0(IN ULONG Value)
+{
+ __asm mov eax, Value;
+ __asm mov dr0, eax;
+}
+
+VOID
+FORCEINLINE
+Ke386SetDr1(IN ULONG Value)
+{
+ __asm mov eax, Value;
+ __asm mov dr1, eax;
+}
+
+VOID
+FORCEINLINE
+Ke386SetDr2(IN ULONG Value)
+{
+ __asm mov eax, Value;
+ __asm mov dr2, eax;
+}
+
+VOID
+FORCEINLINE
+Ke386SetDr3(IN ULONG Value)
+{
+ __asm mov eax, Value;
+ __asm mov dr3, eax;
+}
+
+VOID
+FORCEINLINE
+Ke386SetDr6(IN ULONG Value)
+{
+ __asm mov eax, Value;
+ __asm mov dr6, eax;
+}
+
+VOID
+FORCEINLINE
+Ke386SetDr7(IN ULONG Value)
+{
+ __asm mov eax, Value;
+ __asm mov dr7, eax;
+}
+
+//
+// Segment Macros
+//
+USHORT
+FORCEINLINE
+Ke386GetSs(VOID)
+{
+ __asm mov ax, ss;
+}
+
+USHORT
+FORCEINLINE
+Ke386GetFs(VOID)
+{
+ __asm mov ax, fs;
+}
+
+USHORT
+FORCEINLINE
+Ke386GetDs(VOID)
+{
+ __asm mov ax, ds;
+}
+
+USHORT
+FORCEINLINE
+Ke386GetEs(VOID)
+{
+ __asm mov ax, es;
+}
+
+VOID
+FORCEINLINE
+Ke386SetSs(IN USHORT Value)
+{
+ __asm mov ax, Value;
+ __asm mov ss, ax;
+}
+
+VOID
+FORCEINLINE
+Ke386SetFs(IN USHORT Value)
+{
+ __asm mov ax, Value;
+ __asm mov fs, ax;
+}
+
+VOID
+FORCEINLINE
+Ke386SetDs(IN USHORT Value)
+{
+ __asm mov ax, Value;
+ __asm mov ds, ax;
+}
+
+VOID
+FORCEINLINE
+Ke386SetEs(IN USHORT Value)
+{
+ __asm mov ax, Value;
+ __asm mov es, ax;
+}
+
+#else
+#error Unknown compiler for inline assembler
+#endif
+
+#endif
+
+/* EOF */
--- /dev/null
+#ifndef __NTOSKRNL_INCLUDE_INTERNAL_AMD64_KE_H
+#define __NTOSKRNL_INCLUDE_INTERNAL_AMD64_KE_H
+
+#define X86_EFLAGS_TF 0x00000100 /* Trap flag */
+#define X86_EFLAGS_IF 0x00000200 /* Interrupt Enable flag */
+#define X86_EFLAGS_IOPL 0x00003000 /* I/O Privilege Level bits */
+#define X86_EFLAGS_NT 0x00004000 /* Nested Task flag */
+#define X86_EFLAGS_RF 0x00010000 /* Resume flag */
+#define X86_EFLAGS_VM 0x00020000 /* Virtual Mode */
+#define X86_EFLAGS_ID 0x00200000 /* CPUID detection flag */
+
+#define X86_CR0_PE 0x00000001 /* enable Protected Mode */
+#define X86_CR0_NE 0x00000020 /* enable native FPU error reporting */
+#define X86_CR0_TS 0x00000008 /* enable exception on FPU instruction for task switch */
+#define X86_CR0_EM 0x00000004 /* enable FPU emulation (disable FPU) */
+#define X86_CR0_MP 0x00000002 /* enable FPU monitoring */
+#define X86_CR0_WP 0x00010000 /* enable Write Protect (copy on write) */
+#define X86_CR0_PG 0x80000000 /* enable Paging */
+
+#define X86_CR4_PAE 0x00000020 /* enable physical address extensions */
+#define X86_CR4_PGE 0x00000080 /* enable global pages */
+#define X86_CR4_OSFXSR 0x00000200 /* enable FXSAVE/FXRSTOR instructions */
+#define X86_CR4_OSXMMEXCPT 0x00000400 /* enable #XF exception */
+
+#define X86_FEATURE_VME 0x00000002 /* Virtual 8086 Extensions are present */
+#define X86_FEATURE_TSC 0x00000010 /* time stamp counters are present */
+#define X86_FEATURE_PAE 0x00000040 /* physical address extension is present */
+#define X86_FEATURE_CX8 0x00000100 /* CMPXCHG8B instruction present */
+#define X86_FEATURE_SYSCALL 0x00000800 /* SYSCALL/SYSRET support present */
+#define X86_FEATURE_PGE 0x00002000 /* Page Global Enable */
+#define X86_FEATURE_MMX 0x00800000 /* MMX extension present */
+#define X86_FEATURE_FXSR 0x01000000 /* FXSAVE/FXRSTOR instructions present */
+#define X86_FEATURE_SSE 0x02000000 /* SSE extension present */
+#define X86_FEATURE_SSE2 0x04000000 /* SSE2 extension present */
+#define X86_FEATURE_HT 0x10000000 /* Hyper-Threading present */
+
+#define X86_EXT_FEATURE_SSE3 0x00000001 /* SSE3 extension present */
+#define X86_EXT_FEATURE_3DNOW 0x40000000 /* 3DNOW! extension present */
+
+#define FRAME_EDITED 0xFFF8
+
+#define X86_MSR_GSBASE 0xC0000101
+#define X86_MSR_KERNEL_GSBASE 0xC0000102
+#define X86_MSR_EFER 0xC0000080
+#define X86_MSR_STAR 0xC0000081
+#define X86_MSR_LSTAR 0xC0000082
+#define X86_MSR_CSTAR 0xC0000083
+#define X86_MSR_SFMASK 0xC0000084
+
+#define EFER_SCE 0x01
+#define EFER_LME 0x10
+#define EFER_LMA 0x40
+#define EFER_NXE 0x80
+#define EFER_SVME 0x100
+#define EFER_FFXSR 0x400
+
+#define AMD64_TSS 9
+
+#ifndef __ASM__
+
+#include "intrin_i.h"
+
+typedef struct _KIDT_INIT
+{
+ UCHAR InterruptId;
+ UCHAR Dpl;
+ UCHAR IstIndex;
+ PVOID ServiceRoutine;
+} KIDT_INIT, *PKIDT_INIT;
+
+extern ULONG Ke386CacheAlignment;
+extern ULONG KeI386NpxPresent;
+extern ULONG KeI386XMMIPresent;
+extern ULONG KeI386FxsrPresent;
+extern ULONG KeI386CpuType;
+extern ULONG KeI386CpuStep;
+
+#define IMAGE_FILE_MACHINE_ARCHITECTURE IMAGE_FILE_MACHINE_AMD64
+
+//
+// INT3 is 1 byte long
+//
+#define KD_BREAKPOINT_TYPE UCHAR
+#define KD_BREAKPOINT_SIZE sizeof(UCHAR)
+#define KD_BREAKPOINT_VALUE 0xCC
+
+//
+// Macros for getting and setting special purpose registers in portable code
+//
+#define KeGetContextPc(Context) \
+ ((Context)->Rip)
+
+#define KeSetContextPc(Context, ProgramCounter) \
+ ((Context)->Rip = (ProgramCounter))
+
+#define KeGetTrapFramePc(TrapFrame) \
+ ((TrapFrame)->Rip)
+
+#define KeGetContextReturnRegister(Context) \
+ ((Context)->Rax)
+
+#define KeSetContextReturnRegister(Context, ReturnValue) \
+ ((Context)->Rax = (ReturnValue))
+
+//
+// Returns the Interrupt State from a Trap Frame.
+// ON = TRUE, OFF = FALSE
+//
+#define KeGetTrapFrameInterruptState(TrapFrame) \
+ BooleanFlagOn((TrapFrame)->EFlags, EFLAGS_INTERRUPT_MASK)
+
+//
+// Invalidates the TLB entry for a specified address
+//
+FORCEINLINE
+VOID
+KeInvalidateTlbEntry(IN PVOID Address)
+{
+ /* Invalidate the TLB entry for this address */
+ __invlpg(Address);
+}
+
+FORCEINLINE
+VOID
+KeFlushProcessTb(VOID)
+{
+ /* Flush the TLB by resetting CR3 */
+ __writecr3(__readcr3());
+}
+
+FORCEINLINE
+PRKTHREAD
+KeGetCurrentThread(VOID)
+{
+ return (PRKTHREAD)__readgsqword(FIELD_OFFSET(KIPCR, Prcb.CurrentThread));
+}
+
+FORCEINLINE
+VOID
+KiRundownThread(IN PKTHREAD Thread)
+{
+#ifndef CONFIG_SMP
+ DbgPrint("KiRundownThread is unimplemented\n");
+#else
+ /* Nothing to do */
+#endif
+}
+
+struct _KPCR;
+
+VOID
+FASTCALL
+KiInitializeTss(IN PKTSS Tss, IN UINT64 Stack);
+
+VOID KiDivideErrorFault();
+VOID KiDebugTrapOrFault();
+VOID KiNmiInterrupt();
+VOID KiBreakpointTrap();
+VOID KiOverflowTrap();
+VOID KiBoundFault();
+VOID KiInvalidOpcodeFault();
+VOID KiNpxNotAvailableFault();
+VOID KiDoubleFaultAbort();
+VOID KiNpxSegmentOverrunAbort();
+VOID KiInvalidTssFault();
+VOID KiSegmentNotPresentFault();
+VOID KiStackFault();
+VOID KiGeneralProtectionFault();
+VOID KiPageFault();
+VOID KiFloatingErrorFault();
+VOID KiAlignmentFault();
+VOID KiMcheckAbort();
+VOID KiXmmException();
+VOID KiApcInterrupt();
+VOID KiRaiseAssertion();
+VOID KiDebugServiceTrap();
+VOID KiDpcInterrupt();
+VOID KiIpiInterrupt();
+
+VOID
+KiGdtPrepareForApplicationProcessorInit(ULONG Id);
+VOID
+Ki386InitializeLdt(VOID);
+VOID
+Ki386SetProcessorFeatures(VOID);
+
+VOID
+NTAPI
+KiGetCacheInformation(VOID);
+
+BOOLEAN
+NTAPI
+KiIsNpxPresent(
+ VOID
+);
+
+BOOLEAN
+NTAPI
+KiIsNpxErrataPresent(
+ VOID
+);
+
+VOID
+NTAPI
+KiSetProcessorType(VOID);
+
+ULONG
+NTAPI
+KiGetFeatureBits(VOID);
+
+VOID
+NTAPI
+KiInitializeCpuFeatures();
+
+ULONG KeAllocateGdtSelector(ULONG Desc[2]);
+VOID KeFreeGdtSelector(ULONG Entry);
+VOID
+NtEarlyInitVdm(VOID);
+VOID
+KeApplicationProcessorInitDispatcher(VOID);
+VOID
+KeCreateApplicationProcessorIdleThread(ULONG Id);
+
+VOID
+NTAPI
+Ke386InitThreadWithContext(PKTHREAD Thread,
+ PKSYSTEM_ROUTINE SystemRoutine,
+ PKSTART_ROUTINE StartRoutine,
+ PVOID StartContext,
+ PCONTEXT Context);
+#define KeArchInitThreadWithContext(Thread,SystemRoutine,StartRoutine,StartContext,Context) \
+ Ke386InitThreadWithContext(Thread,SystemRoutine,StartRoutine,StartContext,Context)
+
+#ifdef _NTOSKRNL_ /* FIXME: Move flags above to NDK instead of here */
+VOID
+NTAPI
+KiThreadStartup(PKSYSTEM_ROUTINE SystemRoutine,
+ PKSTART_ROUTINE StartRoutine,
+ PVOID StartContext,
+ BOOLEAN UserThread,
+ KTRAP_FRAME TrapFrame);
+#endif
+
+#endif
+#endif /* __NTOSKRNL_INCLUDE_INTERNAL_AMD64_KE_H */
+
+/* EOF */
--- /dev/null
+/*
+ * Lowlevel memory managment definitions
+ */
+
+#ifndef __NTOSKRNL_INCLUDE_INTERNAL_AMD64_MM_H
+#define __NTOSKRNL_INCLUDE_INTERNAL_AMD64_MM_H
+
+/* Helper macros */
+#define PAGE_MASK(x) ((x)&(~0xfff))
+#define PAE_PAGE_MASK(x) ((x)&(~0xfffLL))
+
+/* Memory layout base addresses */
+#define HYPER_SPACE 0xFFFFF70000000000ULL
+#define HYPER_SPACE_END 0xFFFFF77FFFFFFFFFULL
+#define MI_SESSION_SPACE_MINIMUM (PVOID)0xFFFFF90000000000ULL
+#define MI_SESSION_VIEW_END (PVOID)0xFFFFF97FFF000000ULL
+#define MI_SESSION_SPACE_END (PVOID)0xFFFFF98000000000ULL
+#define MI_SYSTEM_PTE_START (PVOID)0xFFFFFAA000000000ULL
+#define MI_PAGED_POOL_START (PVOID)0xFFFFFA8000000000ULL
+#define MI_NON_PAGED_SYSTEM_START_MIN 0xFFFFFAA000000000ULL
+#define MI_PFN_DATABASE (PVOID)0xFFFFFAC000000000ULL
+#define MI_NONPAGED_POOL_END (PVOID)0xFFFFFAE000000000ULL
+#define MI_DEBUG_MAPPING (PVOID)0xFFFFFFFF80000000ULL // FIXME
+#define MI_HIGHEST_SYSTEM_ADDRESS (PVOID)0xFFFFFFFFFFFFFFFFULL
+
+
+#define MI_NUMBER_SYSTEM_PTES 22000
+
+PULONG64
+FORCEINLINE
+MmGetPageDirectory(VOID)
+{
+ return (PULONG64)__readcr3();
+}
+
+PMMPTE
+FORCEINLINE
+MiAddressToPxe(PVOID Address)
+{
+ ULONG64 Offset = (ULONG64)Address >> (PXI_SHIFT - 3);
+ Offset &= PXI_MASK << 3;
+ return (PMMPTE)(PXE_BASE + Offset);
+}
+
+PMMPTE
+FORCEINLINE
+MiAddressToPpe(PVOID Address)
+{
+ ULONG64 Offset = (ULONG64)Address >> (PPI_SHIFT - 3);
+ Offset &= 0x3FFFF << 3;
+ return (PMMPTE)(PPE_BASE + Offset);
+}
+
+PMMPTE
+FORCEINLINE
+MiAddressToPde(PVOID Address)
+{
+ ULONG64 Offset = (ULONG64)Address >> (PDI_SHIFT - 3);
+ Offset &= 0x7FFFFFF << 3;
+ return (PMMPTE)(PDE_BASE + Offset);
+}
+
+PMMPTE
+FORCEINLINE
+MiAddressToPte(PVOID Address)
+{
+ ULONG64 Offset = (ULONG64)Address >> (PTI_SHIFT - 3);
+ Offset &= 0xFFFFFFFFFULL << 3;
+ return (PMMPTE)(PTE_BASE + Offset);
+}
+
+/* Convert a PTE into a corresponding address */
+PVOID
+FORCEINLINE
+MiPteToAddress(PMMPTE Pte)
+{
+ /* Use signed math */
+ LONG64 Temp = (LONG64)Pte;
+ Temp <<= 25;
+ Temp >>= 16;
+ return (PVOID)Temp;
+}
+
+BOOLEAN
+FORCEINLINE
+MiIsPdeForAddressValid(PVOID Address)
+{
+ return ((MiAddressToPxe(Address)->u.Hard.Valid) &&
+ (MiAddressToPpe(Address)->u.Hard.Valid) &&
+ (MiAddressToPde(Address)->u.Hard.Valid));
+}
+
+//#define ADDR_TO_PAGE_TABLE(v) (((ULONG)(v)) / (1024 * PAGE_SIZE))
+//#define ADDR_TO_PDE_OFFSET(v) ((((ULONG)(v)) / (1024 * PAGE_SIZE)))
+//#define ADDR_TO_PTE_OFFSET(v) ((((ULONG)(v)) % (1024 * PAGE_SIZE)) / PAGE_SIZE)
+
+#define VAtoPXI(va) ((((ULONG64)va) >> PXI_SHIFT) & 0x1FF)
+#define VAtoPPI(va) ((((ULONG64)va) >> PPI_SHIFT) & 0x1FF)
+#define VAtoPDI(va) ((((ULONG64)va) >> PDI_SHIFT) & 0x1FF)
+#define VAtoPTI(va) ((((ULONG64)va) >> PTI_SHIFT) & 0x1FF)
+
+/* We don't use these hacks */
+VOID
+FORCEINLINE
+MmUpdatePageDir(PEPROCESS Process, PVOID Address, ULONG Size)
+{
+ /* Nothing to do */
+}
+
+VOID
+FORCEINLINE
+MmInitGlobalKernelPageDirectory(VOID)
+{
+ /* Nothing to do */
+}
+
+#define IS_ALIGNED(addr, align) (((ULONG64)(addr) & (align - 1)) == 0)
+#define IS_PAGE_ALIGNED(addr) IS_ALIGNED(addr, PAGE_SIZE)
+
+/// MIARM.H
+
+/* Easy accessing PFN in PTE */
+#define PFN_FROM_PTE(v) ((v)->u.Hard.PageFrameNumber)
+
+// FIXME, only copied from x86
+#define MI_MAKE_LOCAL_PAGE(x) ((x)->u.Hard.Global = 0)
+#define MI_MAKE_DIRTY_PAGE(x) ((x)->u.Hard.Dirty = 1)
+#define MI_PAGE_DISABLE_CACHE(x) ((x)->u.Hard.CacheDisable = 1)
+#define MI_PAGE_WRITE_THROUGH(x) ((x)->u.Hard.WriteThrough = 1)
+#define MI_PAGE_WRITE_COMBINED(x) ((x)->u.Hard.WriteThrough = 0)
+#define MI_IS_PAGE_WRITEABLE(x) ((x)->u.Hard.Write == 1)
+#define MI_IS_PAGE_COPY_ON_WRITE(x)((x)->u.Hard.CopyOnWrite == 1)
+#define MI_IS_PAGE_DIRTY(x) ((x)->u.Hard.Dirty == 1)
+#define MI_MAKE_OWNER_PAGE(x) ((x)->u.Hard.Owner = 1)
+#define MI_MAKE_WRITE_PAGE(x) ((x)->u.Hard.Write = 1)
+
+
+#define MI_MIN_PAGES_FOR_NONPAGED_POOL_TUNING ((255*1024*1024) >> PAGE_SHIFT)
+#define MI_MIN_PAGES_FOR_SYSPTE_TUNING ((19*1024*1024) >> PAGE_SHIFT)
+#define MI_MIN_PAGES_FOR_SYSPTE_BOOST ((32*1024*1024) >> PAGE_SHIFT)
+#define MI_MAX_INIT_NONPAGED_POOL_SIZE (128ULL * 1024 * 1024 * 1024)
+#define MI_MAX_NONPAGED_POOL_SIZE (128ULL * 1024 * 1024 * 1024)
+#define MI_MAX_FREE_PAGE_LISTS 4
+
+#define MI_MIN_INIT_PAGED_POOLSIZE (32 * 1024 * 1024)
+
+#define MI_SESSION_VIEW_SIZE (20 * 1024 * 1024)
+#define MI_SESSION_POOL_SIZE (16 * 1024 * 1024)
+#define MI_SESSION_IMAGE_SIZE (8 * 1024 * 1024)
+#define MI_SESSION_WORKING_SET_SIZE (4 * 1024 * 1024)
+#define MI_SESSION_SIZE (MI_SESSION_VIEW_SIZE + \
+ MI_SESSION_POOL_SIZE + \
+ MI_SESSION_IMAGE_SIZE + \
+ MI_SESSION_WORKING_SET_SIZE)
+
+#define MI_SYSTEM_VIEW_SIZE (16 * 1024 * 1024)
+
+
+#define MM_HIGHEST_VAD_ADDRESS \
+ (PVOID)((ULONG_PTR)MM_HIGHEST_USER_ADDRESS - (16 * PAGE_SIZE))
+
+
+//
+// FIXFIX: These should go in ex.h after the pool merge
+//
+#define POOL_LISTS_PER_PAGE (PAGE_SIZE / sizeof(LIST_ENTRY))
+#define BASE_POOL_TYPE_MASK 1
+#define POOL_MAX_ALLOC (PAGE_SIZE - (sizeof(POOL_HEADER) + sizeof(LIST_ENTRY)))
+
+#endif /* __NTOSKRNL_INCLUDE_INTERNAL_AMD64_MM_H */
#include "../mips/intrin_i.h"
#elif defined(_M_ARM)
#include "../arm/intrin_i.h"
+#elif defined(_M_AMD64)
+#include "../amd64/intrin_i.h"
#else
#error "Unknown processor"
#endif
#include "../mips/ke.h"
#elif defined(_M_ARM)
#include "../arm/ke.h"
+#elif defined(_M_AMD64)
+#include "../amd64/ke.h"
#else
#error "Unknown processor"
#endif
+VOID KiArchInitSystem(VOID);
+
#endif /* __NTOSKRNL_INCLUDE_INTERNAL_ARCH_KE_H */
/* EOF */
#include <internal/mips/mm.h>
#elif defined(_M_ARM)
#include <internal/arm/mm.h>
+#elif defined(_M_AMD64)
+#include <internal/amd64/mm.h>
#else
#error "Unknown processor"
#endif
#define PTE_TOP 0xC03FFFFF
#define PDE_BASE 0xC1000000
#define HYPER_SPACE 0xC1100000
+#define HYPER_SPACE_END 0xC07FFFFF
struct _EPROCESS;
PULONG MmGetPageDirectory(VOID);
PVOID
NTAPI
CmpAllocate(
- IN ULONG Size,
+ IN SIZE_T Size,
IN BOOLEAN Paged,
IN ULONG Tag
);
#define PTE_BASE 0xC0000000
#define PDE_BASE 0xC0300000
#define PTE_TOP 0xC03FFFFF
+#define PDE_TOP 0xC0300FFF
+#define PTE_PER_PAGE 1024
#define HYPER_SPACE 0xC0400000
+#define HYPER_SPACE_END 0xC07FFFFF
/* Converting address to a corresponding PDE or PTE entry */
#define MiAddressToPde(x) \
// Convert a PTE into a corresponding address
//
#define MiPteToAddress(PTE) ((PVOID)((ULONG)(PTE) << 10))
+#define MiIsPdeForAddressValid(Pde) (MiAddressToPde(Address)->u.Hard.Valid)
#define ADDR_TO_PAGE_TABLE(v) (((ULONG)(v)) / (1024 * PAGE_SIZE))
#define ADDR_TO_PDE_OFFSET(v) ((((ULONG)(v)) / (1024 * PAGE_SIZE)))
);
/* Finds a new thread to run */
-NTSTATUS
+LONG_PTR
FASTCALL
KiSwapThread(
IN PKTHREAD Thread,
FASTCALL
KiUnwaitThread(
IN PKTHREAD Thread,
- IN NTSTATUS WaitStatus,
+ IN LONG_PTR WaitStatus,
IN KPRIORITY Increment
);
VOID
NTAPI
KeRosDumpStackFrames(
- PULONG Frame,
+ PULONG_PTR Frame,
ULONG FrameCount
);
VOID
);
+PVOID
+NTAPI
+KiPcToFileHeader(IN PVOID Eip,
+ OUT PLDR_DATA_TABLE_ENTRY *LdrEntry,
+ IN BOOLEAN DriversOnly,
+ OUT PBOOLEAN InKernel);
+
+PVOID
+NTAPI
+KiRosPcToUserFileHeader(IN PVOID Eip,
+ OUT PLDR_DATA_TABLE_ENTRY *LdrEntry);
+
#include "ke_x.h"
#endif /* __NTOSKRNL_INCLUDE_INTERNAL_KE_H */
extern ULONG MmHighestPhysicalPage;
extern ULONG MmAvailablePages;
extern ULONG MmResidentAvailablePages;
+extern ULONG MmNumberOfSystemPtes;
extern PVOID MmPagedPoolBase;
extern ULONG MmPagedPoolSize;
extern SIZE_T MmPeakCommitment;
extern SIZE_T MmtotalCommitLimitMaximum;
-extern BOOLEAN MiDbgReadyForPhysical;
+extern PVOID MiDebugMapping;
+extern PMMPTE MmDebugPte;
struct _KTRAP_FRAME;
struct _EPROCESS;
struct _MM_RMAP_ENTRY;
struct _MM_PAGEOP;
typedef ULONG SWAPENTRY;
-typedef ULONG PFN_TYPE, *PPFN_TYPE;
//
// MmDbgCopyMemory Flags
#define MI_HYPERSPACE_PTES (256 - 1)
#define MI_ZERO_PTES (32)
-#define MI_MAPPING_RANGE_START (ULONG)HYPER_SPACE
+#define MI_MAPPING_RANGE_START (ULONG_PTR)HYPER_SPACE
#define MI_MAPPING_RANGE_END (MI_MAPPING_RANGE_START + \
MI_HYPERSPACE_PTES * PAGE_SIZE)
#define MI_ZERO_PTE (PMMPTE)(MI_MAPPING_RANGE_END + \
(PAGE_WRITECOPY | \
PAGE_EXECUTE_WRITECOPY)
+#define MI_PFN_ELEMENT(Pfn) (&MmPfnDatabase[Pfn])
#define InterlockedCompareExchangePte(PointerPte, Exchange, Comperand) \
InterlockedCompareExchange((PLONG)(PointerPte), Exchange, Comperand)
USHORT ShortFlags;
} e2;
} u3;
+#ifdef _WIN64
+ ULONG UsedPageTableEntries;
+#endif
union
{
MMPTE OriginalPte;
ULONG_PTR EntireFrame; // SavedSwapEntry
struct
{
- ULONG_PTR PteFrame:25;
+ ULONG_PTR PteFrame: 8*sizeof(PVOID)-7;
ULONG_PTR InPageError:1;
ULONG_PTR VerifierAllocation:1;
ULONG_PTR AweAllocation:1;
PVOID Context,
PMEMORY_AREA MemoryArea,
PVOID Address,
- PFN_TYPE Page,
+ PFN_NUMBER Page,
SWAPENTRY SwapEntry,
BOOLEAN Dirty
);
NTAPI
MmBuildMdlFromPages(
PMDL Mdl,
- PULONG Pages
+ PPFN_NUMBER Pages
);
/* mminit.c ******************************************************************/
NTAPI
MmReadFromSwapPage(
SWAPENTRY SwapEntry,
- PFN_TYPE Page
+ PFN_NUMBER Page
);
BOOLEAN
NTAPI
MmWriteToSwapPage(
SWAPENTRY SwapEntry,
- PFN_TYPE Page
+ PFN_NUMBER Page
);
NTSTATUS
PMEMORY_AREA MemoryArea,
PVOID Address,
PMEMORY_BASIC_INFORMATION Info,
- PULONG ResultLength
+ PSIZE_T ResultLength
);
VOID
PVOID
NTAPI
-ExAllocatePageWithPhysPage(PFN_TYPE Page);
+ExAllocatePageWithPhysPage(PFN_NUMBER Page);
NTSTATUS
NTAPI
MiCopyFromUserPage(
- PFN_TYPE Page,
+ PFN_NUMBER Page,
PVOID SourceAddress
);
NTSTATUS
NTAPI
-MiZeroPage(PFN_TYPE Page);
+MiZeroPage(PFN_NUMBER Page);
/* memsafe.s *****************************************************************/
NTAPI
MmReleasePageMemoryConsumer(
ULONG Consumer,
- PFN_TYPE Page
+ PFN_NUMBER Page
);
NTSTATUS
MmRequestPageMemoryConsumer(
ULONG Consumer,
BOOLEAN MyWait,
- PPFN_TYPE AllocatedPage
+ PPFN_NUMBER AllocatedPage
);
VOID
VOID
NTAPI
MmSetRmapListHeadPage(
- PFN_TYPE Page,
+ PFN_NUMBER Page,
struct _MM_RMAP_ENTRY* ListHead
);
struct _MM_RMAP_ENTRY*
NTAPI
-MmGetRmapListHeadPage(PFN_TYPE Page);
+MmGetRmapListHeadPage(PFN_NUMBER Page);
VOID
NTAPI
MmInsertRmap(
- PFN_TYPE Page,
+ PFN_NUMBER Page,
struct _EPROCESS *Process,
PVOID Address
);
VOID
NTAPI
MmDeleteAllRmaps(
- PFN_TYPE Page,
+ PFN_NUMBER Page,
PVOID Context,
VOID (*DeleteMapping)(PVOID Context, struct _EPROCESS *Process, PVOID Address)
);
VOID
NTAPI
MmDeleteRmap(
- PFN_TYPE Page,
+ PFN_NUMBER Page,
struct _EPROCESS *Process,
PVOID Address
);
VOID
NTAPI
-MmSetCleanAllRmaps(PFN_TYPE Page);
+MmSetCleanAllRmaps(PFN_NUMBER Page);
VOID
NTAPI
-MmSetDirtyAllRmaps(PFN_TYPE Page);
+MmSetDirtyAllRmaps(PFN_NUMBER Page);
BOOLEAN
NTAPI
-MmIsDirtyPageRmap(PFN_TYPE Page);
+MmIsDirtyPageRmap(PFN_NUMBER Page);
NTSTATUS
NTAPI
-MmWritePagePhysicalAddress(PFN_TYPE Page);
+MmWritePagePhysicalAddress(PFN_NUMBER Page);
NTSTATUS
NTAPI
-MmPageOutPhysicalAddress(PFN_TYPE Page);
+MmPageOutPhysicalAddress(PFN_NUMBER Page);
/* freelist.c **********************************************************/
FORCEINLINE
PMMPFN
-MiGetPfnEntry(IN PFN_TYPE Pfn)
+MiGetPfnEntry(IN PFN_NUMBER Pfn)
{
PMMPFN Page;
extern RTL_BITMAP MiPfnBitMap;
return Pfn1 - MmPfnDatabase;
}
-PFN_TYPE
+PFN_NUMBER
NTAPI
-MmGetLRUNextUserPage(PFN_TYPE PreviousPage);
+MmGetLRUNextUserPage(PFN_NUMBER PreviousPage);
-PFN_TYPE
+PFN_NUMBER
NTAPI
MmGetLRUFirstUserPage(VOID);
VOID
NTAPI
-MmInsertLRULastUserPage(PFN_TYPE Page);
+MmInsertLRULastUserPage(PFN_NUMBER Page);
VOID
NTAPI
-MmRemoveLRUUserPage(PFN_TYPE Page);
+MmRemoveLRUUserPage(PFN_NUMBER Page);
VOID
NTAPI
-MmLockPage(PFN_TYPE Page);
+MmLockPage(PFN_NUMBER Page);
VOID
NTAPI
-MmUnlockPage(PFN_TYPE Page);
+MmUnlockPage(PFN_NUMBER Page);
ULONG
NTAPI
-MmGetLockCountPage(PFN_TYPE Page);
+MmGetLockCountPage(PFN_NUMBER Page);
VOID
NTAPI
VOID
);
-PFN_TYPE
+PFN_NUMBER
NTAPI
MmGetContinuousPages(
ULONG NumberOfBytes,
PVOID
NTAPI
-MiMapPagesToZeroInHyperSpace(IN PMMPFN *Pages,
+MiMapPagesToZeroInHyperSpace(IN PFN_NUMBER *Pages,
IN PFN_NUMBER NumberOfPages);
VOID
PVOID
MiMapPageToZeroInHyperSpace(IN PFN_NUMBER Page)
{
- PMMPFN Pfn1 = MiGetPfnEntry(Page);
- return MiMapPagesToZeroInHyperSpace(&Pfn1, 1);
+ return MiMapPagesToZeroInHyperSpace(&Page, 1);
}
#define MmDeleteHyperspaceMapping(x) MiUnmapPageInHyperSpace(HyperProcess, x, HyperIrql);
MmCreateVirtualMappingForKernel(
PVOID Address,
ULONG flProtect,
- PPFN_TYPE Pages,
+ PPFN_NUMBER Pages,
ULONG PageCount
);
struct _EPROCESS* Process,
PVOID Address,
ULONG flProtect,
- PPFN_TYPE Pages,
+ PPFN_NUMBER Pages,
ULONG PageCount
);
struct _EPROCESS* Process,
PVOID Address,
ULONG flProtect,
- PPFN_TYPE Pages,
+ PPFN_NUMBER Pages,
ULONG PageCount
);
struct _EPROCESS *Process,
PVOID Address,
BOOLEAN* WasDirty,
- PPFN_TYPE Page
+ PPFN_NUMBER Page
);
VOID
VOID
NTAPI
MmTransferOwnershipPage(
- PFN_TYPE Page,
+ PFN_NUMBER Page,
ULONG NewConsumer
);
PVOID Address
);
-PFN_TYPE
+PFN_NUMBER
NTAPI
MmAllocPage(
ULONG Consumer,
PHYSICAL_ADDRESS LowestAddress,
PHYSICAL_ADDRESS HighestAddress,
ULONG NumberOfPages,
- PPFN_TYPE Pages
+ PPFN_NUMBER Pages
);
VOID
NTAPI
-MmDereferencePage(PFN_TYPE Page);
+MmDereferencePage(PFN_NUMBER Page);
VOID
NTAPI
-MmReferencePage(PFN_TYPE Page);
+MmReferencePage(PFN_NUMBER Page);
ULONG
NTAPI
-MmGetReferenceCountPage(PFN_TYPE Page);
+MmGetReferenceCountPage(PFN_NUMBER Page);
BOOLEAN
NTAPI
-MmIsPageInUse(PFN_TYPE Page);
+MmIsPageInUse(PFN_NUMBER Page);
VOID
NTAPI
MmSetSavedSwapEntryPage(
- PFN_TYPE Page,
+ PFN_NUMBER Page,
SWAPENTRY SavedSwapEntry);
SWAPENTRY
NTAPI
-MmGetSavedSwapEntryPage(PFN_TYPE Page);
+MmGetSavedSwapEntryPage(PFN_NUMBER Page);
VOID
NTAPI
PVOID Address
);
-PFN_TYPE
+PFN_NUMBER
NTAPI
MmGetPfnForProcess(
struct _EPROCESS *Process,
MmCreateProcessAddressSpace(
IN ULONG MinWs,
IN PEPROCESS Dest,
- IN PULONG DirectoryTableBase
+ IN PULONG_PTR DirectoryTableBase
);
NTSTATUS
NTAPI
MmInitializeHandBuiltProcess(
IN PEPROCESS Process,
- IN PULONG DirectoryTableBase
+ IN PULONG_PTR DirectoryTableBase
);
PVOID Address,
BOOLEAN FreePage,
BOOLEAN* WasDirty,
- PPFN_TYPE Page
+ PPFN_NUMBER Page
);
BOOLEAN
VOID
NTAPI
-MmMarkPageMapped(PFN_TYPE Page);
+MmMarkPageMapped(PFN_NUMBER Page);
VOID
NTAPI
-MmMarkPageUnmapped(PFN_TYPE Page);
+MmMarkPageUnmapped(PFN_NUMBER Page);
VOID
NTAPI
PVOID BaseAddress
);
+VOID
+NTAPI
+MmFreeSection(
+ PVOID BaseAddress
+);
+
NTSTATUS
NTAPI
MmQuerySectionView(
PMEMORY_AREA MemoryArea,
PVOID Address,
PMEMORY_BASIC_INFORMATION Info,
- PULONG ResultLength
+ PSIZE_T ResultLength
);
NTSTATUS
IN PVOID Address,
IN MEMORY_INFORMATION_CLASS VirtualMemoryInformationClass,
OUT PVOID VirtualMemoryInformation,
- IN ULONG Length,
- OUT PULONG ResultLength
+ IN SIZE_T Length,
+ OUT PSIZE_T ResultLength
);
/* sysldr.c ******************************************************************/
#include "hal.h"
#include "arch/intrin_i.h"
+extern ULONG (*FrLdrDbgPrint)(const char *Format, ...);
+
+#include <pshpack1.h>
+/*
+ * Defines a descriptor as it appears in the processor tables
+ */
+typedef struct __DESCRIPTOR
+{
+ ULONG a;
+ ULONG b;
+} IDT_DESCRIPTOR, GDT_DESCRIPTOR;
+
+#include <poppack.h>
+//extern GDT_DESCRIPTOR KiGdt[256];
+
+/*
+ * Initalization functions (called once by main())
+ */
+BOOLEAN NTAPI ObInit(VOID);
+BOOLEAN NTAPI CmInitSystem1(VOID);
+VOID NTAPI CmShutdownSystem(VOID);
+BOOLEAN NTAPI KdInitSystem(ULONG Reserved, PLOADER_PARAMETER_BLOCK LoaderBlock);
+
+/* FIXME - RtlpCreateUnicodeString is obsolete and should be removed ASAP! */
+BOOLEAN FASTCALL
+RtlpCreateUnicodeString(
+ IN OUT PUNICODE_STRING UniDest,
+ IN PCWSTR Source,
+ IN POOL_TYPE PoolType);
+
+VOID
+NTAPI
+RtlpLogException(IN PEXCEPTION_RECORD ExceptionRecord,
+ IN PCONTEXT ContextRecord,
+ IN PVOID ContextData,
+ IN ULONG Size);
+
/*
* generic information class probing code
*/
#endif
-#if defined (_M_IX86) || defined(_M_AMD64)
+#ifndef _WIN64
C_ASSERT(FIELD_OFFSET(KUSER_SHARED_DATA, SystemCall) == 0x300);
C_ASSERT(FIELD_OFFSET(KTHREAD, InitialStack) == KTHREAD_INITIAL_STACK);
C_ASSERT(FIELD_OFFSET(KTHREAD, Teb) == KTHREAD_TEB);
{
/* The free was within the Depth */
InterlockedPushEntrySList(&List->L.ListHead,
- (PSINGLE_LIST_ENTRY)Buffer);
+ (PSLIST_ENTRY)Buffer);
}
}
else
{
/* The free was within the Depth */
InterlockedPushEntrySList(&List->L.ListHead,
- (PSINGLE_LIST_ENTRY)Buffer);
+ (PSLIST_ENTRY)Buffer);
}
}
PVOID Buffer,
ULONG BufferLength,
PULONG ReturnLength,
+ PULONG_PTR ReturnLengthLong,
KPROCESSOR_MODE PreviousMode)
{
NTSTATUS Status = STATUS_SUCCESS;
{
ProbeForWriteUlong(ReturnLength);
}
+ if (ReturnLengthLong != NULL)
+ {
+ ProbeForWrite(ReturnLengthLong, sizeof(ULONG_PTR), sizeof(ULONG_PTR));
+ }
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
/* Now calculate the checksum */
for (i = 0; i < 2048 / sizeof(ULONG); i++) CheckSum += Buffer[i];
+#ifndef _M_AMD64
if (KeRosLoaderBlock) goto freeldrhack;
+#endif
/* Search if this device is the actual boot CD */
for (NextEntry = ArcDiskInfo->DiskSignatureListHead.Flink;
IoCompletionInformation,
IoCompletionInformationLength,
ResultLength,
+ NULL,
PreviousMode);
if (!NT_SUCCESS(Status)) return Status;
ListEntry = KeRemoveQueue(Queue, PreviousMode, Timeout);
/* If we got a timeout or user_apc back, return the status */
- if (((NTSTATUS)ListEntry == STATUS_TIMEOUT) ||
- ((NTSTATUS)ListEntry == STATUS_USER_APC))
+ if (((NTSTATUS)(ULONG_PTR)ListEntry == STATUS_TIMEOUT) ||
+ ((NTSTATUS)(ULONG_PTR)ListEntry == STATUS_USER_APC))
{
/* Set this as the status */
- Status = (NTSTATUS)ListEntry;
+ Status = (NTSTATUS)(ULONG_PTR)ListEntry;
}
else
{
/* Set the Data */
Context->Key = CompletionInfo->Key;
Context->Port = Queue;
- if (InterlockedCompareExchangePointer(&FileObject->
+ if (InterlockedCompareExchangePointer((PVOID*)&FileObject->
CompletionContext,
Context,
NULL))
if (LastStackPtr->Control & SL_ERROR_RETURNED)
{
/* Get the error code */
- ErrorCode = (NTSTATUS)LastStackPtr->Parameters.Others.Argument4;
+ ErrorCode = PtrToUlong(LastStackPtr->Parameters.Others.Argument4);
}
/* Get the Current Stack and skip it */
/* Update the error for the current stack */
ErrorCode = Irp->IoStatus.Status;
StackPtr->Control |= SL_ERROR_RETURNED;
- LastStackPtr->Parameters.Others.Argument4 = (PVOID)ErrorCode;
+ LastStackPtr->Parameters.Others.Argument4 = UlongToPtr(ErrorCode);
LastStackPtr->Control |= SL_ERROR_RETURNED;
}
}
IoGetRequestorProcessId(IN PIRP Irp)
{
/* Return the requestor process' id */
- return (ULONG)(IoGetRequestorProcess(Irp)->UniqueProcessId);
+ return PtrToUlong(IoGetRequestorProcess(Irp)->UniqueProcessId);
}
/*
OUT PULONG pSessionId)
{
/* Return the session */
- *pSessionId = IoGetRequestorProcess(Irp)->Session;
+ *pSessionId = (ULONG_PTR)IoGetRequestorProcess(Irp)->Session;
return STATUS_SUCCESS;
}
IoSetTopLevelIrp(IN PIRP Irp)
{
/* Set the IRP */
- PsGetCurrentThread()->TopLevelIrp = (ULONG)Irp;
+ PsGetCurrentThread()->TopLevelIrp = (ULONG_PTR)Irp;
}
VOID
NTAPI
-RtlpGetStackLimits(PULONG_PTR StackBase,
- PULONG_PTR StackLimit);
+RtlpGetStackLimits(PULONG_PTR LowLimit,
+ PULONG_PTR HighLimit);
/* FUNCTIONS *****************************************************************/
--- /dev/null
+/*
+ * PROJECT: ReactOS Kernel
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: ntoskrnl/ke/i386/cpu.c
+ * PURPOSE: Routines for CPU-level support
+ * PROGRAMMERS: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ntoskrnl.h>
+#define NDEBUG
+#include <debug.h>
+
+/* FUNCTIONS *****************************************************************/
+
+VOID
+NTAPI
+KdpGdbStubInit(PKD_DISPATCH_TABLE WrapperTable,
+ ULONG BootPhase)
+{
+ UNIMPLEMENTED;
+}
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS Kernel
+ * FILE: ntoskrnl/kd/amd64/kdmemsup.c
+ * PURPOSE: Kernel Debugger Safe Memory Support
+ *
+ * PROGRAMMERS: arty
+ */
+
+#include <ntoskrnl.h>
+#define NDEBUG
+#include <debug.h>
+
+#define HIGH_PHYS_MASK 0x80000000
+#define PAGE_TABLE_MASK 0x3ff
+#define BIG_PAGE_SIZE (1<<22)
+#define CR4_PAGE_SIZE_BIT 0x10
+#define PDE_PRESENT_BIT 0x01
+#define PDE_W_BIT 0x02
+#define PDE_PWT_BIT 0x08
+#define PDE_PCD_BIT 0x10
+#define PDE_ACCESSED_BIT 0x20
+#define PDE_DIRTY_BIT 0x40
+#define PDE_PS_BIT 0x80
+
+#define MI_KDBG_TMP_PAGE_1 (HYPER_SPACE + 0x400000 - PAGE_SIZE)
+#define MI_KDBG_TMP_PAGE_0 (MI_KDBG_TMP_PAGE_1 - PAGE_SIZE)
+
+/* VARIABLES ***************************************************************/
+
+static BOOLEAN KdpPhysAccess = FALSE;
+
+static
+ULONG_PTR
+KdpPhysMap(ULONG_PTR PhysAddr, LONG Len)
+{
+ MMPTE TempPte;
+ PMMPTE PointerPte;
+ ULONG_PTR VirtAddr;
+
+ TempPte.u.Long = PDE_PRESENT_BIT | PDE_W_BIT | PDE_PWT_BIT |
+ PDE_PCD_BIT | PDE_ACCESSED_BIT | PDE_DIRTY_BIT;
+
+ if ((PhysAddr & (PAGE_SIZE - 1)) + Len > PAGE_SIZE)
+ {
+ TempPte.u.Hard.PageFrameNumber = (PhysAddr >> PAGE_SHIFT) + 1;
+ PointerPte = MiAddressToPte((PVOID)MI_KDBG_TMP_PAGE_1);
+ *PointerPte = TempPte;
+ VirtAddr = (ULONG_PTR)PointerPte << 10;
+ KeInvalidateTlbEntry((PVOID)VirtAddr);
+ }
+
+ TempPte.u.Hard.PageFrameNumber = PhysAddr >> PAGE_SHIFT;
+ PointerPte = MiAddressToPte((PVOID)MI_KDBG_TMP_PAGE_0);
+ *PointerPte = TempPte;
+ VirtAddr = (ULONG_PTR)PointerPte << 10;
+ KeInvalidateTlbEntry((PVOID)VirtAddr);
+
+ return VirtAddr + (PhysAddr & (PAGE_SIZE - 1));
+}
+
+static
+ULONGLONG
+KdpPhysRead(ULONG_PTR PhysAddr, LONG Len)
+{
+ ULONG_PTR Addr;
+ ULONGLONG Result = 0;
+
+ Addr = KdpPhysMap(PhysAddr, Len);
+
+ switch (Len)
+ {
+ case 8:
+ Result = *((PULONGLONG)Addr);
+ break;
+ case 4:
+ Result = *((PULONG)Addr);
+ break;
+ case 2:
+ Result = *((PUSHORT)Addr);
+ break;
+ case 1:
+ Result = *((PUCHAR)Addr);
+ break;
+ }
+
+ return Result;
+}
+
+static
+VOID
+KdpPhysWrite(ULONG_PTR PhysAddr, LONG Len, ULONGLONG Value)
+{
+ ULONG_PTR Addr;
+
+ Addr = KdpPhysMap(PhysAddr, Len);
+
+ switch (Len)
+ {
+ case 8:
+ *((PULONGLONG)Addr) = Value;
+ break;
+ case 4:
+ *((PULONG)Addr) = Value;
+ break;
+ case 2:
+ *((PUSHORT)Addr) = Value;
+ break;
+ case 1:
+ *((PUCHAR)Addr) = Value;
+ break;
+ }
+}
+
+BOOLEAN
+NTAPI
+KdpTranslateAddress(ULONG_PTR Addr, PULONG_PTR ResultAddr)
+{
+ ULONG_PTR CR3Value = __readcr3();
+ ULONG_PTR CR4Value = __readcr4();
+ ULONG_PTR PageDirectory = (CR3Value & ~(PAGE_SIZE-1)) +
+ ((Addr >> 22) * sizeof(ULONG));
+ ULONG_PTR PageDirectoryEntry = KdpPhysRead(PageDirectory, sizeof(ULONG));
+
+ /* Not present -> fail */
+ if (!(PageDirectoryEntry & PDE_PRESENT_BIT))
+ {
+ return FALSE;
+ }
+
+ /* Big Page? */
+ if ((PageDirectoryEntry & PDE_PS_BIT) && (CR4Value & CR4_PAGE_SIZE_BIT))
+ {
+ *ResultAddr = (PageDirectoryEntry & ~(BIG_PAGE_SIZE-1)) +
+ (Addr & (BIG_PAGE_SIZE-1));
+ return TRUE;
+ }
+ else
+ {
+ ULONG_PTR PageTableAddr =
+ (PageDirectoryEntry & ~(PAGE_SIZE-1)) +
+ ((Addr >> PAGE_SHIFT) & PAGE_TABLE_MASK) * sizeof(ULONG);
+ ULONG_PTR PageTableEntry = KdpPhysRead(PageTableAddr, sizeof(ULONG));
+ if (PageTableEntry & PDE_PRESENT_BIT)
+ {
+ *ResultAddr = (PageTableEntry & ~(PAGE_SIZE-1)) +
+ (Addr & (PAGE_SIZE-1));
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
+BOOLEAN
+NTAPI
+KdpSafeReadMemory(ULONG_PTR Addr, LONG Len, PVOID Value)
+{
+ ULONG_PTR ResultPhysAddr;
+
+ if (!KdpPhysAccess)
+ {
+ memcpy(Value, (PVOID)Addr, Len);
+ return TRUE;
+ }
+
+ memset(Value, 0, Len);
+
+ if (!KdpTranslateAddress(Addr, &ResultPhysAddr))
+ return FALSE;
+
+ switch (Len)
+ {
+ case 8:
+ *((PULONGLONG)Value) = KdpPhysRead(ResultPhysAddr, Len);
+ break;
+ case 4:
+ *((PULONG)Value) = KdpPhysRead(ResultPhysAddr, Len);
+ break;
+ case 2:
+ *((PUSHORT)Value) = KdpPhysRead(ResultPhysAddr, Len);
+ break;
+ case 1:
+ *((PUCHAR)Value) = KdpPhysRead(ResultPhysAddr, Len);
+ break;
+ }
+
+ return TRUE;
+}
+
+BOOLEAN
+NTAPI
+KdpSafeWriteMemory(ULONG_PTR Addr, LONG Len, ULONGLONG Value)
+{
+ ULONG_PTR ResultPhysAddr;
+
+ if (!KdpPhysAccess)
+ {
+ memcpy((PVOID)Addr, &Value, Len);
+ return TRUE;
+ }
+
+ if (!KdpTranslateAddress(Addr, &ResultPhysAddr))
+ return FALSE;
+
+ KdpPhysWrite(ResultPhysAddr, Len, Value);
+ return TRUE;
+}
+
+VOID
+NTAPI
+KdpEnableSafeMem(VOID)
+{
+ KdpPhysAccess = TRUE;
+}
+
+/* EOF */
}
else /* BootPhase > 0 */
{
-#ifdef _M_IX86
+#if defined(_M_IX86) || defined(_M_AMD64)
KdpEnableSafeMem();
#endif
}
#if DBG
case ' soR': /* ROS-INTERNAL */
{
- switch ((ULONG)Buffer1)
+ switch ((ULONG_PTR)Buffer1)
{
case ManualBugCheck:
KeBugCheck(MANUALLY_INITIATED_CRASH);
/* Special case for stack frame dumps */
case 'DsoR':
{
- KeRosDumpStackFrames((PULONG)Buffer1, Buffer1Length);
+ KeRosDumpStackFrames((PULONG_PTR)Buffer1, Buffer1Length);
break;
}
#endif
USHORT OutStringLength;
/* Get the response string and length */
+#ifdef _X86_
OutString = (LPSTR)Context->Ebx;
OutStringLength = (USHORT)Context->Edi;
+#elif _AMD64_
+ OutString = (LPSTR)Context->Rbx;
+ OutStringLength = (USHORT)Context->Rdi;
+#else
+#error Unknown Architecture
+#endif
/* Call KDBG */
ReturnValue = KdpPrompt((LPSTR)ExceptionRecord->
OutStringLength);
/* Return the number of characters that we received */
+#ifdef _X86_
Context->Eax = ReturnValue;
+#elif _AMD64_
+ Context->Rax = ReturnValue;
+#else
+#error Unknown Architecture
+#endif
}
#endif
/* Check if this is an assertion failure */
if (ExceptionRecord->ExceptionCode == STATUS_ASSERTION_FAILURE)
{
+#ifdef _X86_
/* Warn about it */
DbgPrint("\n!!! Assertion Failure at Address 0x%p !!!\n\n",
(PVOID)Context->Eip);
/* Bump EIP to the instruction following the int 2C and return */
Context->Eip += 2;
+#elif _AMD64_
+#else
+ /* Warn about it */
+ DbgPrint("\n!!! Assertion Failure at Address 0x%p !!!\n\n",
+ (PVOID)Context->Rip);
+
+ /* Bump RIP to the instruction following the int 2C and return */
+ Context->Rip += 2;
+
+#error Unknown Architecture
+#endif
return TRUE;
}
#endif
if (BootPhase == 0)
{
Value = READ_PORT_UCHAR(BOCHS_LOGGER_PORT);
- if (Value != (ULONG)BOCHS_LOGGER_PORT)
+ if (Value != (ULONG_PTR)BOCHS_LOGGER_PORT)
{
KdpDebugMode.Bochs = FALSE;
return;
KdpGetStateChange(IN PDBGKD_MANIPULATE_STATE64 State,
IN PCONTEXT Context)
{
- UNIMPLEMENTED;
- while (TRUE);
+ PKPRCB Prcb;
+ ULONG i;
+
+ /* Check for success */
+ if (NT_SUCCESS(State->u.Continue2.ContinueStatus))
+ {
+ /* Check if we're tracing */
+ if (State->u.Continue2.ControlSet.TraceFlag)
+ {
+ /* Enable TF */
+ Context->EFlags |= EFLAGS_TF;
+ }
+ else
+ {
+ /* Remove it */
+ Context->EFlags &= ~EFLAGS_TF;
+ }
+
+ /* Loop all processors */
+ for (i = 0; i < KeNumberProcessors; i++)
+ {
+ /* Get the PRCB and update DR7 and DR6 */
+ Prcb = KiProcessorBlock[i];
+ Prcb->ProcessorState.SpecialRegisters.KernelDr7 =
+ State->u.Continue2.ControlSet.Dr7;
+ Prcb->ProcessorState.SpecialRegisters.KernelDr6 = 0;
+ }
+
+ /* Check if we have new symbol information */
+ if (State->u.Continue2.ControlSet.CurrentSymbolStart != 1)
+ {
+ /* Update it */
+ KdpCurrentSymbolStart =
+ State->u.Continue2.ControlSet.CurrentSymbolStart;
+ KdpCurrentSymbolEnd= State->u.Continue2.ControlSet.CurrentSymbolEnd;
+ }
+ }
}
VOID
KdpSetContextState(IN PDBGKD_ANY_WAIT_STATE_CHANGE WaitStateChange,
IN PCONTEXT Context)
{
- UNIMPLEMENTED;
- while (TRUE);
+ PKPRCB Prcb = KeGetCurrentPrcb();
+
+ /* Copy i386 specific debug registers */
+ WaitStateChange->ControlReport.Dr6 = Prcb->ProcessorState.SpecialRegisters.
+ KernelDr6;
+ WaitStateChange->ControlReport.Dr7 = Prcb->ProcessorState.SpecialRegisters.
+ KernelDr7;
+
+ /* Copy i386 specific segments */
+ WaitStateChange->ControlReport.SegCs = (USHORT)Context->SegCs;
+ WaitStateChange->ControlReport.SegDs = (USHORT)Context->SegDs;
+ WaitStateChange->ControlReport.SegEs = (USHORT)Context->SegEs;
+ WaitStateChange->ControlReport.SegFs = (USHORT)Context->SegFs;
+
+ /* Copy EFlags */
+ WaitStateChange->ControlReport.EFlags = Context->EFlags;
+
+ /* Set Report Flags */
+ WaitStateChange->ControlReport.ReportFlags = REPORT_INCLUDES_SEGS;
+ if (WaitStateChange->ControlReport.SegCs == KGDT_64_R0_CODE)
+ {
+ WaitStateChange->ControlReport.ReportFlags |= REPORT_STANDARD_CS;
+ }
}
NTSTATUS
KdpSysReadMsr(IN ULONG Msr,
OUT PLARGE_INTEGER MsrValue)
{
- UNIMPLEMENTED;
- while (TRUE);
- return STATUS_UNSUCCESSFUL;
+ /* Use SEH to protect from invalid MSRs */
+ _SEH2_TRY
+ {
+ MsrValue->QuadPart = __readmsr(Msr);
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ _SEH2_YIELD(return STATUS_NO_SUCH_DEVICE);
+ }
+ _SEH2_END
+
+ return STATUS_SUCCESS;
}
NTSTATUS
KdpSysWriteMsr(IN ULONG Msr,
IN PLARGE_INTEGER MsrValue)
{
- UNIMPLEMENTED;
- while (TRUE);
- return STATUS_UNSUCCESSFUL;
+ /* Use SEH to protect from invalid MSRs */
+ _SEH2_TRY
+ {
+ __writemsr(Msr, MsrValue->QuadPart);
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ _SEH2_YIELD(return STATUS_NO_SUCH_DEVICE);
+ }
+ _SEH2_END
+
+ return STATUS_SUCCESS;
}
NTSTATUS
IN ULONG Length,
OUT PULONG ActualLength)
{
- UNIMPLEMENTED;
- while (TRUE);
- return STATUS_UNSUCCESSFUL;
+ PVOID ControlStart;
+ PKPRCB Prcb = KiProcessorBlock[Processor];
+ PKIPCR Pcr = CONTAINING_RECORD(Prcb, KIPCR, Prcb);
+
+ switch (BaseAddress)
+ {
+ case AMD64_DEBUG_CONTROL_SPACE_KPCR:
+ /* Copy a pointer to the Pcr */
+ ControlStart = &Pcr;
+ *ActualLength = sizeof(PVOID);
+ break;
+
+ case AMD64_DEBUG_CONTROL_SPACE_KPRCB:
+ /* Copy a pointer to the Prcb */
+ ControlStart = &Prcb;
+ *ActualLength = sizeof(PVOID);
+ break;
+
+ case AMD64_DEBUG_CONTROL_SPACE_KSPECIAL:
+ /* Copy SpecialRegisters */
+ ControlStart = &Prcb->ProcessorState.SpecialRegisters;
+ *ActualLength = sizeof(KSPECIAL_REGISTERS);
+ break;
+
+ case AMD64_DEBUG_CONTROL_SPACE_KTHREAD:
+ /* Copy a pointer to the current Thread */
+ ControlStart = &Prcb->CurrentThread;
+ *ActualLength = sizeof(PVOID);
+ break;
+
+ default:
+ *ActualLength = 0;
+ ASSERT(FALSE);
+ return STATUS_UNSUCCESSFUL;
+ }
+
+ /* Copy the memory */
+ RtlCopyMemory(Buffer, ControlStart, min(Length, *ActualLength));
+
+ /* Finish up */
+ return STATUS_SUCCESS;
}
NTSTATUS
IN ULONG Length,
OUT PULONG ActualLength)
{
- UNIMPLEMENTED;
- while (TRUE);
- return STATUS_UNSUCCESSFUL;
+ PVOID ControlStart;
+ PKPRCB Prcb = KiProcessorBlock[Processor];
+ PKIPCR Pcr = CONTAINING_RECORD(Prcb, KIPCR, Prcb);
+
+ switch (BaseAddress)
+ {
+ case AMD64_DEBUG_CONTROL_SPACE_KSPECIAL:
+ /* Copy SpecialRegisters */
+ ControlStart = &Prcb->ProcessorState.SpecialRegisters;
+ *ActualLength = sizeof(KSPECIAL_REGISTERS);
+ break;
+
+ default:
+ *ActualLength = 0;
+ ASSERT(FALSE);
+ return STATUS_UNSUCCESSFUL;
+ }
+
+ /* Copy the memory */
+ RtlCopyMemory(ControlStart, Buffer, min(Length, *ActualLength));
+
+ return STATUS_SUCCESS;
}
NTSTATUS
IN ULONG BusNumber,
IN ULONG AddressSpace,
IN ULONG64 IoAddress,
- IN PVOID DataValue,
+ OUT PVOID DataValue,
IN ULONG DataSize,
OUT PULONG ActualDataSize)
{
- UNIMPLEMENTED;
- while (TRUE);
- return STATUS_UNSUCCESSFUL;
+ /* Verify parameters */
+ if (InterfaceType != Isa || BusNumber != 0 || AddressSpace != 1)
+ {
+ /* No data was read */
+ *ActualDataSize = 0;
+ return STATUS_INVALID_PARAMETER;
+ }
+
+ /* Check for correct alignment */
+ if ((IoAddress & (DataSize - 1)))
+ {
+ /* Invalid alignment */
+ *ActualDataSize = 0;
+ return STATUS_DATATYPE_MISALIGNMENT;
+ }
+
+ switch (DataSize)
+ {
+ case sizeof(UCHAR):
+ /* Read one UCHAR */
+ *(PUCHAR)DataValue = READ_PORT_UCHAR((PUCHAR)IoAddress);
+ break;
+
+ case sizeof(USHORT):
+ /* Read one USHORT */
+ *(PUSHORT)DataValue = READ_PORT_USHORT((PUSHORT)IoAddress);
+ break;
+
+ case sizeof(ULONG):
+ /* Read one ULONG */
+ *(PULONG)DataValue = READ_PORT_ULONG((PULONG)IoAddress);
+ break;
+
+ default:
+ /* Invalid data size */
+ *ActualDataSize = 0;
+ return STATUS_INVALID_PARAMETER;
+ }
+
+ /* Return the size of the data */
+ *ActualDataSize = DataSize;
+
+ /* Success! */
+ return STATUS_SUCCESS;
}
NTSTATUS
IN ULONG DataSize,
OUT PULONG ActualDataSize)
{
- UNIMPLEMENTED;
- while (TRUE);
- return STATUS_UNSUCCESSFUL;
+ /* Verify parameters */
+ if (InterfaceType != Isa || BusNumber != 0 || AddressSpace != 1)
+ {
+ /* No data was written */
+ *ActualDataSize = 0;
+ return STATUS_INVALID_PARAMETER;
+ }
+
+ /* Check for correct alignment */
+ if ((IoAddress & (DataSize - 1)))
+ {
+ /* Invalid alignment */
+ *ActualDataSize = 0;
+ return STATUS_DATATYPE_MISALIGNMENT;
+ }
+
+ switch (DataSize)
+ {
+ case sizeof(UCHAR):
+ /* Write one UCHAR */
+ WRITE_PORT_UCHAR((PUCHAR)IoAddress, *(PUCHAR)DataValue);
+ break;
+
+ case sizeof(USHORT):
+ /* Write one USHORT */
+ WRITE_PORT_USHORT((PUSHORT)IoAddress, *(PUSHORT)DataValue);
+ break;
+
+ case sizeof(ULONG):
+ /* Write one ULONG */
+ WRITE_PORT_ULONG((PULONG)IoAddress, *(PULONG)DataValue);
+ break;
+
+ default:
+ /* Invalid data size */
+ *ActualDataSize = 0;
+ return STATUS_INVALID_PARAMETER;
+ }
+
+ /* Return the size of the data */
+ *ActualDataSize = DataSize;
+
+ /* Success! */
+ return STATUS_SUCCESS;
}
NTSTATUS
VOID
NTAPI
-DumpTraceData(IN PSTRING TraceData)
+DumpTraceData(OUT PSTRING TraceData)
{
/* Update the buffer */
TraceDataBuffer[0] = TraceDataBufferPosition;
--- /dev/null
+/* Interface between the opcode library and its callers.
+
+ Copyright 2001, 2002 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Written by Cygnus Support, 1993.
+
+ The opcode library (libopcodes.a) provides instruction decoders for
+ a large variety of instruction sets, callable with an identical
+ interface, for making instruction-processing programs more independent
+ of the instruction set being processed. */
+
+#ifndef DIS_ASM_H
+#define DIS_ASM_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if 0
+/* #include <stdio.h> */
+/* #include "bfd.h" */
+#endif
+
+typedef int (*fprintf_ftype) PARAMS((PTR, const char*, ...));
+
+enum dis_insn_type {
+ dis_noninsn, /* Not a valid instruction */
+ dis_nonbranch, /* Not a branch instruction */
+ dis_branch, /* Unconditional branch */
+ dis_condbranch, /* Conditional branch */
+ dis_jsr, /* Jump to subroutine */
+ dis_condjsr, /* Conditional jump to subroutine */
+ dis_dref, /* Data reference instruction */
+ dis_dref2 /* Two data references in instruction */
+};
+
+/* This struct is passed into the instruction decoding routine,
+ and is passed back out into each callback. The various fields are used
+ for conveying information from your main routine into your callbacks,
+ for passing information into the instruction decoders (such as the
+ addresses of the callback functions), or for passing information
+ back from the instruction decoders to their callers.
+
+ It must be initialized before it is first passed; this can be done
+ by hand, or using one of the initialization macros below. */
+
+typedef struct disassemble_info {
+ fprintf_ftype fprintf_func;
+ PTR stream;
+ PTR application_data;
+
+ /* Target description. We could replace this with a pointer to the bfd,
+ but that would require one. There currently isn't any such requirement
+ so to avoid introducing one we record these explicitly. */
+ /* The bfd_flavour. This can be bfd_target_unknown_flavour. */
+ enum bfd_flavour flavour;
+ /* The bfd_arch value. */
+ enum bfd_architecture arch;
+ /* The bfd_mach value. */
+ unsigned long mach;
+#if 0
+ enum bfd_endian endian;
+#endif
+ /* An arch/mach-specific bitmask of selected instruction subsets, mainly
+ for processors with run-time-switchable instruction sets. The default,
+ zero, means that there is no constraint. CGEN-based opcodes ports
+ may use ISA_foo masks. */
+ unsigned long insn_sets;
+
+#if 0
+ /* Some targets need information about the current section to accurately
+ display insns. If this is NULL, the target disassembler function
+ will have to make its best guess. */
+ asection *section;
+
+ /* An array of pointers to symbols either at the location being disassembled
+ or at the start of the function being disassembled. The array is sorted
+ so that the first symbol is intended to be the one used. The others are
+ present for any misc. purposes. This is not set reliably, but if it is
+ not NULL, it is correct. */
+ asymbol **symbols;
+ /* Number of symbols in array. */
+ int num_symbols;
+#endif
+ /* For use by the disassembler.
+ The top 16 bits are reserved for public use (and are documented here).
+ The bottom 16 bits are for the internal use of the disassembler. */
+ unsigned long flags;
+#define INSN_HAS_RELOC 0x80000000
+ PTR private_data;
+
+ /* Function used to get bytes to disassemble. MEMADDR is the
+ address of the stuff to be disassembled, MYADDR is the address to
+ put the bytes in, and LENGTH is the number of bytes to read.
+ INFO is a pointer to this struct.
+ Returns an errno value or 0 for success. */
+ int (*read_memory_func)
+ PARAMS ((bfd_vma memaddr, bfd_byte *myaddr, unsigned int length,
+ struct disassemble_info *info));
+
+ /* Function which should be called if we get an error that we can't
+ recover from. STATUS is the errno value from read_memory_func and
+ MEMADDR is the address that we were trying to read. INFO is a
+ pointer to this struct. */
+ void (*memory_error_func)
+ PARAMS ((int status, bfd_vma memaddr, struct disassemble_info *info));
+
+ /* Function called to print ADDR. */
+ void (*print_address_func)
+ PARAMS ((bfd_vma addr, struct disassemble_info *info));
+
+ /* Function called to determine if there is a symbol at the given ADDR.
+ If there is, the function returns 1, otherwise it returns 0.
+ This is used by ports which support an overlay manager where
+ the overlay number is held in the top part of an address. In
+ some circumstances we want to include the overlay number in the
+ address, (normally because there is a symbol associated with
+ that address), but sometimes we want to mask out the overlay bits. */
+ int (* symbol_at_address_func)
+ PARAMS ((bfd_vma addr, struct disassemble_info * info));
+
+ /* These are for buffer_read_memory. */
+ bfd_byte *buffer;
+ bfd_vma buffer_vma;
+ unsigned int buffer_length;
+
+ /* This variable may be set by the instruction decoder. It suggests
+ the number of bytes objdump should display on a single line. If
+ the instruction decoder sets this, it should always set it to
+ the same value in order to get reasonable looking output. */
+ int bytes_per_line;
+
+ /* the next two variables control the way objdump displays the raw data */
+ /* For example, if bytes_per_line is 8 and bytes_per_chunk is 4, the */
+ /* output will look like this:
+ 00: 00000000 00000000
+ with the chunks displayed according to "display_endian". */
+ int bytes_per_chunk;
+ enum bfd_endian display_endian;
+
+ /* Number of octets per incremented target address
+ Normally one, but some DSPs have byte sizes of 16 or 32 bits. */
+ unsigned int octets_per_byte;
+
+ /* Results from instruction decoders. Not all decoders yet support
+ this information. This info is set each time an instruction is
+ decoded, and is only valid for the last such instruction.
+
+ To determine whether this decoder supports this information, set
+ insn_info_valid to 0, decode an instruction, then check it. */
+
+ char insn_info_valid; /* Branch info has been set. */
+ char branch_delay_insns; /* How many sequential insn's will run before
+ a branch takes effect. (0 = normal) */
+ char data_size; /* Size of data reference in insn, in bytes */
+ enum dis_insn_type insn_type; /* Type of instruction */
+ bfd_vma target; /* Target address of branch or dref, if known;
+ zero if unknown. */
+ bfd_vma target2; /* Second target address for dref2 */
+
+ /* Command line options specific to the target disassembler. */
+ char * disassembler_options;
+
+} disassemble_info;
+
+\f
+/* Standard disassemblers. Disassemble one instruction at the given
+ target address. Return number of octets processed. */
+typedef int (*disassembler_ftype)
+ PARAMS((bfd_vma, disassemble_info *));
+
+extern int print_insn_big_mips PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_little_mips PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_i386 PARAMS ((bfd_vma, disassemble_info *));
+extern int print_insn_i386_att PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_i386_intel PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_ia64 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_i370 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_m68hc11 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_m68hc12 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_m68k PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_z8001 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_z8002 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_h8300 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_h8300h PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_h8300s PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_h8500 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_alpha PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_big_arm PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_little_arm PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_sparc PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_big_a29k PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_little_a29k PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_avr PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_d10v PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_d30v PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_dlx PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_fr30 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_hppa PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_i860 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_i960 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_ip2k PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_m32r PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_m88k PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_mcore PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_mmix PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_mn10200 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_mn10300 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_msp430 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_ns32k PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_openrisc PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_big_or32 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_little_or32 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_pdp11 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_pj PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_big_powerpc PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_little_powerpc PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_rs6000 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_s390 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_sh PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_tic30 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_tic4x PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_tic54x PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_tic80 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_v850 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_vax PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_w65 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_xstormy16 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_sh64 PARAMS ((bfd_vma, disassemble_info *));
+extern int print_insn_sh64x_media PARAMS ((bfd_vma, disassemble_info *));
+extern int print_insn_frv PARAMS ((bfd_vma, disassemble_info *));
+extern int print_insn_iq2000 PARAMS ((bfd_vma, disassemble_info *));
+
+extern disassembler_ftype arc_get_disassembler PARAMS ((void *));
+extern disassembler_ftype cris_get_disassembler PARAMS ((bfd *));
+
+extern void print_mips_disassembler_options PARAMS ((FILE *));
+extern void print_ppc_disassembler_options PARAMS ((FILE *));
+extern void print_arm_disassembler_options PARAMS ((FILE *));
+extern void parse_arm_disassembler_option PARAMS ((char *));
+extern int get_arm_regname_num_options PARAMS ((void));
+extern int set_arm_regname_option PARAMS ((int));
+extern int get_arm_regnames PARAMS ((int, const char **, const char **, const char ***));
+
+/* Fetch the disassembler for a given BFD, if that support is available. */
+extern disassembler_ftype disassembler PARAMS ((bfd *));
+
+/* Document any target specific options available from the disassembler. */
+extern void disassembler_usage PARAMS ((FILE *));
+
+\f
+/* This block of definitions is for particular callers who read instructions
+ into a buffer before calling the instruction decoder. */
+
+/* Here is a function which callers may wish to use for read_memory_func.
+ It gets bytes from a buffer. */
+extern int buffer_read_memory
+ PARAMS ((bfd_vma, bfd_byte *, unsigned int, struct disassemble_info *));
+
+/* This function goes with buffer_read_memory.
+ It prints a message using info->fprintf_func and info->stream. */
+extern void perror_memory PARAMS ((int, bfd_vma, struct disassemble_info *));
+
+
+/* Just print the address in hex. This is included for completeness even
+ though both GDB and objdump provide their own (to print symbolic
+ addresses). */
+extern void generic_print_address
+ PARAMS ((bfd_vma, struct disassemble_info *));
+
+/* Always true. */
+extern int generic_symbol_at_address
+ PARAMS ((bfd_vma, struct disassemble_info *));
+
+/* Macro to initialize a disassemble_info struct. This should be called
+ by all applications creating such a struct. */
+#define INIT_DISASSEMBLE_INFO(INFO, STREAM, FPRINTF_FUNC) \
+ (INFO).flavour = bfd_target_unknown_flavour, \
+ (INFO).arch = bfd_arch_unknown, \
+ (INFO).mach = 0, \
+ (INFO).insn_sets = 0, \
+ (INFO).endian = BFD_ENDIAN_UNKNOWN, \
+ (INFO).octets_per_byte = 1, \
+ INIT_DISASSEMBLE_INFO_NO_ARCH(INFO, STREAM, FPRINTF_FUNC)
+
+/* Call this macro to initialize only the internal variables for the
+ disassembler. Architecture dependent things such as byte order, or machine
+ variant are not touched by this macro. This makes things much easier for
+ GDB which must initialize these things separately. */
+
+#define INIT_DISASSEMBLE_INFO_NO_ARCH(INFO, STREAM, FPRINTF_FUNC) \
+ (INFO).fprintf_func = (fprintf_ftype)(FPRINTF_FUNC), \
+ (INFO).stream = (PTR)(STREAM), \
+ (INFO).section = NULL, \
+ (INFO).symbols = NULL, \
+ (INFO).num_symbols = 0, \
+ (INFO).private_data = NULL, \
+ (INFO).buffer = NULL, \
+ (INFO).buffer_vma = 0, \
+ (INFO).buffer_length = 0, \
+ (INFO).read_memory_func = buffer_read_memory, \
+ (INFO).memory_error_func = perror_memory, \
+ (INFO).print_address_func = generic_print_address, \
+ (INFO).symbol_at_address_func = generic_symbol_at_address, \
+ (INFO).flags = 0, \
+ (INFO).bytes_per_line = 0, \
+ (INFO).bytes_per_chunk = 0, \
+ (INFO).display_endian = BFD_ENDIAN_UNKNOWN, \
+ (INFO).disassembler_options = NULL, \
+ (INFO).insn_info_valid = 0
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ! defined (DIS_ASM_H) */
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * FILE: ntoskrnl/kdbg/i386/i386-dis.c
+ * PURPOSE: No purpose listed.
+ *
+ * PROGRAMMERS: No programmer listed.
+ */
+
+#include <ntoskrnl.h>
+#define NDEBUG
+#include <debug.h>
+
+/* ReactOS compatibility stuff. */
+#define PARAMS(X) X
+#define PTR void*
+typedef enum bfd_flavour
+{
+ bfd_target_unknown_flavour,
+} bfd_flavour;
+typedef enum bfd_architecture
+{
+ bfd_arch_i386,
+} bfd_arch;
+typedef ULONG_PTR bfd_vma;
+typedef unsigned char bfd_byte;
+enum bfd_endian { BFD_ENDIAN_BIG, BIG_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
+typedef void* bfd;
+typedef signed int bfd_signed_vma;
+#define bfd_mach_x86_64_intel_syntax 0
+#define bfd_mach_x86_64 1
+#define bfd_mach_i386_i386_intel_syntax 2
+#define bfd_mach_i386_i386 3
+#define bfd_mach_i386_i8086 4
+#define abort() DbgBreakPoint();
+#define _(X) X
+#define ATTRIBUTE_UNUSED
+extern int sprintf(char *str, const char *format, ...);
+#define sprintf_vma(BUF, VMA) sprintf(BUF, "0x%X", VMA)
+#define _setjmp setjmp
+#define _INC_SETJMPEX
+struct disassemble_info;
+
+int
+print_insn_i386 (bfd_vma pc, struct disassemble_info *info);
+
+int
+KdbpPrintDisasm(void* Ignored, const char* fmt, ...)
+{
+ va_list ap;
+ static char buffer[256];
+ int ret;
+
+ va_start(ap, fmt);
+ ret = vsprintf(buffer, fmt, ap);
+ DbgPrint("%s", buffer);
+ va_end(ap);
+ return(ret);
+}
+
+int
+KdbpNopPrintDisasm(void* Ignored, const char* fmt, ...)
+{
+ return(0);
+}
+
+static int
+KdbpReadMemory(ULONG_PTR Addr, unsigned char* Data, unsigned int Length,
+ struct disassemble_info * Ignored)
+{
+ return KdbpSafeReadMemory(Data, (void *)Addr, Length); /* 0 means no error */
+}
+
+static void
+KdbpMemoryError(int Status, ULONG_PTR Addr,
+ struct disassemble_info * Ignored)
+{
+}
+
+static void
+KdbpPrintAddressInCode(ULONG_PTR Addr, struct disassemble_info * Ignored)
+{
+ if (!KdbSymPrintAddress((void*)Addr))
+ {
+ DbgPrint("<%08x>", Addr);
+ }
+}
+
+static void
+KdbpNopPrintAddress(ULONG_PTR Addr, struct disassemble_info * Ignored)
+{
+}
+
+#include "dis-asm.h"
+
+LONG
+KdbpGetInstLength(IN ULONG_PTR Address)
+{
+ disassemble_info info;
+
+ info.fprintf_func = KdbpNopPrintDisasm;
+ info.stream = NULL;
+ info.application_data = NULL;
+ info.flavour = bfd_target_unknown_flavour;
+ info.arch = bfd_arch_i386;
+ info.mach = bfd_mach_x86_64;
+ info.insn_sets = 0;
+ info.flags = 0;
+ info.read_memory_func = KdbpReadMemory;
+ info.memory_error_func = KdbpMemoryError;
+ info.print_address_func = KdbpNopPrintAddress;
+ info.symbol_at_address_func = NULL;
+ info.buffer = NULL;
+ info.buffer_vma = info.buffer_length = 0;
+ info.bytes_per_chunk = 0;
+ info.display_endian = BIG_ENDIAN_LITTLE;
+ info.disassembler_options = NULL;
+
+ return(print_insn_i386(Address, &info));
+}
+
+LONG
+KdbpDisassemble(IN ULONG_PTR Address, IN ULONG IntelSyntax)
+{
+ disassemble_info info;
+
+ info.fprintf_func = KdbpPrintDisasm;
+ info.stream = NULL;
+ info.application_data = NULL;
+ info.flavour = bfd_target_unknown_flavour;
+ info.arch = bfd_arch_i386;
+ info.mach = IntelSyntax ? bfd_mach_i386_i386_intel_syntax : bfd_mach_i386_i386;
+ info.insn_sets = 0;
+ info.flags = 0;
+ info.read_memory_func = KdbpReadMemory;
+ info.memory_error_func = KdbpMemoryError;
+ info.print_address_func = KdbpPrintAddressInCode;
+ info.symbol_at_address_func = NULL;
+ info.buffer = NULL;
+ info.buffer_vma = info.buffer_length = 0;
+ info.bytes_per_chunk = 0;
+ info.display_endian = BIG_ENDIAN_LITTLE;
+ info.disassembler_options = NULL;
+
+ return(print_insn_i386(Address, &info));
+}
+
+/* Print i386 instructions for GDB, the GNU debugger.
+ Copyright 1988, 1989, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2001
+ Free Software Foundation, Inc.
+
+This file is part of GDB.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+
+/*
+ * 80386 instruction printer by Pace Willisson (pace@prep.ai.mit.edu)
+ * July 1988
+ * modified by John Hassey (hassey@dg-rtp.dg.com)
+ * x86-64 support added by Jan Hubicka (jh@suse.cz)
+ */
+
+/*
+ * The main tables describing the instructions is essentially a copy
+ * of the "Opcode Map" chapter (Appendix A) of the Intel 80386
+ * Programmers Manual. Usually, there is a capital letter, followed
+ * by a small letter. The capital letter tell the addressing mode,
+ * and the small letter tells about the operand size. Refer to
+ * the Intel manual for details.
+ */
+
+#include "dis-asm.h"
+#if 0
+#include "sysdep.h"
+#include "opintl.h"
+#endif
+
+#define MAXLEN 20
+
+#include <setjmp.h>
+
+#ifndef UNIXWARE_COMPAT
+/* Set non-zero for broken, compatible instructions. Set to zero for
+ non-broken opcodes. */
+#define UNIXWARE_COMPAT 1
+#endif
+
+static int fetch_data PARAMS ((struct disassemble_info *, bfd_byte *));
+static void ckprefix PARAMS ((void));
+static const char *prefix_name PARAMS ((int, int));
+static int print_insn PARAMS ((bfd_vma, disassemble_info *));
+static void dofloat PARAMS ((int));
+static void OP_ST PARAMS ((int, int));
+static void OP_STi PARAMS ((int, int));
+static int putop PARAMS ((const char *, int));
+static void oappend PARAMS ((const char *));
+static void append_seg PARAMS ((void));
+static void OP_indirE PARAMS ((int, int));
+static void print_operand_value PARAMS ((char *, int, bfd_vma));
+static void OP_E PARAMS ((int, int));
+static void OP_G PARAMS ((int, int));
+static bfd_vma get64 PARAMS ((void));
+static bfd_signed_vma get32 PARAMS ((void));
+static bfd_signed_vma get32s PARAMS ((void));
+static int get16 PARAMS ((void));
+static void set_op PARAMS ((bfd_vma, int));
+static void OP_REG PARAMS ((int, int));
+static void OP_IMREG PARAMS ((int, int));
+static void OP_I PARAMS ((int, int));
+static void OP_I64 PARAMS ((int, int));
+static void OP_sI PARAMS ((int, int));
+static void OP_J PARAMS ((int, int));
+static void OP_SEG PARAMS ((int, int));
+static void OP_DIR PARAMS ((int, int));
+static void OP_OFF PARAMS ((int, int));
+static void OP_OFF64 PARAMS ((int, int));
+static void ptr_reg PARAMS ((int, int));
+static void OP_ESreg PARAMS ((int, int));
+static void OP_DSreg PARAMS ((int, int));
+static void OP_C PARAMS ((int, int));
+static void OP_D PARAMS ((int, int));
+static void OP_T PARAMS ((int, int));
+static void OP_Rd PARAMS ((int, int));
+static void OP_MMX PARAMS ((int, int));
+static void OP_XMM PARAMS ((int, int));
+static void OP_EM PARAMS ((int, int));
+static void OP_EX PARAMS ((int, int));
+static void OP_MS PARAMS ((int, int));
+static void OP_XS PARAMS ((int, int));
+static void OP_3DNowSuffix PARAMS ((int, int));
+static void OP_SIMD_Suffix PARAMS ((int, int));
+static void SIMD_Fixup PARAMS ((int, int));
+static void BadOp PARAMS ((void));
+
+struct dis_private {
+ /* Points to first byte not fetched. */
+ bfd_byte *max_fetched;
+ bfd_byte the_buffer[MAXLEN];
+ bfd_vma insn_start;
+ int orig_sizeflag;
+ jmp_buf bailout;
+};
+
+/* The opcode for the fwait instruction, which we treat as a prefix
+ when we can. */
+#define FWAIT_OPCODE (0x9b)
+
+/* Set to 1 for 64bit mode disassembly. */
+static int mode_64bit = 1;
+
+/* Flags for the prefixes for the current instruction. See below. */
+static int prefixes;
+
+/* REX prefix the current instruction. See below. */
+static int rex;
+/* Bits of REX we've already used. */
+static int rex_used;
+#define REX_MODE64 8
+#define REX_EXTX 4
+#define REX_EXTY 2
+#define REX_EXTZ 1
+/* Mark parts used in the REX prefix. When we are testing for
+ empty prefix (for 8bit register REX extension), just mask it
+ out. Otherwise test for REX bit is excuse for existence of REX
+ only in case value is nonzero. */
+#define USED_REX(value) \
+ { \
+ if (value) \
+ rex_used |= (rex & value) ? (value) | 0x40 : 0; \
+ else \
+ rex_used |= 0x40; \
+ }
+
+/* Flags for prefixes which we somehow handled when printing the
+ current instruction. */
+static int used_prefixes;
+
+/* Flags stored in PREFIXES. */
+#define PREFIX_REPZ 1
+#define PREFIX_REPNZ 2
+#define PREFIX_LOCK 4
+#define PREFIX_CS 8
+#define PREFIX_SS 0x10
+#define PREFIX_DS 0x20
+#define PREFIX_ES 0x40
+#define PREFIX_FS 0x80
+#define PREFIX_GS 0x100
+#define PREFIX_DATA 0x200
+#define PREFIX_ADDR 0x400
+#define PREFIX_FWAIT 0x800
+
+/* Make sure that bytes from INFO->PRIVATE_DATA->BUFFER (inclusive)
+ to ADDR (exclusive) are valid. Returns 1 for success, longjmps
+ on error. */
+#define FETCH_DATA(info, addr) \
+ ((addr) <= ((struct dis_private *) (info->private_data))->max_fetched \
+ ? 1 : fetch_data ((info), (addr)))
+
+static int
+fetch_data (info, addr)
+ struct disassemble_info *info;
+ bfd_byte *addr;
+{
+ int status;
+ struct dis_private *priv = (struct dis_private *) info->private_data;
+ bfd_vma start = priv->insn_start + (priv->max_fetched - priv->the_buffer);
+
+ status = (*info->read_memory_func) (start,
+ priv->max_fetched,
+ addr - priv->max_fetched,
+ info);
+ if (status != 0)
+ {
+ /* If we did manage to read at least one byte, then
+ print_insn_i386 will do something sensible. Otherwise, print
+ an error. We do that here because this is where we know
+ STATUS. */
+ if (priv->max_fetched == priv->the_buffer)
+ (*info->memory_error_func) (status, start, info);
+ longjmp (priv->bailout, 1);
+ }
+ else
+ priv->max_fetched = addr;
+ return 1;
+}
+
+#define XX NULL, 0
+
+#define Eb OP_E, b_mode
+#define Ev OP_E, v_mode
+#define Ed OP_E, d_mode
+#define indirEb OP_indirE, b_mode
+#define indirEv OP_indirE, v_mode
+#define Ew OP_E, w_mode
+#define Ma OP_E, v_mode
+#define M OP_E, 0 /* lea, lgdt, etc. */
+#define Mp OP_E, 0 /* 32 or 48 bit memory operand for LDS, LES etc */
+#define Gb OP_G, b_mode
+#define Gv OP_G, v_mode
+#define Gd OP_G, d_mode
+#define Gw OP_G, w_mode
+#define Rd OP_Rd, d_mode
+#define Rm OP_Rd, m_mode
+#define Ib OP_I, b_mode
+#define sIb OP_sI, b_mode /* sign extened byte */
+#define Iv OP_I, v_mode
+#define Iq OP_I, q_mode
+#define Iv64 OP_I64, v_mode
+#define Iw OP_I, w_mode
+#define Jb OP_J, b_mode
+#define Jv OP_J, v_mode
+#define Cm OP_C, m_mode
+#define Dm OP_D, m_mode
+#define Td OP_T, d_mode
+
+#define RMeAX OP_REG, eAX_reg
+#define RMeBX OP_REG, eBX_reg
+#define RMeCX OP_REG, eCX_reg
+#define RMeDX OP_REG, eDX_reg
+#define RMeSP OP_REG, eSP_reg
+#define RMeBP OP_REG, eBP_reg
+#define RMeSI OP_REG, eSI_reg
+#define RMeDI OP_REG, eDI_reg
+#define RMrAX OP_REG, rAX_reg
+#define RMrBX OP_REG, rBX_reg
+#define RMrCX OP_REG, rCX_reg
+#define RMrDX OP_REG, rDX_reg
+#define RMrSP OP_REG, rSP_reg
+#define RMrBP OP_REG, rBP_reg
+#define RMrSI OP_REG, rSI_reg
+#define RMrDI OP_REG, rDI_reg
+#define RMAL OP_REG, al_reg
+#define RMAL OP_REG, al_reg
+#define RMCL OP_REG, cl_reg
+#define RMDL OP_REG, dl_reg
+#define RMBL OP_REG, bl_reg
+#define RMAH OP_REG, ah_reg
+#define RMCH OP_REG, ch_reg
+#define RMDH OP_REG, dh_reg
+#define RMBH OP_REG, bh_reg
+#define RMAX OP_REG, ax_reg
+#define RMDX OP_REG, dx_reg
+
+#define eAX OP_IMREG, eAX_reg
+#define eBX OP_IMREG, eBX_reg
+#define eCX OP_IMREG, eCX_reg
+#define eDX OP_IMREG, eDX_reg
+#define eSP OP_IMREG, eSP_reg
+#define eBP OP_IMREG, eBP_reg
+#define eSI OP_IMREG, eSI_reg
+#define eDI OP_IMREG, eDI_reg
+#define AL OP_IMREG, al_reg
+#define AL OP_IMREG, al_reg
+#define CL OP_IMREG, cl_reg
+#define DL OP_IMREG, dl_reg
+#define BL OP_IMREG, bl_reg
+#define AH OP_IMREG, ah_reg
+#define CH OP_IMREG, ch_reg
+#define DH OP_IMREG, dh_reg
+#define BH OP_IMREG, bh_reg
+#define AX OP_IMREG, ax_reg
+#define DX OP_IMREG, dx_reg
+#define indirDX OP_IMREG, indir_dx_reg
+
+#define Sw OP_SEG, w_mode
+#define Ap OP_DIR, 0
+#define Ob OP_OFF, b_mode
+#define Ob64 OP_OFF64, b_mode
+#define Ov OP_OFF, v_mode
+#define Ov64 OP_OFF64, v_mode
+#define Xb OP_DSreg, eSI_reg
+#define Xv OP_DSreg, eSI_reg
+#define Yb OP_ESreg, eDI_reg
+#define Yv OP_ESreg, eDI_reg
+#define DSBX OP_DSreg, eBX_reg
+
+#define es OP_REG, es_reg
+#define ss OP_REG, ss_reg
+#define cs OP_REG, cs_reg
+#define ds OP_REG, ds_reg
+#define fs OP_REG, fs_reg
+#define gs OP_REG, gs_reg
+
+#define MX OP_MMX, 0
+#define XM OP_XMM, 0
+#define EM OP_EM, v_mode
+#define EX OP_EX, v_mode
+#define MS OP_MS, v_mode
+#define XS OP_XS, v_mode
+#define None OP_E, 0
+#define OPSUF OP_3DNowSuffix, 0
+#define OPSIMD OP_SIMD_Suffix, 0
+
+#define cond_jump_flag NULL, cond_jump_mode
+#define loop_jcxz_flag NULL, loop_jcxz_mode
+
+/* bits in sizeflag */
+#define SUFFIX_ALWAYS 4
+#define AFLAG 2
+#define DFLAG 1
+
+#define b_mode 1 /* byte operand */
+#define v_mode 2 /* operand size depends on prefixes */
+#define w_mode 3 /* word operand */
+#define d_mode 4 /* double word operand */
+#define q_mode 5 /* quad word operand */
+#define x_mode 6
+#define m_mode 7 /* d_mode in 32bit, q_mode in 64bit mode. */
+#define cond_jump_mode 8
+#define loop_jcxz_mode 9
+
+#define es_reg 100
+#define cs_reg 101
+#define ss_reg 102
+#define ds_reg 103
+#define fs_reg 104
+#define gs_reg 105
+
+#define eAX_reg 108
+#define eCX_reg 109
+#define eDX_reg 110
+#define eBX_reg 111
+#define eSP_reg 112
+#define eBP_reg 113
+#define eSI_reg 114
+#define eDI_reg 115
+
+#define al_reg 116
+#define cl_reg 117
+#define dl_reg 118
+#define bl_reg 119
+#define ah_reg 120
+#define ch_reg 121
+#define dh_reg 122
+#define bh_reg 123
+
+#define ax_reg 124
+#define cx_reg 125
+#define dx_reg 126
+#define bx_reg 127
+#define sp_reg 128
+#define bp_reg 129
+#define si_reg 130
+#define di_reg 131
+
+#define rAX_reg 132
+#define rCX_reg 133
+#define rDX_reg 134
+#define rBX_reg 135
+#define rSP_reg 136
+#define rBP_reg 137
+#define rSI_reg 138
+#define rDI_reg 139
+
+#define indir_dx_reg 150
+
+#define FLOATCODE 1
+#define USE_GROUPS 2
+#define USE_PREFIX_USER_TABLE 3
+#define X86_64_SPECIAL 4
+
+#define FLOAT NULL, NULL, FLOATCODE, NULL, 0, NULL, 0
+
+#define GRP1b NULL, NULL, USE_GROUPS, NULL, 0, NULL, 0
+#define GRP1S NULL, NULL, USE_GROUPS, NULL, 1, NULL, 0
+#define GRP1Ss NULL, NULL, USE_GROUPS, NULL, 2, NULL, 0
+#define GRP2b NULL, NULL, USE_GROUPS, NULL, 3, NULL, 0
+#define GRP2S NULL, NULL, USE_GROUPS, NULL, 4, NULL, 0
+#define GRP2b_one NULL, NULL, USE_GROUPS, NULL, 5, NULL, 0
+#define GRP2S_one NULL, NULL, USE_GROUPS, NULL, 6, NULL, 0
+#define GRP2b_cl NULL, NULL, USE_GROUPS, NULL, 7, NULL, 0
+#define GRP2S_cl NULL, NULL, USE_GROUPS, NULL, 8, NULL, 0
+#define GRP3b NULL, NULL, USE_GROUPS, NULL, 9, NULL, 0
+#define GRP3S NULL, NULL, USE_GROUPS, NULL, 10, NULL, 0
+#define GRP4 NULL, NULL, USE_GROUPS, NULL, 11, NULL, 0
+#define GRP5 NULL, NULL, USE_GROUPS, NULL, 12, NULL, 0
+#define GRP6 NULL, NULL, USE_GROUPS, NULL, 13, NULL, 0
+#define GRP7 NULL, NULL, USE_GROUPS, NULL, 14, NULL, 0
+#define GRP8 NULL, NULL, USE_GROUPS, NULL, 15, NULL, 0
+#define GRP9 NULL, NULL, USE_GROUPS, NULL, 16, NULL, 0
+#define GRP10 NULL, NULL, USE_GROUPS, NULL, 17, NULL, 0
+#define GRP11 NULL, NULL, USE_GROUPS, NULL, 18, NULL, 0
+#define GRP12 NULL, NULL, USE_GROUPS, NULL, 19, NULL, 0
+#define GRP13 NULL, NULL, USE_GROUPS, NULL, 20, NULL, 0
+#define GRP14 NULL, NULL, USE_GROUPS, NULL, 21, NULL, 0
+#define GRPAMD NULL, NULL, USE_GROUPS, NULL, 22, NULL, 0
+
+#define PREGRP0 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 0, NULL, 0
+#define PREGRP1 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 1, NULL, 0
+#define PREGRP2 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 2, NULL, 0
+#define PREGRP3 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 3, NULL, 0
+#define PREGRP4 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 4, NULL, 0
+#define PREGRP5 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 5, NULL, 0
+#define PREGRP6 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 6, NULL, 0
+#define PREGRP7 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 7, NULL, 0
+#define PREGRP8 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 8, NULL, 0
+#define PREGRP9 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 9, NULL, 0
+#define PREGRP10 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 10, NULL, 0
+#define PREGRP11 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 11, NULL, 0
+#define PREGRP12 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 12, NULL, 0
+#define PREGRP13 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 13, NULL, 0
+#define PREGRP14 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 14, NULL, 0
+#define PREGRP15 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 15, NULL, 0
+#define PREGRP16 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 16, NULL, 0
+#define PREGRP17 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 17, NULL, 0
+#define PREGRP18 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 18, NULL, 0
+#define PREGRP19 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 19, NULL, 0
+#define PREGRP20 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 20, NULL, 0
+#define PREGRP21 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 21, NULL, 0
+#define PREGRP22 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 22, NULL, 0
+#define PREGRP23 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 23, NULL, 0
+#define PREGRP24 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 24, NULL, 0
+#define PREGRP25 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 25, NULL, 0
+#define PREGRP26 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 26, NULL, 0
+
+#define X86_64_0 NULL, NULL, X86_64_SPECIAL, NULL, 0, NULL, 0
+
+typedef void (*op_rtn) PARAMS ((int bytemode, int sizeflag));
+
+struct dis386 {
+ const char *name;
+ op_rtn op1;
+ int bytemode1;
+ op_rtn op2;
+ int bytemode2;
+ op_rtn op3;
+ int bytemode3;
+};
+
+/* Upper case letters in the instruction names here are macros.
+ 'A' => print 'b' if no register operands or suffix_always is true
+ 'B' => print 'b' if suffix_always is true
+ 'E' => print 'e' if 32-bit form of jcxz
+ 'F' => print 'w' or 'l' depending on address size prefix (loop insns)
+ 'H' => print ",pt" or ",pn" branch hint
+ 'L' => print 'l' if suffix_always is true
+ 'N' => print 'n' if instruction has no wait "prefix"
+ 'O' => print 'd', or 'o'
+ 'P' => print 'w', 'l' or 'q' if instruction has an operand size prefix,
+ . or suffix_always is true. print 'q' if rex prefix is present.
+ 'Q' => print 'w', 'l' or 'q' if no register operands or suffix_always
+ . is true
+ 'R' => print 'w', 'l' or 'q' ("wd" or "dq" in intel mode)
+ 'S' => print 'w', 'l' or 'q' if suffix_always is true
+ 'T' => print 'q' in 64bit mode and behave as 'P' otherwise
+ 'U' => print 'q' in 64bit mode and behave as 'Q' otherwise
+ 'X' => print 's', 'd' depending on data16 prefix (for XMM)
+ 'W' => print 'b' or 'w' ("w" or "de" in intel mode)
+ 'Y' => 'q' if instruction has an REX 64bit overwrite prefix
+
+ Many of the above letters print nothing in Intel mode. See "putop"
+ for the details.
+
+ Braces '{' and '}', and vertical bars '|', indicate alternative
+ mnemonic strings for AT&T, Intel, X86_64 AT&T, and X86_64 Intel
+ modes. In cases where there are only two alternatives, the X86_64
+ instruction is reserved, and "(bad)" is printed.
+*/
+
+static const struct dis386 dis386[] = {
+ /* 00 */
+ { "addB", Eb, Gb, XX },
+ { "addS", Ev, Gv, XX },
+ { "addB", Gb, Eb, XX },
+ { "addS", Gv, Ev, XX },
+ { "addB", AL, Ib, XX },
+ { "addS", eAX, Iv, XX },
+ { "push{T|}", es, XX, XX },
+ { "pop{T|}", es, XX, XX },
+ /* 08 */
+ { "orB", Eb, Gb, XX },
+ { "orS", Ev, Gv, XX },
+ { "orB", Gb, Eb, XX },
+ { "orS", Gv, Ev, XX },
+ { "orB", AL, Ib, XX },
+ { "orS", eAX, Iv, XX },
+ { "push{T|}", cs, XX, XX },
+ { "(bad)", XX, XX, XX }, /* 0x0f extended opcode escape */
+ /* 10 */
+ { "adcB", Eb, Gb, XX },
+ { "adcS", Ev, Gv, XX },
+ { "adcB", Gb, Eb, XX },
+ { "adcS", Gv, Ev, XX },
+ { "adcB", AL, Ib, XX },
+ { "adcS", eAX, Iv, XX },
+ { "push{T|}", ss, XX, XX },
+ { "popT|}", ss, XX, XX },
+ /* 18 */
+ { "sbbB", Eb, Gb, XX },
+ { "sbbS", Ev, Gv, XX },
+ { "sbbB", Gb, Eb, XX },
+ { "sbbS", Gv, Ev, XX },
+ { "sbbB", AL, Ib, XX },
+ { "sbbS", eAX, Iv, XX },
+ { "push{T|}", ds, XX, XX },
+ { "pop{T|}", ds, XX, XX },
+ /* 20 */
+ { "andB", Eb, Gb, XX },
+ { "andS", Ev, Gv, XX },
+ { "andB", Gb, Eb, XX },
+ { "andS", Gv, Ev, XX },
+ { "andB", AL, Ib, XX },
+ { "andS", eAX, Iv, XX },
+ { "(bad)", XX, XX, XX }, /* SEG ES prefix */
+ { "daa{|}", XX, XX, XX },
+ /* 28 */
+ { "subB", Eb, Gb, XX },
+ { "subS", Ev, Gv, XX },
+ { "subB", Gb, Eb, XX },
+ { "subS", Gv, Ev, XX },
+ { "subB", AL, Ib, XX },
+ { "subS", eAX, Iv, XX },
+ { "(bad)", XX, XX, XX }, /* SEG CS prefix */
+ { "das{|}", XX, XX, XX },
+ /* 30 */
+ { "xorB", Eb, Gb, XX },
+ { "xorS", Ev, Gv, XX },
+ { "xorB", Gb, Eb, XX },
+ { "xorS", Gv, Ev, XX },
+ { "xorB", AL, Ib, XX },
+ { "xorS", eAX, Iv, XX },
+ { "(bad)", XX, XX, XX }, /* SEG SS prefix */
+ { "aaa{|}", XX, XX, XX },
+ /* 38 */
+ { "cmpB", Eb, Gb, XX },
+ { "cmpS", Ev, Gv, XX },
+ { "cmpB", Gb, Eb, XX },
+ { "cmpS", Gv, Ev, XX },
+ { "cmpB", AL, Ib, XX },
+ { "cmpS", eAX, Iv, XX },
+ { "(bad)", XX, XX, XX }, /* SEG DS prefix */
+ { "aas{|}", XX, XX, XX },
+ /* 40 */
+ { "inc{S|}", RMeAX, XX, XX },
+ { "inc{S|}", RMeCX, XX, XX },
+ { "inc{S|}", RMeDX, XX, XX },
+ { "inc{S|}", RMeBX, XX, XX },
+ { "inc{S|}", RMeSP, XX, XX },
+ { "inc{S|}", RMeBP, XX, XX },
+ { "inc{S|}", RMeSI, XX, XX },
+ { "inc{S|}", RMeDI, XX, XX },
+ /* 48 */
+ { "dec{S|}", RMeAX, XX, XX },
+ { "dec{S|}", RMeCX, XX, XX },
+ { "dec{S|}", RMeDX, XX, XX },
+ { "dec{S|}", RMeBX, XX, XX },
+ { "dec{S|}", RMeSP, XX, XX },
+ { "dec{S|}", RMeBP, XX, XX },
+ { "dec{S|}", RMeSI, XX, XX },
+ { "dec{S|}", RMeDI, XX, XX },
+ /* 50 */
+ { "pushS", RMrAX, XX, XX },
+ { "pushS", RMrCX, XX, XX },
+ { "pushS", RMrDX, XX, XX },
+ { "pushS", RMrBX, XX, XX },
+ { "pushS", RMrSP, XX, XX },
+ { "pushS", RMrBP, XX, XX },
+ { "pushS", RMrSI, XX, XX },
+ { "pushS", RMrDI, XX, XX },
+ /* 58 */
+ { "popS", RMrAX, XX, XX },
+ { "popS", RMrCX, XX, XX },
+ { "popS", RMrDX, XX, XX },
+ { "popS", RMrBX, XX, XX },
+ { "popS", RMrSP, XX, XX },
+ { "popS", RMrBP, XX, XX },
+ { "popS", RMrSI, XX, XX },
+ { "popS", RMrDI, XX, XX },
+ /* 60 */
+ { "pusha{P|}", XX, XX, XX },
+ { "popa{P|}", XX, XX, XX },
+ { "bound{S|}", Gv, Ma, XX },
+ { X86_64_0 },
+ { "(bad)", XX, XX, XX }, /* seg fs */
+ { "(bad)", XX, XX, XX }, /* seg gs */
+ { "(bad)", XX, XX, XX }, /* op size prefix */
+ { "(bad)", XX, XX, XX }, /* adr size prefix */
+ /* 68 */
+ { "pushT", Iq, XX, XX },
+ { "imulS", Gv, Ev, Iv },
+ { "pushT", sIb, XX, XX },
+ { "imulS", Gv, Ev, sIb },
+ { "ins{b||b|}", Yb, indirDX, XX },
+ { "ins{R||R|}", Yv, indirDX, XX },
+ { "outs{b||b|}", indirDX, Xb, XX },
+ { "outs{R||R|}", indirDX, Xv, XX },
+ /* 70 */
+ { "joH", Jb, XX, cond_jump_flag },
+ { "jnoH", Jb, XX, cond_jump_flag },
+ { "jbH", Jb, XX, cond_jump_flag },
+ { "jaeH", Jb, XX, cond_jump_flag },
+ { "jeH", Jb, XX, cond_jump_flag },
+ { "jneH", Jb, XX, cond_jump_flag },
+ { "jbeH", Jb, XX, cond_jump_flag },
+ { "jaH", Jb, XX, cond_jump_flag },
+ /* 78 */
+ { "jsH", Jb, XX, cond_jump_flag },
+ { "jnsH", Jb, XX, cond_jump_flag },
+ { "jpH", Jb, XX, cond_jump_flag },
+ { "jnpH", Jb, XX, cond_jump_flag },
+ { "jlH", Jb, XX, cond_jump_flag },
+ { "jgeH", Jb, XX, cond_jump_flag },
+ { "jleH", Jb, XX, cond_jump_flag },
+ { "jgH", Jb, XX, cond_jump_flag },
+ /* 80 */
+ { GRP1b },
+ { GRP1S },
+ { "(bad)", XX, XX, XX },
+ { GRP1Ss },
+ { "testB", Eb, Gb, XX },
+ { "testS", Ev, Gv, XX },
+ { "xchgB", Eb, Gb, XX },
+ { "xchgS", Ev, Gv, XX },
+ /* 88 */
+ { "movB", Eb, Gb, XX },
+ { "movS", Ev, Gv, XX },
+ { "movB", Gb, Eb, XX },
+ { "movS", Gv, Ev, XX },
+ { "movQ", Ev, Sw, XX },
+ { "leaS", Gv, M, XX },
+ { "movQ", Sw, Ev, XX },
+ { "popU", Ev, XX, XX },
+ /* 90 */
+ { "nop", XX, XX, XX },
+ /* FIXME: NOP with REPz prefix is called PAUSE. */
+ { "xchgS", RMeCX, eAX, XX },
+ { "xchgS", RMeDX, eAX, XX },
+ { "xchgS", RMeBX, eAX, XX },
+ { "xchgS", RMeSP, eAX, XX },
+ { "xchgS", RMeBP, eAX, XX },
+ { "xchgS", RMeSI, eAX, XX },
+ { "xchgS", RMeDI, eAX, XX },
+ /* 98 */
+ { "cW{tR||tR|}", XX, XX, XX },
+ { "cR{tO||tO|}", XX, XX, XX },
+ { "lcall{T|}", Ap, XX, XX },
+ { "(bad)", XX, XX, XX }, /* fwait */
+ { "pushfT", XX, XX, XX },
+ { "popfT", XX, XX, XX },
+ { "sahf{|}", XX, XX, XX },
+ { "lahf{|}", XX, XX, XX },
+ /* a0 */
+ { "movB", AL, Ob64, XX },
+ { "movS", eAX, Ov64, XX },
+ { "movB", Ob64, AL, XX },
+ { "movS", Ov64, eAX, XX },
+ { "movs{b||b|}", Yb, Xb, XX },
+ { "movs{R||R|}", Yv, Xv, XX },
+ { "cmps{b||b|}", Xb, Yb, XX },
+ { "cmps{R||R|}", Xv, Yv, XX },
+ /* a8 */
+ { "testB", AL, Ib, XX },
+ { "testS", eAX, Iv, XX },
+ { "stosB", Yb, AL, XX },
+ { "stosS", Yv, eAX, XX },
+ { "lodsB", AL, Xb, XX },
+ { "lodsS", eAX, Xv, XX },
+ { "scasB", AL, Yb, XX },
+ { "scasS", eAX, Yv, XX },
+ /* b0 */
+ { "movB", RMAL, Ib, XX },
+ { "movB", RMCL, Ib, XX },
+ { "movB", RMDL, Ib, XX },
+ { "movB", RMBL, Ib, XX },
+ { "movB", RMAH, Ib, XX },
+ { "movB", RMCH, Ib, XX },
+ { "movB", RMDH, Ib, XX },
+ { "movB", RMBH, Ib, XX },
+ /* b8 */
+ { "movS", RMeAX, Iv64, XX },
+ { "movS", RMeCX, Iv64, XX },
+ { "movS", RMeDX, Iv64, XX },
+ { "movS", RMeBX, Iv64, XX },
+ { "movS", RMeSP, Iv64, XX },
+ { "movS", RMeBP, Iv64, XX },
+ { "movS", RMeSI, Iv64, XX },
+ { "movS", RMeDI, Iv64, XX },
+ /* c0 */
+ { GRP2b },
+ { GRP2S },
+ { "retT", Iw, XX, XX },
+ { "retT", XX, XX, XX },
+ { "les{S|}", Gv, Mp, XX },
+ { "ldsS", Gv, Mp, XX },
+ { "movA", Eb, Ib, XX },
+ { "movQ", Ev, Iv, XX },
+ /* c8 */
+ { "enterT", Iw, Ib, XX },
+ { "leaveT", XX, XX, XX },
+ { "lretP", Iw, XX, XX },
+ { "lretP", XX, XX, XX },
+ { "int3", XX, XX, XX },
+ { "int", Ib, XX, XX },
+ { "into{|}", XX, XX, XX },
+ { "iretP", XX, XX, XX },
+ /* d0 */
+ { GRP2b_one },
+ { GRP2S_one },
+ { GRP2b_cl },
+ { GRP2S_cl },
+ { "aam{|}", sIb, XX, XX },
+ { "aad{|}", sIb, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "xlat", DSBX, XX, XX },
+ /* d8 */
+ { FLOAT },
+ { FLOAT },
+ { FLOAT },
+ { FLOAT },
+ { FLOAT },
+ { FLOAT },
+ { FLOAT },
+ { FLOAT },
+ /* e0 */
+ { "loopneFH", Jb, XX, loop_jcxz_flag },
+ { "loopeFH", Jb, XX, loop_jcxz_flag },
+ { "loopFH", Jb, XX, loop_jcxz_flag },
+ { "jEcxzH", Jb, XX, loop_jcxz_flag },
+ { "inB", AL, Ib, XX },
+ { "inS", eAX, Ib, XX },
+ { "outB", Ib, AL, XX },
+ { "outS", Ib, eAX, XX },
+ /* e8 */
+ { "callT", Jv, XX, XX },
+ { "jmpT", Jv, XX, XX },
+ { "ljmp{T|}", Ap, XX, XX },
+ { "jmp", Jb, XX, XX },
+ { "inB", AL, indirDX, XX },
+ { "inS", eAX, indirDX, XX },
+ { "outB", indirDX, AL, XX },
+ { "outS", indirDX, eAX, XX },
+ /* f0 */
+ { "(bad)", XX, XX, XX }, /* lock prefix */
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX }, /* repne */
+ { "(bad)", XX, XX, XX }, /* repz */
+ { "hlt", XX, XX, XX },
+ { "cmc", XX, XX, XX },
+ { GRP3b },
+ { GRP3S },
+ /* f8 */
+ { "clc", XX, XX, XX },
+ { "stc", XX, XX, XX },
+ { "cli", XX, XX, XX },
+ { "sti", XX, XX, XX },
+ { "cld", XX, XX, XX },
+ { "std", XX, XX, XX },
+ { GRP4 },
+ { GRP5 },
+};
+
+static const struct dis386 dis386_twobyte[] = {
+ /* 00 */
+ { GRP6 },
+ { GRP7 },
+ { "larS", Gv, Ew, XX },
+ { "lslS", Gv, Ew, XX },
+ { "(bad)", XX, XX, XX },
+ { "syscall", XX, XX, XX },
+ { "clts", XX, XX, XX },
+ { "sysretP", XX, XX, XX },
+ /* 08 */
+ { "invd", XX, XX, XX },
+ { "wbinvd", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "ud2a", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { GRPAMD },
+ { "femms", XX, XX, XX },
+ { "", MX, EM, OPSUF }, /* See OP_3DNowSuffix. */
+ /* 10 */
+ { PREGRP8 },
+ { PREGRP9 },
+ { "movlpX", XM, EX, SIMD_Fixup, 'h' }, /* really only 2 operands */
+ { "movlpX", EX, XM, SIMD_Fixup, 'h' },
+ { "unpcklpX", XM, EX, XX },
+ { "unpckhpX", XM, EX, XX },
+ { "movhpX", XM, EX, SIMD_Fixup, 'l' },
+ { "movhpX", EX, XM, SIMD_Fixup, 'l' },
+ /* 18 */
+ { GRP14 },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ /* 20 */
+ { "movL", Rm, Cm, XX },
+ { "movL", Rm, Dm, XX },
+ { "movL", Cm, Rm, XX },
+ { "movL", Dm, Rm, XX },
+ { "movL", Rd, Td, XX },
+ { "(bad)", XX, XX, XX },
+ { "movL", Td, Rd, XX },
+ { "(bad)", XX, XX, XX },
+ /* 28 */
+ { "movapX", XM, EX, XX },
+ { "movapX", EX, XM, XX },
+ { PREGRP2 },
+ { "movntpX", Ev, XM, XX },
+ { PREGRP4 },
+ { PREGRP3 },
+ { "ucomisX", XM,EX, XX },
+ { "comisX", XM,EX, XX },
+ /* 30 */
+ { "wrmsr", XX, XX, XX },
+ { "rdtsc", XX, XX, XX },
+ { "rdmsr", XX, XX, XX },
+ { "rdpmc", XX, XX, XX },
+ { "sysenter", XX, XX, XX },
+ { "sysexit", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ /* 38 */
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ /* 40 */
+ { "cmovo", Gv, Ev, XX },
+ { "cmovno", Gv, Ev, XX },
+ { "cmovb", Gv, Ev, XX },
+ { "cmovae", Gv, Ev, XX },
+ { "cmove", Gv, Ev, XX },
+ { "cmovne", Gv, Ev, XX },
+ { "cmovbe", Gv, Ev, XX },
+ { "cmova", Gv, Ev, XX },
+ /* 48 */
+ { "cmovs", Gv, Ev, XX },
+ { "cmovns", Gv, Ev, XX },
+ { "cmovp", Gv, Ev, XX },
+ { "cmovnp", Gv, Ev, XX },
+ { "cmovl", Gv, Ev, XX },
+ { "cmovge", Gv, Ev, XX },
+ { "cmovle", Gv, Ev, XX },
+ { "cmovg", Gv, Ev, XX },
+ /* 50 */
+ { "movmskpX", Gd, XS, XX },
+ { PREGRP13 },
+ { PREGRP12 },
+ { PREGRP11 },
+ { "andpX", XM, EX, XX },
+ { "andnpX", XM, EX, XX },
+ { "orpX", XM, EX, XX },
+ { "xorpX", XM, EX, XX },
+ /* 58 */
+ { PREGRP0 },
+ { PREGRP10 },
+ { PREGRP17 },
+ { PREGRP16 },
+ { PREGRP14 },
+ { PREGRP7 },
+ { PREGRP5 },
+ { PREGRP6 },
+ /* 60 */
+ { "punpcklbw", MX, EM, XX },
+ { "punpcklwd", MX, EM, XX },
+ { "punpckldq", MX, EM, XX },
+ { "packsswb", MX, EM, XX },
+ { "pcmpgtb", MX, EM, XX },
+ { "pcmpgtw", MX, EM, XX },
+ { "pcmpgtd", MX, EM, XX },
+ { "packuswb", MX, EM, XX },
+ /* 68 */
+ { "punpckhbw", MX, EM, XX },
+ { "punpckhwd", MX, EM, XX },
+ { "punpckhdq", MX, EM, XX },
+ { "packssdw", MX, EM, XX },
+ { PREGRP26 },
+ { PREGRP24 },
+ { "movd", MX, Ed, XX },
+ { PREGRP19 },
+ /* 70 */
+ { PREGRP22 },
+ { GRP10 },
+ { GRP11 },
+ { GRP12 },
+ { "pcmpeqb", MX, EM, XX },
+ { "pcmpeqw", MX, EM, XX },
+ { "pcmpeqd", MX, EM, XX },
+ { "emms", XX, XX, XX },
+ /* 78 */
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { PREGRP23 },
+ { PREGRP20 },
+ /* 80 */
+ { "joH", Jv, XX, cond_jump_flag },
+ { "jnoH", Jv, XX, cond_jump_flag },
+ { "jbH", Jv, XX, cond_jump_flag },
+ { "jaeH", Jv, XX, cond_jump_flag },
+ { "jeH", Jv, XX, cond_jump_flag },
+ { "jneH", Jv, XX, cond_jump_flag },
+ { "jbeH", Jv, XX, cond_jump_flag },
+ { "jaH", Jv, XX, cond_jump_flag },
+ /* 88 */
+ { "jsH", Jv, XX, cond_jump_flag },
+ { "jnsH", Jv, XX, cond_jump_flag },
+ { "jpH", Jv, XX, cond_jump_flag },
+ { "jnpH", Jv, XX, cond_jump_flag },
+ { "jlH", Jv, XX, cond_jump_flag },
+ { "jgeH", Jv, XX, cond_jump_flag },
+ { "jleH", Jv, XX, cond_jump_flag },
+ { "jgH", Jv, XX, cond_jump_flag },
+ /* 90 */
+ { "seto", Eb, XX, XX },
+ { "setno", Eb, XX, XX },
+ { "setb", Eb, XX, XX },
+ { "setae", Eb, XX, XX },
+ { "sete", Eb, XX, XX },
+ { "setne", Eb, XX, XX },
+ { "setbe", Eb, XX, XX },
+ { "seta", Eb, XX, XX },
+ /* 98 */
+ { "sets", Eb, XX, XX },
+ { "setns", Eb, XX, XX },
+ { "setp", Eb, XX, XX },
+ { "setnp", Eb, XX, XX },
+ { "setl", Eb, XX, XX },
+ { "setge", Eb, XX, XX },
+ { "setle", Eb, XX, XX },
+ { "setg", Eb, XX, XX },
+ /* a0 */
+ { "pushT", fs, XX, XX },
+ { "popT", fs, XX, XX },
+ { "cpuid", XX, XX, XX },
+ { "btS", Ev, Gv, XX },
+ { "shldS", Ev, Gv, Ib },
+ { "shldS", Ev, Gv, CL },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ /* a8 */
+ { "pushT", gs, XX, XX },
+ { "popT", gs, XX, XX },
+ { "rsm", XX, XX, XX },
+ { "btsS", Ev, Gv, XX },
+ { "shrdS", Ev, Gv, Ib },
+ { "shrdS", Ev, Gv, CL },
+ { GRP13 },
+ { "imulS", Gv, Ev, XX },
+ /* b0 */
+ { "cmpxchgB", Eb, Gb, XX },
+ { "cmpxchgS", Ev, Gv, XX },
+ { "lssS", Gv, Mp, XX },
+ { "btrS", Ev, Gv, XX },
+ { "lfsS", Gv, Mp, XX },
+ { "lgsS", Gv, Mp, XX },
+ { "movz{bR|x|bR|x}", Gv, Eb, XX },
+ { "movz{wR|x|wR|x}", Gv, Ew, XX }, /* yes, there really is movzww ! */
+ /* b8 */
+ { "(bad)", XX, XX, XX },
+ { "ud2b", XX, XX, XX },
+ { GRP8 },
+ { "btcS", Ev, Gv, XX },
+ { "bsfS", Gv, Ev, XX },
+ { "bsrS", Gv, Ev, XX },
+ { "movs{bR|x|bR|x}", Gv, Eb, XX },
+ { "movs{wR|x|wR|x}", Gv, Ew, XX }, /* yes, there really is movsww ! */
+ /* c0 */
+ { "xaddB", Eb, Gb, XX },
+ { "xaddS", Ev, Gv, XX },
+ { PREGRP1 },
+ { "movntiS", Ev, Gv, XX },
+ { "pinsrw", MX, Ed, Ib },
+ { "pextrw", Gd, MS, Ib },
+ { "shufpX", XM, EX, Ib },
+ { GRP9 },
+ /* c8 */
+ { "bswap", RMeAX, XX, XX },
+ { "bswap", RMeCX, XX, XX },
+ { "bswap", RMeDX, XX, XX },
+ { "bswap", RMeBX, XX, XX },
+ { "bswap", RMeSP, XX, XX },
+ { "bswap", RMeBP, XX, XX },
+ { "bswap", RMeSI, XX, XX },
+ { "bswap", RMeDI, XX, XX },
+ /* d0 */
+ { "(bad)", XX, XX, XX },
+ { "psrlw", MX, EM, XX },
+ { "psrld", MX, EM, XX },
+ { "psrlq", MX, EM, XX },
+ { "paddq", MX, EM, XX },
+ { "pmullw", MX, EM, XX },
+ { PREGRP21 },
+ { "pmovmskb", Gd, MS, XX },
+ /* d8 */
+ { "psubusb", MX, EM, XX },
+ { "psubusw", MX, EM, XX },
+ { "pminub", MX, EM, XX },
+ { "pand", MX, EM, XX },
+ { "paddusb", MX, EM, XX },
+ { "paddusw", MX, EM, XX },
+ { "pmaxub", MX, EM, XX },
+ { "pandn", MX, EM, XX },
+ /* e0 */
+ { "pavgb", MX, EM, XX },
+ { "psraw", MX, EM, XX },
+ { "psrad", MX, EM, XX },
+ { "pavgw", MX, EM, XX },
+ { "pmulhuw", MX, EM, XX },
+ { "pmulhw", MX, EM, XX },
+ { PREGRP15 },
+ { PREGRP25 },
+ /* e8 */
+ { "psubsb", MX, EM, XX },
+ { "psubsw", MX, EM, XX },
+ { "pminsw", MX, EM, XX },
+ { "por", MX, EM, XX },
+ { "paddsb", MX, EM, XX },
+ { "paddsw", MX, EM, XX },
+ { "pmaxsw", MX, EM, XX },
+ { "pxor", MX, EM, XX },
+ /* f0 */
+ { "(bad)", XX, XX, XX },
+ { "psllw", MX, EM, XX },
+ { "pslld", MX, EM, XX },
+ { "psllq", MX, EM, XX },
+ { "pmuludq", MX, EM, XX },
+ { "pmaddwd", MX, EM, XX },
+ { "psadbw", MX, EM, XX },
+ { PREGRP18 },
+ /* f8 */
+ { "psubb", MX, EM, XX },
+ { "psubw", MX, EM, XX },
+ { "psubd", MX, EM, XX },
+ { "psubq", MX, EM, XX },
+ { "paddb", MX, EM, XX },
+ { "paddw", MX, EM, XX },
+ { "paddd", MX, EM, XX },
+ { "(bad)", XX, XX, XX }
+};
+
+static const unsigned char onebyte_has_modrm[256] = {
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+ /* ------------------------------- */
+ /* 00 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 00 */
+ /* 10 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 10 */
+ /* 20 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 20 */
+ /* 30 */ 1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0, /* 30 */
+ /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 40 */
+ /* 50 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 50 */
+ /* 60 */ 0,0,1,1,0,0,0,0,0,1,0,1,0,0,0,0, /* 60 */
+ /* 70 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 70 */
+ /* 80 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 80 */
+ /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 90 */
+ /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* a0 */
+ /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* b0 */
+ /* c0 */ 1,1,0,0,1,1,1,1,0,0,0,0,0,0,0,0, /* c0 */
+ /* d0 */ 1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1, /* d0 */
+ /* e0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* e0 */
+ /* f0 */ 0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1 /* f0 */
+ /* ------------------------------- */
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+};
+
+static const unsigned char twobyte_has_modrm[256] = {
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+ /* ------------------------------- */
+ /* 00 */ 1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,1, /* 0f */
+ /* 10 */ 1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0, /* 1f */
+ /* 20 */ 1,1,1,1,1,0,1,0,1,1,1,1,1,1,1,1, /* 2f */
+ /* 30 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 3f */
+ /* 40 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 4f */
+ /* 50 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 5f */
+ /* 60 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 6f */
+ /* 70 */ 1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1, /* 7f */
+ /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
+ /* 90 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 9f */
+ /* a0 */ 0,0,0,1,1,1,0,0,0,0,0,1,1,1,1,1, /* af */
+ /* b0 */ 1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1, /* bf */
+ /* c0 */ 1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0, /* cf */
+ /* d0 */ 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* df */
+ /* e0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ef */
+ /* f0 */ 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0 /* ff */
+ /* ------------------------------- */
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+};
+
+static const unsigned char twobyte_uses_SSE_prefix[256] = {
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+ /* ------------------------------- */
+ /* 00 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0f */
+ /* 10 */ 1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 1f */
+ /* 20 */ 0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,0, /* 2f */
+ /* 30 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 3f */
+ /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 4f */
+ /* 50 */ 0,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1, /* 5f */
+ /* 60 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1, /* 6f */
+ /* 70 */ 1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1, /* 7f */
+ /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
+ /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 9f */
+ /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* af */
+ /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* bf */
+ /* c0 */ 0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0, /* cf */
+ /* d0 */ 0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0, /* df */
+ /* e0 */ 0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0, /* ef */
+ /* f0 */ 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0 /* ff */
+ /* ------------------------------- */
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+};
+
+static char obuf[100];
+static char *obufp;
+static char scratchbuf[100];
+static unsigned char *start_codep;
+static unsigned char *insn_codep;
+static unsigned char *codep;
+static disassemble_info *the_info;
+static int mod;
+static int rm;
+static int reg;
+static unsigned char need_modrm;
+
+/* If we are accessing mod/rm/reg without need_modrm set, then the
+ values are stale. Hitting this abort likely indicates that you
+ need to update onebyte_has_modrm or twobyte_has_modrm. */
+#define MODRM_CHECK if (!need_modrm) abort ()
+
+static const char **names64;
+static const char **names32;
+static const char **names16;
+static const char **names8;
+static const char **names8rex;
+static const char **names_seg;
+static const char **index16;
+
+static const char *intel_names64[] = {
+ "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi",
+ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
+};
+static const char *intel_names32[] = {
+ "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi",
+ "r8d", "r9d", "r10d", "r11d", "r12d", "r13d", "r14d", "r15d"
+};
+static const char *intel_names16[] = {
+ "ax", "cx", "dx", "bx", "sp", "bp", "si", "di",
+ "r8w", "r9w", "r10w", "r11w", "r12w", "r13w", "r14w", "r15w"
+};
+static const char *intel_names8[] = {
+ "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh",
+};
+static const char *intel_names8rex[] = {
+ "al", "cl", "dl", "bl", "spl", "bpl", "sil", "dil",
+ "r8b", "r9b", "r10b", "r11b", "r12b", "r13b", "r14b", "r15b"
+};
+static const char *intel_names_seg[] = {
+ "es", "cs", "ss", "ds", "fs", "gs", "?", "?",
+};
+static const char *intel_index16[] = {
+ "bx+si", "bx+di", "bp+si", "bp+di", "si", "di", "bp", "bx"
+};
+
+static const char *att_names64[] = {
+ "%rax", "%rcx", "%rdx", "%rbx", "%rsp", "%rbp", "%rsi", "%rdi",
+ "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15"
+};
+static const char *att_names32[] = {
+ "%eax", "%ecx", "%edx", "%ebx", "%esp", "%ebp", "%esi", "%edi",
+ "%r8d", "%r9d", "%r10d", "%r11d", "%r12d", "%r13d", "%r14d", "%r15d"
+};
+static const char *att_names16[] = {
+ "%ax", "%cx", "%dx", "%bx", "%sp", "%bp", "%si", "%di",
+ "%r8w", "%r9w", "%r10w", "%r11w", "%r12w", "%r13w", "%r14w", "%r15w"
+};
+static const char *att_names8[] = {
+ "%al", "%cl", "%dl", "%bl", "%ah", "%ch", "%dh", "%bh",
+};
+static const char *att_names8rex[] = {
+ "%al", "%cl", "%dl", "%bl", "%spl", "%bpl", "%sil", "%dil",
+ "%r8b", "%r9b", "%r10b", "%r11b", "%r12b", "%r13b", "%r14b", "%r15b"
+};
+static const char *att_names_seg[] = {
+ "%es", "%cs", "%ss", "%ds", "%fs", "%gs", "%?", "%?",
+};
+static const char *att_index16[] = {
+ "%bx,%si", "%bx,%di", "%bp,%si", "%bp,%di", "%si", "%di", "%bp", "%bx"
+};
+
+static const struct dis386 grps[][8] = {
+ /* GRP1b */
+ {
+ { "addA", Eb, Ib, XX },
+ { "orA", Eb, Ib, XX },
+ { "adcA", Eb, Ib, XX },
+ { "sbbA", Eb, Ib, XX },
+ { "andA", Eb, Ib, XX },
+ { "subA", Eb, Ib, XX },
+ { "xorA", Eb, Ib, XX },
+ { "cmpA", Eb, Ib, XX }
+ },
+ /* GRP1S */
+ {
+ { "addQ", Ev, Iv, XX },
+ { "orQ", Ev, Iv, XX },
+ { "adcQ", Ev, Iv, XX },
+ { "sbbQ", Ev, Iv, XX },
+ { "andQ", Ev, Iv, XX },
+ { "subQ", Ev, Iv, XX },
+ { "xorQ", Ev, Iv, XX },
+ { "cmpQ", Ev, Iv, XX }
+ },
+ /* GRP1Ss */
+ {
+ { "addQ", Ev, sIb, XX },
+ { "orQ", Ev, sIb, XX },
+ { "adcQ", Ev, sIb, XX },
+ { "sbbQ", Ev, sIb, XX },
+ { "andQ", Ev, sIb, XX },
+ { "subQ", Ev, sIb, XX },
+ { "xorQ", Ev, sIb, XX },
+ { "cmpQ", Ev, sIb, XX }
+ },
+ /* GRP2b */
+ {
+ { "rolA", Eb, Ib, XX },
+ { "rorA", Eb, Ib, XX },
+ { "rclA", Eb, Ib, XX },
+ { "rcrA", Eb, Ib, XX },
+ { "shlA", Eb, Ib, XX },
+ { "shrA", Eb, Ib, XX },
+ { "(bad)", XX, XX, XX },
+ { "sarA", Eb, Ib, XX },
+ },
+ /* GRP2S */
+ {
+ { "rolQ", Ev, Ib, XX },
+ { "rorQ", Ev, Ib, XX },
+ { "rclQ", Ev, Ib, XX },
+ { "rcrQ", Ev, Ib, XX },
+ { "shlQ", Ev, Ib, XX },
+ { "shrQ", Ev, Ib, XX },
+ { "(bad)", XX, XX, XX },
+ { "sarQ", Ev, Ib, XX },
+ },
+ /* GRP2b_one */
+ {
+ { "rolA", Eb, XX, XX },
+ { "rorA", Eb, XX, XX },
+ { "rclA", Eb, XX, XX },
+ { "rcrA", Eb, XX, XX },
+ { "shlA", Eb, XX, XX },
+ { "shrA", Eb, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "sarA", Eb, XX, XX },
+ },
+ /* GRP2S_one */
+ {
+ { "rolQ", Ev, XX, XX },
+ { "rorQ", Ev, XX, XX },
+ { "rclQ", Ev, XX, XX },
+ { "rcrQ", Ev, XX, XX },
+ { "shlQ", Ev, XX, XX },
+ { "shrQ", Ev, XX, XX },
+ { "(bad)", XX, XX, XX},
+ { "sarQ", Ev, XX, XX },
+ },
+ /* GRP2b_cl */
+ {
+ { "rolA", Eb, CL, XX },
+ { "rorA", Eb, CL, XX },
+ { "rclA", Eb, CL, XX },
+ { "rcrA", Eb, CL, XX },
+ { "shlA", Eb, CL, XX },
+ { "shrA", Eb, CL, XX },
+ { "(bad)", XX, XX, XX },
+ { "sarA", Eb, CL, XX },
+ },
+ /* GRP2S_cl */
+ {
+ { "rolQ", Ev, CL, XX },
+ { "rorQ", Ev, CL, XX },
+ { "rclQ", Ev, CL, XX },
+ { "rcrQ", Ev, CL, XX },
+ { "shlQ", Ev, CL, XX },
+ { "shrQ", Ev, CL, XX },
+ { "(bad)", XX, XX, XX },
+ { "sarQ", Ev, CL, XX }
+ },
+ /* GRP3b */
+ {
+ { "testA", Eb, Ib, XX },
+ { "(bad)", Eb, XX, XX },
+ { "notA", Eb, XX, XX },
+ { "negA", Eb, XX, XX },
+ { "mulA", Eb, XX, XX }, /* Don't print the implicit %al register, */
+ { "imulA", Eb, XX, XX }, /* to distinguish these opcodes from other */
+ { "divA", Eb, XX, XX }, /* mul/imul opcodes. Do the same for div */
+ { "idivA", Eb, XX, XX } /* and idiv for consistency. */
+ },
+ /* GRP3S */
+ {
+ { "testQ", Ev, Iv, XX },
+ { "(bad)", XX, XX, XX },
+ { "notQ", Ev, XX, XX },
+ { "negQ", Ev, XX, XX },
+ { "mulQ", Ev, XX, XX }, /* Don't print the implicit register. */
+ { "imulQ", Ev, XX, XX },
+ { "divQ", Ev, XX, XX },
+ { "idivQ", Ev, XX, XX },
+ },
+ /* GRP4 */
+ {
+ { "incA", Eb, XX, XX },
+ { "decA", Eb, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ },
+ /* GRP5 */
+ {
+ { "incQ", Ev, XX, XX },
+ { "decQ", Ev, XX, XX },
+ { "callT", indirEv, XX, XX },
+ { "lcallT", indirEv, XX, XX },
+ { "jmpT", indirEv, XX, XX },
+ { "ljmpT", indirEv, XX, XX },
+ { "pushU", Ev, XX, XX },
+ { "(bad)", XX, XX, XX },
+ },
+ /* GRP6 */
+ {
+ { "sldtQ", Ev, XX, XX },
+ { "strQ", Ev, XX, XX },
+ { "lldt", Ew, XX, XX },
+ { "ltr", Ew, XX, XX },
+ { "verr", Ew, XX, XX },
+ { "verw", Ew, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX }
+ },
+ /* GRP7 */
+ {
+ { "sgdtQ", M, XX, XX },
+ { "sidtQ", M, XX, XX },
+ { "lgdtQ", M, XX, XX },
+ { "lidtQ", M, XX, XX },
+ { "smswQ", Ev, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "lmsw", Ew, XX, XX },
+ { "invlpg", Ew, XX, XX },
+ },
+ /* GRP8 */
+ {
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "btQ", Ev, Ib, XX },
+ { "btsQ", Ev, Ib, XX },
+ { "btrQ", Ev, Ib, XX },
+ { "btcQ", Ev, Ib, XX },
+ },
+ /* GRP9 */
+ {
+ { "(bad)", XX, XX, XX },
+ { "cmpxchg8b", Ev, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ },
+ /* GRP10 */
+ {
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "psrlw", MS, Ib, XX },
+ { "(bad)", XX, XX, XX },
+ { "psraw", MS, Ib, XX },
+ { "(bad)", XX, XX, XX },
+ { "psllw", MS, Ib, XX },
+ { "(bad)", XX, XX, XX },
+ },
+ /* GRP11 */
+ {
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "psrld", MS, Ib, XX },
+ { "(bad)", XX, XX, XX },
+ { "psrad", MS, Ib, XX },
+ { "(bad)", XX, XX, XX },
+ { "pslld", MS, Ib, XX },
+ { "(bad)", XX, XX, XX },
+ },
+ /* GRP12 */
+ {
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "psrlq", MS, Ib, XX },
+ { "psrldq", MS, Ib, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "psllq", MS, Ib, XX },
+ { "pslldq", MS, Ib, XX },
+ },
+ /* GRP13 */
+ {
+ { "fxsave", Ev, XX, XX },
+ { "fxrstor", Ev, XX, XX },
+ { "ldmxcsr", Ev, XX, XX },
+ { "stmxcsr", Ev, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "lfence", None, XX, XX },
+ { "mfence", None, XX, XX },
+ { "sfence", None, XX, XX },
+ /* FIXME: the sfence with memory operand is clflush! */
+ },
+ /* GRP14 */
+ {
+ { "prefetchnta", Ev, XX, XX },
+ { "prefetcht0", Ev, XX, XX },
+ { "prefetcht1", Ev, XX, XX },
+ { "prefetcht2", Ev, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ },
+ /* GRPAMD */
+ {
+ { "prefetch", Eb, XX, XX },
+ { "prefetchw", Eb, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ }
+};
+
+static const struct dis386 prefix_user_table[][4] = {
+ /* PREGRP0 */
+ {
+ { "addps", XM, EX, XX },
+ { "addss", XM, EX, XX },
+ { "addpd", XM, EX, XX },
+ { "addsd", XM, EX, XX },
+ },
+ /* PREGRP1 */
+ {
+ { "", XM, EX, OPSIMD }, /* See OP_SIMD_SUFFIX. */
+ { "", XM, EX, OPSIMD },
+ { "", XM, EX, OPSIMD },
+ { "", XM, EX, OPSIMD },
+ },
+ /* PREGRP2 */
+ {
+ { "cvtpi2ps", XM, EM, XX },
+ { "cvtsi2ssY", XM, Ev, XX },
+ { "cvtpi2pd", XM, EM, XX },
+ { "cvtsi2sdY", XM, Ev, XX },
+ },
+ /* PREGRP3 */
+ {
+ { "cvtps2pi", MX, EX, XX },
+ { "cvtss2siY", Gv, EX, XX },
+ { "cvtpd2pi", MX, EX, XX },
+ { "cvtsd2siY", Gv, EX, XX },
+ },
+ /* PREGRP4 */
+ {
+ { "cvttps2pi", MX, EX, XX },
+ { "cvttss2siY", Gv, EX, XX },
+ { "cvttpd2pi", MX, EX, XX },
+ { "cvttsd2siY", Gv, EX, XX },
+ },
+ /* PREGRP5 */
+ {
+ { "divps", XM, EX, XX },
+ { "divss", XM, EX, XX },
+ { "divpd", XM, EX, XX },
+ { "divsd", XM, EX, XX },
+ },
+ /* PREGRP6 */
+ {
+ { "maxps", XM, EX, XX },
+ { "maxss", XM, EX, XX },
+ { "maxpd", XM, EX, XX },
+ { "maxsd", XM, EX, XX },
+ },
+ /* PREGRP7 */
+ {
+ { "minps", XM, EX, XX },
+ { "minss", XM, EX, XX },
+ { "minpd", XM, EX, XX },
+ { "minsd", XM, EX, XX },
+ },
+ /* PREGRP8 */
+ {
+ { "movups", XM, EX, XX },
+ { "movss", XM, EX, XX },
+ { "movupd", XM, EX, XX },
+ { "movsd", XM, EX, XX },
+ },
+ /* PREGRP9 */
+ {
+ { "movups", EX, XM, XX },
+ { "movss", EX, XM, XX },
+ { "movupd", EX, XM, XX },
+ { "movsd", EX, XM, XX },
+ },
+ /* PREGRP10 */
+ {
+ { "mulps", XM, EX, XX },
+ { "mulss", XM, EX, XX },
+ { "mulpd", XM, EX, XX },
+ { "mulsd", XM, EX, XX },
+ },
+ /* PREGRP11 */
+ {
+ { "rcpps", XM, EX, XX },
+ { "rcpss", XM, EX, XX },
+ { "(bad)", XM, EX, XX },
+ { "(bad)", XM, EX, XX },
+ },
+ /* PREGRP12 */
+ {
+ { "rsqrtps", XM, EX, XX },
+ { "rsqrtss", XM, EX, XX },
+ { "(bad)", XM, EX, XX },
+ { "(bad)", XM, EX, XX },
+ },
+ /* PREGRP13 */
+ {
+ { "sqrtps", XM, EX, XX },
+ { "sqrtss", XM, EX, XX },
+ { "sqrtpd", XM, EX, XX },
+ { "sqrtsd", XM, EX, XX },
+ },
+ /* PREGRP14 */
+ {
+ { "subps", XM, EX, XX },
+ { "subss", XM, EX, XX },
+ { "subpd", XM, EX, XX },
+ { "subsd", XM, EX, XX },
+ },
+ /* PREGRP15 */
+ {
+ { "(bad)", XM, EX, XX },
+ { "cvtdq2pd", XM, EX, XX },
+ { "cvttpd2dq", XM, EX, XX },
+ { "cvtpd2dq", XM, EX, XX },
+ },
+ /* PREGRP16 */
+ {
+ { "cvtdq2ps", XM, EX, XX },
+ { "cvttps2dq",XM, EX, XX },
+ { "cvtps2dq",XM, EX, XX },
+ { "(bad)", XM, EX, XX },
+ },
+ /* PREGRP17 */
+ {
+ { "cvtps2pd", XM, EX, XX },
+ { "cvtss2sd", XM, EX, XX },
+ { "cvtpd2ps", XM, EX, XX },
+ { "cvtsd2ss", XM, EX, XX },
+ },
+ /* PREGRP18 */
+ {
+ { "maskmovq", MX, MS, XX },
+ { "(bad)", XM, EX, XX },
+ { "maskmovdqu", XM, EX, XX },
+ { "(bad)", XM, EX, XX },
+ },
+ /* PREGRP19 */
+ {
+ { "movq", MX, EM, XX },
+ { "movdqu", XM, EX, XX },
+ { "movdqa", XM, EX, XX },
+ { "(bad)", XM, EX, XX },
+ },
+ /* PREGRP20 */
+ {
+ { "movq", EM, MX, XX },
+ { "movdqu", EX, XM, XX },
+ { "movdqa", EX, XM, XX },
+ { "(bad)", EX, XM, XX },
+ },
+ /* PREGRP21 */
+ {
+ { "(bad)", EX, XM, XX },
+ { "movq2dq", XM, MS, XX },
+ { "movq", EX, XM, XX },
+ { "movdq2q", MX, XS, XX },
+ },
+ /* PREGRP22 */
+ {
+ { "pshufw", MX, EM, Ib },
+ { "pshufhw", XM, EX, Ib },
+ { "pshufd", XM, EX, Ib },
+ { "pshuflw", XM, EX, Ib },
+ },
+ /* PREGRP23 */
+ {
+ { "movd", Ed, MX, XX },
+ { "movq", XM, EX, XX },
+ { "movd", Ed, XM, XX },
+ { "(bad)", Ed, XM, XX },
+ },
+ /* PREGRP24 */
+ {
+ { "(bad)", MX, EX, XX },
+ { "(bad)", XM, EX, XX },
+ { "punpckhqdq", XM, EX, XX },
+ { "(bad)", XM, EX, XX },
+ },
+ /* PREGRP25 */
+ {
+ { "movntq", Ev, MX, XX },
+ { "(bad)", Ev, XM, XX },
+ { "movntdq", Ev, XM, XX },
+ { "(bad)", Ev, XM, XX },
+ },
+ /* PREGRP26 */
+ {
+ { "(bad)", MX, EX, XX },
+ { "(bad)", XM, EX, XX },
+ { "punpcklqdq", XM, EX, XX },
+ { "(bad)", XM, EX, XX },
+ },
+};
+
+static const struct dis386 x86_64_table[][2] = {
+ {
+ { "arpl", Ew, Gw, XX },
+ { "movs{||lq|xd}", Gv, Ed, XX },
+ },
+};
+
+#define INTERNAL_DISASSEMBLER_ERROR _("<internal disassembler error>")
+
+static void
+ckprefix ()
+{
+ int newrex;
+ rex = 0;
+ prefixes = 0;
+ used_prefixes = 0;
+ rex_used = 0;
+ while (1)
+ {
+ FETCH_DATA (the_info, codep + 1);
+ newrex = 0;
+ switch (*codep)
+ {
+ /* REX prefixes family. */
+ case 0x40:
+ case 0x41:
+ case 0x42:
+ case 0x43:
+ case 0x44:
+ case 0x45:
+ case 0x46:
+ case 0x47:
+ case 0x48:
+ case 0x49:
+ case 0x4a:
+ case 0x4b:
+ case 0x4c:
+ case 0x4d:
+ case 0x4e:
+ case 0x4f:
+ if (mode_64bit)
+ newrex = *codep;
+ else
+ return;
+ break;
+ case 0xf3:
+ prefixes |= PREFIX_REPZ;
+ break;
+ case 0xf2:
+ prefixes |= PREFIX_REPNZ;
+ break;
+ case 0xf0:
+ prefixes |= PREFIX_LOCK;
+ break;
+ case 0x2e:
+ prefixes |= PREFIX_CS;
+ break;
+ case 0x36:
+ prefixes |= PREFIX_SS;
+ break;
+ case 0x3e:
+ prefixes |= PREFIX_DS;
+ break;
+ case 0x26:
+ prefixes |= PREFIX_ES;
+ break;
+ case 0x64:
+ prefixes |= PREFIX_FS;
+ break;
+ case 0x65:
+ prefixes |= PREFIX_GS;
+ break;
+ case 0x66:
+ prefixes |= PREFIX_DATA;
+ break;
+ case 0x67:
+ prefixes |= PREFIX_ADDR;
+ break;
+ case FWAIT_OPCODE:
+ /* fwait is really an instruction. If there are prefixes
+ before the fwait, they belong to the fwait, *not* to the
+ following instruction. */
+ if (prefixes)
+ {
+ prefixes |= PREFIX_FWAIT;
+ codep++;
+ return;
+ }
+ prefixes = PREFIX_FWAIT;
+ break;
+ default:
+ return;
+ }
+ /* Rex is ignored when followed by another prefix. */
+ if (rex)
+ {
+ oappend (prefix_name (rex, 0));
+ oappend (" ");
+ }
+ rex = newrex;
+ codep++;
+ }
+}
+
+/* Return the name of the prefix byte PREF, or NULL if PREF is not a
+ prefix byte. */
+
+static const char *
+prefix_name (pref, sizeflag)
+ int pref;
+ int sizeflag;
+{
+ switch (pref)
+ {
+ /* REX prefixes family. */
+ case 0x40:
+ return "rex";
+ case 0x41:
+ return "rexZ";
+ case 0x42:
+ return "rexY";
+ case 0x43:
+ return "rexYZ";
+ case 0x44:
+ return "rexX";
+ case 0x45:
+ return "rexXZ";
+ case 0x46:
+ return "rexXY";
+ case 0x47:
+ return "rexXYZ";
+ case 0x48:
+ return "rex64";
+ case 0x49:
+ return "rex64Z";
+ case 0x4a:
+ return "rex64Y";
+ case 0x4b:
+ return "rex64YZ";
+ case 0x4c:
+ return "rex64X";
+ case 0x4d:
+ return "rex64XZ";
+ case 0x4e:
+ return "rex64XY";
+ case 0x4f:
+ return "rex64XYZ";
+ case 0xf3:
+ return "repz";
+ case 0xf2:
+ return "repnz";
+ case 0xf0:
+ return "lock";
+ case 0x2e:
+ return "cs";
+ case 0x36:
+ return "ss";
+ case 0x3e:
+ return "ds";
+ case 0x26:
+ return "es";
+ case 0x64:
+ return "fs";
+ case 0x65:
+ return "gs";
+ case 0x66:
+ return (sizeflag & DFLAG) ? "data16" : "data32";
+ case 0x67:
+ if (mode_64bit)
+ return (sizeflag & AFLAG) ? "addr32" : "addr64";
+ else
+ return ((sizeflag & AFLAG) && !mode_64bit) ? "addr16" : "addr32";
+ case FWAIT_OPCODE:
+ return "fwait";
+ default:
+ return NULL;
+ }
+}
+
+static char op1out[100], op2out[100], op3out[100];
+static int op_ad, op_index[3];
+static bfd_vma op_address[3];
+static bfd_vma op_riprel[3];
+static bfd_vma start_pc;
+\f
+/*
+ * On the 386's of 1988, the maximum length of an instruction is 15 bytes.
+ * (see topic "Redundant prefixes" in the "Differences from 8086"
+ * section of the "Virtual 8086 Mode" chapter.)
+ * 'pc' should be the address of this instruction, it will
+ * be used to print the target address if this is a relative jump or call
+ * The function returns the length of this instruction in bytes.
+ */
+
+static char intel_syntax;
+static char open_char;
+static char close_char;
+static char separator_char;
+static char scale_char;
+
+/* Here for backwards compatibility. When gdb stops using
+ print_insn_i386_att and print_insn_i386_intel these functions can
+ disappear, and print_insn_i386 be merged into print_insn. */
+int
+print_insn_i386_att (pc, info)
+ bfd_vma pc;
+ disassemble_info *info;
+{
+ intel_syntax = 0;
+
+ return print_insn (pc, info);
+}
+
+int
+print_insn_i386_intel (pc, info)
+ bfd_vma pc;
+ disassemble_info *info;
+{
+ intel_syntax = 1;
+
+ return print_insn (pc, info);
+}
+
+int
+print_insn_i386 (pc, info)
+ bfd_vma pc;
+ disassemble_info *info;
+{
+ intel_syntax = -1;
+
+ return print_insn (pc, info);
+}
+
+static int
+print_insn (pc, info)
+ bfd_vma pc;
+ disassemble_info *info;
+{
+ const struct dis386 *dp;
+ int i;
+ int two_source_ops;
+ char *first, *second, *third;
+ int needcomma;
+ unsigned char uses_SSE_prefix;
+ int sizeflag;
+ /*const char *p;*/
+ struct dis_private priv;
+
+ mode_64bit = (info->mach == bfd_mach_x86_64_intel_syntax
+ || info->mach == bfd_mach_x86_64);
+
+ if (intel_syntax == -1)
+ intel_syntax = (info->mach == bfd_mach_i386_i386_intel_syntax
+ || info->mach == bfd_mach_x86_64_intel_syntax);
+
+ if (info->mach == bfd_mach_i386_i386
+ || info->mach == bfd_mach_x86_64
+ || info->mach == bfd_mach_i386_i386_intel_syntax
+ || info->mach == bfd_mach_x86_64_intel_syntax)
+ priv.orig_sizeflag = AFLAG | DFLAG;
+ else if (info->mach == bfd_mach_i386_i8086)
+ priv.orig_sizeflag = 0;
+ else
+ abort ();
+
+#if 0
+ for (p = info->disassembler_options; p != NULL; )
+ {
+ if (strncmp (p, "x86-64", 6) == 0)
+ {
+ mode_64bit = 1;
+ priv.orig_sizeflag = AFLAG | DFLAG;
+ }
+ else if (strncmp (p, "i386", 4) == 0)
+ {
+ mode_64bit = 0;
+ priv.orig_sizeflag = AFLAG | DFLAG;
+ }
+ else if (strncmp (p, "i8086", 5) == 0)
+ {
+ mode_64bit = 0;
+ priv.orig_sizeflag = 0;
+ }
+ else if (strncmp (p, "intel", 5) == 0)
+ {
+ intel_syntax = 1;
+ }
+ else if (strncmp (p, "att", 3) == 0)
+ {
+ intel_syntax = 0;
+ }
+ else if (strncmp (p, "addr", 4) == 0)
+ {
+ if (p[4] == '1' && p[5] == '6')
+ priv.orig_sizeflag &= ~AFLAG;
+ else if (p[4] == '3' && p[5] == '2')
+ priv.orig_sizeflag |= AFLAG;
+ }
+ else if (strncmp (p, "data", 4) == 0)
+ {
+ if (p[4] == '1' && p[5] == '6')
+ priv.orig_sizeflag &= ~DFLAG;
+ else if (p[4] == '3' && p[5] == '2')
+ priv.orig_sizeflag |= DFLAG;
+ }
+ else if (strncmp (p, "suffix", 6) == 0)
+ priv.orig_sizeflag |= SUFFIX_ALWAYS;
+
+ p = strchr (p, ',');
+ if (p != NULL)
+ p++;
+ }
+#else
+ mode_64bit = 0;
+ priv.orig_sizeflag = AFLAG | DFLAG;
+ /*intel_syntax = 0;*/
+#endif
+
+ if (intel_syntax)
+ {
+ names64 = intel_names64;
+ names32 = intel_names32;
+ names16 = intel_names16;
+ names8 = intel_names8;
+ names8rex = intel_names8rex;
+ names_seg = intel_names_seg;
+ index16 = intel_index16;
+ open_char = '[';
+ close_char = ']';
+ separator_char = '+';
+ scale_char = '*';
+ }
+ else
+ {
+ names64 = att_names64;
+ names32 = att_names32;
+ names16 = att_names16;
+ names8 = att_names8;
+ names8rex = att_names8rex;
+ names_seg = att_names_seg;
+ index16 = att_index16;
+ open_char = '(';
+ close_char = ')';
+ separator_char = ',';
+ scale_char = ',';
+ }
+
+ /* The output looks better if we put 7 bytes on a line, since that
+ puts most long word instructions on a single line. */
+ info->bytes_per_line = 7;
+
+ info->private_data = (PTR) &priv;
+ priv.max_fetched = priv.the_buffer;
+ priv.insn_start = pc;
+
+ obuf[0] = 0;
+ op1out[0] = 0;
+ op2out[0] = 0;
+ op3out[0] = 0;
+
+ op_index[0] = op_index[1] = op_index[2] = -1;
+
+ the_info = info;
+ start_pc = pc;
+ start_codep = priv.the_buffer;
+ codep = priv.the_buffer;
+
+ if (_setjmp (priv.bailout) != 0)
+ {
+ const char *name;
+
+ /* Getting here means we tried for data but didn't get it. That
+ means we have an incomplete instruction of some sort. Just
+ print the first byte as a prefix or a .byte pseudo-op. */
+ if (codep > priv.the_buffer)
+ {
+ name = prefix_name (priv.the_buffer[0], priv.orig_sizeflag);
+ if (name != NULL)
+ (*info->fprintf_func) (info->stream, "%s", name);
+ else
+ {
+ /* Just print the first byte as a .byte instruction. */
+ (*info->fprintf_func) (info->stream, ".byte 0x%x",
+ (unsigned int) priv.the_buffer[0]);
+ }
+
+ return 1;
+ }
+
+ return -1;
+ }
+
+ obufp = obuf;
+ ckprefix ();
+
+ insn_codep = codep;
+ sizeflag = priv.orig_sizeflag;
+
+ FETCH_DATA (info, codep + 1);
+ two_source_ops = (*codep == 0x62) || (*codep == 0xc8);
+
+ if ((prefixes & PREFIX_FWAIT)
+ && ((*codep < 0xd8) || (*codep > 0xdf)))
+ {
+ const char *name;
+
+ /* fwait not followed by floating point instruction. Print the
+ first prefix, which is probably fwait itself. */
+ name = prefix_name (priv.the_buffer[0], priv.orig_sizeflag);
+ if (name == NULL)
+ name = INTERNAL_DISASSEMBLER_ERROR;
+ (*info->fprintf_func) (info->stream, "%s", name);
+ return 1;
+ }
+
+ if (*codep == 0x0f)
+ {
+ FETCH_DATA (info, codep + 2);
+ dp = &dis386_twobyte[*++codep];
+ need_modrm = twobyte_has_modrm[*codep];
+ uses_SSE_prefix = twobyte_uses_SSE_prefix[*codep];
+ }
+ else
+ {
+ dp = &dis386[*codep];
+ need_modrm = onebyte_has_modrm[*codep];
+ uses_SSE_prefix = 0;
+ }
+ codep++;
+
+ if (!uses_SSE_prefix && (prefixes & PREFIX_REPZ))
+ {
+ oappend ("repz ");
+ used_prefixes |= PREFIX_REPZ;
+ }
+ if (!uses_SSE_prefix && (prefixes & PREFIX_REPNZ))
+ {
+ oappend ("repnz ");
+ used_prefixes |= PREFIX_REPNZ;
+ }
+ if (prefixes & PREFIX_LOCK)
+ {
+ oappend ("lock ");
+ used_prefixes |= PREFIX_LOCK;
+ }
+
+ if (prefixes & PREFIX_ADDR)
+ {
+ sizeflag ^= AFLAG;
+ if (dp->bytemode3 != loop_jcxz_mode || intel_syntax)
+ {
+ if ((sizeflag & AFLAG) || mode_64bit)
+ oappend ("addr32 ");
+ else
+ oappend ("addr16 ");
+ used_prefixes |= PREFIX_ADDR;
+ }
+ }
+
+ if (!uses_SSE_prefix && (prefixes & PREFIX_DATA))
+ {
+ sizeflag ^= DFLAG;
+ if (dp->bytemode3 == cond_jump_mode
+ && dp->bytemode1 == v_mode
+ && !intel_syntax)
+ {
+ if (sizeflag & DFLAG)
+ oappend ("data32 ");
+ else
+ oappend ("data16 ");
+ used_prefixes |= PREFIX_DATA;
+ }
+ }
+
+ if (need_modrm)
+ {
+ FETCH_DATA (info, codep + 1);
+ mod = (*codep >> 6) & 3;
+ reg = (*codep >> 3) & 7;
+ rm = *codep & 7;
+ }
+
+ if (dp->name == NULL && dp->bytemode1 == FLOATCODE)
+ {
+ dofloat (sizeflag);
+ }
+ else
+ {
+ int index;
+ if (dp->name == NULL)
+ {
+ switch (dp->bytemode1)
+ {
+ case USE_GROUPS:
+ dp = &grps[dp->bytemode2][reg];
+ break;
+
+ case USE_PREFIX_USER_TABLE:
+ index = 0;
+ used_prefixes |= (prefixes & PREFIX_REPZ);
+ if (prefixes & PREFIX_REPZ)
+ index = 1;
+ else
+ {
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ if (prefixes & PREFIX_DATA)
+ index = 2;
+ else
+ {
+ used_prefixes |= (prefixes & PREFIX_REPNZ);
+ if (prefixes & PREFIX_REPNZ)
+ index = 3;
+ }
+ }
+ dp = &prefix_user_table[dp->bytemode2][index];
+ break;
+
+ case X86_64_SPECIAL:
+ dp = &x86_64_table[dp->bytemode2][mode_64bit];
+ break;
+
+ default:
+ oappend (INTERNAL_DISASSEMBLER_ERROR);
+ break;
+ }
+ }
+
+ if (putop (dp->name, sizeflag) == 0)
+ {
+ obufp = op1out;
+ op_ad = 2;
+ if (dp->op1)
+ (*dp->op1) (dp->bytemode1, sizeflag);
+
+ obufp = op2out;
+ op_ad = 1;
+ if (dp->op2)
+ (*dp->op2) (dp->bytemode2, sizeflag);
+
+ obufp = op3out;
+ op_ad = 0;
+ if (dp->op3)
+ (*dp->op3) (dp->bytemode3, sizeflag);
+ }
+ }
+
+ /* See if any prefixes were not used. If so, print the first one
+ separately. If we don't do this, we'll wind up printing an
+ instruction stream which does not precisely correspond to the
+ bytes we are disassembling. */
+ if ((prefixes & ~used_prefixes) != 0)
+ {
+ const char *name;
+
+ name = prefix_name (priv.the_buffer[0], priv.orig_sizeflag);
+ if (name == NULL)
+ name = INTERNAL_DISASSEMBLER_ERROR;
+ (*info->fprintf_func) (info->stream, "%s", name);
+ return 1;
+ }
+ if (rex & ~rex_used)
+ {
+ const char *name;
+ name = prefix_name (rex | 0x40, priv.orig_sizeflag);
+ if (name == NULL)
+ name = INTERNAL_DISASSEMBLER_ERROR;
+ (*info->fprintf_func) (info->stream, "%s ", name);
+ }
+
+ obufp = obuf + strlen (obuf);
+ for (i = strlen (obuf); i < 6; i++)
+ oappend (" ");
+ oappend (" ");
+ (*info->fprintf_func) (info->stream, "%s", obuf);
+
+ /* The enter and bound instructions are printed with operands in the same
+ order as the intel book; everything else is printed in reverse order. */
+ if (intel_syntax || two_source_ops)
+ {
+ first = op1out;
+ second = op2out;
+ third = op3out;
+ op_ad = op_index[0];
+ op_index[0] = op_index[2];
+ op_index[2] = op_ad;
+ }
+ else
+ {
+ first = op3out;
+ second = op2out;
+ third = op1out;
+ }
+ needcomma = 0;
+ if (*first)
+ {
+ if (op_index[0] != -1 && !op_riprel[0])
+ (*info->print_address_func) ((bfd_vma) op_address[op_index[0]], info);
+ else
+ (*info->fprintf_func) (info->stream, "%s", first);
+ needcomma = 1;
+ }
+ if (*second)
+ {
+ if (needcomma)
+ (*info->fprintf_func) (info->stream, ",");
+ if (op_index[1] != -1 && !op_riprel[1])
+ (*info->print_address_func) ((bfd_vma) op_address[op_index[1]], info);
+ else
+ (*info->fprintf_func) (info->stream, "%s", second);
+ needcomma = 1;
+ }
+ if (*third)
+ {
+ if (needcomma)
+ (*info->fprintf_func) (info->stream, ",");
+ if (op_index[2] != -1 && !op_riprel[2])
+ (*info->print_address_func) ((bfd_vma) op_address[op_index[2]], info);
+ else
+ (*info->fprintf_func) (info->stream, "%s", third);
+ }
+ for (i = 0; i < 3; i++)
+ if (op_index[i] != -1 && op_riprel[i])
+ {
+ (*info->fprintf_func) (info->stream, " # ");
+ (*info->print_address_func) ((bfd_vma) (start_pc + codep - start_codep
+ + op_address[op_index[i]]), info);
+ }
+ return codep - priv.the_buffer;
+}
+
+static const char *float_mem[] = {
+ /* d8 */
+ "fadd{s||s|}",
+ "fmul{s||s|}",
+ "fcom{s||s|}",
+ "fcomp{s||s|}",
+ "fsub{s||s|}",
+ "fsubr{s||s|}",
+ "fdiv{s||s|}",
+ "fdivr{s||s|}",
+ /* d9 */
+ "fld{s||s|}",
+ "(bad)",
+ "fst{s||s|}",
+ "fstp{s||s|}",
+ "fldenv",
+ "fldcw",
+ "fNstenv",
+ "fNstcw",
+ /* da */
+ "fiadd{l||l|}",
+ "fimul{l||l|}",
+ "ficom{l||l|}",
+ "ficomp{l||l|}",
+ "fisub{l||l|}",
+ "fisubr{l||l|}",
+ "fidiv{l||l|}",
+ "fidivr{l||l|}",
+ /* db */
+ "fild{l||l|}",
+ "(bad)",
+ "fist{l||l|}",
+ "fistp{l||l|}",
+ "(bad)",
+ "fld{t||t|}",
+ "(bad)",
+ "fstp{t||t|}",
+ /* dc */
+ "fadd{l||l|}",
+ "fmul{l||l|}",
+ "fcom{l||l|}",
+ "fcomp{l||l|}",
+ "fsub{l||l|}",
+ "fsubr{l||l|}",
+ "fdiv{l||l|}",
+ "fdivr{l||l|}",
+ /* dd */
+ "fld{l||l|}",
+ "(bad)",
+ "fst{l||l|}",
+ "fstp{l||l|}",
+ "frstor",
+ "(bad)",
+ "fNsave",
+ "fNstsw",
+ /* de */
+ "fiadd",
+ "fimul",
+ "ficom",
+ "ficomp",
+ "fisub",
+ "fisubr",
+ "fidiv",
+ "fidivr",
+ /* df */
+ "fild",
+ "(bad)",
+ "fist",
+ "fistp",
+ "fbld",
+ "fild{ll||ll|}",
+ "fbstp",
+ "fistpll",
+};
+
+#define ST OP_ST, 0
+#define STi OP_STi, 0
+
+#define FGRPd9_2 NULL, NULL, 0, NULL, 0, NULL, 0
+#define FGRPd9_4 NULL, NULL, 1, NULL, 0, NULL, 0
+#define FGRPd9_5 NULL, NULL, 2, NULL, 0, NULL, 0
+#define FGRPd9_6 NULL, NULL, 3, NULL, 0, NULL, 0
+#define FGRPd9_7 NULL, NULL, 4, NULL, 0, NULL, 0
+#define FGRPda_5 NULL, NULL, 5, NULL, 0, NULL, 0
+#define FGRPdb_4 NULL, NULL, 6, NULL, 0, NULL, 0
+#define FGRPde_3 NULL, NULL, 7, NULL, 0, NULL, 0
+#define FGRPdf_4 NULL, NULL, 8, NULL, 0, NULL, 0
+
+static const struct dis386 float_reg[][8] = {
+ /* d8 */
+ {
+ { "fadd", ST, STi, XX },
+ { "fmul", ST, STi, XX },
+ { "fcom", STi, XX, XX },
+ { "fcomp", STi, XX, XX },
+ { "fsub", ST, STi, XX },
+ { "fsubr", ST, STi, XX },
+ { "fdiv", ST, STi, XX },
+ { "fdivr", ST, STi, XX },
+ },
+ /* d9 */
+ {
+ { "fld", STi, XX, XX },
+ { "fxch", STi, XX, XX },
+ { FGRPd9_2 },
+ { "(bad)", XX, XX, XX },
+ { FGRPd9_4 },
+ { FGRPd9_5 },
+ { FGRPd9_6 },
+ { FGRPd9_7 },
+ },
+ /* da */
+ {
+ { "fcmovb", ST, STi, XX },
+ { "fcmove", ST, STi, XX },
+ { "fcmovbe",ST, STi, XX },
+ { "fcmovu", ST, STi, XX },
+ { "(bad)", XX, XX, XX },
+ { FGRPda_5 },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ },
+ /* db */
+ {
+ { "fcmovnb",ST, STi, XX },
+ { "fcmovne",ST, STi, XX },
+ { "fcmovnbe",ST, STi, XX },
+ { "fcmovnu",ST, STi, XX },
+ { FGRPdb_4 },
+ { "fucomi", ST, STi, XX },
+ { "fcomi", ST, STi, XX },
+ { "(bad)", XX, XX, XX },
+ },
+ /* dc */
+ {
+ { "fadd", STi, ST, XX },
+ { "fmul", STi, ST, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+#if UNIXWARE_COMPAT
+ { "fsub", STi, ST, XX },
+ { "fsubr", STi, ST, XX },
+ { "fdiv", STi, ST, XX },
+ { "fdivr", STi, ST, XX },
+#else
+ { "fsubr", STi, ST, XX },
+ { "fsub", STi, ST, XX },
+ { "fdivr", STi, ST, XX },
+ { "fdiv", STi, ST, XX },
+#endif
+ },
+ /* dd */
+ {
+ { "ffree", STi, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "fst", STi, XX, XX },
+ { "fstp", STi, XX, XX },
+ { "fucom", STi, XX, XX },
+ { "fucomp", STi, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ },
+ /* de */
+ {
+ { "faddp", STi, ST, XX },
+ { "fmulp", STi, ST, XX },
+ { "(bad)", XX, XX, XX },
+ { FGRPde_3 },
+#if UNIXWARE_COMPAT
+ { "fsubp", STi, ST, XX },
+ { "fsubrp", STi, ST, XX },
+ { "fdivp", STi, ST, XX },
+ { "fdivrp", STi, ST, XX },
+#else
+ { "fsubrp", STi, ST, XX },
+ { "fsubp", STi, ST, XX },
+ { "fdivrp", STi, ST, XX },
+ { "fdivp", STi, ST, XX },
+#endif
+ },
+ /* df */
+ {
+ { "ffreep", STi, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { "(bad)", XX, XX, XX },
+ { FGRPdf_4 },
+ { "fucomip",ST, STi, XX },
+ { "fcomip", ST, STi, XX },
+ { "(bad)", XX, XX, XX },
+ },
+};
+
+static char *fgrps[][8] = {
+ /* d9_2 0 */
+ {
+ "fnop","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
+ },
+
+ /* d9_4 1 */
+ {
+ "fchs","fabs","(bad)","(bad)","ftst","fxam","(bad)","(bad)",
+ },
+
+ /* d9_5 2 */
+ {
+ "fld1","fldl2t","fldl2e","fldpi","fldlg2","fldln2","fldz","(bad)",
+ },
+
+ /* d9_6 3 */
+ {
+ "f2xm1","fyl2x","fptan","fpatan","fxtract","fprem1","fdecstp","fincstp",
+ },
+
+ /* d9_7 4 */
+ {
+ "fprem","fyl2xp1","fsqrt","fsincos","frndint","fscale","fsin","fcos",
+ },
+
+ /* da_5 5 */
+ {
+ "(bad)","fucompp","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
+ },
+
+ /* db_4 6 */
+ {
+ "feni(287 only)","fdisi(287 only)","fNclex","fNinit",
+ "fNsetpm(287 only)","(bad)","(bad)","(bad)",
+ },
+
+ /* de_3 7 */
+ {
+ "(bad)","fcompp","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
+ },
+
+ /* df_4 8 */
+ {
+ "fNstsw","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)","(bad)",
+ },
+};
+
+static void
+dofloat (sizeflag)
+ int sizeflag;
+{
+ const struct dis386 *dp;
+ unsigned char floatop;
+
+ floatop = codep[-1];
+
+ if (mod != 3)
+ {
+ putop (float_mem[(floatop - 0xd8) * 8 + reg], sizeflag);
+ obufp = op1out;
+ if (floatop == 0xdb)
+ OP_E (x_mode, sizeflag);
+ else if (floatop == 0xdd)
+ OP_E (d_mode, sizeflag);
+ else
+ OP_E (v_mode, sizeflag);
+ return;
+ }
+ /* Skip mod/rm byte. */
+ MODRM_CHECK;
+ codep++;
+
+ dp = &float_reg[floatop - 0xd8][reg];
+ if (dp->name == NULL)
+ {
+ putop (fgrps[dp->bytemode1][rm], sizeflag);
+
+ /* Instruction fnstsw is only one with strange arg. */
+ if (floatop == 0xdf && codep[-1] == 0xe0)
+ strcpy (op1out, names16[0]);
+ }
+ else
+ {
+ putop (dp->name, sizeflag);
+
+ obufp = op1out;
+ if (dp->op1)
+ (*dp->op1) (dp->bytemode1, sizeflag);
+ obufp = op2out;
+ if (dp->op2)
+ (*dp->op2) (dp->bytemode2, sizeflag);
+ }
+}
+
+static void
+OP_ST (bytemode, sizeflag)
+ int bytemode ATTRIBUTE_UNUSED;
+ int sizeflag ATTRIBUTE_UNUSED;
+{
+ oappend ("%st");
+}
+
+static void
+OP_STi (bytemode, sizeflag)
+ int bytemode ATTRIBUTE_UNUSED;
+ int sizeflag ATTRIBUTE_UNUSED;
+{
+ sprintf (scratchbuf, "%%st(%d)", rm);
+ oappend (scratchbuf + intel_syntax);
+}
+
+/* Capital letters in template are macros. */
+static int
+putop (template, sizeflag)
+ const char *template;
+ int sizeflag;
+{
+ const char *p;
+ int alt;
+
+ for (p = template; *p; p++)
+ {
+ switch (*p)
+ {
+ default:
+ *obufp++ = *p;
+ break;
+ case '{':
+ alt = 0;
+ if (intel_syntax)
+ alt += 1;
+ if (mode_64bit)
+ alt += 2;
+ while (alt != 0)
+ {
+ while (*++p != '|')
+ {
+ if (*p == '}')
+ {
+ /* Alternative not valid. */
+ strcpy (obuf, "(bad)");
+ obufp = obuf + 5;
+ return 1;
+ }
+ else if (*p == '\0')
+ abort ();
+ }
+ alt--;
+ }
+ break;
+ case '|':
+ while (*++p != '}')
+ {
+ if (*p == '\0')
+ abort ();
+ }
+ break;
+ case '}':
+ break;
+ case 'A':
+ if (intel_syntax)
+ break;
+ if (mod != 3 || (sizeflag & SUFFIX_ALWAYS))
+ *obufp++ = 'b';
+ break;
+ case 'B':
+ if (intel_syntax)
+ break;
+ if (sizeflag & SUFFIX_ALWAYS)
+ *obufp++ = 'b';
+ break;
+ case 'E': /* For jcxz/jecxz */
+ if (mode_64bit)
+ {
+ if (sizeflag & AFLAG)
+ *obufp++ = 'r';
+ else
+ *obufp++ = 'e';
+ }
+ else
+ if (sizeflag & AFLAG)
+ *obufp++ = 'e';
+ used_prefixes |= (prefixes & PREFIX_ADDR);
+ break;
+ case 'F':
+ if (intel_syntax)
+ break;
+ if ((prefixes & PREFIX_ADDR) || (sizeflag & SUFFIX_ALWAYS))
+ {
+ if (sizeflag & AFLAG)
+ *obufp++ = mode_64bit ? 'q' : 'l';
+ else
+ *obufp++ = mode_64bit ? 'l' : 'w';
+ used_prefixes |= (prefixes & PREFIX_ADDR);
+ }
+ break;
+ case 'H':
+ if (intel_syntax)
+ break;
+ if ((prefixes & (PREFIX_CS | PREFIX_DS)) == PREFIX_CS
+ || (prefixes & (PREFIX_CS | PREFIX_DS)) == PREFIX_DS)
+ {
+ used_prefixes |= prefixes & (PREFIX_CS | PREFIX_DS);
+ *obufp++ = ',';
+ *obufp++ = 'p';
+ if (prefixes & PREFIX_DS)
+ *obufp++ = 't';
+ else
+ *obufp++ = 'n';
+ }
+ break;
+ case 'L':
+ if (intel_syntax)
+ break;
+ if (sizeflag & SUFFIX_ALWAYS)
+ *obufp++ = 'l';
+ break;
+ case 'N':
+ if ((prefixes & PREFIX_FWAIT) == 0)
+ *obufp++ = 'n';
+ else
+ used_prefixes |= PREFIX_FWAIT;
+ break;
+ case 'O':
+ USED_REX (REX_MODE64);
+ if (rex & REX_MODE64)
+ *obufp++ = 'o';
+ else
+ *obufp++ = 'd';
+ break;
+ case 'T':
+ if (intel_syntax)
+ break;
+ if (mode_64bit)
+ {
+ *obufp++ = 'q';
+ break;
+ }
+ /* Fall through. */
+ case 'P':
+ if (intel_syntax)
+ break;
+ if ((prefixes & PREFIX_DATA)
+ || (rex & REX_MODE64)
+ || (sizeflag & SUFFIX_ALWAYS))
+ {
+ USED_REX (REX_MODE64);
+ if (rex & REX_MODE64)
+ *obufp++ = 'q';
+ else
+ {
+ if (sizeflag & DFLAG)
+ *obufp++ = 'l';
+ else
+ *obufp++ = 'w';
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ }
+ }
+ break;
+ case 'U':
+ if (intel_syntax)
+ break;
+ if (mode_64bit)
+ {
+ *obufp++ = 'q';
+ break;
+ }
+ /* Fall through. */
+ case 'Q':
+ if (intel_syntax)
+ break;
+ USED_REX (REX_MODE64);
+ if (mod != 3 || (sizeflag & SUFFIX_ALWAYS))
+ {
+ if (rex & REX_MODE64)
+ *obufp++ = 'q';
+ else
+ {
+ if (sizeflag & DFLAG)
+ *obufp++ = 'l';
+ else
+ *obufp++ = 'w';
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ }
+ }
+ break;
+ case 'R':
+ USED_REX (REX_MODE64);
+ if (intel_syntax)
+ {
+ if (rex & REX_MODE64)
+ {
+ *obufp++ = 'q';
+ *obufp++ = 't';
+ }
+ else if (sizeflag & DFLAG)
+ {
+ *obufp++ = 'd';
+ *obufp++ = 'q';
+ }
+ else
+ {
+ *obufp++ = 'w';
+ *obufp++ = 'd';
+ }
+ }
+ else
+ {
+ if (rex & REX_MODE64)
+ *obufp++ = 'q';
+ else if (sizeflag & DFLAG)
+ *obufp++ = 'l';
+ else
+ *obufp++ = 'w';
+ }
+ if (!(rex & REX_MODE64))
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ break;
+ case 'S':
+ if (intel_syntax)
+ break;
+ if (sizeflag & SUFFIX_ALWAYS)
+ {
+ if (rex & REX_MODE64)
+ *obufp++ = 'q';
+ else
+ {
+ if (sizeflag & DFLAG)
+ *obufp++ = 'l';
+ else
+ *obufp++ = 'w';
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ }
+ }
+ break;
+ case 'X':
+ if (prefixes & PREFIX_DATA)
+ *obufp++ = 'd';
+ else
+ *obufp++ = 's';
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ break;
+ case 'Y':
+ if (intel_syntax)
+ break;
+ if (rex & REX_MODE64)
+ {
+ USED_REX (REX_MODE64);
+ *obufp++ = 'q';
+ }
+ break;
+ /* implicit operand size 'l' for i386 or 'q' for x86-64 */
+ case 'W':
+ /* operand size flag for cwtl, cbtw */
+ USED_REX (0);
+ if (rex)
+ *obufp++ = 'l';
+ else if (sizeflag & DFLAG)
+ *obufp++ = 'w';
+ else
+ *obufp++ = 'b';
+ if (intel_syntax)
+ {
+ if (rex)
+ {
+ *obufp++ = 'q';
+ *obufp++ = 'e';
+ }
+ if (sizeflag & DFLAG)
+ {
+ *obufp++ = 'd';
+ *obufp++ = 'e';
+ }
+ else
+ {
+ *obufp++ = 'w';
+ }
+ }
+ if (!rex)
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ break;
+ }
+ }
+ *obufp = 0;
+ return 0;
+}
+
+static void
+oappend (s)
+ const char *s;
+{
+ strcpy (obufp, s);
+ obufp += strlen (s);
+}
+
+static void
+append_seg ()
+{
+ if (prefixes & PREFIX_CS)
+ {
+ used_prefixes |= PREFIX_CS;
+ oappend ("%cs:" + intel_syntax);
+ }
+ if (prefixes & PREFIX_DS)
+ {
+ used_prefixes |= PREFIX_DS;
+ oappend ("%ds:" + intel_syntax);
+ }
+ if (prefixes & PREFIX_SS)
+ {
+ used_prefixes |= PREFIX_SS;
+ oappend ("%ss:" + intel_syntax);
+ }
+ if (prefixes & PREFIX_ES)
+ {
+ used_prefixes |= PREFIX_ES;
+ oappend ("%es:" + intel_syntax);
+ }
+ if (prefixes & PREFIX_FS)
+ {
+ used_prefixes |= PREFIX_FS;
+ oappend ("%fs:" + intel_syntax);
+ }
+ if (prefixes & PREFIX_GS)
+ {
+ used_prefixes |= PREFIX_GS;
+ oappend ("%gs:" + intel_syntax);
+ }
+}
+
+static void
+OP_indirE (bytemode, sizeflag)
+ int bytemode;
+ int sizeflag;
+{
+ if (!intel_syntax)
+ oappend ("*");
+ OP_E (bytemode, sizeflag);
+}
+
+static void
+print_operand_value (buf, hex, disp)
+ char *buf;
+ int hex;
+ bfd_vma disp;
+{
+ if (mode_64bit)
+ {
+ if (hex)
+ {
+ char tmp[30];
+ int i;
+ buf[0] = '0';
+ buf[1] = 'x';
+ sprintf_vma (tmp, disp);
+ for (i = 0; tmp[i] == '0' && tmp[i + 1]; i++);
+ strcpy (buf + 2, tmp + i);
+ }
+ else
+ {
+ bfd_signed_vma v = disp;
+ char tmp[30];
+ int i;
+ if (v < 0)
+ {
+ *(buf++) = '-';
+ v = -disp;
+ /* Check for possible overflow on 0x8000000000000000. */
+ if (v < 0)
+ {
+ strcpy (buf, "9223372036854775808");
+ return;
+ }
+ }
+ if (!v)
+ {
+ strcpy (buf, "0");
+ return;
+ }
+
+ i = 0;
+ tmp[29] = 0;
+ while (v)
+ {
+ tmp[28 - i] = (v % 10) + '0';
+ v /= 10;
+ i++;
+ }
+ strcpy (buf, tmp + 29 - i);
+ }
+ }
+ else
+ {
+ if (hex)
+ sprintf (buf, "0x%x", (unsigned int) disp);
+ else
+ sprintf (buf, "%d", (int) disp);
+ }
+}
+
+static void
+OP_E (bytemode, sizeflag)
+ int bytemode;
+ int sizeflag;
+{
+ bfd_vma disp;
+ int add = 0;
+ int riprel = 0;
+ USED_REX (REX_EXTZ);
+ if (rex & REX_EXTZ)
+ add += 8;
+
+ /* Skip mod/rm byte. */
+ MODRM_CHECK;
+ codep++;
+
+ if (mod == 3)
+ {
+ switch (bytemode)
+ {
+ case b_mode:
+ USED_REX (0);
+ if (rex)
+ oappend (names8rex[rm + add]);
+ else
+ oappend (names8[rm + add]);
+ break;
+ case w_mode:
+ oappend (names16[rm + add]);
+ break;
+ case d_mode:
+ oappend (names32[rm + add]);
+ break;
+ case q_mode:
+ oappend (names64[rm + add]);
+ break;
+ case m_mode:
+ if (mode_64bit)
+ oappend (names64[rm + add]);
+ else
+ oappend (names32[rm + add]);
+ break;
+ case v_mode:
+ USED_REX (REX_MODE64);
+ if (rex & REX_MODE64)
+ oappend (names64[rm + add]);
+ else if (sizeflag & DFLAG)
+ oappend (names32[rm + add]);
+ else
+ oappend (names16[rm + add]);
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ break;
+ case 0:
+ if (!(codep[-2] == 0xAE && codep[-1] == 0xF8 /* sfence */)
+ && !(codep[-2] == 0xAE && codep[-1] == 0xF0 /* mfence */)
+ && !(codep[-2] == 0xAE && codep[-1] == 0xe8 /* lfence */))
+ BadOp (); /* bad sfence,lea,lds,les,lfs,lgs,lss modrm */
+ break;
+ default:
+ oappend (INTERNAL_DISASSEMBLER_ERROR);
+ break;
+ }
+ return;
+ }
+
+ disp = 0;
+ append_seg ();
+
+ if ((sizeflag & AFLAG) || mode_64bit) /* 32 bit address mode */
+ {
+ int havesib;
+ int havebase;
+ int base;
+ int index = 0;
+ int scale = 0;
+
+ havesib = 0;
+ havebase = 1;
+ base = rm;
+
+ if (base == 4)
+ {
+ havesib = 1;
+ FETCH_DATA (the_info, codep + 1);
+ scale = (*codep >> 6) & 3;
+ index = (*codep >> 3) & 7;
+ base = *codep & 7;
+ USED_REX (REX_EXTY);
+ USED_REX (REX_EXTZ);
+ if (rex & REX_EXTY)
+ index += 8;
+ if (rex & REX_EXTZ)
+ base += 8;
+ codep++;
+ }
+
+ switch (mod)
+ {
+ case 0:
+ if ((base & 7) == 5)
+ {
+ havebase = 0;
+ if (mode_64bit && !havesib && (sizeflag & AFLAG))
+ riprel = 1;
+ disp = get32s ();
+ }
+ break;
+ case 1:
+ FETCH_DATA (the_info, codep + 1);
+ disp = *codep++;
+ if ((disp & 0x80) != 0)
+ disp -= 0x100;
+ break;
+ case 2:
+ disp = get32s ();
+ break;
+ }
+
+ if (!intel_syntax)
+ if (mod != 0 || (base & 7) == 5)
+ {
+ print_operand_value (scratchbuf, !riprel, disp);
+ oappend (scratchbuf);
+ if (riprel)
+ {
+ set_op (disp, 1);
+ oappend ("(%rip)");
+ }
+ }
+
+ if (havebase || (havesib && (index != 4 || scale != 0)))
+ {
+ if (intel_syntax)
+ {
+ switch (bytemode)
+ {
+ case b_mode:
+ oappend ("BYTE PTR ");
+ break;
+ case w_mode:
+ oappend ("WORD PTR ");
+ break;
+ case v_mode:
+ oappend ("DWORD PTR ");
+ break;
+ case d_mode:
+ oappend ("QWORD PTR ");
+ break;
+ case m_mode:
+ if (mode_64bit)
+ oappend ("DWORD PTR ");
+ else
+ oappend ("QWORD PTR ");
+ break;
+ case x_mode:
+ oappend ("XWORD PTR ");
+ break;
+ default:
+ break;
+ }
+ }
+ *obufp++ = open_char;
+ if (intel_syntax && riprel)
+ oappend ("rip + ");
+ *obufp = '\0';
+ USED_REX (REX_EXTZ);
+ if (!havesib && (rex & REX_EXTZ))
+ base += 8;
+ if (havebase)
+ oappend (mode_64bit && (sizeflag & AFLAG)
+ ? names64[base] : names32[base]);
+ if (havesib)
+ {
+ if (index != 4)
+ {
+ if (intel_syntax)
+ {
+ if (havebase)
+ {
+ *obufp++ = separator_char;
+ *obufp = '\0';
+ }
+ sprintf (scratchbuf, "%s",
+ mode_64bit && (sizeflag & AFLAG)
+ ? names64[index] : names32[index]);
+ }
+ else
+ sprintf (scratchbuf, ",%s",
+ mode_64bit && (sizeflag & AFLAG)
+ ? names64[index] : names32[index]);
+ oappend (scratchbuf);
+ }
+ if (!intel_syntax
+ || (intel_syntax
+ && bytemode != b_mode
+ && bytemode != w_mode
+ && bytemode != v_mode))
+ {
+ *obufp++ = scale_char;
+ *obufp = '\0';
+ sprintf (scratchbuf, "%d", 1 << scale);
+ oappend (scratchbuf);
+ }
+ }
+ if (intel_syntax)
+ if (mod != 0 || (base & 7) == 5)
+ {
+ /* Don't print zero displacements. */
+ if (disp != 0)
+ {
+ if ((bfd_signed_vma) disp > 0)
+ {
+ *obufp++ = '+';
+ *obufp = '\0';
+ }
+
+ print_operand_value (scratchbuf, 0, disp);
+ oappend (scratchbuf);
+ }
+ }
+
+ *obufp++ = close_char;
+ *obufp = '\0';
+ }
+ else if (intel_syntax)
+ {
+ if (mod != 0 || (base & 7) == 5)
+ {
+ if (prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
+ | PREFIX_ES | PREFIX_FS | PREFIX_GS))
+ ;
+ else
+ {
+ oappend (names_seg[ds_reg - es_reg]);
+ oappend (":");
+ }
+ print_operand_value (scratchbuf, 1, disp);
+ oappend (scratchbuf);
+ }
+ }
+ }
+ else
+ { /* 16 bit address mode */
+ switch (mod)
+ {
+ case 0:
+ if ((rm & 7) == 6)
+ {
+ disp = get16 ();
+ if ((disp & 0x8000) != 0)
+ disp -= 0x10000;
+ }
+ break;
+ case 1:
+ FETCH_DATA (the_info, codep + 1);
+ disp = *codep++;
+ if ((disp & 0x80) != 0)
+ disp -= 0x100;
+ break;
+ case 2:
+ disp = get16 ();
+ if ((disp & 0x8000) != 0)
+ disp -= 0x10000;
+ break;
+ }
+
+ if (!intel_syntax)
+ if (mod != 0 || (rm & 7) == 6)
+ {
+ print_operand_value (scratchbuf, 0, disp);
+ oappend (scratchbuf);
+ }
+
+ if (mod != 0 || (rm & 7) != 6)
+ {
+ *obufp++ = open_char;
+ *obufp = '\0';
+ oappend (index16[rm + add]);
+ *obufp++ = close_char;
+ *obufp = '\0';
+ }
+ }
+}
+
+static void
+OP_G (bytemode, sizeflag)
+ int bytemode;
+ int sizeflag;
+{
+ int add = 0;
+ USED_REX (REX_EXTX);
+ if (rex & REX_EXTX)
+ add += 8;
+ switch (bytemode)
+ {
+ case b_mode:
+ USED_REX (0);
+ if (rex)
+ oappend (names8rex[reg + add]);
+ else
+ oappend (names8[reg + add]);
+ break;
+ case w_mode:
+ oappend (names16[reg + add]);
+ break;
+ case d_mode:
+ oappend (names32[reg + add]);
+ break;
+ case q_mode:
+ oappend (names64[reg + add]);
+ break;
+ case v_mode:
+ USED_REX (REX_MODE64);
+ if (rex & REX_MODE64)
+ oappend (names64[reg + add]);
+ else if (sizeflag & DFLAG)
+ oappend (names32[reg + add]);
+ else
+ oappend (names16[reg + add]);
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ break;
+ default:
+ oappend (INTERNAL_DISASSEMBLER_ERROR);
+ break;
+ }
+}
+
+static bfd_vma
+get64 ()
+{
+ bfd_vma x;
+#ifdef BFD64
+ unsigned int a;
+ unsigned int b;
+
+ FETCH_DATA (the_info, codep + 8);
+ a = *codep++ & 0xff;
+ a |= (*codep++ & 0xff) << 8;
+ a |= (*codep++ & 0xff) << 16;
+ a |= (*codep++ & 0xff) << 24;
+ b = *codep++ & 0xff;
+ b |= (*codep++ & 0xff) << 8;
+ b |= (*codep++ & 0xff) << 16;
+ b |= (*codep++ & 0xff) << 24;
+ x = a + ((bfd_vma) b << 32);
+#else
+ abort ();
+ x = 0;
+#endif
+ return x;
+}
+
+static bfd_signed_vma
+get32 ()
+{
+ bfd_signed_vma x = 0;
+
+ FETCH_DATA (the_info, codep + 4);
+ x = *codep++ & (bfd_signed_vma) 0xff;
+ x |= (*codep++ & (bfd_signed_vma) 0xff) << 8;
+ x |= (*codep++ & (bfd_signed_vma) 0xff) << 16;
+ x |= (*codep++ & (bfd_signed_vma) 0xff) << 24;
+ return x;
+}
+
+static bfd_signed_vma
+get32s ()
+{
+ bfd_signed_vma x = 0;
+
+ FETCH_DATA (the_info, codep + 4);
+ x = *codep++ & (bfd_signed_vma) 0xff;
+ x |= (*codep++ & (bfd_signed_vma) 0xff) << 8;
+ x |= (*codep++ & (bfd_signed_vma) 0xff) << 16;
+ x |= (*codep++ & (bfd_signed_vma) 0xff) << 24;
+
+ x = (x ^ ((bfd_signed_vma) 1 << 31)) - ((bfd_signed_vma) 1 << 31);
+
+ return x;
+}
+
+static int
+get16 ()
+{
+ int x = 0;
+
+ FETCH_DATA (the_info, codep + 2);
+ x = *codep++ & 0xff;
+ x |= (*codep++ & 0xff) << 8;
+ return x;
+}
+
+static void
+set_op (op, riprel)
+ bfd_vma op;
+ int riprel;
+{
+ op_index[op_ad] = op_ad;
+ if (mode_64bit)
+ {
+ op_address[op_ad] = op;
+ op_riprel[op_ad] = riprel;
+ }
+ else
+ {
+ /* Mask to get a 32-bit address. */
+ op_address[op_ad] = op & 0xffffffff;
+ op_riprel[op_ad] = riprel & 0xffffffff;
+ }
+}
+
+static void
+OP_REG (code, sizeflag)
+ int code;
+ int sizeflag;
+{
+ const char *s;
+ int add = 0;
+ USED_REX (REX_EXTZ);
+ if (rex & REX_EXTZ)
+ add = 8;
+
+ switch (code)
+ {
+ case indir_dx_reg:
+ if (intel_syntax)
+ s = "[dx]";
+ else
+ s = "(%dx)";
+ break;
+ case ax_reg: case cx_reg: case dx_reg: case bx_reg:
+ case sp_reg: case bp_reg: case si_reg: case di_reg:
+ s = names16[code - ax_reg + add];
+ break;
+ case es_reg: case ss_reg: case cs_reg:
+ case ds_reg: case fs_reg: case gs_reg:
+ s = names_seg[code - es_reg + add];
+ break;
+ case al_reg: case ah_reg: case cl_reg: case ch_reg:
+ case dl_reg: case dh_reg: case bl_reg: case bh_reg:
+ USED_REX (0);
+ if (rex)
+ s = names8rex[code - al_reg + add];
+ else
+ s = names8[code - al_reg];
+ break;
+ case rAX_reg: case rCX_reg: case rDX_reg: case rBX_reg:
+ case rSP_reg: case rBP_reg: case rSI_reg: case rDI_reg:
+ if (mode_64bit)
+ {
+ s = names64[code - rAX_reg + add];
+ break;
+ }
+ code += eAX_reg - rAX_reg;
+ /* Fall through. */
+ case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
+ case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
+ USED_REX (REX_MODE64);
+ if (rex & REX_MODE64)
+ s = names64[code - eAX_reg + add];
+ else if (sizeflag & DFLAG)
+ s = names32[code - eAX_reg + add];
+ else
+ s = names16[code - eAX_reg + add];
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ break;
+ default:
+ s = INTERNAL_DISASSEMBLER_ERROR;
+ break;
+ }
+ oappend (s);
+}
+
+static void
+OP_IMREG (code, sizeflag)
+ int code;
+ int sizeflag;
+{
+ const char *s;
+
+ switch (code)
+ {
+ case indir_dx_reg:
+ if (intel_syntax)
+ s = "[dx]";
+ else
+ s = "(%dx)";
+ break;
+ case ax_reg: case cx_reg: case dx_reg: case bx_reg:
+ case sp_reg: case bp_reg: case si_reg: case di_reg:
+ s = names16[code - ax_reg];
+ break;
+ case es_reg: case ss_reg: case cs_reg:
+ case ds_reg: case fs_reg: case gs_reg:
+ s = names_seg[code - es_reg];
+ break;
+ case al_reg: case ah_reg: case cl_reg: case ch_reg:
+ case dl_reg: case dh_reg: case bl_reg: case bh_reg:
+ USED_REX (0);
+ if (rex)
+ s = names8rex[code - al_reg];
+ else
+ s = names8[code - al_reg];
+ break;
+ case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
+ case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
+ USED_REX (REX_MODE64);
+ if (rex & REX_MODE64)
+ s = names64[code - eAX_reg];
+ else if (sizeflag & DFLAG)
+ s = names32[code - eAX_reg];
+ else
+ s = names16[code - eAX_reg];
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ break;
+ default:
+ s = INTERNAL_DISASSEMBLER_ERROR;
+ break;
+ }
+ oappend (s);
+}
+
+static void
+OP_I (bytemode, sizeflag)
+ int bytemode;
+ int sizeflag;
+{
+ bfd_signed_vma op;
+ bfd_signed_vma mask = -1;
+
+ switch (bytemode)
+ {
+ case b_mode:
+ FETCH_DATA (the_info, codep + 1);
+ op = *codep++;
+ mask = 0xff;
+ break;
+ case q_mode:
+ if (mode_64bit)
+ {
+ op = get32s ();
+ break;
+ }
+ /* Fall through. */
+ case v_mode:
+ USED_REX (REX_MODE64);
+ if (rex & REX_MODE64)
+ op = get32s ();
+ else if (sizeflag & DFLAG)
+ {
+ op = get32 ();
+ mask = 0xffffffff;
+ }
+ else
+ {
+ op = get16 ();
+ mask = 0xfffff;
+ }
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ break;
+ case w_mode:
+ mask = 0xfffff;
+ op = get16 ();
+ break;
+ default:
+ oappend (INTERNAL_DISASSEMBLER_ERROR);
+ return;
+ }
+
+ op &= mask;
+ scratchbuf[0] = '$';
+ print_operand_value (scratchbuf + 1, 1, op);
+ oappend (scratchbuf + intel_syntax);
+ scratchbuf[0] = '\0';
+}
+
+static void
+OP_I64 (bytemode, sizeflag)
+ int bytemode;
+ int sizeflag;
+{
+ bfd_signed_vma op;
+ bfd_signed_vma mask = -1;
+
+ if (!mode_64bit)
+ {
+ OP_I (bytemode, sizeflag);
+ return;
+ }
+
+ switch (bytemode)
+ {
+ case b_mode:
+ FETCH_DATA (the_info, codep + 1);
+ op = *codep++;
+ mask = 0xff;
+ break;
+ case v_mode:
+ USED_REX (REX_MODE64);
+ if (rex & REX_MODE64)
+ op = get64 ();
+ else if (sizeflag & DFLAG)
+ {
+ op = get32 ();
+ mask = 0xffffffff;
+ }
+ else
+ {
+ op = get16 ();
+ mask = 0xfffff;
+ }
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ break;
+ case w_mode:
+ mask = 0xfffff;
+ op = get16 ();
+ break;
+ default:
+ oappend (INTERNAL_DISASSEMBLER_ERROR);
+ return;
+ }
+
+ op &= mask;
+ scratchbuf[0] = '$';
+ print_operand_value (scratchbuf + 1, 1, op);
+ oappend (scratchbuf + intel_syntax);
+ scratchbuf[0] = '\0';
+}
+
+static void
+OP_sI (bytemode, sizeflag)
+ int bytemode;
+ int sizeflag;
+{
+ bfd_signed_vma op;
+ bfd_signed_vma mask = -1;
+
+ switch (bytemode)
+ {
+ case b_mode:
+ FETCH_DATA (the_info, codep + 1);
+ op = *codep++;
+ if ((op & 0x80) != 0)
+ op -= 0x100;
+ mask = 0xffffffff;
+ break;
+ case v_mode:
+ USED_REX (REX_MODE64);
+ if (rex & REX_MODE64)
+ op = get32s ();
+ else if (sizeflag & DFLAG)
+ {
+ op = get32s ();
+ mask = 0xffffffff;
+ }
+ else
+ {
+ mask = 0xffffffff;
+ op = get16 ();
+ if ((op & 0x8000) != 0)
+ op -= 0x10000;
+ }
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ break;
+ case w_mode:
+ op = get16 ();
+ mask = 0xffffffff;
+ if ((op & 0x8000) != 0)
+ op -= 0x10000;
+ break;
+ default:
+ oappend (INTERNAL_DISASSEMBLER_ERROR);
+ return;
+ }
+
+ scratchbuf[0] = '$';
+ print_operand_value (scratchbuf + 1, 1, op);
+ oappend (scratchbuf + intel_syntax);
+}
+
+static void
+OP_J (bytemode, sizeflag)
+ int bytemode;
+ int sizeflag;
+{
+ bfd_vma disp;
+ bfd_vma mask = -1;
+
+ switch (bytemode)
+ {
+ case b_mode:
+ FETCH_DATA (the_info, codep + 1);
+ disp = *codep++;
+ if ((disp & 0x80) != 0)
+ disp -= 0x100;
+ break;
+ case v_mode:
+ if (sizeflag & DFLAG)
+ disp = get32s ();
+ else
+ {
+ disp = get16 ();
+ /* For some reason, a data16 prefix on a jump instruction
+ means that the pc is masked to 16 bits after the
+ displacement is added! */
+ mask = 0xffff;
+ }
+ break;
+ default:
+ oappend (INTERNAL_DISASSEMBLER_ERROR);
+ return;
+ }
+ disp = (start_pc + codep - start_codep + disp) & mask;
+ set_op (disp, 0);
+ print_operand_value (scratchbuf, 1, disp);
+ oappend (scratchbuf);
+}
+
+static void
+OP_SEG (dummy, sizeflag)
+ int dummy ATTRIBUTE_UNUSED;
+ int sizeflag ATTRIBUTE_UNUSED;
+{
+ oappend (names_seg[reg]);
+}
+
+static void
+OP_DIR (dummy, sizeflag)
+ int dummy ATTRIBUTE_UNUSED;
+ int sizeflag;
+{
+ int seg, offset;
+
+ if (sizeflag & DFLAG)
+ {
+ offset = get32 ();
+ seg = get16 ();
+ }
+ else
+ {
+ offset = get16 ();
+ seg = get16 ();
+ }
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ if (intel_syntax)
+ sprintf (scratchbuf, "0x%x,0x%x", seg, offset);
+ else
+ sprintf (scratchbuf, "$0x%x,$0x%x", seg, offset);
+ oappend (scratchbuf);
+}
+
+static void
+OP_OFF (bytemode, sizeflag)
+ int bytemode ATTRIBUTE_UNUSED;
+ int sizeflag;
+{
+ bfd_vma off;
+
+ append_seg ();
+
+ if ((sizeflag & AFLAG) || mode_64bit)
+ off = get32 ();
+ else
+ off = get16 ();
+
+ if (intel_syntax)
+ {
+ if (!(prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
+ | PREFIX_ES | PREFIX_FS | PREFIX_GS)))
+ {
+ oappend (names_seg[ds_reg - es_reg]);
+ oappend (":");
+ }
+ }
+ print_operand_value (scratchbuf, 1, off);
+ oappend (scratchbuf);
+}
+
+static void
+OP_OFF64 (bytemode, sizeflag)
+ int bytemode ATTRIBUTE_UNUSED;
+ int sizeflag ATTRIBUTE_UNUSED;
+{
+ bfd_vma off;
+
+ if (!mode_64bit)
+ {
+ OP_OFF (bytemode, sizeflag);
+ return;
+ }
+
+ append_seg ();
+
+ off = get64 ();
+
+ if (intel_syntax)
+ {
+ if (!(prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
+ | PREFIX_ES | PREFIX_FS | PREFIX_GS)))
+ {
+ oappend (names_seg[ds_reg - es_reg]);
+ oappend (":");
+ }
+ }
+ print_operand_value (scratchbuf, 1, off);
+ oappend (scratchbuf);
+}
+
+static void
+ptr_reg (code, sizeflag)
+ int code;
+ int sizeflag;
+{
+ const char *s;
+ if (intel_syntax)
+ oappend ("[");
+ else
+ oappend ("(");
+
+ USED_REX (REX_MODE64);
+ if (rex & REX_MODE64)
+ {
+ if (!(sizeflag & AFLAG))
+ s = names32[code - eAX_reg];
+ else
+ s = names64[code - eAX_reg];
+ }
+ else if (sizeflag & AFLAG)
+ s = names32[code - eAX_reg];
+ else
+ s = names16[code - eAX_reg];
+ oappend (s);
+ if (intel_syntax)
+ oappend ("]");
+ else
+ oappend (")");
+}
+
+static void
+OP_ESreg (code, sizeflag)
+ int code;
+ int sizeflag;
+{
+ oappend ("%es:" + intel_syntax);
+ ptr_reg (code, sizeflag);
+}
+
+static void
+OP_DSreg (code, sizeflag)
+ int code;
+ int sizeflag;
+{
+ if ((prefixes
+ & (PREFIX_CS
+ | PREFIX_DS
+ | PREFIX_SS
+ | PREFIX_ES
+ | PREFIX_FS
+ | PREFIX_GS)) == 0)
+ prefixes |= PREFIX_DS;
+ append_seg ();
+ ptr_reg (code, sizeflag);
+}
+
+static void
+OP_C (dummy, sizeflag)
+ int dummy ATTRIBUTE_UNUSED;
+ int sizeflag ATTRIBUTE_UNUSED;
+{
+ int add = 0;
+ USED_REX (REX_EXTX);
+ if (rex & REX_EXTX)
+ add = 8;
+ sprintf (scratchbuf, "%%cr%d", reg + add);
+ oappend (scratchbuf + intel_syntax);
+}
+
+static void
+OP_D (dummy, sizeflag)
+ int dummy ATTRIBUTE_UNUSED;
+ int sizeflag ATTRIBUTE_UNUSED;
+{
+ int add = 0;
+ USED_REX (REX_EXTX);
+ if (rex & REX_EXTX)
+ add = 8;
+ if (intel_syntax)
+ sprintf (scratchbuf, "db%d", reg + add);
+ else
+ sprintf (scratchbuf, "%%db%d", reg + add);
+ oappend (scratchbuf);
+}
+
+static void
+OP_T (dummy, sizeflag)
+ int dummy ATTRIBUTE_UNUSED;
+ int sizeflag ATTRIBUTE_UNUSED;
+{
+ sprintf (scratchbuf, "%%tr%d", reg);
+ oappend (scratchbuf + intel_syntax);
+}
+
+static void
+OP_Rd (bytemode, sizeflag)
+ int bytemode;
+ int sizeflag;
+{
+ if (mod == 3)
+ OP_E (bytemode, sizeflag);
+ else
+ BadOp ();
+}
+
+static void
+OP_MMX (bytemode, sizeflag)
+ int bytemode ATTRIBUTE_UNUSED;
+ int sizeflag ATTRIBUTE_UNUSED;
+{
+ int add = 0;
+ USED_REX (REX_EXTX);
+ if (rex & REX_EXTX)
+ add = 8;
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ if (prefixes & PREFIX_DATA)
+ sprintf (scratchbuf, "%%xmm%d", reg + add);
+ else
+ sprintf (scratchbuf, "%%mm%d", reg + add);
+ oappend (scratchbuf + intel_syntax);
+}
+
+static void
+OP_XMM (bytemode, sizeflag)
+ int bytemode ATTRIBUTE_UNUSED;
+ int sizeflag ATTRIBUTE_UNUSED;
+{
+ int add = 0;
+ USED_REX (REX_EXTX);
+ if (rex & REX_EXTX)
+ add = 8;
+ sprintf (scratchbuf, "%%xmm%d", reg + add);
+ oappend (scratchbuf + intel_syntax);
+}
+
+static void
+OP_EM (bytemode, sizeflag)
+ int bytemode;
+ int sizeflag;
+{
+ int add = 0;
+ if (mod != 3)
+ {
+ OP_E (bytemode, sizeflag);
+ return;
+ }
+ USED_REX (REX_EXTZ);
+ if (rex & REX_EXTZ)
+ add = 8;
+
+ /* Skip mod/rm byte. */
+ MODRM_CHECK;
+ codep++;
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ if (prefixes & PREFIX_DATA)
+ sprintf (scratchbuf, "%%xmm%d", rm + add);
+ else
+ sprintf (scratchbuf, "%%mm%d", rm + add);
+ oappend (scratchbuf + intel_syntax);
+}
+
+static void
+OP_EX (bytemode, sizeflag)
+ int bytemode;
+ int sizeflag;
+{
+ int add = 0;
+ if (mod != 3)
+ {
+ OP_E (bytemode, sizeflag);
+ return;
+ }
+ USED_REX (REX_EXTZ);
+ if (rex & REX_EXTZ)
+ add = 8;
+
+ /* Skip mod/rm byte. */
+ MODRM_CHECK;
+ codep++;
+ sprintf (scratchbuf, "%%xmm%d", rm + add);
+ oappend (scratchbuf + intel_syntax);
+}
+
+static void
+OP_MS (bytemode, sizeflag)
+ int bytemode;
+ int sizeflag;
+{
+ if (mod == 3)
+ OP_EM (bytemode, sizeflag);
+ else
+ BadOp ();
+}
+
+static void
+OP_XS (bytemode, sizeflag)
+ int bytemode;
+ int sizeflag;
+{
+ if (mod == 3)
+ OP_EX (bytemode, sizeflag);
+ else
+ BadOp ();
+}
+
+static const char *Suffix3DNow[] = {
+/* 00 */ NULL, NULL, NULL, NULL,
+/* 04 */ NULL, NULL, NULL, NULL,
+/* 08 */ NULL, NULL, NULL, NULL,
+/* 0C */ "pi2fw", "pi2fd", NULL, NULL,
+/* 10 */ NULL, NULL, NULL, NULL,
+/* 14 */ NULL, NULL, NULL, NULL,
+/* 18 */ NULL, NULL, NULL, NULL,
+/* 1C */ "pf2iw", "pf2id", NULL, NULL,
+/* 20 */ NULL, NULL, NULL, NULL,
+/* 24 */ NULL, NULL, NULL, NULL,
+/* 28 */ NULL, NULL, NULL, NULL,
+/* 2C */ NULL, NULL, NULL, NULL,
+/* 30 */ NULL, NULL, NULL, NULL,
+/* 34 */ NULL, NULL, NULL, NULL,
+/* 38 */ NULL, NULL, NULL, NULL,
+/* 3C */ NULL, NULL, NULL, NULL,
+/* 40 */ NULL, NULL, NULL, NULL,
+/* 44 */ NULL, NULL, NULL, NULL,
+/* 48 */ NULL, NULL, NULL, NULL,
+/* 4C */ NULL, NULL, NULL, NULL,
+/* 50 */ NULL, NULL, NULL, NULL,
+/* 54 */ NULL, NULL, NULL, NULL,
+/* 58 */ NULL, NULL, NULL, NULL,
+/* 5C */ NULL, NULL, NULL, NULL,
+/* 60 */ NULL, NULL, NULL, NULL,
+/* 64 */ NULL, NULL, NULL, NULL,
+/* 68 */ NULL, NULL, NULL, NULL,
+/* 6C */ NULL, NULL, NULL, NULL,
+/* 70 */ NULL, NULL, NULL, NULL,
+/* 74 */ NULL, NULL, NULL, NULL,
+/* 78 */ NULL, NULL, NULL, NULL,
+/* 7C */ NULL, NULL, NULL, NULL,
+/* 80 */ NULL, NULL, NULL, NULL,
+/* 84 */ NULL, NULL, NULL, NULL,
+/* 88 */ NULL, NULL, "pfnacc", NULL,
+/* 8C */ NULL, NULL, "pfpnacc", NULL,
+/* 90 */ "pfcmpge", NULL, NULL, NULL,
+/* 94 */ "pfmin", NULL, "pfrcp", "pfrsqrt",
+/* 98 */ NULL, NULL, "pfsub", NULL,
+/* 9C */ NULL, NULL, "pfadd", NULL,
+/* A0 */ "pfcmpgt", NULL, NULL, NULL,
+/* A4 */ "pfmax", NULL, "pfrcpit1", "pfrsqit1",
+/* A8 */ NULL, NULL, "pfsubr", NULL,
+/* AC */ NULL, NULL, "pfacc", NULL,
+/* B0 */ "pfcmpeq", NULL, NULL, NULL,
+/* B4 */ "pfmul", NULL, "pfrcpit2", "pfmulhrw",
+/* B8 */ NULL, NULL, NULL, "pswapd",
+/* BC */ NULL, NULL, NULL, "pavgusb",
+/* C0 */ NULL, NULL, NULL, NULL,
+/* C4 */ NULL, NULL, NULL, NULL,
+/* C8 */ NULL, NULL, NULL, NULL,
+/* CC */ NULL, NULL, NULL, NULL,
+/* D0 */ NULL, NULL, NULL, NULL,
+/* D4 */ NULL, NULL, NULL, NULL,
+/* D8 */ NULL, NULL, NULL, NULL,
+/* DC */ NULL, NULL, NULL, NULL,
+/* E0 */ NULL, NULL, NULL, NULL,
+/* E4 */ NULL, NULL, NULL, NULL,
+/* E8 */ NULL, NULL, NULL, NULL,
+/* EC */ NULL, NULL, NULL, NULL,
+/* F0 */ NULL, NULL, NULL, NULL,
+/* F4 */ NULL, NULL, NULL, NULL,
+/* F8 */ NULL, NULL, NULL, NULL,
+/* FC */ NULL, NULL, NULL, NULL,
+};
+
+static void
+OP_3DNowSuffix (bytemode, sizeflag)
+ int bytemode ATTRIBUTE_UNUSED;
+ int sizeflag ATTRIBUTE_UNUSED;
+{
+ const char *mnemonic;
+
+ FETCH_DATA (the_info, codep + 1);
+ /* AMD 3DNow! instructions are specified by an opcode suffix in the
+ place where an 8-bit immediate would normally go. ie. the last
+ byte of the instruction. */
+ obufp = obuf + strlen (obuf);
+ mnemonic = Suffix3DNow[*codep++ & 0xff];
+ if (mnemonic)
+ oappend (mnemonic);
+ else
+ {
+ /* Since a variable sized modrm/sib chunk is between the start
+ of the opcode (0x0f0f) and the opcode suffix, we need to do
+ all the modrm processing first, and don't know until now that
+ we have a bad opcode. This necessitates some cleaning up. */
+ op1out[0] = '\0';
+ op2out[0] = '\0';
+ BadOp ();
+ }
+}
+
+static const char *simd_cmp_op[] = {
+ "eq",
+ "lt",
+ "le",
+ "unord",
+ "neq",
+ "nlt",
+ "nle",
+ "ord"
+};
+
+static void
+OP_SIMD_Suffix (bytemode, sizeflag)
+ int bytemode ATTRIBUTE_UNUSED;
+ int sizeflag ATTRIBUTE_UNUSED;
+{
+ unsigned int cmp_type;
+
+ FETCH_DATA (the_info, codep + 1);
+ obufp = obuf + strlen (obuf);
+ cmp_type = *codep++ & 0xff;
+ if (cmp_type < 8)
+ {
+ char suffix1 = 'p', suffix2 = 's';
+ used_prefixes |= (prefixes & PREFIX_REPZ);
+ if (prefixes & PREFIX_REPZ)
+ suffix1 = 's';
+ else
+ {
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ if (prefixes & PREFIX_DATA)
+ suffix2 = 'd';
+ else
+ {
+ used_prefixes |= (prefixes & PREFIX_REPNZ);
+ if (prefixes & PREFIX_REPNZ)
+ suffix1 = 's', suffix2 = 'd';
+ }
+ }
+ sprintf (scratchbuf, "cmp%s%c%c",
+ simd_cmp_op[cmp_type], suffix1, suffix2);
+ used_prefixes |= (prefixes & PREFIX_REPZ);
+ oappend (scratchbuf);
+ }
+ else
+ {
+ /* We have a bad extension byte. Clean up. */
+ op1out[0] = '\0';
+ op2out[0] = '\0';
+ BadOp ();
+ }
+}
+
+static void
+SIMD_Fixup (extrachar, sizeflag)
+ int extrachar;
+ int sizeflag ATTRIBUTE_UNUSED;
+{
+ /* Change movlps/movhps to movhlps/movlhps for 2 register operand
+ forms of these instructions. */
+ if (mod == 3)
+ {
+ char *p = obuf + strlen (obuf);
+ *(p + 1) = '\0';
+ *p = *(p - 1);
+ *(p - 1) = *(p - 2);
+ *(p - 2) = *(p - 3);
+ *(p - 3) = extrachar;
+ }
+}
+
+static void
+BadOp (void)
+{
+ /* Throw away prefixes and 1st. opcode byte. */
+ codep = insn_codep + 1;
+ oappend ("(bad)");
+}
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * FILE: ntoskrnl/kdbg/amd64/kdb.c
+ * PURPOSE: Kernel Debugger
+ * PROGRAMMERS:
+ */
+
+
+/* INCLUDES ******************************************************************/
+
+#include <ntoskrnl.h>
+#define NDEBUG
+#include <debug.h>
+
+ULONG
+NTAPI
+KiEspFromTrapFrame(IN PKTRAP_FRAME TrapFrame)
+{
+ return TrapFrame->Rsp;
+}
+
+VOID
+NTAPI
+KiEspToTrapFrame(IN PKTRAP_FRAME TrapFrame,
+ IN ULONG_PTR Esp)
+{
+ KIRQL OldIrql;
+ ULONG Previous;
+
+ /* Raise to APC_LEVEL if needed */
+ OldIrql = KeGetCurrentIrql();
+ if (OldIrql < APC_LEVEL) KeRaiseIrql(APC_LEVEL, &OldIrql);
+
+ /* Get the old ESP */
+ Previous = KiEspFromTrapFrame(TrapFrame);
+
+ /* Check if this is user-mode */
+ if ((TrapFrame->SegCs & MODE_MASK))
+ {
+ /* Write it directly */
+ TrapFrame->Rsp = Esp;
+ }
+ else
+ {
+ /* Don't allow ESP to be lowered, this is illegal */
+ if (Esp < Previous) KeBugCheckEx(SET_OF_INVALID_CONTEXT,
+ Esp,
+ Previous,
+ (ULONG_PTR)TrapFrame,
+ 0);
+
+ /* Create an edit frame, check if it was alrady */
+ if (!(TrapFrame->SegCs & FRAME_EDITED))
+ {
+ /* Update the value */
+ TrapFrame->Rsp = Esp;
+ }
+ else
+ {
+ /* Check if ESP changed */
+ if (Previous != Esp)
+ {
+ /* Save CS */
+ TrapFrame->SegCs &= ~FRAME_EDITED;
+
+ /* Save ESP */
+ TrapFrame->Rsp = Esp;
+ }
+ }
+ }
+
+ /* Restore IRQL */
+ if (OldIrql < APC_LEVEL) KeLowerIrql(OldIrql);
+
+}
+
+ULONG
+NTAPI
+KiSsFromTrapFrame(IN PKTRAP_FRAME TrapFrame)
+{
+ if (TrapFrame->SegCs & MODE_MASK)
+ {
+ /* User mode, return the User SS */
+ return TrapFrame->SegSs | RPL_MASK;
+ }
+ else
+ {
+ /* Kernel mode */
+ return KGDT_64_R0_SS;
+ }
+}
+
+VOID
+NTAPI
+KiSsToTrapFrame(IN PKTRAP_FRAME TrapFrame,
+ IN ULONG Ss)
+{
+ /* Remove the high-bits */
+ Ss &= 0xFFFF;
+
+ if (TrapFrame->SegCs & MODE_MASK)
+ {
+ /* Usermode, save the User SS */
+ TrapFrame->SegSs = Ss | RPL_MASK;
+ }
+
+}
+
+
+
--- /dev/null
+#include <ndk/amd64/asm.h>
+#include <ndk/amd64/asmmacro.S>
+
+.globl _KdbEnter
+_KdbEnter:
+
+ /* save flags */
+ pushfq
+// .pushreg ?
+
+ /* Make room for a KTRAP_FRAME */
+ sub rsp, SIZE_KTRAP_FRAME
+// .allocstack SIZE_KTRAP_FRAME
+
+ /* Save rbp */
+ mov [rsp + KTRAP_FRAME_Rbp], rbp
+
+ /* Save non-volatile registers */
+ mov [rsp + KTRAP_FRAME_Rbx], rbx
+ mov [rsp + KTRAP_FRAME_Rdi], rdi
+ mov [rsp + KTRAP_FRAME_Rsi], rsi
+
+ /* Save volatile registers */
+ mov [rsp + KTRAP_FRAME_Rax], rax
+ mov [rsp + KTRAP_FRAME_Rcx], rcx
+ mov [rsp + KTRAP_FRAME_Rdx], rdx
+ mov [rsp + KTRAP_FRAME_R8], r8
+ mov [rsp + KTRAP_FRAME_R9], r9
+ mov [rsp + KTRAP_FRAME_R10], r10
+ mov [rsp + KTRAP_FRAME_R11], r11
+
+ /* Save xmm registers */
+// movdqa [rsp + KTRAP_FRAME_Xmm0], xmm0
+// movdqa [rsp + KTRAP_FRAME_Xmm1], xmm1
+// movdqa [rsp + KTRAP_FRAME_Xmm2], xmm2
+// movdqa [rsp + KTRAP_FRAME_Xmm3], xmm3
+// movdqa [rsp + KTRAP_FRAME_Xmm4], xmm4
+// movdqa [rsp + KTRAP_FRAME_Xmm5], xmm5
+
+ /* Save cs and previous mode */
+ mov ax, cs
+ mov [rsp + KTRAP_FRAME_SegCs], ax
+ and ax, 1
+ mov [rsp + KTRAP_FRAME_PreviousMode], al
+
+ /* Save segment selectors */
+ mov ax, ds
+ mov [rsp + KTRAP_FRAME_SegDs], ax
+ mov ax, es
+ mov [rsp + KTRAP_FRAME_SegEs], ax
+ mov ax, fs
+ mov [rsp + KTRAP_FRAME_SegFs], ax
+ mov ax, gs
+ mov [rsp + KTRAP_FRAME_SegGs], ax
+
+ /* Save previous irql */
+ mov rax, cr8
+ mov [rsp + KTRAP_FRAME_PreviousIrql], al
+
+ /* Save debug registers */
+ mov rax, dr0
+ mov [rsp + KTRAP_FRAME_Dr0], rax
+ mov rax, dr1
+ mov [rsp + KTRAP_FRAME_Dr1], rax
+ mov rax, dr2
+ mov [rsp + KTRAP_FRAME_Dr2], rax
+ mov rax, dr3
+ mov [rsp + KTRAP_FRAME_Dr3], rax
+ mov rax, dr6
+ mov [rsp + KTRAP_FRAME_Dr6], rax
+ mov rax, dr7
+ mov [rsp + KTRAP_FRAME_Dr7], rax
+
+ /* Point rbp, where rsp was before */
+ lea rbp, [rsp + SIZE_KTRAP_FRAME]
+ mov [rsp + KTRAP_FRAME_Rsp], rbp
+
+ /* Store the EFLAGS we previously pushed on the stack */
+ mov rax, [rbp + 8]
+ mov [rsp + KTRAP_FRAME_EFlags], rax
+
+ /* Get RIP from the stack */
+ mov rax, [rbp + 16]
+ mov [rsp + KTRAP_FRAME_Rip], rax
+
+ /* Make sure the direction flag is cleared */
+ cld
+
+ /* Clear all breakpoint enables in dr7. */
+ mov rax, dr7
+ and rax, 0xFFFF0000
+ mov dr7, rax
+
+ /* Call KDB */
+ mov byte ptr [rsp + KTRAP_FRAME_P5], 1 /* FirstChance */
+ mov r9, rsp /* Pointer to the trap frame */
+ mov r8, 0 /* Context */
+ mov dl, 0 /* PreviousMode (KernelMode) */
+ mov rcx, 0 /* ExceptionRecord */
+ call _KdbEnterDebuggerException
+
+ /* Restore segment selectors */
+ mov ax, [rsp + KTRAP_FRAME_SegDs]
+ mov ds, ax
+ mov ax, [rsp + KTRAP_FRAME_SegEs]
+ mov es, ax
+ mov ax, [rsp + KTRAP_FRAME_SegFs]
+ mov fs, ax
+
+ /* Restore non-volatile registers */
+ mov rbx, [rsp + KTRAP_FRAME_Rbx]
+ mov rdi, [rsp + KTRAP_FRAME_Rdi]
+ mov rsi, [rsp + KTRAP_FRAME_Rsi]
+
+ /* Restore volatile registers */
+ mov rax, [rsp + KTRAP_FRAME_Rax]
+ mov rcx, [rsp + KTRAP_FRAME_Rcx]
+ mov rdx, [rsp + KTRAP_FRAME_Rdx]
+ mov r8, [rsp + KTRAP_FRAME_R8]
+ mov r9, [rsp + KTRAP_FRAME_R9]
+ mov r10, [rsp + KTRAP_FRAME_R10]
+ mov r11, [rsp + KTRAP_FRAME_R11]
+
+ /* Restore RSP */
+ mov rsp, [rsp + KTRAP_FRAME_Rsp]
+
+ /* Restore EFLAGS */
+ popfq
+
+ ret
+
+.globl _KdbpStackSwitchAndCall
+_KdbpStackSwitchAndCall:
+
+ /* Save old stack */
+ mov rax, rsp
+
+ /* Set new stack */
+ mov rsp, rcx
+
+ /* Save old stack on new stack */
+ push rax
+
+ /* Call function */
+ call rdx
+
+ /* Restire old stack */
+ pop rax
+ mov rsp, rax
+
+ /* Return */
+ ret
\ No newline at end of file
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS system libraries
+ * PURPOSE: Implementation of _setjmp/longjmp
+ * FILE: lib/sdk/crt/setjmp/amd64/setjmp.s
+ * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ndk/amd64/asm.h>
+#include <ndk/amd64/asmmacro.S>
+
+.intel_syntax noprefix
+
+#define JUMP_BUFFER_Frame 0x00
+#define JUMP_BUFFER_Rbx 0x08
+#define JUMP_BUFFER_Rsp 0x10
+#define JUMP_BUFFER_Rbp 0x18
+#define JUMP_BUFFER_Rsi 0x20
+#define JUMP_BUFFER_Rdi 0x28
+#define JUMP_BUFFER_R12 0x30
+#define JUMP_BUFFER_R13 0x38
+#define JUMP_BUFFER_R14 0x40
+#define JUMP_BUFFER_R15 0x48
+#define JUMP_BUFFER_Rip 0x50
+#define JUMP_BUFFER_Spare 0x58
+#define JUMP_BUFFER_Xmm6 0x60
+#define JUMP_BUFFER_Xmm7 0x70
+#define JUMP_BUFFER_Xmm8 0x80
+#define JUMP_BUFFER_Xmm9 0x90
+#define JUMP_BUFFER_Xmm10 0xa0
+#define JUMP_BUFFER_Xmm11 0xb0
+#define JUMP_BUFFER_Xmm12 0xc0
+#define JUMP_BUFFER_Xmm13 0xd0
+#define JUMP_BUFFER_Xmm14 0xe0
+#define JUMP_BUFFER_Xmm15 0xf0
+
+
+/* FUNCTIONS ******************************************************************/
+
+/*
+ * int _setjmp(jmp_buf env);
+ *
+ * Parameters: <rcx> - jmp_buf env
+ * Returns: 0
+ * Notes: Sets up the jmp_buf
+ */
+.globl _setjmp
+_setjmp:
+ /* Load rsp as it was before the call into rax */
+ lea rax, [rsp + 8]
+ /* Load return address into r8 */
+ mov r8, [rsp]
+ mov qword ptr [rcx + JUMP_BUFFER_Frame], 0
+ mov [rcx + JUMP_BUFFER_Rbx], rbx
+ mov [rcx + JUMP_BUFFER_Rbp], rbp
+ mov [rcx + JUMP_BUFFER_Rsi], rsi
+ mov [rcx + JUMP_BUFFER_Rdi], rdi
+ mov [rcx + JUMP_BUFFER_R12], r12
+ mov [rcx + JUMP_BUFFER_R13], r13
+ mov [rcx + JUMP_BUFFER_R14], r14
+ mov [rcx + JUMP_BUFFER_R15], r15
+ mov [rcx + JUMP_BUFFER_Rsp], rax
+ mov [rcx + JUMP_BUFFER_Rip], r8
+ movdqa [rcx + JUMP_BUFFER_Xmm6], xmm6
+ movdqa [rcx + JUMP_BUFFER_Xmm7], xmm7
+ movdqa [rcx + JUMP_BUFFER_Xmm8], xmm8
+ movdqa [rcx + JUMP_BUFFER_Xmm9], xmm9
+ movdqa [rcx + JUMP_BUFFER_Xmm10], xmm10
+ movdqa [rcx + JUMP_BUFFER_Xmm11], xmm11
+ movdqa [rcx + JUMP_BUFFER_Xmm12], xmm12
+ movdqa [rcx + JUMP_BUFFER_Xmm13], xmm13
+ movdqa [rcx + JUMP_BUFFER_Xmm14], xmm14
+ movdqa [rcx + JUMP_BUFFER_Xmm15], xmm15
+ xor rax, rax
+ ret
+
+/*
+ * void longjmp(jmp_buf env, int value);
+ *
+ * Parameters: <rcx> - jmp_buf setup by _setjmp
+ * <rdx> - int value to return
+ * Returns: Doesn't return
+ * Notes: Non-local goto
+ */
+.proc longjmp
+
+ // FIXME: handle frame
+
+ mov rbx, [rcx + JUMP_BUFFER_Rbx]
+ mov rbp, [rcx + JUMP_BUFFER_Rbp]
+ mov rsi, [rcx + JUMP_BUFFER_Rsi]
+ mov rdi, [rcx + JUMP_BUFFER_Rdi]
+ mov r12, [rcx + JUMP_BUFFER_R12]
+ mov r13, [rcx + JUMP_BUFFER_R13]
+ mov r14, [rcx + JUMP_BUFFER_R14]
+ mov r15, [rcx + JUMP_BUFFER_R15]
+ mov rsp, [rcx + JUMP_BUFFER_Rsp]
+ mov r8, [rcx + JUMP_BUFFER_Rip]
+ movdqa xmm6, [rcx + JUMP_BUFFER_Xmm6]
+ movdqa xmm7, [rcx + JUMP_BUFFER_Xmm7]
+ movdqa xmm8, [rcx + JUMP_BUFFER_Xmm8]
+ movdqa xmm9, [rcx + JUMP_BUFFER_Xmm9]
+ movdqa xmm10, [rcx + JUMP_BUFFER_Xmm10]
+ movdqa xmm11, [rcx + JUMP_BUFFER_Xmm11]
+ movdqa xmm12, [rcx + JUMP_BUFFER_Xmm12]
+ movdqa xmm13, [rcx + JUMP_BUFFER_Xmm13]
+ movdqa xmm14, [rcx + JUMP_BUFFER_Xmm14]
+ movdqa xmm15, [rcx + JUMP_BUFFER_Xmm15]
+
+ /* return param2 or 1 if it was 0 */
+ mov rax, rdx
+ test rax, rax
+ jnz 2f
+ inc rax
+2: jmp r8
+.endproc
#define ATTRIBUTE_UNUSED
extern int sprintf(char *str, const char *format, ...);
#define sprintf_vma(BUF, VMA) sprintf(BUF, "0x%X", VMA)
+#define _setjmp setjmp
+#define _INC_SETJMPEX
struct disassemble_info;
int
NTAPI
KiEspToTrapFrame(
IN PKTRAP_FRAME TrapFrame,
- IN ULONG Esp);
+ IN ULONG_PTR Esp);
/* ROS Internal. Please deprecate */
NTHALAPI
PKTRAP_FRAME TrapFrame,
PKDB_KTRAP_FRAME KdbTrapFrame)
{
- ULONG TrapCr0, TrapCr2, TrapCr3, TrapCr4;
+ ULONG_PTR TrapCr0, TrapCr2, TrapCr3, TrapCr4;
+#if defined(_M_IX86)
/* Copy the TrapFrame only up to Eflags and zero the rest*/
RtlCopyMemory(&KdbTrapFrame->Tf, TrapFrame, FIELD_OFFSET(KTRAP_FRAME, HardwareEsp));
RtlZeroMemory((PVOID)((ULONG_PTR)&KdbTrapFrame->Tf + FIELD_OFFSET(KTRAP_FRAME, HardwareEsp)),
sizeof(KTRAP_FRAME) - FIELD_OFFSET(KTRAP_FRAME, HardwareEsp));
+#elif defined(_M_AMD64)
+ RtlCopyMemory(&KdbTrapFrame->Tf, TrapFrame, sizeof(KTRAP_FRAME));
+#endif
-#ifndef _MSC_VER
+#if defined(__GNUC__) && defined(_M_IX86)
asm volatile(
"movl %%cr0, %0" "\n\t"
"movl %%cr2, %1" "\n\t"
"movl %%cr4, %3" "\n\t"
: "=r"(TrapCr0), "=r"(TrapCr2),
"=r"(TrapCr3), "=r"(TrapCr4));
-#else
+#elif defined(_MSC_VER) && defined(_M_IX86)
__asm
{
mov eax, cr0;
//mov eax, cr4;
//mov TrapCr4, eax;
}
+#elif defined(__GNUC__) && defined(_M_AMD64)
+ asm volatile(
+ "movq %%cr0, %0" "\n\t"
+ "movq %%cr2, %1" "\n\t"
+ "movq %%cr3, %2" "\n\t"
+ "movq %%cr4, %3" "\n\t"
+ : "=r"(TrapCr0), "=r"(TrapCr2),
+ "=r"(TrapCr3), "=r"(TrapCr4));
+#else
+#error UNSUPPORTED ARCHITECTURE
#endif
KdbTrapFrame->Cr0 = TrapCr0;
KdbTrapFrame->Cr3 = TrapCr3;
KdbTrapFrame->Cr4 = TrapCr4;
+#ifdef _M_IX86
KdbTrapFrame->Tf.HardwareEsp = KiEspFromTrapFrame(TrapFrame);
KdbTrapFrame->Tf.HardwareSegSs = (USHORT)(KiSsFromTrapFrame(TrapFrame) & 0xFFFF);
-
+#elif defined(_M_AMD64)
+ //KdbTrapFrame->Tf.Rsp = KiEspFromTrapFrame(TrapFrame);
+ //KdbTrapFrame->Tf.SegGs = (USHORT)(KiSsFromTrapFrame(TrapFrame) & 0xFFFF);
+#endif
/* FIXME: copy v86 registers if TrapFrame is a V86 trapframe */
}
PKTRAP_FRAME TrapFrame)
{
/* Copy the TrapFrame only up to Eflags and zero the rest*/
+#ifdef _M_IX86
RtlCopyMemory(TrapFrame, &KdbTrapFrame->Tf, FIELD_OFFSET(KTRAP_FRAME, HardwareEsp));
/* FIXME: write cr0, cr2, cr3 and cr4 (not needed atm) */
KiEspToTrapFrame(TrapFrame, KdbTrapFrame->Tf.HardwareEsp);
/* FIXME: copy v86 registers if TrapFrame is a V86 trapframe */
+
+#elif defined(_M_AMD64)
+ RtlCopyMemory(TrapFrame, &KdbTrapFrame->Tf, sizeof(KTRAP_FRAME));
+ //KiSsToTrapFrame(TrapFrame, KdbTrapFrame->Tf.SegSs);
+ //KiEspToTrapFrame(TrapFrame, KdbTrapFrame->Tf.Rsp);
+
+#endif
}
static VOID
RtlZeroMemory(KdbTrapFrame, sizeof(KDB_KTRAP_FRAME));
StackPtr = (ULONG_PTR *) KernelStack;
+#ifdef _M_IX86
KdbTrapFrame->Tf.Ebp = StackPtr[3];
KdbTrapFrame->Tf.Edi = StackPtr[4];
KdbTrapFrame->Tf.Esi = StackPtr[5];
KdbTrapFrame->Tf.SegDs = KGDT_R0_DATA;
KdbTrapFrame->Tf.SegEs = KGDT_R0_DATA;
KdbTrapFrame->Tf.SegGs = KGDT_R0_DATA;
+#elif defined(_M_AMD64)
+ KdbTrapFrame->Tf.Rbp = StackPtr[3];
+ KdbTrapFrame->Tf.Rdi = StackPtr[4];
+ KdbTrapFrame->Tf.Rsi = StackPtr[5];
+ KdbTrapFrame->Tf.Rbx = StackPtr[6];
+ KdbTrapFrame->Tf.Rip = StackPtr[7];
+ KdbTrapFrame->Tf.Rsp = (ULONG_PTR) (StackPtr + 16);
+ KdbTrapFrame->Tf.SegSs = KGDT_64_R0_SS;
+ KdbTrapFrame->Tf.SegCs = KGDT_64_R0_CODE;
+ KdbTrapFrame->Tf.SegDs = KGDT_64_DATA;
+ KdbTrapFrame->Tf.SegEs = KGDT_64_DATA;
+ KdbTrapFrame->Tf.SegGs = KGDT_64_DATA;
+#endif
/* FIXME: what about the other registers??? */
}
}
/* Get the interrupt descriptor */
- if (!NT_SUCCESS(KdbpSafeReadMemory(IntDesc, (PVOID)(Idtr.Base + (IntVect * 8)), sizeof (IntDesc))))
+ if (!NT_SUCCESS(KdbpSafeReadMemory(IntDesc, (PVOID)(ULONG_PTR)((ULONG_PTR)Idtr.Base + (IntVect * 8)), sizeof (IntDesc))))
{
/*KdbpPrint("Couldn't access memory at 0x%p\n", (ULONG_PTR)Idtr.Base + (IntVect * 8));*/
return FALSE;
/* Get a pointer to the thread */
if (!NT_SUCCESS(PsLookupThreadByThreadId(ThreadId, &Thread)))
{
- KdbpPrint("Invalid thread id: 0x%08x\n", (ULONG)ThreadId);
+ KdbpPrint("Invalid thread id: 0x%08x\n", (ULONG_PTR)ThreadId);
return FALSE;
}
Process = Thread->ThreadsProcess;
/* Get a pointer to the process */
if (!NT_SUCCESS(PsLookupProcessByProcessId(ProcessId, &Process)))
{
- KdbpPrint("Invalid process id: 0x%08x\n", (ULONG)ProcessId);
+ KdbpPrint("Invalid process id: 0x%08x\n", (ULONG_PTR)ProcessId);
return FALSE;
}
ObDereferenceObject(Process);
if (Entry == &KdbCurrentProcess->ThreadListHead)
{
- KdbpPrint("No threads in process 0x%08x, cannot attach to process!\n", (ULONG)ProcessId);
+ KdbpPrint("No threads in process 0x%p, cannot attach to process!\n", ProcessId);
return FALSE;
}
{
PETHREAD Thread;
PVOID SavedInitialStack, SavedStackBase, SavedKernelStack;
- ULONG SavedStackLimit;
+ ULONG_PTR SavedStackLimit;
KbdDisableMouse();
if (KdpDebugMode.Screen)
SavedStackLimit = Thread->Tcb.StackLimit;
SavedKernelStack = Thread->Tcb.KernelStack;
Thread->Tcb.InitialStack = Thread->Tcb.StackBase = (char*)KdbStack + KDB_STACK_SIZE;
- Thread->Tcb.StackLimit = (ULONG)KdbStack;
+ Thread->Tcb.StackLimit = (ULONG_PTR)KdbStack;
Thread->Tcb.KernelStack = (char*)KdbStack + KDB_STACK_SIZE;
- /*KdbpPrint("Switching to KDB stack 0x%08x-0x%08x (Current Stack is 0x%08x)\n", Thread->Tcb.StackLimit, Thread->Tcb.StackBase, Esp);*/
+ //KdbpPrint("Switching to KDB stack 0x%p-0x%p\n", Thread->Tcb.StackLimit, Thread->Tcb.StackBase);
KdbpStackSwitchAndCall(KdbStack + KDB_STACK_SIZE - sizeof(ULONG), KdbpCallMainLoop);
ULONGLONG ull;
BOOLEAN Resume = FALSE;
BOOLEAN EnterConditionMet = TRUE;
- ULONG OldEflags;
+ ULONG_PTR OldEflags;
KIRQL OldIrql;
NTSTATUS ExceptionCode;
if (BreakPoint->Type == KdbBreakPointSoftware)
{
- KdbpPrint("Entered debugger on breakpoint #%d: EXEC 0x%04x:0x%08x\n",
+ KdbpPrint("Entered debugger on breakpoint #%d: EXEC 0x%04x:0x%p\n",
KdbLastBreakPointNr, TrapFrame->SegCs & 0xffff, TrapFrame->Eip);
}
else if (BreakPoint->Type == KdbBreakPointHardware)
{
- KdbpPrint("Entered debugger on breakpoint #%d: %s 0x%08x\n",
+ KdbpPrint("Entered debugger on breakpoint #%d: %s 0x%p\n",
KdbLastBreakPointNr,
(BreakPoint->Data.Hw.AccessType == KdbAccessRead) ? "READ" :
((BreakPoint->Data.Hw.AccessType == KdbAccessWrite) ? "WRITE" :
return kdHandleException;
}
- KdbpPrint("Entered debugger on embedded INT3 at 0x%04x:0x%08x.\n",
+ KdbpPrint("Entered debugger on embedded INT3 at 0x%04x:0x%p.\n",
TrapFrame->SegCs & 0xffff, TrapFrame->Eip - 1);
}
else
ULONG Err;
TrapCr2 = __readcr2();
-
+#ifdef _M_IX86
Err = TrapFrame->ErrCode;
+#elif defined(_M_AMD64)
+ Err = TrapFrame->ErrorCode;
+#endif
+
KdbpPrint("Memory at 0x%p could not be %s: ", TrapCr2, (Err & (1 << 1)) ? "written" : "read");
if ((Err & (1 << 0)) == 0)
Result = FALSE;
return Result ? STATUS_SUCCESS : STATUS_ACCESS_VIOLATION;
-}
+}
\ No newline at end of file
# define RTL_NUMBER_OF(x) (sizeof(x) / sizeof((x)[0]))
#endif
+//hack to avoid a hundred ifdefs
+#ifdef _M_IX86
+#define Eip Eip
+#elif defined(_M_AMD64)
+#define Eip Rip
+#endif
+
/* TYPES *********************************************************************/
/* from kdb.c */
+
typedef struct _KDB_KTRAP_FRAME
{
KTRAP_FRAME Tf;
- ULONG Cr0;
- ULONG Cr1; /* reserved/unused */
- ULONG Cr2;
- ULONG Cr3;
- ULONG Cr4;
+ ULONG_PTR Cr0;
+ ULONG_PTR Cr1; /* reserved/unused */
+ ULONG_PTR Cr2;
+ ULONG_PTR Cr3;
+ ULONG_PTR Cr4;
} KDB_KTRAP_FRAME, *PKDB_KTRAP_FRAME;
typedef enum _KDB_BREAKPOINT_TYPE
LONG
KdbpDisassemble(
- IN ULONG Address,
+ IN ULONG_PTR Address,
IN ULONG IntelSyntax);
LONG
KdbpGetInstLength(
- IN ULONG Address);
+ IN ULONG_PTR Address);
/* from i386/kdb_help.S */
VOID
KbdEnableMouse();
-#endif /* NTOSKRNL_KDB_H */
-
+#endif /* NTOSKRNL_KDB_H */
\ No newline at end of file
#include <debug.h>
/* DEFINES *******************************************************************/
+//hack for amd64
+#define NPX_STATE_NOT_LOADED 0xA
+#define NPX_STATE_LOADED 0x0
#define KEY_BS 8
#define KEY_ESC 27
if (!NT_SUCCESS(KdbpSafeReadMemory(&ul, (PVOID)Address, sizeof(ul))))
KdbpPrint(" ????????");
else
- KdbpPrint(" %08x", ul);
+ KdbpPrint(" %x", ul);
Address += sizeof(ul);
}
while (Count-- > 0)
{
if (!KdbSymPrintAddress((PVOID)Address))
- KdbpPrint("<%08x>: ", Address);
+ KdbpPrint("<%x>: ", Address);
else
KdbpPrint(": ");
{
PKTRAP_FRAME Tf = &KdbCurrentTrapFrame->Tf;
INT i;
- static const PCHAR EflagsBits[32] = { " CF", NULL, " PF", " BIT3", " AF", " BIT5",
+ const PCHAR EflagsBits[32] = { " CF", NULL, " PF", " BIT3", " AF", " BIT5",
" ZF", " SF", " TF", " IF", " DF", " OF",
NULL, NULL, " NT", " BIT15", " RF", " VF",
" AC", " VIF", " VIP", " ID", " BIT22",
" BIT23", " BIT24", " BIT25", " BIT26",
- " BIT27", " BIT28", " BIT29", " BIT30",
- " BIT31" };
+ " BIT27", " BIT28", " BIT29", " BIT30"
+
+ };
if (Argv[0][0] == 'r') /* regs */
{
+ #ifdef _M_IX86
KdbpPrint("CS:EIP 0x%04x:0x%08x\n"
"SS:ESP 0x%04x:0x%08x\n"
" EAX 0x%08x EBX 0x%08x\n"
Tf->Ecx, Tf->Edx,
Tf->Esi, Tf->Edi,
Tf->Ebp);
+#elif defined(_M_AMD64)
+ KdbpPrint("CS:RIP 0x%04x:0x%p\n"
+ "SS:RSP 0x%04x:0x%p\n"
+ " RAX 0x%p RBX 0x%p\n"
+ " RCX 0x%p RDX 0x%p\n"
+ " RSI 0x%p RDI 0x%p\n"
+ " RBP 0x%p R8 0x%p\n"
+ " R9 0x%p R10 0x%p\n"
+ " R11 0x%p\n",
+ Tf->SegCs & 0xFFFF, Tf->Rip,
+ Tf->SegSs, Tf->Rsp,
+ Tf->Rax, Tf->Rbx,
+ Tf->Rcx, Tf->Rdx,
+ Tf->Rsi, Tf->Rdi,
+ Tf->Rbp, Tf->R8,
+ Tf->R9, Tf->R10,
+ Tf->R11);
+#endif
KdbpPrint("EFLAGS 0x%08x ", Tf->EFlags);
for (i = 0; i < 32; i++)
}
else if (Argv[0][0] == 'c') /* cregs */
{
- ULONG Cr0, Cr2, Cr3, Cr4;
+ ULONG_PTR Cr0, Cr2, Cr3, Cr4;
KDESCRIPTOR Gdtr, Idtr;
+#if defined(_M_IX86)
USHORT Ldtr;
+ Ke386GetGlobalDescriptorTable(&Gdtr.Limit);
+ Ldtr = Ke386GetLocalDescriptorTable();
+#elif defined(_M_AMD64)
+ __sgdt(&Gdtr.Limit);
+#endif
static const PCHAR Cr0Bits[32] = { " PE", " MP", " EM", " TS", " ET", " NE", NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
" WP", NULL, " AM", NULL, NULL, NULL, NULL, NULL,
Cr3 = KdbCurrentTrapFrame->Cr3;
Cr4 = KdbCurrentTrapFrame->Cr4;
- /* Get descriptor table regs */
- Ke386GetGlobalDescriptorTable(&Gdtr.Limit);
- Ldtr = Ke386GetLocalDescriptorTable();
+ /* Get interrupt descriptor table regs */
__sidt(&Idtr.Limit);
/* Display the control registers */
- KdbpPrint("CR0 0x%08x ", Cr0);
+ KdbpPrint("CR0 0x%p ", Cr0);
for (i = 0; i < 32; i++)
{
KdbpPrint(Cr0Bits[i]);
}
- KdbpPrint("\nCR2 0x%08x\n", Cr2);
- KdbpPrint("CR3 0x%08x Pagedir-Base 0x%08x %s%s\n", Cr3, (Cr3 & 0xfffff000),
+ KdbpPrint("\nCR2 0x%p\n", Cr2);
+ KdbpPrint("CR3 0x%p Pagedir-Base 0x%p %s%s\n", Cr3, (Cr3 & 0xfffff000),
(Cr3 & (1 << 3)) ? " PWT" : "", (Cr3 & (1 << 4)) ? " PCD" : "" );
- KdbpPrint("CR4 0x%08x ", Cr4);
+ KdbpPrint("CR4 0x%p ", Cr4);
for (i = 0; i < 32; i++)
{
}
/* Display the descriptor table regs */
- KdbpPrint("\nGDTR Base 0x%08x Size 0x%04x\n", Gdtr.Base, Gdtr.Limit);
- KdbpPrint("LDTR 0x%04x\n", Ldtr);
- KdbpPrint("IDTR Base 0x%08x Size 0x%04x\n", Idtr.Base, Idtr.Limit);
+ KdbpPrint("\nGDTR Base 0x%p Size 0x%04x\n", Gdtr.Base, Gdtr.Limit);
+#ifdef _M_IX86
+ KdbpPrint("LDTR 0x%p\n", Ldtr);
+#endif
+ KdbpPrint("IDTR Base 0x%p Size 0x%04x\n", Idtr.Base, Idtr.Limit);
}
else if (Argv[0][0] == 's') /* sregs */
{
Tf->SegFs, Tf->SegFs >> 3, (Tf->SegFs & (1 << 2)) ? 'L' : 'G', Tf->SegFs & 3);
KdbpPrint("GS 0x%04x Index 0x%04x %cDT RPL%d\n",
Tf->SegGs, Tf->SegGs >> 3, (Tf->SegGs & (1 << 2)) ? 'L' : 'G', Tf->SegGs & 3);
+#ifdef _M_IX86
KdbpPrint("SS 0x%04x Index 0x%04x %cDT RPL%d\n",
Tf->HardwareSegSs, Tf->HardwareSegSs >> 3, (Tf->HardwareSegSs & (1 << 2)) ? 'L' : 'G', Tf->HardwareSegSs & 3);
+#else
+ KdbpPrint("SS 0x%04x Index 0x%04x %cDT RPL%d\n",
+ Tf->SegSs, Tf->SegSs >> 3, (Tf->SegSs & (1 << 2)) ? 'L' : 'G', Tf->SegSs & 3);
+#endif
+
}
else /* dregs */
{
ASSERT(Argv[0][0] == 'd');
- KdbpPrint("DR0 0x%08x\n"
- "DR1 0x%08x\n"
- "DR2 0x%08x\n"
- "DR3 0x%08x\n"
- "DR6 0x%08x\n"
- "DR7 0x%08x\n",
+ KdbpPrint("DR0 0x%p\n"
+ "DR1 0x%p\n"
+ "DR2 0x%p\n"
+ "DR3 0x%p\n"
+ "DR6 0x%p\n"
+ "DR7 0x%p\n",
Tf->Dr0, Tf->Dr1, Tf->Dr2, Tf->Dr3,
Tf->Dr6, Tf->Dr7);
}
ULONG Count;
ULONG ul;
ULONGLONG Result = 0;
+#ifdef _M_IX86
ULONG_PTR Frame = KdbCurrentTrapFrame->Tf.Ebp;
+#elif defined(_M_AMD64)
+ ULONG_PTR Frame = KdbCurrentTrapFrame->Tf.Rbp;
+#endif
ULONG_PTR Address;
if (Argc >= 2)
/* Try printing the function at EIP */
if (!KdbSymPrintAddress((PVOID)KdbCurrentTrapFrame->Tf.Eip))
- KdbpPrint("<%08x>\n", KdbCurrentTrapFrame->Tf.Eip);
+ KdbpPrint("<%x>\n", KdbCurrentTrapFrame->Tf.Eip);
else
KdbpPrint("\n");
}
}
if (!KdbSymPrintAddress((PVOID)Address))
- KdbpPrint("<%08x>\n", Address);
+ KdbpPrint("<%x>\n", Address);
else
KdbpPrint("\n");
{
GlobalOrLocal = Buffer;
sprintf(Buffer, " PID 0x%08lx",
- (ULONG)(Process ? Process->UniqueProcessId : INVALID_HANDLE_VALUE));
+ (ULONG_PTR)(Process ? Process->UniqueProcessId : INVALID_HANDLE_VALUE));
}
if (Type == KdbBreakPointSoftware || Type == KdbBreakPointTemporary)
Size = 2;
else if (_stricmp(Argv[2], "dword") == 0)
Size = 4;
+ else if (_stricmp(Argv[2], "qword") == 0)
+ Size = 8;
else if (AccessType == KdbAccessExec)
{
Size = 1;
PETHREAD Thread = NULL;
PEPROCESS Process = NULL;
BOOLEAN ReferencedThread = FALSE, ReferencedProcess = FALSE;
- PULONG Esp;
- PULONG Ebp;
- ULONG Eip;
- ULONG ul = 0;
+ PULONG_PTR Esp;
+ PULONG_PTR Ebp;
+ ULONG_PTR Eip;
+ ULONG_PTR ul = 0;
PCHAR State, pend, str1, str2;
static const PCHAR ThreadStateToString[DeferredReady+1] =
{
if (Thread->Tcb.TrapFrame)
{
+#ifdef _M_IX86
if (Thread->Tcb.TrapFrame->PreviousPreviousMode == KernelMode)
Esp = (PULONG)Thread->Tcb.TrapFrame->TempEsp;
else
Ebp = (PULONG)Thread->Tcb.TrapFrame->Ebp;
Eip = Thread->Tcb.TrapFrame->Eip;
+
+#elif defined(_M_AMD64)
+ Esp = (PULONG_PTR)Thread->Tcb.TrapFrame->Rsp;
+
+ Ebp = (PULONG_PTR)Thread->Tcb.TrapFrame->Rbp;
+ Eip = Thread->Tcb.TrapFrame->Eip;
+#endif
}
else
{
- Esp = (PULONG)Thread->Tcb.KernelStack;
- Ebp = (PULONG)Esp[4];
+ Esp = (PULONG_PTR)Thread->Tcb.KernelStack;
+ Ebp = (PULONG_PTR)Esp[4];
Eip = 0;
if (Ebp) /* FIXME: Should we attach to the process to read Ebp[1]? */
else
State = "Unknown";
- KdbpPrint(" %s0x%08x %-11s %3d 0x%08x 0x%08x 0x%08x%s\n",
+ KdbpPrint(" %s0x%p %-11s %3d 0x%p 0x%p 0x%p%s\n",
str1,
Thread->Cid.UniqueThread,
State,
" State: %s (0x%x)\n"
" Priority: %d\n"
" Affinity: 0x%08x\n"
- " Initial Stack: 0x%08x\n"
- " Stack Limit: 0x%08x\n"
- " Stack Base: 0x%08x\n"
- " Kernel Stack: 0x%08x\n"
- " Trap Frame: 0x%08x\n"
+ " Initial Stack: 0x%p\n"
+ " Stack Limit: 0x%p\n"
+ " Stack Base: 0x%p\n"
+ " Kernel Stack: 0x%p\n"
+ " Trap Frame: 0x%p\n"
" NPX State: %s (0x%x)\n",
(Argc < 2) ? "Current Thread:\n" : "",
Thread->Cid.UniqueThread,
PEPROCESS Process;
BOOLEAN ReferencedProcess = FALSE;
PCHAR State, pend, str1, str2;
- ULONG ul;
+ ULONG_PTR ul;
extern LIST_ENTRY PsActiveProcessHead;
if (Argc >= 2 && _stricmp(Argv[1], "list") == 0)
return TRUE;
}
- KdbpPrint("Attached to process 0x%08x, thread 0x%08x.\n", (ULONG)ul,
- (ULONG)KdbCurrentThread->Cid.UniqueThread);
+ KdbpPrint("Attached to process 0x%x, thread 0x%x.\n", ul,
+ (ULONG_PTR)KdbCurrentThread->Cid.UniqueThread);
}
else
{
{
ULONG_PTR ntoskrnlBase = ((ULONG_PTR)KdbpCmdMod) & 0xfff00000;
KdbpPrint(" Base Size Name\n");
- KdbpPrint(" %08x %08x %s\n", ntoskrnlBase, 0, "ntoskrnl.exe");
+ KdbpPrint(" %p %x %s\n", ntoskrnlBase, 0, "ntoskrnl.exe");
return TRUE;
}
KdbpPrint(" Base Size Name\n");
for (;;)
{
- KdbpPrint(" %08x %08x %wZ\n", LdrEntry->DllBase, LdrEntry->SizeOfImage, &LdrEntry->BaseDllName);
+ KdbpPrint(" %p %x %wZ\n", LdrEntry->DllBase, LdrEntry->SizeOfImage, &LdrEntry->BaseDllName);
if(DisplayOnlyOneModule || !KdbpSymFindModule(NULL, NULL, i++, &LdrEntry))
break;
/*!\brief Displays GDT, LDT or IDTd.
*/
+#ifdef _M_AMD64
+static BOOLEAN
+KdbpCmdGdtLdtIdt(
+ ULONG Argc,
+ PCHAR Argv[])
+{
+ KDESCRIPTOR Reg;
+ KIDTENTRY IdtEntry;
+ KGDTENTRY GdtEntry;
+ ULONG_PTR SegBase;
+ ULONG SegLimit;
+ PCHAR SegType;
+ USHORT SegSel;
+ UCHAR Type, Dpl;
+ INT i = 0;
+ ULONG ul;
+
+ if (Argv[0][0] == 'i')
+ {
+ /* Read IDTR */
+ __sidt(&Reg.Limit);
+
+ if (Reg.Limit < 7)
+ {
+ KdbpPrint("Interrupt descriptor table is empty.\n");
+ return TRUE;
+ }
+
+ KdbpPrint("IDT Base: 0x%p Limit: 0x%04x\n", Reg.Base, Reg.Limit);
+ KdbpPrint(" Idx Type Seg. Sel. Offset DPL\n");
+
+ while (i < (Reg.Limit)/sizeof(IdtEntry))
+ {
+ if (!NT_SUCCESS(KdbpSafeReadMemory(&IdtEntry, (PVOID)((ULONG_PTR)Reg.Base +(i *sizeof(IdtEntry))), sizeof(IdtEntry))))
+ {
+ KdbpPrint("Couldn't access memory at 0x%x!\n", (ULONG_PTR)Reg.Base + sizeof(IdtEntry));
+ return TRUE;
+ }
+
+ Dpl = IdtEntry.Dpl;
+ if (IdtEntry.Type == 0x5) /* Task gate */
+ SegType = "TASKGATE";
+ else if (IdtEntry.Type == 0xE) /* 32 bit Interrupt gate */
+ SegType = "INTGATE32";
+ else if (IdtEntry.Type == 0x6) /* 16 bit Interrupt gate */
+ SegType = "INTGATE16";
+ else if (IdtEntry.Type == 0xF) /* 32 bit Trap gate */
+ SegType = "TRAPGATE32";
+ else if (IdtEntry.Type == 0x7) /* 16 bit Trap gate */
+ SegType = "TRAPGATE16";
+ else
+ SegType = "UNKNOWN";
+
+ if (IdtEntry.Present == 0) /* not present */
+ {
+ KdbpPrint(" %03d %-10s [NP] [NP] %02d\n",
+ i, SegType, Dpl);
+ }
+ else if (IdtEntry.Type == 0x5) /* Task gate */
+ {
+ SegSel = IdtEntry.Selector;
+ KdbpPrint(" %03d %-10s 0x%04x %02d\n",
+ i, SegType, SegSel, Dpl);
+ }
+ else
+ {
+ SegSel = IdtEntry.Selector;
+ SegBase = (ULONG64)IdtEntry.OffsetLow |
+ (ULONG64)IdtEntry.OffsetMiddle << 16 |
+ (ULONG64)IdtEntry.OffsetHigh << 32;
+
+ KdbpPrint(" %03d %-10s 0x%04x 0x%p %02d\n",
+ i , SegType, SegSel, SegBase, Dpl);
+ }
+ i++;
+ }
+ }
+ else
+ {
+ ul = 0;
+
+ if (Argv[0][0] == 'g')
+ {
+ /* Read GDTR */
+ __sgdt(&Reg.Limit);
+
+ }
+ else
+ {
+ ASSERT(Argv[0][0] == 'l');
+
+ /* Read LDTR */
+ __sldt(&Reg.Limit);
+
+ Reg.Base = 0;
+ ul = 1 << 2;
+ }
+
+ if (Reg.Limit < 7)
+ {
+ KdbpPrint("%s descriptor table is empty.\n",
+ Argv[0][0] == 'g' ? "Global" : "Local");
+ return TRUE;
+ }
+
+ KdbpPrint("%cDT Base: 0x%p Limit: 0x%04x\n",
+ Argv[0][0] == 'g' ? 'G' : 'L', Reg.Base, Reg.Limit);
+ KdbpPrint(" Idx Sel. Type Base Limit DPL Attribs\n");
+
+ while (i < (Reg.Limit)/sizeof(GdtEntry))
+ {
+ if (!NT_SUCCESS(KdbpSafeReadMemory(&GdtEntry, (PVOID)((ULONG_PTR)Reg.Base +(i * 8)), sizeof(GdtEntry))))
+ {
+ KdbpPrint("Couldn't access memory at 0x%p!\n", (ULONG_PTR)Reg.Base + i);
+ return TRUE;
+ }
+
+ Dpl = GdtEntry.Bits.Dpl;
+ Type = GdtEntry.Bits.Type;
+
+ SegBase = (ULONG_PTR)KiGetGdtDescriptorBase(&GdtEntry);
+
+ SegLimit = GdtEntry.LimitLow;
+ SegLimit |= (ULONG64)GdtEntry.Bits.LimitHigh << 32;
+
+ if (GdtEntry.Bits.DefaultBig != 0)
+ {
+ SegLimit *= 4096;
+ SegLimit += 4095;
+ }
+ else
+ {
+ SegLimit++;
+ }
+
+ if (GdtEntry.Bits.System == 1) /* System segment */
+ {
+ switch (Type)
+ {
+ case 1: SegType = "TSS16(Avl)"; break;
+ case 2: SegType = "LDT"; break;
+ case 3: SegType = "TSS16(Busy)"; break;
+ case 4: SegType = "CALLGATE16"; break;
+ case 5: SegType = "TASKGATE"; break;
+ case 6: SegType = "INTGATE16"; break;
+ case 7: SegType = "TRAPGATE16"; break;
+ case 9: SegType = "TSS32(Avl)"; break;
+ case 11: SegType = "TSS32(Busy)"; break;
+ case 12: SegType = "CALLGATE32"; break;
+ case 14: SegType = "INTGATE32"; break;
+ case 15: SegType = "INTGATE32"; break;
+ default: SegType = "UNKNOWN"; break;
+ }
+
+ if (!(Type >= 1 && Type <= 3) &&
+ Type != 9 && Type != 11)
+ {
+ SegBase = 0;
+ SegLimit = 0;
+ }
+ }
+ else if ((Type & (1 << 3)) == 0) /* Data segment */
+ {
+ if (GdtEntry.Bits.LongMode != 0)
+ SegType = "DATA32";
+ else
+ SegType = "DATA16";
+ }
+ else /* Code segment */
+ {
+ if (GdtEntry.Bits.LongMode != 0)
+ SegType = "CODE32";
+ else
+ SegType = "CODE16";
+ }
+
+ if (GdtEntry.Bits.Present == 0) /* not present */
+ {
+ KdbpPrint(" %03d 0x%04x %-11s [NP] [NP] %02d NP\n",
+ i, i | Dpl | ul, SegType, Dpl);
+ }
+ else
+ {
+ KdbpPrint(" %03d 0x%04x %-11s 0x%p 0x%08x %02d ",
+ i, i | Dpl | ul, SegType, SegBase, SegLimit, Dpl);
+
+ if (GdtEntry.Bits.System == 1) /* System segment */
+ {
+ /* FIXME: Display system segment */
+ /* they are twice as big as regular segments */
+ i++;
+ }
+ else if ((Type & (1 << 3)) == 0) /* Data segment */
+ {
+ if ((Type & (1 << 2)) != 0) /* Expand-down */
+ KdbpPrint(" E");
+
+ KdbpPrint((Type & (1 << 1)) ? " R/W" : " R");
+
+ if ((Type & (1 >> 1)) != 0)
+ KdbpPrint(" A");
+ }
+ else /* Code segment */
+ {
+ if ((Type & (1 << 2)) != 0) /* Conforming */
+ KdbpPrint(" C");
+
+ KdbpPrint((Type & (1 << 1)) ? " R/X" : " X");
+
+ if ((Type & (1 << 1)) != 0)
+ KdbpPrint(" A");
+ }
+
+ if ((GdtEntry.Bits.LimitHigh & (1 << 3)) != 0)
+ KdbpPrint(" AVL");
+
+ KdbpPrint("\n");
+ }
+ i++;
+ }
+ }
+
+ return TRUE;
+}
+#endif
+
+/*!\brief Displays GDT, LDT or IDTd.
+ */
+#ifdef _M_IX86
static BOOLEAN
KdbpCmdGdtLdtIdt(
ULONG Argc,
for (i = 0; (i + sizeof(SegDesc) - 1) <= Reg.Limit; i += 8)
{
- if (!NT_SUCCESS(KdbpSafeReadMemory(SegDesc, (PVOID)(Reg.Base + i), sizeof(SegDesc))))
+ if (!NT_SUCCESS(KdbpSafeReadMemory(SegDesc, (PVOID)((ULONG_PTR)Reg.Base + i), sizeof(SegDesc))))
{
- KdbpPrint("Couldn't access memory at 0x%08x!\n", Reg.Base + i);
+ KdbpPrint("Couldn't access memory at 0x%08x!\n", (ULONG_PTR)Reg.Base + i);
return TRUE;
}
for (; (i + sizeof(SegDesc) - 1) <= Reg.Limit; i += 8)
{
- if (!NT_SUCCESS(KdbpSafeReadMemory(SegDesc, (PVOID)(Reg.Base + i), sizeof(SegDesc))))
+ if (!NT_SUCCESS(KdbpSafeReadMemory(SegDesc, (PVOID)((ULONG_PTR)Reg.Base + i), sizeof(SegDesc))))
{
- KdbpPrint("Couldn't access memory at 0x%08x!\n", Reg.Base + i);
+ KdbpPrint("Couldn't access memory at 0x%08x!\n", (ULONG_PTR)Reg.Base + i);
return TRUE;
}
return TRUE;
}
+#endif
/*!\brief Displays the KPCR
*/
{
PKIPCR Pcr = (PKIPCR)KeGetPcr();
+#ifdef _M_IX86
KdbpPrint("Current PCR is at 0x%08x.\n", (INT)Pcr);
KdbpPrint(" Tib.ExceptionList: 0x%08x\n"
" Tib.StackBase: 0x%08x\n"
Pcr->MajorVersion, Pcr->MinorVersion, Pcr->SetMember, Pcr->StallScaleFactor,
Pcr->Number, Pcr->L2CacheAssociativity,
Pcr->VdmAlert, Pcr->SecondLevelCacheSize, Pcr->InterruptMode);
-
+#elif defined(_M_AMD64)
+ KdbpPrint("Current PCR is at 0x%x.\n", (INT_PTR)Pcr);
+ KdbpPrint(" Tib.ExceptionList: 0x%p\n"
+ " Tib.StackBase: 0x%p\n"
+ " Tib.StackLimit: 0x%x\n"
+ " Tib.SubSystemTib: 0x%p\n"
+ " Tib.FiberData/Version: 0x%x\n"
+ " Tib.ArbitraryUserPointer: 0x%p\n"
+ " Tib.Self: 0x%p\n"
+ " Self: 0x%p\n"
+ " PCRCB: 0x%p\n"
+ " Irql: 0x%x\n"
+ " KdVersionBlock: 0x%08x\n"
+ " IDT: 0x%p\n"
+ " GDT: 0x%p\n"
+ " TSS: 0x%p\n"
+ " UserRsp: 0x%p\n"
+ " MajorVersion: 0x%04x\n"
+ " MinorVersion: 0x%04x\n"
+ " StallScaleFactor: 0x%08x\n"
+ " L2CacheAssociativity: 0x%02x\n"
+ " L2CacheSize: 0x%08x\n",
+ Pcr->NtTib.ExceptionList, Pcr->NtTib.StackBase, Pcr->NtTib.StackLimit,
+ Pcr->NtTib.SubSystemTib, Pcr->NtTib.FiberData, Pcr->NtTib.ArbitraryUserPointer,
+ Pcr->NtTib.Self, Pcr->Self, Pcr->Prcb, Pcr->Irql,
+ Pcr->KdVersionBlock, Pcr->IdtBase, Pcr->GdtBase, Pcr->TssBase,Pcr->UserRsp,
+ Pcr->MajorVersion, Pcr->MinorVersion, Pcr->StallScaleFactor,
+ Pcr->SecondLevelCacheAssociativity, Pcr->SecondLevelCacheSize);
+#endif
return TRUE;
}
ULONG Argc,
PCHAR Argv[])
{
+#ifdef _M_IX86
KTSS *Tss = KeGetPcr()->TSS;
- KdbpPrint("Current TSS is at 0x%08x.\n", (INT)Tss);
- KdbpPrint(" Eip: 0x%08x\n"
+ KdbpPrint("Current TSS is at 0x%p.\n", (INT_PTR)Tss);
+ KdbpPrint(" Eip: 0x%p\n"
" Es: 0x%04x\n"
" Cs: 0x%04x\n"
" Ss: 0x%04x\n"
" Gs: 0x%04x\n"
" IoMapBase: 0x%04x\n",
Tss->Eip, Tss->Es, Tss->Cs, Tss->Ds, Tss->Fs, Tss->Gs, Tss->IoMapBase);
-
+#elif defined(_M_AMD64)
+ KTSS *Tss = KeGetPcr()->TssBase;
+
+ KdbpPrint("Current TSS is at 0x%p.\n", (INT_PTR)Tss);
+ KdbpPrint(" Rsp0: 0x%p\n"
+ " Rsp1: 0x%p\n"
+ " Rsp2: 0x%p\n"
+ " Ist: 0x%p\n"
+ " IoMapBase: 0x%04x\n",
+ Tss->Rsp0, Tss->Rsp1, Tss->Rsp2, Tss->Ist, Tss->IoMapBase);
+#endif
return TRUE;
}
KdbpTryGetCharKeyboard(&DummyScanCode, 5);
}
- /*
+ /*
* Null terminate the output string -- documentation states that
* DbgPrompt does not null terminate, but it does
*/
/* Print a new line */
KdPortPutByteEx(&SerialPortInfo, '\r');
- KdPortPutByteEx(&SerialPortInfo, '\n');
+ KdPortPutByteEx(&SerialPortInfo, '\n');
/* Release spinlock */
KiReleaseSpinLock(&KdpSerialSpinLock);
/* Return the length */
return OutStringLength;
-}
+}
\ No newline at end of file
typedef struct _RPN_STACK
{
ULONG Size; /* Number of RPN_OPs on Ops */
- ULONG Sp; /* Stack pointer */
+ ULONG_PTR Sp; /* Stack pointer */
RPN_OP Ops[1]; /* Array of RPN_OPs */
}
RPN_STACK, *PRPN_STACK;
static struct
{
ULONG Size;
- ULONG Sp;
+ ULONG_PTR Sp;
RPN_OP Ops[RPN_OP_STACK_SIZE];
}
RpnStack =
static const struct
{
PCHAR Name;
- UCHAR Offset;
- UCHAR Size;
+ USHORT Offset;
+ USHORT Size;
}
RegisterToTrapFrame[] =
{
+#ifdef _M_IX86
{"eip", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Eip), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Eip)},
{"eflags", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.EFlags), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.EFlags)},
{"eax", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Eax), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Eax)},
{"cr2", FIELD_OFFSET(KDB_KTRAP_FRAME, Cr2), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Cr2)},
{"cr3", FIELD_OFFSET(KDB_KTRAP_FRAME, Cr3), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Cr3)},
{"cr4", FIELD_OFFSET(KDB_KTRAP_FRAME, Cr4), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Cr4)}
+#elif defined(_M_AMD64)
+ {"rip", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Rip), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Rip)},
+ {"rflags", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.EFlags), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.EFlags)},
+ {"rax", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Rax), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Rax)},
+ {"rbx", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Rbx), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Rbx)},
+ {"rcx", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Rcx), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Rcx)},
+ {"rdx", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Rdx), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Rdx)},
+ {"rsi", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Rsi), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Rsi)},
+ {"rdi", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Rdi), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Rdi)},
+ {"r8", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.R8), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.R8)},
+ {"r9", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.R9), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.R9)},
+ {"r10", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.R10), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.R10)},
+ {"r11", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.R11), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.R11)},
+ {"cs", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.SegCs), 2 }, /* Use only the lower 2 bytes */
+ {"ds", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.SegDs), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.SegDs)},
+ {"es", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.SegEs), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.SegEs)},
+ {"fs", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.SegFs), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.SegFs)},
+ {"gs", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.SegGs), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.SegGs)},
+ {"ss", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.SegSs), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.SegSs)},
+ {"dr0", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Dr0), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Dr0)},
+ {"dr1", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Dr1), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Dr1)},
+ {"dr2", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Dr2), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Dr2)},
+ {"dr3", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Dr3), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Dr3)},
+ {"dr6", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Dr6), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Dr6)},
+ {"dr7", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Dr7), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Dr7)},
+ {"cr0", FIELD_OFFSET(KDB_KTRAP_FRAME, Cr0), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Cr0)},
+ {"cr2", FIELD_OFFSET(KDB_KTRAP_FRAME, Cr2), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Cr2)},
+ {"cr3", FIELD_OFFSET(KDB_KTRAP_FRAME, Cr3), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Cr3)},
+ {"cr4", FIELD_OFFSET(KDB_KTRAP_FRAME, Cr4), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Cr4)}
+#endif
};
static const INT RegisterToTrapFrameCount = sizeof (RegisterToTrapFrame) / sizeof (RegisterToTrapFrame[0]);
if (!Ok)
{
- _snprintf(ErrMsg, 128, "Couldn't access memory at 0x%lx", (ULONG)p);
+ _snprintf(ErrMsg, 128, "Couldn't access memory at 0x%p", p);
if (ErrOffset)
*ErrOffset = Op->CharacterOffset;
/* Evaluate the stack */
return RpnpEvaluateStack(Stack, TrapFrame, Result, ErrOffset, ErrMsg);
}
-
KdbpSymAddCachedFile(&LdrEntry->FullDllName, LdrEntry->PatchInformation);
}
- DPRINT("Installed symbols: %wZ@%08x-%08x %p\n",
+ DPRINT("Installed symbols: %wZ@%p-%p %p\n",
&LdrEntry->BaseDllName,
LdrEntry->DllBase,
- LdrEntry->SizeOfImage + (ULONG)LdrEntry->DllBase,
+ (PVOID)(LdrEntry->SizeOfImage + (ULONG_PTR)LdrEntry->DllBase),
LdrEntry->PatchInformation);
}
--- /dev/null
+/*
+ * FILE: ntoskrnl/ke/i386/boot.S
+ * COPYRIGHT: See COPYING in the top level directory
+ * PURPOSE: FreeLDR Wrapper Bootstrap Code and Bootstrap Trampoline
+ * PROGRAMMERs: Alex Ionescu (alex@relsoft.net)
+ * Thomas Weidenmueller <w3seek@reactos.org>
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <asm.h>
+.intel_syntax noprefix
+.code64
+
+/* GLOBALS *******************************************************************/
+
+.bss
+.align 16
+
+/* Kernel Boot Stack */
+.globl _P0BootStack
+.space KERNEL_STACK_SIZE
+_P0BootStack:
+
+/* Kernel Double-Fault and Temporary DPC Stack */
+.globl _KiDoubleFaultStack
+.space KERNEL_STACK_SIZE
+_KiDoubleFaultStack:
+
+/* FUNCTIONS *****************************************************************/
+
+.text
+
+/**
+ * VOID
+ * KiSetupStackAndInitializeKernel(
+ * IN PKPROCESS InitProcess, <rsp + 0x08, rcx>
+ * IN PKTHREAD InitThread, <rsp + 0x10, rdx>
+ * IN PVOID IdleStack, <rsp + 0x18, r8>
+ * IN PKPRCB Prcb, <rsp + 0x20, r9>
+ * IN CCHAR Number, <rsp + 0x28>
+ * IN PLOADER_PARAMETER_BLOCK LoaderBlock) <rsp + 0x30>
+ */
+.globl _KiSetupStackAndInitializeKernel
+.func KiSetupStackAndInitializeKernel
+_KiSetupStackAndInitializeKernel:
+
+ /* Save current stack */
+ mov rsi, rsp
+
+ /* Setup the new stack */
+ mov ax, 0x18
+ mov ss, ax
+ mov rsp, r8
+ sub rsp, 0x300 // FIXME
+
+ /* Copy stack parameters to the new stack */
+ sub rsp, 0x38
+ mov rdi, rsp
+ movsq
+ movsq
+ movsq
+ movsq
+ movsq
+ movsq
+ movsq
+
+ jmp _KiInitializeKernelAndGotoIdleLoop
+
+.endfunc
--- /dev/null
+/*
+ * PROJECT: ReactOS Kernel
+ * LICENSE: GPL - See COPYING in the top level directory
+ * PURPOSE: CONTEXT related functions
+ * PROGRAMMERS: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ntoskrnl.h>
+
+#define NDEBUG
+#include <debug.h>
+
+/* FUNCTIONS *****************************************************************/
+
+VOID
+NTAPI
+KeContextToTrapFrame(IN PCONTEXT Context,
+ IN OUT PKEXCEPTION_FRAME ExceptionFrame,
+ IN OUT PKTRAP_FRAME TrapFrame,
+ IN ULONG ContextFlags,
+ IN KPROCESSOR_MODE PreviousMode)
+{
+ KIRQL OldIrql;
+
+ /* Do this at APC_LEVEL */
+ OldIrql = KeGetCurrentIrql();
+ if (OldIrql < APC_LEVEL) KeRaiseIrql(APC_LEVEL, &OldIrql);
+
+ /* Handle integer registers */
+ if ((Context->ContextFlags & CONTEXT_INTEGER) == CONTEXT_INTEGER)
+ {
+ TrapFrame->Rax = Context->Rax;
+ TrapFrame->Rbx = Context->Rbx;
+ TrapFrame->Rcx = Context->Rcx;
+ TrapFrame->Rdx = Context->Rdx;
+ TrapFrame->Rsi = Context->Rsi;
+ TrapFrame->Rdi = Context->Rdi;
+ TrapFrame->Rbp = Context->Rbp;
+ TrapFrame->R8 = Context->R8;
+ TrapFrame->R9 = Context->R9;
+ TrapFrame->R10 = Context->R10;
+ TrapFrame->R11 = Context->R11;
+ ExceptionFrame->R12 = Context->R12;
+ ExceptionFrame->R13 = Context->R13;
+ ExceptionFrame->R14 = Context->R14;
+ ExceptionFrame->R15 = Context->R15;
+ }
+
+ /* Handle floating point registers */
+ if (((Context->ContextFlags & CONTEXT_FLOATING_POINT) ==
+ CONTEXT_FLOATING_POINT) && (Context->SegCs & MODE_MASK))
+ {
+ TrapFrame->Xmm0 = Context->Xmm0;
+ TrapFrame->Xmm1 = Context->Xmm1;
+ TrapFrame->Xmm2 = Context->Xmm2;
+ TrapFrame->Xmm3 = Context->Xmm3;
+ TrapFrame->Xmm4 = Context->Xmm4;
+ TrapFrame->Xmm5 = Context->Xmm5;
+ ExceptionFrame->Xmm6 = Context->Xmm6;
+ ExceptionFrame->Xmm7 = Context->Xmm7;
+ ExceptionFrame->Xmm8 = Context->Xmm8;
+ ExceptionFrame->Xmm9 = Context->Xmm9;
+ ExceptionFrame->Xmm10 = Context->Xmm10;
+ ExceptionFrame->Xmm11 = Context->Xmm11;
+ ExceptionFrame->Xmm12 = Context->Xmm12;
+ ExceptionFrame->Xmm13 = Context->Xmm13;
+ ExceptionFrame->Xmm14 = Context->Xmm14;
+ ExceptionFrame->Xmm15 = Context->Xmm15;
+ }
+
+ /* Handle control registers */
+ if ((Context->ContextFlags & CONTEXT_CONTROL) == CONTEXT_CONTROL)
+ {
+ /* Check if this was a Kernel Trap */
+ if (Context->SegCs == KGDT_64_R0_CODE)
+ {
+ /* Set valid selectors */
+ TrapFrame->SegCs = KGDT_64_R0_CODE;
+ TrapFrame->SegSs = KGDT_64_R0_SS;
+ }
+ else
+ {
+ /* Copy selectors */
+ TrapFrame->SegCs = Context->SegCs;
+ TrapFrame->SegSs = Context->SegSs;
+ }
+
+ /* RIP, RSP, EFLAGS */
+ TrapFrame->Rip = Context->Rip;
+ TrapFrame->Rsp = Context->Rsp;
+ TrapFrame->EFlags = Context->EFlags;
+ }
+
+ /* Handle segment selectors */
+ if ((Context->ContextFlags & CONTEXT_SEGMENTS) == CONTEXT_SEGMENTS)
+ {
+ /* Check if this was a Kernel Trap */
+ if (Context->SegCs == KGDT_64_R0_CODE)
+ {
+ /* Set valid selectors */
+ TrapFrame->SegDs = KGDT_64_DATA | RPL_MASK;
+ TrapFrame->SegEs = KGDT_64_DATA | RPL_MASK;
+ TrapFrame->SegFs = KGDT_32_R3_TEB;
+ TrapFrame->SegGs = KGDT_64_DATA | RPL_MASK;
+ }
+ else
+ {
+ /* Copy selectors */
+ TrapFrame->SegDs = Context->SegDs;
+ TrapFrame->SegEs = Context->SegEs;
+ TrapFrame->SegFs = Context->SegFs;
+ TrapFrame->SegGs = Context->SegGs;
+ }
+ }
+
+ /* Handle debug registers */
+ if ((Context->ContextFlags & CONTEXT_DEBUG_REGISTERS) ==
+ CONTEXT_DEBUG_REGISTERS)
+ {
+ /* Copy the debug registers */
+ TrapFrame->Dr0 = Context->Dr0;
+ TrapFrame->Dr1 = Context->Dr1;
+ TrapFrame->Dr2 = Context->Dr2;
+ TrapFrame->Dr3 = Context->Dr3;
+ TrapFrame->Dr6 = Context->Dr6;
+ TrapFrame->Dr7 = Context->Dr7;
+ }
+
+ /* Restore IRQL */
+ if (OldIrql < APC_LEVEL) KeLowerIrql(OldIrql);
+}
+
+VOID
+NTAPI
+KeTrapFrameToContext(IN PKTRAP_FRAME TrapFrame,
+ IN PKEXCEPTION_FRAME ExceptionFrame,
+ IN OUT PCONTEXT Context)
+{
+ KIRQL OldIrql;
+
+ /* Do this at APC_LEVEL */
+ OldIrql = KeGetCurrentIrql();
+ if (OldIrql < APC_LEVEL) KeRaiseIrql(APC_LEVEL, &OldIrql);
+
+ /* Handle integer registers */
+ if ((Context->ContextFlags & CONTEXT_INTEGER) == CONTEXT_INTEGER)
+ {
+ Context->Rax = TrapFrame->Rax;
+ Context->Rbx = TrapFrame->Rbx;
+ Context->Rcx = TrapFrame->Rcx;
+ Context->Rdx = TrapFrame->Rdx;
+ Context->Rsi = TrapFrame->Rsi;
+ Context->Rdi = TrapFrame->Rdi;
+ Context->Rbp = TrapFrame->Rbp;
+ Context->R8 = TrapFrame->R8;
+ Context->R9 = TrapFrame->R9;
+ Context->R10 = TrapFrame->R10;
+ Context->R11 = TrapFrame->R11;
+ Context->R12 = ExceptionFrame->R12;
+ Context->R13 = ExceptionFrame->R13;
+ Context->R14 = ExceptionFrame->R14;
+ Context->R15 = ExceptionFrame->R15;
+ }
+
+ /* Handle floating point registers */
+ if (((Context->ContextFlags & CONTEXT_FLOATING_POINT) ==
+ CONTEXT_FLOATING_POINT) && (TrapFrame->SegCs & MODE_MASK))
+ {
+ Context->Xmm0 = TrapFrame->Xmm0;
+ Context->Xmm1 = TrapFrame->Xmm1;
+ Context->Xmm2 = TrapFrame->Xmm2;
+ Context->Xmm3 = TrapFrame->Xmm3;
+ Context->Xmm4 = TrapFrame->Xmm4;
+ Context->Xmm5 = TrapFrame->Xmm5;
+ Context->Xmm6 = ExceptionFrame->Xmm6;
+ Context->Xmm7 = ExceptionFrame->Xmm7;
+ Context->Xmm8 = ExceptionFrame->Xmm8;
+ Context->Xmm9 = ExceptionFrame->Xmm9;
+ Context->Xmm10 = ExceptionFrame->Xmm10;
+ Context->Xmm11 = ExceptionFrame->Xmm11;
+ Context->Xmm12 = ExceptionFrame->Xmm12;
+ Context->Xmm13 = ExceptionFrame->Xmm13;
+ Context->Xmm14 = ExceptionFrame->Xmm14;
+ Context->Xmm15 = ExceptionFrame->Xmm15;
+ }
+
+ /* Handle control registers */
+ if ((Context->ContextFlags & CONTEXT_CONTROL) == CONTEXT_CONTROL)
+ {
+ /* Check if this was a Kernel Trap */
+ if (TrapFrame->SegCs == KGDT_64_R0_CODE)
+ {
+ /* Set valid selectors */
+ Context->SegCs = KGDT_64_R0_CODE;
+ Context->SegSs = KGDT_64_R0_SS;
+ }
+ else
+ {
+ /* Copy selectors */
+ Context->SegCs = TrapFrame->SegCs;
+ Context->SegSs = TrapFrame->SegSs;
+ }
+
+ /* Copy RIP, RSP, EFLAGS */
+ Context->Rip = TrapFrame->Rip;
+ Context->Rsp = TrapFrame->Rsp;
+ Context->EFlags = TrapFrame->EFlags;
+ }
+
+ /* Handle segment selectors */
+ if ((Context->ContextFlags & CONTEXT_SEGMENTS) == CONTEXT_SEGMENTS)
+ {
+ /* Check if this was a Kernel Trap */
+ if (TrapFrame->SegCs == KGDT_64_R0_CODE)
+ {
+ /* Set valid selectors */
+ Context->SegDs = KGDT_64_DATA | RPL_MASK;
+ Context->SegEs = KGDT_64_DATA | RPL_MASK;
+ Context->SegFs = KGDT_32_R3_TEB;
+ Context->SegGs = KGDT_64_DATA | RPL_MASK;
+ }
+ else
+ {
+ /* Copy selectors */
+ Context->SegDs = TrapFrame->SegDs;
+ Context->SegEs = TrapFrame->SegEs;
+ Context->SegFs = TrapFrame->SegFs;
+ Context->SegGs = TrapFrame->SegGs;
+ }
+ }
+
+ /* Handle debug registers */
+ if ((Context->ContextFlags & CONTEXT_DEBUG_REGISTERS) ==
+ CONTEXT_DEBUG_REGISTERS)
+ {
+ /* Copy the debug registers */
+ Context->Dr0 = TrapFrame->Dr0;
+ Context->Dr1 = TrapFrame->Dr1;
+ Context->Dr2 = TrapFrame->Dr2;
+ Context->Dr3 = TrapFrame->Dr3;
+ Context->Dr6 = TrapFrame->Dr6;
+ Context->Dr7 = TrapFrame->Dr7;
+ }
+
+ /* Restore IRQL */
+ if (OldIrql < APC_LEVEL) KeLowerIrql(OldIrql);
+}
+
--- /dev/null
+/*
+ * PROJECT: ReactOS Kernel
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: ntoskrnl/ke/amd64/cpu.c
+ * PURPOSE: Routines for CPU-level support
+ * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
+ * Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES *****************************************************************/
+
+#include <ntoskrnl.h>
+#define NDEBUG
+#include <debug.h>
+
+/* FIXME: Local EFLAGS defines not used anywhere else */
+#define EFLAGS_IOPL 0x3000
+#define EFLAGS_NF 0x4000
+#define EFLAGS_RF 0x10000
+#define EFLAGS_ID 0x200000
+
+/* GLOBALS *******************************************************************/
+
+/* The Boot TSS */
+KTSS64 KiBootTss;
+
+/* CPU Features and Flags */
+ULONG KeI386CpuType;
+ULONG KeI386CpuStep;
+ULONG KeProcessorArchitecture;
+ULONG KeProcessorLevel;
+ULONG KeProcessorRevision;
+ULONG KeFeatureBits;
+ULONG KeI386MachineType;
+ULONG KeI386NpxPresent = 1;
+ULONG KeI386XMMIPresent = 0;
+ULONG KeI386FxsrPresent = 0;
+ULONG KeLargestCacheLine = 0x40;
+ULONG KiDmaIoCoherency = 0;
+CHAR KeNumberProcessors = 0;
+KAFFINITY KeActiveProcessors = 1;
+BOOLEAN KiI386PentiumLockErrataPresent;
+BOOLEAN KiSMTProcessorsPresent;
+
+/* Freeze data */
+KIRQL KiOldIrql;
+ULONG KiFreezeFlag;
+
+/* Flush data */
+volatile LONG KiTbFlushTimeStamp;
+
+/* CPU Signatures */
+static const CHAR CmpIntelID[] = "GenuineIntel";
+static const CHAR CmpAmdID[] = "AuthenticAMD";
+static const CHAR CmpCyrixID[] = "CyrixInstead";
+static const CHAR CmpTransmetaID[] = "GenuineTMx86";
+static const CHAR CmpCentaurID[] = "CentaurHauls";
+static const CHAR CmpRiseID[] = "RiseRiseRise";
+
+/* SUPPORT ROUTINES FOR MSVC COMPATIBILITY ***********************************/
+
+VOID
+NTAPI
+CPUID(IN ULONG InfoType,
+ OUT PULONG CpuInfoEax,
+ OUT PULONG CpuInfoEbx,
+ OUT PULONG CpuInfoEcx,
+ OUT PULONG CpuInfoEdx)
+{
+ ULONG CpuInfo[4];
+
+ /* Perform the CPUID Operation */
+ __cpuid((int*)CpuInfo, InfoType);
+
+ /* Return the results */
+ *CpuInfoEax = CpuInfo[0];
+ *CpuInfoEbx = CpuInfo[1];
+ *CpuInfoEcx = CpuInfo[2];
+ *CpuInfoEdx = CpuInfo[3];
+}
+
+/* FUNCTIONS *****************************************************************/
+
+VOID
+NTAPI
+KiSetProcessorType(VOID)
+{
+ ULONG64 EFlags;
+ INT Reg[4];
+ ULONG Stepping, Type;
+
+ /* Start by assuming no CPUID data */
+ KeGetCurrentPrcb()->CpuID = 0;
+
+ /* Save EFlags */
+ EFlags = __readeflags();
+
+ /* Do CPUID 1 now */
+ __cpuid(Reg, 1);
+
+ /*
+ * Get the Stepping and Type. The stepping contains both the
+ * Model and the Step, while the Type contains the returned Type.
+ * We ignore the family.
+ *
+ * For the stepping, we convert this: zzzzzzxy into this: x0y
+ */
+ Stepping = Reg[0] & 0xF0;
+ Stepping <<= 4;
+ Stepping += (Reg[0] & 0xFF);
+ Stepping &= 0xF0F;
+ Type = Reg[0] & 0xF00;
+ Type >>= 8;
+
+ /* Save them in the PRCB */
+ KeGetCurrentPrcb()->CpuID = TRUE;
+ KeGetCurrentPrcb()->CpuType = (UCHAR)Type;
+ KeGetCurrentPrcb()->CpuStep = (USHORT)Stepping;
+
+ /* Restore EFLAGS */
+ __writeeflags(EFlags);
+}
+
+ULONG
+NTAPI
+KiGetCpuVendor(VOID)
+{
+ PKPRCB Prcb = KeGetCurrentPrcb();
+ INT Vendor[5];
+ ULONG Temp;
+
+ /* Assume no Vendor ID and fail if no CPUID Support. */
+ Prcb->VendorString[0] = 0;
+ if (!Prcb->CpuID) return 0;
+
+ /* Get the Vendor ID and null-terminate it */
+ __cpuid(Vendor, 0);
+ Vendor[4] = 0;
+
+ /* Re-arrange vendor string */
+ Temp = Vendor[2];
+ Vendor[2] = Vendor[3];
+ Vendor[3] = Temp;
+
+ /* Copy it to the PRCB and null-terminate it again */
+ RtlCopyMemory(Prcb->VendorString,
+ &Vendor[1],
+ sizeof(Prcb->VendorString) - sizeof(CHAR));
+ Prcb->VendorString[sizeof(Prcb->VendorString) - sizeof(CHAR)] = ANSI_NULL;
+
+ /* Now check the CPU Type */
+ if (!strcmp((PCHAR)Prcb->VendorString, CmpIntelID))
+ {
+ return CPU_INTEL;
+ }
+ else if (!strcmp((PCHAR)Prcb->VendorString, CmpAmdID))
+ {
+ return CPU_AMD;
+ }
+ else if (!strcmp((PCHAR)Prcb->VendorString, CmpCyrixID))
+ {
+ DPRINT1("Cyrix CPUs not fully supported\n");
+ return 0;
+ }
+ else if (!strcmp((PCHAR)Prcb->VendorString, CmpTransmetaID))
+ {
+ DPRINT1("Transmeta CPUs not fully supported\n");
+ return 0;
+ }
+ else if (!strcmp((PCHAR)Prcb->VendorString, CmpCentaurID))
+ {
+ DPRINT1("VIA CPUs not fully supported\n");
+ return 0;
+ }
+ else if (!strcmp((PCHAR)Prcb->VendorString, CmpRiseID))
+ {
+ DPRINT1("Rise CPUs not fully supported\n");
+ return 0;
+ }
+
+ /* Invalid CPU */
+ return 0;
+}
+
+ULONG
+NTAPI
+KiGetFeatureBits(VOID)
+{
+ PKPRCB Prcb = KeGetCurrentPrcb();
+ ULONG Vendor;
+ ULONG FeatureBits = KF_WORKING_PTE;
+ INT Reg[4];
+ ULONG CpuFeatures = 0;
+
+ /* Get the Vendor ID */
+ Vendor = KiGetCpuVendor();
+
+ /* Make sure we got a valid vendor ID at least. */
+ if (!Vendor) return FeatureBits;
+
+ /* Get the CPUID Info. Features are in Reg[3]. */
+ __cpuid(Reg, 1);
+
+ /* Set the initial APIC ID */
+ Prcb->InitialApicId = (UCHAR)(Reg[1] >> 24);
+
+ /* Set the current features */
+ CpuFeatures = Reg[3];
+
+ /* Convert all CPUID Feature bits into our format */
+ if (CpuFeatures & 0x00000002) FeatureBits |= KF_V86_VIS | KF_CR4;
+ if (CpuFeatures & 0x00000008) FeatureBits |= KF_LARGE_PAGE | KF_CR4;
+ if (CpuFeatures & 0x00000010) FeatureBits |= KF_RDTSC;
+ if (CpuFeatures & 0x00000100) FeatureBits |= KF_CMPXCHG8B;
+ if (CpuFeatures & 0x00000800) FeatureBits |= KF_FAST_SYSCALL;
+ if (CpuFeatures & 0x00001000) FeatureBits |= KF_MTRR;
+ if (CpuFeatures & 0x00002000) FeatureBits |= KF_GLOBAL_PAGE | KF_CR4;
+ if (CpuFeatures & 0x00008000) FeatureBits |= KF_CMOV;
+ if (CpuFeatures & 0x00010000) FeatureBits |= KF_PAT;
+ if (CpuFeatures & 0x00200000) FeatureBits |= KF_DTS;
+ if (CpuFeatures & 0x00800000) FeatureBits |= KF_MMX;
+ if (CpuFeatures & 0x01000000) FeatureBits |= KF_FXSR;
+ if (CpuFeatures & 0x02000000) FeatureBits |= KF_XMMI;
+ if (CpuFeatures & 0x04000000) FeatureBits |= KF_XMMI64;
+
+ /* Check if the CPU has hyper-threading */
+ if (CpuFeatures & 0x10000000)
+ {
+ /* Set the number of logical CPUs */
+ Prcb->LogicalProcessorsPerPhysicalProcessor = (UCHAR)(Reg[1] >> 16);
+ if (Prcb->LogicalProcessorsPerPhysicalProcessor > 1)
+ {
+ /* We're on dual-core */
+ KiSMTProcessorsPresent = TRUE;
+ }
+ }
+ else
+ {
+ /* We only have a single CPU */
+ Prcb->LogicalProcessorsPerPhysicalProcessor = 1;
+ }
+
+ /* Check extended cpuid features */
+ __cpuid(Reg, 0x80000000);
+ if ((Reg[0] & 0xffffff00) == 0x80000000)
+ {
+ /* Check if CPUID 0x80000001 is supported */
+ if (Reg[0] >= 0x80000001)
+ {
+ /* Check which extended features are available. */
+ __cpuid(Reg, 0x80000001);
+
+ /* Check if NX-bit is supported */
+ if (Reg[3] & 0x00100000) FeatureBits |= KF_NX_BIT;
+
+ /* Now handle each features for each CPU Vendor */
+ switch (Vendor)
+ {
+ case CPU_AMD:
+ if (Reg[3] & 0x80000000) FeatureBits |= KF_3DNOW;
+ break;
+ }
+ }
+ }
+
+ /* Return the Feature Bits */
+ return FeatureBits;
+}
+
+VOID
+NTAPI
+KiInitializeCpuFeatures()
+{
+ /* Enable Write-Protection */
+ __writecr0(__readcr0() | CR0_WP);
+
+ /* Disable fpu monitoring */
+ __writecr0(__readcr0() & ~CR0_MP);
+
+ /* Enable fx save restore support */
+ __writecr4(__readcr4() | CR4_FXSR);
+
+}
+
+VOID
+NTAPI
+KiGetCacheInformation(VOID)
+{
+ PKIPCR Pcr = (PKIPCR)KeGetPcr();
+ ULONG Vendor;
+ INT Data[4];
+ ULONG CacheRequests = 0, i;
+ ULONG CurrentRegister;
+ UCHAR RegisterByte;
+ BOOLEAN FirstPass = TRUE;
+
+ /* Set default L2 size */
+ Pcr->SecondLevelCacheSize = 0;
+
+ /* Get the Vendor ID and make sure we support CPUID */
+ Vendor = KiGetCpuVendor();
+ if (!Vendor) return;
+
+ /* Check the Vendor ID */
+ switch (Vendor)
+ {
+ /* Handle Intel case */
+ case CPU_INTEL:
+
+ /*Check if we support CPUID 2 */
+ __cpuid(Data, 0);
+ if (Data[0] >= 2)
+ {
+ /* We need to loop for the number of times CPUID will tell us to */
+ do
+ {
+ /* Do the CPUID call */
+ __cpuid(Data, 2);
+
+ /* Check if it was the first call */
+ if (FirstPass)
+ {
+ /*
+ * The number of times to loop is the first byte. Read
+ * it and then destroy it so we don't get confused.
+ */
+ CacheRequests = Data[0] & 0xFF;
+ Data[0] &= 0xFFFFFF00;
+
+ /* Don't go over this again */
+ FirstPass = FALSE;
+ }
+
+ /* Loop all 4 registers */
+ for (i = 0; i < 4; i++)
+ {
+ /* Get the current register */
+ CurrentRegister = Data[i];
+
+ /*
+ * If the upper bit is set, then this register should
+ * be skipped.
+ */
+ if (CurrentRegister & 0x80000000) continue;
+
+ /* Keep looping for every byte inside this register */
+ while (CurrentRegister)
+ {
+ /* Read a byte, skip a byte. */
+ RegisterByte = (UCHAR)(CurrentRegister & 0xFF);
+ CurrentRegister >>= 8;
+ if (!RegisterByte) continue;
+
+ /*
+ * Valid values are from 0x40 (0 bytes) to 0x49
+ * (32MB), or from 0x80 to 0x89 (same size but
+ * 8-way associative.
+ */
+ if (((RegisterByte > 0x40) &&
+ (RegisterByte <= 0x49)) ||
+ ((RegisterByte > 0x80) &&
+ (RegisterByte <= 0x89)))
+ {
+ /* Mask out only the first nibble */
+ RegisterByte &= 0x0F;
+
+ /* Set the L2 Cache Size */
+ Pcr->SecondLevelCacheSize = 0x10000 <<
+ RegisterByte;
+ }
+ }
+ }
+ } while (--CacheRequests);
+ }
+ break;
+
+ case CPU_AMD:
+
+ /* Check if we support CPUID 0x80000006 */
+ __cpuid(Data, 0x80000000);
+ if (Data[0] >= 6)
+ {
+ /* Get 2nd level cache and tlb size */
+ __cpuid(Data, 0x80000006);
+
+ /* Set the L2 Cache Size */
+ Pcr->SecondLevelCacheSize = (Data[2] & 0xFFFF0000) >> 6;
+ }
+ break;
+ }
+}
+
+VOID
+FASTCALL
+KiInitializeTss(IN PKTSS64 Tss,
+ IN UINT64 Stack)
+{
+ PKGDTENTRY64 TssEntry;
+
+ /* Get pointer to the GDT entry */
+ TssEntry = KiGetGdtEntry(KeGetPcr()->GdtBase, KGDT_TSS);
+
+ /* Initialize the GDT entry */
+ KiInitGdtEntry(TssEntry, (ULONG64)Tss, sizeof(KTSS64), AMD64_TSS, 0);
+
+ /* Zero out the TSS */
+ RtlZeroMemory(Tss, sizeof(KTSS64));
+
+ /* FIXME: I/O Map? */
+ Tss->IoMapBase = 0x68;
+
+ /* Setup ring 0 stack pointer */
+ Tss->Rsp0 = Stack;
+
+ /* Setup a stack for Double Fault Traps */
+ Tss->Ist[1] = (ULONG64)KiDoubleFaultStack;
+
+ /* Setup a stack for CheckAbort Traps */
+ Tss->Ist[2] = (ULONG64)KiDoubleFaultStack;
+
+ /* Setup a stack for NMI Traps */
+ Tss->Ist[3] = (ULONG64)KiDoubleFaultStack;
+
+ /* Load the task register */
+ __ltr(KGDT_TSS);
+}
+
+VOID
+NTAPI
+KeFlushCurrentTb(VOID)
+{
+ /* Flush the TLB by resetting CR3 */
+ __writecr3(__readcr3());
+}
+
+VOID
+NTAPI
+KiRestoreProcessorControlState(PKPROCESSOR_STATE ProcessorState)
+{
+ /* Restore the CR registers */
+ __writecr0(ProcessorState->SpecialRegisters.Cr0);
+// __writecr2(ProcessorState->SpecialRegisters.Cr2);
+ __writecr3(ProcessorState->SpecialRegisters.Cr3);
+ __writecr4(ProcessorState->SpecialRegisters.Cr4);
+ __writecr8(ProcessorState->SpecialRegisters.Cr8);
+
+ /* Restore the DR registers */
+ __writedr(0, ProcessorState->SpecialRegisters.KernelDr0);
+ __writedr(1, ProcessorState->SpecialRegisters.KernelDr1);
+ __writedr(2, ProcessorState->SpecialRegisters.KernelDr2);
+ __writedr(3, ProcessorState->SpecialRegisters.KernelDr3);
+ __writedr(6, ProcessorState->SpecialRegisters.KernelDr6);
+ __writedr(7, ProcessorState->SpecialRegisters.KernelDr7);
+
+ /* Restore GDT, IDT, LDT and TSS */
+ __lgdt(&ProcessorState->SpecialRegisters.Gdtr.Limit);
+// __lldt(&ProcessorState->SpecialRegisters.Ldtr);
+// __ltr(&ProcessorState->SpecialRegisters.Tr);
+ __lidt(&ProcessorState->SpecialRegisters.Idtr.Limit);
+
+// __ldmxcsr(&ProcessorState->SpecialRegisters.MxCsr); // FIXME
+// ProcessorState->SpecialRegisters.DebugControl
+// ProcessorState->SpecialRegisters.LastBranchToRip
+// ProcessorState->SpecialRegisters.LastBranchFromRip
+// ProcessorState->SpecialRegisters.LastExceptionToRip
+// ProcessorState->SpecialRegisters.LastExceptionFromRip
+
+ /* Restore MSRs */
+ __writemsr(X86_MSR_GSBASE, ProcessorState->SpecialRegisters.MsrGsBase);
+ __writemsr(X86_MSR_KERNEL_GSBASE, ProcessorState->SpecialRegisters.MsrGsSwap);
+ __writemsr(X86_MSR_STAR, ProcessorState->SpecialRegisters.MsrStar);
+ __writemsr(X86_MSR_LSTAR, ProcessorState->SpecialRegisters.MsrLStar);
+ __writemsr(X86_MSR_CSTAR, ProcessorState->SpecialRegisters.MsrCStar);
+ __writemsr(X86_MSR_SFMASK, ProcessorState->SpecialRegisters.MsrSyscallMask);
+
+}
+
+VOID
+NTAPI
+KiSaveProcessorControlState(OUT PKPROCESSOR_STATE ProcessorState)
+{
+ /* Save the CR registers */
+ ProcessorState->SpecialRegisters.Cr0 = __readcr0();
+ ProcessorState->SpecialRegisters.Cr2 = __readcr2();
+ ProcessorState->SpecialRegisters.Cr3 = __readcr3();
+ ProcessorState->SpecialRegisters.Cr4 = __readcr4();
+ ProcessorState->SpecialRegisters.Cr8 = __readcr8();
+
+ /* Save the DR registers */
+ ProcessorState->SpecialRegisters.KernelDr0 = __readdr(0);
+ ProcessorState->SpecialRegisters.KernelDr1 = __readdr(1);
+ ProcessorState->SpecialRegisters.KernelDr2 = __readdr(2);
+ ProcessorState->SpecialRegisters.KernelDr3 = __readdr(3);
+ ProcessorState->SpecialRegisters.KernelDr6 = __readdr(6);
+ ProcessorState->SpecialRegisters.KernelDr7 = __readdr(7);
+
+ /* Save GDT, IDT, LDT and TSS */
+ __sgdt(&ProcessorState->SpecialRegisters.Gdtr.Limit);
+ __sldt(&ProcessorState->SpecialRegisters.Ldtr);
+ __str(&ProcessorState->SpecialRegisters.Tr);
+ __sidt(&ProcessorState->SpecialRegisters.Idtr.Limit);
+
+// __stmxcsr(&ProcessorState->SpecialRegisters.MxCsr);
+// ProcessorState->SpecialRegisters.DebugControl =
+// ProcessorState->SpecialRegisters.LastBranchToRip =
+// ProcessorState->SpecialRegisters.LastBranchFromRip =
+// ProcessorState->SpecialRegisters.LastExceptionToRip =
+// ProcessorState->SpecialRegisters.LastExceptionFromRip =
+
+ /* Save MSRs */
+ ProcessorState->SpecialRegisters.MsrGsBase = __readmsr(X86_MSR_GSBASE);
+ ProcessorState->SpecialRegisters.MsrGsSwap = __readmsr(X86_MSR_KERNEL_GSBASE);
+ ProcessorState->SpecialRegisters.MsrStar = __readmsr(X86_MSR_STAR);
+ ProcessorState->SpecialRegisters.MsrLStar = __readmsr(X86_MSR_LSTAR);
+ ProcessorState->SpecialRegisters.MsrCStar = __readmsr(X86_MSR_CSTAR);
+ ProcessorState->SpecialRegisters.MsrSyscallMask = __readmsr(X86_MSR_SFMASK);
+}
+
+VOID
+NTAPI
+KeFlushEntireTb(IN BOOLEAN Invalid,
+ IN BOOLEAN AllProcessors)
+{
+ KIRQL OldIrql;
+
+ // FIXME: halfplemented
+ /* Raise the IRQL for the TB Flush */
+ OldIrql = KeRaiseIrqlToSynchLevel();
+
+ /* Flush the TB for the Current CPU, and update the flush stamp */
+ KeFlushCurrentTb();
+
+ /* Update the flush stamp and return to original IRQL */
+ InterlockedExchangeAdd(&KiTbFlushTimeStamp, 1);
+ KeLowerIrql(OldIrql);
+
+}
+
+KAFFINITY
+NTAPI
+KeQueryActiveProcessors(VOID)
+{
+ PAGED_CODE();
+
+ /* Simply return the number of active processors */
+ return KeActiveProcessors;
+}
+
+NTSTATUS
+NTAPI
+KeSaveFloatingPointState(OUT PKFLOATING_SAVE Save)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+NTSTATUS
+NTAPI
+KeRestoreFloatingPointState(IN PKFLOATING_SAVE Save)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+BOOLEAN
+NTAPI
+KeInvalidateAllCaches(VOID)
+{
+ /* Invalidate all caches */
+ __wbinvd();
+ return TRUE;
+}
+
+/*
+ * @implemented
+ */
+ULONG
+NTAPI
+KeGetRecommendedSharedDataAlignment(VOID)
+{
+ /* Return the global variable */
+ return KeLargestCacheLine;
+}
+
+/*
+ * @implemented
+ */
+VOID
+__cdecl
+KeSaveStateForHibernate(IN PKPROCESSOR_STATE State)
+{
+ /* Capture the context */
+ RtlCaptureContext(&State->ContextFrame);
+
+ /* Capture the control state */
+ KiSaveProcessorControlState(State);
+}
+
+/*
+ * @implemented
+ */
+VOID
+NTAPI
+KeSetDmaIoCoherency(IN ULONG Coherency)
+{
+ /* Save the coherency globally */
+ KiDmaIoCoherency = Coherency;
+}
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * FILE: ntoskrnl/ke/amd64/ctxswitch.S
+ * PURPOSE: Thread Context Switching
+ *
+ * PROGRAMMER: Timo kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ndk/asm.h>
+
+.intel_syntax noprefix
+
+.altmacro
+.macro UNIMPLEMENTED func
+ jmp 2f
+1:
+ .ascii "Sorry, asm function "
+ .ascii func
+ .ascii " is unimplemented!\n\0"
+2:
+ movabs rcx, offset 1b
+ call _DbgPrint
+ ret
+.endm
+
+
+/* FUNCTIONS ****************************************************************/
+
+/*++
+ * KiThreadStartup
+ *
+ * The KiThreadStartup routine is the beginning of any thread.
+ *
+ * Params:
+ * SystemRoutine - Pointer to the System Startup Routine. Either
+ * PspUserThreadStartup or PspSystemThreadStartup
+ *
+ * StartRoutine - For Kernel Threads only, specifies the starting execution
+ * point of the new thread.
+ *
+ * StartContext - For Kernel Threads only, specifies a pointer to variable
+ * context data to be sent to the StartRoutine above.
+ *
+ * UserThread - Indicates whether or not this is a user thread. This tells
+ * us if the thread has a context or not.
+ *
+ * TrapFrame - Pointer to the KTHREAD to which the caller wishes to
+ * switch from.
+ *
+ * Returns:
+ * Should never return for a system thread. Returns through the System Call
+ * Exit Dispatcher for a user thread.
+ *
+ * Remarks:
+ * If a return from a system thread is detected, a bug check will occur.
+ *
+ *--*/
+ .func KiThreadStartup
+.globl _KiThreadStartup
+_KiThreadStartup:
+
+ /*
+ * Clear all the non-volatile registers, so the thread won't be tempted to
+ * expect any static data (like some badly coded usermode/win9x apps do)
+ */
+ xor rbx, rbx
+ xor rsi, rsi
+ xor rdi, rdi
+ xor rbp, rbp
+ xor r10, r10
+ xor r11, r11
+ xor r12, r12
+ xor r13, r13
+ xor r14, r14
+ xor r15, r15
+
+ /* It's now safe to go to APC */
+ mov rax, APC_LEVEL
+ mov cr8, rax
+
+ /*
+ * Call the System Routine which is right on our stack now.
+ * After we pop the pointer, the Start Routine/Context is on the
+ * stack, we pop it as parameters to the System Routine into rcx
+ */
+ pop rax
+ pop rcx
+ call rax
+
+ /* The thread returned... was it a user-thread? */
+ pop rcx
+ or rcx, rcx
+ jz BadThread
+
+ /* Yes it was, set our trapframe for the System Call Exit Dispatcher */
+ mov ebp, esp
+
+ /* Exit back to user-mode */
+// jmp _KiServiceExit2
+UNIMPLEMENTED "KiThreadStartup->KiServiceExit2"
+
+BadThread:
+
+ /* A system thread returned...this is very bad! */
+ int 3
+.endfunc
+
+
+/*++
+ * KiSwapContextInternal
+ *
+ * The KiSwapContextInternal routine switches context to another thread.
+ *
+ * Params:
+ * ESI - Pointer to the KTHREAD to which the caller wishes to
+ * switch to.
+ * EDI - Pointer to the KTHREAD to which the caller wishes to
+ * switch from.
+ *
+ * Returns:
+ * None.
+ *
+ * Remarks:
+ * Absolutely all registers except ESP can be trampled here for maximum code flexibility.
+ *
+ *--*/
+.globl _KiSwapContextInternal
+.func _KiSwapContextInternal, _KiSwapContextInternal
+_KiSwapContextInternal:
+ UNIMPLEMENTED "KiSwapContextInternal"
+ ret
+
+.endfunc
+
+/**
+ * KiSwapContext
+ *
+ * \brief
+ * The KiSwapContext routine switches context to another thread.
+ *
+ * BOOLEAN
+ * KiSwapContext(PKTHREAD CurrentThread, PKTHREAD TargetThread);
+ *
+ * \param CurrentThread
+ * Pointer to the KTHREAD of the current thread.
+ *
+ * \param TargetThread
+ * Pointer to the KTHREAD to which the caller wishes to switch to.
+ *
+ * \returns
+ * The WaitStatus of the Target Thread.
+ *
+ * \remarks
+ * This is a wrapper around KiSwapContextInternal which will save all the
+ * non-volatile registers so that the Internal function can use all of
+ * them. It will also save the old current thread and set the new one.
+ *
+ * The calling thread does not return after KiSwapContextInternal until
+ * another thread switches to IT.
+ *
+ *--*/
+.globl _KiSwapContext
+.func _KiSwapContext, _KiSwapContext
+_KiSwapContext:
+
+ /* Save 10 registers */
+ sub rsp, 10 * 8
+
+ /* Save all the non-volatile ones */
+ mov [rsp+72], r15
+ mov [rsp+64], r14
+ mov [rsp+56], r13
+ mov [rsp+48], r12
+ mov [rsp+40], r11
+ mov [rsp+32], r10
+
+ mov [rsp+24], rbx
+ mov [rsp+16], rsi
+ mov [rsp+8], rdi
+ mov [rsp+0], rbp
+
+ /* Get the PCR */
+ mov rbx, gs:[KPCR_SELF]
+
+ /* Get the current thread */
+ mov rdi, rcx
+
+ /* Get the New Thread */
+ mov rsi, rdx
+
+ /* Get the wait IRQL */
+ movzx ecx, byte ptr [edi+KTHREAD_WAIT_IRQL]
+
+ /* Do the swap with the registers correctly setup */
+ call _KiSwapContextInternal
+
+ /* Restore the registers */
+ mov rbp, [rsp+0]
+ mov rdi, [rsp+8]
+ mov rsi, [rsp+16]
+ mov rbx, [rsp+24]
+
+ mov r10, [rsp+32]
+ mov r11, [rsp+40]
+ mov r12, [rsp+48]
+ mov r13, [rsp+56]
+ mov r14, [rsp+64]
+ mov r15, [rsp+72]
+
+ /* Clean stack */
+ add esp, 10 * 8
+ ret
+.endfunc
--- /dev/null
+/*
+ * PROJECT: ReactOS Kernel
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: ntoskrnl/ke/amd64/except.c
+ * PURPOSE: Exception Dispatching for amd64
+ * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
+ * Alex Ionescu (alex.ionescu@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ntoskrnl.h>
+#define NDEBUG
+#include <debug.h>
+
+/* GLOBALS *******************************************************************/
+
+KIDT_INIT KiInterruptInitTable[] =
+{
+ /* Id, Dpl, IST, ServiceRoutine */
+ {0x00, 0x00, 0x00, KiDivideErrorFault},
+ {0x01, 0x00, 0x00, KiDebugTrapOrFault},
+ {0x02, 0x00, 0x03, KiNmiInterrupt},
+ {0x03, 0x03, 0x00, KiBreakpointTrap},
+ {0x04, 0x03, 0x00, KiOverflowTrap},
+ {0x05, 0x00, 0x00, KiBoundFault},
+ {0x06, 0x00, 0x00, KiInvalidOpcodeFault},
+ {0x07, 0x00, 0x00, KiNpxNotAvailableFault},
+ {0x08, 0x00, 0x01, KiDoubleFaultAbort},
+ {0x09, 0x00, 0x00, KiNpxSegmentOverrunAbort},
+ {0x0A, 0x00, 0x00, KiInvalidTssFault},
+ {0x0B, 0x00, 0x00, KiSegmentNotPresentFault},
+ {0x0C, 0x00, 0x00, KiStackFault},
+ {0x0D, 0x00, 0x00, KiGeneralProtectionFault},
+ {0x0E, 0x00, 0x00, KiPageFault},
+ {0x10, 0x00, 0x00, KiFloatingErrorFault},
+ {0x11, 0x00, 0x00, KiAlignmentFault},
+ {0x12, 0x00, 0x02, KiMcheckAbort},
+ {0x13, 0x00, 0x00, KiXmmException},
+ {0x1F, 0x00, 0x00, KiApcInterrupt},
+ {0x2C, 0x03, 0x00, KiRaiseAssertion},
+ {0x2D, 0x03, 0x00, KiDebugServiceTrap},
+ {0x2F, 0x00, 0x00, KiDpcInterrupt},
+ {0xE1, 0x00, 0x00, KiIpiInterrupt},
+ {0, 0, 0, 0}
+};
+
+KIDTENTRY64 KiIdt[256];
+KDESCRIPTOR KiIdtDescriptor = {{0}, sizeof(KiIdt) - 1, KiIdt};
+
+/* FUNCTIONS *****************************************************************/
+
+
+
+VOID
+INIT_FUNCTION
+NTAPI
+KeInitExceptions(VOID)
+{
+ int i, j;
+
+ /* Initialize the Idt */
+ for (j = i = 0; i < 256; i++)
+ {
+ ULONG64 Offset;
+
+ if (KiInterruptInitTable[j].InterruptId == i)
+ {
+ Offset = (ULONG64)KiInterruptInitTable[j].ServiceRoutine;
+ KiIdt[i].Dpl = KiInterruptInitTable[j].Dpl;
+ KiIdt[i].IstIndex = KiInterruptInitTable[j].IstIndex;
+ j++;
+ }
+ else
+ {
+ Offset = (ULONG64)KiUnexpectedInterrupt;
+ KiIdt[i].Dpl = 0;
+ KiIdt[i].IstIndex = 0;
+ }
+ KiIdt[i].OffsetLow = Offset & 0xffff;
+ KiIdt[i].Selector = KGDT_64_R0_CODE;
+ KiIdt[i].Type = 0x0e;
+ KiIdt[i].Reserved0 = 0;
+ KiIdt[i].Present = 1;
+ KiIdt[i].OffsetMiddle = (Offset >> 16) & 0xffff;
+ KiIdt[i].OffsetHigh = (Offset >> 32);
+ KiIdt[i].Reserved1 = 0;
+ }
+
+ KeGetPcr()->IdtBase = KiIdt;
+ __lidt(&KiIdtDescriptor.Limit);
+}
+
+VOID
+NTAPI
+KiDispatchException(IN PEXCEPTION_RECORD ExceptionRecord,
+ IN PKEXCEPTION_FRAME ExceptionFrame,
+ IN PKTRAP_FRAME TrapFrame,
+ IN KPROCESSOR_MODE PreviousMode,
+ IN BOOLEAN FirstChance)
+{
+ CONTEXT Context;
+
+// FrLdrDbgPrint("KiDispatchException(%p, %p, %p, %d, %d)\n",
+// ExceptionRecord, ExceptionFrame, TrapFrame, PreviousMode, FirstChance);
+
+ /* Increase number of Exception Dispatches */
+ KeGetCurrentPrcb()->KeExceptionDispatchCount++;
+
+ /* Set the context flags */
+ Context.ContextFlags = CONTEXT_ALL;
+
+ /* Get a Context */
+ KeTrapFrameToContext(TrapFrame, ExceptionFrame, &Context);
+
+ /* Look at our exception code */
+ switch (ExceptionRecord->ExceptionCode)
+ {
+ /* Breakpoint */
+ case STATUS_BREAKPOINT:
+
+ /* Decrement RIP by one */
+ Context.Rip--;
+ break;
+
+ /* Internal exception */
+ case KI_EXCEPTION_ACCESS_VIOLATION:
+
+ /* Set correct code */
+ ExceptionRecord->ExceptionCode = STATUS_ACCESS_VIOLATION;
+ if (PreviousMode == UserMode)
+ {
+ /* FIXME: Handle no execute */
+ }
+ break;
+ }
+
+ /* Handle kernel-mode first, it's simpler */
+ if (PreviousMode == KernelMode)
+ {
+ /* Check if this is a first-chance exception */
+ if (FirstChance == TRUE)
+ {
+ /* Break into the debugger for the first time */
+ if (KiDebugRoutine(TrapFrame,
+ ExceptionFrame,
+ ExceptionRecord,
+ &Context,
+ PreviousMode,
+ FALSE))
+ {
+ /* Exception was handled */
+ goto Handled;
+ }
+
+ /* If the Debugger couldn't handle it, dispatch the exception */
+ if (RtlDispatchException(ExceptionRecord, &Context)) goto Handled;
+ }
+
+ /* This is a second-chance exception, only for the debugger */
+ if (KiDebugRoutine(TrapFrame,
+ ExceptionFrame,
+ ExceptionRecord,
+ &Context,
+ PreviousMode,
+ TRUE))
+ {
+ /* Exception was handled */
+ goto Handled;
+ }
+
+ /* Third strike; you're out */
+ KeBugCheckEx(KMODE_EXCEPTION_NOT_HANDLED,
+ ExceptionRecord->ExceptionCode,
+ (ULONG_PTR)ExceptionRecord->ExceptionAddress,
+ (ULONG_PTR)TrapFrame,
+ 0);
+ }
+ else
+ {
+ /* FIXME: user-mode exception handling unimplemented */
+ ASSERT(FALSE);
+ }
+
+Handled:
+ /* Convert the context back into Trap/Exception Frames */
+ KeContextToTrapFrame(&Context,
+ ExceptionFrame,
+ TrapFrame,
+ Context.ContextFlags,
+ PreviousMode);
+ return;
+}
+
+NTSTATUS
+NTAPI
+KeRaiseUserException(IN NTSTATUS ExceptionCode)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
--- /dev/null
+/*
+ * PROJECT: ReactOS Kernel
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: ntoskrnl/ke/i386/irq.c
+ * PURPOSE: Manages the Kernel's IRQ support for external drivers,
+ * for the purpopses of connecting, disconnecting and setting
+ * up ISRs for drivers. The backend behind the Io* Interrupt
+ * routines.
+ * PROGRAMMERS: Timo Kreuzer (timo.kreuzer@web.de)
+ */
+
+/* INCLUDES *****************************************************************/
+
+#include <ntoskrnl.h>
+#define NDEBUG
+#include <debug.h>
+
+/* FUNCTIONS ****************************************************************/
+
+
+
+BOOLEAN
+NTAPI
+KeDisableInterrupts(VOID)
+{
+ ULONG64 Flags;
+
+ /* Get the flags */
+ Flags = __readeflags();
+
+ /* Disable interrupts */
+ _disable();
+
+ return !!(Flags & EFLAGS_INTERRUPT_MASK);
+}
+
+
+BOOLEAN
+NTAPI
+KeDisconnectInterrupt(IN PKINTERRUPT Interrupt)
+{
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+VOID
+NTAPI
+KeInitializeInterrupt(IN PKINTERRUPT Interrupt,
+ IN PKSERVICE_ROUTINE ServiceRoutine,
+ IN PVOID ServiceContext,
+ IN PKSPIN_LOCK SpinLock,
+ IN ULONG Vector,
+ IN KIRQL Irql,
+ IN KIRQL SynchronizeIrql,
+ IN KINTERRUPT_MODE InterruptMode,
+ IN BOOLEAN ShareVector,
+ IN CHAR ProcessorNumber,
+ IN BOOLEAN FloatingSave)
+{
+ UNIMPLEMENTED;
+}
+
--- /dev/null
+/*
+ * PROJECT: ReactOS Kernel
+ * LICENSE: GPL - See COPYING in the top level directory
+ * PURPOSE: Routines for IRQL support
+ * PROGRAMMERS: Timo Kreuzer
+ */
+
+/* INCLUDES *****************************************************************/
+
+#include <ntoskrnl.h>
+#define NDEBUG
+#include <debug.h>
+
+/* FUNCTIONS ****************************************************************/
+
+NTKERNELAPI
+KIRQL
+KxGetCurrentIrql(VOID)
+{
+ return KeGetCurrentIrql();
+}
+
+NTKERNELAPI
+VOID
+KxLowerIrql(IN KIRQL NewIrql)
+{
+ KeLowerIrql(NewIrql);
+}
+
+NTKERNELAPI
+KIRQL
+KxRaiseIrql(IN KIRQL NewIrql)
+{
+ return KfRaiseIrql(NewIrql);
+}
+
+NTKERNELAPI
+KIRQL
+KxRaiseIrqlToDpcLevel(VOID)
+{
+ return KeRaiseIrqlToDpcLevel();
+}
+
+
+/* EOF */
--- /dev/null
+/*
+ * PROJECT: ReactOS Kernel
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: ntoskrnl/ke/i386/kiinit.c
+ * PURPOSE: Kernel Initialization for x86 CPUs
+ * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
+ * Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES *****************************************************************/
+
+#include <ntoskrnl.h>
+#define NDEBUG
+#include <debug.h>
+
+#define REQUIRED_FEATURE_BITS (KF_RDTSC|KF_CR4|KF_CMPXCHG8B|KF_XMMI|KF_XMMI64| \
+ KF_NX_BIT)
+
+/* GLOBALS *******************************************************************/
+
+/* Function pointer for early debug prints */
+ULONG (*FrLdrDbgPrint)(const char *Format, ...);
+
+/* Spinlocks used only on X86 */
+KSPIN_LOCK KiFreezeExecutionLock;
+
+/* BIOS Memory Map. Not NTLDR-compliant yet */
+extern ULONG KeMemoryMapRangeCount;
+extern ADDRESS_RANGE KeMemoryMap[64];
+
+KIPCR KiInitialPcr;
+
+/* FUNCTIONS *****************************************************************/
+
+VOID
+NTAPI
+KiInitMachineDependent(VOID)
+{
+#if 0
+ ULONG Protect;
+ ULONG CpuCount;
+ BOOLEAN FbCaching = FALSE;
+ NTSTATUS Status;
+ ULONG ReturnLength;
+ ULONG i, Affinity, Sample = 0;
+ PFX_SAVE_AREA FxSaveArea;
+ ULONG MXCsrMask = 0xFFBF;
+ ULONG Dummy[4];
+ KI_SAMPLE_MAP Samples[4];
+ PKI_SAMPLE_MAP CurrentSample = Samples;
+
+ /* Check for large page support */
+ if (KeFeatureBits & KF_LARGE_PAGE)
+ {
+ /* FIXME: Support this */
+ DPRINT1("Large Page support detected but not yet taken advantage of!\n");
+ }
+
+ /* Check for global page support */
+ if (KeFeatureBits & KF_GLOBAL_PAGE)
+ {
+ /* Do an IPI to enable it on all CPUs */
+ CpuCount = KeNumberProcessors;
+ KeIpiGenericCall(Ki386EnableGlobalPage, (ULONG_PTR)&CpuCount);
+ }
+
+ /* Check for PAT and/or MTRR support */
+ if (KeFeatureBits & (KF_PAT | KF_MTRR))
+ {
+ /* Query the HAL to make sure we can use it */
+ Status = HalQuerySystemInformation(HalFrameBufferCachingInformation,
+ sizeof(BOOLEAN),
+ &FbCaching,
+ &ReturnLength);
+ if ((NT_SUCCESS(Status)) && (FbCaching))
+ {
+ /* We can't, disable it */
+ KeFeatureBits &= ~(KF_PAT | KF_MTRR);
+ }
+ }
+
+ /* Check for PAT support and enable it */
+ if (KeFeatureBits & KF_PAT) KiInitializePAT();
+
+ /* Assume no errata for now */
+ SharedUserData->ProcessorFeatures[PF_FLOATING_POINT_PRECISION_ERRATA] = 0;
+
+ /* Check if we have an NPX */
+ if (KeI386NpxPresent)
+ {
+ /* Loop every CPU */
+ i = KeActiveProcessors;
+ for (Affinity = 1; i; Affinity <<= 1)
+ {
+ /* Check if this is part of the set */
+ if (i & Affinity)
+ {
+ /* Run on this CPU */
+ i &= ~Affinity;
+ KeSetSystemAffinityThread(Affinity);
+
+ /* Detect FPU errata */
+ if (KiIsNpxErrataPresent())
+ {
+ /* Disable NPX support */
+ KeI386NpxPresent = FALSE;
+ SharedUserData->
+ ProcessorFeatures[PF_FLOATING_POINT_PRECISION_ERRATA] =
+ TRUE;
+ break;
+ }
+ }
+ }
+ }
+
+ /* If there's no NPX, then we're emulating the FPU */
+ SharedUserData->ProcessorFeatures[PF_FLOATING_POINT_EMULATED] =
+ !KeI386NpxPresent;
+
+ /* Check if there's no NPX, so that we can disable associated features */
+ if (!KeI386NpxPresent)
+ {
+ /* Remove NPX-related bits */
+ KeFeatureBits &= ~(KF_XMMI64 | KF_XMMI | KF_FXSR | KF_MMX);
+
+ /* Disable kernel flags */
+ KeI386FxsrPresent = KeI386XMMIPresent = FALSE;
+
+ /* Disable processor features that might've been set until now */
+ SharedUserData->ProcessorFeatures[PF_FLOATING_POINT_PRECISION_ERRATA] =
+ SharedUserData->ProcessorFeatures[PF_XMMI64_INSTRUCTIONS_AVAILABLE] =
+ SharedUserData->ProcessorFeatures[PF_XMMI_INSTRUCTIONS_AVAILABLE] =
+ SharedUserData->ProcessorFeatures[PF_3DNOW_INSTRUCTIONS_AVAILABLE] =
+ SharedUserData->ProcessorFeatures[PF_MMX_INSTRUCTIONS_AVAILABLE] = 0;
+ }
+
+ /* Check for CR4 support */
+ if (KeFeatureBits & KF_CR4)
+ {
+ /* Do an IPI call to enable the Debug Exceptions */
+ CpuCount = KeNumberProcessors;
+ KeIpiGenericCall(Ki386EnableDE, (ULONG_PTR)&CpuCount);
+ }
+
+ /* Check if FXSR was found */
+ if (KeFeatureBits & KF_FXSR)
+ {
+ /* Do an IPI call to enable the FXSR */
+ CpuCount = KeNumberProcessors;
+ KeIpiGenericCall(Ki386EnableFxsr, (ULONG_PTR)&CpuCount);
+
+ /* Check if XMM was found too */
+ if (KeFeatureBits & KF_XMMI)
+ {
+ /* Do an IPI call to enable XMMI exceptions */
+ CpuCount = KeNumberProcessors;
+ KeIpiGenericCall(Ki386EnableXMMIExceptions, (ULONG_PTR)&CpuCount);
+
+ /* FIXME: Implement and enable XMM Page Zeroing for Mm */
+
+ /* Patch the RtlPrefetchMemoryNonTemporal routine to enable it */
+ Protect = MmGetPageProtect(NULL, RtlPrefetchMemoryNonTemporal);
+ MmSetPageProtect(NULL,
+ RtlPrefetchMemoryNonTemporal,
+ Protect | PAGE_IS_WRITABLE);
+ *(PCHAR)RtlPrefetchMemoryNonTemporal = 0x90;
+ MmSetPageProtect(NULL, RtlPrefetchMemoryNonTemporal, Protect);
+ }
+ }
+
+ /* Check for, and enable SYSENTER support */
+ KiRestoreFastSyscallReturnState();
+
+ /* Loop every CPU */
+ i = KeActiveProcessors;
+ for (Affinity = 1; i; Affinity <<= 1)
+ {
+ /* Check if this is part of the set */
+ if (i & Affinity)
+ {
+ /* Run on this CPU */
+ i &= ~Affinity;
+ KeSetSystemAffinityThread(Affinity);
+
+ /* Reset MHz to 0 for this CPU */
+ KeGetCurrentPrcb()->MHz = 0;
+
+ /* Check if we can use RDTSC */
+ if (KeFeatureBits & KF_RDTSC)
+ {
+ /* Start sampling loop */
+ for (;;)
+ {
+ /* Do a dummy CPUID to start the sample */
+ CPUID(Dummy, 0);
+
+ /* Fill out the starting data */
+ CurrentSample->PerfStart = KeQueryPerformanceCounter(NULL);
+ CurrentSample->TSCStart = __rdtsc();
+ CurrentSample->PerfFreq.QuadPart = -50000;
+
+ /* Sleep for this sample */
+ KeDelayExecutionThread(KernelMode,
+ FALSE,
+ &CurrentSample->PerfFreq);
+
+ /* Do another dummy CPUID */
+ CPUID(Dummy, 0);
+
+ /* Fill out the ending data */
+ CurrentSample->PerfEnd =
+ KeQueryPerformanceCounter(&CurrentSample->PerfFreq);
+ CurrentSample->TSCEnd = __rdtsc();
+
+ /* Calculate the differences */
+ CurrentSample->PerfDelta = CurrentSample->PerfEnd.QuadPart -
+ CurrentSample->PerfStart.QuadPart;
+ CurrentSample->TSCDelta = CurrentSample->TSCEnd -
+ CurrentSample->TSCStart;
+
+ /* Compute CPU Speed */
+ CurrentSample->MHz = (ULONG)((CurrentSample->TSCDelta *
+ CurrentSample->
+ PerfFreq.QuadPart + 500000) /
+ (CurrentSample->PerfDelta *
+ 1000000));
+
+ /* Check if this isn't the first sample */
+ if (Sample)
+ {
+ /* Check if we got a good precision within 1MHz */
+ if ((CurrentSample->MHz == CurrentSample[-1].MHz) ||
+ (CurrentSample->MHz == CurrentSample[-1].MHz + 1) ||
+ (CurrentSample->MHz == CurrentSample[-1].MHz - 1))
+ {
+ /* We did, stop sampling */
+ break;
+ }
+ }
+
+ /* Move on */
+ CurrentSample++;
+ Sample++;
+
+ if (Sample == sizeof(Samples) / sizeof(Samples[0]))
+ {
+ /* Restart */
+ CurrentSample = Samples;
+ Sample = 0;
+ }
+ }
+
+ /* Save the CPU Speed */
+ KeGetCurrentPrcb()->MHz = CurrentSample[-1].MHz;
+ }
+
+ /* Check if we have MTRR */
+ if (KeFeatureBits & KF_MTRR)
+ {
+ /* Then manually initialize MTRR for the CPU */
+ KiInitializeMTRR(i ? FALSE : TRUE);
+ }
+
+ /* Check if we have AMD MTRR and initialize it for the CPU */
+ if (KeFeatureBits & KF_AMDK6MTRR) KiAmdK6InitializeMTRR();
+
+ /* Check if this is a buggy Pentium and apply the fixup if so */
+ if (KiI386PentiumLockErrataPresent) KiI386PentiumLockErrataFixup();
+
+ /* Check if the CPU supports FXSR */
+ if (KeFeatureBits & KF_FXSR)
+ {
+ /* Get the current thread NPX state */
+ FxSaveArea = (PVOID)
+ ((ULONG_PTR)KeGetCurrentThread()->InitialStack -
+ NPX_FRAME_LENGTH);
+
+ /* Clear initial MXCsr mask */
+ FxSaveArea->U.FxArea.MXCsrMask = 0;
+
+ /* Save the current NPX State */
+#ifdef __GNUC__
+ asm volatile("fxsave %0\n\t" : "=m" (*FxSaveArea));
+#else
+ __asm fxsave [FxSaveArea]
+#endif
+ /* Check if the current mask doesn't match the reserved bits */
+ if (FxSaveArea->U.FxArea.MXCsrMask != 0)
+ {
+ /* Then use whatever it's holding */
+ MXCsrMask = FxSaveArea->U.FxArea.MXCsrMask;
+ }
+
+ /* Check if nobody set the kernel-wide mask */
+ if (!KiMXCsrMask)
+ {
+ /* Then use the one we calculated above */
+ KiMXCsrMask = MXCsrMask;
+ }
+ else
+ {
+ /* Was it set to the same value we found now? */
+ if (KiMXCsrMask != MXCsrMask)
+ {
+ /* No, something is definitely wrong */
+ KEBUGCHECKEX(MULTIPROCESSOR_CONFIGURATION_NOT_SUPPORTED,
+ KF_FXSR,
+ KiMXCsrMask,
+ MXCsrMask,
+ 0);
+ }
+ }
+
+ /* Now set the kernel mask */
+ KiMXCsrMask &= MXCsrMask;
+ }
+ }
+ }
+
+ /* Return affinity back to where it was */
+ KeRevertToUserAffinityThread();
+
+ /* NT allows limiting the duration of an ISR with a registry key */
+ if (KiTimeLimitIsrMicroseconds)
+ {
+ /* FIXME: TODO */
+ DPRINT1("ISR Time Limit not yet supported\n");
+ }
+#endif
+}
+
+VOID
+NTAPI
+KiInitializePcr(IN PKIPCR Pcr,
+ IN ULONG ProcessorNumber,
+ IN PKTHREAD IdleThread,
+ IN PVOID DpcStack)
+{
+ KDESCRIPTOR GdtDescriptor = {{0},0,0}, IdtDescriptor = {{0},0,0};
+ PKGDTENTRY64 TssEntry;
+ USHORT Tr = 0;
+
+ /* Zero out the PCR */
+ RtlZeroMemory(Pcr, PAGE_SIZE);
+
+ /* Set pointers to ourselves */
+ Pcr->Self = (PKPCR)Pcr;
+ Pcr->CurrentPrcb = &Pcr->Prcb;
+
+ /* Set the PCR Version */
+ Pcr->MajorVersion = PCR_MAJOR_VERSION;
+ Pcr->MinorVersion = PCR_MINOR_VERSION;
+
+ /* Set the PRCB Version */
+ Pcr->Prcb.MajorVersion = 1;
+ Pcr->Prcb.MinorVersion = 1;
+
+ /* Set the Build Type */
+ Pcr->Prcb.BuildType = 0;
+#ifndef CONFIG_SMP
+ Pcr->Prcb.BuildType |= PRCB_BUILD_UNIPROCESSOR;
+#endif
+#ifdef DBG
+ Pcr->Prcb.BuildType |= PRCB_BUILD_DEBUG;
+#endif
+
+ /* Set the Processor Number and current Processor Mask */
+ Pcr->Prcb.Number = (UCHAR)ProcessorNumber;
+ Pcr->Prcb.SetMember = 1 << ProcessorNumber;
+
+ /* Get GDT and IDT descriptors */
+ __sgdt(&GdtDescriptor.Limit);
+ __sidt(&IdtDescriptor.Limit);
+ Pcr->GdtBase = (PVOID)GdtDescriptor.Base;
+ Pcr->IdtBase = (PKIDTENTRY)IdtDescriptor.Base;
+
+ /* Get TSS Selector */
+ __str(&Tr);
+ ASSERT(Tr == KGDT_TSS);
+
+ /* Get TSS Entry */
+ TssEntry = KiGetGdtEntry(Pcr->GdtBase, Tr);
+
+ /* Get the KTSS itself */
+ Pcr->TssBase = KiGetGdtDescriptorBase(TssEntry);
+
+ Pcr->Prcb.RspBase = Pcr->TssBase->Rsp0; // FIXME
+
+ /* Set DPC Stack */
+ Pcr->Prcb.DpcStack = DpcStack;
+
+ /* Setup the processor set */
+ Pcr->Prcb.MultiThreadProcessorSet = Pcr->Prcb.SetMember;
+
+ /* Clear DR6/7 to cleanup bootloader debugging */
+ Pcr->Prcb.ProcessorState.SpecialRegisters.KernelDr6 = 0;
+ Pcr->Prcb.ProcessorState.SpecialRegisters.KernelDr7 = 0;
+
+ /* Set the Current Thread */
+ Pcr->Prcb.CurrentThread = IdleThread;
+
+ /* Start us out at PASSIVE_LEVEL */
+ Pcr->Irql = PASSIVE_LEVEL;
+ KeSetCurrentIrql(PASSIVE_LEVEL);
+
+}
+
+VOID
+NTAPI
+KiInitializeKernel(IN PKPROCESS InitProcess,
+ IN PKTHREAD InitThread,
+ IN PVOID IdleStack,
+ IN PKPRCB Prcb,
+ IN CCHAR Number,
+ IN PLOADER_PARAMETER_BLOCK LoaderBlock)
+{
+ ULONG FeatureBits;
+ ULONG PageDirectory[2];
+ PVOID DpcStack;
+
+ /* Detect and set the CPU Type */
+ KiSetProcessorType();
+
+ /* Initialize the Power Management Support for this PRCB */
+// PoInitializePrcb(Prcb);
+
+ /* Get the processor features for the CPU */
+ FeatureBits = KiGetFeatureBits();
+
+ /* Check if we support all needed features */
+ if ((FeatureBits & REQUIRED_FEATURE_BITS) != REQUIRED_FEATURE_BITS)
+ {
+ /* If not, bugcheck system */
+ DPRINT1("CPU doesn't have needed features! Has: 0x%x, required: 0x%x\n",
+ FeatureBits, REQUIRED_FEATURE_BITS);
+ KeBugCheck(0);
+ }
+
+ /* Set the default NX policy (opt-in) */
+ SharedUserData->NXSupportPolicy = NX_SUPPORT_POLICY_OPTIN;
+
+ /* Check if NPX is always on */
+ if (strstr(KeLoaderBlock->LoadOptions, "NOEXECUTE=ALWAYSON"))
+ {
+ /* Set it always on */
+ SharedUserData->NXSupportPolicy = NX_SUPPORT_POLICY_ALWAYSON;
+ FeatureBits |= KF_NX_ENABLED;
+ }
+ else if (strstr(KeLoaderBlock->LoadOptions, "NOEXECUTE=OPTOUT"))
+ {
+ /* Set it in opt-out mode */
+ SharedUserData->NXSupportPolicy = NX_SUPPORT_POLICY_OPTOUT;
+ FeatureBits |= KF_NX_ENABLED;
+ }
+ else if ((strstr(KeLoaderBlock->LoadOptions, "NOEXECUTE=OPTIN")) ||
+ (strstr(KeLoaderBlock->LoadOptions, "NOEXECUTE")))
+ {
+ /* Set the feature bits */
+ FeatureBits |= KF_NX_ENABLED;
+ }
+ else if ((strstr(KeLoaderBlock->LoadOptions, "NOEXECUTE=ALWAYSOFF")) ||
+ (strstr(KeLoaderBlock->LoadOptions, "EXECUTE")))
+ {
+ /* Set disabled mode */
+ SharedUserData->NXSupportPolicy = NX_SUPPORT_POLICY_ALWAYSOFF;
+ FeatureBits |= KF_NX_DISABLED;
+ }
+
+ /* Save feature bits */
+ Prcb->FeatureBits = FeatureBits;
+
+ /* Initialize the CPU features */
+ KiInitializeCpuFeatures();
+
+ /* Save CPU state */
+ KiSaveProcessorControlState(&Prcb->ProcessorState);
+
+ /* Get cache line information for this CPU */
+ KiGetCacheInformation();
+
+ /* Initialize spinlocks and DPC data */
+ KiInitSpinLocks(Prcb, Number);
+
+ /* Check if this is the Boot CPU */
+ if (Number == 0)
+ {
+ /* Set Node Data */
+ KeNodeBlock[0] = &KiNode0;
+ Prcb->ParentNode = KeNodeBlock[0];
+ KeNodeBlock[0]->ProcessorMask = Prcb->SetMember;
+
+ /* Set boot-level flags */
+ KeI386NpxPresent = TRUE;
+ KeI386CpuType = Prcb->CpuType;
+ KeI386CpuStep = Prcb->CpuStep;
+ KeProcessorArchitecture = PROCESSOR_ARCHITECTURE_INTEL;
+ KeProcessorLevel = (USHORT)Prcb->CpuType;
+ if (Prcb->CpuID) KeProcessorRevision = Prcb->CpuStep;
+ KeFeatureBits = FeatureBits;
+ KeI386FxsrPresent = (KeFeatureBits & KF_FXSR) ? TRUE : FALSE;
+ KeI386XMMIPresent = (KeFeatureBits & KF_XMMI) ? TRUE : FALSE;
+
+ /* Set the current MP Master KPRCB to the Boot PRCB */
+ Prcb->MultiThreadSetMaster = Prcb;
+
+ /* Lower to APC_LEVEL */
+ KeLowerIrql(APC_LEVEL);
+
+ /* Initialize some spinlocks */
+ KeInitializeSpinLock(&KiFreezeExecutionLock);
+
+ /* Initialize portable parts of the OS */
+ KiInitSystem();
+
+ /* Initialize the Idle Process and the Process Listhead */
+ InitializeListHead(&KiProcessListHead);
+ PageDirectory[0] = 0;
+ PageDirectory[1] = 0;
+ KeInitializeProcess(InitProcess,
+ 0,
+ 0xFFFFFFFF,
+ PageDirectory,
+ FALSE);
+ InitProcess->QuantumReset = MAXCHAR;
+ }
+ else
+ {
+ /* FIXME */
+ DPRINT1("SMP Boot support not yet present\n");
+ }
+
+ /* HACK for MmUpdatePageDir */
+ ((PETHREAD)InitThread)->ThreadsProcess = (PEPROCESS)InitProcess;
+
+ /* Setup the Idle Thread */
+ KeInitializeThread(InitProcess,
+ InitThread,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ IdleStack);
+
+ InitThread->NextProcessor = Number;
+ InitThread->Priority = HIGH_PRIORITY;
+ InitThread->State = Running;
+ InitThread->Affinity = 1 << Number;
+ InitThread->WaitIrql = DISPATCH_LEVEL;
+ InitProcess->ActiveProcessors = 1 << Number;
+
+ /* Set basic CPU Features that user mode can read */
+ SharedUserData->ProcessorFeatures[PF_MMX_INSTRUCTIONS_AVAILABLE] =
+ (KeFeatureBits & KF_MMX) ? TRUE: FALSE;
+ SharedUserData->ProcessorFeatures[PF_COMPARE_EXCHANGE_DOUBLE] =
+ (KeFeatureBits & KF_CMPXCHG8B) ? TRUE: FALSE;
+ SharedUserData->ProcessorFeatures[PF_XMMI_INSTRUCTIONS_AVAILABLE] =
+ ((KeFeatureBits & KF_FXSR) && (KeFeatureBits & KF_XMMI)) ? TRUE: FALSE;
+ SharedUserData->ProcessorFeatures[PF_XMMI64_INSTRUCTIONS_AVAILABLE] =
+ ((KeFeatureBits & KF_FXSR) && (KeFeatureBits & KF_XMMI64)) ? TRUE: FALSE;
+ SharedUserData->ProcessorFeatures[PF_3DNOW_INSTRUCTIONS_AVAILABLE] =
+ (KeFeatureBits & KF_3DNOW) ? TRUE: FALSE;
+ SharedUserData->ProcessorFeatures[PF_RDTSC_INSTRUCTION_AVAILABLE] =
+ (KeFeatureBits & KF_RDTSC) ? TRUE: FALSE;
+
+ /* Set up the thread-related fields in the PRCB */
+ Prcb->CurrentThread = InitThread;
+ Prcb->NextThread = NULL;
+ Prcb->IdleThread = InitThread;
+
+ /* Initialize the Kernel Executive */
+ ExpInitializeExecutive(Number, LoaderBlock);
+
+ /* Only do this on the boot CPU */
+ if (Number == 0)
+ {
+ /* Calculate the time reciprocal */
+ KiTimeIncrementReciprocal =
+ KiComputeReciprocal(KeMaximumIncrement,
+ &KiTimeIncrementShiftCount);
+
+ /* Update DPC Values in case they got updated by the executive */
+ Prcb->MaximumDpcQueueDepth = KiMaximumDpcQueueDepth;
+ Prcb->MinimumDpcRate = KiMinimumDpcRate;
+ Prcb->AdjustDpcThreshold = KiAdjustDpcThreshold;
+
+ /* Allocate the DPC Stack */
+ DpcStack = MmCreateKernelStack(FALSE, 0);
+ if (!DpcStack) KeBugCheckEx(NO_PAGES_AVAILABLE, 1, 0, 0, 0);
+ Prcb->DpcStack = DpcStack;
+
+ /* Allocate the IOPM save area. */
+// Ki386IopmSaveArea = ExAllocatePoolWithTag(PagedPool,
+// PAGE_SIZE * 2,
+// TAG('K', 'e', ' ', ' '));
+// if (!Ki386IopmSaveArea)
+// {
+// /* Bugcheck. We need this for V86/VDM support. */
+// KeBugCheckEx(NO_PAGES_AVAILABLE, 2, PAGE_SIZE * 2, 0, 0);
+// }
+ }
+
+ /* Raise to Dispatch */
+ KfRaiseIrql(DISPATCH_LEVEL);
+
+ /* Set the Idle Priority to 0. This will jump into Phase 1 */
+ KeSetPriorityThread(InitThread, 0);
+
+ /* If there's no thread scheduled, put this CPU in the Idle summary */
+ KiAcquirePrcbLock(Prcb);
+ if (!Prcb->NextThread) KiIdleSummary |= 1 << Number;
+ KiReleasePrcbLock(Prcb);
+
+ /* Raise back to HIGH_LEVEL and clear the PRCB for the loader block */
+ KfRaiseIrql(HIGH_LEVEL);
+ LoaderBlock->Prcb = 0;
+}
+
+VOID
+NTAPI
+KiSystemStartup(IN ULONG_PTR Dummy,
+ IN PROS_LOADER_PARAMETER_BLOCK LoaderBlock)
+{
+ FrLdrDbgPrint = ((PLOADER_PARAMETER_BLOCK)Dummy)->u.I386.CommonDataArea;
+ FrLdrDbgPrint("Hello from KiSystemStartup!!!\n");
+
+ /* HACK, because freeldr maps page 0 */
+ MiAddressToPte((PVOID)0)->u.Hard.Valid = 0;
+
+ KiSystemStartupReal((PLOADER_PARAMETER_BLOCK)Dummy);
+
+// KiRosPrepareForSystemStartup(Dummy, LoaderBlock);
+}
+
+
+VOID
+NTAPI
+KiSystemStartupReal(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
+{
+ ULONG Cpu;
+ PKTHREAD InitialThread;
+ ULONG64 InitialStack;
+ PKIPCR Pcr;
+
+ /* Save the loader block */
+ KeLoaderBlock = LoaderBlock;
+
+ /* Get the current CPU number */
+ Cpu = KeNumberProcessors++;
+
+ /* Set active processors */
+ KeActiveProcessors |= 1 << Cpu;
+
+ /* LoaderBlock initialization for Cpu 0 */
+ if (Cpu == 0)
+ {
+ /* Set the initial stack, idle thread and process */
+ LoaderBlock->KernelStack = (ULONG_PTR)P0BootStack;
+ LoaderBlock->Thread = (ULONG_PTR)&KiInitialThread;
+ LoaderBlock->Process = (ULONG_PTR)&KiInitialProcess.Pcb;
+ LoaderBlock->Prcb = (ULONG_PTR)&KiInitialPcr.Prcb;
+ }
+
+ /* Get Pcr from loader block */
+ Pcr = CONTAINING_RECORD(LoaderBlock->Prcb, KIPCR, Prcb);
+
+ /* Set the PRCB for this Processor */
+ KiProcessorBlock[Cpu] = &Pcr->Prcb;
+
+ /* Set GS base */
+ __writemsr(X86_MSR_GSBASE, (ULONG64)Pcr);
+ __writemsr(X86_MSR_KERNEL_GSBASE, (ULONG64)Pcr);
+
+ /* Load Ring 3 selectors for DS/ES/FS */
+ Ke386SetDs(KGDT_64_DATA | RPL_MASK);
+ Ke386SetEs(KGDT_64_DATA | RPL_MASK);
+ Ke386SetFs(KGDT_32_R3_TEB | RPL_MASK);
+
+ /* LDT is unused */
+// __lldt(0);
+
+ /* Align stack to 16 bytes */
+ LoaderBlock->KernelStack &= ~(16 - 1);
+
+ /* Save the initial thread and stack */
+ InitialStack = LoaderBlock->KernelStack; // Checkme
+ InitialThread = (PKTHREAD)LoaderBlock->Thread;
+
+ /* Clean the APC List Head */
+ InitializeListHead(&InitialThread->ApcState.ApcListHead[KernelMode]);
+
+ /* Set us as the current process */
+ InitialThread->ApcState.Process = (PVOID)LoaderBlock->Process;
+
+ /* Initialize the PCR */
+ KiInitializePcr(Pcr, Cpu, InitialThread, KiDoubleFaultStack);
+
+ /* Initial setup for the boot CPU */
+ if (Cpu == 0)
+ {
+ /* Setup the TSS descriptors and entries */
+ KiInitializeTss(Pcr->TssBase, InitialStack);
+
+ /* Setup the IDT */
+ KeInitExceptions();
+
+ /* HACK: misuse this function to pass a function pointer to kdcom */
+ KdDebuggerInitialize1((PVOID)FrLdrDbgPrint);
+
+ /* Initialize debugging system */
+ KdInitSystem(0, KeLoaderBlock);
+
+ /* Check for break-in */
+ if (KdPollBreakIn()) DbgBreakPointWithStatus(DBG_STATUS_CONTROL_C);
+
+ /* Hack! Wait for the debugger! */
+#ifdef _WINKD_
+ while (!KdPollBreakIn());
+ DbgBreakPointWithStatus(DBG_STATUS_CONTROL_C);
+#endif
+
+ }
+
+ DPRINT("Pcr = %p, Gdt = %p, Idt = %p, Tss = %p\n",
+ Pcr, Pcr->GdtBase, Pcr->IdtBase, Pcr->TssBase);
+
+ /* Initialize the Processor with HAL */
+ HalInitializeProcessor(Cpu, KeLoaderBlock);
+
+ /* Loop until we can release the freeze lock */
+ do
+ {
+ /* Loop until execution can continue */
+ while (*(volatile PKSPIN_LOCK*)&KiFreezeExecutionLock == (PVOID)1);
+ } while(InterlockedBitTestAndSet64((PLONG64)&KiFreezeExecutionLock, 0));
+
+ /* Raise to HIGH_LEVEL */
+ KfRaiseIrql(HIGH_LEVEL);
+
+ /* Switch to new kernel stack and start kernel bootstrapping */
+ KiSetupStackAndInitializeKernel(&KiInitialProcess.Pcb,
+ InitialThread,
+ (PVOID)InitialStack,
+ &Pcr->Prcb,
+ (CCHAR)Cpu,
+ KeLoaderBlock);
+}
+
+
+VOID
+NTAPI
+KiInitializeKernelAndGotoIdleLoop(IN PKPROCESS InitProcess,
+ IN PKTHREAD InitThread,
+ IN PVOID IdleStack,
+ IN PKPRCB Prcb,
+ IN CCHAR Number,
+ IN PLOADER_PARAMETER_BLOCK LoaderBlock)
+{
+// DbgBreakPointWithStatus(0);
+
+ /* Initialize kernel */
+ KiInitializeKernel(InitProcess,
+ InitThread,
+ IdleStack,
+ Prcb,
+ Number,
+ KeLoaderBlock);
+
+ /* Set the priority of this thread to 0 */
+ InitThread->Priority = 0;
+
+ /* Force interrupts enabled and lower IRQL back to DISPATCH_LEVEL */
+ _enable();
+ KeLowerIrql(DISPATCH_LEVEL);
+
+ /* Set the right wait IRQL */
+ InitThread->WaitIrql = DISPATCH_LEVEL;
+
+ /* Jump into the idle loop */
+ KiIdleLoop();
+}
--- /dev/null
+/*
+ * PROJECT: ReactOS HAL
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: hal/halx86/up/spinlock.c
+ * PURPOSE: Spinlock and Queued Spinlock Support
+ * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ntoskrnl.h>
+#define NDEBUG
+#include <debug.h>
+
+#undef KeAcquireSpinLock
+#undef KeReleaseSpinLock
+
+/* FUNCTIONS *****************************************************************/
+
+/*
+ * @implemented
+ */
+KIRQL
+KeAcquireSpinLockRaiseToSynch(PKSPIN_LOCK SpinLock)
+{
+#ifndef CONFIG_SMP
+ KIRQL OldIrql;
+ /* Simply raise to dispatch */
+ KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
+ return OldIrql;
+#else
+ UNIMPLEMENTED;
+#endif
+}
+
+/*
+ * @implemented
+ */
+KIRQL
+NTAPI
+KeAcquireSpinLockRaiseToDpc(PKSPIN_LOCK SpinLock)
+{
+#ifndef CONFIG_SMP
+ KIRQL OldIrql;
+ /* Simply raise to dispatch */
+ KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
+ return OldIrql;
+#else
+ UNIMPLEMENTED;
+#endif
+}
+
+/*
+ * @implemented
+ */
+VOID
+NTAPI
+KeReleaseSpinLock(PKSPIN_LOCK SpinLock,
+ KIRQL OldIrql)
+{
+#ifndef CONFIG_SMP
+ /* Simply lower IRQL back */
+ KeLowerIrql(OldIrql);
+#else
+ UNIMPLEMENTED;
+#endif
+}
+
+/*
+ * @implemented
+ */
+KIRQL
+KeAcquireQueuedSpinLock(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber)
+{
+#ifndef CONFIG_SMP
+ KIRQL OldIrql;
+ /* Simply raise to dispatch */
+ KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
+ return OldIrql;
+#else
+ UNIMPLEMENTED;
+#endif
+}
+
+/*
+ * @implemented
+ */
+KIRQL
+KeAcquireQueuedSpinLockRaiseToSynch(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber)
+{
+#ifndef CONFIG_SMP
+ KIRQL OldIrql;
+ /* Simply raise to dispatch */
+ KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
+ return OldIrql;
+#else
+ UNIMPLEMENTED;
+#endif
+}
+
+/*
+ * @implemented
+ */
+VOID
+KeAcquireInStackQueuedSpinLock(IN PKSPIN_LOCK SpinLock,
+ IN PKLOCK_QUEUE_HANDLE LockHandle)
+{
+#ifndef CONFIG_SMP
+ /* Simply raise to dispatch */
+ KeRaiseIrql(DISPATCH_LEVEL, &LockHandle->OldIrql);
+#else
+ UNIMPLEMENTED;
+#endif
+}
+
+/*
+ * @implemented
+ */
+VOID
+KeAcquireInStackQueuedSpinLockRaiseToSynch(IN PKSPIN_LOCK SpinLock,
+ IN PKLOCK_QUEUE_HANDLE LockHandle)
+{
+#ifndef CONFIG_SMP
+ /* Simply raise to synch */
+ KeRaiseIrql(SYNCH_LEVEL, &LockHandle->OldIrql);
+#else
+ UNIMPLEMENTED;
+#endif
+}
+
+/*
+ * @implemented
+ */
+VOID
+KeReleaseQueuedSpinLock(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber,
+ IN KIRQL OldIrql)
+{
+#ifndef CONFIG_SMP
+ /* Simply lower IRQL back */
+ KeLowerIrql(OldIrql);
+#else
+ UNIMPLEMENTED;
+#endif
+}
+
+/*
+ * @implemented
+ */
+VOID
+KeReleaseInStackQueuedSpinLock(IN PKLOCK_QUEUE_HANDLE LockHandle)
+{
+#ifndef CONFIG_SMP
+ /* Simply lower IRQL back */
+ KeLowerIrql(LockHandle->OldIrql);
+#else
+ UNIMPLEMENTED;
+#endif
+}
+
+/*
+ * @implemented
+ */
+BOOLEAN
+KeTryToAcquireQueuedSpinLockRaiseToSynch(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber,
+ IN PKIRQL OldIrql)
+{
+#ifndef CONFIG_SMP
+ /* Simply raise to dispatch */
+ KeRaiseIrql(DISPATCH_LEVEL, OldIrql);
+
+ /* Always return true on UP Machines */
+ return TRUE;
+#else
+ UNIMPLEMENTED;
+#endif
+}
+
+/*
+ * @implemented
+ */
+LOGICAL
+KeTryToAcquireQueuedSpinLock(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber,
+ OUT PKIRQL OldIrql)
+{
+#ifndef CONFIG_SMP
+ /* Simply raise to dispatch */
+ KeRaiseIrql(DISPATCH_LEVEL, OldIrql);
+
+ /* Always return true on UP Machines */
+ return TRUE;
+#else
+ UNIMPLEMENTED;
+#endif
+}
+
+/* EOF */
--- /dev/null
+/*
+ * PROJECT: ReactOS Kernel
+ * LICENSE: GPL - See COPYING in the top level directory
+ * PURPOSE: stubs
+ * PROGRAMMERS: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ntoskrnl.h>
+
+#define NDEBUG
+#include <debug.h>
+
+BOOLEAN
+NTAPI
+KeConnectInterrupt(IN PKINTERRUPT Interrupt)
+{
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+PVOID
+NTAPI
+KeSwitchKernelStack(PVOID StackBase, PVOID StackLimit)
+{
+ UNIMPLEMENTED;
+ return NULL;
+}
+
+BOOLEAN
+NTAPI
+KeSynchronizeExecution(
+ IN OUT PKINTERRUPT Interrupt,
+ IN PKSYNCHRONIZE_ROUTINE SynchronizeRoutine,
+ IN PVOID SynchronizeContext)
+{
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+VOID
+NTAPI
+KeUpdateRunTime(IN PKTRAP_FRAME TrapFrame,
+ IN KIRQL Irql)
+{
+ UNIMPLEMENTED;
+}
+
+VOID
+NTAPI
+KeUpdateSystemTime(IN PKTRAP_FRAME TrapFrame,
+ IN KIRQL Irql,
+ IN ULONG Increment)
+{
+ UNIMPLEMENTED;
+}
+
+
+NTSTATUS
+NTAPI
+KeUserModeCallback(IN ULONG RoutineIndex,
+ IN PVOID Argument,
+ IN ULONG ArgumentLength,
+ OUT PVOID *Result,
+ OUT PULONG ResultLength)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+ULONG
+NTAPI
+KiComputeTimerTableIndex(LONGLONG Timer)
+{
+ UNIMPLEMENTED;
+ return 0;
+}
+
+VOID
+KiIdleLoop()
+{
+ UNIMPLEMENTED;
+ for(;;);
+}
+
+VOID
+NTAPI
+KiInitializeUserApc(IN PKEXCEPTION_FRAME ExceptionFrame,
+ IN PKTRAP_FRAME TrapFrame,
+ IN PKNORMAL_ROUTINE NormalRoutine,
+ IN PVOID NormalContext,
+ IN PVOID SystemArgument1,
+ IN PVOID SystemArgument2)
+{
+ UNIMPLEMENTED;
+}
+
+VOID
+NTAPI
+KiSwapProcess(IN PKPROCESS NewProcess,
+ IN PKPROCESS OldProcess)
+{
+ UNIMPLEMENTED;
+}
+
+VOID
+KiSystemService(IN PKTHREAD Thread,
+ IN PKTRAP_FRAME TrapFrame,
+ IN ULONG Instruction)
+{
+ UNIMPLEMENTED;
+}
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+NtCallbackReturn
+( IN PVOID Result OPTIONAL, IN ULONG ResultLength, IN NTSTATUS Status )
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+NtContinue(
+ IN PCONTEXT ThreadContext, IN BOOLEAN RaiseAlert)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+NTSYSAPI
+NTSTATUS
+NTAPI
+NtRaiseException
+(IN PEXCEPTION_RECORD ExceptionRecord, IN PCONTEXT ThreadContext, IN BOOLEAN HandleException )
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+NTSTATUS
+NTAPI
+NtSetLdtEntries
+(ULONG Selector1, LDT_ENTRY LdtEntry1, ULONG Selector2, LDT_ENTRY LdtEntry2)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+NTSTATUS
+NTAPI
+NtVdmControl(IN ULONG ControlCode,
+ IN PVOID ControlData)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+NTSTATUS
+NTAPI
+KiCallUserMode(
+ IN PVOID *OutputBuffer,
+ IN PULONG OutputLength)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+#undef ExQueryDepthSList
+NTKERNELAPI
+USHORT
+ExQueryDepthSList(IN PSLIST_HEADER ListHead)
+{
+ return (USHORT)(ListHead->Alignment & 0xffff);
+}
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * FILE: ntoskrnl/ke/i386/thread.c
+ * PURPOSE: i386 Thread Context Creation
+ * PROGRAMMER: Alex Ionescu (alex@relsoft.net)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ntoskrnl.h>
+#define NDEBUG
+#include <debug.h>
+
+typedef struct _KSWITCHFRAME
+{
+ PVOID ExceptionList;
+ BOOLEAN ApcBypassDisable;
+ PVOID RetAddr;
+} KSWITCHFRAME, *PKSWITCHFRAME;
+
+typedef struct _KSTART_FRAME
+{
+ PKSYSTEM_ROUTINE SystemRoutine;
+ PKSTART_ROUTINE StartRoutine;
+ PVOID StartContext;
+ BOOLEAN UserThread;
+} KSTART_FRAME, *PKSTART_FRAME;
+
+typedef struct _KUINIT_FRAME
+{
+ KSWITCHFRAME CtxSwitchFrame;
+ KSTART_FRAME StartFrame;
+ KTRAP_FRAME TrapFrame;
+ //FX_SAVE_AREA FxSaveArea;
+} KUINIT_FRAME, *PKUINIT_FRAME;
+
+typedef struct _KKINIT_FRAME
+{
+ KSWITCHFRAME CtxSwitchFrame;
+ KSTART_FRAME StartFrame;
+ //FX_SAVE_AREA FxSaveArea;
+} KKINIT_FRAME, *PKKINIT_FRAME;
+
+/* FUNCTIONS *****************************************************************/
+
+VOID
+NTAPI
+KiInitializeContextThread(IN PKTHREAD Thread,
+ IN PKSYSTEM_ROUTINE SystemRoutine,
+ IN PKSTART_ROUTINE StartRoutine,
+ IN PVOID StartContext,
+ IN PCONTEXT ContextPointer)
+{
+ //PFX_SAVE_AREA FxSaveArea;
+ //PFXSAVE_FORMAT FxSaveFormat;
+ PKSTART_FRAME StartFrame;
+ PKSWITCHFRAME CtxSwitchFrame;
+ PKTRAP_FRAME TrapFrame;
+ CONTEXT LocalContext;
+ PCONTEXT Context = NULL;
+ ULONG ContextFlags;
+
+ /* Check if this is a With-Context Thread */
+ if (ContextPointer)
+ {
+ /* Set up the Initial Frame */
+ PKUINIT_FRAME InitFrame;
+ InitFrame = (PKUINIT_FRAME)((ULONG_PTR)Thread->InitialStack -
+ sizeof(KUINIT_FRAME));
+
+ /* Copy over the context we got */
+ RtlCopyMemory(&LocalContext, ContextPointer, sizeof(CONTEXT));
+ Context = &LocalContext;
+ ContextFlags = CONTEXT_CONTROL;
+
+ /* Zero out the trap frame and save area */
+ RtlZeroMemory(&InitFrame->TrapFrame,
+ KTRAP_FRAME_LENGTH);
+
+ /* Setup the Fx Area */
+ //FxSaveArea = &InitFrame->FxSaveArea;
+
+ /* Check if we support FXsr */
+// if (KeI386FxsrPresent)
+// {
+// /* Get the FX Save Format Area */
+// FxSaveFormat = (PFXSAVE_FORMAT)Context->ExtendedRegisters;
+//
+// /* Set an initial state */
+// FxSaveFormat->ControlWord = 0x27F;
+// FxSaveFormat->StatusWord = 0;
+// FxSaveFormat->TagWord = 0;
+// FxSaveFormat->ErrorOffset = 0;
+// FxSaveFormat->ErrorSelector = 0;
+// FxSaveFormat->DataOffset = 0;
+// FxSaveFormat->DataSelector = 0;
+// FxSaveFormat->MXCsr = 0x1F80;
+// }
+// else
+// {
+// /* Setup the regular save area */
+// Context->FloatSave.ControlWord = 0x27F;
+// Context->FloatSave.StatusWord = 0;
+// Context->FloatSave.TagWord = -1;
+// Context->FloatSave.ErrorOffset = 0;
+// Context->FloatSave.ErrorSelector = 0;
+// Context->FloatSave.DataOffset =0;
+// Context->FloatSave.DataSelector = 0;
+// }
+
+ /* Check if the CPU has NPX */
+ if (KeI386NpxPresent)
+ {
+ /* Set an intial NPX State */
+ //Context->FloatSave.Cr0NpxState = 0;
+ //FxSaveArea->Cr0NpxState = 0;
+ //FxSaveArea->NpxSavedCpu = 0;
+
+ /* Now set the context flags depending on XMM support */
+ //ContextFlags |= (KeI386FxsrPresent) ? CONTEXT_EXTENDED_REGISTERS :
+ // CONTEXT_FLOATING_POINT;
+
+ /* Set the Thread's NPX State */
+ Thread->NpxState = 0xA;
+ Thread->DispatcherHeader.NpxIrql = PASSIVE_LEVEL;
+ }
+ else
+ {
+ /* We'll use emulation */
+ //FxSaveArea->Cr0NpxState = CR0_EM;
+ Thread->NpxState = 0xA &~ CR0_MP;
+ }
+
+ /* Disable any debug regiseters */
+ Context->ContextFlags &= ~CONTEXT_DEBUG_REGISTERS;
+
+ /* Setup the Trap Frame */
+ TrapFrame = &InitFrame->TrapFrame;
+
+ /* Set up a trap frame from the context. */
+ KeContextToTrapFrame(Context,
+ NULL,
+ TrapFrame,
+ Context->ContextFlags | ContextFlags,
+ UserMode);
+
+ /* Set SS, DS, ES's RPL Mask properly */
+ TrapFrame->SegSs |= RPL_MASK;
+ TrapFrame->SegDs |= RPL_MASK;
+ TrapFrame->SegEs |= RPL_MASK;
+ TrapFrame->Dr7 = 0;
+
+ /* Set the previous mode as user */
+ TrapFrame->PreviousMode = UserMode;
+
+ /* Terminate the Exception Handler List */
+ TrapFrame->ExceptionFrame = 0;
+
+ /* Setup the Stack for KiThreadStartup and Context Switching */
+ StartFrame = &InitFrame->StartFrame;
+ CtxSwitchFrame = &InitFrame->CtxSwitchFrame;
+
+ /* Tell the thread it will run in User Mode */
+ Thread->PreviousMode = UserMode;
+
+ /* Tell KiThreadStartup of that too */
+ StartFrame->UserThread = TRUE;
+ }
+ else
+ {
+ /* Set up the Initial Frame for the system thread */
+ PKKINIT_FRAME InitFrame;
+ InitFrame = (PKKINIT_FRAME)((ULONG_PTR)Thread->InitialStack -
+ sizeof(KKINIT_FRAME));
+
+ /* Setup the Fx Area */
+ //FxSaveArea = &InitFrame->FxSaveArea;
+ //RtlZeroMemory(FxSaveArea, sizeof(FX_SAVE_AREA));
+
+ /* Check if we have Fxsr support */
+ if (KeI386FxsrPresent)
+ {
+ DPRINT1("FxsrPresent but did nothing\n");
+// /* Set the stub FX area */
+// FxSaveArea->U.FxArea.ControlWord = 0x27F;
+// FxSaveArea->U.FxArea.MXCsr = 0x1F80;
+// }
+// else
+// {
+// /* Set the stub FN area */
+// FxSaveArea->U.FnArea.ControlWord = 0x27F;
+// FxSaveArea->U.FnArea.TagWord = -1;
+ }
+
+ /* No NPX State */
+ Thread->NpxState = 0xA;
+
+ /* Setup the Stack for KiThreadStartup and Context Switching */
+ StartFrame = &InitFrame->StartFrame;
+ CtxSwitchFrame = &InitFrame->CtxSwitchFrame;
+
+ /* Tell the thread it will run in Kernel Mode */
+ Thread->PreviousMode = KernelMode;
+
+ /* Tell KiThreadStartup of that too */
+ StartFrame->UserThread = FALSE;
+ }
+
+ /* Now setup the remaining data for KiThreadStartup */
+ StartFrame->StartContext = StartContext;
+ StartFrame->StartRoutine = StartRoutine;
+ StartFrame->SystemRoutine = SystemRoutine;
+
+ /* And set up the Context Switch Frame */
+ CtxSwitchFrame->RetAddr = KiThreadStartup;
+ CtxSwitchFrame->ApcBypassDisable = TRUE;
+ CtxSwitchFrame->ExceptionList = EXCEPTION_CHAIN_END;;
+
+ /* Save back the new value of the kernel stack. */
+ Thread->KernelStack = (PVOID)CtxSwitchFrame;
+
+}
+
+/* EOF */
+
+
--- /dev/null
+/*
+ * FILE: ntoskrnl/ke/amd64/trap.S
+ * COPYRIGHT: See COPYING in the top level directory
+ * PURPOSE: System Traps, Entrypoints and Exitpoints
+ * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ******************************************************************/
+
+#include <ndk/amd64/asm.h>
+#include <ndk/amd64/asmmacro.S>
+
+/* GLOBALS *******************************************************************/
+
+.data
+
+.global _MsgUnimplemented
+_MsgUnimplemented:
+.asciz "WARNING: %s at %s:%d is UNIMPLEMENTED!\n"
+
+_MsgPageFault:
+.ascii "Page fault! Code = 0x%x, RIP = %p, FaultingAddress = %p\n\0"
+
+_MsgGeneralProtFault:
+.ascii "General protection fault at %p!\n\0"
+
+_MsgBreakpointTrap:
+.ascii "BreakpointTrap at %p\n\0"
+
+_MsgUnexpectedInterrupt:
+.ascii "UnexpectedInterrupt\n\0"
+
+_MsgInvalidOpcodeFault:
+.ascii "General protection fault at %p!\n\0"
+
+_MsgTrapInfo:
+.ascii "Trap: %s at %p\n\0"
+
+.macro TRAPINFO func
+#if 0
+ jmp 2f
+ .equ expr, 12
+1: .asciz "\func"
+2:
+ sub rsp, 0x20
+ lea rcx, _MsgTrapInfo[rip]
+ lea rdx, 1b[rip]
+ mov r8, [rbp + KTRAP_FRAME_Rip]
+ call _FrLdrDbgPrint[rip]
+ add rsp, 0x20
+#endif
+.endm
+
+/* Helper Macros *************************************************************/
+
+#define TRAPFLAG_VOLATILES 0x01
+#define TRAPFLAG_NONVOLATILES 0x02
+#define TRAPFLAG_XMM 0x04
+#define TRAPFLAG_SEGMENTS 0x08
+#define TRAPFLAG_DEBUG 0x10
+
+#define TRAPFLAG_SYSTEMSERVICE (TRAPFLAG_VOLATILES|TRAPFLAG_DEBUG)
+#define TRAPFLAG_ALL 0xff
+
+/*
+ * Stack Layout:
+ * |-------------------|
+ * | KTRAP_FRAME |
+ * |-------------------| <- rbp
+ * | 0x20 bytes params |
+ * |-------------------|
+ * | KEXCEPTION_FRAME |
+ * |-------------------|
+ * | EXCEPTION_RECORD |
+ * |-------------------|
+ * | 0x28 bytes params |
+ * |-------------------| <- rsp
+ *
+ */
+
+/*
+ * ENTER_TRAP_FRAME - Allocate SIZE_KTRAP_FRAME and save registers to it
+ */
+.macro ENTER_TRAP_FRAME AllocSize Flags
+.set SIZE_INITIAL_FRAME, 7 * 8
+//.set SIZE_LOCAL_DATA, SIZE_EXCEPTION_RECORD + 0x28
+.set SIZE_TRAP_FRAME_ALLOC, SIZE_KTRAP_FRAME - SIZE_INITIAL_FRAME + \AllocSize
+.set TRAPFLAGS, \Flags
+
+ /* Save rbp */
+ push rbp
+ .pushreg rbp
+
+ /* Make room for a KTRAP_FRAME and function parameters */
+ sub rsp, SIZE_TRAP_FRAME_ALLOC
+ .allocstack SIZE_TRAP_FRAME_ALLOC
+
+ /* Point rbp to the KTRAP_FRAME */
+ lea rbp, [rsp + \AllocSize]
+
+// KTRAP_FRAME_P1Home
+// KTRAP_FRAME_P2Home
+// KTRAP_FRAME_P3Home
+// KTRAP_FRAME_P4Home
+// KTRAP_FRAME_P5
+
+.if (TRAPFLAGS & TRAPFLAG_NONVOLATILES)
+ /* Save non-volatile registers */
+ mov [rbp + KTRAP_FRAME_Rbx], rbx
+ mov [rbp + KTRAP_FRAME_Rdi], rdi
+ mov [rbp + KTRAP_FRAME_Rsi], rsi
+.endif
+
+.if (TRAPFLAGS & TRAPFLAG_VOLATILES)
+ /* Save volatile registers */
+ mov [rbp + KTRAP_FRAME_Rax], rax
+ mov [rbp + KTRAP_FRAME_Rcx], rcx
+ mov [rbp + KTRAP_FRAME_Rdx], rdx
+ mov [rbp + KTRAP_FRAME_R8], r8
+ mov [rbp + KTRAP_FRAME_R9], r9
+ mov [rbp + KTRAP_FRAME_R10], r10
+ mov [rbp + KTRAP_FRAME_R11], r11
+.endif
+
+.if (TRAPFLAGS & TRAPFLAG_XMM)
+ /* Save xmm registers */
+// movdqa [rbp + KTRAP_FRAME_Xmm0], xmm0
+// movdqa [rbp + KTRAP_FRAME_Xmm1], xmm1
+// movdqa [rbp + KTRAP_FRAME_Xmm2], xmm2
+// movdqa [rbp + KTRAP_FRAME_Xmm3], xmm3
+// movdqa [rbp + KTRAP_FRAME_Xmm4], xmm4
+// movdqa [rbp + KTRAP_FRAME_Xmm5], xmm5
+.endif
+
+.if (TRAPFLAGS & TRAPFLAG_SEGMENTS)
+ /* Save segment selectors */
+ mov ax, ds
+ mov [rbp + KTRAP_FRAME_SegDs], ax
+ mov ax, es
+ mov [rbp + KTRAP_FRAME_SegEs], ax
+ mov ax, fs
+ mov [rbp + KTRAP_FRAME_SegFs], ax
+ mov ax, gs
+ mov [rbp + KTRAP_FRAME_SegGs], ax
+.endif
+
+ /* Save previous mode and swap gs when it was UserMode */
+ mov ax, [rbp + KTRAP_FRAME_SegCs]
+ and ax, 1
+ mov [rbp + KTRAP_FRAME_PreviousMode], al
+ jz 1f
+ swapgs
+1:
+
+ /* Save previous irql */
+ mov rax, cr8
+ mov [rbp + KTRAP_FRAME_PreviousIrql], al
+
+// KTRAP_FRAME_FaultIndicator
+// KTRAP_FRAME_ExceptionActive
+// KTRAP_FRAME_MxCsr
+
+.if (TRAPFLAGS & TRAPFLAG_DEBUG)
+ /* Save debug registers */
+ mov rax, dr0
+ mov [rbp + KTRAP_FRAME_Dr0], rax
+ mov rax, dr1
+ mov [rbp + KTRAP_FRAME_Dr1], rax
+ mov rax, dr2
+ mov [rbp + KTRAP_FRAME_Dr2], rax
+ mov rax, dr3
+ mov [rbp + KTRAP_FRAME_Dr3], rax
+ mov rax, dr6
+ mov [rbp + KTRAP_FRAME_Dr6], rax
+ mov rax, dr7
+ mov [rbp + KTRAP_FRAME_Dr7], rax
+.endif
+
+// KTRAP_FRAME_DebugControl
+// KTRAP_FRAME_LastBranchToRip
+// KTRAP_FRAME_LastBranchFromRip
+// KTRAP_FRAME_LastExceptionToRip
+// KTRAP_FRAME_LastExceptionFromRip
+// KTRAP_FRAME_TrapFrame
+
+ /* Make sure the direction flag is cleared */
+ cld
+.endm
+
+
+/*
+ * LEAVE_TRAP_FRAME - Restore registers and free stack space
+ */
+.macro LEAVE_TRAP_FRAME
+
+.if (TRAPFLAGS & TRAPFLAG_SEGMENTS)
+ /* Restore segment selectors */
+ mov ax, [rbp + KTRAP_FRAME_SegDs]
+ mov ds, ax
+ mov ax, [rbp + KTRAP_FRAME_SegEs]
+ mov es, ax
+ mov ax, [rbp + KTRAP_FRAME_SegFs]
+ mov fs, ax
+.endif
+
+ test byte ptr [rbp + KTRAP_FRAME_PreviousMode], 1
+ jz 1f
+ swapgs
+1:
+
+.if (TRAPFLAGS & TRAPFLAG_NONVOLATILES)
+ /* Restore non-volatile registers */
+ mov rbx, [rbp + KTRAP_FRAME_Rbx]
+ mov rdi, [rbp + KTRAP_FRAME_Rdi]
+ mov rsi, [rbp + KTRAP_FRAME_Rsi]
+.endif
+
+.if (TRAPFLAGS & TRAPFLAG_VOLATILES)
+ /* Restore volatile registers */
+ mov rax, [rbp + KTRAP_FRAME_Rax]
+ mov rcx, [rbp + KTRAP_FRAME_Rcx]
+ mov rdx, [rbp + KTRAP_FRAME_Rdx]
+ mov r8, [rbp + KTRAP_FRAME_R8]
+ mov r9, [rbp + KTRAP_FRAME_R9]
+ mov r10, [rbp + KTRAP_FRAME_R10]
+ mov r11, [rbp + KTRAP_FRAME_R11]
+.endif
+
+.if (TRAPFLAGS & TRAPFLAG_XMM)
+ /* Restore xmm registers */
+// movdqa xmm0, [rbp + KTRAP_FRAME_Xmm0]
+// movdqa xmm1, [rbp + KTRAP_FRAME_Xmm1]
+// movdqa xmm2, [rbp + KTRAP_FRAME_Xmm2]
+// movdqa xmm3, [rbp + KTRAP_FRAME_Xmm3]
+// movdqa xmm4, [rbp + KTRAP_FRAME_Xmm4]
+// movdqa xmm5, [rbp + KTRAP_FRAME_Xmm5]
+.endif
+
+ /* Restore rbp */
+ mov rbp, [rbp + KTRAP_FRAME_Rbp]
+
+ /* Adjust stack pointer (plus one qword for rbp, one for error code) */
+ add rsp, SIZE_TRAP_FRAME_ALLOC + 0x10
+.endm
+
+
+
+// rbp = TrapFrame, ecx = ExceptionCode, edx = NumParams, r9,r10,r11 = params
+_InternalDispatchException:
+
+ /* Allocate stack space for EXCEPTION_RECORD and KEXCEPTION_FRAME */
+ sub rsp, SIZE_EXCEPTION_RECORD + SIZE_KEXCEPTION_FRAME + 0x28
+
+ /* Set up EXCEPTION_RECORD */
+ mov [rsp + 0x28 + EXCEPTION_RECORD_ExceptionCode], ecx
+ xor rax, rax
+ mov [rsp + 0x28 + EXCEPTION_RECORD_ExceptionFlags], eax
+ mov [rsp + 0x28 + EXCEPTION_RECORD_ExceptionRecord], rax
+ mov rax, [rbp + KTRAP_FRAME_Rip]
+ mov [rsp + 0x28 + EXCEPTION_RECORD_ExceptionAddress], rax
+ mov [rsp + 0x28 + EXCEPTION_RECORD_NumberParameters], edx
+ mov [rsp + 0x28 + EXCEPTION_RECORD_ExceptionInformation + 0x00], r9
+ mov [rsp + 0x28 + EXCEPTION_RECORD_ExceptionInformation + 0x08], r10
+ mov [rsp + 0x28 + EXCEPTION_RECORD_ExceptionInformation + 0x10], r11
+
+ /* Set up KEXCEPTION_FRAME */
+ lea rdx, [rsp + 0x28 + SIZE_EXCEPTION_RECORD]
+ mov rax, [rbp + KTRAP_FRAME_Rbp]
+ mov [rdx + KEXCEPTION_FRAME_Rbp], rax
+ mov [rdx + KEXCEPTION_FRAME_Rbx], rbx
+ mov [rdx + KEXCEPTION_FRAME_Rdi], rdi
+ mov [rdx + KEXCEPTION_FRAME_Rsi], rsi
+ mov [rdx + KEXCEPTION_FRAME_R12], r12
+ mov [rdx + KEXCEPTION_FRAME_R13], r13
+ mov [rdx + KEXCEPTION_FRAME_R14], r14
+ mov [rdx + KEXCEPTION_FRAME_R15], r15
+ mov qword ptr [rdx + KEXCEPTION_FRAME_Return], 0
+
+ /* Call KiDispatchException */
+ lea rcx, [rsp + 0x28] // ExceptionRecord
+ // rdx already points to ExceptionFrame
+ mov r8, rbp // TrapFrame
+ mov r9b, [r8 + KTRAP_FRAME_PreviousMode] // PreviousMode
+ mov byte ptr [rsp + 0x20], 1 // FirstChance
+ call _KiDispatchException
+
+ add rsp, SIZE_EXCEPTION_RECORD + SIZE_KEXCEPTION_FRAME + 0x28
+ ret
+
+/* SOFTWARE INTERRUPT SERVICES ***********************************************/
+.text
+.code64
+
+.proc KiDivideErrorFault
+ .pushframe 0
+ /* Push pseudo error code */
+ push 0
+ .allocstack 0x8
+
+ UNIMPLEMENTED KiDivideErrorFault
+
+ jmp $
+.endproc
+
+.proc KiDebugTrapOrFault
+ .pushframe 0
+ /* Push pseudo error code */
+ push 0
+ .allocstack 0x8
+
+ ENTER_TRAP_FRAME (0x28), TRAPFLAG_ALL
+
+ TRAPINFO KiDebugTrapOrFault
+
+ /* Check if the frame was from kernelmode */
+ test word ptr [rbp + KTRAP_FRAME_SegCs], 3
+ jz KiDebugTrapOrFaultKMode
+
+ /* Enable interrupts for user-mode */
+ sti
+
+KiDebugTrapOrFaultKMode:
+
+ /* Dispatch the exception */
+ mov ecx, STATUS_SINGLE_STEP
+ mov edx, 0
+ mov r9, 0
+ mov r10, 0
+ mov r11, 0
+ call _InternalDispatchException
+
+ /* Return */
+ LEAVE_TRAP_FRAME
+ iretq
+.endproc
+
+.proc KiNmiInterrupt
+ .pushframe 0
+ /* Push pseudo error code */
+ push 0
+ .allocstack 0x8
+
+ UNIMPLEMENTED KiNmiInterrupt
+
+ jmp $
+.endproc
+
+.proc KiBreakpointTrap
+ .pushframe 0
+ /* Push pseudo error code */
+ push 0
+ .allocstack 0x8
+
+ ENTER_TRAP_FRAME (0x28), TRAPFLAG_ALL
+
+ TRAPINFO KiBreakpointTrap
+
+// lea rcx, _MsgBreakpointTrap[rip]
+// mov rdx, rsp
+// call _FrLdrDbgPrint[rip]
+
+ /* Dispatch the exception */
+ mov ecx, STATUS_BREAKPOINT
+ mov edx, 3
+ mov r9, 0
+ mov r10, 0
+ mov r11, 0
+ call _InternalDispatchException
+
+ /* Return */
+ LEAVE_TRAP_FRAME
+ iretq
+.endproc
+
+.proc KiOverflowTrap
+ .pushframe 0
+ /* Push pseudo error code */
+ push 0
+ .allocstack 0x8
+
+ UNIMPLEMENTED KiOverflowTrap
+ jmp $
+.endproc
+
+.proc KiBoundFault
+ .pushframe 0
+ /* Push pseudo error code */
+ push 0
+ .allocstack 8
+
+ sub rsp, 0x20
+ .allocstack 0x20
+
+ mov [rsp + 8], rbx
+ .savereg rbx, 8
+
+ UNIMPLEMENTED KiBoundFault
+
+ jmp $
+.endproc
+
+.proc KiInvalidOpcodeFault
+ .pushframe 0
+ /* Push pseudo error code */
+ push 0
+ .allocstack 0x8
+
+ ENTER_TRAP_FRAME (0x28), TRAPFLAG_ALL
+
+ TRAPINFO KiInvalidOpcodeFault
+
+// DISPATCH_EXCEPTION STATUS_BREAKPOINT, 3, 0, 0, 0
+
+ mov rdx, [rbp + KTRAP_FRAME_Rip]
+ lea rcx, _MsgInvalidOpcodeFault[rip]
+ call _FrLdrDbgPrint[rip]
+ jmp $
+
+ /* Return */
+ LEAVE_TRAP_FRAME
+ iretq
+.endproc
+
+.proc KiNpxNotAvailableFault
+ .pushframe 0
+ /* Push pseudo error code */
+ push 0
+ .allocstack 0x8
+
+ UNIMPLEMENTED KiNpxNotAvailableFault
+
+ jmp $
+.endproc
+
+.proc KiDoubleFaultAbort
+ .pushframe 0
+ /* Push pseudo error code */
+ push 0
+ .allocstack 0x8
+
+ /* Reserve stack space for parameters */
+ sub rsp, 0x28
+ .allocstack 0x28
+
+ /* Bugcheck code UNEXPECTED_KERNEL_MODE_TRAP */
+ mov rcx, 0x0000007F
+
+ /* Set double fault parameters */
+ mov rdx, 0x00000008
+ mov r8, 0
+ mov r9, 0
+ mov qword ptr [rsp + 0x20], 0
+
+ call _KeBugCheckEx
+
+ jmp $
+.endproc
+
+.proc KiNpxSegmentOverrunAbort
+ .pushframe 0
+ /* Push pseudo error code */
+ push 0
+ .allocstack 0x8
+
+ UNIMPLEMENTED KiNpxSegmentOverrunAbort
+
+ jmp $
+.endproc
+
+.proc KiInvalidTssFault
+ .pushframe 1
+ /* We have an error code */
+
+ UNIMPLEMENTED KiInvalidTssFault
+
+ jmp $
+.endproc
+
+
+.proc KiSegmentNotPresentFault
+ .pushframe 1
+ /* We have an error code */
+
+ UNIMPLEMENTED KiSegmentNotPresentFault
+
+ jmp $
+.endproc
+
+.proc KiStackFault
+ .pushframe 1
+ /* We have an error code */
+
+ UNIMPLEMENTED KiStackFault
+
+ jmp $
+.endproc
+
+
+.proc KiGeneralProtectionFault
+ .pushframe 1
+ /* We have an error code */
+
+ ENTER_TRAP_FRAME (0x28), TRAPFLAG_ALL
+
+ TRAPINFO KiGeneralProtectionFault
+
+// DISPATCH_EXCEPTION STATUS_BREAKPOINT, 3, 0, 0, 0
+
+ mov rdx, [rbp + KTRAP_FRAME_Rip]
+ lea rcx, _MsgGeneralProtFault[rip]
+ call _FrLdrDbgPrint[rip]
+ jmp $
+
+ /* Return */
+ LEAVE_TRAP_FRAME
+ iretq
+.endproc
+
+
+.proc KiPageFault
+ .pushframe 1
+ /* We have an error code */
+
+ ENTER_TRAP_FRAME (0x28), TRAPFLAG_ALL
+
+ TRAPINFO KiPageFault
+
+#if 0
+ lea rcx, _MsgPageFault[rip]
+ mov rdx, [rbp + KTRAP_FRAME_ErrorCode]
+ mov r8, [rbp + KTRAP_FRAME_Rip]
+ mov r9, [rbp + KTRAP_FRAME_FaultAddress]
+ call _FrLdrDbgPrint[rip]
+#endif
+
+ /* Save page fault address */
+ mov rdx, cr2
+ mov [rbp + KTRAP_FRAME_FaultAddress], rdx
+
+ /* Call page fault handler */
+ mov ecx, [rbp + KTRAP_FRAME_ErrorCode] // StoreInstruction
+ and ecx, 1
+ // rdx == Address
+ mov r8b, [rbp + KTRAP_FRAME_SegCs] // Mode
+ and r8b, 1
+ mov r9, rbp // TrapInformation
+ call _MmAccessFault
+
+ /* Check for success */
+ test eax, eax
+ jge PageFaultReturn
+
+ /* Set parameter 1 to error code */
+ mov r9d, [rbp + KTRAP_FRAME_ErrorCode]
+
+ /* Set parameter2 to faulting address */
+ mov r10, cr2 // Param2 = faulting address
+
+ cmp eax, STATUS_ACCESS_VIOLATION
+ je AccessViolation
+ cmp eax, STATUS_GUARD_PAGE_VIOLATION
+ je SpecialCode
+ cmp eax, STATUS_STACK_OVERFLOW
+ je SpecialCode
+
+InPageException:
+ /* Dispatch in-page exception */
+ mov ecx, STATUS_IN_PAGE_ERROR // ExceptionCode
+ mov r11d, eax // Param3 = Status
+ mov edx, 3 // ParamCount
+ call _InternalDispatchException
+ jmp PageFaultReturn
+
+AccessViolation:
+ /* Use more proper status code */
+ mov eax, KI_EXCEPTION_ACCESS_VIOLATION
+
+SpecialCode:
+ /* Setup a normal page fault exception */
+ mov ecx, eax // ExceptionCode
+ mov edx, 2 // ParamCount
+ call _InternalDispatchException
+
+PageFaultReturn:
+ LEAVE_TRAP_FRAME;
+ iretq
+.endproc
+
+
+.proc KiFloatingErrorFault
+ .pushframe 0
+ /* Push pseudo error code */
+ push 0
+ .allocstack 0x8
+
+ UNIMPLEMENTED KiFloatingErrorFault
+
+ jmp $
+.endproc
+
+.proc KiAlignmentFault
+ .pushframe 1
+ /* We have an error code */
+
+ UNIMPLEMENTED KiAlignmentFault
+
+ jmp $
+.endproc
+
+.proc KiMcheckAbort
+ .pushframe 0
+ /* Push pseudo error code */
+ push 0
+ .allocstack 0x08
+
+ UNIMPLEMENTED KiMcheckAbort
+
+ jmp $
+.endproc
+
+.proc KiXmmException
+ .pushframe 0
+ /* Push pseudo error code */
+ push 0
+ .allocstack 0x08
+
+ UNIMPLEMENTED KiXmmException
+
+ jmp $
+.endproc
+
+.proc KiApcInterrupt
+ .pushframe 1
+
+ UNIMPLEMENTED KiApcInterrupt
+
+ jmp $
+.endproc
+
+.proc KiRaiseAssertion
+ .pushframe 1
+
+ UNIMPLEMENTED KiRaiseAssertion
+
+ jmp $
+.endproc
+
+.proc KiDebugServiceTrap
+ .pushframe 0
+ /* Push pseudo error code */
+ push 0
+ .allocstack 0x08
+
+ ENTER_TRAP_FRAME (0x28), TRAPFLAG_ALL
+
+ TRAPINFO KiDebugServiceTrap
+
+ /* Increase Rip to skip the int3 */
+ inc qword ptr [rbp + KTRAP_FRAME_Rip]
+
+ /* Dispatch the exception */
+ mov ecx, STATUS_BREAKPOINT
+ mov edx, 3
+ mov r9, [rbp+KTRAP_FRAME_Rax] // Service
+ mov r10, [rbp+KTRAP_FRAME_Rcx] // Buffer
+ mov r11, [rbp+KTRAP_FRAME_Rdx] // Length
+ call _InternalDispatchException
+
+ LEAVE_TRAP_FRAME;
+ iretq
+.endproc
+
+
+.proc KiDpcInterrupt
+ .pushframe 1
+
+ UNIMPLEMENTED KiDpcInterrupt
+
+ jmp $
+.endproc
+
+
+.proc KiIpiInterrupt
+ .pushframe 1
+
+ UNIMPLEMENTED KiIpiInterrupt
+
+ jmp $
+.endproc
+
+
+.proc KiUnexpectedInterrupt
+ .pushframe 0
+ push 0
+ .allocstack 0x8
+
+ lea rcx, _MsgUnexpectedInterrupt[rip]
+ call _FrLdrDbgPrint[rip]
+
+ jmp $
+.endproc
+
+
+
return (USHORT)i;
}
-
VOID
FASTCALL
-KeRosDumpStackFrameArray(IN PULONG Frames,
+KeRosDumpStackFrameArray(IN PULONG_PTR Frames,
IN ULONG FrameCount)
{
- ULONG i, Addr;
+ ULONG i;
+ ULONG_PTR Addr;
BOOLEAN InSystem;
PVOID p;
{
/* Print out the module name */
Addr -= (ULONG_PTR)LdrEntry->DllBase;
- DbgPrint("<%wZ: %x>\n", &LdrEntry->FullDllName, Addr);
+ DbgPrint("<%wZ: %p>", &LdrEntry->FullDllName, (PVOID)Addr);
}
}
else
{
/* Print only the address */
- DbgPrint("<%x>\n", Addr);
+ DbgPrint("<%p>", (PVOID)Addr);
}
/* Go to the next frame */
VOID
NTAPI
-KeRosDumpStackFrames(IN PULONG Frame OPTIONAL,
+KeRosDumpStackFrames(IN PULONG_PTR Frame OPTIONAL,
IN ULONG FrameCount OPTIONAL)
{
- ULONG Frames[32];
+ ULONG_PTR Frames[32];
ULONG RealFrameCount;
/* If the caller didn't ask, assume 32 frames */
}
}
+
VOID
NTAPI
KeRosDumpTriageForBugZillaReport(VOID)
/* Show the technical Data */
sprintf(AnsiName,
- "\r\n\r\n*** STOP: 0x%08lX (0x%p,0x%p,0x%p,0x%p)\r\n\r\n",
- KiBugCheckData[0],
+ "\r\n\r\n*** STOP: 0x%p (0x%p,0x%p,0x%p,0x%p)\r\n\r\n",
+ (PVOID)KiBugCheckData[0],
(PVOID)KiBugCheckData[1],
(PVOID)KiBugCheckData[2],
(PVOID)KiBugCheckData[3],
}
}
+#ifndef _M_AMD64
/*
* @implemented
*/
/* Return the time value */
return CurrentTime.QuadPart;
}
+#endif
/*
* @implemented
/* Decrease the queue depth */
DpcData->DpcQueueDepth--;
-
+#ifndef _M_AMD64
/* Clear DPC Time */
Prcb->DebugDpcTime = 0;
-
+#endif
/* Release the lock */
KeReleaseSpinLockFromDpcLevel(&DpcData->DpcLock);
#if defined(_PPC_)
#include <ppcmmu/mmu.h>
#define KERNEL_RVA(x) RVA(x,0x80800000)
-#define KERNEL_DESCRIPTOR_PAGE(x) (((ULONG_PTR)x + KernelBase) >> PAGE_SHIFT)
+#define KERNEL_DESCRIPTOR_PAGE(x) (((ULONG_PTR)(x) + KernelBase) >> PAGE_SHIFT)
#else
#define KERNEL_RVA(x) RVA(x,KSEG0_BASE)
-#define KERNEL_DESCRIPTOR_PAGE(x) (((ULONG_PTR)x &~ KSEG0_BASE) >> PAGE_SHIFT)
+#define KERNEL_DESCRIPTOR_PAGE(x) (((ULONG_PTR)(x) & ~KSEG0_BASE) >> PAGE_SHIFT)
#endif
typedef struct _BIOS_MEMORY_DESCRIPTOR
/* GLOBALS *******************************************************************/
+/* Function pointer for early debug prints */
+ULONG (*FrLdrDbgPrint)(const char *Format, ...);
+
/* FreeLDR Loader Data */
PROS_LOADER_PARAMETER_BLOCK KeRosLoaderBlock;
ADDRESS_RANGE KeMemoryMap[64];
VOID
NTAPI
KiRosFixupComponentTree(IN PCONFIGURATION_COMPONENT_DATA p,
- IN ULONG i)
+ IN ULONG_PTR i)
{
PCONFIGURATION_COMPONENT pp;
/* Build entries for ReactOS memory ranges, which uses ARC Descriptors */
KiRosBuildOsMemoryMap();
-#if defined(_X86_)
+#if defined(_X86_) || defined(_M_AMD64)
/* Build entries for the reserved map, which uses ARC Descriptors */
KiRosBuildReservedMemoryMap();
#endif
/* Now mark the remainder of the FreeLDR 6MB area as "in use" */
KiRosAllocateNtDescriptor(LoaderMemoryData,
KERNEL_DESCRIPTOR_PAGE(RosEntry->ModEnd),
- KERNEL_DESCRIPTOR_PAGE((0x80800000 + 0x600000)) -
+ KERNEL_DESCRIPTOR_PAGE((RosLoaderBlock->KernelBase + 0x600000)) -
KERNEL_DESCRIPTOR_PAGE(RosEntry->ModEnd),
0,
&Base);
LoaderBlock->Extension->MajorVersion = 5;
LoaderBlock->Extension->MinorVersion = 2;
+
+// FIXME FIXME FIXME NOW!!!!
+
/* FreeLDR hackllocates 1536 static pages for the initial boot images */
LoaderBlock->Extension->LoaderPagesSpanned = 1536 * PAGE_SIZE;
/* Save pointer to ROS Block */
KeRosLoaderBlock = LoaderBlock;
+ /* Get debugging function */
+ FrLdrDbgPrint = LoaderBlock->FrLdrDbgPrint;
+
/* Save memory manager data */
KeMemoryMapRangeCount = 0;
if (LoaderBlock->Flags & MB_FLAGS_MMAP_INFO)
{
/* We have a memory map from the nice BIOS */
- ent = ((PULONG)(LoaderBlock->MmapAddr - sizeof(ULONG)));
+ ent = ((PULONG)(LoaderBlock->MmapAddr - sizeof(ULONG))); // FIXME: this is ugly
size = *ent;
i = 0;
/* Save data */
LoaderBlock->MmapLength = KeMemoryMapRangeCount * sizeof(ADDRESS_RANGE);
- LoaderBlock->MmapAddr = (ULONG)KeMemoryMap;
+ LoaderBlock->MmapAddr = (ULONG_PTR)KeMemoryMap;
}
else
{
/* Nothing from BIOS */
LoaderBlock->MmapLength = 0;
- LoaderBlock->MmapAddr = (ULONG)KeMemoryMap;
+ LoaderBlock->MmapAddr = (ULONG_PTR)KeMemoryMap;
}
/* Convert the loader block */
Prcb->VendorString[sizeof(Prcb->VendorString) - sizeof(CHAR)] = ANSI_NULL;
/* Now check the CPU Type */
- if (!strcmp(Prcb->VendorString, CmpIntelID))
+ if (!strcmp((PCHAR)Prcb->VendorString, CmpIntelID))
{
return CPU_INTEL;
}
- else if (!strcmp(Prcb->VendorString, CmpAmdID))
+ else if (!strcmp((PCHAR)Prcb->VendorString, CmpAmdID))
{
return CPU_AMD;
}
- else if (!strcmp(Prcb->VendorString, CmpCyrixID))
+ else if (!strcmp((PCHAR)Prcb->VendorString, CmpCyrixID))
{
DPRINT1("Cyrix CPU support not fully tested!\n");
return CPU_CYRIX;
}
- else if (!strcmp(Prcb->VendorString, CmpTransmetaID))
+ else if (!strcmp((PCHAR)Prcb->VendorString, CmpTransmetaID))
{
DPRINT1("Transmeta CPU support not fully tested!\n");
return CPU_TRANSMETA;
}
- else if (!strcmp(Prcb->VendorString, CmpCentaurID))
+ else if (!strcmp((PCHAR)Prcb->VendorString, CmpCentaurID))
{
DPRINT1("Centaur CPU support not fully tested!\n");
return CPU_CENTAUR;
}
- else if (!strcmp(Prcb->VendorString, CmpRiseID))
+ else if (!strcmp((PCHAR)Prcb->VendorString, CmpRiseID))
{
DPRINT1("Rise CPU support not fully tested!\n");
return CPU_RISE;
.endfunc
/*++
- * KiSwapContextInternal
+ * KiSwapContextInternal
*
+ * \brief
* The KiSwapContextInternal routine switches context to another thread.
*
+ * BOOLEAN USERCALL KiSwapContextInternal();
+ *
* Params:
* ESI - Pointer to the KTHREAD to which the caller wishes to
* switch to.
* EDI - Pointer to the KTHREAD to which the caller wishes to
* switch from.
*
- * Returns:
- * None.
+ * \returns
+ * APC state.
*
- * Remarks:
+ * \remarks
* Absolutely all registers except ESP can be trampled here for maximum code flexibility.
*
*--*/
#endif
.endfunc
-/*++
- * KiSwapContext
+/**
+ * KiSwapContext
*
+ * \brief
* The KiSwapContext routine switches context to another thread.
*
- * Params:
- * TargetThread - Pointer to the KTHREAD to which the caller wishes to
- * switch to.
+ * BOOLEAN FASTCALL
+ * KiSwapContext(PKTHREAD CurrentThread, PKTHREAD TargetThread);
*
- * Returns:
+ * \param CurrentThread
+ * Pointer to the KTHREAD of the current thread.
+ *
+ * \param TargetThread
+ * Pointer to the KTHREAD to which the caller wishes to switch to.
+ *
+ * \returns
* The WaitStatus of the Target Thread.
*
- * Remarks:
+ * \remarks
* This is a wrapper around KiSwapContextInternal which will save all the
* non-volatile registers so that the Internal function can use all of
* them. It will also save the old current thread and set the new one.
/* Save the exception list */
Teb = KeGetCurrentThread()->Teb;
- ExceptionList = Teb->Tib.ExceptionList;
+ ExceptionList = Teb->NtTib.ExceptionList;
/* Jump to user mode */
*UserEsp = NewStack;
if (CallbackStatus != STATUS_CALLBACK_POP_STACK)
{
/* Only restore the exception list if we didn't crash in ring 3 */
- Teb->Tib.ExceptionList = ExceptionList;
+ Teb->NtTib.ExceptionList = ExceptionList;
CallbackStatus = STATUS_SUCCESS;
}
else
KWAIT_BLOCK,
WaitListEntry);
Thread = WaitBlock->Thread;
- KiUnwaitThread(Thread, (NTSTATUS)QueueEntry, IO_NO_INCREMENT);
+ KiUnwaitThread(Thread, (LONG_PTR)QueueEntry, IO_NO_INCREMENT);
}
}
}
Thread = WaitBlock->Thread;
/* Remove the queue from the thread's wait list */
- Thread->WaitStatus = (NTSTATUS)Entry;
+ Thread->WaitStatus = (LONG_PTR)Entry;
if (Thread->WaitListEntry.Flink) RemoveEntryList(&Thread->WaitListEntry);
/* Increase the active threads and remove any wait reason */
IN PLARGE_INTEGER Timeout OPTIONAL)
{
PLIST_ENTRY QueueEntry;
- NTSTATUS Status;
+ LONG_PTR Status;
PKTHREAD Thread = KeGetCurrentThread();
PKQUEUE PreviousQueue;
PKWAIT_BLOCK WaitBlock = &Thread->WaitBlock[0];
SavedEntry = Entry;
/* Now try to do the exchange */
- Entry = InterlockedCompareExchangePointer(ListHead, ThreadAddr, Entry);
+ Entry = InterlockedCompareExchangePointer((PVOID*)ListHead,
+ ThreadAddr,
+ Entry);
/* Break out if the change was succesful */
} while (Entry != SavedEntry);
return Thread;
}
-NTSTATUS
+LONG_PTR
FASTCALL
KiSwapThread(IN PKTHREAD CurrentThread,
IN PKPRCB Prcb)
VOID
FASTCALL
KiUnwaitThread(IN PKTHREAD Thread,
- IN NTSTATUS WaitStatus,
+ IN LONG_PTR WaitStatus,
IN KPRIORITY Increment)
{
/* Unlink the thread */
NTAPI
MiFreeContiguousMemory(IN PVOID BaseAddress)
{
- KIRQL OldIrql;
PFN_NUMBER PageFrameIndex, LastPage, PageCount;
PMMPFN Pfn1, StartPfn;
PAGED_CODE();
//
MmUnmapIoSpace(BaseAddress, PageCount << PAGE_SHIFT);
- //
- // Lock the PFN database
- //
- OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock);
-
//
// Loop all the pages
//
//
MmReleasePageMemoryConsumer(MC_NPPOOL, PageFrameIndex);
} while (++PageFrameIndex < LastPage);
-
- //
- // Release the PFN lock
- //
- KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql);
}
/* PUBLIC FUNCTIONS ***********************************************************/
VOID
NTAPI
MmFreeContiguousMemorySpecifyCache(IN PVOID BaseAddress,
- IN ULONG NumberOfBytes,
+ IN SIZE_T NumberOfBytes,
IN MEMORY_CACHING_TYPE CacheType)
{
//
PVOID
NTAPI
-MiMapPagesToZeroInHyperSpace(IN PMMPFN *Pages,
+MiMapPagesToZeroInHyperSpace(IN PFN_NUMBER *Pages,
IN PFN_NUMBER NumberOfPages)
{
MMPTE TempPte;
PMMPTE PointerPte;
PFN_NUMBER Offset, PageFrameIndex;
- PMMPFN Page;
//
// Sanity checks
//
// Get the first page entry and its PFN
//
- Page = *Pages++;
- PageFrameIndex = MiGetPfnEntryIndex(Page);
+ PageFrameIndex = *Pages++;
//
// Write the PFN
IN MEMORY_CACHING_TYPE CacheType)
{
- PFN_TYPE Pfn, PageCount;
+ PFN_NUMBER Pfn, PageCount;
PMMPTE PointerPte;
PVOID BaseAddress;
MMPTE TempPte;
- PMMPFN Pfn1 = NULL;
MI_PFN_CACHE_ATTRIBUTE CacheAttribute;
BOOLEAN IsIoMapping;
//
Pfn = (PFN_NUMBER)(PhysicalAddress.QuadPart >> PAGE_SHIFT);
IsIoMapping = (Pfn > MmHighestPhysicalPage) ? TRUE : FALSE;
- if (!IsIoMapping) Pfn1 = MiGetPfnEntry(Pfn);
CacheAttribute = MiPlatformCacheAttributes[IsIoMapping][CacheType];
//
}
//
- // Sanity check and re-flush
+ // Re-flush
//
- Pfn = (PFN_NUMBER)(PhysicalAddress.QuadPart >> PAGE_SHIFT);
- ASSERT((Pfn1 == MiGetPfnEntry(Pfn)) || (Pfn1 == NULL));
KeFlushEntireTb(TRUE, TRUE);
KeInvalidateAllCaches();
VOID
NTAPI
MmUnmapIoSpace(IN PVOID BaseAddress,
- IN ULONG NumberOfBytes)
+ IN SIZE_T NumberOfBytes)
{
PFN_NUMBER PageCount, Pfn;
PMMPTE PointerPte;
PVOID
NTAPI
MmMapVideoDisplay(IN PHYSICAL_ADDRESS PhysicalAddress,
- IN ULONG NumberOfBytes,
+ IN SIZE_T NumberOfBytes,
IN MEMORY_CACHING_TYPE CacheType)
{
PAGED_CODE();
VOID
NTAPI
MmUnmapVideoDisplay(IN PVOID BaseAddress,
- IN ULONG NumberOfBytes)
+ IN SIZE_T NumberOfBytes)
{
//
// Call the real function
NTAPI
MmCreateMdl(IN PMDL Mdl,
IN PVOID Base,
- IN ULONG Length)
+ IN SIZE_T Length)
{
- ULONG Size;
+ SIZE_T Size;
//
// Check if we don't have an MDL built
/*
* @implemented
*/
-ULONG
+SIZE_T
NTAPI
MmSizeOfMdl(IN PVOID Base,
- IN ULONG Length)
+ IN SIZE_T Length)
{
//
// Return the MDL size
IN KPROCESSOR_MODE AccessMode,
IN LOCK_OPERATION Operation)
{
- PPFN_TYPE MdlPages;
+ PPFN_NUMBER MdlPages;
PVOID Base, Address, LastAddress, StartAddress;
ULONG LockPages, TotalPages;
NTSTATUS Status = STATUS_SUCCESS;
NTSTATUS ProbeStatus;
PMMPTE PointerPte, PointerPde, LastPte;
PFN_NUMBER PageFrameIndex;
- PMMPFN Pfn1;
BOOLEAN UsePfnLock;
KIRQL OldIrql;
DPRINT("Probing MDL: %p\n", Mdl);
//
// Get the PFN entry
//
- Pfn1 = MiGetPfnEntry(PageFrameIndex);
ASSERT((CurrentProcess == NULL) || (UsePfnLock == FALSE));
//
* PROGRAMMERS: ReactOS Portable Systems Group
*/
+#ifndef _M_AMD64
+
#define MI_MIN_PAGES_FOR_NONPAGED_POOL_TUNING ((255*1024*1024) >> PAGE_SHIFT)
#define MI_MIN_PAGES_FOR_SYSPTE_TUNING ((19*1024*1024) >> PAGE_SHIFT)
#define MI_MIN_PAGES_FOR_SYSPTE_BOOST ((32*1024*1024) >> PAGE_SHIFT)
#define BASE_POOL_TYPE_MASK 1
#define POOL_MAX_ALLOC (PAGE_SIZE - (sizeof(POOL_HEADER) + sizeof(LIST_ENTRY)))
+#endif
+
typedef struct _POOL_DESCRIPTOR
{
POOL_TYPE PoolType;
LIST_ENTRY ListHeads[POOL_LISTS_PER_PAGE];
} POOL_DESCRIPTOR, *PPOOL_DESCRIPTOR;
+#ifndef _WIN64
typedef struct _POOL_HEADER
{
union
};
};
} POOL_HEADER, *PPOOL_HEADER;
+#else
+typedef struct _POOL_HEADER
+{
+ union
+ {
+ struct
+ {
+ ULONG PreviousSize : 8;
+ ULONG PoolIndex : 8;
+ ULONG BlockSize : 8;
+ ULONG PoolType : 8;
+ };
+ ULONG Ulong1;
+ };
+ ULONG PoolTag;
+ union
+ {
+ PEPROCESS* ProcessBilled;
+ struct
+ {
+ USHORT AllocatorBackTraceIndex;
+ USHORT PoolTagHash;
+ };
+ };
+} POOL_HEADER, *PPOOL_HEADER;
+#endif
//
// Everything depends on this
//
-C_ASSERT(sizeof(POOL_HEADER) == 8);
C_ASSERT(sizeof(POOL_HEADER) == sizeof(LIST_ENTRY));
extern ULONG ExpNumberOfPagedPools;
extern MMPTE HyperTemplatePte;
-extern ULONG MmSizeOfNonPagedPoolInBytes;
-extern ULONG MmMaximumNonPagedPoolInBytes;
+extern ULONG_PTR MmSizeOfNonPagedPoolInBytes;
+extern ULONG_PTR MmMaximumNonPagedPoolInBytes;
extern PVOID MmNonPagedSystemStart;
extern PVOID MmNonPagedPoolStart;
extern PVOID MmNonPagedPoolExpansionStart;
extern PVOID MmNonPagedPoolEnd;
-extern ULONG MmSizeOfPagedPoolInBytes;
+extern ULONG_PTR MmSizeOfPagedPoolInBytes;
extern PVOID MmPagedPoolStart;
extern PVOID MmPagedPoolEnd;
extern PVOID MmSessionBase;
-extern ULONG MmSessionSize;
+extern ULONG_PTR MmSessionSize;
extern PMMPTE MmFirstReservedMappingPte, MmLastReservedMappingPte;
extern PMMPTE MiFirstReservedZeroingPte;
extern MI_PFN_CACHE_ATTRIBUTE MiPlatformCacheAttributes[2][MmMaximumCacheType];
extern PPHYSICAL_MEMORY_DESCRIPTOR MmPhysicalMemoryBlock;
-extern ULONG MmBootImageSize;
+extern ULONG_PTR MmBootImageSize;
extern PMMPTE MmSystemPtesStart[MaximumPtePoolTypes];
extern PMMPTE MmSystemPtesEnd[MaximumPtePoolTypes];
extern PMEMORY_ALLOCATION_DESCRIPTOR MxFreeDescriptor;
extern MEMORY_ALLOCATION_DESCRIPTOR MxOldFreeDescriptor;
-extern ULONG MxPfnAllocation;
+extern ULONG_PTR MxPfnAllocation;
extern MM_PAGED_POOL_INFO MmPagedPoolInfo;
extern RTL_BITMAP MiPfnBitMap;
extern KGUARDED_MUTEX MmPagedPoolMutex;
extern PVOID MmPagedPoolEnd;
extern PVOID MmNonPagedSystemStart;
extern PVOID MiSystemViewStart;
-extern ULONG MmSystemViewSize;
+extern ULONG_PTR MmSystemViewSize;
extern PVOID MmSessionBase;
extern PVOID MiSessionSpaceEnd;
-extern ULONG MmSizeOfPagedPoolInBytes;
+extern ULONG_PTR MmSizeOfPagedPoolInBytes;
extern PMMPTE MmSystemPagePtes;
extern PVOID MmSystemCacheStart;
extern PVOID MmSystemCacheEnd;
return FALSE;
}
+#ifndef _M_AMD64
/*
* @implemented
*/
//
return TRUE;
}
+#endif
/*
* @unimplemented
VOID
NTAPI
MmFreeNonCachedMemory(IN PVOID BaseAddress,
- IN ULONG NumberOfBytes)
+ IN SIZE_T NumberOfBytes)
{
PMDL Mdl;
PMMPTE PointerPte;
IN PVOID TrapInformation)
{
KIRQL OldIrql = KeGetCurrentIrql(), LockIrql;
- PMMPTE PointerPde, PointerPte;
+ PMMPTE PointerPte;
MMPTE TempPte;
PETHREAD CurrentThread;
NTSTATUS Status;
// Get the PTE and PDE
//
PointerPte = MiAddressToPte(Address);
- PointerPde = MiAddressToPde(Address);
//
// Check for dispatch-level snafu
//
// Is the PDE valid?
//
- if (!PointerPde->u.Hard.Valid == 0)
+ if (!MiIsPdeForAddressValid(Address))
{
//
// Debug spew (eww!)
//
// Now we SHOULD be good
//
- if (PointerPde->u.Hard.Valid == 0)
+ if (!MiIsPdeForAddressValid(Address))
{
//
// FIXFIX: Do the S-LIST hack
//
// Check for a fault on the page table or hyperspace itself
- // FIXME: Use MmHyperSpaceEnd
//
- if ((Address >= (PVOID)PTE_BASE) && (Address <= (PVOID)0xC0800000))
+ if ((Address >= (PVOID)PTE_BASE) && (Address <= (PVOID)HYPER_SPACE_END))
{
//
// This might happen...not sure yet
//
// Write subsystem data
//
- Peb->ImageSubSystem = NtHeaders->OptionalHeader.Subsystem;
- Peb->ImageSubSystemMajorVersion = NtHeaders->OptionalHeader.MajorSubsystemVersion;
- Peb->ImageSubSystemMinorVersion = NtHeaders->OptionalHeader.MinorSubsystemVersion;
+ Peb->ImageSubsystem = NtHeaders->OptionalHeader.Subsystem;
+ Peb->ImageSubsystemMajorVersion = NtHeaders->OptionalHeader.MajorSubsystemVersion;
+ Peb->ImageSubsystemMinorVersion = NtHeaders->OptionalHeader.MinorSubsystemVersion;
//
// Check for version data
//
// Set TIB Data
//
- Teb->Tib.ExceptionList = EXCEPTION_CHAIN_END;
- Teb->Tib.Self = (PNT_TIB)Teb;
+ Teb->NtTib.ExceptionList = EXCEPTION_CHAIN_END;
+ Teb->NtTib.Self = (PNT_TIB)Teb;
//
// Identify this as an OS/2 V3.0 ("Cruiser") TIB
//
- Teb->Tib.Version = 30 << 8;
+ Teb->NtTib.Version = 30 << 8;
//
// Set TEB Data
//
// Use initial TEB values
//
- Teb->Tib.StackBase = InitialTeb->StackBase;
- Teb->Tib.StackLimit = InitialTeb->StackLimit;
+ Teb->NtTib.StackBase = InitialTeb->StackBase;
+ Teb->NtTib.StackLimit = InitialTeb->StackLimit;
Teb->DeallocationStack = InitialTeb->AllocatedStackBase;
}
else
//
// Use grandparent TEB values
//
- Teb->Tib.StackBase = InitialTeb->PreviousStackBase;
- Teb->Tib.StackLimit = InitialTeb->PreviousStackLimit;
+ Teb->NtTib.StackBase = InitialTeb->PreviousStackBase;
+ Teb->NtTib.StackLimit = InitialTeb->PreviousStackLimit;
}
//
// Now move to the first free system PTE cluster
//
PreviousPte = PointerPte;
- PointerPte = MmSystemPteBase + PointerPte->u.List.NextEntry;
+ PointerPte = MmSystemPtesStart[SystemPtePoolType] +
+ PointerPte->u.List.NextEntry;
//
// Loop each cluster
// Go to the next cluster
//
PreviousPte = PointerPte;
- PointerPte = MmSystemPteBase + PointerPte->u.List.NextEntry;
+ PointerPte = MmSystemPtesStart[SystemPtePoolType] +
+ PointerPte->u.List.NextEntry;
ASSERT(PointerPte > PreviousPte);
}
// Zero PTEs
//
RtlZeroMemory(StartingPte, NumberOfPtes * sizeof(MMPTE));
- CurrentSize = (ULONG_PTR)(StartingPte - MmSystemPteBase);
+ CurrentSize = (ULONG_PTR)(StartingPte - MmSystemPtesStart[SystemPtePoolType]);
//
// Acquire the system PTE lock
//
// Get the first real cluster of PTEs and check if it's ours
//
- PointerPte = MmSystemPteBase + CurrentPte->u.List.NextEntry;
+ PointerPte = MmSystemPtesStart[SystemPtePoolType] +
+ CurrentPte->u.List.NextEntry;
if (CurrentSize < CurrentPte->u.List.NextEntry)
{
//
StartingPte->u.List.NextEntry = ((ULONG)0xFFFFF);
MmFirstFreeSystemPte[PoolType].u.Long = 0;
MmFirstFreeSystemPte[PoolType].u.List.NextEntry = StartingPte -
- MmSystemPteBase;
+ MmSystemPtesStart[PoolType];
//
// The second entry stores the size of this PTE space
--- /dev/null
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * FILE: ntoskrnl/mm/amd64/init.c
+ * PURPOSE: Memory Manager Initialization for amd64
+ *
+ * PROGRAMMERS: Timo kreuzer (timo.kreuzer@reactos.org)
+ * ReactOS Portable Systems Group
+ */
+
+/* INCLUDES ***************************************************************/
+
+#include <ntoskrnl.h>
+//#define NDEBUG
+#include <debug.h>
+
+#include "../ARM3/miarm.h"
+
+#ifndef KDBG
+extern PMMPTE MmDebugPte;
+#endif
+
+/* GLOBALS *****************************************************************/
+
+/* Sizes */
+ULONG64 MmBootImageSize;
+ULONG64 MmMinimumNonPagedPoolSize = 256 * 1024;
+ULONG64 MmSizeOfNonPagedPoolInBytes;
+ULONG64 MmMaximumNonPagedPoolInBytes;
+ULONG64 MmMaximumNonPagedPoolPercent;
+ULONG64 MmMinAdditionNonPagedPoolPerMb = 32 * 1024;
+ULONG64 MmMaxAdditionNonPagedPoolPerMb = 400 * 1024;
+ULONG64 MmDefaultMaximumNonPagedPool = 1024 * 1024;
+ULONG64 MmSessionSize = MI_SESSION_SIZE;
+ULONG64 MmSessionViewSize = MI_SESSION_VIEW_SIZE;
+ULONG64 MmSessionPoolSize = MI_SESSION_POOL_SIZE;
+ULONG64 MmSessionImageSize = MI_SESSION_IMAGE_SIZE;
+ULONG64 MmSystemViewSize = MI_SYSTEM_VIEW_SIZE;
+ULONG64 MmSizeOfPagedPoolInBytes = MI_MIN_INIT_PAGED_POOLSIZE;
+ULONG64 MiNonPagedSystemSize;
+
+/* Address ranges */
+ULONG64 MmUserProbeAddress = 0x7FFFFFF0000ULL;
+PVOID MmHighestUserAddress = (PVOID)0x7FFFFFEFFFFULL;
+PVOID MmSystemRangeStart = (PVOID)0xFFFF080000000000ULL;
+PVOID MmSessionBase; // FFFFF90000000000 = MiSessionPoolStart
+PVOID MiSessionPoolStart; // FFFFF90000000000 = MiSessionPoolEnd - MmSessionPoolSize
+PVOID MiSessionPoolEnd; // = MiSessionViewStart
+PVOID MiSessionViewStart; // = MiSessionViewEnd - MmSessionViewSize
+PVOID MiSessionViewEnd; // FFFFF97FFF000000
+PVOID MiSessionImageStart; // ?FFFFF97FFF000000 = MiSessionImageEnd - MmSessionImageSize
+PVOID MiSessionImageEnd; // FFFFF98000000000 = MiSessionSpaceEnd
+PVOID MiSessionSpaceEnd = MI_SESSION_SPACE_END; // FFFFF98000000000
+PVOID MmSystemCacheStart; // FFFFF98000000000
+PVOID MmSystemCacheEnd; // FFFFFA8000000000
+PVOID MmPagedPoolStart = MI_PAGED_POOL_START; // FFFFFA8000000000
+PVOID MmPagedPoolEnd; // FFFFFAA000000000
+PVOID MiSystemViewStart;
+PVOID MmNonPagedSystemStart; // FFFFFAA000000000
+PVOID MmNonPagedPoolStart;
+PVOID MmNonPagedPoolExpansionStart;
+PVOID MmNonPagedPoolEnd = MI_NONPAGED_POOL_END; // 0xFFFFFAE000000000
+
+PPHYSICAL_MEMORY_DESCRIPTOR MmPhysicalMemoryBlock;
+ULONG MmNumberOfPhysicalPages, MmHighestPhysicalPage, MmLowestPhysicalPage = -1; // FIXME: ULONG64
+
+ULONG MmNumberOfSystemPtes;
+PMMPTE MmSystemPagePtes;
+MMSUPPORT MmSystemCacheWs;
+
+RTL_BITMAP MiPfnBitMap;
+ULONG64 MxPfnAllocation;
+ULONG64 MxPfnSizeInBytes;
+
+PMEMORY_ALLOCATION_DESCRIPTOR MxFreeDescriptor;
+MEMORY_ALLOCATION_DESCRIPTOR MxOldFreeDescriptor;
+ULONG MiNumberDescriptors = 0;
+BOOLEAN MiIncludeType[LoaderMaximum];
+
+PFN_NUMBER MxFreePageBase;
+ULONG64 MxFreePageCount = 0;
+ULONG MxPhase = 0;
+
+PFN_NUMBER MmSystemPageDirectory;
+PFN_NUMBER MmSizeOfPagedPoolInPages = MI_MIN_INIT_PAGED_POOLSIZE / PAGE_SIZE;
+
+
+/* FUNCTIONS *****************************************************************/
+
+ULONG
+NoDbgPrint(const char *Format, ...)
+{
+ return 0;
+}
+
+VOID
+NTAPI
+MiEvaluateMemoryDescriptors(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
+{
+ PMEMORY_ALLOCATION_DESCRIPTOR MdBlock;
+ PLIST_ENTRY ListEntry;
+ PFN_NUMBER LastPage;
+ ULONG i;
+
+ /* Get the size of the boot loader's image allocations */
+ MmBootImageSize = KeLoaderBlock->Extension->LoaderPagesSpanned * PAGE_SIZE;
+ MmBootImageSize = ROUND_UP(MmBootImageSize, 4 * 1024 * 1024);
+
+ /* Instantiate memory that we don't consider RAM/usable */
+ for (i = 0; i < LoaderMaximum; i++) MiIncludeType[i] = TRUE;
+ MiIncludeType[LoaderBad] = FALSE;
+ MiIncludeType[LoaderFirmwarePermanent] = FALSE;
+ MiIncludeType[LoaderSpecialMemory] = FALSE;
+ MiIncludeType[LoaderBBTMemory] = FALSE;
+
+ /* Loop the memory descriptors */
+ for (ListEntry = LoaderBlock->MemoryDescriptorListHead.Flink;
+ ListEntry != &LoaderBlock->MemoryDescriptorListHead;
+ ListEntry = ListEntry->Flink)
+ {
+ /* Get the memory descriptor */
+ MdBlock = CONTAINING_RECORD(ListEntry,
+ MEMORY_ALLOCATION_DESCRIPTOR,
+ ListEntry);
+
+ /* Count it */
+ MiNumberDescriptors++;
+
+ /* Skip pages that are not part of the PFN database */
+ if (!MiIncludeType[MdBlock->MemoryType])
+ {
+ continue;
+ }
+
+ /* Add this to the total of pages */
+ MmNumberOfPhysicalPages += MdBlock->PageCount;
+
+ /* Check if this is the new lowest page */
+ if (MdBlock->BasePage < MmLowestPhysicalPage)
+ {
+ /* Update the lowest page */
+ MmLowestPhysicalPage = MdBlock->BasePage;
+ }
+
+ /* Check if this is the new highest page */
+ LastPage = MdBlock->BasePage + MdBlock->PageCount - 1;
+ if (LastPage > MmHighestPhysicalPage)
+ {
+ /* Update the highest page */
+ MmHighestPhysicalPage = LastPage;
+ }
+
+ /* Check if this is currently free memory */
+ if ((MdBlock->MemoryType == LoaderFree) ||
+ (MdBlock->MemoryType == LoaderLoadedProgram) ||
+ (MdBlock->MemoryType == LoaderFirmwareTemporary) ||
+ (MdBlock->MemoryType == LoaderOsloaderStack))
+ {
+ /* Check if this is the largest memory descriptor */
+ if (MdBlock->PageCount > MxFreePageCount)
+ {
+ /* For now, it is */
+ MxFreeDescriptor = MdBlock;
+ MxFreePageBase = MdBlock->BasePage;
+ MxFreePageCount = MdBlock->PageCount;
+ }
+ }
+ }
+}
+
+PFN_NUMBER
+NTAPI
+MxAllocEarlyPage()
+{
+ PFN_NUMBER Pfn;
+
+ /* Make sure we have enough pages */
+ if (!MxFreePageCount)
+ {
+ /* Crash the system */
+ KeBugCheckEx(INSTALL_MORE_MEMORY,
+ MmNumberOfPhysicalPages,
+ MxFreeDescriptor->PageCount,
+ MxOldFreeDescriptor.PageCount,
+ 1);
+ }
+
+ /* Use our lowest usable free pages */
+ Pfn = MxFreePageBase;
+ MxFreePageBase++;
+ MxFreePageCount--;
+ return Pfn;
+}
+
+PFN_NUMBER
+NTAPI
+MxAllocPage()
+{
+ return (MxPhase == 0) ? MxAllocEarlyPage() : MmAllocPage(MC_SYSTEM, 0);
+}
+
+PMMPTE
+NTAPI
+MxGetPte(PVOID Address)
+{
+ PMMPTE Pte;
+ MMPTE TmplPte;
+
+ /* Setup template pte */
+ TmplPte.u.Long = 0;
+ TmplPte.u.Flush.Valid = 1;
+ TmplPte.u.Flush.Write = 1;
+
+ /* Get a pointer to the PXE */
+ Pte = MiAddressToPxe(Address);
+ if (!Pte->u.Hard.Valid)
+ {
+ /* It's not valid, map it! */
+ TmplPte.u.Hard.PageFrameNumber = MxAllocPage();
+ *Pte = TmplPte;
+ }
+
+ /* Get a pointer to the PPE */
+ Pte = MiAddressToPpe(Address);
+ if (!Pte->u.Hard.Valid)
+ {
+ /* It's not valid, map it! */
+ TmplPte.u.Hard.PageFrameNumber = MxAllocPage();
+ *Pte = TmplPte;
+ }
+
+ /* Get a pointer to the PDE */
+ Pte = MiAddressToPde(Address);
+ if (!Pte->u.Hard.Valid)
+ {
+ /* It's not valid, map it! */
+ TmplPte.u.Hard.PageFrameNumber = MxAllocPage();
+ *Pte = TmplPte;
+ }
+
+ /* Get a pointer to the PTE */
+ Pte = MiAddressToPte(Address);
+ return Pte;
+}
+
+VOID
+NTAPI
+MxMapPage(PVOID Address)
+{
+ MMPTE TmplPte, *Pte;
+
+ /* Setup template pte */
+ TmplPte.u.Long = 0;
+ TmplPte.u.Flush.Valid = 1;
+ TmplPte.u.Flush.Write = 1;
+ TmplPte.u.Hard.PageFrameNumber = MxAllocPage();
+
+ /* Get the PTE for that page */
+ Pte = MxGetPte(Address);
+ ASSERT(Pte->u.Hard.Valid == 0);
+
+ /* Map a physical page */
+ *Pte = TmplPte;
+}
+
+VOID
+MxMapPageRange(PVOID Address, ULONG64 PageCount)
+{
+ while (PageCount--)
+ {
+ /* Map the page */
+ MxMapPage(Address);
+
+ /* Goto next page */
+ Address = (PVOID)((ULONG64)Address + PAGE_SIZE);
+ }
+}
+
+VOID
+NTAPI
+MiPreparePfnDatabse(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
+{
+ PMEMORY_ALLOCATION_DESCRIPTOR MdBlock;
+ PLIST_ENTRY ListEntry;
+ PUCHAR Page, FirstPage;
+ SIZE_T Size;
+
+ /* Calculate the size of the PFN database and convert to pages */
+ MxPfnSizeInBytes = ROUND_TO_PAGES((MmHighestPhysicalPage + 1) * sizeof(MMPFN));
+ MxPfnAllocation = MxPfnSizeInBytes >> PAGE_SHIFT;
+
+ /* Simply start at hardcoded address */
+ MmPfnDatabase = MI_PFN_DATABASE;
+
+ /* Loop the memory descriptors */
+ for (ListEntry = LoaderBlock->MemoryDescriptorListHead.Flink;
+ ListEntry != &LoaderBlock->MemoryDescriptorListHead;
+ ListEntry = ListEntry->Flink)
+ {
+ /* Get the memory descriptor */
+ MdBlock = CONTAINING_RECORD(ListEntry,
+ MEMORY_ALLOCATION_DESCRIPTOR,
+ ListEntry);
+
+ /* Skip pages that are not part of the PFN database */
+ if (MiIncludeType[MdBlock->MemoryType])
+ {
+ /* Get the base and size of this pfn database entry */
+ FirstPage = PAGE_ALIGN(&MmPfnDatabase[MdBlock->BasePage]);
+ Size = ROUND_TO_PAGES(MdBlock->PageCount * sizeof(MMPFN));
+
+ /* Loop the pages of this Pfn database entry */
+ for (Page = FirstPage; Page < FirstPage + Size; Page += PAGE_SIZE)
+ {
+ /* Is the page already mapped? */
+ if (!MmIsAddressValid(Page))
+ {
+ /* It's not, map it now */
+ MxMapPage(Page);
+ }
+ }
+
+ /* Zero out the pages */
+ RtlZeroMemory(FirstPage, Size);
+ }
+ }
+}
+
+
+VOID
+NTAPI
+MiInitializeSessionSpace(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
+{
+ /* Set up session space */
+ MiSessionSpaceEnd = (PVOID)MI_SESSION_SPACE_END;
+
+ /* This is where we will load Win32k.sys and the video driver */
+ MiSessionImageEnd = MiSessionSpaceEnd;
+ MiSessionImageStart = (PCHAR)MiSessionImageEnd - MmSessionImageSize;
+
+ /* The view starts right below the session working set (itself below
+ * the image area) */
+ MiSessionViewEnd = MI_SESSION_VIEW_END;
+ MiSessionViewStart = (PCHAR)MiSessionViewEnd - MmSessionViewSize;
+ ASSERT(IS_PAGE_ALIGNED(MiSessionViewStart));
+
+ /* Session pool follows */
+ MiSessionPoolEnd = MiSessionViewStart;
+ MiSessionPoolStart = (PCHAR)MiSessionPoolEnd - MmSessionPoolSize;
+ ASSERT(IS_PAGE_ALIGNED(MiSessionPoolStart));
+
+ /* And it all begins here */
+ MmSessionBase = MiSessionPoolStart;
+
+ /* System view space ends at session space, so now that we know where
+ * this is, we can compute the base address of system view space itself. */
+ MiSystemViewStart = (PCHAR)MmSessionBase - MmSystemViewSize;
+ ASSERT(IS_PAGE_ALIGNED(MiSystemViewStart));
+
+ /* Sanity checks */
+ ASSERT(MiSessionViewEnd <= MiSessionImageStart);
+ ASSERT(MmSessionBase <= MiSessionPoolStart);
+}
+
+VOID
+MiInitializePageTable()
+{
+ ULONG64 PageFrameOffset;
+ MMPTE TmplPte, *Pte;
+ PFN_NUMBER PageCount;
+
+ /* HACK: don't use freeldr debug print anymore */
+ FrLdrDbgPrint = NoDbgPrint;
+
+ /* Get current directory base */
+ MmSystemPageDirectory = ((PMMPTE)PXE_SELFMAP)->u.Hard.PageFrameNumber;
+ PageFrameOffset = MmSystemPageDirectory << PAGE_SHIFT;
+ ASSERT(PageFrameOffset == __readcr3());
+
+ /* Set directory base for the system process */
+ PsGetCurrentProcess()->Pcb.DirectoryTableBase[0] = PageFrameOffset;
+
+ /* Enable global pages */
+ __writecr4(__readcr4() | CR4_PGE);
+ ASSERT(__readcr4() & CR4_PGE);
+
+ /* Loop the user mode PXEs */
+ for (Pte = MiAddressToPxe(0);
+ Pte <= MiAddressToPxe(MmHighestUserAddress);
+ Pte++)
+ {
+ /* Zero the PXE, clear all mappings */
+ Pte->u.Long = 0;
+ }
+
+ /* Flush the TLB */
+ KeFlushCurrentTb();
+
+ /* Set up a template PTE */
+ TmplPte.u.Long = 0;
+ TmplPte.u.Flush.Valid = 1;
+ TmplPte.u.Flush.Write = 1;
+ HyperTemplatePte = TmplPte;
+
+ /* Create PDPTs (72 KB) for shared system address space,
+ * skip page tables and hyperspace */
+
+ /* Loop the PXEs */
+ for (Pte = MiAddressToPxe((PVOID)(HYPER_SPACE_END + 1));
+ Pte <= MiAddressToPxe(MI_HIGHEST_SYSTEM_ADDRESS);
+ Pte++)
+ {
+ /* Is the PXE already valid? */
+ if (!Pte->u.Hard.Valid)
+ {
+ /* It's not Initialize it */
+ TmplPte.u.Flush.PageFrameNumber = MxAllocPage();
+ *Pte = TmplPte;
+
+ /* Zero the page. The PXE is the PTE for the PDPT. */
+ RtlZeroMemory(MiPteToAddress(Pte), PAGE_SIZE);
+ }
+ }
+
+ /* Setup the mapping PTEs */
+ MmFirstReservedMappingPte = MxGetPte((PVOID)MI_MAPPING_RANGE_START);
+ MmFirstReservedMappingPte->u.Hard.PageFrameNumber = MI_HYPERSPACE_PTES;
+ MmLastReservedMappingPte = MiAddressToPte((PVOID)MI_MAPPING_RANGE_END);
+
+#ifndef KDBG
+ /* Setup debug mapping PTE */
+ MmDebugPte = MxGetPte(MI_DEBUG_MAPPING);
+#endif
+}
+
+VOID
+NTAPI
+MiBuildNonPagedPool(VOID)
+{
+ PMMPTE Pte;
+ PFN_COUNT PageCount;
+
+ /* Check if this is a machine with less than 256MB of RAM, and no overide */
+ if ((MmNumberOfPhysicalPages <= MI_MIN_PAGES_FOR_NONPAGED_POOL_TUNING) &&
+ !(MmSizeOfNonPagedPoolInBytes))
+ {
+ /* Force the non paged pool to be 2MB so we can reduce RAM usage */
+ MmSizeOfNonPagedPoolInBytes = 2 * 1024 * 1024;
+ }
+
+ /* Check if the user gave a ridicuously large nonpaged pool RAM size */
+ if ((MmSizeOfNonPagedPoolInBytes >> PAGE_SHIFT) >
+ (MmNumberOfPhysicalPages * 7 / 8))
+ {
+ /* More than 7/8ths of RAM was dedicated to nonpaged pool, ignore! */
+ MmSizeOfNonPagedPoolInBytes = 0;
+ }
+
+ /* Check if no registry setting was set, or if the setting was too low */
+ if (MmSizeOfNonPagedPoolInBytes < MmMinimumNonPagedPoolSize)
+ {
+ /* Start with the minimum (256 KB) and add 32 KB for each MB above 4 */
+ MmSizeOfNonPagedPoolInBytes = MmMinimumNonPagedPoolSize;
+ MmSizeOfNonPagedPoolInBytes += (MmNumberOfPhysicalPages - 1024) /
+ 256 * MmMinAdditionNonPagedPoolPerMb;
+ }
+
+ /* Check if the registy setting or our dynamic calculation was too high */
+ if (MmSizeOfNonPagedPoolInBytes > MI_MAX_INIT_NONPAGED_POOL_SIZE)
+ {
+ /* Set it to the maximum */
+ MmSizeOfNonPagedPoolInBytes = MI_MAX_INIT_NONPAGED_POOL_SIZE;
+ }
+
+ /* Check if a percentage cap was set through the registry */
+ if (MmMaximumNonPagedPoolPercent)
+ {
+ /* Don't feel like supporting this right now */
+ UNIMPLEMENTED;
+ }
+
+ /* Page-align the nonpaged pool size */
+ MmSizeOfNonPagedPoolInBytes &= ~(PAGE_SIZE - 1);
+
+ /* Now, check if there was a registry size for the maximum size */
+ if (!MmMaximumNonPagedPoolInBytes)
+ {
+ /* Start with the default (1MB) and add 400 KB for each MB above 4 */
+ MmMaximumNonPagedPoolInBytes = MmDefaultMaximumNonPagedPool;
+ MmMaximumNonPagedPoolInBytes += (MmNumberOfPhysicalPages - 1024) /
+ 256 * MmMaxAdditionNonPagedPoolPerMb;
+ }
+
+ /* Don't let the maximum go too high */
+ if (MmMaximumNonPagedPoolInBytes > MI_MAX_NONPAGED_POOL_SIZE)
+ {
+ /* Set it to the upper limit */
+ MmMaximumNonPagedPoolInBytes = MI_MAX_NONPAGED_POOL_SIZE;
+ }
+
+ /* Put non paged pool to the end of the region */
+ MmNonPagedPoolStart = (PCHAR)MmNonPagedPoolEnd - MmMaximumNonPagedPoolInBytes;
+
+ /* Make sure it doesn't collide with the PFN database */
+ if ((PCHAR)MmNonPagedPoolStart < (PCHAR)MmPfnDatabase + MxPfnSizeInBytes)
+ {
+ /* Put non paged pool after the PFN database */
+ MmNonPagedPoolStart = (PCHAR)MmPfnDatabase + MxPfnSizeInBytes;
+ MmMaximumNonPagedPoolInBytes = (ULONG64)MmNonPagedPoolEnd -
+ (ULONG64)MmNonPagedPoolStart;
+ }
+
+ ASSERT(IS_PAGE_ALIGNED(MmNonPagedPoolStart));
+
+ /* Calculate the nonpaged pool expansion start region */
+ MmNonPagedPoolExpansionStart = (PCHAR)MmNonPagedPoolStart +
+ MmSizeOfNonPagedPoolInBytes;
+ ASSERT(IS_PAGE_ALIGNED(MmNonPagedPoolExpansionStart));
+
+ /* Map the nonpaged pool */
+ PageCount = (MmSizeOfNonPagedPoolInBytes + PAGE_SIZE - 1) / PAGE_SIZE;
+ MxMapPageRange(MmNonPagedPoolStart, PageCount);
+
+ /* Loop the non paged pool extension PTEs */
+ for (Pte = MiAddressToPte(MmNonPagedPoolExpansionStart);
+ Pte <= MiAddressToPte(MmNonPagedPoolEnd);
+ Pte++)
+ {
+ /* Create PXE, PPE, PDE and zero the PTE */
+ MxGetPte(MiPteToAddress(Pte))->u.Long = 0;
+ }
+
+ /* Initialize the ARM3 nonpaged pool */
+ MiInitializeArmPool();
+
+ /* Initialize the nonpaged pool */
+ InitializePool(NonPagedPool, 0);
+}
+
+VOID
+NTAPI
+MiBuildSystemPteSpace()
+{
+ PMMPTE Pte, StartPte, EndPte;
+
+ /* Use the default numer of system PTEs */
+ MmNumberOfSystemPtes = MI_NUMBER_SYSTEM_PTES;
+
+ /* System PTE pool is below the PFN database */
+ MiNonPagedSystemSize = (MmNumberOfSystemPtes + 1) * PAGE_SIZE;
+ MmNonPagedSystemStart = (PCHAR)MmPfnDatabase - MiNonPagedSystemSize;
+ MmNonPagedSystemStart = MM_ROUND_DOWN(MmNonPagedSystemStart, 512 * PAGE_SIZE);
+
+ /* Don't let it go below the minimum */
+ if (MmNonPagedSystemStart < (PVOID)MI_NON_PAGED_SYSTEM_START_MIN)
+ {
+ /* This is a hard-coded limit in the Windows NT address space */
+ MmNonPagedSystemStart = (PVOID)MI_NON_PAGED_SYSTEM_START_MIN;
+
+ /* Reduce the amount of system PTEs to reach this point */
+ MmNumberOfSystemPtes = ((ULONG64)MmPfnDatabase -
+ (ULONG64)MmNonPagedSystemStart) >>
+ PAGE_SHIFT;
+ MmNumberOfSystemPtes--;
+ ASSERT(MmNumberOfSystemPtes > 1000);
+ }
+
+ /* Set the range of system PTEs */
+ StartPte = MiAddressToPte(MI_SYSTEM_PTE_START);
+ EndPte = StartPte + MmNumberOfSystemPtes - 1;
+
+ /* Loop the system PTEs */
+ for (Pte = StartPte; Pte <= EndPte; Pte++)
+ {
+ /* Create PXE, PPE, PDE and zero the PTE */
+ MxGetPte(MiPteToAddress(Pte))->u.Long = 0;
+ }
+
+ /* Create the system PTE space */
+ Pte = MiAddressToPte(MI_SYSTEM_PTE_START);
+ MiInitializeSystemPtes(Pte, MmNumberOfSystemPtes, SystemPteSpace);
+
+ /* Reserve system PTEs for zeroing PTEs and clear them */
+ MiFirstReservedZeroingPte = MiReserveSystemPtes(MI_ZERO_PTES, SystemPteSpace);
+ RtlZeroMemory(MiFirstReservedZeroingPte, MI_ZERO_PTES * sizeof(MMPTE));
+
+ /* Set the counter to maximum */
+ MiFirstReservedZeroingPte->u.Hard.PageFrameNumber = MI_ZERO_PTES - 1;
+}
+
+VOID
+NTAPI
+MiBuildPhysicalMemoryBlock(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
+{
+ PPHYSICAL_MEMORY_DESCRIPTOR Buffer, NewBuffer;
+ PMEMORY_ALLOCATION_DESCRIPTOR MdBlock;
+ PLIST_ENTRY ListEntry;
+ PFN_NUMBER NextPage = -1;
+ PULONG Bitmap;
+ ULONG Runs = 0;
+ ULONG Size, i;
+
+ /* Calculate size for the PFN bitmap */
+ Size = ROUND_UP(MmHighestPhysicalPage + 1, sizeof(ULONG));
+
+ /* Allocate the PFN bitmap */
+ Bitmap = ExAllocatePoolWithTag(NonPagedPool, Size, ' mM');
+
+ /* Allocate enough memory for the physical memory block */
+ Buffer = ExAllocatePoolWithTag(NonPagedPool,
+ sizeof(PHYSICAL_MEMORY_DESCRIPTOR) +
+ sizeof(PHYSICAL_MEMORY_RUN) *
+ (MiNumberDescriptors - 1),
+ 'lMmM');
+ if (!Bitmap || !Buffer)
+ {
+ /* This is critical */
+ KeBugCheckEx(INSTALL_MORE_MEMORY,
+ MmNumberOfPhysicalPages,
+ MmLowestPhysicalPage,
+ MmHighestPhysicalPage,
+ 0x101);
+ }
+
+ /* Initialize the bitmap and clear all bits */
+ RtlInitializeBitMap(&MiPfnBitMap, Bitmap, MmHighestPhysicalPage + 1);
+ RtlClearAllBits(&MiPfnBitMap);
+
+ /* Loop the memory descriptors */
+ for (ListEntry = LoaderBlock->MemoryDescriptorListHead.Flink;
+ ListEntry != &LoaderBlock->MemoryDescriptorListHead;
+ ListEntry = ListEntry->Flink)
+ {
+ /* Get the memory descriptor */
+ MdBlock = CONTAINING_RECORD(ListEntry,
+ MEMORY_ALLOCATION_DESCRIPTOR,
+ ListEntry);
+
+ /* Skip pages that are not part of the PFN database */
+ if (!MiIncludeType[MdBlock->MemoryType])
+ {
+ continue;
+ }
+
+ /* Does the memory block begin where the last ended? */
+ if (MdBlock->BasePage == NextPage)
+ {
+ /* Add it to the current run */
+ Buffer->Run[Runs - 1].PageCount += MdBlock->PageCount;
+ }
+ else
+ {
+ /* Create a new run */
+ Runs++;
+ Buffer->Run[Runs - 1].BasePage = MdBlock->BasePage;
+ Buffer->Run[Runs - 1].PageCount = MdBlock->PageCount;
+ }
+
+ /* Set the bits in the PFN bitmap */
+ RtlSetBits(&MiPfnBitMap, MdBlock->BasePage, MdBlock->PageCount);
+
+ /* Set the next page */
+ NextPage = MdBlock->BasePage + MdBlock->PageCount;
+ }
+
+ // FIXME: allocate a buffer of better size
+
+ Buffer->NumberOfRuns = Runs;
+ Buffer->NumberOfPages = MmNumberOfPhysicalPages;
+ MmPhysicalMemoryBlock = Buffer;
+}
+
+VOID
+NTAPI
+MiBuildPagedPool(VOID)
+{
+ PMMPTE Pte;
+ MMPTE TmplPte;
+ PFN_NUMBER PageFrameIndex;
+ KIRQL OldIrql;
+ ULONG Size, BitMapSize;
+
+ /* Default size for paged pool is 4 times non paged pool */
+ MmSizeOfPagedPoolInBytes = 4 * MmMaximumNonPagedPoolInBytes;
+
+ /* Make sure it doesn't overflow */
+ if (MmSizeOfPagedPoolInBytes > ((ULONG64)MmNonPagedSystemStart -
+ (ULONG64)MmPagedPoolStart))
+ {
+ MmSizeOfPagedPoolInBytes = (ULONG64)MmNonPagedSystemStart -
+ (ULONG64)MmPagedPoolStart;
+ }
+
+ /* Make sure paged pool is big enough */
+ if (MmSizeOfPagedPoolInBytes < MI_MIN_INIT_PAGED_POOLSIZE)
+ {
+ MmSizeOfPagedPoolInBytes = MI_MIN_INIT_PAGED_POOLSIZE;
+ }
+
+ /* Align down to a PDE boundary */
+ MmSizeOfPagedPoolInBytes = ROUND_DOWN(MmSizeOfPagedPoolInBytes,
+ 512 * PAGE_SIZE);
+ MmSizeOfPagedPoolInPages = MmSizeOfPagedPoolInBytes >> PAGE_SHIFT;
+
+ /* This is where paged pool ends */
+ MmPagedPoolEnd = (PCHAR)MmPagedPoolStart + MmSizeOfPagedPoolInBytes - 1;
+
+ /* Sanity check */
+ ASSERT(MmPagedPoolEnd < MmNonPagedSystemStart);
+
+ /* setup a template PTE */
+ TmplPte.u.Long = 0;
+ TmplPte.u.Flush.Valid = 1;
+ TmplPte.u.Flush.Write = 1;
+
+ /* Make sure the PXE is valid */
+ Pte = MiAddressToPxe(MmPagedPoolStart);
+ if (!Pte->u.Flush.Valid)
+ {
+ /* Map it! */
+ TmplPte.u.Flush.PageFrameNumber = MmAllocPage(MC_SYSTEM, 0);
+ *Pte = TmplPte;
+ }
+
+ /* Map all page directories (max 128) */
+ for (Pte = MiAddressToPpe(MmPagedPoolStart);
+ Pte <= MiAddressToPpe(MmPagedPoolEnd);
+ Pte++)
+ {
+ if (!Pte->u.Flush.Valid)
+ {
+ /* Map it! */
+ TmplPte.u.Flush.PageFrameNumber = MxAllocPage();
+ *Pte = TmplPte;
+ }
+ }
+
+ /* Create and map the first PTE for paged pool */
+ Pte = MxGetPte(MmPagedPoolStart);
+ TmplPte.u.Flush.PageFrameNumber = MxAllocPage();
+ *Pte = TmplPte;
+
+ /* Save the first and last paged pool PTE */
+ MmPagedPoolInfo.FirstPteForPagedPool = MiAddressToPte(MmPagedPoolStart);
+ MmPagedPoolInfo.LastPteForPagedPool = MiAddressToPte(MmPagedPoolEnd);
+
+ MmPagedPoolInfo.NextPdeForPagedPoolExpansion =
+ MiAddressToPde(MmPagedPoolStart) + 1;
+
+ // We keep track of each page via a bit, so check how big the bitmap will
+ // have to be (make sure to align our page count such that it fits nicely
+ // into a 4-byte aligned bitmap.
+
+ /* The size of the bitmap in bits is the size in pages */
+ BitMapSize = MmSizeOfPagedPoolInPages;
+
+ /* Calculate buffer size in bytes, aligned to 32 bits */
+ Size = sizeof(RTL_BITMAP) + ROUND_UP(BitMapSize, 32) / 8;
+
+ // Allocate the allocation bitmap, which tells us which regions have not yet
+ // been mapped into memory
+
+ MmPagedPoolInfo.PagedPoolAllocationMap =
+ ExAllocatePoolWithTag(NonPagedPool, Size, ' mM');
+ ASSERT(MmPagedPoolInfo.PagedPoolAllocationMap);
+
+ // Initialize it such that at first, only the first page's worth of PTEs is
+ // marked as allocated (incidentially, the first PDE we allocated earlier).
+ RtlInitializeBitMap(MmPagedPoolInfo.PagedPoolAllocationMap,
+ (PULONG)(MmPagedPoolInfo.PagedPoolAllocationMap + 1),
+ BitMapSize);
+ RtlSetAllBits(MmPagedPoolInfo.PagedPoolAllocationMap);
+ RtlClearBits(MmPagedPoolInfo.PagedPoolAllocationMap, 0, 512);
+
+ // We have a second bitmap, which keeps track of where allocations end.
+ // Given the allocation bitmap and a base address, we can therefore figure
+ // out which page is the last page of that allocation, and thus how big the
+ // entire allocation is.
+ MmPagedPoolInfo.EndOfPagedPoolBitmap =
+ ExAllocatePoolWithTag(NonPagedPool, Size, ' mM');
+ ASSERT(MmPagedPoolInfo.EndOfPagedPoolBitmap);
+
+ /* Initialize the bitmap */
+ RtlInitializeBitMap(MmPagedPoolInfo.EndOfPagedPoolBitmap,
+ (PULONG)(MmPagedPoolInfo.EndOfPagedPoolBitmap + 1),
+ BitMapSize);
+
+ /* No allocations, no allocation ends; clear all bits. */
+ RtlClearAllBits(MmPagedPoolInfo.EndOfPagedPoolBitmap);
+
+ /* Initialize the paged pool mutex */
+ KeInitializeGuardedMutex(&MmPagedPoolMutex);
+
+ /* Initialize the paged pool */
+ InitializePool(PagedPool, 0);
+}
+
+
+NTSTATUS
+NTAPI
+MmArmInitSystem(IN ULONG Phase,
+ IN PLOADER_PARAMETER_BLOCK LoaderBlock)
+{
+ if (Phase == 0)
+ {
+ /* Parse memory descriptors */
+ MiEvaluateMemoryDescriptors(LoaderBlock);
+
+ /* Prepare PFN database mappings */
+ MiPreparePfnDatabse(LoaderBlock);
+
+ /* Initialize the session space */
+ MiInitializeSessionSpace(LoaderBlock);
+
+ /* Initialize some mappings */
+ MiInitializePageTable();
+
+ /* Update the memory descriptor, to make sure the pages we used
+ won't get inserted into the PFN database */
+ MxOldFreeDescriptor = *MxFreeDescriptor;
+ MxFreeDescriptor->BasePage = MxFreePageBase;
+ MxFreeDescriptor->PageCount = MxFreePageCount;
+ }
+ else if (Phase == 1)
+ {
+ PMMPTE Pte;
+ ULONG OldCount;
+ PPHYSICAL_MEMORY_RUN Run;
+
+ /* The PFN database was created, restore the free descriptor */
+ *MxFreeDescriptor = MxOldFreeDescriptor;
+
+ /* Switch to phase 1 */
+ MxPhase = 1;
+
+ /* Initialize the nonpaged pool */
+ MiBuildNonPagedPool();
+
+ /* Initialize system PTE handling */
+ MiBuildSystemPteSpace();
+
+ /* Build the physical memory block */
+ MiBuildPhysicalMemoryBlock(LoaderBlock);
+
+ /* Size up paged pool and build the shadow system page directory */
+ MiBuildPagedPool();
+ }
+
+ return STATUS_SUCCESS;
+}
+
--- /dev/null
+/*
+ * COPYRIGHT: GPL, See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * FILE: ntoskrnl/mm/amd64/page.c
+ * PURPOSE: Low level memory managment manipulation
+ *
+ * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES ***************************************************************/
+
+#include <ntoskrnl.h>
+#define NDEBUG
+#include <debug.h>
+
+#if defined (ALLOC_PRAGMA)
+#pragma alloc_text(INIT, MmInitGlobalKernelPageDirectory)
+#pragma alloc_text(INIT, MiInitPageDirectoryMap)
+#endif
+
+#undef InterlockedExchangePte
+#define InterlockedExchangePte(pte1, pte2) \
+ InterlockedExchange64(&pte1->u.Long, pte2.u.Long)
+
+#define PAGE_EXECUTE_ANY (PAGE_EXECUTE|PAGE_EXECUTE_READ|PAGE_EXECUTE_READWRITE|PAGE_EXECUTE_WRITECOPY)
+#define PAGE_WRITE_ANY (PAGE_EXECUTE_READWRITE|PAGE_READWRITE|PAGE_EXECUTE_WRITECOPY|PAGE_WRITECOPY)
+#define PAGE_WRITECOPY_ANY (PAGE_EXECUTE_WRITECOPY|PAGE_WRITECOPY)
+
+extern MMPTE HyperTemplatePte;
+
+/* GLOBALS *****************************************************************/
+
+
+/* PRIVATE FUNCTIONS *******************************************************/
+
+BOOLEAN
+FORCEINLINE
+MiIsHyperspaceAddress(PVOID Address)
+{
+ return ((ULONG64)Address >= HYPER_SPACE &&
+ (ULONG64)Address <= HYPER_SPACE_END);
+}
+
+VOID
+MiFlushTlb(PMMPTE Pte, PVOID Address)
+{
+ if (MiIsHyperspaceAddress(Pte))
+ {
+ MmDeleteHyperspaceMapping((PVOID)PAGE_ROUND_DOWN(Pte));
+ }
+ else
+ {
+ __invlpg(Address);
+ }
+}
+
+static
+PMMPTE
+MiGetPteForProcess(
+ PEPROCESS Process,
+ PVOID Address,
+ BOOLEAN Create)
+{
+ MMPTE TmplPte, *Pte;
+
+ /* Check if we need hypersapce mapping */
+ if (Address < MmSystemRangeStart &&
+ Process && Process != PsGetCurrentProcess())
+ {
+ UNIMPLEMENTED;
+ return NULL;
+ }
+ else if (Create)
+ {
+ TmplPte.u.Long = 0;
+ TmplPte.u.Flush.Valid = 1;
+ TmplPte.u.Flush.Write = 1;
+
+ /* Get the PXE */
+ Pte = MiAddressToPxe(Address);
+ if (!Pte->u.Hard.Valid)
+ {
+// TmplPte.u.Hard.PageFrameNumber = MiAllocPage(TRUE);
+ InterlockedExchangePte(Pte, TmplPte);
+ }
+
+ /* Get the PPE */
+ Pte = MiAddressToPpe(Address);
+ if (!Pte->u.Hard.Valid)
+ {
+// TmplPte.u.Hard.PageFrameNumber = MiAllocPage(TRUE);
+ InterlockedExchangePte(Pte, TmplPte);
+ }
+
+ /* Get the PDE */
+ Pte = MiAddressToPde(Address);
+ if (!Pte->u.Hard.Valid)
+ {
+// TmplPte.u.Hard.PageFrameNumber = MiAllocPage(TRUE);
+ InterlockedExchangePte(Pte, TmplPte);
+ }
+ }
+ else
+ {
+ /* Get the PXE */
+ Pte = MiAddressToPxe(Address);
+ if (!Pte->u.Hard.Valid)
+ return NULL;
+
+ /* Get the PPE */
+ Pte = MiAddressToPpe(Address);
+ if (!Pte->u.Hard.Valid)
+ return NULL;
+
+ /* Get the PDE */
+ Pte = MiAddressToPde(Address);
+ if (!Pte->u.Hard.Valid)
+ return NULL;
+ }
+
+ return MiAddressToPte(Address);
+}
+
+static
+ULONG64
+MiGetPteValueForProcess(
+ PEPROCESS Process,
+ PVOID Address)
+{
+ PMMPTE Pte;
+ ULONG64 PteValue;
+
+ Pte = MiGetPteForProcess(Process, Address, FALSE);
+ PteValue = Pte ? Pte->u.Long : 0;
+
+ if (MiIsHyperspaceAddress(Pte))
+ MmDeleteHyperspaceMapping((PVOID)PAGE_ROUND_DOWN(Pte));
+
+ return PteValue;
+}
+
+ULONG
+NTAPI
+MiGetPteProtection(MMPTE Pte)
+{
+ ULONG Protect;
+
+ if (!Pte.u.Flush.Valid)
+ {
+ Protect = PAGE_NOACCESS;
+ }
+ else if (Pte.u.Flush.NoExecute)
+ {
+ if (Pte.u.Flush.CopyOnWrite)
+ Protect = PAGE_WRITECOPY;
+ else if (Pte.u.Flush.Write)
+ Protect = PAGE_READWRITE;
+ else
+ Protect = PAGE_READONLY;
+ }
+ else
+ {
+ if (Pte.u.Flush.CopyOnWrite)
+ Protect = PAGE_EXECUTE_WRITECOPY;
+ else if (Pte.u.Flush.Write)
+ Protect = PAGE_EXECUTE_READWRITE;
+ else
+ Protect = PAGE_EXECUTE_READ;
+ }
+
+ if (Pte.u.Flush.CacheDisable)
+ Protect |= PAGE_NOCACHE;
+
+ if (Pte.u.Flush.WriteThrough)
+ Protect |= PAGE_WRITETHROUGH;
+
+ // PAGE_GUARD ?
+ return Protect;
+}
+
+VOID
+NTAPI
+MiSetPteProtection(PMMPTE Pte, ULONG Protection)
+{
+ Pte->u.Flush.CopyOnWrite = (Protection & PAGE_WRITECOPY_ANY) ? 1 : 0;
+ Pte->u.Flush.Write = (Protection & PAGE_WRITE_ANY) ? 1 : 0;
+ Pte->u.Flush.CacheDisable = (Protection & PAGE_NOCACHE) ? 1 : 0;
+ Pte->u.Flush.WriteThrough = (Protection & PAGE_WRITETHROUGH) ? 1 : 0;
+
+ // FIXME: This doesn't work. Why?
+// Pte->u.Flush.NoExecute = (Protection & PAGE_EXECUTE_ANY) ? 0 : 1;
+}
+
+/* FUNCTIONS ***************************************************************/
+
+PFN_NUMBER
+NTAPI
+MmGetPfnForProcess(PEPROCESS Process,
+ PVOID Address)
+{
+ MMPTE Pte;
+ Pte.u.Long = MiGetPteValueForProcess(Process, Address);
+ return Pte.u.Hard.Valid ? Pte.u.Hard.PageFrameNumber : 0;
+}
+
+PHYSICAL_ADDRESS
+NTAPI
+MmGetPhysicalAddress(PVOID Address)
+{
+ PHYSICAL_ADDRESS p;
+ MMPTE Pte;
+
+ Pte.u.Long = MiGetPteValueForProcess(NULL, Address);
+ if (Pte.u.Hard.Valid)
+ {
+ p.QuadPart = Pte.u.Hard.PageFrameNumber * PAGE_SIZE;
+ p.u.LowPart |= (ULONG_PTR)Address & (PAGE_SIZE - 1);
+ }
+ else
+ {
+ p.QuadPart = 0;
+ }
+
+ return p;
+}
+
+BOOLEAN
+NTAPI
+MmIsPagePresent(PEPROCESS Process, PVOID Address)
+{
+ MMPTE Pte;
+ Pte.u.Long = MiGetPteValueForProcess(Process, Address);
+ return Pte.u.Hard.Valid;
+}
+
+BOOLEAN
+NTAPI
+MmIsPageSwapEntry(PEPROCESS Process, PVOID Address)
+{
+ MMPTE Pte;
+ Pte.u.Long = MiGetPteValueForProcess(Process, Address);
+ return Pte.u.Hard.Valid && Pte.u.Soft.Transition;
+}
+
+BOOLEAN
+NTAPI
+MmIsDirtyPage(PEPROCESS Process, PVOID Address)
+{
+ MMPTE Pte;
+ Pte.u.Long = MiGetPteValueForProcess(Process, Address);
+ return Pte.u.Hard.Valid && Pte.u.Hard.Dirty;
+}
+
+ULONG
+NTAPI
+MmGetPageProtect(PEPROCESS Process, PVOID Address)
+{
+ MMPTE Pte;
+ ULONG Protect;
+
+ Pte.u.Long = MiGetPteValueForProcess(Process, Address);
+
+ return MiGetPteProtection(Pte);
+}
+
+VOID
+NTAPI
+MmSetPageProtect(PEPROCESS Process, PVOID Address, ULONG flProtect)
+{
+ PMMPTE Pte;
+ MMPTE NewPte;
+
+ Pte = MiGetPteForProcess(Process, Address, FALSE);
+ ASSERT(Pte != NULL);
+
+ NewPte = *Pte;
+
+ MiSetPteProtection(&NewPte, flProtect);
+
+ InterlockedExchangePte(Pte, NewPte);
+
+ MiFlushTlb(Pte, Address);
+}
+
+VOID
+NTAPI
+MmSetCleanPage(PEPROCESS Process, PVOID Address)
+{
+ PMMPTE Pte;
+
+ Pte = MiGetPteForProcess(Process, Address, FALSE);
+ if (!Pte)
+ {
+ KeBugCheckEx(MEMORY_MANAGEMENT, 0x1234, (ULONG64)Address, 0, 0);
+ }
+
+ /* Ckear the dirty bit */
+ if (InterlockedBitTestAndReset64((PVOID)Pte, 6))
+ {
+ if (!MiIsHyperspaceAddress(Pte))
+ __invlpg(Address);
+ }
+
+ MiFlushTlb(Pte, Address);
+}
+
+VOID
+NTAPI
+MmSetDirtyPage(PEPROCESS Process, PVOID Address)
+{
+ PMMPTE Pte;
+
+ Pte = MiGetPteForProcess(Process, Address, FALSE);
+ if (!Pte)
+ {
+ KeBugCheckEx(MEMORY_MANAGEMENT, 0x1234, (ULONG64)Address, 0, 0);
+ }
+
+ /* Ckear the dirty bit */
+ if (InterlockedBitTestAndSet64((PVOID)Pte, 6))
+ {
+ if (!MiIsHyperspaceAddress(Pte))
+ __invlpg(Address);
+ }
+
+ MiFlushTlb(Pte, Address);
+}
+
+
+NTSTATUS
+NTAPI
+Mmi386ReleaseMmInfo(PEPROCESS Process)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+VOID
+NTAPI
+MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPFN_NUMBER Page)
+{
+ UNIMPLEMENTED;
+}
+
+VOID
+NTAPI
+MmRawDeleteVirtualMapping(PVOID Address)
+{
+ UNIMPLEMENTED;
+}
+
+VOID
+NTAPI
+MmDeleteVirtualMapping(
+ PEPROCESS Process,
+ PVOID Address,
+ BOOLEAN FreePage,
+ BOOLEAN* WasDirty,
+ PPFN_NUMBER Page)
+{
+ PFN_NUMBER Pfn;
+ PMMPTE Pte;
+ MMPTE OldPte;
+
+ Pte = MiGetPteForProcess(Process, Address, FALSE);
+
+ if (Pte)
+ {
+ /* Atomically set the entry to zero and get the old value. */
+ OldPte.u.Long = InterlockedExchange64(&Pte->u.Long, 0);
+
+ if (OldPte.u.Hard.Valid)
+ {
+ Pfn = OldPte.u.Hard.PageFrameNumber;
+
+ if (FreePage)
+ MmReleasePageMemoryConsumer(MC_NPPOOL, Pfn);
+ }
+ else
+ Pfn = 0;
+ }
+ else
+ {
+ OldPte.u.Long = 0;
+ Pfn = 0;
+ }
+
+ /* Return information to the caller */
+ if (WasDirty)
+ *WasDirty = OldPte.u.Hard.Dirty;;
+
+ if (Page)
+ *Page = Pfn;
+
+ MiFlushTlb(Pte, Address);
+}
+
+VOID
+NTAPI
+MmDeletePageFileMapping(PEPROCESS Process, PVOID Address,
+ SWAPENTRY* SwapEntry)
+{
+ UNIMPLEMENTED;
+}
+
+
+VOID
+NTAPI
+MmEnableVirtualMapping(PEPROCESS Process, PVOID Address)
+{
+ UNIMPLEMENTED;
+}
+
+
+NTSTATUS
+NTAPI
+MmCreatePageFileMapping(PEPROCESS Process,
+ PVOID Address,
+ SWAPENTRY SwapEntry)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+
+NTSTATUS
+NTAPI
+MmCreateVirtualMappingUnsafe(
+ PEPROCESS Process,
+ PVOID Address,
+ ULONG PageProtection,
+ PPFN_NUMBER Pages,
+ ULONG PageCount)
+{
+ ULONG i;
+ MMPTE TmplPte, *Pte;
+
+ /* Check if the range is valid */
+ if ((Process == NULL && Address < MmSystemRangeStart) ||
+ (Process != NULL && Address > MmHighestUserAddress))
+ {
+ DPRINT1("Address 0x%p is invalid for process %p\n", Address, Process);
+ ASSERT(FALSE);
+ }
+
+ TmplPte.u.Long = 0;
+ TmplPte.u.Hard.Valid = 1;
+ MiSetPteProtection(&TmplPte, PageProtection);
+
+//__debugbreak();
+
+ for (i = 0; i < PageCount; i++)
+ {
+ TmplPte.u.Hard.PageFrameNumber = Pages[i];
+
+ Pte = MiGetPteForProcess(Process, Address, TRUE);
+
+DPRINT1("MmCreateVirtualMappingUnsafe, Address=%p, TmplPte=%p, Pte=%p\n",
+ Address, TmplPte.u.Long, Pte);
+
+ if (InterlockedExchangePte(Pte, TmplPte))
+ {
+ KeInvalidateTlbEntry(Address);
+ }
+
+ if (MiIsHyperspaceAddress(Pte))
+ MmDeleteHyperspaceMapping((PVOID)PAGE_ROUND_DOWN(Pte));
+
+ Address = (PVOID)((ULONG64)Address + PAGE_SIZE);
+ }
+
+
+ return STATUS_SUCCESS;
+}
+
+NTSTATUS
+NTAPI
+MmCreateVirtualMapping(PEPROCESS Process,
+ PVOID Address,
+ ULONG Protect,
+ PPFN_NUMBER Pages,
+ ULONG PageCount)
+{
+ ULONG i;
+
+ for (i = 0; i < PageCount; i++)
+ {
+ if (!MmIsPageInUse(Pages[i]))
+ {
+ DPRINT1("Page %x not in use\n", Pages[i]);
+ KeBugCheck(MEMORY_MANAGEMENT);
+ }
+ }
+
+ return MmCreateVirtualMappingUnsafe(Process, Address, Protect, Pages, PageCount);
+}
+
+NTSTATUS
+NTAPI
+MmInitializeHandBuiltProcess(IN PEPROCESS Process,
+ IN PULONG_PTR DirectoryTableBase)
+{
+ /* Share the directory base with the idle process */
+ DirectoryTableBase[0] = PsGetCurrentProcess()->Pcb.DirectoryTableBase[0];
+ DirectoryTableBase[1] = PsGetCurrentProcess()->Pcb.DirectoryTableBase[1];
+
+ /* Initialize the Addresss Space */
+ KeInitializeGuardedMutex(&Process->AddressCreationLock);
+ Process->Vm.WorkingSetExpansionLinks.Flink = NULL;
+ ASSERT(Process->VadRoot.NumberGenericTableElements == 0);
+ Process->VadRoot.BalancedRoot.u1.Parent = &Process->VadRoot.BalancedRoot;
+
+ /* The process now has an address space */
+ Process->HasAddressSpace = TRUE;
+ return STATUS_SUCCESS;
+}
+
+BOOLEAN
+NTAPI
+MmCreateProcessAddressSpace(IN ULONG MinWs,
+ IN PEPROCESS Process,
+ IN PULONG_PTR DirectoryTableBase)
+{
+ UNIMPLEMENTED;
+ return 0;
+}
+
+BOOLEAN
+NTAPI
+MmIsAddressValid(IN PVOID VirtualAddress)
+{
+ /* Check all four page table levels */
+ return (MiAddressToPxe(VirtualAddress)->u.Hard.Valid != 0 &&
+ MiAddressToPpe(VirtualAddress)->u.Hard.Valid != 0 &&
+ MiAddressToPde(VirtualAddress)->u.Hard.Valid != 0 &&
+ MiAddressToPte(VirtualAddress)->u.Hard.Valid != 0);
+}
+
+
+/* EOF */
PMM_PAGEOP PageOp)
{
SWAPENTRY SwapEntry;
- PFN_TYPE Page;
+ PFN_NUMBER Page;
NTSTATUS Status;
PEPROCESS Process = MmGetAddressSpaceOwner(AddressSpace);
PVOID Address,
PMM_PAGEOP PageOp)
{
- PFN_TYPE Page;
+ PFN_NUMBER Page;
BOOLEAN WasDirty;
SWAPENTRY SwapEntry;
NTSTATUS Status;
* NOTES: This function is called with the address space lock held.
*/
{
- PFN_TYPE Page;
+ PFN_NUMBER Page;
NTSTATUS Status;
PMM_REGION Region;
PMM_PAGEOP PageOp;
for (i=0; i < PAGE_ROUND_UP(RegionSize)/PAGE_SIZE; i++)
{
- PFN_TYPE Page;
+ PFN_NUMBER Page;
if (MmIsPageSwapEntry(Process,
(char*)BaseAddress + (i * PAGE_SIZE)))
MemoryAreaLength = (ULONG_PTR)MemoryArea->EndingAddress -
(ULONG_PTR)MemoryArea->StartingAddress;
- if (((ULONG)BaseAddress + RegionSize) > (ULONG)MemoryArea->EndingAddress)
+ if (((ULONG_PTR)BaseAddress + RegionSize) > (ULONG_PTR)MemoryArea->EndingAddress)
{
DPRINT("BaseAddress + RegionSize %x is larger than MemoryArea's EndingAddress %x\n",
- (ULONG)BaseAddress + RegionSize, MemoryArea->EndingAddress);
+ (ULONG_PTR)BaseAddress + RegionSize, MemoryArea->EndingAddress);
MmUnlockAddressSpace(AddressSpace);
ObDereferenceObject(Process);
MmFreeVirtualMemoryPage(PVOID Context,
MEMORY_AREA* MemoryArea,
PVOID Address,
- PFN_TYPE Page,
+ PFN_NUMBER Page,
SWAPENTRY SwapEntry,
BOOLEAN Dirty)
{
MmQueryAnonMem(PMEMORY_AREA MemoryArea,
PVOID Address,
PMEMORY_BASIC_INFORMATION Info,
- PULONG ResultLength)
+ PSIZE_T ResultLength)
{
PMM_REGION Region;
PVOID RegionBase = NULL;
MmDisableVirtualMapping(IN PEPROCESS Process,
IN PVOID Address,
OUT PBOOLEAN WasDirty,
- OUT PPFN_TYPE Page)
+ OUT PPFN_NUMBER Page)
{
//
// TODO
MmCreateVirtualMappingUnsafe(IN PEPROCESS Process,
IN PVOID Address,
IN ULONG Protection,
- IN PPFN_TYPE Pages,
+ IN PPFN_NUMBER Pages,
IN ULONG PageCount)
{
//
MmCreateVirtualMapping(IN PEPROCESS Process,
IN PVOID Address,
IN ULONG Protection,
- IN PPFN_TYPE Pages,
+ IN PPFN_NUMBER Pages,
IN ULONG PageCount)
{
ULONG i;
IN PVOID Address,
IN BOOLEAN FreePage,
OUT PBOOLEAN WasDirty,
- OUT PPFN_TYPE Page)
+ OUT PPFN_NUMBER Page)
{
PMMPTE PointerPte;
MMPTE Pte;
return 0;
}
-PFN_TYPE
+PFN_NUMBER
NTAPI
MmGetPfnForProcess(IN PEPROCESS Process,
IN PVOID Address)
/* TYPES ********************************************************************/
typedef struct _MM_ALLOCATION_REQUEST
{
- PFN_TYPE Page;
+ PFN_NUMBER Page;
LIST_ENTRY ListEntry;
KEVENT Event;
}
NTSTATUS
NTAPI
-MmReleasePageMemoryConsumer(ULONG Consumer, PFN_TYPE Page)
+MmReleasePageMemoryConsumer(ULONG Consumer, PFN_NUMBER Page)
{
PMM_ALLOCATION_REQUEST Request;
PLIST_ENTRY Entry;
NTSTATUS
MmTrimUserMemory(ULONG Target, ULONG Priority, PULONG NrFreedPages)
{
- PFN_TYPE CurrentPage;
- PFN_TYPE NextPage;
+ PFN_NUMBER CurrentPage;
+ PFN_NUMBER NextPage;
NTSTATUS Status;
(*NrFreedPages) = 0;
NTSTATUS
NTAPI
MmRequestPageMemoryConsumer(ULONG Consumer, BOOLEAN CanWait,
- PPFN_TYPE AllocatedPage)
+ PPFN_NUMBER AllocatedPage)
{
ULONG OldUsed;
- PFN_TYPE Page;
+ PFN_NUMBER Page;
KIRQL OldIrql;
/*
//
// ReactOS to NT Physical Page Descriptor Entry Legacy Mapping Definitions
//
-// REACTOS NT
-//
-#define Consumer PageLocation
-#define Type CacheAttribute
-#define Zero PrototypePte
-#define LockCount u3.e1.PageColor
-#define RmapListHead AweReferenceCount
-#define SavedSwapEntry u4.EntireFrame
-#define Flags u3.e1
-#define ReferenceCount u3.ReferenceCount
-#define RemoveEntryList(x) RemoveEntryList((PLIST_ENTRY)x)
-#define InsertTailList(x, y) InsertTailList(x, (PLIST_ENTRY)y)
-#define ListEntry u1
-#define PHYSICAL_PAGE MMPFN
-#define PPHYSICAL_PAGE PMMPFN
-
-PPHYSICAL_PAGE MmPfnDatabase;
+
+typedef union
+{
+ MMPFN Pfn;
+
+ struct
+ {
+ LIST_ENTRY ListEntry; // 0x000
+ ULONG_PTR RmapListHead; // 0x008
+ USHORT ReferenceCount; // 0x00C
+ struct // 0x00$
+ {
+ USHORT _unused1:1;
+ USHORT StartOfAllocation:1;
+ USHORT EndOfAllocation:1;
+ USHORT Zero:1;
+ USHORT LockCount:4;
+ USHORT Consumer:3;
+ USHORT _unused2:1;
+ USHORT Type:2;
+ USHORT _unused3:1;
+ USHORT _unused4:1;
+ } Flags;
+ LONG MapCount; // 0x10
+ ULONG_PTR SavedSwapEntry; // 0x018
+ };
+} PHYSICAL_PAGE, *PPHYSICAL_PAGE;
+
+C_ASSERT(sizeof(PHYSICAL_PAGE) == sizeof(MMPFN));
+
+#define MiGetPfnEntry(Pfn) ((PPHYSICAL_PAGE)MiGetPfnEntry(Pfn))
+#define MiGetPfnEntryIndex(x) MiGetPfnEntryIndex((struct _MMPFN*)x)
+#define LockCount Flags.LockCount
+
+PMMPFN MmPfnDatabase;
+#define MmPfnDatabase ((PPHYSICAL_PAGE)MmPfnDatabase)
+
+#define MMPFN PHYSICAL_PAGE
+#define PMMPFN PPHYSICAL_PAGE
ULONG MmAvailablePages;
ULONG MmResidentAvailablePages;
/* FUNCTIONS *************************************************************/
-PFN_TYPE
+PFN_NUMBER
NTAPI
MmGetLRUFirstUserPage(VOID)
{
return 0;
}
PageDescriptor = CONTAINING_RECORD(NextListEntry, PHYSICAL_PAGE, ListEntry);
- ASSERT_PFN(PageDescriptor);
+ ASSERT_PFN(&PageDescriptor->Pfn);
KeReleaseQueuedSpinLock(LockQueuePfnLock, oldIrql);
return PageDescriptor - MmPfnDatabase;
}
VOID
NTAPI
-MmInsertLRULastUserPage(PFN_TYPE Pfn)
+MmInsertLRULastUserPage(PFN_NUMBER Pfn)
{
KIRQL oldIrql;
PPHYSICAL_PAGE Page;
KeReleaseQueuedSpinLock(LockQueuePfnLock, oldIrql);
}
-PFN_TYPE
+PFN_NUMBER
NTAPI
-MmGetLRUNextUserPage(PFN_TYPE PreviousPfn)
+MmGetLRUNextUserPage(PFN_NUMBER PreviousPfn)
{
PLIST_ENTRY NextListEntry;
PHYSICAL_PAGE* PageDescriptor;
VOID
NTAPI
-MmRemoveLRUUserPage(PFN_TYPE Page)
+MmRemoveLRUUserPage(PFN_NUMBER Page)
{
RemoveEntryList(&MiGetPfnEntry(Page)->ListEntry);
}
NextEntry != &KeLoaderBlock->MemoryDescriptorListHead;
NextEntry = NextEntry->Flink)
{
-#undef ListEntry
/* Get the descriptor */
Md = CONTAINING_RECORD(NextEntry,
MEMORY_ALLOCATION_DESCRIPTOR,
ListEntry);
-#define ListEntry u1
/* Skip bad memory */
if ((Md->MemoryType == LoaderFirmwarePermanent) ||
VOID
NTAPI
-MmSetRmapListHeadPage(PFN_TYPE Pfn, struct _MM_RMAP_ENTRY* ListHead)
+MmSetRmapListHeadPage(PFN_NUMBER Pfn, struct _MM_RMAP_ENTRY* ListHead)
{
KIRQL oldIrql;
oldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock);
- MiGetPfnEntry(Pfn)->RmapListHead = (LONG)ListHead;
+ MiGetPfnEntry(Pfn)->RmapListHead = (LONG_PTR)ListHead;
KeReleaseQueuedSpinLock(LockQueuePfnLock, oldIrql);
}
struct _MM_RMAP_ENTRY*
NTAPI
-MmGetRmapListHeadPage(PFN_TYPE Pfn)
+MmGetRmapListHeadPage(PFN_NUMBER Pfn)
{
KIRQL oldIrql;
struct _MM_RMAP_ENTRY* ListHead;
VOID
NTAPI
-MmSetSavedSwapEntryPage(PFN_TYPE Pfn, SWAPENTRY SwapEntry)
+MmSetSavedSwapEntryPage(PFN_NUMBER Pfn, SWAPENTRY SwapEntry)
{
KIRQL oldIrql;
SWAPENTRY
NTAPI
-MmGetSavedSwapEntryPage(PFN_TYPE Pfn)
+MmGetSavedSwapEntryPage(PFN_NUMBER Pfn)
{
SWAPENTRY SwapEntry;
KIRQL oldIrql;
VOID
NTAPI
-MmReferencePage(PFN_TYPE Pfn)
+MmReferencePage(PFN_NUMBER Pfn)
{
PPHYSICAL_PAGE Page;
ULONG
NTAPI
-MmGetReferenceCountPage(PFN_TYPE Pfn)
+MmGetReferenceCountPage(PFN_NUMBER Pfn)
{
KIRQL oldIrql;
ULONG RCount;
BOOLEAN
NTAPI
-MmIsPageInUse(PFN_TYPE Pfn)
+MmIsPageInUse(PFN_NUMBER Pfn)
{
DPRINT("MmIsPageInUse(PhysicalAddress %x)\n", Pfn << PAGE_SHIFT);
VOID
NTAPI
-MmDereferencePage(PFN_TYPE Pfn)
+MmDereferencePage(PFN_NUMBER Pfn)
{
PPHYSICAL_PAGE Page;
{
MmAvailablePages++;
if (Page->Flags.Consumer == MC_USER) RemoveEntryList(&Page->ListEntry);
- if (Page->RmapListHead != (LONG)NULL)
+ if (Page->RmapListHead != (LONG_PTR)NULL)
{
DPRINT1("Freeing page with rmap entries.\n");
KeBugCheck(MEMORY_MANAGEMENT);
ULONG
NTAPI
-MmGetLockCountPage(PFN_TYPE Pfn)
+MmGetLockCountPage(PFN_NUMBER Pfn)
{
KIRQL oldIrql;
ULONG CurrentLockCount;
VOID
NTAPI
-MmLockPage(PFN_TYPE Pfn)
+MmLockPage(PFN_NUMBER Pfn)
{
PPHYSICAL_PAGE Page;
VOID
NTAPI
-MmUnlockPage(PFN_TYPE Pfn)
+MmUnlockPage(PFN_NUMBER Pfn)
{
PPHYSICAL_PAGE Page;
Page->LockCount--;
}
-PFN_TYPE
+PFN_NUMBER
NTAPI
MmAllocPage(ULONG Consumer, SWAPENTRY SwapEntry)
{
- PFN_TYPE PfnOffset;
+ PFN_NUMBER PfnOffset;
PLIST_ENTRY ListEntry;
PPHYSICAL_PAGE PageDescriptor;
BOOLEAN NeedClear = FALSE;
NTSTATUS
NTAPI
-MiZeroPage(PFN_TYPE Page)
+MiZeroPage(PFN_NUMBER Page)
{
KIRQL Irql;
PVOID TempAddress;
KIRQL oldIrql;
PLIST_ENTRY ListEntry;
PPHYSICAL_PAGE PageDescriptor;
- PFN_TYPE Pfn;
+ PFN_NUMBER Pfn;
ULONG Count;
/* Free initial kernel memory */
NTSTATUS
NTAPI
MmInitializeHandBuiltProcess(IN PEPROCESS Process,
- IN PULONG DirectoryTableBase)
+ IN PULONG_PTR DirectoryTableBase)
{
/* Share the directory base with the idle process */
DirectoryTableBase[0] = PsGetCurrentProcess()->Pcb.DirectoryTableBase[0];
{
NTSTATUS Status;
ULONG i, j;
- PFN_TYPE Pfn[2];
- PULONG PageDirectory;
+ PFN_NUMBER Pfn[2];
+ PULONG_PTR PageDirectory;
DPRINT("MmCopyMmInfo(Src %x, Dest %x)\n", MinWs, Process);
{
ULONG PdeOffset = ADDR_TO_PDE_OFFSET(Address);
NTSTATUS Status;
- PFN_TYPE Pfn;
+ PFN_NUMBER Pfn;
ULONG Entry;
PULONG Pt, PageDir;
return 0;
}
-PFN_TYPE
+PFN_NUMBER
NTAPI
MmGetPfnForProcess(PEPROCESS Process,
PVOID Address)
VOID
NTAPI
-MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPFN_TYPE Page)
+MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPFN_NUMBER Page)
/*
* FUNCTION: Delete a virtual mapping
*/
VOID
NTAPI
MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage,
- BOOLEAN* WasDirty, PPFN_TYPE Page)
+ BOOLEAN* WasDirty, PPFN_NUMBER Page)
/*
* FUNCTION: Delete a virtual mapping
*/
{
BOOLEAN WasValid = FALSE;
- PFN_TYPE Pfn;
+ PFN_NUMBER Pfn;
ULONG Pte;
PULONG Pt;
MmCreateVirtualMappingUnsafe(PEPROCESS Process,
PVOID Address,
ULONG flProtect,
- PPFN_TYPE Pages,
+ PPFN_NUMBER Pages,
ULONG PageCount)
{
ULONG Attributes;
MmCreateVirtualMapping(PEPROCESS Process,
PVOID Address,
ULONG flProtect,
- PPFN_TYPE Pages,
+ PPFN_NUMBER Pages,
ULONG PageCount)
{
ULONG i;
{
NTSTATUS Status;
ULONG i, j;
- PFN_TYPE Pfn[7];
+ PFN_NUMBER Pfn[7];
ULONG Count;
DPRINT("MmCopyMmInfo(Src %x, Dest %x)\n", MinWs, Process);
{
PEPROCESS CurrentProcess = PsGetCurrentProcess();
ULONG i;
- PFN_TYPE Pfn;
+ PFN_NUMBER Pfn;
DPRINT("ProcessId %d, Address %x\n", Process->UniqueProcessId, Address);
if (Process != NULL && Process != CurrentProcess)
MmGetPageTableForProcessForPAE(PEPROCESS Process, PVOID Address, BOOLEAN Create)
{
NTSTATUS Status;
- PFN_TYPE Pfn;
+ PFN_NUMBER Pfn;
ULONGLONG Entry;
ULONGLONG ZeroEntry = 0LL;
PULONGLONG Pt;
{
ULONG PdeOffset = ADDR_TO_PDE_OFFSET(Address);
NTSTATUS Status;
- PFN_TYPE Pfn;
+ PFN_NUMBER Pfn;
ULONG Entry;
PULONG Pt, PageDir;
return 0;
}
-PFN_TYPE
+PFN_NUMBER
NTAPI
MmGetPfnForProcess(PEPROCESS Process,
PVOID Address)
VOID
NTAPI
-MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPFN_TYPE Page)
+MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPFN_NUMBER Page)
/*
* FUNCTION: Delete a virtual mapping
*/
VOID
NTAPI
MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage,
- BOOLEAN* WasDirty, PPFN_TYPE Page)
+ BOOLEAN* WasDirty, PPFN_NUMBER Page)
/*
* FUNCTION: Delete a virtual mapping
*/
{
BOOLEAN WasValid = FALSE;
- PFN_TYPE Pfn;
+ PFN_NUMBER Pfn;
DPRINT("MmDeleteVirtualMapping(%x, %x, %d, %x, %x)\n",
Process, Address, FreePage, WasDirty, Page);
NTAPI
MmCreateVirtualMappingForKernel(PVOID Address,
ULONG flProtect,
- PPFN_TYPE Pages,
+ PPFN_NUMBER Pages,
ULONG PageCount)
{
ULONG Attributes;
MmCreateVirtualMappingUnsafe(PEPROCESS Process,
PVOID Address,
ULONG flProtect,
- PPFN_TYPE Pages,
+ PPFN_NUMBER Pages,
ULONG PageCount)
{
ULONG Attributes;
MmCreateVirtualMapping(PEPROCESS Process,
PVOID Address,
ULONG flProtect,
- PPFN_TYPE Pages,
+ PPFN_NUMBER Pages,
ULONG PageCount)
{
ULONG i;
PVOID
NTAPI
-MmCreateHyperspaceMapping(PFN_TYPE Page)
+MmCreateHyperspaceMapping(PFN_NUMBER Page)
{
PVOID Address;
ULONG i;
return Address;
}
-PFN_TYPE
+PFN_NUMBER
NTAPI
-MmChangeHyperspaceMapping(PVOID Address, PFN_TYPE NewPage)
+MmChangeHyperspaceMapping(PVOID Address, PFN_NUMBER NewPage)
{
- PFN_TYPE Pfn;
+ PFN_NUMBER Pfn;
ASSERT (IS_HYPERSPACE(Address));
if (Ke386Pae)
{
return Pfn;
}
-PFN_TYPE
+PFN_NUMBER
NTAPI
MmDeleteHyperspaceMapping(PVOID Address)
{
- PFN_TYPE Pfn;
+ PFN_NUMBER Pfn;
ASSERT (IS_HYPERSPACE(Address));
if (Ke386Pae)
{
ULONG_PTR Length,
ULONG_PTR Granularity)
{
- PVOID LowestAddress = MmGetAddressSpaceOwner(AddressSpace) ? MM_LOWEST_USER_ADDRESS : MmSystemRangeStart;
+ // HACK: csrss really wants to map video memory at 0x000a0000 - 0x00100000, so keep that free
+ PVOID LowestAddress = MmGetAddressSpaceOwner(AddressSpace) ? (PVOID)0x00100000 : MmSystemRangeStart;
PVOID HighestAddress = MmGetAddressSpaceOwner(AddressSpace) ?
- (PVOID)((ULONG_PTR)MmSystemRangeStart - 1) : (PVOID)MAXULONG_PTR;
+ MmHighestUserAddress : (PVOID)MAXULONG_PTR;
PVOID AlignedAddress;
- PMEMORY_AREA Node;
- PMEMORY_AREA FirstNode;
- PMEMORY_AREA PreviousNode;
+ PMEMORY_AREA Root, Node;
MmVerifyMemoryAreas(AddressSpace);
AlignedAddress = MM_ROUND_UP(LowestAddress, Granularity);
- /* Special case for empty tree. */
- if (AddressSpace->WorkingSetExpansionLinks.Flink == NULL)
- {
- if ((ULONG_PTR)HighestAddress - (ULONG_PTR)AlignedAddress >= Length)
- {
- DPRINT("MmFindGapBottomUp: %p\n", AlignedAddress);
- return AlignedAddress;
- }
- DPRINT("MmFindGapBottomUp: 0\n");
- return 0;
- }
+ Root = (PMEMORY_AREA)AddressSpace->WorkingSetExpansionLinks.Flink;
/* Go to the node with lowest address in the tree. */
- FirstNode = Node = MmIterateFirstNode((PMEMORY_AREA)AddressSpace->WorkingSetExpansionLinks.Flink);
+ if (Root)
+ Node = MmIterateFirstNode(Root);
+ else
+ Node = NULL;
- /* Traverse the tree from left to right. */
- PreviousNode = Node;
- for (;;)
+ while (Node)
{
- Node = MmIterateNextNode(Node);
- if (Node == NULL)
- break;
-
- AlignedAddress = MM_ROUND_UP(PreviousNode->EndingAddress, Granularity);
if (Node->StartingAddress > AlignedAddress &&
- (ULONG_PTR)Node->StartingAddress - (ULONG_PTR)AlignedAddress >= Length)
+ (ULONG_PTR)Node->StartingAddress >= (ULONG_PTR)AlignedAddress + Length)
{
DPRINT("MmFindGapBottomUp: %p\n", AlignedAddress);
return AlignedAddress;
}
- PreviousNode = Node;
+ AlignedAddress = MM_ROUND_UP(Node->EndingAddress, Granularity);
+ Node = MmIterateNextNode(Node);
}
/* Check if there is enough space after the last memory area. */
- AlignedAddress = MM_ROUND_UP(PreviousNode->EndingAddress, Granularity);
if ((ULONG_PTR)HighestAddress > (ULONG_PTR)AlignedAddress &&
(ULONG_PTR)HighestAddress - (ULONG_PTR)AlignedAddress >= Length)
{
return AlignedAddress;
}
- /* Check if there is enough space before the first memory area. */
- AlignedAddress = MM_ROUND_UP(LowestAddress, Granularity);
- if (FirstNode->StartingAddress > AlignedAddress &&
- (ULONG_PTR)FirstNode->StartingAddress - (ULONG_PTR)AlignedAddress >= Length)
- {
- DPRINT("MmFindGapBottomUp: %p\n", AlignedAddress);
- return AlignedAddress;
- }
-
DPRINT("MmFindGapBottomUp: 0\n");
return 0;
}
{
PVOID LowestAddress = MmGetAddressSpaceOwner(AddressSpace) ? MM_LOWEST_USER_ADDRESS : MmSystemRangeStart;
PVOID HighestAddress = MmGetAddressSpaceOwner(AddressSpace) ?
- (PVOID)((ULONG_PTR)MmSystemRangeStart - 1) : (PVOID)MAXULONG_PTR;
+ MmHighestUserAddress : (PVOID)MAXULONG_PTR;
PVOID AlignedAddress;
- PMEMORY_AREA Node;
- PMEMORY_AREA PreviousNode;
+ PMEMORY_AREA Root, Node;
MmVerifyMemoryAreas(AddressSpace);
DPRINT("LowestAddress: %p HighestAddress: %p\n",
LowestAddress, HighestAddress);
- AlignedAddress = MM_ROUND_DOWN((ULONG_PTR)HighestAddress - Length + 1, Granularity);
+ AlignedAddress = MM_ROUND_DOWN((ULONG_PTR)HighestAddress - Length, Granularity);
/* Check for overflow. */
if (AlignedAddress > HighestAddress)
return NULL;
- /* Special case for empty tree. */
- if (AddressSpace->WorkingSetExpansionLinks.Flink == NULL)
- {
- if (AlignedAddress >= LowestAddress)
- {
- DPRINT("MmFindGapTopDown: %p\n", AlignedAddress);
- return AlignedAddress;
- }
- DPRINT("MmFindGapTopDown: 0\n");
- return 0;
- }
+ Root = (PMEMORY_AREA)AddressSpace->WorkingSetExpansionLinks.Flink;
/* Go to the node with highest address in the tree. */
- Node = MmIterateLastNode((PMEMORY_AREA)AddressSpace->WorkingSetExpansionLinks.Flink);
-
- /* Check if there is enough space after the last memory area. */
- if (Node->EndingAddress <= AlignedAddress)
- {
- DPRINT("MmFindGapTopDown: %p\n", AlignedAddress);
- return AlignedAddress;
- }
+ if (Root)
+ Node = MmIterateLastNode(Root);
+ else
+ Node = NULL;
/* Traverse the tree from left to right. */
- PreviousNode = Node;
- for (;;)
+ while (Node)
{
- Node = MmIteratePrevNode(Node);
- if (Node == NULL)
- break;
-
- AlignedAddress = MM_ROUND_DOWN((ULONG_PTR)PreviousNode->StartingAddress - Length + 1, Granularity);
-
- /* Check for overflow. */
- if (AlignedAddress > PreviousNode->StartingAddress)
- return NULL;
-
if (Node->EndingAddress <= AlignedAddress)
{
DPRINT("MmFindGapTopDown: %p\n", AlignedAddress);
return AlignedAddress;
}
- PreviousNode = Node;
- }
+ AlignedAddress = MM_ROUND_DOWN((ULONG_PTR)Node->StartingAddress - Length, Granularity);
- AlignedAddress = MM_ROUND_DOWN((ULONG_PTR)PreviousNode->StartingAddress - Length + 1, Granularity);
+ /* Check for overflow. */
+ if (AlignedAddress > Node->StartingAddress)
+ return NULL;
- /* Check for overflow. */
- if (AlignedAddress > PreviousNode->StartingAddress)
- return NULL;
+ Node = MmIteratePrevNode(Node);
+ }
if (AlignedAddress >= LowestAddress)
{
{
BOOLEAN Dirty = FALSE;
SWAPENTRY SwapEntry = 0;
- PFN_TYPE Page = 0;
+ PFN_NUMBER Page = 0;
if (MmIsPageSwapEntry(Process, (PVOID)Address))
{
{
PVOID EndAddress;
ULONG Granularity;
- ULONG tmpLength;
+ ULONG_PTR tmpLength;
PMEMORY_AREA MemoryArea;
- DPRINT("MmCreateMemoryArea(Type %d, BaseAddress %p, "
+ DPRINT("MmCreateMemoryArea(Type 0x%lx, BaseAddress %p, "
"*BaseAddress %p, Length %p, AllocationFlags %x, "
"FixedAddress %x, Result %p)\n",
Type, BaseAddress, *BaseAddress, Length, AllocationFlags,
if ((*BaseAddress) == 0 && !FixedAddress)
{
tmpLength = PAGE_ROUND_UP(Length);
+
*BaseAddress = MmFindGap(AddressSpace,
tmpLength,
Granularity,
if (MmGetAddressSpaceOwner(AddressSpace) &&
(ULONG_PTR)(*BaseAddress) + tmpLength > (ULONG_PTR)MmSystemRangeStart)
{
+ DPRINT("Memory area for user mode address space exceeds MmSystemRangeStart\n");
return STATUS_ACCESS_VIOLATION;
}
TAG_MAREA);
}
- if (!MemoryArea) return STATUS_NO_MEMORY;
+ if (!MemoryArea)
+ {
+ DPRINT("Not enough memory.\n");
+ return STATUS_NO_MEMORY;
+ }
RtlZeroMemory(MemoryArea, sizeof(MEMORY_AREA));
MemoryArea->Type = Type;
for (i = 0; i < PAGE_ROUND_UP(Length) / PAGE_SIZE; i++)
{
- PFN_TYPE Page;
+ PFN_NUMBER Page;
Status = MmRequestPageMemoryConsumer(Consumer, TRUE, &Page);
if (!NT_SUCCESS(Status))
#define NDEBUG
#include <debug.h>
+#ifndef NDEBUG
+#define KDDBGPRINT KdpDprintf
+#else
+#define KDDBGPRINT if (0) KdpDprintf
+#endif
+
/* GLOBALS ********************************************************************/
-PMMPTE MmDebugPte = MiAddressToPte(MI_DEBUG_MAPPING);
-BOOLEAN MiDbgReadyForPhysical = FALSE;
+PVOID MiDebugMapping = MI_DEBUG_MAPPING;
+PMMPTE MmDebugPte = NULL;
/* FUNCTIONS ******************************************************************/
//
// Check if we are called too early
//
- if (MiDbgReadyForPhysical == FALSE)
+ if (MmDebugPte == NULL)
{
//
// The structures we require aren't initialized yet, fail
//
- KdpDprintf("MiDbgTranslatePhysicalAddress called too early! "
+ KDDBGPRINT("MiDbgTranslatePhysicalAddress called too early! "
"Address: 0x%I64x\n", PhysicalAddress);
return NULL;
}
//
// Fail
//
- KdpDprintf("MiDbgTranslatePhysicalAddress: Cache Flags not yet supported. "
+ KDDBGPRINT("MiDbgTranslatePhysicalAddress: Cache Flags not yet supported. "
"Flags: 0x%lx\n", Flags & (MMDBG_COPY_CACHED |
MMDBG_COPY_UNCACHED |
MMDBG_COPY_WRITE_COMBINED));
//
// FIXME: We don't support this yet
//
- KdpDprintf("MiDbgTranslatePhysicalAddress: I/O Space not yet supported. "
+ KDDBGPRINT("MiDbgTranslatePhysicalAddress: I/O Space not yet supported. "
"PFN: 0x%I64x\n", (ULONG64)Pfn);
return NULL;
}
//
// Invalid size, fail
//
- KdpDprintf("MmDbgCopyMemory: Received Illegal Size 0x%lx\n", Size);
+ KDDBGPRINT("MmDbgCopyMemory: Received Illegal Size 0x%lx\n", Size);
return STATUS_INVALID_PARAMETER_3;
}
//
// Fail
//
- KdpDprintf("MmDbgCopyMemory: Received Unaligned Address 0x%I64x Size %lx\n",
+ KDDBGPRINT("MmDbgCopyMemory: Received Unaligned Address 0x%I64x Size %lx\n",
Address, Size);
return STATUS_INVALID_PARAMETER_3;
}
//
// Fail
//
- KdpDprintf("MmDbgCopyMemory: Failed to Translate Physical Address "
+ KDDBGPRINT("MmDbgCopyMemory: Failed to Translate Physical Address "
"%I64x\n", Address);
return STATUS_UNSUCCESSFUL;
}
//
// Fail
//
- KdpDprintf("MmDbgCopyMemory: Failing %s for invalid "
+ KDDBGPRINT("MmDbgCopyMemory: Failing %s for invalid "
"Virtual Address 0x%p\n",
Flags & MMDBG_COPY_WRITE ? "write" : "read",
TargetAddress);
// FIXME: We should attempt to override the write protection instead of
// failing here
//
- KdpDprintf("MmDbgCopyMemory: Failing Write for Protected Address 0x%p\n",
+ KDDBGPRINT("MmDbgCopyMemory: Failing Write for Protected Address 0x%p\n",
TargetAddress);
return STATUS_UNSUCCESSFUL;
}
break;
case MEMORY_AREA_SHARED_DATA:
- *MiAddressToPte(USER_SHARED_DATA) = *MmSharedUserDataPte;
+ *MiAddressToPte((PVOID)USER_SHARED_DATA) = *MmSharedUserDataPte;
Status = STATUS_SUCCESS;
break;
MmCommitPagedPoolAddress(PVOID Address, BOOLEAN Locked)
{
NTSTATUS Status;
- PFN_TYPE AllocatedPage;
+ PFN_NUMBER AllocatedPage;
KIRQL OldIrql;
Status = MmRequestPageMemoryConsumer(MC_PPOOL, FALSE, &AllocatedPage);
-/*
+/*
* PROJECT: ReactOS Kernel
* LICENSE: GPL - See COPYING in the top level directory
* FILE: ntoskrnl/mm/mminit.c
"LoaderXIPRom "
};
-PBOOLEAN Mm64BitPhysicalAddress = FALSE;
+BOOLEAN Mm64BitPhysicalAddress = FALSE;
ULONG MmReadClusterSize;
//
// 0 | 1 is on/off paging, 2 is undocumented
NTSTATUS Status;
BoundaryAddressMultiple.QuadPart = 0;
+ //
+ // Create the memory area to define the loader mappings
+ //
+ BaseAddress = (PVOID)KSEG0_BASE;
+ Status = MmCreateMemoryArea(MmGetKernelAddressSpace(),
+ MEMORY_AREA_OWNED_BY_ARM3 | MEMORY_AREA_STATIC,
+ &BaseAddress,
+ MmBootImageSize,
+ PAGE_EXECUTE_READWRITE,
+ &MArea,
+ TRUE,
+ 0,
+ BoundaryAddressMultiple);
+ ASSERT(Status == STATUS_SUCCESS);
+
//
// Create the memory area to define the PTE base
//
Status = MmCreateMemoryArea(MmGetKernelAddressSpace(),
MEMORY_AREA_OWNED_BY_ARM3 | MEMORY_AREA_STATIC,
&BaseAddress,
- 4 * 1024 * 1024,
+ PTE_TOP - PTE_BASE + 1,
PAGE_READWRITE,
&MArea,
TRUE,
Status = MmCreateMemoryArea(MmGetKernelAddressSpace(),
MEMORY_AREA_OWNED_BY_ARM3 | MEMORY_AREA_STATIC,
&BaseAddress,
- 4 * 1024 * 1024,
+ HYPER_SPACE_END - HYPER_SPACE + 1,
PAGE_READWRITE,
&MArea,
TRUE,
Status = MmCreateMemoryArea(MmGetKernelAddressSpace(),
MEMORY_AREA_OWNED_BY_ARM3 | MEMORY_AREA_STATIC,
&BaseAddress,
- (ULONG_PTR)MmNonPagedPoolEnd -
- (ULONG_PTR)MmNonPagedSystemStart,
+ (MmNumberOfSystemPtes + 1) * PAGE_SIZE,
PAGE_READWRITE,
&MArea,
TRUE,
BoundaryAddressMultiple);
ASSERT(Status == STATUS_SUCCESS);
+#ifndef _M_AMD64
//
// Next, the KPCR
//
0,
BoundaryAddressMultiple);
ASSERT(Status == STATUS_SUCCESS);
+#endif
//
// Now the KUSER_SHARED_DATA
// Print the memory layout
//
DPRINT1(" 0x%p - 0x%p\t%s\n",
- MmSystemRangeStart,
- (ULONG_PTR)MmSystemRangeStart + MmBootImageSize,
+ KSEG0_BASE,
+ (ULONG_PTR)KSEG0_BASE + MmBootImageSize,
"Boot Loaded Image");
DPRINT1(" 0x%p - 0x%p\t%s\n",
MmPagedPoolBase,
MiSessionSpaceEnd,
"Session Space");
DPRINT1(" 0x%p - 0x%p\t%s\n",
- PTE_BASE, PDE_BASE,
+ PTE_BASE, PTE_TOP,
"Page Tables");
DPRINT1(" 0x%p - 0x%p\t%s\n",
- PDE_BASE, HYPER_SPACE,
+ PDE_BASE, PDE_TOP,
"Page Directories");
DPRINT1(" 0x%p - 0x%p\t%s\n",
- HYPER_SPACE, HYPER_SPACE + (4 * 1024 * 1024),
+ HYPER_SPACE, HYPER_SPACE_END,
"Hyperspace");
DPRINT1(" 0x%p - 0x%p\t%s\n",
MmPagedPoolStart,
// Everything required for the debugger to read and write
// physical memory is now set up
//
- MiDbgReadyForPhysical = TRUE;
+ MmDebugPte = MiAddressToPte(MiDebugMapping);
#endif
/* Put the paged pool after the loaded modules */
Test[i] = MiAllocatePoolPages(PagedPool, PAGE_SIZE);
if (!Test[i])
{
- ASSERT(i == 1024);
+ ASSERT(i == PTE_PER_PAGE);
break;
}
}
/* Dump the address space */
MiDbgDumpAddressSpace();
+#ifndef _M_AMD64 // skip old paged pool
/* Initialize paged pool */
MmInitializePagedPool();
+#endif
/* Initialize working sets */
MmInitializeMemoryConsumer(MC_USER, MmTrimUserMemory);
//
// Now get the PTE for shared data, and read the PFN that holds it
//
- PointerPte = MiAddressToPte(KI_USER_SHARED_DATA);
+ PointerPte = MiAddressToPte((PVOID)KI_USER_SHARED_DATA);
ASSERT(PointerPte->u.Hard.Valid == 1);
PageFrameNumber = PFN_FROM_PTE(PointerPte);
NTSTATUS NTAPI
MmWriteDirtyPages(ULONG Target, PULONG Actual)
{
- PFN_TYPE Page;
- PFN_TYPE NextPage;
+ PFN_NUMBER Page;
+ PFN_NUMBER NextPage;
NTSTATUS Status;
Page = MmGetLRUFirstUserPage();
VOID
NTAPI
-MmBuildMdlFromPages(PMDL Mdl, PPFN_TYPE Pages)
+MmBuildMdlFromPages(PMDL Mdl, PPFN_NUMBER Pages)
{
- memcpy(Mdl + 1, Pages, sizeof(PFN_TYPE) * (PAGE_ROUND_UP(Mdl->ByteOffset+Mdl->ByteCount)/PAGE_SIZE));
+ memcpy(Mdl + 1, Pages, sizeof(PFN_NUMBER) * (PAGE_ROUND_UP(Mdl->ByteOffset+Mdl->ByteCount)/PAGE_SIZE));
/* FIXME: this flag should be set by the caller perhaps? */
Mdl->MdlFlags |= MDL_IO_PAGE_READ;
NTSTATUS
NTAPI
-MmWriteToSwapPage(SWAPENTRY SwapEntry, PFN_TYPE Page)
+MmWriteToSwapPage(SWAPENTRY SwapEntry, PFN_NUMBER Page)
{
ULONG i, offset;
LARGE_INTEGER file_offset;
NTSTATUS
NTAPI
-MmReadFromSwapPage(SWAPENTRY SwapEntry, PFN_TYPE Page)
+MmReadFromSwapPage(SWAPENTRY SwapEntry, PFN_NUMBER Page)
{
ULONG i, offset;
LARGE_INTEGER file_offset;
return Addr;
}
-PFN_TYPE
+PFN_NUMBER
NTAPI
MmGetPfnForProcess(PEPROCESS Process,
PVOID Address)
{
- return((PFN_TYPE)MmGetPhysicalAddressProcess(Process, Address) >> PAGE_SHIFT);
+ return((PFN_NUMBER)MmGetPhysicalAddressProcess(Process, Address) >> PAGE_SHIFT);
}
VOID
NTAPI
-MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPFN_TYPE Page)
+MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPFN_NUMBER Page)
/*
* FUNCTION: Delete a virtual mapping
*/
VOID
NTAPI
MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage,
- BOOLEAN* WasDirty, PPFN_TYPE Page)
+ BOOLEAN* WasDirty, PPFN_NUMBER Page)
/*
* FUNCTION: Delete a virtual mapping
*/
NTAPI
MmCreateVirtualMappingForKernel(PVOID Address,
ULONG flProtect,
- PPFN_TYPE Pages,
+ PPFN_NUMBER Pages,
ULONG PageCount)
{
ULONG i;
MmCreateVirtualMappingUnsafe(PEPROCESS Process,
PVOID Address,
ULONG flProtect,
- PPFN_TYPE Pages,
+ PPFN_NUMBER Pages,
ULONG PageCount)
{
ULONG Attributes;
MmCreateVirtualMapping(PEPROCESS Process,
PVOID Address,
ULONG flProtect,
- PPFN_TYPE Pages,
+ PPFN_NUMBER Pages,
ULONG PageCount)
{
ULONG i;
PVOID
NTAPI
-MmCreateHyperspaceMapping(PFN_TYPE Page)
+MmCreateHyperspaceMapping(PFN_NUMBER Page)
{
PVOID Address;
ppc_map_info_t info = { 0 };
return Address;
}
-PFN_TYPE
+PFN_NUMBER
NTAPI
-MmChangeHyperspaceMapping(PVOID Address, PFN_TYPE NewPage)
+MmChangeHyperspaceMapping(PVOID Address, PFN_NUMBER NewPage)
{
- PFN_TYPE OldPage;
+ PFN_NUMBER OldPage;
ppc_map_info_t info = { 0 };
info.proc = 0;
return NewPage;
}
-PFN_TYPE
+PFN_NUMBER
NTAPI
MmDeleteHyperspaceMapping(PVOID Address)
{
MmuUnmapPage(&info, 1);
- return (PFN_TYPE)info.phys;
+ return (PFN_NUMBER)info.phys;
}
VOID
}
/* Use our primitive allocator */
-PFN_TYPE MmPPCPrimitiveAllocPage()
+PFN_NUMBER MmPPCPrimitiveAllocPage()
{
paddr_t Result = MmuGetPage();
DbgPrint("Got Page %x\n", Result);
NTSTATUS
NTAPI
-MmWritePagePhysicalAddress(PFN_TYPE Page)
+MmWritePagePhysicalAddress(PFN_NUMBER Page)
{
PMM_RMAP_ENTRY entry;
PMEMORY_AREA MemoryArea;
NTSTATUS
NTAPI
-MmPageOutPhysicalAddress(PFN_TYPE Page)
+MmPageOutPhysicalAddress(PFN_NUMBER Page)
{
PMM_RMAP_ENTRY entry;
PMEMORY_AREA MemoryArea;
VOID
NTAPI
-MmSetCleanAllRmaps(PFN_TYPE Page)
+MmSetCleanAllRmaps(PFN_NUMBER Page)
{
PMM_RMAP_ENTRY current_entry;
VOID
NTAPI
-MmSetDirtyAllRmaps(PFN_TYPE Page)
+MmSetDirtyAllRmaps(PFN_NUMBER Page)
{
PMM_RMAP_ENTRY current_entry;
BOOLEAN
NTAPI
-MmIsDirtyPageRmap(PFN_TYPE Page)
+MmIsDirtyPageRmap(PFN_NUMBER Page)
{
PMM_RMAP_ENTRY current_entry;
VOID
NTAPI
-MmInsertRmap(PFN_TYPE Page, PEPROCESS Process,
+MmInsertRmap(PFN_NUMBER Page, PEPROCESS Process,
PVOID Address)
{
PMM_RMAP_ENTRY current_entry;
VOID
NTAPI
-MmDeleteAllRmaps(PFN_TYPE Page, PVOID Context,
+MmDeleteAllRmaps(PFN_NUMBER Page, PVOID Context,
VOID (*DeleteMapping)(PVOID Context, PEPROCESS Process,
PVOID Address))
{
VOID
NTAPI
-MmDeleteRmap(PFN_TYPE Page, PEPROCESS Process,
+MmDeleteRmap(PFN_NUMBER Page, PEPROCESS Process,
PVOID Address)
{
PMM_RMAP_ENTRY current_entry, previous_entry;
#define NDEBUG
#include <debug.h>
#include <reactos/exeformat.h>
+#include "ARM3/miarm.h"
#if defined (ALLOC_PRAGMA)
#pragma alloc_text(INIT, MmCreatePhysicalMemorySection)
PFILE_OBJECT FileObject;
PBCB Bcb;
SWAPENTRY SavedSwapEntry;
- PFN_TYPE Page;
+ PFN_NUMBER Page;
BOOLEAN IsImageSection;
ULONG FileOffset;
NTSTATUS
NTAPI
-MiCopyFromUserPage(PFN_TYPE DestPage, PVOID SourceAddress)
+MiCopyFromUserPage(PFN_NUMBER DestPage, PVOID SourceAddress)
{
PEPROCESS Process;
KIRQL Irql;
NTAPI
MiReadPage(PMEMORY_AREA MemoryArea,
ULONG SegOffset,
- PPFN_TYPE Page)
+ PPFN_NUMBER Page)
/*
* FUNCTION: Read a page for a section backed memory area.
* PARAMETERS:
BOOLEAN Locked)
{
ULONG Offset;
- PFN_TYPE Page;
+ PFN_NUMBER Page;
NTSTATUS Status;
PVOID PAddress;
PROS_SECTION_OBJECT Section;
{
PMM_SECTION_SEGMENT Segment;
PROS_SECTION_OBJECT Section;
- PFN_TYPE OldPage;
- PFN_TYPE NewPage;
+ PFN_NUMBER OldPage;
+ PFN_NUMBER NewPage;
NTSTATUS Status;
PVOID PAddress;
ULONG Offset;
{
MM_SECTION_PAGEOUT_CONTEXT* PageOutContext;
BOOLEAN WasDirty;
- PFN_TYPE Page;
+ PFN_NUMBER Page;
PageOutContext = (MM_SECTION_PAGEOUT_CONTEXT*)Context;
if (Process)
PVOID Address,
PMM_PAGEOP PageOp)
{
- PFN_TYPE Page;
+ PFN_NUMBER Page;
MM_SECTION_PAGEOUT_CONTEXT Context;
SWAPENTRY SwapEntry;
ULONG Entry;
ULONG Offset;
PROS_SECTION_OBJECT Section;
PMM_SECTION_SEGMENT Segment;
- PFN_TYPE Page;
+ PFN_NUMBER Page;
SWAPENTRY SwapEntry;
ULONG Entry;
BOOLEAN Private;
{
ULONG Offset;
ULONG Entry;
- PFN_TYPE Page;
+ PFN_NUMBER Page;
Offset = (ULONG_PTR)Address - (ULONG_PTR)MemoryArea->StartingAddress
+ MemoryArea->Data.SectionData.ViewOffset;
MmQuerySectionView(PMEMORY_AREA MemoryArea,
PVOID Address,
PMEMORY_BASIC_INFORMATION Info,
- PULONG ResultLength)
+ PSIZE_T ResultLength)
{
PMM_REGION Region;
PVOID RegionBaseAddress;
ULONG Offset;
ULONG Entry;
ULONG SavedSwapEntry;
- PFN_TYPE Page;
+ PFN_NUMBER Page;
Page = 0;
static VOID
MmFreeSectionPage(PVOID Context, MEMORY_AREA* MemoryArea, PVOID Address,
- PFN_TYPE Page, SWAPENTRY SwapEntry, BOOLEAN Dirty)
+ PFN_NUMBER Page, SWAPENTRY SwapEntry, BOOLEAN Dirty)
{
ULONG Entry;
PFILE_OBJECT FileObject;
sizeof(ExSectionInfoClass) / sizeof(ExSectionInfoClass[0]),
SectionInformation,
SectionInformationLength,
+ NULL,
ResultLength,
PreviousMode);
PVOID NTAPI
MmAllocateSection (IN ULONG Length, PVOID BaseAddress)
{
- PVOID Result;
- MEMORY_AREA* marea;
- NTSTATUS Status;
- PMMSUPPORT AddressSpace;
- PHYSICAL_ADDRESS BoundaryAddressMultiple;
+ PHYSICAL_ADDRESS LowAddress, HighAddress, SkipBytes;
+ PMDL Mdl;
+ PFN_COUNT PageCount;
+ PPFN_NUMBER MdlPages;
+ MMPTE TempPte, *PointerPte;
+ PMMPFN Pfn;
+
+ /* Allocate an MDL */
+ LowAddress.QuadPart = 0;
+ HighAddress.QuadPart = -1;
+ SkipBytes.QuadPart = 0;
+ Mdl = MiAllocatePagesForMdl(LowAddress,
+ HighAddress,
+ SkipBytes,
+ Length,
+ MiPlatformCacheAttributes[0][MmCached],
+ 0); // use MM_ALLOCATE_FULLY_REQUIRED
+ if (!Mdl)
+ {
+ /* Fail */
+ return NULL;
+ }
- DPRINT("MmAllocateSection(Length %x)\n",Length);
+ /* Check if we got all we need */
+ if (Mdl->ByteCount < Length)
+ {
+ /* We didn't get enough */
+ MmFreePagesFromMdl(Mdl);
+ ExFreePool(Mdl);
+ return NULL;
+ }
- BoundaryAddressMultiple.QuadPart = 0;
+ /* Calculate how many pages we should have */
+ PageCount = BYTES_TO_PAGES(Length);
- AddressSpace = MmGetKernelAddressSpace();
- Result = BaseAddress;
- MmLockAddressSpace(AddressSpace);
- Status = MmCreateMemoryArea (AddressSpace,
- MEMORY_AREA_SYSTEM,
- &Result,
- Length,
- 0,
- &marea,
- FALSE,
- 0,
- BoundaryAddressMultiple);
- MmUnlockAddressSpace(AddressSpace);
+ /* Reserve system PTEs */
+ PointerPte = MiReserveSystemPtes(PageCount, SystemPteSpace);
+ if (!PointerPte)
+ {
+ /* Free the MDL and fail */
+ MmFreePagesFromMdl(Mdl);
+ ExFreePool(Mdl);
+ return NULL;
+ }
- if (!NT_SUCCESS(Status))
- {
- return (NULL);
- }
- DPRINT("Result %p\n",Result);
+ /* Safe the base address */
+ BaseAddress = MiPteToAddress(PointerPte);
- /* Create a virtual mapping for this memory area */
- MmMapMemoryArea(Result, Length, MC_NPPOOL, PAGE_READWRITE);
+ /* Get a pointer to the page array */
+ MdlPages = (PPFN_NUMBER)(Mdl + 1);
- return ((PVOID)Result);
+ /* Get the first page's PFN entry */
+ Pfn = MI_PFN_ELEMENT(*MdlPages);
+
+ /* Save the pointer to the MDL in the PFN entry */
+ *(PMDL*)&Pfn->OriginalPte = Mdl;
+
+ /* Setup template PTE */
+ TempPte = HyperTemplatePte;
+
+ /* Map the PTEs */
+ do
+ {
+ /* Sanity checks */
+ ASSERT(PointerPte->u.Hard.Valid == 0);
+ ASSERT(PointerPte->u.Soft.Transition == 0);
+
+ /* Get the PFN */
+ TempPte.u.Hard.PageFrameNumber = *MdlPages++;
+
+ /* Write the PTE */
+ *PointerPte++ = TempPte;
+ } while (--PageCount);
+
+ /* Return the base address */
+ return BaseAddress;
}
+VOID
+NTAPI
+MmFreeSection(PVOID BaseAddress)
+{
+ PMMPTE PointerPte;
+ PFN_NUMBER *MdlPages, PageFrameNumber, PageCount;
+ PMMPFN Pfn;
+ PMDL Mdl;
+
+ /* Get a pointer to the first PTE */
+ PointerPte = MiAddressToPte(BaseAddress);
+
+ /* Get the page frame number of the first page */
+ PageFrameNumber = PFN_FROM_PTE(PointerPte);
+
+ /* Get the first pages's PFN entry */
+ Pfn = MI_PFN_ELEMENT(PageFrameNumber);
+
+ /* Get the MDL from the PFN */
+ Mdl = *(PMDL*)&Pfn->OriginalPte;
+ *(PMDL*)&Pfn->OriginalPte = NULL;
+
+ /* Get the page array and count from the MDL */
+ MdlPages = (PPFN_NUMBER)(Mdl + 1);
+ PageCount = BYTES_TO_PAGES(Mdl->ByteCount);
+
+ /* Release the system PTEs */
+ MiReleaseSystemPtes(PointerPte, PageCount, SystemPteSpace);
+
+ /* Free the pages and the MDL */
+ MmFreePagesFromMdl(Mdl);
+ ExFreePool(Mdl);
+}
/**********************************************************************
* NAME EXPORTED
}
}
- /* FIXME: Free the driver */
- //MmFreeSection(LdrEntry->DllBase);
+ /* Free the driver */
+ MmFreeSection(LdrEntry->DllBase);
/* Check if we're linked in */
if (LdrEntry->InLoadOrderLinks.Flink)
PIMAGE_NT_HEADERS NtHeader;
PLDR_DATA_TABLE_ENTRY LdrEntry;
PIMAGE_FILE_HEADER FileHeader;
- BOOLEAN ValidRelocs;
+ BOOLEAN ValidRelocs = FALSE;
PIMAGE_DATA_DIRECTORY DataDirectory;
PVOID DllBase, NewImageAddress;
NTSTATUS Status;
+ /* Sanity check */
+ ASSERT(ExpInitializationPhase == 0);
+
/* Loop driver list */
for (NextEntry = LoaderBlock->LoadOrderListHead.Flink;
NextEntry != &LoaderBlock->LoadOrderListHead;
/* Skip non-drivers */
if (!NtHeader) continue;
- /* Get the file header and make sure we can relocate */
+ /* Get the file header and check if we can relocate */
FileHeader = &NtHeader->FileHeader;
- if (FileHeader->Characteristics & IMAGE_FILE_RELOCS_STRIPPED) continue;
- if (NtHeader->OptionalHeader.NumberOfRvaAndSizes <
- IMAGE_DIRECTORY_ENTRY_BASERELOC) continue;
-
- /* Everything made sense until now, check the relocation section too */
- DataDirectory = &NtHeader->OptionalHeader.
- DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC];
- if (!DataDirectory->VirtualAddress)
+ if ( !(FileHeader->Characteristics & IMAGE_FILE_RELOCS_STRIPPED) &&
+ (NtHeader->OptionalHeader.NumberOfRvaAndSizes >
+ IMAGE_DIRECTORY_ENTRY_BASERELOC) )
{
- /* We don't really have relocations */
- ValidRelocs = FALSE;
- }
- else
- {
- /* Make sure the size is valid */
- if ((DataDirectory->VirtualAddress + DataDirectory->Size) >
- LdrEntry->SizeOfImage)
+ /* Everything made sense until now, check the relocation section too */
+ DataDirectory = &NtHeader->OptionalHeader.
+ DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC];
+ if (DataDirectory->VirtualAddress)
{
- /* They're not, skip */
- continue;
- }
+ /* Make sure the size is valid */
+ if ((DataDirectory->VirtualAddress + DataDirectory->Size) >
+ LdrEntry->SizeOfImage)
+ {
+ /* They're not, skip */
+ continue;
+ }
- /* We have relocations */
- ValidRelocs = TRUE;
+ /* We have relocations */
+ ValidRelocs = TRUE;
+ }
}
/* Remember the original address */
while (TRUE);
}
- /* Sanity check */
DPRINT("[Mm0]: Copying from: %p to: %p\n", DllBase, NewImageAddress);
- ASSERT(ExpInitializationPhase == 0);
/* Now copy the entire driver over */
RtlCopyMemory(NewImageAddress, DllBase, LdrEntry->SizeOfImage);
<library>bootvid</library>
<library>wdmguid</library>
<dependency>bugcodes</dependency>
- <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269
<directory name="include">
<pch>precomp.h</pch>
</directory>
- -->
<directory name="ke">
<if property="ARCH" value="i386">
<directory name="i386">
<file>ctxhelp.S</file>
</directory>
</if>
+ <if property="ARCH" value="amd64">
+ <directory name="amd64">
+ <file first="true">boot.S</file>
+ <file>context.c</file>
+ <file>cpu.c</file>
+ <file>ctxswitch.S</file>
+ <file>except.c</file>
+ <file>interrupt.c</file>
+ <file>irql.c</file>
+ <file>kiinit.c</file>
+ <file>spinlock.c</file>
+ <file>stubs.c</file>
+ <file>thrdini.c</file>
+ <file>trap.S</file>
+ </directory>
+ </if>
<file>apc.c</file>
<file>balmgr.c</file>
<file>bug.c</file>
<file>dpc.c</file>
<file>eventobj.c</file>
<file>except.c</file>
- <file>freeldr.c</file>
+ <if property="ARCH" value="i386">
+ <file>freeldr.c</file>
+ </if>
<file>freeze.c</file>
<file>gate.c</file>
<file>gmutex.c</file>
<file>cmhardwr.c</file>
</directory>
</if>
+ <if property="ARCH" value="amd64">
+ <directory name="i386">
+ <file>cmhardwr.c</file>
+ </directory>
+ </if>
<if property="ARCH" value="arm">
<directory name="arm">
<file>cmhardwr.c</file>
<file>ioport.S</file>
</directory>
</if>
+ <if property="ARCH" value="amd64">
+ <directory name="amd64">
+ <file>fastinterlck.c</file>
+ </directory>
+ </if>
<file>atom.c</file>
<file>callback.c</file>
<file>dbgctrl.c</file>
</if>
</directory>
</if>
+ <if property="ARCH" value="amd64">
+ <directory name="amd64">
+ <if property="KDBG" value="1">
+ <group>
+ <file>i386-dis.c</file>
+ <file>kdb_help.S</file>
+ <file>kdb.c</file>
+ <file>setjmp.S</file>
+ </group>
+ </if>
+ </directory>
+ </if>
<if property="KDBG" value="1">
<file>kdb.c</file>
<file>kdb_cli.c</file>
</if>
<file>kdbg.c</file>
</directory>
+ <if property="ARCH" value="amd64">
+ <directory name="amd64">
+ <file>kd.c</file>
+ <file>kdmemsup.c</file>
+ </directory>
+ </if>
<file>kdinit.c</file>
<file>kdio.c</file>
<file>kdmain.c</file>
<file>page.c</file>
</directory>
</if>
+ <if property="ARCH" value="amd64">
+ <directory name="amd64">
+ <file>init.c</file>
+ <file>page.c</file>
+ </directory>
+ </if>
<directory name="ARM3">
<if property="ARCH" value="i386">
<directory name="i386">
<file>psctx.c</file>
</directory>
</if>
+ <if property="ARCH" value="amd64">
+ <directory name="amd64">
+ <file>psctx.c</file>
+ </directory>
+ </if>
<file>debug.c</file>
<file>job.c</file>
<file>kill.c</file>
</directory>
<file>ntoskrnl.rc</file>
<linkerscript>ntoskrnl_$(ARCH).lnk</linkerscript>
-
- <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
- <compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
</group>
#include <msvctarget.h>
+#undef i386
+#ifndef __x86_64__
+#define FASTCALL fastcall
+#else
+#define FASTCALL stdcall
+#endif
@ stdcall CcCanIWrite(ptr long long long)
@ stdcall CcCopyRead(ptr ptr long long ptr ptr)
@ stdcall DbgPrompt(str ptr long)
@ stdcall DbgQueryDebugFilterState(long long)
@ stdcall DbgSetDebugFilterState(long long long)
-@ fastcall ExAcquireFastMutexUnsafe(ptr)
+@ stdcall -arch=x86_64 ExAcquireFastMutex(ptr)
+@ FASTCALL ExAcquireFastMutexUnsafe(ptr)
@ stdcall ExAcquireResourceExclusiveLite(ptr long)
@ stdcall ExAcquireResourceSharedLite(ptr long)
-@ fastcall ExAcquireRundownProtection(ptr) ExfAcquireRundownProtection
-@ fastcall ExAcquireRundownProtectionCacheAware(ptr) ExfAcquireRundownProtectionCacheAware
-@ fastcall ExAcquireRundownProtectionCacheAwareEx(ptr long) ExfAcquireRundownProtectionCacheAwareEx
-@ fastcall ExAcquireRundownProtectionEx(ptr long) ExfAcquireRundownProtectionEx
+@ FASTCALL ExAcquireRundownProtection(ptr) ExfAcquireRundownProtection
+@ FASTCALL ExAcquireRundownProtectionCacheAware(ptr) ExfAcquireRundownProtectionCacheAware
+@ FASTCALL ExAcquireRundownProtectionCacheAwareEx(ptr long) ExfAcquireRundownProtectionCacheAwareEx
+@ FASTCALL ExAcquireRundownProtectionEx(ptr long) ExfAcquireRundownProtectionEx
@ stdcall ExAcquireSharedStarveExclusive(ptr long)
@ stdcall ExAcquireSharedWaitForExclusive(ptr long)
@ stdcall ExAllocateCacheAwareRundownProtection(long long)
@ stdcall ExDeleteResourceLite(ptr)
@ extern ExDesktopObjectType
@ stdcall ExDisableResourceBoostLite(ptr)
-@ fastcall ExEnterCriticalRegionAndAcquireFastMutexUnsafe(ptr)
+@ FASTCALL ExEnterCriticalRegionAndAcquireFastMutexUnsafe(ptr)
@ stdcall ExEnterCriticalRegionAndAcquireResourceExclusive(ptr)
@ stdcall ExEnterCriticalRegionAndAcquireResourceShared(ptr)
@ stdcall ExEnterCriticalRegionAndAcquireSharedWaitForExclusive(ptr)
@ stdcall ExInitializeNPagedLookasideList(ptr ptr ptr long long long long)
@ stdcall ExInitializePagedLookasideList(ptr ptr ptr long long long long)
@ stdcall ExInitializeResourceLite(ptr)
-@ fastcall ExInitializeRundownProtection(ptr) ExfInitializeRundownProtection
+@ FASTCALL ExInitializeRundownProtection(ptr) ExfInitializeRundownProtection
@ stdcall ExInitializeRundownProtectionCacheAware(ptr long)
@ stdcall ExInitializeZone(ptr long ptr long)
@ stdcall ExInterlockedAddLargeInteger(ptr long long ptr)
-@ fastcall ExInterlockedAddLargeStatistic(ptr long)
+#ifndef __x86_64__
+@ FASTCALL ExInterlockedAddLargeStatistic(ptr long)
+#endif
@ stdcall ExInterlockedAddUlong(ptr long ptr)
-@ fastcall ExInterlockedCompareExchange64(ptr ptr ptr ptr)
+#ifndef __x86_64__
+@ FASTCALL ExInterlockedCompareExchange64(ptr ptr ptr ptr)
@ stdcall ExInterlockedDecrementLong(ptr ptr)
@ stdcall ExInterlockedExchangeUlong(ptr long ptr)
+#endif
@ stdcall ExInterlockedExtendZone(ptr ptr long ptr)
-@ fastcall ExInterlockedFlushSList(ptr)
+#ifndef __x86_64__
+@ FASTCALL ExInterlockedFlushSList(ptr)
@ stdcall ExInterlockedIncrementLong(ptr ptr)
+#endif
@ stdcall ExInterlockedInsertHeadList(ptr ptr ptr)
@ stdcall ExInterlockedInsertTailList(ptr ptr ptr)
@ stdcall ExInterlockedPopEntryList(ptr ptr)
-@ fastcall ExInterlockedPopEntrySList(ptr ptr)
+#ifndef __x86_64__
+@ FASTCALL ExInterlockedPopEntrySList(ptr ptr)
+#endif
@ stdcall ExInterlockedPushEntryList(ptr ptr ptr)
-@ fastcall ExInterlockedPushEntrySList(ptr ptr ptr)
+#ifndef __x86_64__
+@ FASTCALL ExInterlockedPushEntrySList(ptr ptr ptr)
+#endif
@ stdcall ExInterlockedRemoveHeadList(ptr ptr)
@ stdcall ExIsProcessorFeaturePresent(long)
@ stdcall ExIsResourceAcquiredExclusiveLite(ptr)
@ stdcall ExIsResourceAcquiredSharedLite(ptr)
@ stdcall ExLocalTimeToSystemTime(ptr ptr)
@ stdcall ExNotifyCallback(ptr ptr ptr)
+@ stdcall -arch=x86_64 ExQueryDepthSList(ptr)
@ stdcall ExQueryPoolBlockSize(ptr ptr)
@ stdcall ExQueueWorkItem(ptr long)
@ stdcall ExRaiseAccessViolation()
@ stdcall ExRaiseException(ptr) RtlRaiseException
@ stdcall ExRaiseHardError(long long long ptr long ptr)
@ stdcall ExRaiseStatus(long) RtlRaiseStatus
-@ fastcall ExReInitializeRundownProtection(ptr) ExfReInitializeRundownProtection
-@ fastcall ExReInitializeRundownProtectionCacheAware(ptr) ExfReInitializeRundownProtectionCacheAware
+@ FASTCALL ExReInitializeRundownProtection(ptr) ExfReInitializeRundownProtection
+@ FASTCALL ExReInitializeRundownProtectionCacheAware(ptr) ExfReInitializeRundownProtectionCacheAware
@ stdcall ExRegisterCallback(ptr ptr ptr)
@ stdcall ExReinitializeResourceLite(ptr)
-@ fastcall ExReleaseFastMutexUnsafe(ptr)
-@ fastcall ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(ptr)
-@ fastcall ExReleaseResourceAndLeaveCriticalRegion(ptr)
+@ stdcall -arch=x86_64 ExReleaseFastMutex(ptr)
+@ FASTCALL ExReleaseFastMutexUnsafe(ptr)
+@ FASTCALL ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(ptr)
+@ FASTCALL ExReleaseResourceAndLeaveCriticalRegion(ptr)
@ stdcall ExReleaseResourceForThreadLite(ptr long)
-@ fastcall ExReleaseResourceLite(ptr)
-@ fastcall ExReleaseRundownProtection(ptr) ExfReleaseRundownProtection
-@ fastcall ExReleaseRundownProtectionCacheAware(ptr) ExfReleaseRundownProtectionCacheAware
-@ fastcall ExReleaseRundownProtectionCacheAwareEx(ptr long) ExfReleaseRundownProtectionCacheAwareEx
-@ fastcall ExReleaseRundownProtectionEx(ptr long) ExfReleaseRundownProtectionEx
-@ fastcall ExRundownCompleted(ptr) ExfRundownCompleted
-@ fastcall ExRundownCompletedCacheAware(ptr) ExfRundownCompletedCacheAware
+@ FASTCALL ExReleaseResourceLite(ptr)
+@ FASTCALL ExReleaseRundownProtection(ptr) ExfReleaseRundownProtection
+@ FASTCALL ExReleaseRundownProtectionCacheAware(ptr) ExfReleaseRundownProtectionCacheAware
+@ FASTCALL ExReleaseRundownProtectionCacheAwareEx(ptr long) ExfReleaseRundownProtectionCacheAwareEx
+@ FASTCALL ExReleaseRundownProtectionEx(ptr long) ExfReleaseRundownProtectionEx
+@ FASTCALL ExRundownCompleted(ptr) ExfRundownCompleted
+@ FASTCALL ExRundownCompletedCacheAware(ptr) ExfRundownCompletedCacheAware
@ extern ExSemaphoreObjectType _ExSemaphoreObjectType
@ stdcall ExSetResourceOwnerPointer(ptr ptr)
@ stdcall ExSetTimerResolution(long long)
@ stdcall ExSizeOfRundownProtectionCacheAware()
@ stdcall ExSystemExceptionFilter()
@ stdcall ExSystemTimeToLocalTime(ptr ptr)
+@ stdcall -arch=x86_64 ExTryToAcquireFastMutex(ptr)
@ stdcall ExUnregisterCallback(ptr)
@ stdcall ExUuidCreate(ptr)
@ stdcall ExVerifySuite(long)
-@ fastcall ExWaitForRundownProtectionRelease(ptr) ExfWaitForRundownProtectionRelease
-@ fastcall ExWaitForRundownProtectionReleaseCacheAware(ptr) ExfWaitForRundownProtectionReleaseCacheAware
+@ FASTCALL ExWaitForRundownProtectionRelease(ptr) ExfWaitForRundownProtectionRelease
+@ FASTCALL ExWaitForRundownProtectionReleaseCacheAware(ptr) ExfWaitForRundownProtectionReleaseCacheAware
@ extern ExWindowStationObjectType
-@ fastcall ExfAcquirePushLockExclusive(ptr)
-@ fastcall ExfAcquirePushLockShared(ptr)
-@ fastcall ExfInterlockedAddUlong(ptr long ptr)
-@ fastcall ExfInterlockedCompareExchange64(ptr ptr ptr)
-@ fastcall ExfInterlockedInsertHeadList(ptr ptr ptr)
-@ fastcall ExfInterlockedInsertTailList(ptr ptr ptr)
-@ fastcall ExfInterlockedPopEntryList(ptr ptr)
-@ fastcall ExfInterlockedPushEntryList(ptr ptr ptr)
-@ fastcall ExfInterlockedRemoveHeadList(ptr ptr)
-@ fastcall ExfReleasePushLock(ptr)
-@ fastcall ExfReleasePushLockExclusive(ptr)
-@ fastcall ExfReleasePushLockShared(ptr)
-@ fastcall ExfTryToWakePushLock(ptr)
-@ fastcall ExfUnblockPushLock(ptr ptr)
-#ifdef _M_IX86
-@ fastcall Exfi386InterlockedDecrementLong(ptr)
-@ fastcall Exfi386InterlockedExchangeUlong(ptr long)
-@ fastcall Exfi386InterlockedIncrementLong(ptr)
-@ stdcall Exi386InterlockedDecrementLong(ptr)
-@ stdcall Exi386InterlockedExchangeUlong(ptr long long)
-@ stdcall Exi386InterlockedIncrementLong(ptr)
+@ FASTCALL ExfAcquirePushLockExclusive(ptr)
+@ FASTCALL ExfAcquirePushLockShared(ptr)
+#ifndef __x86_64__
+@ FASTCALL ExfInterlockedAddUlong(ptr long ptr)
+@ FASTCALL ExfInterlockedCompareExchange64(ptr ptr ptr)
+@ FASTCALL ExfInterlockedInsertHeadList(ptr ptr ptr)
+@ FASTCALL ExfInterlockedInsertTailList(ptr ptr ptr)
+@ FASTCALL ExfInterlockedPopEntryList(ptr ptr)
+@ FASTCALL ExfInterlockedPushEntryList(ptr ptr ptr)
+@ FASTCALL ExfInterlockedRemoveHeadList(ptr ptr)
#endif
-@ fastcall ExiAcquireFastMutex(ptr) ExAcquireFastMutex
-@ fastcall ExiReleaseFastMutex(ptr) ExReleaseFastMutex
-@ fastcall ExiTryToAcquireFastMutex(ptr) ExTryToAcquireFastMutex
+@ FASTCALL ExfReleasePushLock(ptr)
+@ FASTCALL ExfReleasePushLockExclusive(ptr)
+@ FASTCALL ExfReleasePushLockShared(ptr)
+@ FASTCALL ExfTryToWakePushLock(ptr)
+@ FASTCALL ExfUnblockPushLock(ptr ptr)
+@ stdcall -arch=x86_64 ExpInterlockedFlushSList(ptr)
+@ stdcall -arch=x86_64 ExpInterlockedPopEntrySList(ptr ptr)
+@ stdcall -arch=x86_64 ExpInterlockedPushEntrySList(ptr ptr)
+@ FASTCALL -arch=i386 Exfi386InterlockedDecrementLong(ptr)
+@ FASTCALL -arch=i386 Exfi386InterlockedExchangeUlong(ptr long)
+@ FASTCALL -arch=i386 Exfi386InterlockedIncrementLong(ptr)
+@ stdcall -arch=i386 Exi386InterlockedDecrementLong(ptr)
+@ stdcall -arch=i386 Exi386InterlockedExchangeUlong(ptr long long)
+@ stdcall -arch=i386 Exi386InterlockedIncrementLong(ptr)
+@ FASTCALL -arch=i386 ExiAcquireFastMutex(ptr) ExAcquireFastMutex
+@ FASTCALL -arch=i386 ExiReleaseFastMutex(ptr) ExReleaseFastMutex
+@ FASTCALL -arch=i386 ExiTryToAcquireFastMutex(ptr) ExTryToAcquireFastMutex
@ stdcall FsRtlAcquireFileExclusive(ptr)
;FsRtlAddBaseMcbEntry
@ stdcall FsRtlAddLargeMcbEntry(ptr long long long long long long)
@ stdcall FsRtlUninitializeMcb(ptr)
@ stdcall FsRtlUninitializeOplock(ptr)
@ extern HalDispatchTable _HalDispatchTable
-@ fastcall HalExamineMBR(ptr long long ptr)
+@ FASTCALL HalExamineMBR(ptr long long ptr)
@ extern HalPrivateDispatchTable
;HeadlessDispatch
@ stdcall InbvAcquireDisplayOwnership()
@ stdcall InbvSetTextColor(long)
@ stdcall InbvSolidColorFill(long long long long long)
@ extern InitSafeBootMode
-@ fastcall InterlockedCompareExchange(ptr long long)
-@ fastcall InterlockedDecrement(ptr)
-@ fastcall InterlockedExchange(ptr long)
-@ fastcall InterlockedExchangeAdd(ptr long)
-@ fastcall InterlockedIncrement(ptr)
-@ fastcall InterlockedPopEntrySList(ptr)
-@ fastcall InterlockedPushEntrySList(ptr ptr)
+#ifndef __x86_64__
+@ FASTCALL InterlockedCompareExchange(ptr long long)
+@ FASTCALL InterlockedDecrement(ptr)
+@ FASTCALL InterlockedExchange(ptr long)
+@ FASTCALL InterlockedExchangeAdd(ptr long)
+@ FASTCALL InterlockedIncrement(ptr)
+@ FASTCALL InterlockedPopEntrySList(ptr)
+@ FASTCALL InterlockedPushEntrySList(ptr ptr)
+#endif
@ stdcall IoAcquireCancelSpinLock(ptr)
@ stdcall IoAcquireRemoveLockEx(ptr ptr str long long)
@ stdcall IoAcquireVpbSpinLock(ptr)
@ stdcall IoAllocateIrp(long long)
@ stdcall IoAllocateMdl(ptr long long long ptr)
@ stdcall IoAllocateWorkItem(ptr)
-@ fastcall IoAssignDriveLetters(ptr ptr ptr ptr)
+@ FASTCALL IoAssignDriveLetters(ptr ptr ptr ptr)
@ stdcall IoAssignResources(ptr ptr ptr ptr ptr ptr)
@ stdcall IoAttachDevice(ptr ptr ptr)
@ stdcall IoAttachDeviceByPointer(ptr ptr)
@ stdcall IoGetFileObjectGenericMapping()
@ stdcall IoGetInitialStack()
@ stdcall IoGetLowerDeviceObject(ptr)
-@ fastcall IoGetPagingIoPriority(ptr)
+@ FASTCALL IoGetPagingIoPriority(ptr)
@ stdcall IoGetRelatedDeviceObject(ptr)
@ stdcall IoGetRequestorProcess(ptr)
@ stdcall IoGetRequestorProcessId(ptr)
@ stdcall IoRaiseInformationalHardError(long ptr ptr)
@ stdcall IoReadDiskSignature(ptr long ptr)
@ extern IoReadOperationCount
-@ fastcall IoReadPartitionTable(ptr long long ptr)
+@ FASTCALL IoReadPartitionTable(ptr long long ptr)
@ stdcall IoReadPartitionTableEx(ptr ptr)
@ extern IoReadTransferCount
@ stdcall IoRegisterBootDriverReinitialization(ptr ptr ptr)
@ stdcall IoSetHardErrorOrVerifyDevice(ptr ptr)
@ stdcall IoSetInformation(ptr ptr long ptr)
@ stdcall IoSetIoCompletion(ptr ptr ptr long ptr long)
-@ fastcall IoSetPartitionInformation(ptr long long long)
+@ FASTCALL IoSetPartitionInformation(ptr long long long)
@ stdcall IoSetPartitionInformationEx(ptr long ptr)
@ stdcall IoSetShareAccess(long long ptr ptr)
@ stdcall IoSetStartIoAttributes(ptr long long)
@ stdcall IoWMIWriteEvent(ptr)
@ stdcall IoWriteErrorLogEntry(ptr)
@ extern IoWriteOperationCount
-@ fastcall IoWritePartitionTable(ptr long long long ptr)
+@ FASTCALL IoWritePartitionTable(ptr long long long ptr)
@ stdcall IoWritePartitionTableEx(ptr ptr)
@ extern IoWriteTransferCount
-@ fastcall IofCallDriver(ptr ptr)
-@ fastcall IofCompleteRequest(ptr long)
+@ FASTCALL IofCallDriver(ptr ptr)
+@ FASTCALL IofCompleteRequest(ptr long)
@ stdcall KdChangeOption(long long ptr long ptr ptr)
@ extern KdDebuggerEnabled _KdDebuggerEnabled
@ extern KdDebuggerNotPresent _KdDebuggerNotPresent
@ stdcall KdPowerTransition(long)
@ stdcall KdRefreshDebuggerNotPresent()
@ stdcall KdSystemDebugControl(long ptr long ptr long ptr long)
-#ifdef _M_IX86
-@ stdcall Ke386CallBios(long ptr)
-@ stdcall Ke386IoSetAccessProcess(ptr long)
-@ stdcall Ke386QueryIoAccessMap(long ptr)
-@ stdcall Ke386SetIoAccessMap(long ptr)
-#endif
-@ fastcall KeAcquireGuardedMutex(ptr)
-@ fastcall KeAcquireGuardedMutexUnsafe(ptr)
-@ fastcall KeAcquireInStackQueuedSpinLockAtDpcLevel(ptr ptr)
-@ fastcall KeAcquireInStackQueuedSpinLockForDpc(ptr ptr)
+@ stdcall -arch=i386 Ke386CallBios(long ptr)
+@ stdcall -arch=i386 Ke386IoSetAccessProcess(ptr long)
+@ stdcall -arch=i386 Ke386QueryIoAccessMap(long ptr)
+@ stdcall -arch=i386 Ke386SetIoAccessMap(long ptr)
+@ FASTCALL KeAcquireGuardedMutex(ptr)
+@ FASTCALL KeAcquireGuardedMutexUnsafe(ptr)
+@ FASTCALL KeAcquireInStackQueuedSpinLockAtDpcLevel(ptr ptr)
+@ FASTCALL KeAcquireInStackQueuedSpinLockForDpc(ptr ptr)
@ stdcall KeAcquireInterruptSpinLock(ptr)
@ stdcall KeAcquireSpinLockAtDpcLevel(ptr)
-@ fastcall KeAcquireSpinLockForDpc(ptr)
+@ FASTCALL KeAcquireSpinLockForDpc(ptr)
+@ stdcall -arch=x86_64 KeAcquireSpinLockRaiseToDpc(ptr)
@ stdcall KeAddSystemServiceTable(ptr ptr long ptr long)
@ stdcall KeAreAllApcsDisabled()
@ stdcall KeAreApcsDisabled()
@ stdcall KeGetCurrentThread()
@ stdcall KeGetPreviousMode()
@ stdcall KeGetRecommendedSharedDataAlignment()
-#ifdef _M_IX86
;KeI386AbiosCall
-@ stdcall KeI386AllocateGdtSelectors(ptr long)
+@ stdcall -arch=i386 KeI386AllocateGdtSelectors(ptr long)
;KeI386Call16BitCStyleFunction
;KeI386Call16BitFunction
-@ stdcall KeI386FlatToGdtSelector(long long long)
+@ stdcall -arch=i386 KeI386FlatToGdtSelector(long long long)
;KeI386GetLid
-@ extern KeI386MachineType
-@ stdcall KeI386ReleaseGdtSelectors(ptr long)
+@ extern -arch=i386 KeI386MachineType
+@ stdcall -arch=i386 KeI386ReleaseGdtSelectors(ptr long)
;KeI386ReleaseLid
;KeI386SetGdtSelector
-#endif
@ stdcall KeInitializeApc(ptr ptr long ptr ptr ptr long ptr)
@ stdcall KeInitializeCrashDumpHeader(long long ptr long ptr)
@ stdcall KeInitializeDeviceQueue(ptr)
@ stdcall KeInitializeDpc(ptr ptr ptr)
@ stdcall KeInitializeEvent(ptr long long)
-@ fastcall KeInitializeGuardedMutex(ptr)
+@ FASTCALL KeInitializeGuardedMutex(ptr)
@ stdcall KeInitializeInterrupt(ptr ptr ptr ptr long long long long long long long)
@ stdcall KeInitializeMutant(ptr long)
@ stdcall KeInitializeMutex(ptr long)
@ stdcall KeInitializeQueue(ptr long)
@ stdcall KeInitializeSemaphore(ptr long long)
+#ifndef __x86_64__
@ stdcall KeInitializeSpinLock(ptr) _KeInitializeSpinLock
+#endif
@ stdcall KeInitializeThreadedDpc(ptr ptr ptr)
@ stdcall KeInitializeTimer(ptr)
@ stdcall KeInitializeTimerEx(ptr long)
@ stdcall KeProfileInterruptWithSource(ptr long)
@ stdcall KePulseEvent(ptr long long)
@ stdcall KeQueryActiveProcessors()
+#ifndef __x86_64__
@ stdcall KeQueryInterruptTime()
+#endif
@ stdcall KeQueryPriorityThread(ptr)
@ stdcall KeQueryRuntimeThread(ptr ptr)
+#ifndef __x86_64__
@ stdcall KeQuerySystemTime(ptr)
+#endif
@ stdcall KeQueryTickCount(ptr)
@ stdcall KeQueryTimeIncrement()
@ stdcall KeRaiseUserException(long)
@ stdcall KeRegisterBugCheckCallback(ptr ptr ptr long ptr)
@ stdcall KeRegisterBugCheckReasonCallback(ptr ptr ptr ptr)
@ stdcall KeRegisterNmiCallback(ptr ptr)
-@ fastcall KeReleaseGuardedMutex(ptr)
-@ fastcall KeReleaseGuardedMutexUnsafe(ptr)
-@ fastcall KeReleaseInStackQueuedSpinLockForDpc(ptr)
-@ fastcall KeReleaseInStackQueuedSpinLockFromDpcLevel(ptr)
+@ FASTCALL KeReleaseGuardedMutex(ptr)
+@ FASTCALL KeReleaseGuardedMutexUnsafe(ptr)
+@ FASTCALL KeReleaseInStackQueuedSpinLockForDpc(ptr)
+@ FASTCALL KeReleaseInStackQueuedSpinLockFromDpcLevel(ptr)
@ stdcall KeReleaseInterruptSpinLock(ptr long)
@ stdcall KeReleaseMutant(ptr long long long)
@ stdcall KeReleaseMutex(ptr long)
@ stdcall KeReleaseSemaphore(ptr long long long)
-@ fastcall KeReleaseSpinLockForDpc(ptr long)
+#ifdef __x86_64__
+@ stdcall KeReleaseSpinLock(ptr long)
+#endif
+@ FASTCALL KeReleaseSpinLockForDpc(ptr long)
@ stdcall KeReleaseSpinLockFromDpcLevel(ptr)
@ stdcall KeRemoveByKeyDeviceQueue(ptr long)
@ stdcall KeRemoveByKeyDeviceQueueIfBusy(ptr long)
@ stdcall KeStackAttachProcess(ptr ptr)
@ stdcall KeSynchronizeExecution(ptr ptr ptr)
@ stdcall KeTerminateThread(long)
-@ fastcall KeTestSpinLock(ptr)
+@ FASTCALL KeTestSpinLock(ptr)
@ extern KeTickCount
-@ fastcall KeTryToAcquireGuardedMutex(ptr)
-@ fastcall KeTryToAcquireSpinLockAtDpcLevel(ptr)
+@ FASTCALL KeTryToAcquireGuardedMutex(ptr)
+@ FASTCALL KeTryToAcquireSpinLockAtDpcLevel(ptr)
@ stdcall KeUnstackDetachProcess(ptr)
@ stdcall KeUpdateRunTime(ptr long)
#ifdef _M_IX86
@ stdcall KeWaitForMultipleObjects(long ptr long long long long ptr ptr)
@ stdcall KeWaitForMutexObject(ptr long long long ptr) KeWaitForSingleObject
@ stdcall KeWaitForSingleObject(ptr long long long ptr)
-@ fastcall KefAcquireSpinLockAtDpcLevel(ptr)
-@ fastcall KefReleaseSpinLockFromDpcLevel(ptr)
-#ifdef _M_IX86
-@ stdcall Kei386EoiHelper()
-#endif
-@ fastcall KiAcquireSpinLock(ptr)
+@ FASTCALL KefAcquireSpinLockAtDpcLevel(ptr)
+@ FASTCALL KefReleaseSpinLockFromDpcLevel(ptr)
+@ stdcall -arch=i386 Kei386EoiHelper()
+@ FASTCALL KiAcquireSpinLock(ptr)
@ extern KiBugCheckData
@ stdcall KiCheckForKernelApcDelivery()
;KiCheckForSListAddress
-#ifdef _M_IX86
-@ stdcall KiCoprocessorError()
-#endif
+@ stdcall -arch=i386 KiCoprocessorError()
@ stdcall KiDeliverApc(long ptr ptr)
-#ifdef _M_IX86
-@ stdcall KiDispatchInterrupt()
-#endif
+@ stdcall -arch=i386 KiDispatchInterrupt()
@ extern KiEnableTimerWatchdog
@ stdcall KiIpiServiceRoutine(ptr ptr)
-@ fastcall KiReleaseSpinLock(ptr)
+@ FASTCALL KiReleaseSpinLock(ptr)
@ cdecl KiUnexpectedInterrupt()
#ifdef _M_IX86
@ stdcall Kii386SpinOnSpinLock(ptr long)
;ObSetHandleAttributes@12
@ stdcall ObSetSecurityDescriptorInfo(ptr ptr ptr ptr long ptr)
@ stdcall ObSetSecurityObjectByPointer(ptr long ptr)
-@ fastcall ObfDereferenceObject(ptr)
-@ fastcall ObfReferenceObject(ptr)
+@ FASTCALL ObfDereferenceObject(ptr)
+@ FASTCALL ObfReferenceObject(ptr)
;PfxFindPrefix
;PfxInitialize
;PfxInsertPrefix
@ stdcall PsTerminateSystemThread(long)
@ extern PsThreadType _PsThreadType
;PsWrapApcWow64Thread
+#ifndef __x86_64__
@ stdcall READ_REGISTER_BUFFER_UCHAR(ptr ptr long)
@ stdcall READ_REGISTER_BUFFER_ULONG(ptr ptr long)
@ stdcall READ_REGISTER_BUFFER_USHORT(ptr ptr long)
@ stdcall READ_REGISTER_UCHAR(ptr)
@ stdcall READ_REGISTER_ULONG(ptr)
@ stdcall READ_REGISTER_USHORT(ptr)
+#endif
@ stdcall RtlAbsoluteToSelfRelativeSD(ptr ptr ptr)
@ stdcall RtlAddAccessAllowedAce(ptr long long ptr)
@ stdcall RtlAddAccessAllowedAceEx(ptr long long long ptr)
@ stdcall RtlOemStringToUnicodeString(ptr ptr long)
@ stdcall RtlOemToUnicodeN(wstr long ptr ptr long)
@ stdcall RtlPinAtomInAtomTable(ptr ptr)
-@ fastcall RtlPrefetchMemoryNonTemporal(ptr long)
+@ FASTCALL RtlPrefetchMemoryNonTemporal(ptr long)
@ stdcall RtlPrefixString(ptr ptr long)
@ stdcall RtlPrefixUnicodeString(ptr ptr long)
@ stdcall RtlQueryAtomInAtomTable(ptr ptr ptr ptr ptr ptr)
;RtlTraceDatabaseLock
;RtlTraceDatabaseUnlock
;RtlTraceDatabaseValidate
-@ fastcall RtlUlongByteSwap(long)
-@ fastcall RtlUlonglongByteSwap(long long)
+#ifndef __x86_64__
+@ FASTCALL RtlUlongByteSwap(long)
+@ FASTCALL RtlUlonglongByteSwap(long long)
+#endif
@ stdcall RtlUnicodeStringToAnsiSize(ptr) RtlxUnicodeStringToAnsiSize
@ stdcall RtlUnicodeStringToAnsiString(ptr ptr long)
@ stdcall RtlUnicodeStringToCountedOemString(ptr ptr long)
@ stdcall RtlUpcaseUnicodeToOemN(ptr long ptr wstr long)
@ stdcall RtlUpperChar(long)
@ stdcall RtlUpperString(ptr ptr)
-@ fastcall RtlUshortByteSwap(long)
+#ifndef __x86_64__
+@ FASTCALL RtlUshortByteSwap(long)
+#endif
@ stdcall RtlValidRelativeSecurityDescriptor(ptr long long)
@ stdcall RtlValidSecurityDescriptor(ptr)
@ stdcall RtlValidSid(ptr)
;VfFailDriver
;VfFailSystemBIOS
;VfIsVerificationEnabled
+#ifndef __x86_64__
@ stdcall WRITE_REGISTER_BUFFER_UCHAR(ptr ptr long)
@ stdcall WRITE_REGISTER_BUFFER_ULONG(ptr ptr long)
@ stdcall WRITE_REGISTER_BUFFER_USHORT(ptr ptr long)
@ stdcall WRITE_REGISTER_UCHAR(ptr long)
@ stdcall WRITE_REGISTER_ULONG(ptr long)
@ stdcall WRITE_REGISTER_USHORT(ptr long)
+#endif
;WmiFlushTrace
;WmiGetClock
;WmiQueryTrace
;_CIcos
;_CIsin
;_CIsqrt
+#ifndef __x86_64
@ cdecl _abnormal_termination()
-#ifdef _M_IX86
-@ cdecl _alldiv()
-@ cdecl _alldvrm()
-@ cdecl _allmul()
-@ cdecl _alloca_probe()
-@ cdecl _allrem()
-@ cdecl _allshl()
-@ cdecl _allshr()
-@ cdecl _aulldiv()
-@ cdecl _aulldvrm()
-@ cdecl _aullrem()
-@ cdecl _aullshr()
#endif
+@ cdecl -arch=i386 _alldiv()
+@ cdecl -arch=i386 _alldvrm()
+@ cdecl -arch=i386 _allmul()
+@ cdecl -arch=i386 _alloca_probe()
+@ cdecl -arch=i386 _allrem()
+@ cdecl -arch=i386 _allshl()
+@ cdecl -arch=i386 _allshr()
+@ cdecl -arch=i386 _aulldiv()
+@ cdecl -arch=i386 _aulldvrm()
+@ cdecl -arch=i386 _aullrem()
+@ cdecl -arch=i386 _aullshr()
+#ifndef __x86_64
@ cdecl _except_handler2()
@ cdecl _except_handler3()
@ cdecl _global_unwind2()
+#endif
@ cdecl _itoa()
@ cdecl _itow()
+#ifndef __x86_64
@ cdecl _local_unwind2()
+#endif
@ cdecl _purecall()
@ cdecl _snprintf()
@ cdecl _snwprintf()
@ cdecl mbstowcs()
@ cdecl mbtowc()
@ cdecl memchr()
-@ cdecl memcpy()
+@ cdecl memcpy() memmove
@ cdecl memmove()
@ cdecl memset()
@ cdecl qsort()
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../tools/rbuild/project.dtd">
<group xmlns:xi="http://www.w3.org/2001/XInclude">
- <module name="ntoskrnl" type="kernel" installbase="system32" installname="ntoskrnl.exe">
+ <ifnot property="ARCH" value="amd64">
+ <property name="BASEADDRESS_NTOSKRNL" value="0x80800000" />
+ </ifnot>
+ <if property="ARCH" value="amd64">
+ <property name="BASEADDRESS_NTOSKRNL" value="0xfffff80000800000" />
+ </if>
+ <module name="ntoskrnl" type="kernel" installbase="system32" installname="ntoskrnl.exe" baseaddress="${BASEADDRESS_NTOSKRNL}" entrypoint="KiSystemStartup" allowwarnings="true">
<xi:include href="ntoskrnl-generic.rbuild" />
</module>
</group>
--- /dev/null
+OUTPUT_FORMAT(pei-x86-64)
+ENTRY(_mainCRTStartup)
+SECTIONS
+{
+ .text __image_base__ + __section_alignment__ :
+ {
+ __text_start__ = .;
+ *(.init)
+ *(.text)
+ *(SORT(.text$*))
+ *(.glue_7t)
+ *(.glue_7)
+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
+ LONG (-1); *(.ctors); *(.ctor); LONG (0);
+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
+ LONG (-1); *(.dtors); *(.dtor); LONG (0);
+ *(.fini)
+ /* ??? Why is .gcc_exc here? */
+ *(.gcc_exc)
+ __text_end__ = .;
+ *(.gcc_except_table)
+ }
+ init BLOCK(__section_alignment__) :
+ {
+ __init_start__ = . ;
+ *(init)
+ __init_end__ = . ;
+ }
+ /* The Cygwin32 library uses a section to avoid copying certain data
+ on fork. This used to be named ".data". The linker used
+ to include this between __data_start__ and __data_end__, but that
+ breaks building the cygwin32 dll. Instead, we name the section
+ ".data_cygwin_nocopy" and explictly include it after __data_end__. */
+ .data BLOCK(__section_alignment__) :
+ {
+ __data_start__ = . ;
+ *(.data)
+ *(.data2)
+ *(SORT(.data$*))
+ __data_end__ = . ;
+ *(.data_cygwin_nocopy)
+ }
+ .rdata BLOCK(__section_alignment__) :
+ {
+ *(.rdata)
+ *(SORT(.rdata$*))
+ /* For some reason mingw likes to merge it here. I don't! */
+ /* *(.eh_frame) */
+ }
+ .edata BLOCK(__section_alignment__) :
+ {
+ *(.edata)
+ }
+ /DISCARD/ :
+ {
+ *(.debug$S)
+ *(.debug$T)
+ *(.debug$F)
+ *(.drectve)
+ }
+
+ .idata BLOCK(__section_alignment__) :
+ {
+ /* This cannot currently be handled with grouped sections.
+ See pe.em:sort_sections. */
+ SORT(*)(.idata$2)
+ SORT(*)(.idata$3)
+ /* These zeroes mark the end of the import list. */
+ LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);
+ SORT(*)(.idata$4)
+ SORT(*)(.idata$5)
+ SORT(*)(.idata$6)
+ SORT(*)(.idata$7)
+ }
+ .CRT BLOCK(__section_alignment__) :
+ {
+ *(SORT(.CRT$*))
+ }
+ .rsrc BLOCK(__section_alignment__) :
+ {
+ *(.rsrc)
+ *(SORT(.rsrc$*))
+ }
+ .bss BLOCK(__section_alignment__) :
+ {
+ __bss_start__ = . ;
+ *(.bss)
+ *(COMMON)
+ __bss_end__ = . ;
+ }
+ .reloc BLOCK(__section_alignment__) :
+ {
+ *(.reloc)
+ /* These zeroes mark the end of the reloc section. */
+ LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);
+ }
+ .stab BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ [ .stab ]
+ }
+ .stabstr BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ [ .stabstr ]
+ }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section. Unlike other targets that fake this by putting the
+ section VMA at 0, the PE format will not allow it. */
+ /* DWARF 1.1 and DWARF 2. */
+ .debug_aranges BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.debug_aranges)
+ }
+ .debug_pubnames BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.debug_pubnames)
+ }
+ /* DWARF 2. */
+ .debug_info BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.debug_info) *(.gnu.linkonce.wi.*)
+ }
+ .debug_abbrev BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.debug_abbrev)
+ }
+ .debug_line BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.debug_line)
+ }
+ .debug_frame BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.debug_frame)
+ }
+ .debug_str BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.debug_str)
+ }
+ .debug_loc BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.debug_loc)
+ }
+ .debug_macinfo BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.debug_macinfo)
+ }
+ /* SGI/MIPS DWARF 2 extensions. */
+ .debug_weaknames BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.debug_weaknames)
+ }
+ .debug_funcnames BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.debug_funcnames)
+ }
+ .debug_typenames BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.debug_typenames)
+ }
+ .debug_varnames BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.debug_varnames)
+ }
+ /* DWARF 3. */
+ .debug_ranges BLOCK(__section_alignment__) (NOLOAD) :
+ {
+ *(.debug_ranges)
+ }
+ .eh_frame BLOCK(__section_alignment__) :
+ {
+ *(.eh_frame)
+ }
+}
+
--- /dev/null
+/*
+ * PROJECT: ReactOS Kernel
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: ntoskrnl/ps/amd64/pxctx.c
+ * PURPOSE: Process Manager: Set/Get Context for i386
+ * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
+ * Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES *******************************************************************/
+
+#include <ntoskrnl.h>
+#define NDEBUG
+#include <debug.h>
+
+/* FUNCTIONS ******************************************************************/
+
+VOID
+NTAPI
+PspGetContext(IN PKTRAP_FRAME TrapFrame,
+ IN PVOID NonVolatileContext,
+ IN OUT PCONTEXT Context)
+{
+ PAGED_CODE();
+
+ /* Convert the trap frame to a context */
+ KeTrapFrameToContext(TrapFrame, NULL, Context);
+}
+
+VOID
+NTAPI
+PspSetContext(OUT PKTRAP_FRAME TrapFrame,
+ OUT PVOID NonVolatileContext,
+ IN PCONTEXT Context,
+ IN KPROCESSOR_MODE Mode)
+{
+ PAGED_CODE();
+
+ /* Convert the context to a trap frame structure */
+ KeContextToTrapFrame(Context, NULL, TrapFrame, Context->ContextFlags, Mode);
+}
+
+VOID
+NTAPI
+PspGetOrSetContextKernelRoutine(IN PKAPC Apc,
+ IN OUT PKNORMAL_ROUTINE* NormalRoutine,
+ IN OUT PVOID* NormalContext,
+ IN OUT PVOID* SystemArgument1,
+ IN OUT PVOID* SystemArgument2)
+{
+ PGET_SET_CTX_CONTEXT GetSetContext;
+ PKEVENT Event;
+ PCONTEXT Context;
+ PKTHREAD Thread;
+ KPROCESSOR_MODE Mode;
+ PKTRAP_FRAME TrapFrame = NULL;
+ PAGED_CODE();
+
+ /* Get the Context Structure */
+ GetSetContext = CONTAINING_RECORD(Apc, GET_SET_CTX_CONTEXT, Apc);
+ Context = &GetSetContext->Context;
+ Event = &GetSetContext->Event;
+ Mode = GetSetContext->Mode;
+ Thread = Apc->SystemArgument2;
+
+ /* If this is a kernel-mode request, grab the saved trap frame */
+ if (Mode == KernelMode) TrapFrame = Thread->TrapFrame;
+
+ /* If we don't have one, grab it from the stack */
+ if (!TrapFrame)
+ {
+ DPRINT1("FIXME!!!!\n");
+ /* Trap frame is right under our initial stack */
+// TrapFrame = (PKTRAP_FRAME)((ULONG_PTR)Thread->InitialStack -
+// ROUND_UP(sizeof(KTRAP_FRAME), KTRAP_FRAME_ALIGN) -
+// sizeof(FX_SAVE_AREA));
+ }
+
+ /* Check if it's a set or get */
+ if (Apc->SystemArgument1)
+ {
+ /* Get the Context */
+ PspSetContext(TrapFrame, NULL, Context, Mode);
+ }
+ else
+ {
+ /* Set the Context */
+ PspGetContext(TrapFrame, NULL, Context);
+ }
+
+ /* Notify the Native API that we are done */
+ KeSetEvent(Event, IO_NO_INCREMENT, FALSE);
+}
+
+/* EOF */
ExAcquireRundownProtection(&Process->RundownProtect);
if(NT_SUCCESS(Status))
{
- if(Process->Job == NULL && Process->Session == Job->SessionId)
+ if(Process->Job == NULL && (ULONG_PTR)Process->Session == Job->SessionId)
{
/* Just store the pointer to the job object in the process, we'll
assign it later. The reason we can't do this here is that locking
/* setup the job object */
InitializeListHead(&Job->ProcessListHead);
- Job->SessionId = CurrentProcess->Session; /* inherit the session id from the caller */
+ Job->SessionId = (ULONG_PTR)CurrentProcess->Session; /* inherit the session id from the caller */
Status = ExInitializeResource(&Job->JobLock);
if(!NT_SUCCESS(Status))
do
{
/* Write magic value and return the next entry to process */
- NextEntry = InterlockedExchangePointer(&PspReaperListHead.Flink,
+ NextEntry = InterlockedExchangePointer((PVOID*)&PspReaperListHead.Flink,
(PVOID)1);
ASSERT((NextEntry != NULL) && (NextEntry != (PVOID)1));
} while ((NextEntry != NULL) && (NextEntry != (PVOID)1));
/* Remove magic value, keep looping if it got changed */
- } while (InterlockedCompareExchangePointer(&PspReaperListHead.Flink,
- 0,
- 1) != (PVOID)1);
+ } while (InterlockedCompareExchangePointer((PVOID*)&PspReaperListHead.Flink,
+ (PVOID)0,
+ (PVOID)1) != (PVOID)1);
}
VOID
PEPROCESS CurrentProcess;
PETHREAD Thread, OtherThread, PreviousThread = NULL;
PVOID DeallocationStack;
- ULONG Dummy;
+ ULONG_PTR Dummy;
BOOLEAN Last = FALSE;
PTERMINATION_PORT TerminationPort, NextPort;
PLIST_ENTRY FirstEntry, CurrentEntry;
if (Apc->SystemArgument2)
{
/* Free the APC */
- Status = (NTSTATUS)Apc->NormalContext;
+ Status = (NTSTATUS)(ULONG_PTR)Apc->NormalContext;
PspExitApcRundown(Apc);
/* Terminate the Thread */
PspExitApcRundown,
PspExitNormalApc,
KernelMode,
- (PVOID)ExitStatus);
+ (PVOID)(ULONG_PTR)ExitStatus);
/* Insert it into the APC Queue */
if (!KeInsertQueueApc(Apc, Apc, NULL, 2))
NTAPI
PsGetCurrentProcessSessionId(VOID)
{
- return PsGetCurrentProcess()->Session;
+ return (ULONG)(ULONG_PTR)PsGetCurrentProcess()->Session;
}
/*
ProcessBasicInfo->UniqueProcessId = (ULONG_PTR)Process->
UniqueProcessId;
ProcessBasicInfo->InheritedFromUniqueProcessId =
- (ULONG)Process->InheritedFromUniqueProcessId;
+ (ULONG_PTR)Process->InheritedFromUniqueProcessId;
ProcessBasicInfo->BasePriority = Process->Pcb.BasePriority;
}
_SEH2_TRY
{
/* Write back the Session ID */
- SessionInfo->SessionId = Process->Session;
+ SessionInfo->SessionId = PtrToUlong(Process->Session);
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
if (!NT_SUCCESS(Status)) break;
/* Write the session ID in the EPROCESS */
- Process->Session = SessionInfo.SessionId;
+ Process->Session = (PVOID)(ULONG_PTR)SessionInfo.SessionId;
/* Check if the process also has a PEB */
if (Process->Peb)
if (!Impersonation) return STATUS_INSUFFICIENT_RESOURCES;
/* Update the pointer */
- OldData = InterlockedCompareExchangePointer(&Thread->
+ OldData = InterlockedCompareExchangePointer((PVOID*)&Thread->
ImpersonationInfo,
Impersonation,
NULL);
PsGetThreadSessionId(IN PETHREAD Thread)
{
return (HANDLE)Thread->ThreadsProcess->Session;
+#if 0
+ // Should probably return a DWORD
+ PMM_SESSION_SPACE Session = Thread->ThreadsProcess->Session;
+ return Session->SessionId;
+#endif
}
/*
/* FUNCTIONS *****************************************************************/
+PVOID
+NTAPI
+RtlPcToFileHeader(
+ IN PVOID PcValue,
+ OUT PVOID *BaseOfImage)
+{
+ PLDR_DATA_TABLE_ENTRY LdrEntry;
+ BOOLEAN InSystem;
+
+ /* Get the base for this file */
+ if ((ULONG_PTR)PcValue > (ULONG_PTR)MmHighestUserAddress)
+ {
+ /* We are in kernel */
+ *BaseOfImage = KiPcToFileHeader(PcValue, &LdrEntry, FALSE, &InSystem);
+ }
+ else
+ {
+ /* We are in user land */
+ *BaseOfImage = KiRosPcToUserFileHeader(PcValue, &LdrEntry);
+ }
+
+ return *BaseOfImage;
+}
+
VOID
NTAPI
RtlInitializeRangeListPackage(VOID)
return FALSE;
}
-#ifndef _ARM_
+#if !defined(_ARM_) && !defined(_AMD64_)
BOOLEAN
NTAPI
}
/* Get the stack limits */
- StackBegin = (ULONG_PTR)Teb->Tib.StackLimit;
- StackEnd = (ULONG_PTR)Teb->Tib.StackBase;
+ StackBegin = (ULONG_PTR)Teb->NtTib.StackLimit;
+ StackEnd = (ULONG_PTR)Teb->NtTib.StackBase;
#ifdef _M_IX86
Stack = TrapFrame->Ebp;
#elif defined(_M_PPC)
#endif
+#ifdef _AMD64_
+VOID
+NTAPI
+RtlpGetStackLimits(
+ OUT PULONG_PTR LowLimit,
+ OUT PULONG_PTR HighLimit)
+{
+ PKTHREAD CurrentThread = KeGetCurrentThread();
+ *HighLimit = (ULONG_PTR)CurrentThread->InitialStack;
+ *LowLimit = (ULONG_PTR)CurrentThread->StackLimit;
+}
+#endif
+
/* RTL Atom Tables ************************************************************/
NTSTATUS
if (NT_SUCCESS(Status))
{
/* Set it */
- if (InterlockedCompareExchangePointer(&Process->
+ if (InterlockedCompareExchangePointer((PVOID*)&Process->
SeAuditProcessCreationInfo.ImageFileName,
AuditName,
NULL))
NTAPI
LsaFreeReturnBuffer(PVOID Buffer)
{
- ULONG Size = 0;
+ SIZE_T Size = 0;
return ZwFreeVirtualMemory(NtCurrentProcess(),
&Buffer,
&Size,
{
PISECURITY_DESCRIPTOR_RELATIVE RelSD = (PISECURITY_DESCRIPTOR_RELATIVE)OriginalSecurityDescriptor;
- DescriptorCopy.Owner = (PSID)RelSD->Owner;
- DescriptorCopy.Group = (PSID)RelSD->Group;
- DescriptorCopy.Sacl = (PACL)RelSD->Sacl;
- DescriptorCopy.Dacl = (PACL)RelSD->Dacl;
+ DescriptorCopy.Owner = (PSID)((PCHAR)RelSD + RelSD->Owner);
+ DescriptorCopy.Group = (PSID)((PCHAR)RelSD + RelSD->Group);
+ DescriptorCopy.Sacl = (PACL)((PCHAR)RelSD + RelSD->Sacl);
+ DescriptorCopy.Dacl = (PACL)((PCHAR)RelSD + RelSD->Dacl);
}
else
{
{
PISECURITY_DESCRIPTOR_RELATIVE RelSD = (PISECURITY_DESCRIPTOR_RELATIVE)OriginalSecurityDescriptor;
- DescriptorCopy.Owner = (PSID)RelSD->Owner;
- DescriptorCopy.Group = (PSID)RelSD->Group;
- DescriptorCopy.Sacl = (PACL)RelSD->Sacl;
- DescriptorCopy.Dacl = (PACL)RelSD->Dacl;
+ DescriptorCopy.Owner = (PSID)((PCHAR)RelSD + RelSD->Owner);
+ DescriptorCopy.Group = (PSID)((PCHAR)RelSD + RelSD->Group);
+ DescriptorCopy.Sacl = (PACL)((PCHAR)RelSD + RelSD->Sacl);
+ DescriptorCopy.Dacl = (PACL)((PCHAR)RelSD + RelSD->Dacl);
}
else
{
}
}
- if(DescriptorCopy.Control & SE_SELF_RELATIVE)
- {
- /* in case we're dealing with a self-relative descriptor, do a basic convert
- to an absolute descriptor. We do this so we can simply access the data
- using the pointers without calculating them again. */
- DescriptorCopy.Control &= ~SE_SELF_RELATIVE;
- if(DescriptorCopy.Owner != NULL)
- {
- DescriptorCopy.Owner = (PSID)((ULONG_PTR)OriginalSecurityDescriptor + (ULONG_PTR)DescriptorCopy.Owner);
- }
- if(DescriptorCopy.Group != NULL)
- {
- DescriptorCopy.Group = (PSID)((ULONG_PTR)OriginalSecurityDescriptor + (ULONG_PTR)DescriptorCopy.Group);
- }
- if(DescriptorCopy.Dacl != NULL)
- {
- DescriptorCopy.Dacl = (PACL)((ULONG_PTR)OriginalSecurityDescriptor + (ULONG_PTR)DescriptorCopy.Dacl);
- }
- if(DescriptorCopy.Sacl != NULL)
- {
- DescriptorCopy.Sacl = (PACL)((ULONG_PTR)OriginalSecurityDescriptor + (ULONG_PTR)DescriptorCopy.Sacl);
- }
- }
-
/* determine the size of the SIDs */
#define DetermineSIDSize(SidType) \
do { \
BOOLEAN NTAPI
SepAccessCheck(IN PSECURITY_DESCRIPTOR SecurityDescriptor,
- IN PSECURITY_SUBJECT_CONTEXT SubjectSecurityContext,
- IN BOOLEAN SubjectContextLocked,
- IN ACCESS_MASK DesiredAccess,
- IN ACCESS_MASK PreviouslyGrantedAccess,
- OUT PPRIVILEGE_SET* Privileges,
- IN PGENERIC_MAPPING GenericMapping,
- IN KPROCESSOR_MODE AccessMode,
- OUT PACCESS_MASK GrantedAccess,
+ IN PSECURITY_SUBJECT_CONTEXT SubjectSecurityContext,
+ IN BOOLEAN SubjectContextLocked,
+ IN ACCESS_MASK DesiredAccess,
+ IN ACCESS_MASK PreviouslyGrantedAccess,
+ OUT PPRIVILEGE_SET* Privileges,
+ IN PGENERIC_MAPPING GenericMapping,
+ IN KPROCESSOR_MODE AccessMode,
+ OUT PACCESS_MASK GrantedAccess,
OUT PNTSTATUS AccessStatus,
SECURITY_IMPERSONATION_LEVEL LowestImpersonationLevel)
{
/* Now perform the access check */
SepAccessCheck(SecurityDescriptor,
- &SubjectSecurityContext,
- TRUE,
- DesiredAccess,
- 0,
- &PrivilegeSet, //FIXME
- GenericMapping,
- PreviousMode,
- GrantedAccess,
+ &SubjectSecurityContext,
+ TRUE,
+ DesiredAccess,
+ 0,
+ &PrivilegeSet, //FIXME
+ GenericMapping,
+ PreviousMode,
+ GrantedAccess,
AccessStatus,
SecurityIdentification);
TokenInformation,
TokenInformationLength,
ReturnLength,
+ NULL,
PreviousMode);
if(!NT_SUCCESS(Status))
<?xml version="1.0"?>
<!DOCTYPE group SYSTEM "../tools/rbuild/project.dtd">
<group xmlns:xi="http://www.w3.org/2001/XInclude">
-<directory name="ntvdm">
- <xi:include href="ntvdm/ntvdm.rbuild" />
-</directory>
+<if property="ARCH" value="i386">
+ <directory name="ntvdm">
+ <xi:include href="ntvdm/ntvdm.rbuild" />
+ </directory>
+</if>
<directory name="win32">
<xi:include href="win32/win32.rbuild" />
</directory>
BOOL
CsrIsConsoleHandle(HANDLE Handle)
{
- return ((ULONG)Handle & 0x10000003) == 0x3;
+ return ((ULONG_PTR)Handle & 0x10000003) == 0x3;
}
Object_t **Object,
DWORD Access )
{
- ULONG h = (ULONG)Handle >> 2;
+ ULONG_PTR h = (ULONG_PTR)Handle >> 2;
+ DPRINT("CsrGetObject, Object: %x, %x, %x\n", Object, Handle, ProcessData ? ProcessData->HandleTableSize : 0);
DPRINT("CsrGetObject, Object: %x, %x, %x\n",
Object, Handle, ProcessData ? ProcessData->HandleTableSize : 0);
PCSRSS_PROCESS_DATA ProcessData,
HANDLE Handle)
{
- ULONG h = (ULONG)Handle >> 2;
- Object_t *Object;
+ ULONG_PTR h = (ULONG_PTR)Handle >> 2;
+ Object_t *Object;
RtlEnterCriticalSection(&ProcessData->HandleTableLock);
if (h >= ProcessData->HandleTableSize
ProcessData->HandleTable[i].Object = Object;
ProcessData->HandleTable[i].Access = Access;
ProcessData->HandleTable[i].Inheritable = Inheritable;
- *Handle = (HANDLE)((i << 2) | 0x3);
+ *Handle = ULongToHandle(((i << 2) | 0x3));
_InterlockedIncrement( &Object->ReferenceCount );
RtlLeaveCriticalSection(&ProcessData->HandleTableLock);
return(STATUS_SUCCESS);
PCSRSS_PROCESS_DATA ProcessData,
HANDLE Handle)
{
- ULONG h = (ULONG)Handle >> 2;
+ ULONG_PTR h = (ULONG_PTR)Handle >> 2;
if (h >= ProcessData->HandleTableSize ||
ProcessData->HandleTable[h].Object == NULL)
if (Request->Data.CreateProcessRequest.Flags & CREATE_NEW_PROCESS_GROUP)
{
- NewProcessData->ProcessGroup = (DWORD)NewProcessData->ProcessId;
+ NewProcessData->ProcessGroup = (DWORD)(ULONG_PTR)NewProcessData->ProcessId;
}
else
{
CSR_API(CsrDuplicateHandle)
{
- ULONG Index;
+ ULONG_PTR Index;
PCSRSS_HANDLE Entry;
DWORD DesiredAccess;
Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) - sizeof(PORT_MESSAGE);
- Index = (ULONG)Request->Data.DuplicateHandleRequest.Handle >> 2;
+ Index = (ULONG_PTR)Request->Data.DuplicateHandleRequest.Handle >> 2;
RtlEnterCriticalSection(&ProcessData->HandleTableLock);
if (Index >= ProcessData->HandleTableSize
|| (Entry = &ProcessData->HandleTable[Index])->Object == NULL)
/* GLOBALS *******************************************************************/
static BOOLEAN ServicesProcessIdValid = FALSE;
-static ULONG ServicesProcessId;
+static ULONG_PTR ServicesProcessId;
/* FUNCTIONS *****************************************************************/
}
else
{
- ServicesProcessId = (ULONG)Request->Data.RegisterServicesProcessRequest.ProcessId;
+ ServicesProcessId = (ULONG_PTR)Request->Data.RegisterServicesProcessRequest.ProcessId;
ServicesProcessIdValid = TRUE;
return STATUS_SUCCESS;
}
}
if (ProcessData->Terminated)
{
- DPRINT1("Message %d: process %d already terminated\n",
- Request->Type, (ULONG)Request->Header.ClientId.UniqueProcess);
+ DPRINT1("Message %d: process %p already terminated\n",
+ Request->Type, Request->Header.ClientId.UniqueProcess);
continue;
}
HANDLE PhysMemHandle;
PVOID BaseAddress;
LARGE_INTEGER Offset;
- ULONG ViewSize;
+ SIZE_T ViewSize;
CHAR IVTAndBda[1024+256];
/* Open the physical memory section */
Thread = CreateRemoteThread(ProcessData->Process, NULL, 0,
(LPTHREAD_START_ROUTINE) ProcessData->CtrlDispatcher,
- (PVOID) Event, 0, NULL);
+ UlongToPtr(Event), 0, NULL);
if (NULL == Thread)
{
DPRINT1("Failed thread creation (Error: 0x%x)\n", GetLastError());
OBJECT_ATTRIBUTES ObjectAttributes;
ULONG nParam = 0;
PRTL_MESSAGE_RESOURCE_ENTRY MessageResource;
- ULONG ParameterList[MAXIMUM_HARDERROR_PARAMETERS];
+ ULONG_PTR ParameterList[MAXIMUM_HARDERROR_PARAMETERS];
LPSTR CaptionText, MessageBody;
LPWSTR szxCaptionText, szxMessageBody;
DWORD SizeOfAllUnicodeStrings = 0;
ParameterStringU.MaximumLength = TempStringU.MaximumLength;
DPRINT("ParameterStringU=\'%wZ\'\n", &ParameterStringU);
RtlUnicodeStringToAnsiString(&ParamStringA, &ParameterStringU, TRUE);
- ParameterList[nParam] = (ULONG)ParamStringA.Buffer;
+ ParameterList[nParam] = (ULONG_PTR)ParamStringA.Buffer;
SizeOfAllUnicodeStrings += ParamStringA.MaximumLength;
}
}
// get text string of the error code
Status = RtlFindMessage(
(PVOID)GetModuleHandle(TEXT("ntdll")),
- (ULONG)RT_MESSAGETABLE,
+ (ULONG_PTR)RT_MESSAGETABLE,
LANG_NEUTRAL,
HardErrorMessage->Status,
&MessageResource );
MessageBody = NULL;
Status = RtlFindMessage(
(PVOID)GetModuleHandle(TEXT("ntdll")),
- (ULONG)RT_MESSAGETABLE,
+ (ULONG_PTR)RT_MESSAGETABLE,
LANG_NEUTRAL,
ParameterList[0],
&MsgResException);
DPRINT1("Can't get window creator\n");
return STATUS_INVALID_HANDLE;
}
- if (WindowCreator != (DWORD)LogonProcess)
+ if (WindowCreator != (DWORD_PTR)LogonProcess)
{
DPRINT1("Trying to register window not created by winlogon as notify window\n");
return STATUS_ACCESS_DENIED;
}
else
{
- Context.ProcessId = (DWORD) ProcessData->ProcessId;
+ Context.ProcessId = (DWORD_PTR) ProcessData->ProcessId;
Context.wParam = 0;
Context.lParam = (0 != (Flags & EWX_INTERNAL_FLAG_LOGOFF) ?
ENDSESSION_LOGOFF : 0);
/* Terminate this process */
Process = OpenProcess(PROCESS_TERMINATE, FALSE,
- (DWORD) ProcessData->ProcessId);
+ (DWORD_PTR) ProcessData->ProcessId);
if (NULL == Process)
{
DPRINT1("Unable to open process %d, error %d\n", ProcessData->ProcessId,
PCSRSS_PROCESS_DATA *NewData;
/* Do not kill winlogon or csrss */
- if ((DWORD) ProcessData->ProcessId == Context->CsrssProcess ||
+ if ((DWORD_PTR) ProcessData->ProcessId == Context->CsrssProcess ||
ProcessData->ProcessId == LogonProcess)
{
return STATUS_SUCCESS;
/* Get the login session of this process */
Process = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE,
- (DWORD) ProcessData->ProcessId);
+ (DWORD_PTR) ProcessData->ProcessId);
if (NULL == Process)
{
DPRINT1("Unable to open process %d, error %d\n", ProcessData->ProcessId,
&(Origin.OriginatingLogonSession)))
{
/* Kill the shell process last */
- if ((DWORD) ProcessData->ProcessId == Context->ShellProcess)
+ if ((DWORD_PTR) ProcessData->ProcessId == Context->ShellProcess)
{
ProcessData->ShutdownLevel = 0;
}
TOKEN_USER *UserInfo;
SHUTDOWN_SETTINGS ShutdownSettings;
- if (ProcessId != (DWORD) LogonProcess)
+ if (ProcessId != (DWORD_PTR) LogonProcess)
{
DPRINT1("Internal ExitWindowsEx call not from winlogon\n");
return STATUS_ACCESS_DENIED;
if (0 == (Request->Data.ExitReactosRequest.Flags & EWX_INTERNAL_FLAG))
{
- return UserExitReactos((DWORD) Request->Header.ClientId.UniqueProcess,
+ return UserExitReactos((DWORD_PTR) Request->Header.ClientId.UniqueProcess,
Request->Data.ExitReactosRequest.Flags);
}
else
{
- return InternalExitReactos((DWORD) Request->Header.ClientId.UniqueProcess,
- (DWORD) Request->Header.ClientId.UniqueThread,
+ return InternalExitReactos((DWORD_PTR) Request->Header.ClientId.UniqueProcess,
+ (DWORD_PTR) Request->Header.ClientId.UniqueThread,
Request->Data.ExitReactosRequest.Flags);
}
}
+++ /dev/null
-; $Id$
-;
-
-LIBRARY win32csr.dll
-
-EXPORTS
-
-Win32CsrInitialization@24
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../../tools/rbuild/project.dtd">
<module name="win32csr" type="win32dll" installbase="system32" installname="win32csr.dll">
- <importlibrary definition="win32csr.def" />
+ <importlibrary definition="win32csr.spec" />
<include base="win32csr">.</include>
<include base="csrss">include</include>
<include base="ReactOS">include/reactos/subsys</include>
--- /dev/null
+@ stdcall Win32CsrInitialization(ptr ptr ptr ptr ptr ptr)
RtlCopyMemory(&WndObjInt->WndObj.coClient, ClipObj, sizeof (CLIPOBJ));
RtlCopyMemory(&WndObjInt->WndObj.rclClient, &Window->Wnd->rcClient, sizeof (RECT));
- OldClipObj = InterlockedExchangePointer(&WndObjInt->ClientClipObj, ClipObj);
+ OldClipObj = InterlockedExchangePointer((PVOID*)&WndObjInt->ClientClipObj, ClipObj);
if (OldClipObj != NULL)
IntEngDeleteClipRegion(OldClipObj);
#define _FLOATOBJ_IsLong(pf) ((FLOAT)((LONG)*(pf)) == *(pf))
#define _FLOATOBJ_Equal0(pf) (*(pf) == 0.)
#define _FLOATOBJ_Equal1(pf) (*(pf) == 1.)
+#define _FLOATOBJ_GetFix(pf) ((LONG)(*(pf) * 16.))
#define FLOATOBJ_Set0(fo) *(fo) = 0;
#define FLOATOBJ_Set1(fo) *(fo) = 1;
LRESULT FASTCALL
IntDispatchMessage(MSG* Msg);
BOOL FASTCALL
-IntTranslateKbdMessage(LPMSG lpMsg, HKL dwhkl);
+IntTranslateKbdMessage(LPMSG lpMsg, UINT flags);
VOID FASTCALL
co_MsqPostKeyboardMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
ExFreePool(DriverInfo->DriverName.Buffer);
RemoveEntryList(&DriverInfo->ListEntry);
ExFreePool(DriverInfo);
- }
-}
+ }
+ }
/* EOF */
{
RtlCopyMemory(Extra, ClassName.Buffer, ClassName.Length);
CbtCreatewndExtra->Cs.lpszClass =
- (LPCWSTR) MAKELONG(Extra - (PCHAR) CbtCreatewndExtra, 1);
+ (LPCWSTR)(ULONG_PTR) MAKELONG(Extra - (PCHAR) CbtCreatewndExtra, 1);
Extra += ClassName.Length;
if (Ansi)
UserEnterCo();
IntCbFreeMemory(Argument);
-
+
if (!NT_SUCCESS(Status))
{
return 0;
Class->pclsClone = NULL;
Class->pclsBase = BaseClass;
Class->pclsNext = BaseClass->pclsClone;
- (void)InterlockedExchangePointer(&BaseClass->pclsClone,
+ (void)InterlockedExchangePointer((VOID*)&BaseClass->pclsClone,
Class);
}
}
return ret;
}
-HANDLE APIENTRY
+DWORD_PTR APIENTRY
NtUserGetClipboardData(UINT uFormat, PVOID pBuffer)
{
- HANDLE ret = NULL;
+ DWORD_PTR ret = 0;
UserEnterShared();
co_IntSendMessage(ClipboardOwnerWindow->hSelf, WM_RENDERFORMAT, (WPARAM)uFormat, 0);
data = intIsFormatAvailable(uFormat);
ASSERT(data->size);
- ret = (HANDLE)(ULONG_PTR)data->size;
+ ret = data->size;
}
}
else
}
}
- ret = (HANDLE)(ULONG_PTR)data->size;
+ ret = data->size;
}
else
{
/* there is no data in this format */
- //ret = (HANDLE)FALSE;
+ //ret = FALSE;
}
}
else
PCLIPBOARDELEMENT data = intIsFormatAvailable(CF_DIB);
if (data)
{
- ret = renderBITMAPfromDIB(data->hData);
+ ret = (DWORD_PTR)renderBITMAPfromDIB(data->hData);
}
}
else
{
- ret = (HANDLE)pBuffer;
+ ret = (DWORD_PTR)pBuffer;
_SEH2_TRY
{
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
- ret = NULL;
+ ret = 0;
}
_SEH2_END
}
else
{
- ret = (HANDLE)pBuffer;
+ ret = (DWORD_PTR)pBuffer;
_SEH2_TRY
{
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
- ret = NULL;
+ ret = 0;
}
_SEH2_END
}
hwnd,
pEP->idObject,
pEP->idChild,
- (DWORD)(NtCurrentTeb()->ClientId).UniqueThread,
+ (DWORD_PTR)(NtCurrentTeb()->ClientId).UniqueThread,
(DWORD)EngGetTickCount(),
pEH->Proc);
return Result;
if (pEH->head.pti->pEThread != PsGetCurrentThread())
{ // if all process || all thread || other thread same process
if (!(pEH->idProcess) || !(pEH->idThread) ||
- (NtCurrentTeb()->ClientId.UniqueProcess == (PVOID)pEH->idProcess))
+ (NtCurrentTeb()->ClientId.UniqueProcess == (PVOID)(DWORD_PTR)pEH->idProcess))
{
Result = IntCallLowLevelEvent( pEH,
Event,
}// if ^skip own thread && ((Pid && CPid == Pid && ^skip own process) || all process)
else if ( !(pEH->Flags & WINEVENT_SKIPOWNTHREAD) &&
( ((pEH->idProcess &&
- NtCurrentTeb()->ClientId.UniqueProcess == (PVOID)pEH->idProcess) &&
+ NtCurrentTeb()->ClientId.UniqueProcess == (PVOID)(DWORD_PTR)pEH->idProcess) &&
!(pEH->Flags & WINEVENT_SKIPOWNPROCESS)) ||
!pEH->idProcess ) )
{
/* FIXME should get timeout from
* HKEY_CURRENT_USER\Control Panel\Desktop\LowLevelHooksTimeout */
Status = co_MsqSendMessage(((PTHREADINFO)Hook->Thread->Tcb.Win32Thread)->MessageQueue,
- (HWND)Code,
+ (HWND)(UINT_PTR)Code,
Hook->HookId,
wParam,
lParam,
Mod = NULL;
Global = FALSE;
- if (!NT_SUCCESS(PsLookupThreadByThreadId((HANDLE) ThreadId, &Thread)))
+ if (!NT_SUCCESS(PsLookupThreadByThreadId((HANDLE)(DWORD_PTR) ThreadId, &Thread)))
{
DPRINT1("Invalid thread id 0x%x\n", ThreadId);
SetLastWin32Error(ERROR_INVALID_PARAMETER);
UserLeave();
END_CLEANUP;
}
-
+
/* EOF */
hKl |= 0xe001 << 16; /* FIXME */
else hKl |= hKl << 16;
- NewKbl->hkl = (HKL) hKl;
+ NewKbl->hkl = (HKL)(ULONG_PTR) hKl;
NewKbl->klid = LocaleId;
NewKbl->Flags = 0;
NewKbl->RefCount = 0;
return W32Thread->KeyboardLayout->hkl;
}
- Status = PsLookupThreadByThreadId((HANDLE)dwThreadId, &Thread);
+ Status = PsLookupThreadByThreadId((HANDLE)(DWORD_PTR)dwThreadId, &Thread);
if(!NT_SUCCESS(Status))
{
SetLastWin32Error(ERROR_INVALID_PARAMETER);
BOOL FASTCALL
IntTranslateKbdMessage(LPMSG lpMsg,
- HKL dwhkl)
+ UINT Flags)
{
PTHREADINFO pti;
static INT dead_char = 0;
RETURN(FALSE);
}
- hMenu = (HMENU)WindowObject->Wnd->IDMenu;
+ hMenu = (HMENU)(DWORD_PTR)WindowObject->Wnd->IDMenu;
if (!(MenuObject = UserGetMenuObject(hMenu)))
{
RETURN(FALSE);
}
- if(Window->Wnd->IDMenu == (UINT)hMenu)
+ if(Window->Wnd->IDMenu == (UINT)(UINT_PTR)hMenu)
{
RETURN( IntHiliteMenuItem(Window, Menu, uItemHilite, uHilite));
}
if bInsert == TRUE call NtUserInsertMenuItem() else NtUserSetMenuItemInfo() */
if (bInsert) return UserInsertMenuItem(hMenu, uItem, fByPosition, lpmii);
-
+
UNIMPLEMENTED
return 0;
}
BOOL APIENTRY
NtUserTranslateMessage(LPMSG lpMsg,
- HKL dwhkl)
+ UINT flags)
{
NTSTATUS Status;
MSG SafeMsg;
RETURN( FALSE);
}
- RETURN( IntTranslateKbdMessage(&SafeMsg, dwhkl));
+ RETURN( IntTranslateKbdMessage(&SafeMsg, flags));
CLEANUP:
DPRINT("Leave NtUserTranslateMessage: ret=%i\n",_ret_);
/*
* @unimplemented
*/
-DWORD APIENTRY
+DWORD_PTR APIENTRY
NtUserGetThreadState(
DWORD Routine)
{
- DECLARE_RETURN(DWORD);
+ DWORD_PTR ret = 0;
DPRINT("Enter NtUserGetThreadState\n");
if (Routine != THREADSTATE_GETTHREADINFO)
{
case THREADSTATE_GETTHREADINFO:
GetW32ThreadInfo();
- RETURN(0);
-
+ break;
case THREADSTATE_FOCUSWINDOW:
- RETURN( (DWORD)IntGetThreadFocusWindow());
+ ret = (DWORD_PTR)IntGetThreadFocusWindow();
+ break;
case THREADSTATE_CAPTUREWINDOW:
/* FIXME should use UserEnterShared */
- RETURN( (DWORD)IntGetCapture());
+ ret = (DWORD_PTR)IntGetCapture();
+ break;
case THREADSTATE_PROGMANWINDOW:
- RETURN( (DWORD)GetW32ThreadInfo()->pDeskInfo->hProgmanWindow);
+ ret = (DWORD_PTR)GetW32ThreadInfo()->pDeskInfo->hProgmanWindow;
+ break;
case THREADSTATE_TASKMANWINDOW:
- RETURN( (DWORD)GetW32ThreadInfo()->pDeskInfo->hTaskManWindow);
+ ret = (DWORD_PTR)GetW32ThreadInfo()->pDeskInfo->hTaskManWindow;
+ break;
case THREADSTATE_ACTIVEWINDOW:
- RETURN ( (DWORD)UserGetActiveWindow());
+ ret = (DWORD_PTR)UserGetActiveWindow();
+ break;
case THREADSTATE_INSENDMESSAGE:
{
- DWORD Ret = ISMEX_NOSEND;
PUSER_MESSAGE_QUEUE MessageQueue =
((PTHREADINFO)PsGetCurrentThreadWin32Thread())->MessageQueue;
DPRINT1("THREADSTATE_INSENDMESSAGE\n");
+ ret = ISMEX_NOSEND;
if (!IsListEmpty(&MessageQueue->SentMessagesListHead))
{
- Ret = ISMEX_SEND;
+ ret = ISMEX_SEND;
}
else if (!IsListEmpty(&MessageQueue->NotifyMessagesListHead))
{
/* FIXME Need to set message flag when in callback mode with notify */
- Ret = ISMEX_NOTIFY;
+ ret = ISMEX_NOTIFY;
}
/* FIXME Need to set message flag if replied to or ReplyMessage */
- RETURN( Ret);
+ break;
}
case THREADSTATE_GETMESSAGETIME:
/* FIXME Needs more work! */
- RETURN( ((PTHREADINFO)PsGetCurrentThreadWin32Thread())->timeLast);
+ ret = ((PTHREADINFO)PsGetCurrentThreadWin32Thread())->timeLast;
+ break;
case THREADSTATE_GETINPUTSTATE:
- RETURN( HIWORD(IntGetQueueStatus(FALSE)) & (QS_KEY | QS_MOUSEBUTTON));
+ ret = HIWORD(IntGetQueueStatus(FALSE)) & (QS_KEY | QS_MOUSEBUTTON);
+ break;
}
- RETURN( 0);
-CLEANUP:
- DPRINT("Leave NtUserGetThreadState, ret=%i\n",_ret_);
+ DPRINT("Leave NtUserGetThreadState, ret=%i\n", ret);
UserLeave();
- END_CLEANUP;
+
+ return ret;
}
if(idThread)
{
- Status = PsLookupThreadByThreadId((HANDLE)idThread, &Thread);
+ Status = PsLookupThreadByThreadId((HANDLE)(DWORD_PTR)idThread, &Thread);
if(!NT_SUCCESS(Status))
{
SetLastWin32Error(ERROR_ACCESS_DENIED);
*ScreenPoint = Message->Msg.pt;
- if((Window != NULL && (int)Window != 1 && CaptureWindow->hSelf != Window->hSelf) ||
+ if((Window != NULL && PtrToInt(Window) != 1 && CaptureWindow->hSelf != Window->hSelf) ||
((FilterLow != 0 || FilterHigh != 0) && (Msg < FilterLow || Msg > FilterHigh)))
{
/* Reject the message because it doesn't match the filter */
{
CurrentMessage = CONTAINING_RECORD(CurrentEntry, USER_MESSAGE,
ListEntry);
- if ((!Window || (int)Window == 1 || Window->hSelf == CurrentMessage->Msg.hwnd) &&
+ if ((!Window || PtrToInt(Window) == 1 || Window->hSelf == CurrentMessage->Msg.hwnd) &&
((MsgFilterLow == 0 && MsgFilterHigh == 0) ||
(MsgFilterLow <= CurrentMessage->Msg.message &&
MsgFilterHigh >= CurrentMessage->Msg.message)))
Timer = CONTAINING_RECORD(MessageQueue->TimerListHead.Flink,
TIMER_ENTRY, ListEntry);
EnumEntry = EnumEntry->Flink;
- if ((NULL == WndFilter || (int)WndFilter == 1 || Timer->Wnd == WndFilter->hSelf) &&
+ if ((NULL == WndFilter || PtrToInt(WndFilter) == 1 || Timer->Wnd == WndFilter->hSelf) &&
((MsgFilterMin == 0 && MsgFilterMax == 0) ||
(MsgFilterMin <= Timer->Msg &&
Timer->Msg <= MsgFilterMax)))
&& !(Wnd->ExStyle & WS_EX_TOOLWINDOW);
}
else
- HasIcon = (BOOL) hIcon;
+ HasIcon = (hIcon != 0);
IconWidth = UserGetSystemMetrics(SM_CXSIZE) + Padding;
/*
* @unimplemented
*/
-DWORD
+DWORD_PTR
APIENTRY
NtUserCallNoParam(DWORD Routine)
{
- DWORD Result = 0;
- DECLARE_RETURN(DWORD);
+ DWORD_PTR Result = 0;
+ DECLARE_RETURN(DWORD_PTR);
DPRINT("Enter NtUserCallNoParam\n");
UserEnterExclusive();
switch(Routine)
{
case NOPARAM_ROUTINE_CREATEMENU:
- Result = (DWORD)UserCreateMenu(FALSE);
+ Result = (DWORD_PTR)UserCreateMenu(FALSE);
break;
case NOPARAM_ROUTINE_CREATEMENUPOPUP:
- Result = (DWORD)UserCreateMenu(TRUE);
+ Result = (DWORD_PTR)UserCreateMenu(TRUE);
break;
case NOPARAM_ROUTINE_DESTROY_CARET:
- Result = (DWORD)co_IntDestroyCaret(PsGetCurrentThread()->Tcb.Win32Thread);
+ Result = (DWORD_PTR)co_IntDestroyCaret(PsGetCurrentThread()->Tcb.Win32Thread);
break;
case NOPARAM_ROUTINE_INIT_MESSAGE_PUMP:
- Result = (DWORD)IntInitMessagePumpHook();
+ Result = (DWORD_PTR)IntInitMessagePumpHook();
break;
case NOPARAM_ROUTINE_UNINIT_MESSAGE_PUMP:
- Result = (DWORD)IntUninitMessagePumpHook();
+ Result = (DWORD_PTR)IntUninitMessagePumpHook();
break;
case NOPARAM_ROUTINE_GETMESSAGEEXTRAINFO:
- Result = (DWORD)MsqGetMessageExtraInfo();
+ Result = (DWORD_PTR)MsqGetMessageExtraInfo();
break;
case NOPARAM_ROUTINE_ANYPOPUP:
- Result = (DWORD)IntAnyPopup();
+ Result = (DWORD_PTR)IntAnyPopup();
break;
case NOPARAM_ROUTINE_CSRSS_INITIALIZED:
- Result = (DWORD)CsrInit();
+ Result = (DWORD_PTR)CsrInit();
break;
case NOPARAM_ROUTINE_MSQCLEARWAKEMASK:
- RETURN( (DWORD)IntMsqClearWakeMask());
+ RETURN( (DWORD_PTR)IntMsqClearWakeMask());
default:
DPRINT1("Calling invalid routine number 0x%x in NtUserCallNoParam\n", Routine);
/*
* @implemented
*/
-DWORD
+DWORD_PTR
APIENTRY
NtUserCallOneParam(
- DWORD Param,
+ DWORD_PTR Param,
DWORD Routine)
{
- DECLARE_RETURN(DWORD);
+ DECLARE_RETURN(DWORD_PTR);
DPRINT("Enter NtUserCallOneParam\n");
RETURN(TRUE);
}
case ONEPARAM_ROUTINE_SHOWCURSOR:
- RETURN( (DWORD)UserShowCursor((BOOL)Param) );
+ RETURN( (DWORD_PTR)UserShowCursor((BOOL)Param) );
case ONEPARAM_ROUTINE_GETDESKTOPMAPPING:
{
{
/* Try convert the pointer to a user mode pointer if the desktop is
mapped into the process */
- RETURN((DWORD)DesktopHeapAddressToUser((PVOID)Param));
+ RETURN((DWORD_PTR)DesktopHeapAddressToUser((PVOID)Param));
}
else
{
}
case ONEPARAM_ROUTINE_WINDOWFROMDC:
- RETURN( (DWORD)IntWindowFromDC((HDC)Param));
+ RETURN( (DWORD_PTR)IntWindowFromDC((HDC)Param));
case ONEPARAM_ROUTINE_SWAPMOUSEBUTTON:
{
- DWORD Result;
+ DWORD_PTR Result;
Result = gspv.bMouseBtnSwap;
gspv.bMouseBtnSwap = Param ? TRUE : FALSE;
}
case ONEPARAM_ROUTINE_SWITCHCARETSHOWING:
- RETURN( (DWORD)IntSwitchCaretShowing((PVOID)Param));
+ RETURN( (DWORD_PTR)IntSwitchCaretShowing((PVOID)Param));
case ONEPARAM_ROUTINE_SETCARETBLINKTIME:
- RETURN( (DWORD)IntSetCaretBlinkTime((UINT)Param));
+ RETURN( (DWORD_PTR)IntSetCaretBlinkTime((UINT)Param));
case ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO:
- RETURN( (DWORD)MsqSetMessageExtraInfo((LPARAM)Param));
+ RETURN( (DWORD_PTR)MsqSetMessageExtraInfo((LPARAM)Param));
case ONEPARAM_ROUTINE_CREATECURICONHANDLE:
{
RETURN(0);
}
- RETURN((DWORD)CurIcon->Self);
+ RETURN((DWORD_PTR)CurIcon->Self);
}
case ONEPARAM_ROUTINE_GETCURSORPOSITION:
case ONEPARAM_ROUTINE_ISWINDOWINDESTROY:
{
PWINDOW_OBJECT Window;
- DWORD Result;
+ DWORD_PTR Result;
if(!(Window = UserGetWindowObject((HWND)Param)))
{
RETURN( FALSE);
}
- Result = (DWORD)IntIsWindowInDestroy(Window);
+ Result = (DWORD_PTR)IntIsWindowInDestroy(Window);
RETURN( Result);
}
}
case ONEPARAM_ROUTINE_MSQSETWAKEMASK:
- RETURN( (DWORD)IntMsqSetWakeMask(Param));
+ RETURN( (DWORD_PTR)IntMsqSetWakeMask(Param));
case ONEPARAM_ROUTINE_GETKEYBOARDTYPE:
RETURN( UserGetKeyboardType(Param));
case ONEPARAM_ROUTINE_GETKEYBOARDLAYOUT:
- RETURN( (DWORD)UserGetKeyboardLayout(Param));
+ RETURN( (DWORD_PTR)UserGetKeyboardLayout(Param));
case ONEPARAM_ROUTINE_RELEASEDC:
RETURN (UserReleaseDC(NULL, (HDC) Param, FALSE));
/*
* @implemented
*/
-DWORD
+DWORD_PTR
APIENTRY
NtUserCallTwoParam(
- DWORD Param1,
- DWORD Param2,
+ DWORD_PTR Param1,
+ DWORD_PTR Param2,
DWORD Routine)
{
NTSTATUS Status;
PWINDOW_OBJECT Window;
- DECLARE_RETURN(DWORD);
+ DECLARE_RETURN(DWORD_PTR);
DPRINT("Enter NtUserCallTwoParam\n");
UserEnterExclusive();
{
case TWOPARAM_ROUTINE_GETWINDOWRGNBOX:
{
- DWORD Ret;
+ DWORD_PTR Ret;
RECTL rcRect;
Window = UserGetWindowObject((HWND)Param1);
if (!Window) RETURN(ERROR);
- Ret = (DWORD)IntGetWindowRgnBox(Window, &rcRect);
+ Ret = (DWORD_PTR)IntGetWindowRgnBox(Window, &rcRect);
Status = MmCopyToCaller((PVOID)Param2, &rcRect, sizeof(RECT));
if(!NT_SUCCESS(Status))
{
Window = UserGetWindowObject((HWND)Param1);
if (!Window) RETURN(ERROR);
- RETURN( (DWORD)IntGetWindowRgn(Window, (HRGN)Param2));
+ RETURN( (DWORD_PTR)IntGetWindowRgn(Window, (HRGN)Param2));
}
case TWOPARAM_ROUTINE_SETMENUBARHEIGHT:
{
- DWORD Ret;
+ DWORD_PTR Ret;
PMENU_OBJECT MenuObject = IntGetMenuObject((HMENU)Param1);
if(!MenuObject)
RETURN( 0);
MenuObject->MenuInfo.Height = (int)Param2;
}
else
- Ret = (DWORD)MenuObject->MenuInfo.Height;
+ Ret = (DWORD_PTR)MenuObject->MenuInfo.Height;
IntReleaseMenuObject(MenuObject);
RETURN( Ret);
}
PUSER_MESSAGE_QUEUE MsgQueue = ((PTHREADINFO)PsGetCurrentThread()->Tcb.Win32Thread)->MessageQueue;
ASSERT(MsgQueue);
- RETURN( (DWORD)MsqSetStateWindow(MsgQueue, (ULONG)Param1, (HWND)Param2));
+ RETURN( (DWORD_PTR)MsqSetStateWindow(MsgQueue, (ULONG)Param1, (HWND)Param2));
}
case TWOPARAM_ROUTINE_ENABLEWINDOW:
Window = UserGetWindowObject((HWND)Param1);
if (!Window) RETURN(0);
- RETURN( (DWORD)IntShowOwnedPopups(Window, (BOOL) Param2));
+ RETURN( (DWORD_PTR)IntShowOwnedPopups(Window, (BOOL) Param2));
}
case TWOPARAM_ROUTINE_ROS_UPDATEUISTATE:
case TWOPARAM_ROUTINE_SETCARETPOS:
- RETURN( (DWORD)co_IntSetCaretPos((int)Param1, (int)Param2));
+ RETURN( (DWORD_PTR)co_IntSetCaretPos((int)Param1, (int)Param2));
case TWOPARAM_ROUTINE_REGISTERLOGONPROC:
- RETURN( (DWORD)co_IntRegisterLogonProcess((HANDLE)Param1, (BOOL)Param2));
+ RETURN( (DWORD_PTR)co_IntRegisterLogonProcess((HANDLE)Param1, (BOOL)Param2));
}
DPRINT1("Calling invalid routine number 0x%x in NtUserCallTwoParam(), Param1=0x%x Parm2=0x%x\n",
Routine, Param1, Param2);
if (!((Wnd->style & (WS_CHILD | WS_POPUP)) != WS_CHILD))
break;
- if(!(Menu = UserGetMenuObject((HMENU) Wnd->IDMenu)))
+ if(!(Menu = UserGetMenuObject((HMENU)(DWORD_PTR) Wnd->IDMenu)))
break;
Menu->MenuInfo.WndOwner = hWnd;
#include "gdidbg.c"
-/* static */ /* FIXME: -fno-unit-at-a-time breaks this */
+static
BOOL INTERNAL_CALL GDI_CleanupDummy(PVOID ObjectBody);
/** GLOBALS *******************************************************************/
/*
* Dummy GDI Cleanup Callback
*/
-/* static */ /* FIXME: -fno-unit-at-a-time breaks this */
+static
BOOL INTERNAL_CALL
GDI_CleanupDummy(PVOID ObjectBody)
{
-#include "include/reactos/msvctarget.h"
+#undef i386
-@ stdcall FLOATOBJ_AddFloatObj(ptr ptr) FLOATOBJ_Add
-@ stdcall FLOATOBJ_DivFloatObj(ptr ptr) FLOATOBJ_Div
-@ stdcall FLOATOBJ_MulFloatObj(ptr ptr) FLOATOBJ_Mul
-@ stdcall FLOATOBJ_SubFloatObj(ptr ptr) FLOATOBJ_Sub
+@ stdcall -arch=i386 FLOATOBJ_AddFloatObj(ptr ptr) FLOATOBJ_Add
+@ stdcall -arch=i386 FLOATOBJ_DivFloatObj(ptr ptr) FLOATOBJ_Div
+@ stdcall -arch=i386 FLOATOBJ_MulFloatObj(ptr ptr) FLOATOBJ_Mul
+@ stdcall -arch=i386 FLOATOBJ_SubFloatObj(ptr ptr) FLOATOBJ_Sub
@ stdcall BRUSHOBJ_hGetColorTransform(ptr)
@ stdcall BRUSHOBJ_pvAllocRbrush(ptr long)
@ stdcall BRUSHOBJ_pvGetRbrush(ptr)
@ stdcall EngWaitForSingleObject(ptr ptr)
@ stdcall EngWideCharToMultiByte(long ptr long ptr long)
@ stdcall EngWritePrinter(ptr ptr long ptr)
-@ stdcall FLOATOBJ_Add(ptr ptr)
-@ stdcall FLOATOBJ_AddFloat(ptr long)
-@ stdcall FLOATOBJ_AddLong(ptr long)
-@ stdcall FLOATOBJ_Div(ptr ptr)
-@ stdcall FLOATOBJ_DivFloat(ptr long)
-@ stdcall FLOATOBJ_DivLong(ptr long)
-@ stdcall FLOATOBJ_Equal(ptr ptr)
-@ stdcall FLOATOBJ_EqualLong(ptr long)
-@ stdcall FLOATOBJ_GetFloat(ptr)
-@ stdcall FLOATOBJ_GetLong(ptr)
-@ stdcall FLOATOBJ_GreaterThan(ptr ptr)
-@ stdcall FLOATOBJ_GreaterThanLong(ptr long)
-@ stdcall FLOATOBJ_LessThan(ptr ptr)
-@ stdcall FLOATOBJ_LessThanLong(ptr long)
-@ stdcall FLOATOBJ_Mul(ptr ptr)
-@ stdcall FLOATOBJ_MulFloat(ptr long)
-@ stdcall FLOATOBJ_MulLong(ptr long)
-@ stdcall FLOATOBJ_Neg(ptr)
-@ stdcall FLOATOBJ_SetFloat(ptr long)
-@ stdcall FLOATOBJ_SetLong(ptr long)
-@ stdcall FLOATOBJ_Sub(ptr ptr)
-@ stdcall FLOATOBJ_SubFloat(ptr long)
-@ stdcall FLOATOBJ_SubLong(ptr long)
+@ stdcall -arch=i386 FLOATOBJ_Add(ptr ptr)
+@ stdcall -arch=i386 FLOATOBJ_AddFloat(ptr long)
+@ stdcall -arch=i386 FLOATOBJ_AddLong(ptr long)
+@ stdcall -arch=i386 FLOATOBJ_Div(ptr ptr)
+@ stdcall -arch=i386 FLOATOBJ_DivFloat(ptr long)
+@ stdcall -arch=i386 FLOATOBJ_DivLong(ptr long)
+@ stdcall -arch=i386 FLOATOBJ_Equal(ptr ptr)
+@ stdcall -arch=i386 FLOATOBJ_EqualLong(ptr long)
+@ stdcall -arch=i386 FLOATOBJ_GetFloat(ptr)
+@ stdcall -arch=i386 FLOATOBJ_GetLong(ptr)
+@ stdcall -arch=i386 FLOATOBJ_GreaterThan(ptr ptr)
+@ stdcall -arch=i386 FLOATOBJ_GreaterThanLong(ptr long)
+@ stdcall -arch=i386 FLOATOBJ_LessThan(ptr ptr)
+@ stdcall -arch=i386 FLOATOBJ_LessThanLong(ptr long)
+@ stdcall -arch=i386 FLOATOBJ_Mul(ptr ptr)
+@ stdcall -arch=i386 FLOATOBJ_MulFloat(ptr long)
+@ stdcall -arch=i386 FLOATOBJ_MulLong(ptr long)
+@ stdcall -arch=i386 FLOATOBJ_Neg(ptr)
+@ stdcall -arch=i386 FLOATOBJ_SetFloat(ptr long)
+@ stdcall -arch=i386 FLOATOBJ_SetLong(ptr long)
+@ stdcall -arch=i386 FLOATOBJ_Sub(ptr ptr)
+@ stdcall -arch=i386 FLOATOBJ_SubFloat(ptr long)
+@ stdcall -arch=i386 FLOATOBJ_SubLong(ptr long)
@ stdcall FONTOBJ_cGetAllGlyphHandles(ptr ptr)
@ stdcall FONTOBJ_cGetGlyphs(ptr long long ptr ptr)
@ stdcall FONTOBJ_pQueryGlyphAttrs(ptr long)
<?xml version="1.0"?>
<!DOCTYPE group SYSTEM "../../../tools/rbuild/project.dtd">
<group>
-<module name="win32k" type="kernelmodedriver" installbase="system32" installname="win32k.sys" crt="libcntpr">
+<module name="win32k" type="kernelmodedriver" installbase="system32" installname="win32k.sys" crt="libcntpr" allowwarnings="true">
<importlibrary definition="win32k.pspec" />
<library>pseh</library>
<library>ntoskrnl</library>
<compilerflag compilerset="msc">/wd4276</compilerflag>
<define name="LANGPACK" />
<define name="_WIN32K_" />
- <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269
<pch>pch.h</pch>
- -->
<directory name="dib" root="intermediate">
<file>dib8gen.c</file>
<file>stubs.c</file>
<file>umpdstubs.c</file>
</directory>
-
- <!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
- <compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
</module>
</group>
# FIXME: disabled until RosBE stops sucking
# BUILTIN_CPPFLAGS+= -nostdinc
+ifeq ($(ROS_ARCH),i386)
+BUILTIN_CFLAGS+= -fno-optimize-sibling-calls -fno-set-stack-executable
+else
BUILTIN_CFLAGS+= -fno-optimize-sibling-calls
+endif
BUILTIN_CXXFLAGS+= -fno-optimize-sibling-calls
#(module, source, dependencies, cflags, output)
LDFLAG_WINDOWS:=--subsystem=windows
LDFLAG_NATIVE:=--subsystem=native
+LDFLAG_EXCLUDE_ALL_SYMBOLS=-exclude-all-symbols
+
#~ #(module, objs, deps, ldflags, output, def, libs, entry, base)
#(module, objs, deps, ldflags, output, def, libs, entry, base, extralibs)
define RBUILD_LINK
$(5): ${call RBUILD_intermediate_dir,$(5)}$$(SEP)$(1)_objs.rsp $(7) $(3) $$(RSYM_TARGET) $$(PEFIXUP_TARGET) | ${call RBUILD_dir,$(5)}
$$(ECHO_LD)
#~ $${ld} --entry=$(8) --image-base=$(9) @${call RBUILD_intermediate_dir,$(5)}$$(SEP)$(1)_objs.rsp $(7) ${call RBUILD_ldflags,$(1),$(4)} -o $$@
- $${ld} --entry=$(8) --image-base=$(9) @${call RBUILD_intermediate_dir,$(5)}$$(SEP)$(1)_objs.rsp $(10) $(7) $(10) ${call RBUILD_ldflags,$(1),$(4)} -o $$@
+ $${ld} --entry=$(8) --image-base=$(9) @${call RBUILD_intermediate_dir,$(5)}$$(SEP)$(1)_objs.rsp --start-group $(10) $(7) --end-group ${call RBUILD_ldflags,$(1),$(4)} -o $$@
ifneq ($(or $(6),$$(MODULETYPE$$($(1)_TYPE)_KMODE)),)
$$(ECHO_PEFIXUP)
$$(Q)$$(PEFIXUP_TARGET) $$@ $(if $(6),-exports) $$(if $$(MODULETYPE$($(1)_TYPE)_KMODE),-sections)
GenerateTestSupportCode ();
GenerateCompilationUnitSupportCode ();
GenerateSysSetup ();
+ GenerateInstallerFileList();
GenerateProxyMakefiles ();
CheckAutomaticDependencies ();
CloseMakefile ();
}
+void
+MingwBackend::GenerateInstallerFileList()
+{
+ this->ProjectNode.GenerateInstallerFileList();
+}
+
void
MingwBackend::CreateMakefile ()
{
fputs ( "BUILTIN_CXXINCLUDES+= $(TARGET_CPPFLAGS)\n", fMakefile );
fprintf ( fMakefile, "PROJECT_CCLIBS := \"$(shell ${TARGET_CC} -print-libgcc-file-name)\"\n" );
- fprintf ( fMakefile, "PROJECT_CXXLIBS := \"$(shell ${TARGET_CPP} -print-file-name=libstdc++.a)\" \"$(shell ${TARGET_CPP} -print-file-name=libgcc.a)\" \"$(shell ${TARGET_CPP} -print-file-name=libmingw32.a)\" \"$(shell ${TARGET_CPP} -print-file-name=libmingwex.a)\" \"$(shell ${TARGET_CPP} -print-file-name=libcoldname.a)\"\n" );
+ fprintf ( fMakefile, "PROJECT_CXXLIBS := \"$(shell ${TARGET_CPP} -print-file-name=libstdc++.a)\" \"$(shell ${TARGET_CPP} -print-libgcc-file-name)\" \"$(shell ${TARGET_CPP} -print-file-name=libmingw32.a)\" \"$(shell ${TARGET_CPP} -print-file-name=libmingwex.a)\" " );
/* hack to get libgcc_eh.a, should check mingw version or something */
if (Environment::GetArch() == "amd64")
- {
- fprintf ( fMakefile, "PROJECT_LPPFLAGS += $(shell ${TARGET_CPP} -print-file-name=libgcc_eh.a)\n" );
- }
+ fprintf ( fMakefile, " \"$(shell ${TARGET_CPP} -print-file-name=libgcc_eh.a)\"" );
+ /* hack to get _get_output_format, needed by libmingwex */
+ else if (Environment::GetArch() == "i386")
+ fprintf ( fMakefile, "\"$(shell ${TARGET_CPP} -print-file-name=ofmt_stub.a)\"");
+ fprintf ( fMakefile,"\n");
}
-
MingwModuleHandler::GenerateParameters ( "PROJECT", "+=", ProjectNode.non_if_data );
MingwModuleHandler::GenerateParameters ( "PROJECT_HOST", "+=", ProjectNode.host_non_if_data );
buffer[i] = '\0';
pclose ( fp );
- char separators[] = " ()";
+ char separators[] = " ()\n";
char *token;
char *prevtoken = NULL;
string
MingwBackend::GetCompilerVersion ( const string& compilerCommand )
{
- string versionCommand = ssprintf ( "%s --version gcc",
+ string versionCommand = ssprintf ( "%s --version",
compilerCommand.c_str (),
NUL,
NUL );
bool
MingwBackend::IsSupportedCompilerVersion ( const string& compilerVersion )
{
- if ( strcmp ( compilerVersion.c_str (), "3.4.2") < 0 )
+ if ( strcmp ( compilerVersion.c_str (), "4.4.2") < 0 )
return false;
else
return true;
bool
MingwBackend::IsSupportedBinutilsVersion ( const string& binutilsVersion )
{
- if ( manualBinutilsSetting ) return true;
+ int digit = binutilsVersion.find_last_of(".");
+ if(digit == -1)
+ {
+ printf("Unable to detect binutils version!\n");
+ return false;
+ }
- /* linux */
- if ( binutilsVersion.find('.') != std::string::npos )
+ string date = string(binutilsVersion, digit + 1);
+ if(date.length() == 8)
{
- /* TODO: blacklist versions on version number instead of date */
- return true;
+ /* This is a real date in the format YYYYMMDD.
+ Check whether we have at least Binutils 20091017 (older versions
+ don't support the -exclude-all-symbols option we use). */
+ if(strcmp(date.c_str(), "20091119") < 0)
+ return false;
}
-
- /*
- * - Binutils older than 2003/10/01 have broken windres which can't handle
- * icons with alpha channel.
- * - Binutils between 2004/09/02 and 2004/10/08 have broken handling of
- * forward exports in dlltool.
- */
- if ( ( ( strcmp ( binutilsVersion.c_str (), "20040902") >= 0 ) &&
- ( strcmp ( binutilsVersion.c_str (), "20041008") <= 0 ) ) ||
- ( strcmp ( binutilsVersion.c_str (), "20031001") < 0 ) )
- return false;
else
- return true;
+ {
+ /* This is no date, so binutilsVersion should just contain the version
+ number.
+ Binutils 2.20 will hopefully contain the required features. */
+ if(strcmp(binutilsVersion.c_str(), "2.20") < 0)
+ return false;
+ }
+
+ return true;
}
void
"install_registry: %s\n",
registryTargetFiles.c_str () );
fprintf ( fMakefile,
- "%s: %s %s $(MKHIVE_TARGET)\n",
+ "%s: %s %s $(mkhive_TARGET)\n",
registryTargetFiles.c_str (),
registrySourceFiles.c_str (),
GetFullPath ( system32 ).c_str () );
fprintf ( fMakefile,
"\t$(ECHO_MKHIVE)\n" );
fprintf ( fMakefile,
- "\t$(MKHIVE_TARGET) boot%cbootdata %s $(ARCH) boot%cbootdata%chiveinst_$(ARCH).inf\n",
+ "\t$(mkhive_TARGET) boot%cbootdata %s $(ARCH) boot%cbootdata%chiveinst_$(ARCH).inf\n",
cSep, GetFullPath ( system32 ).c_str (),
cSep, cSep );
fprintf ( fMakefile,
bool use_pch;
bool DetectMicrosoftCompiler ( std::string& version, std::string& path );
bool DetectMicrosoftLinker ( std::string& version, std::string& path );
+ void GenerateInstallerFileList();
};
MingwModuleHandler::GenerateLinkerCommand () const
{
string definitionFilename;
-
+
const FileLocation *DefinitionFilename = GetDefinitionFilename ();
if ( DefinitionFilename ) {
definitionFilename = backend->GetFullName (*DefinitionFilename);
delete DefinitionFilename;
- }
+}
string linkerScriptArgument;
if ( module.linkerScript != NULL ) {
if ( ModuleHandlerInformations[module.type].DefaultHost == HostFalse ) {
if ( module.cplusplus ) {
switch ( module.type )
- {
+ {
case Win32DLL:
case Win32OCX:
case Win32CUI:
default:
extraLibraries = "$$(PROJECT_CCLIBS)";
break;
- }
+ }
} else
extraLibraries = "$$(PROJECT_CCLIBS)";
}
delete PassThruCacheDirectory ( new FileLocation ( module.output->directory, module.output->relative_path, "" ) );
delete PassThruCacheDirectory ( new FileLocation ( IntermediateDirectory, module.output->relative_path, "" ) );
- fprintf ( fMakefile,
+ fprintf ( fMakefile,
"$(eval $(call RBUILD_LINK_RULE,%s,%s,%s,%s,%s,%s,%s))\n",
module.name.c_str(),
definitionFilename.c_str(),
module.xmlbuildFile.c_str(),
- linkerScriptArgument.c_str(),
+ linkerScriptArgument.c_str (),
extraLibraries.c_str(),
module.GetEntryPoint().c_str(),
module.baseaddress.c_str() );
-}
+ }
void
MingwModuleHandler::GenerateObjectFileTargets ( const IfableData& data )
&module.linkerFlags,
used_defs );
+ /* LD automatically exports all symbols by default if -shared is specified. Prevent it from doing
+ this by adding the option -exclude-all-symbols (available since Binutils 20091017). */
+ // FIXME: Should only be applied for -shared modules, when there's a smart way to check for them.
+ if ( ModuleHandlerInformations[module.type].DefaultHost == HostFalse && !module.importLibrary )
+ fprintf ( fMakefile, "%s_LDFLAGS+=$(LDFLAG_EXCLUDE_ALL_SYMBOLS)\n", module.name.c_str() );
+
fprintf ( fMakefile, "\n\n" );
}
const FileLocation* ar_target = GenerateArchiveTarget ();
if ( ar_target )
- delete ar_target;
+ delete ar_target;
}
void
MingwKernelModuleHandler::GenerateKernelModuleTarget ()
{
- GenerateRules ();
+ GenerateRules ();
GenerateLinkerCommand ();
-}
+ }
MingwKernelModeDLLModuleHandler::MingwKernelModeDLLModuleHandler (
void
MingwKernelModeDLLModuleHandler::GenerateKernelModeDLLModuleTarget ()
{
- GenerateRules ();
+ GenerateRules ();
GenerateLinkerCommand ();
-}
+ }
MingwNativeDLLModuleHandler::MingwNativeDLLModuleHandler (
void
MingwNativeDLLModuleHandler::GenerateNativeDLLModuleTarget ()
{
- GenerateRules ();
+ GenerateRules ();
GenerateLinkerCommand ();
-}
+ }
MingwNativeCUIModuleHandler::MingwNativeCUIModuleHandler (
void
MingwNativeCUIModuleHandler::GenerateNativeCUIModuleTarget ()
{
- GenerateRules ();
+ GenerateRules ();
GenerateLinkerCommand ();
-}
+ }
MingwWin32DLLModuleHandler::MingwWin32DLLModuleHandler (
void
MingwWin32DLLModuleHandler::GenerateWin32DLLModuleTarget ()
{
- GenerateRules ();
+ GenerateRules ();
GenerateLinkerCommand ();
-}
+ }
void
void
MingwWin32OCXModuleHandler::GenerateWin32OCXModuleTarget ()
{
- GenerateRules ();
+ GenerateRules ();
GenerateLinkerCommand ();
-}
+ }
MingwWin32CUIModuleHandler::MingwWin32CUIModuleHandler (
void
MingwWin32CUIModuleHandler::GenerateWin32CUIModuleTarget ()
{
- GenerateRules ();
+ GenerateRules ();
GenerateLinkerCommand ();
-}
+ }
MingwWin32GUIModuleHandler::MingwWin32GUIModuleHandler (
void
MingwWin32GUIModuleHandler::GenerateWin32GUIModuleTarget ()
{
- GenerateRules ();
+ GenerateRules ();
GenerateLinkerCommand ();
-}
+ }
MingwBootLoaderModuleHandler::MingwBootLoaderModuleHandler (
const FileLocation *isoboot = bootModule->output;
// prepare reactos.dff and reactos.inf
- FileLocation reactosDff ( SourceDirectory,
- "boot" + sSep + "bootdata" + sSep + "packages",
+ FileLocation reactosDff ( IntermediateDirectory,
+ "",
"reactos.dff" );
FileLocation reactosInf ( bootcdReactos.directory,
bootcdReactos.relative_path,
void
MingwTestModuleHandler::GenerateTestModuleTarget ()
{
- GenerateRules ();
+ GenerateRules ();
GenerateLinkerCommand ();
-}
+ }
MingwAliasModuleHandler::MingwAliasModuleHandler (
$$(Q)$$(widl_TARGET) ${call RBUILD_midlflags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -h -H ${call RBUILD_intermediate_path_noext,$(2)}_c.h -c -C ${call RBUILD_intermediate_path_noext,$(2)}_c.c $(2)
$${checkpoint} $$@>$(NUL)
-${call RBUILD_CC,$(1),${call RBUILD_intermediate_path_noext,$(2)}_c.c,,-fno-unit-at-a-time,${call RBUILD_intermediate_path_noext,$(2)}_c.o}
-
endef
#(module, source, dependencies, cflags)
$$(Q)$$(widl_TARGET) ${call RBUILD_midlflags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -h -H ${call RBUILD_intermediate_path_noext,$(2)}_s.h -s -S ${call RBUILD_intermediate_path_noext,$(2)}_s.c $(2)
$${checkpoint} $$@>$(NUL)
-${call RBUILD_CC,$(1),${call RBUILD_intermediate_path_noext,$(2)}_s.c,,-fno-unit-at-a-time,${call RBUILD_intermediate_path_noext,$(2)}_s.o}
-
endef
#(module, source, dependencies, cflags)
$$(Q)$$(widl_TARGET) ${call RBUILD_midlflags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -h -H ${call RBUILD_intermediate_path_noext,$(2)}_p.h -p -P ${call RBUILD_intermediate_path_noext,$(2)}_p.c $(2)
$${checkpoint} $$@>$(NUL)
-${call RBUILD_CC,$(1),${call RBUILD_intermediate_path_noext,$(2)}_p.c,,-fno-unit-at-a-time,${call RBUILD_intermediate_path_noext,$(2)}_p.o}
-
endef
#(module, source, dependencies, cflags)
$$(ECHO_WIDL)
$$(Q)$$(widl_TARGET) ${call RBUILD_midlflags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -u -U $$@ $$<
-${call RBUILD_CC,$(1),${call RBUILD_intermediate_path_noext,$(2)}_i.c,,-fno-unit-at-a-time,${call RBUILD_intermediate_path_noext,$(2)}_i.o}
+${call RBUILD_CC,$(1),${call RBUILD_intermediate_path_noext,$(2)}_i.c,,,${call RBUILD_intermediate_path_noext,$(2)}_i.o}
endef
vcdir = DEF_SSEP + _get_vc_dir();
}
- fprintf ( OUT, "\t\t<Configuration\r\n" );
- fprintf ( OUT, "\t\t\tName=\"%s|Win32\"\r\n", cfg.name.c_str() );
+ fprintf ( OUT, "\t\t<Configuration\r\n" );
+ fprintf ( OUT, "\t\t\tName=\"%s|Win32\"\r\n", cfg.name.c_str() );
- if ( configuration.UseConfigurationInPath )
- {
- fprintf ( OUT, "\t\t\tOutputDirectory=\"%s\\%s%s\\%s\"\r\n", outdir.c_str (), module.output->relative_path.c_str (), vcdir.c_str (), cfg.name.c_str() );
- fprintf ( OUT, "\t\t\tIntermediateDirectory=\"%s\\%s%s\\%s\"\r\n", intdir.c_str (), module.output->relative_path.c_str (), vcdir.c_str (), cfg.name.c_str() );
- }
- else
- {
- fprintf ( OUT, "\t\t\tOutputDirectory=\"%s\\%s%s\"\r\n", outdir.c_str (), module.output->relative_path.c_str (), vcdir.c_str () );
- fprintf ( OUT, "\t\t\tIntermediateDirectory=\"%s\\%s%s\"\r\n", intdir.c_str (), module.output->relative_path.c_str (), vcdir.c_str () );
- }
+ if ( configuration.UseConfigurationInPath )
+ {
+ fprintf ( OUT, "\t\t\tOutputDirectory=\"%s\\%s%s\\%s\"\r\n", outdir.c_str (), module.output->relative_path.c_str (), vcdir.c_str (), cfg.name.c_str() );
+ fprintf ( OUT, "\t\t\tIntermediateDirectory=\"%s\\%s%s\\%s\"\r\n", intdir.c_str (), module.output->relative_path.c_str (), vcdir.c_str (), cfg.name.c_str() );
+ }
+ else
+ {
+ fprintf ( OUT, "\t\t\tOutputDirectory=\"%s\\%s%s\"\r\n", outdir.c_str (), module.output->relative_path.c_str (), vcdir.c_str () );
+ fprintf ( OUT, "\t\t\tIntermediateDirectory=\"%s\\%s%s\"\r\n", intdir.c_str (), module.output->relative_path.c_str (), vcdir.c_str () );
+ }
fprintf ( OUT, "\t\t\tConfigurationType=\"%d\"\r\n", CfgType );
fprintf ( OUT, "\t\t\tCharacterSet=\"2\"\r\n" );
fprintf ( OUT, "\t\t\t>\r\n" );
- fprintf ( OUT, "\t\t\t<Tool\r\n" );
- fprintf ( OUT, "\t\t\t\tName=\"VCCLCompilerTool\"\r\n" );
+ fprintf ( OUT, "\t\t\t<Tool\r\n" );
+ fprintf ( OUT, "\t\t\t\tName=\"VCCLCompilerTool\"\r\n" );
- fprintf ( OUT, "\t\t\t\tOptimization=\"%d\"\r\n", release ? 2 : 0 );
+ fprintf ( OUT, "\t\t\t\tOptimization=\"%d\"\r\n", release ? 2 : 0 );
- fprintf ( OUT, "\t\t\t\tAdditionalIncludeDirectories=\"" );
- bool multiple_includes = false;
- fprintf ( OUT, "./;" );
- for ( i = 0; i < includes.size(); i++ )
- {
- const std::string& include = includes[i];
- if ( strcmp ( include.c_str(), "." ) )
+ fprintf ( OUT, "\t\t\t\tAdditionalIncludeDirectories=\"" );
+ bool multiple_includes = false;
+ fprintf ( OUT, "./;" );
+ for ( i = 0; i < includes.size(); i++ )
+ {
+ const std::string& include = includes[i];
+ if ( strcmp ( include.c_str(), "." ) )
+ {
+ if ( multiple_includes )
+ fprintf ( OUT, ";" );
+ fprintf ( OUT, "%s", include.c_str() );
+ include_string += " /I " + include;
+ multiple_includes = true;
+ }
+ }
+ if ( include_idl )
{
if ( multiple_includes )
fprintf ( OUT, ";" );
- fprintf ( OUT, "%s", include.c_str() );
- include_string += " /I " + include;
- multiple_includes = true;
- }
- }
- if ( include_idl )
- {
- if ( multiple_includes )
- fprintf ( OUT, ";" );
- if ( configuration.UseConfigurationInPath )
- {
- fprintf ( OUT, "%s\\include\\reactos\\idl%s\\%s\r\n", intdir.c_str (), vcdir.c_str (), cfg.name.c_str() );
+ if ( configuration.UseConfigurationInPath )
+ {
+ fprintf ( OUT, "%s\\include\\reactos\\idl%s\\%s\r\n", intdir.c_str (), vcdir.c_str (), cfg.name.c_str() );
+ }
+ else
+ {
+ fprintf ( OUT, "%s\\include\\reactos\\idl\r\n", intdir.c_str () );
+ }
}
- else
+ if ( cfg.headers == ReactOSHeaders )
{
- fprintf ( OUT, "%s\\include\\reactos\\idl\r\n", intdir.c_str () );
+ for ( i = 0; i < includes_ros.size(); i++ )
+ {
+ const std::string& include = includes_ros[i];
+ if ( multiple_includes )
+ fprintf ( OUT, ";" );
+ fprintf ( OUT, "%s", include.c_str() );
+ //include_string += " /I " + include;
+ multiple_includes = true;
+ }
}
- }
- if ( cfg.headers == ReactOSHeaders )
- {
- for ( i = 0; i < includes_ros.size(); i++ )
+ else
{
- const std::string& include = includes_ros[i];
- if ( multiple_includes )
- fprintf ( OUT, ";" );
- fprintf ( OUT, "%s", include.c_str() );
- //include_string += " /I " + include;
- multiple_includes = true;
- }
- }
- else
- {
- // Add WDK or PSDK paths, if user provides them
- if (getenv ( "BASEDIR" ) != NULL &&
- (module.type == Kernel ||
- module.type == KernelModeDLL ||
- module.type == KernelModeDriver ||
- module.type == KeyboardLayout))
- {
- string WdkBase, SdkPath, CrtPath, DdkPath;
- WdkBase = getenv ( "BASEDIR" );
- SdkPath = WdkBase + "\\inc\\api";
- CrtPath = WdkBase + "\\inc\\crt";
- DdkPath = WdkBase + "\\inc\\ddk";
-
- if ( multiple_includes )
- fprintf ( OUT, ";" );
-
- fprintf ( OUT, "%s;", SdkPath.c_str() );
- fprintf ( OUT, "%s;", CrtPath.c_str() );
- fprintf ( OUT, "%s", DdkPath.c_str() );
- multiple_includes = true;
+ // Add WDK or PSDK paths, if user provides them
+ if (getenv ( "BASEDIR" ) != NULL &&
+ (module.type == Kernel ||
+ module.type == KernelModeDLL ||
+ module.type == KernelModeDriver ||
+ module.type == KeyboardLayout))
+ {
+ string WdkBase, SdkPath, CrtPath, DdkPath;
+ WdkBase = getenv ( "BASEDIR" );
+ SdkPath = WdkBase + "\\inc\\api";
+ CrtPath = WdkBase + "\\inc\\crt";
+ DdkPath = WdkBase + "\\inc\\ddk";
+
+ if ( multiple_includes )
+ fprintf ( OUT, ";" );
+
+ fprintf ( OUT, "%s;", SdkPath.c_str() );
+ fprintf ( OUT, "%s;", CrtPath.c_str() );
+ fprintf ( OUT, "%s", DdkPath.c_str() );
+ multiple_includes = true;
+ }
}
- }
- fprintf ( OUT, "\"\r\n" );
+ fprintf ( OUT, "\"\r\n" );
- StringSet defines = common_defines;
+ StringSet defines = common_defines;
- // Always add _CRT_SECURE_NO_WARNINGS to disable warnings about not
- // using the safe functions introduced in MSVC8.
- defines.insert ( "_CRT_SECURE_NO_WARNINGS" );
+ // Always add _CRT_SECURE_NO_WARNINGS to disable warnings about not
+ // using the safe functions introduced in MSVC8.
+ defines.insert ( "_CRT_SECURE_NO_WARNINGS" );
- if ( debug )
- {
- defines.insert ( "_DEBUG" );
- }
+ if ( debug )
+ {
+ defines.insert ( "_DEBUG" );
+ }
- if ( cfg.headers == MSVCHeaders )
- {
- // this is a define in MinGW w32api, but not Microsoft's headers
- defines.insert ( "STDCALL=__stdcall" );
- }
+ if ( cfg.headers == MSVCHeaders )
+ {
+ // this is a define in MinGW w32api, but not Microsoft's headers
+ defines.insert ( "STDCALL=__stdcall" );
+ }
if ( binaryType == Lib || binaryType == Exe )
- {
- defines.insert ( "_LIB" );
- }
- else
- {
- defines.insert ( "_WINDOWS" );
- defines.insert ( "_USRDLL" );
- }
-
- fprintf ( OUT, "\t\t\t\tPreprocessorDefinitions=\"" );
- for ( StringSet::iterator it1=defines.begin(); it1!=defines.end(); it1++ )
- {
- if ( i > 0 )
- fprintf ( OUT, ";" );
+ {
+ defines.insert ( "_LIB" );
+ }
+ else
+ {
+ defines.insert ( "_WINDOWS" );
+ defines.insert ( "_USRDLL" );
+ }
- string unescaped = *it1;
- fprintf ( OUT, "%s", _replace_str(unescaped, "\"","").c_str() );
- }
- fprintf ( OUT, "\"\r\n" );
- fprintf ( OUT, "\t\t\t\tForcedIncludeFiles=\"%s\"\r\n", "warning.h");
- fprintf ( OUT, "\t\t\t\tMinimalRebuild=\"%s\"\r\n", speed ? "TRUE" : "FALSE" );
- fprintf ( OUT, "\t\t\t\tBasicRuntimeChecks=\"0\"\r\n" );
- fprintf ( OUT, "\t\t\t\tRuntimeLibrary=\"%d\"\r\n", debug ? 3 : 2 ); // 3=/MDd 2=/MD
- fprintf ( OUT, "\t\t\t\tBufferSecurityCheck=\"FALSE\"\r\n" );
- fprintf ( OUT, "\t\t\t\tEnableFunctionLevelLinking=\"FALSE\"\r\n" );
-
- if ( module.pch != NULL )
- {
- fprintf ( OUT, "\t\t\t\tUsePrecompiledHeader=\"2\"\r\n" );
- string pch_path = Path::RelativeFromDirectory (
- module.pch->file->name,
- module.output->relative_path );
- string::size_type pos = pch_path.find_last_of ("/");
- if ( pos != string::npos )
- pch_path.erase(0, pos+1);
- fprintf ( OUT, "\t\t\t\tPrecompiledHeaderThrough=\"%s\"\r\n", pch_path.c_str() );
-
- // Only include from the same module
- pos = pch_path.find("../");
- if (pos == string::npos && std::find(header_files.begin(), header_files.end(), pch_path) == header_files.end())
- header_files.push_back(pch_path);
- }
- else
- {
- fprintf ( OUT, "\t\t\t\tUsePrecompiledHeader=\"0\"\r\n" );
- }
+ fprintf ( OUT, "\t\t\t\tPreprocessorDefinitions=\"" );
+ for ( StringSet::iterator it1=defines.begin(); it1!=defines.end(); it1++ )
+ {
+ if ( i > 0 )
+ fprintf ( OUT, ";" );
- fprintf ( OUT, "\t\t\t\tWholeProgramOptimization=\"%s\"\r\n", release ? "FALSE" : "FALSE");
- if ( release )
- {
- fprintf ( OUT, "\t\t\t\tFavorSizeOrSpeed=\"1\"\r\n" );
- fprintf ( OUT, "\t\t\t\tStringPooling=\"true\"\r\n" );
- }
+ string unescaped = *it1;
+ fprintf ( OUT, "%s", _replace_str(unescaped, "\"","").c_str() );
+ }
+ fprintf ( OUT, "\"\r\n" );
+ fprintf ( OUT, "\t\t\t\tForcedIncludeFiles=\"%s\"\r\n", "warning.h");
+ fprintf ( OUT, "\t\t\t\tMinimalRebuild=\"%s\"\r\n", speed ? "TRUE" : "FALSE" );
+ fprintf ( OUT, "\t\t\t\tBasicRuntimeChecks=\"0\"\r\n" );
+ fprintf ( OUT, "\t\t\t\tRuntimeLibrary=\"%d\"\r\n", debug ? 3 : 2 ); // 3=/MDd 2=/MD
+ fprintf ( OUT, "\t\t\t\tBufferSecurityCheck=\"FALSE\"\r\n" );
+ fprintf ( OUT, "\t\t\t\tEnableFunctionLevelLinking=\"FALSE\"\r\n" );
+
+ if ( module.pch != NULL )
+ {
+ fprintf ( OUT, "\t\t\t\tUsePrecompiledHeader=\"2\"\r\n" );
+ string pch_path = Path::RelativeFromDirectory (
+ module.pch->file->name,
+ module.output->relative_path );
+ string::size_type pos = pch_path.find_last_of ("/");
+ if ( pos != string::npos )
+ pch_path.erase(0, pos+1);
+ fprintf ( OUT, "\t\t\t\tPrecompiledHeaderThrough=\"%s\"\r\n", pch_path.c_str() );
+
+ // Only include from the same module
+ pos = pch_path.find("../");
+ if (pos == string::npos && std::find(header_files.begin(), header_files.end(), pch_path) == header_files.end())
+ header_files.push_back(pch_path);
+ }
+ else
+ {
+ fprintf ( OUT, "\t\t\t\tUsePrecompiledHeader=\"0\"\r\n" );
+ }
- fprintf ( OUT, "\t\t\t\tWarningLevel=\"%s\"\r\n", speed ? "0" : "3" );
- fprintf ( OUT, "\t\t\t\tDetect64BitPortabilityProblems=\"%s\"\r\n", "FALSE");
- if ( !module.cplusplus )
- fprintf ( OUT, "\t\t\t\tCompileAs=\"1\"\r\n" );
+ fprintf ( OUT, "\t\t\t\tWholeProgramOptimization=\"%s\"\r\n", release ? "FALSE" : "FALSE");
+ if ( release )
+ {
+ fprintf ( OUT, "\t\t\t\tFavorSizeOrSpeed=\"1\"\r\n" );
+ fprintf ( OUT, "\t\t\t\tStringPooling=\"true\"\r\n" );
+ }
- if ( module.type == Win32CUI || module.type == Win32GUI )
- {
- fprintf ( OUT, "\t\t\t\tCallingConvention=\"%d\"\r\n", 0 ); // 0=__cdecl
- }
- else
- {
- fprintf ( OUT, "\t\t\t\tCallingConvention=\"%d\"\r\n", 2 ); // 2=__stdcall
- }
+ fprintf ( OUT, "\t\t\t\tWarningLevel=\"%s\"\r\n", speed ? "0" : "3" );
+ fprintf ( OUT, "\t\t\t\tDetect64BitPortabilityProblems=\"%s\"\r\n", "FALSE");
+ if ( !module.cplusplus )
+ fprintf ( OUT, "\t\t\t\tCompileAs=\"1\"\r\n" );
- fprintf ( OUT, "\t\t\t\tDebugInformationFormat=\"%s\"/>\r\n", speed ? "0" : release ? "3": "4"); // 3=/Zi 4=ZI
+ if ( module.type == Win32CUI || module.type == Win32GUI )
+ {
+ fprintf ( OUT, "\t\t\t\tCallingConvention=\"%d\"\r\n", 0 ); // 0=__cdecl
+ }
+ else
+ {
+ fprintf ( OUT, "\t\t\t\tCallingConvention=\"%d\"\r\n", 2 ); // 2=__stdcall
+ }
- fprintf ( OUT, "\t\t\t<Tool\r\n" );
- fprintf ( OUT, "\t\t\t\tName=\"VCCustomBuildTool\"/>\r\n" );
+ fprintf ( OUT, "\t\t\t\tDebugInformationFormat=\"%s\"/>\r\n", speed ? "0" : release ? "3": "4"); // 3=/Zi 4=ZI
- if ( binaryType == Lib )
- {
fprintf ( OUT, "\t\t\t<Tool\r\n" );
- fprintf ( OUT, "\t\t\t\tName=\"VCLibrarianTool\"\r\n" );
- fprintf ( OUT, "\t\t\t\tOutputFile=\"$(OutDir)/%s.lib\"/>\r\n", module.name.c_str() );
- }
- else
- {
- fprintf ( OUT, "\t\t\t<Tool\r\n" );
- fprintf ( OUT, "\t\t\t\tName=\"VCLinkerTool\"\r\n" );
- if (module.GetEntryPoint() == "0" && binaryType != Sys )
- fprintf ( OUT, "AdditionalOptions=\"/noentry\"" );
+ fprintf ( OUT, "\t\t\t\tName=\"VCCustomBuildTool\"/>\r\n" );
- if (configuration.VSProjectVersion == "9.00")
+ if ( binaryType == Lib )
{
- fprintf ( OUT, "\t\t\t\tRandomizedBaseAddress=\"0\"\r\n" );
- fprintf ( OUT, "\t\t\t\tDataExecutionPrevention=\"0\"\r\n" );
+ fprintf ( OUT, "\t\t\t<Tool\r\n" );
+ fprintf ( OUT, "\t\t\t\tName=\"VCLibrarianTool\"\r\n" );
+ fprintf ( OUT, "\t\t\t\tOutputFile=\"$(OutDir)/%s.lib\"/>\r\n", module.name.c_str() );
}
+ else
+ {
+ fprintf ( OUT, "\t\t\t<Tool\r\n" );
+ fprintf ( OUT, "\t\t\t\tName=\"VCLinkerTool\"\r\n" );
+ if (module.GetEntryPoint() == "0" && binaryType != Sys )
+ fprintf ( OUT, "AdditionalOptions=\"/noentry\"" );
- if (module.importLibrary != NULL)
- fprintf ( OUT, "\t\t\t\tModuleDefinitionFile=\"%s\"\r\n", importLib.c_str());
+ if (configuration.VSProjectVersion == "9.00")
+ {
+ fprintf ( OUT, "\t\t\t\tRandomizedBaseAddress=\"0\"\r\n" );
+ fprintf ( OUT, "\t\t\t\tDataExecutionPrevention=\"0\"\r\n" );
+ }
- fprintf ( OUT, "\t\t\t\tAdditionalDependencies=\"" );
- bool use_msvcrt_lib = false;
- for ( i = 0; i < libraries.size(); i++ )
- {
- if ( i > 0 )
- fprintf ( OUT, " " );
- string libpath = libraries[i].c_str();
- libpath = libpath.erase (0, libpath.find_last_of ("\\") + 1 );
- if ( libpath == "msvcrt.lib" )
+ if (module.importLibrary != NULL)
+ fprintf ( OUT, "\t\t\t\tModuleDefinitionFile=\"%s\"\r\n", importLib.c_str());
+
+ fprintf ( OUT, "\t\t\t\tAdditionalDependencies=\"" );
+ bool use_msvcrt_lib = false;
+ for ( i = 0; i < libraries.size(); i++ )
{
- use_msvcrt_lib = true;
+ if ( i > 0 )
+ fprintf ( OUT, " " );
+ string libpath = libraries[i].c_str();
+ libpath = libpath.erase (0, libpath.find_last_of ("\\") + 1 );
+ if ( libpath == "msvcrt.lib" )
+ {
+ use_msvcrt_lib = true;
+ }
+ fprintf ( OUT, "%s", libpath.c_str() );
}
- fprintf ( OUT, "%s", libpath.c_str() );
- }
- fprintf ( OUT, "\"\r\n" );
+ fprintf ( OUT, "\"\r\n" );
- fprintf ( OUT, "\t\t\t\tAdditionalLibraryDirectories=\"" );
+ fprintf ( OUT, "\t\t\t\tAdditionalLibraryDirectories=\"" );
- // Add WDK libs paths, if needed
- if (getenv ( "BASEDIR" ) != NULL &&
- (module.type == Kernel ||
- module.type == KernelModeDLL ||
- module.type == KernelModeDriver ||
- module.type == KeyboardLayout))
- {
- string WdkBase, CrtPath, DdkPath;
- WdkBase = getenv ( "BASEDIR" );
- CrtPath = WdkBase + "\\lib\\crt\\i386";
- DdkPath = WdkBase + "\\lib\\wnet\\i386";
+ // Add WDK libs paths, if needed
+ if (getenv ( "BASEDIR" ) != NULL &&
+ (module.type == Kernel ||
+ module.type == KernelModeDLL ||
+ module.type == KernelModeDriver ||
+ module.type == KeyboardLayout))
+ {
+ string WdkBase, CrtPath, DdkPath;
+ WdkBase = getenv ( "BASEDIR" );
+ CrtPath = WdkBase + "\\lib\\crt\\i386";
+ DdkPath = WdkBase + "\\lib\\wnet\\i386";
- fprintf ( OUT, "%s;", CrtPath.c_str() );
- fprintf ( OUT, "%s", DdkPath.c_str() );
+ fprintf ( OUT, "%s;", CrtPath.c_str() );
+ fprintf ( OUT, "%s", DdkPath.c_str() );
- if (libraries.size () > 0)
- fprintf ( OUT, ";" );
- }
+ if (libraries.size () > 0)
+ fprintf ( OUT, ";" );
+ }
- // Add conventional libraries dirs
- for (i = 0; i < libraries.size (); i++)
- {
- if ( i > 0 )
- fprintf ( OUT, ";" );
+ // Add conventional libraries dirs
+ for (i = 0; i < libraries.size (); i++)
+ {
+ if ( i > 0 )
+ fprintf ( OUT, ";" );
- string libpath = libraries[i].c_str();
- libpath.replace (libpath.find("---"), 3, cfg.name);
- libpath = libpath.substr (0, libpath.find_last_of ("\\") );
- fprintf ( OUT, "%s", libpath.c_str() );
- }
+ string libpath = libraries[i].c_str();
+ libpath.replace (libpath.find("---"), 3, cfg.name);
+ libpath = libpath.substr (0, libpath.find_last_of ("\\") );
+ fprintf ( OUT, "%s", libpath.c_str() );
+ }
- fprintf ( OUT, "\"\r\n" );
+ fprintf ( OUT, "\"\r\n" );
- fprintf ( OUT, "\t\t\t\tOutputFile=\"$(OutDir)/%s%s\"\r\n", module.name.c_str(), module_type.c_str() );
- fprintf ( OUT, "\t\t\t\tLinkIncremental=\"%d\"\r\n", debug ? 2 : 1 );
- fprintf ( OUT, "\t\t\t\tGenerateDebugInformation=\"%s\"\r\n", speed ? "FALSE" : "TRUE" );
- fprintf ( OUT, "\t\t\t\tLinkTimeCodeGeneration=\"%d\"\r\n", release? 0 : 0); // whole program optimization
+ fprintf ( OUT, "\t\t\t\tOutputFile=\"$(OutDir)/%s%s\"\r\n", module.name.c_str(), module_type.c_str() );
+ fprintf ( OUT, "\t\t\t\tLinkIncremental=\"%d\"\r\n", debug ? 2 : 1 );
+ fprintf ( OUT, "\t\t\t\tGenerateDebugInformation=\"%s\"\r\n", speed ? "FALSE" : "TRUE" );
+ fprintf ( OUT, "\t\t\t\tLinkTimeCodeGeneration=\"%d\"\r\n", release? 0 : 0); // whole program optimization
- if ( debug )
- fprintf ( OUT, "\t\t\t\tProgramDatabaseFile=\"$(OutDir)/%s.pdb\"\r\n", module.name.c_str() );
+ if ( debug )
+ fprintf ( OUT, "\t\t\t\tProgramDatabaseFile=\"$(OutDir)/%s.pdb\"\r\n", module.name.c_str() );
if ( binaryType == Sys )
- {
- if (module.GetEntryPoint() == "0")
- fprintf ( OUT, "\t\t\t\tAdditionalOptions=\" /noentry /ALIGN:0x20 /SECTION:INIT,D /IGNORE:4001,4037,4039,4065,4070,4078,4087,4089,4096\"\r\n" );
- else
- fprintf ( OUT, "\t\t\t\tAdditionalOptions=\" /ALIGN:0x20 /SECTION:INIT,D /IGNORE:4001,4037,4039,4065,4070,4078,4087,4089,4096\"\r\n" );
- fprintf ( OUT, "\t\t\t\tIgnoreAllDefaultLibraries=\"TRUE\"\r\n" );
- fprintf ( OUT, "\t\t\t\tGenerateManifest=\"FALSE\"\r\n" );
- fprintf ( OUT, "\t\t\t\tSubSystem=\"%d\"\r\n", 3 );
- fprintf ( OUT, "\t\t\t\tDriver=\"%d\"\r\n", 1 );
- fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"%s\"\r\n", module.GetEntryPoint() == "" ? "DriverEntry" : module.GetEntryPoint().c_str ());
- fprintf ( OUT, "\t\t\t\tBaseAddress=\"%s\"\r\n", baseaddr == "" ? "0x10000" : baseaddr.c_str ());
- }
- else if ( binaryType == Exe )
- {
- if ( module.type == Kernel )
{
- fprintf ( OUT, "\t\t\t\tAdditionalOptions=\" /SECTION:INIT,D /ALIGN:0x80\"\r\n" );
+ if (module.GetEntryPoint() == "0")
+ fprintf ( OUT, "\t\t\t\tAdditionalOptions=\" /noentry /ALIGN:0x20 /SECTION:INIT,D /IGNORE:4001,4037,4039,4065,4070,4078,4087,4089,4096\"\r\n" );
+ else
+ fprintf ( OUT, "\t\t\t\tAdditionalOptions=\" /ALIGN:0x20 /SECTION:INIT,D /IGNORE:4001,4037,4039,4065,4070,4078,4087,4089,4096\"\r\n" );
fprintf ( OUT, "\t\t\t\tIgnoreAllDefaultLibraries=\"TRUE\"\r\n" );
fprintf ( OUT, "\t\t\t\tGenerateManifest=\"FALSE\"\r\n" );
fprintf ( OUT, "\t\t\t\tSubSystem=\"%d\"\r\n", 3 );
fprintf ( OUT, "\t\t\t\tDriver=\"%d\"\r\n", 1 );
- fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"KiSystemStartup\"\r\n" );
- fprintf ( OUT, "\t\t\t\tBaseAddress=\"%s\"\r\n", baseaddr.c_str ());
- }
- else if ( module.type == NativeCUI )
- {
- fprintf ( OUT, "\t\t\t\tAdditionalOptions=\" /ALIGN:0x20\"\r\n" );
- fprintf ( OUT, "\t\t\t\tSubSystem=\"%d\"\r\n", 1 );
- fprintf ( OUT, "\t\t\t\tGenerateManifest=\"FALSE\"\r\n" );
- fprintf ( OUT, "\t\t\t\tIgnoreAllDefaultLibraries=\"TRUE\"\r\n" );
- fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"NtProcessStartup\"\r\n" );
- fprintf ( OUT, "\t\t\t\tBaseAddress=\"%s\"\r\n", baseaddr.c_str ());
+ fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"%s\"\r\n", module.GetEntryPoint() == "" ? "DriverEntry" : module.GetEntryPoint().c_str ());
+ fprintf ( OUT, "\t\t\t\tBaseAddress=\"%s\"\r\n", baseaddr == "" ? "0x10000" : baseaddr.c_str ());
}
- else if ( module.type == Win32CUI || module.type == Win32GUI || module.type == Win32SCR)
+ else if ( binaryType == Exe )
{
- if ( use_msvcrt_lib )
+ if ( module.type == Kernel )
+ {
+ fprintf ( OUT, "\t\t\t\tAdditionalOptions=\" /SECTION:INIT,D /ALIGN:0x80\"\r\n" );
+ fprintf ( OUT, "\t\t\t\tIgnoreAllDefaultLibraries=\"TRUE\"\r\n" );
+ fprintf ( OUT, "\t\t\t\tGenerateManifest=\"FALSE\"\r\n" );
+ fprintf ( OUT, "\t\t\t\tSubSystem=\"%d\"\r\n", 3 );
+ fprintf ( OUT, "\t\t\t\tDriver=\"%d\"\r\n", 1 );
+ fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"KiSystemStartup\"\r\n" );
+ fprintf ( OUT, "\t\t\t\tBaseAddress=\"%s\"\r\n", baseaddr.c_str ());
+ }
+ else if ( module.type == NativeCUI )
{
+ fprintf ( OUT, "\t\t\t\tAdditionalOptions=\" /ALIGN:0x20\"\r\n" );
+ fprintf ( OUT, "\t\t\t\tSubSystem=\"%d\"\r\n", 1 );
+ fprintf ( OUT, "\t\t\t\tGenerateManifest=\"FALSE\"\r\n" );
fprintf ( OUT, "\t\t\t\tIgnoreAllDefaultLibraries=\"TRUE\"\r\n" );
+ fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"NtProcessStartup\"\r\n" );
+ fprintf ( OUT, "\t\t\t\tBaseAddress=\"%s\"\r\n", baseaddr.c_str ());
}
+ else if ( module.type == Win32CUI || module.type == Win32GUI || module.type == Win32SCR)
+ {
+ if ( use_msvcrt_lib )
+ {
+ fprintf ( OUT, "\t\t\t\tIgnoreAllDefaultLibraries=\"TRUE\"\r\n" );
+ }
fprintf ( OUT, "\t\t\t\tSubSystem=\"%d\"\r\n", 2 );
+ }
}
- }
else if ( binaryType == Dll )
- {
- if (module.GetEntryPoint() == "0")
- fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"\"\r\n" );
- else
{
- // get rid of DllMain@12 because MSVC needs to link to _DllMainCRTStartup@12
- // when using CRT
- if (module.GetEntryPoint() == "DllMain@12")
+ if (module.GetEntryPoint() == "0")
fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"\"\r\n" );
else
+ {
+ // get rid of DllMain@12 because MSVC needs to link to _DllMainCRTStartup@12
+ // when using CRT
+ if (module.GetEntryPoint() == "DllMain@12")
+ fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"\"\r\n" );
+ else
fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"%s\"\r\n", module.GetEntryPoint().c_str ());
+ }
+ fprintf ( OUT, "\t\t\t\tBaseAddress=\"%s\"\r\n", baseaddr == "" ? "0x40000" : baseaddr.c_str ());
+ if ( use_msvcrt_lib )
+ {
+ fprintf ( OUT, "\t\t\t\tIgnoreAllDefaultLibraries=\"TRUE\"\r\n" );
+ }
}
- fprintf ( OUT, "\t\t\t\tBaseAddress=\"%s\"\r\n", baseaddr == "" ? "0x40000" : baseaddr.c_str ());
- if ( use_msvcrt_lib )
- {
- fprintf ( OUT, "\t\t\t\tIgnoreAllDefaultLibraries=\"TRUE\"\r\n" );
- }
+ fprintf ( OUT, "\t\t\t\tTargetMachine=\"%d\"/>\r\n", 1 );
}
- fprintf ( OUT, "\t\t\t\tTargetMachine=\"%d\"/>\r\n", 1 );
- }
- fprintf ( OUT, "\t\t\t<Tool\r\n" );
- fprintf ( OUT, "\t\t\t\tName=\"VCResourceCompilerTool\"\r\n" );
- fprintf ( OUT, "\t\t\t\tAdditionalIncludeDirectories=\"" );
- multiple_includes = false;
- fprintf ( OUT, "./;" );
- for ( i = 0; i < includes.size(); i++ )
- {
- const std::string& include = includes[i];
- if ( strcmp ( include.c_str(), "." ) )
+ fprintf ( OUT, "\t\t\t<Tool\r\n" );
+ fprintf ( OUT, "\t\t\t\tName=\"VCResourceCompilerTool\"\r\n" );
+ fprintf ( OUT, "\t\t\t\tAdditionalIncludeDirectories=\"" );
+ multiple_includes = false;
+ fprintf ( OUT, "./;" );
+ for ( i = 0; i < includes.size(); i++ )
{
- if ( multiple_includes )
- fprintf ( OUT, ";" );
- fprintf ( OUT, "%s", include.c_str() );
- multiple_includes = true;
+ const std::string& include = includes[i];
+ if ( strcmp ( include.c_str(), "." ) )
+ {
+ if ( multiple_includes )
+ fprintf ( OUT, ";" );
+ fprintf ( OUT, "%s", include.c_str() );
+ multiple_includes = true;
+ }
}
- }
- if ( cfg.headers == ReactOSHeaders )
- {
- for ( i = 0; i < includes_ros.size(); i++ )
+ if ( cfg.headers == ReactOSHeaders )
{
- const std::string& include = includes_ros[i];
- if ( multiple_includes )
- fprintf ( OUT, ";" );
- fprintf ( OUT, "%s", include.c_str() );
- multiple_includes = true;
+ for ( i = 0; i < includes_ros.size(); i++ )
+ {
+ const std::string& include = includes_ros[i];
+ if ( multiple_includes )
+ fprintf ( OUT, ";" );
+ fprintf ( OUT, "%s", include.c_str() );
+ multiple_includes = true;
+ }
}
- }
- fprintf ( OUT, "\"/>\r\n " );
+ fprintf ( OUT, "\"/>\r\n " );
- fprintf ( OUT, "\t\t\t<Tool\r\n" );
- fprintf ( OUT, "\t\t\t\tName=\"VCMIDLTool\"/>\r\n" );
- if (configuration.VSProjectVersion == "8.00")
- {
fprintf ( OUT, "\t\t\t<Tool\r\n" );
- fprintf ( OUT, "\t\t\t\tName=\"VCManifestTool\"\r\n" );
- fprintf ( OUT, "\t\t\t\tEmbedManifest=\"false\"/>\r\n" );
+ fprintf ( OUT, "\t\t\t\tName=\"VCMIDLTool\"/>\r\n" );
+ if (configuration.VSProjectVersion == "8.00")
+ {
+ fprintf ( OUT, "\t\t\t<Tool\r\n" );
+ fprintf ( OUT, "\t\t\t\tName=\"VCManifestTool\"\r\n" );
+ fprintf ( OUT, "\t\t\t\tEmbedManifest=\"false\"/>\r\n" );
+ }
+ fprintf ( OUT, "\t\t\t<Tool\r\n" );
+ fprintf ( OUT, "\t\t\t\tName=\"VCPostBuildEventTool\"/>\r\n" );
+ fprintf ( OUT, "\t\t\t<Tool\r\n" );
+ fprintf ( OUT, "\t\t\t\tName=\"VCPreBuildEventTool\"/>\r\n" );
+ fprintf ( OUT, "\t\t\t<Tool\r\n" );
+ fprintf ( OUT, "\t\t\t\tName=\"VCPreLinkEventTool\"/>\r\n" );
+ fprintf ( OUT, "\t\t\t<Tool\r\n" );
+ fprintf ( OUT, "\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"/>\r\n" );
+ fprintf ( OUT, "\t\t\t<Tool\r\n" );
+ fprintf ( OUT, "\t\t\t\tName=\"VCWebDeploymentTool\"/>\r\n" );
+ fprintf ( OUT, "\t\t</Configuration>\r\n" );
}
- fprintf ( OUT, "\t\t\t<Tool\r\n" );
- fprintf ( OUT, "\t\t\t\tName=\"VCPostBuildEventTool\"/>\r\n" );
- fprintf ( OUT, "\t\t\t<Tool\r\n" );
- fprintf ( OUT, "\t\t\t\tName=\"VCPreBuildEventTool\"/>\r\n" );
- fprintf ( OUT, "\t\t\t<Tool\r\n" );
- fprintf ( OUT, "\t\t\t\tName=\"VCPreLinkEventTool\"/>\r\n" );
- fprintf ( OUT, "\t\t\t<Tool\r\n" );
- fprintf ( OUT, "\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"/>\r\n" );
- fprintf ( OUT, "\t\t\t<Tool\r\n" );
- fprintf ( OUT, "\t\t\t\tName=\"VCWebDeploymentTool\"/>\r\n" );
- fprintf ( OUT, "\t\t</Configuration>\r\n" );
-}
void
if ( intenv == "obj-i386" )
intdir = path_basedir + "obj-i386"; /* append relative dir from project dir */
- else
+ else
intdir = intenv;
if ( outenv == "output-i386" )
outdir = outenv;
if ( configuration.UseVSVersionInPath )
- {
+ {
vcdir = DEF_SSEP + _get_vc_dir();
- }
+ }
fprintf ( OUT, "\t\t<Configuration\r\n" );
fprintf ( OUT, "\t\t\tName=\"%s|Win32\"\r\n", cfg.name.c_str() );
if ( configuration.UseConfigurationInPath )
- {
+ {
fprintf ( OUT, "\t\t\tOutputDirectory=\"%s\\%s\\%s\"\r\n", outdir.c_str (), module.output->relative_path.c_str (), cfg.name.c_str() );
fprintf ( OUT, "\t\t\tIntermediateDirectory=\"%s\\%s\\%s\"\r\n", intdir.c_str (), module.output->relative_path.c_str (), cfg.name.c_str() );
- }
- else
- {
+ }
+ else
+ {
fprintf ( OUT, "\t\t\tOutputDirectory=\"%s\\%s\"\r\n", outdir.c_str (), module.output->relative_path.c_str () );
fprintf ( OUT, "\t\t\tIntermediateDirectory=\"%s\\%s\"\r\n", intdir.c_str (), module.output->relative_path.c_str () );
- }
+ }
fprintf ( OUT, "\t\t\tConfigurationType=\"0\"\r\n");
fprintf ( OUT, "\t\t\t>\r\n" );
fprintf ( OUT, "\t\t\t\tForcedUsingAssemblies=\"\"\r\n");
fprintf ( OUT, "\t\t\t\tCompileAsManaged=\"\"\r\n");
- fprintf ( OUT, "\t\t\t/>\r\n" );
- fprintf ( OUT, "\t\t</Configuration>\r\n" );
-}
+ fprintf ( OUT, "\t\t\t/>\r\n" );
+ fprintf ( OUT, "\t\t</Configuration>\r\n" );
+ }
const XMLAttribute* base = node.GetAttribute ( "installbase", false );
const XMLAttribute* newname = node.GetAttribute ( "newname", false );
+ if(base)
+ installbase = base->value;
+ else
+ installbase = "";
+
DirectoryLocation source_directory = SourceDirectory;
const XMLAttribute* att = node.GetAttribute ( "root", false );
if ( att != NULL)
? newname->value
: node.value,
&node );
-}
+}
\ No newline at end of file
if ( att != NULL )
{
const XMLAttribute* installbase = moduleNode.GetAttribute ( "installbase", false );
+
+ if(installbase)
+ this->installbase = installbase->value;
+ else
+ this->installbase = "";
+
install = new FileLocation ( InstallDirectory,
installbase ? installbase->value : "",
att->value,
case MicrosoftC: return "msc";
default: assert ( false );
}
+ return "";
}
std::string
case MicrosoftLink: return "mslink";
default: assert ( false );
}
+ return "";
+}
+
+void
+Project::GenerateInstallerFileList()
+{
+ std::map<std::string, Module*> Result;
+ std::map<std::string, Module*>::iterator i;
+ std::string buffer = "";
+
+ printf ( "Generating reactos.dff..." );
+ std::string path = Environment::GetIntermediatePath();
+ path += sSep + "reactos.dff";
+ FILE* f = fopen(path.c_str(), "wb");
+
+ buffer = "; Main ReactOS package\r\n"
+ ".Set DiskLabelTemplate=\"ReactOS\" ; Label of disk\r\n"
+ ".Set CabinetNameTemplate=\"reactos.cab\" ; reactos.cab\r\n"
+ ".Set InfFileName=\"reactos.inf\" ; reactos.inf\r\n"
+ ".InfBegin\r\n"
+ "[Version]\r\n"
+ "Signature = \"$ReactOS$\"\r\n"
+ "[Directories]\r\n"
+ "1 = system32\r\n"
+ "2 = system32\\drivers\r\n"
+ "3 = Fonts\r\n"
+ "4 =\r\n"
+ "5 = system32\\drivers\\etc\r\n"
+ "6 = inf\r\n"
+ "7 = bin\r\n"
+ "8 = media\r\n"
+ ".InfEnd\r\n"
+ "; Contents of disk\r\n"
+ ".InfBegin\r\n"
+ "[SourceFiles]\r\n"
+ ".InfEnd\r\n";
+ fprintf(f,buffer.c_str());
+ for(i = modules.begin(); i != modules.end(); ++i)
+ {
+ buffer = "";
+ if(i->second->install)
+ {
+ buffer = i->second->output->relative_path + sSep;
+ buffer += i->second->output->name;
+ if(i->second->installbase == "system32")
+ buffer += "\t1";
+ if(i->second->installbase == "system32/drivers")
+ buffer += "\t2";
+ else if(i->second->installbase == "fonts")
+ buffer += "\t3";
+ else if(i->second->installbase == "")
+ buffer += "\t4";
+ else if(i->second->installbase == "system32/drivers/etc")
+ buffer += "\t5";
+ else if(i->second->installbase == "inf")
+ buffer += "\t6";
+ else if(i->second->installbase == "bin")
+ buffer += "\t7";
+ else if(i->second->installbase == "media")
+ buffer += "\t8";
+
+ fprintf(f, "%s\r\n",buffer.c_str());
+ }
+ }
+
+ for(size_t j = 0; j< installfiles.size(); j++)
+ {
+ buffer = "";
+ buffer = installfiles[j]->source->relative_path + sSep;
+ buffer += installfiles[j]->target->name;
+ if(installfiles[j]->installbase == "system32")
+ buffer += "\t1";
+ if(installfiles[j]->installbase == "system32/drivers")
+ buffer += "\t2";
+ else if(installfiles[j]->installbase == "fonts")
+ buffer += "\t3";
+ else if(installfiles[j]->installbase == "")
+ buffer += "\t4";
+ else if(installfiles[j]->installbase == "system32/drivers/etc")
+ buffer += "\t5";
+ else if(installfiles[j]->installbase == "inf")
+ buffer += "\t6";
+ else if(installfiles[j]->installbase == "bin")
+ buffer += "\t7";
+ else if(installfiles[j]->installbase == "media")
+ buffer += "\t8";
+
+
+ fprintf(f,"%s\r\n",buffer.c_str());
+ }
+
+ printf ( "done\n" );
+
}
const Property* LookupProperty ( const std::string& name ) const;
std::string GetCompilerSet () const;
std::string GetLinkerSet () const;
+ void GenerateInstallerFileList();
private:
std::string ResolveNextProperty ( const std::string& s ) const;
void ReadXml ();
bool isCRT;
std::string CRT;
bool dynamicCRT;
+ std::string installbase;
FileLocation *output; // "path/foo.exe"
FileLocation *dependency; // "path/foo.exe" or "path/libfoo.a"
FileLocation *install;
public:
FileLocation *source;
FileLocation *target;
+ std::string installbase;
InstallFile ( const Project& project,
const XMLElement& bootstrapNode,
<module name="comp" type="win32cui" installbase="system32" installname="comp.exe" allowwarnings="true">\r
- <file>comp.c</file>\r
- <file>comp.rc</file>\r
+ <file>comp.c</file>\r
+ <file>comp.rc</file>\r
</module>\r
(ProcessId == (HANDLE)2) )\r
{\r
if (ProcessId == (HANDLE)1 || ProcessId == (HANDLE)2 ||\r
- ((LONG)ProcessId & 0xfffc) == ((ULONG)pEntry->ProcessId & 0xfffc))\r
+ ((LONG_PTR)ProcessId & 0xfffc) == ((ULONG_PTR)pEntry->ProcessId & 0xfffc))\r
{\r
- handle = GDI_HANDLE_CREATE(i, pEntry->Type);\r
+ handle = GDI_HANDLE_CREATE(i, (ULONG_PTR)pEntry->Type);\r
index = ListView_GetItemCount(hHandleListCtrl);\r
item.iItem = index;\r
item.iSubItem = 0;\r
str2 = GetTypeName(handle);\r
ListView_SetItemText(hHandleListCtrl, index, 3, str2);\r
\r
- wsprintf(strText, L"%#08x", (UINT)pEntry->ProcessId);\r
+ wsprintf(strText, L"%#08x", (UINT_PTR)pEntry->ProcessId);\r
ListView_SetItemText(hHandleListCtrl, index, 4, strText);\r
\r
- wsprintf(strText, L"%#08x", (UINT)pEntry->KernelData);\r
+ wsprintf(strText, L"%#08x", (UINT_PTR)pEntry->KernelData);\r
ListView_SetItemText(hHandleListCtrl, index, 5, strText);\r
\r
- wsprintf(strText, L"%#08x", (UINT)pEntry->UserData);\r
+ wsprintf(strText, L"%#08x", (UINT_PTR)pEntry->UserData);\r
ListView_SetItemText(hHandleListCtrl, index, 6, strText);\r
\r
wsprintf(strText, L"%#08x", (UINT)pEntry->Type);\r
item.pszText = L"<deleted>";\r
(void)ListView_InsertItem(hListCtrl, &item);\r
item.pszText = strText;\r
- wsprintf(strText, L"%#08x", 1);\r
+ wsprintf(strText, L"%#08x",1);\r
ListView_SetItemText(hListCtrl, 1, 1, strText);\r
\r
/* Insert "all" */\r
ULONG SymbolSize,
PVOID UserContext)
{
- if ((UINT)UserContext == -1)
+ if ((UINT_PTR)UserContext == -1)
{
printf("%s ", pSymInfo->Name);
}
{
if (!bX64)
{
- printf("%s@%d ", pSymInfo->Name, (UINT)UserContext);
+ printf("%s@%p ", pSymInfo->Name, UserContext);
}
else
{
- printf("%s <+ %d> ", pSymInfo->Name, (UINT)UserContext);
+ printf("%s <+ %p> ", pSymInfo->Name, UserContext);
}
}
return TRUE;
pW32pServiceTable = ImageSymToVa(hProcess, &Sym.Symbol, pModule, "W32pServiceTable");
pW32pServiceLimit = ImageSymToVa(hProcess, &Sym.Symbol, pModule, "W32pServiceLimit");
pW32pArgumentTable = ImageSymToVa(hProcess, &Sym.Symbol, pModule, "W32pArgumentTable");
-// printf("pW32pServiceTable = %p\n", pW32pServiceTable);
-// printf("pW32pServiceLimit = %p\n", pW32pServiceLimit);
-// printf("pW32pArgumentTable = %p\n", pW32pArgumentTable);
+ printf("pW32pServiceTable = %p\n", pW32pServiceTable);
+ printf("pW32pServiceLimit = %p\n", pW32pServiceLimit);
+ printf("pW32pArgumentTable = %p\n", pW32pArgumentTable);
if (!pW32pServiceTable || !pW32pServiceLimit || !pW32pArgumentTable)
{
for (i = 0; i < dwServiceLimit; i++)
{
printf("0x%x:", i+0x1000);
- SymEnumSymbolsForAddr(hProcess, (DWORD64)pdwEntries32[i], EnumSymbolsProc, (PVOID)(DWORD)pW32pArgumentTable[i]);
+ SymEnumSymbolsForAddr(hProcess, (DWORD64)pdwEntries32[i], EnumSymbolsProc, (PVOID)(DWORD_PTR)pW32pArgumentTable[i]);
printf("\n");
}
}
for (i = 0; i < dwServiceLimit; i++)
{
printf("0x%x:", i+0x1000);
- SymEnumSymbolsForAddr(hProcess, (DWORD64)pdwEntries64[i], EnumSymbolsProc, (PVOID)(DWORD)pW32pArgumentTable[i]);
+ SymEnumSymbolsForAddr(hProcess, (DWORD64)pdwEntries64[i], EnumSymbolsProc, (PVOID)(DWORD_PTR)pW32pArgumentTable[i]);
printf("\n");
}
}
{
PEDIT_GLYPH_INFO Info;
- Info = (PEDIT_GLYPH_INFO) GetWindowLongW(hwnd, GWLP_USERDATA);
+ Info = (PEDIT_GLYPH_INFO) GetWindowLongPtrW(hwnd, GWLP_USERDATA);
if(Info || uMsg == WM_INITDIALOG)
{
Info->hEdit = GetDlgItem(hwnd, IDC_EDIT_GLYPH_EDIT);
Info->hPreview = GetDlgItem(hwnd, IDC_EDIT_GLYPH_PREVIEW);
- SetWindowLongW(hwnd, GWLP_USERDATA, (LONG)Info);
- SetWindowLongW(Info->hEdit, GWLP_USERDATA, (LONG)Info);
- SetWindowLongW(Info->hPreview, GWLP_USERDATA, (LONG)Info);
+ SetWindowLongPtrW(hwnd, GWLP_USERDATA, (LONG_PTR)Info);
+ SetWindowLongPtrW(Info->hEdit, GWLP_USERDATA, (LONG_PTR)Info);
+ SetWindowLongPtrW(Info->hPreview, GWLP_USERDATA, (LONG_PTR)Info);
InitToolbox(Info);
{
PEDIT_GLYPH_INFO Info;
- Info = (PEDIT_GLYPH_INFO) GetWindowLongW(hwnd, GWLP_USERDATA);
+ Info = (PEDIT_GLYPH_INFO) GetWindowLongPtrW(hwnd, GWLP_USERDATA);
if(Info)
{
{
PEDIT_GLYPH_INFO Info;
- Info = (PEDIT_GLYPH_INFO) GetWindowLongW(hwnd, GWLP_USERDATA);
+ Info = (PEDIT_GLYPH_INFO) GetWindowLongPtrW(hwnd, GWLP_USERDATA);
if(Info)
{
{
PFONT_WND_INFO Info;
- Info = (PFONT_WND_INFO) GetWindowLongW(hwnd, GWLP_USERDATA);
+ Info = (PFONT_WND_INFO) GetWindowLongPtrW(hwnd, GWLP_USERDATA);
if(Info || uMsg == WM_CREATE)
{
{
case WM_CREATE:
Info = (PFONT_WND_INFO)( ( (LPCREATESTRUCT)lParam )->lpCreateParams );
- SetWindowLongW(hwnd, GWLP_USERDATA, (LONG)Info);
+ SetWindowLongPtrW(hwnd, GWLP_USERDATA, (LONG_PTR)Info);
// Set a fixed window size
SetWindowPos(hwnd, NULL, 0, 0, FONT_BOXES_WND_WIDTH, FONT_BOXES_WND_HEIGHT, SWP_NOZORDER | SWP_NOMOVE);
{
PFONT_WND_INFO Info;
- Info = (PFONT_WND_INFO) GetWindowLongW(hwnd, GWLP_USERDATA);
+ Info = (PFONT_WND_INFO) GetWindowLongPtrW(hwnd, GWLP_USERDATA);
if(Info || uMsg == WM_CREATE)
{
Info = (PFONT_WND_INFO)( ( (LPMDICREATESTRUCT) ( (LPCREATESTRUCT)lParam )->lpCreateParams )->lParam );
Info->hSelf = hwnd;
- SetWindowLongW(hwnd, GWLP_USERDATA, (LONG)Info);
+ SetWindowLongPtrW(hwnd, GWLP_USERDATA, (LONG_PTR)Info);
CreateFontBoxesWindow(Info);
PMAIN_WND_INFO Info;
- Info = (PMAIN_WND_INFO) GetWindowLongW(hwnd, GWLP_USERDATA);
+ Info = (PMAIN_WND_INFO) GetWindowLongPtrW(hwnd, GWLP_USERDATA);
if(Info || uMsg == WM_CREATE)
{
Info = (PMAIN_WND_INFO)( ( (LPCREATESTRUCT)lParam )->lpCreateParams );
Info->hMainWnd = hwnd;
Info->hMenu = GetMenu(hwnd);
- SetWindowLongW(hwnd, GWLP_USERDATA, (LONG)Info);
+ SetWindowLongPtrW(hwnd, GWLP_USERDATA, (LONG_PTR)Info);
hNextClipboardViewer = SetClipboardViewer(hwnd);
Prev = prev;
}
-void* CListNode::operator new(/*size_t*/ UINT size)
+void* CListNode::operator new(size_t size)
{
PVOID p;
if (hHeap == NULL) {
CListNode();
CListNode(VOID *element, CListNode *next, CListNode *prev);
~CListNode() {};
- void* operator new(/*size_t s*/ UINT s);
+ void* operator new(size_t s);
VOID operator delete(void* p);
VOID SetElement(PVOID element);
if (SnmpInfo.NumAddr != 1)
{
/* Skip loopback address */
- *Address = DN2H(((PIPADDR_ENTRY)((ULONG)IpAddress + sizeof(IPADDR_ENTRY)))->Addr);
+ *Address = DN2H(((PIPADDR_ENTRY)((ULONG_PTR)IpAddress + sizeof(IPADDR_ENTRY)))->Addr);
}
else
{
RtlZeroMemory(ConnectInfo, sizeof(TDI_CONNECTION_INFORMATION) + sizeof(TA_IP_ADDRESS));
ConnectInfo->RemoteAddressLength = sizeof(TA_IP_ADDRESS);
- ConnectInfo->RemoteAddress = (PUCHAR) ((ULONG)ConnectInfo + sizeof(TDI_CONNECTION_INFORMATION));
+ ConnectInfo->RemoteAddress = (PUCHAR) ((ULONG_PTR)ConnectInfo + sizeof(TDI_CONNECTION_INFORMATION));
TA = (PTA_IP_ADDRESS)(ConnectInfo->RemoteAddress);
TA->TAAddressCount = 1;
}
_SEH2_TRY
- {
- MmProbeAndLockPages(Mdl, KernelMode, IoModifyAccess);
- }
+ {
+ MmProbeAndLockPages(Mdl, KernelMode, IoModifyAccess);
+ }
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
- {
- TDI_DbgPrint(MIN_TRACE, ("MmProbeAndLockPages() failed.\n"));
- IoFreeMdl(Mdl);
- IoFreeIrp(Irp);
- ExFreePool(ConnectInfo);
- return STATUS_UNSUCCESSFUL;
+ {
+ TDI_DbgPrint(MIN_TRACE, ("MmProbeAndLockPages() failed.\n"));
+ IoFreeMdl(Mdl);
+ IoFreeIrp(Irp);
+ ExFreePool(ConnectInfo);
+ return STATUS_UNSUCCESSFUL;
} _SEH2_END;
TdiBuildSendDatagram(
ReceiveInfo->RemoteAddressLength = 0;
ReceiveInfo->RemoteAddress = NULL;
- ReturnInfo = (PTDI_CONNECTION_INFORMATION) ((ULONG)ReceiveInfo + sizeof(TDI_CONNECTION_INFORMATION));
+ ReturnInfo = (PTDI_CONNECTION_INFORMATION) ((ULONG_PTR)ReceiveInfo + sizeof(TDI_CONNECTION_INFORMATION));
ReturnInfo->RemoteAddressLength = sizeof(TA_IP_ADDRESS);
- ReturnInfo->RemoteAddress = (PUCHAR) ((ULONG)ReturnInfo + sizeof(TDI_CONNECTION_INFORMATION));
+ ReturnInfo->RemoteAddress = (PUCHAR) ((ULONG_PTR)ReturnInfo + sizeof(TDI_CONNECTION_INFORMATION));
ReturnAddress = (PTA_IP_ADDRESS)(ReturnInfo->RemoteAddress);
ReturnAddress->TAAddressCount = 1;
}
_SEH2_TRY
- {
- MmProbeAndLockPages(Mdl, KernelMode, IoModifyAccess);
- }
+ {
+ MmProbeAndLockPages(Mdl, KernelMode, IoModifyAccess);
+ }
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
- {
- TDI_DbgPrint(MIN_TRACE, ("MmProbeAndLockPages() failed.\n"));
- IoFreeMdl(Mdl);
- IoFreeIrp(Irp);
- ExFreePool(MdlBuffer);
- ExFreePool(ReceiveInfo);
- return STATUS_INSUFFICIENT_RESOURCES;
+ {
+ TDI_DbgPrint(MIN_TRACE, ("MmProbeAndLockPages() failed.\n"));
+ IoFreeMdl(Mdl);
+ IoFreeIrp(Irp);
+ ExFreePool(MdlBuffer);
+ ExFreePool(ReceiveInfo);
+ return STATUS_INSUFFICIENT_RESOURCES;
} _SEH2_END;
TdiBuildReceiveDatagram(
{
SetTextColor((HDC)wpm, RGB(0,0,255));
SetBkColor((HDC)wpm, (COLORREF)GetSysColor(COLOR_3DFACE));
- return((int)GetSysColorBrush(COLOR_3DFACE));
+ return(HandleToLong(GetSysColorBrush(COLOR_3DFACE)));
}
break;
case WM_COMMAND:
EndPaint(hwnd, &ps);
}
-void CALLBACK TimeProc(UINT uID, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2)
+void CALLBACK TimeProc(UINT uID, UINT uMsg, DWORD_PTR dwUser, DWORD_PTR dw1, DWORD_PTR dw2)
{
InvalidateRect((HWND)dwUser, NULL, 0);
}
GetCursorPos(&initpoint);
InitGL(hwnd);
oldticks = GetTickCount();
- TimerID = timeSetEvent (timerdelay, 0, TimeProc, (DWORD)hwnd, TIME_PERIODIC);
+ TimerID = timeSetEvent (timerdelay, 0, TimeProc, (DWORD_PTR)hwnd, TIME_PERIODIC);
break;
case WM_PAINT:
{
if(isdigit(ch))
{
unsigned int i = _wtoi(szCmdLine - 1);
- *hwndParent = (HWND)i;
+ *hwndParent = (HWND)(ULONG_PTR)i;
}
else
*hwndParent = NULL;
if(isdigit(ch))
{
unsigned int i = atoi(szCmdLine - 1);
- *hwndParent = (HWND)i;
+ *hwndParent = (HWND)(ULONG_PTR)i;
}
else
*hwndParent = 0;
if(isdigit(ch))
{
unsigned int i = _wtoi(szCmdLine - 1);
- *hwndParent = (HWND)i;
+ *hwndParent = (HWND)(ULONG_PTR)i;
}
else
*hwndParent = NULL;
// so that we can establish delta values
pPDOld = NULL;
for (Idx2=0; Idx2<ProcessCountOld; Idx2++) {
- if (pPerfDataOld[Idx2].ProcessId == (ULONG)(pSPI->UniqueProcessId) &&
+ if (pPerfDataOld[Idx2].ProcessId == (ULONG_PTR)(pSPI->UniqueProcessId) &&
/* check also for the creation time, a new process may have an id of an old one */
pPerfDataOld[Idx2].CreateTime.QuadPart == pSPI->CreateTime.QuadPart) {
pPDOld = &pPerfDataOld[Idx2];
#endif
}
- pPerfData[Idx].ProcessId = (ULONG)(pSPI->UniqueProcessId);
+ pPerfData[Idx].ProcessId = (ULONG_PTR)(pSPI->UniqueProcessId);
pPerfData[Idx].CreateTime = pSPI->CreateTime;
if (pPDOld) {
void sh_outp(char *cur_string)
{
int symbol;
- putchar('\n');
- putchar('\n');
- for(symbol=3;putchar(cur_string[symbol]); symbol++);
-}
+ putchar('\n');
+ putchar('\n');
+ for(symbol=3;putchar(cur_string[symbol]); symbol++);
+ }
void th_outp(char *cur_string, char *THtag)
-{
+ {
int symbol;
- putchar('\n');
- putchar('\n');
- putchar('\t');
- putchar('\t');
- SetCl(ITALIC);
- for(symbol=3;putchar(THtag[symbol]); symbol++);
- putchar('\n');
- SetCl(NORMAL);
-}
+ putchar('\n');
+ putchar('\n');
+ putchar('\t');
+ putchar('\t');
+ SetCl(ITALIC);
+ for(symbol=3;putchar(THtag[symbol]); symbol++);
+ putchar('\n');
+ SetCl(NORMAL);
+ }
void text_outp(char *cur_string)
-{
- char TagFlag=0;
+ {
+ char TagFlag=0;
int symbol=0;
- if(cur_string[0]=='.')
- while(cur_string[symbol]!=' ')
- symbol++;
+ if(cur_string[0]=='.')
+ while(cur_string[symbol]!=' ')
+ symbol++;
- if(symbol) TagFlag=1;
+ if(symbol) TagFlag=1;
- for(;cur_string[symbol]!='\n'; symbol++)
+ for(;cur_string[symbol]!='\n'; symbol++)
putchar(cur_string[symbol]);
putchar(' ');
-}
+ }
int
AnalyzeFile()
PIMAGE_OPTIONAL_HEADER poh = (PIMAGE_OPTIONAL_HEADER) OPTHDROFFSET (lpFile);
if (poh != NULL)
- return (LPVOID) (poh->AddressOfEntryPoint);
+ return (LPVOID)(poh->AddressOfEntryPoint);
else
return NULL;
}
-<module name="pedump" type="win32cui" installbase="system32" installname="pedump.exe">
+<module name="pedump" type="win32cui" installbase="system32" installname="pedump.exe" allowwarnings="true">
<library>ntdll</library>
<file>pedump.c</file>
<file>pedump.rc</file>
/* Main program */
int
-main(int argc, char *argv[])
+main(int argc,char *argv[])
{
if (argc > 1 && !strcmp(argv[1], "/?"))
{
NtCurrentProcess(),
&pBuf,
0,
- (PULONG)&size,
+ &size,
MEM_COMMIT,
PAGE_READWRITE
);
void PsaiFree(void *ptr)
{
- ULONG nSize = 0;
+ size_t nSize = 0;
NtFreeVirtualMemory(NtCurrentProcess(), &ptr, &nSize, MEM_RELEASE);
}
if (NULL == pInfo) return 0;
do {
- if (ALREADY_PROCESSED != (DWORD)pInfo->InheritedFromUniqueProcessId)
+ if (ALREADY_PROCESSED != (DWORD_PTR)pInfo->InheritedFromUniqueProcessId)
{
if ((Pid != (HANDLE)pInfo->UniqueProcessId) && (Pid == (HANDLE)pInfo->InheritedFromUniqueProcessId))
{
/* Scan and print possible children */
do {
- if (ALREADY_PROCESSED != (DWORD)pInfo->InheritedFromUniqueProcessId)
+ if (ALREADY_PROCESSED != (DWORD_PTR)pInfo->InheritedFromUniqueProcessId)
{
if (Pid == pInfo->InheritedFromUniqueProcessId)
{
}
else
{
- if (ALREADY_PROCESSED != (DWORD)pInfo->InheritedFromUniqueProcessId)
+ if (ALREADY_PROCESSED != (DWORD_PTR)pInfo->InheritedFromUniqueProcessId)
{
PrintProcessAndDescendants (pInfo, pInfoBase, 0);
}
CLIENT_ID ClientId = {0, 0};
- ClientId.UniqueProcess = (PVOID) atol (PidStr);
+ ClientId.UniqueProcess = LongToPtr(atol (PidStr));
if (FALSE == AcquirePrivileges ())
{
<module name="tlist" type="win32cui" installbase="system32" installname="tlist.exe">
<library>epsapi</library>
- <!-- <library>tgetopt</library> -->
+ <!--library>tgetopt</library> -->
<library>user32</library>
<library>ntdll</library>
<file>tlist.c</file>
outputPatch(const char *outputFileName)
{
char *patchExe, *patchBuffer = NULL;
- int i, size, patchExeSize, patchSize, stringSize, stringOffset, patchOffset;
+ int i, size, patchExeSize, patchSize, stringSize;
+ size_t stringOffset, patchOffset;
Patch *patch;
PatchedFile *files;
return -1;
}
- m_patch.name = p + (int)patch->name;
+ m_patch.name = p + (ULONG_PTR)patch->name;
m_patch.fileCount = patch->fileCount;
- m_patch.files = (PatchedFile *)(p + (int)patch->files);
+ m_patch.files = (PatchedFile *)(p + (ULONG_PTR)patch->files);
for (i = 0; i < m_patch.fileCount; i++)
{
- m_patch.files[i].name = p + (int)m_patch.files[i].name;
- m_patch.files[i].patches = (PatchedByte *)(p + (int)m_patch.files[i].patches);
+ m_patch.files[i].name = p + (ULONG_PTR)m_patch.files[i].name;
+ m_patch.files[i].patches = (PatchedByte *)(p + (ULONG_PTR)m_patch.files[i].patches);
}
printf("Patch %s loaded...\n", m_patch.name);
<module name="ps" type="win32cui" installbase="bin" installname="ps.exe">
- <include base="ps">.</include>
- <library>user32</library>
- <library>ntdll</library>
- <file>ps.c</file>
+ <include base="ps">.</include>
+ <library>user32</library>
+ <library>ntdll</library>
+ <file>ps.c</file>
</module>
<module name="rosperf" type="win32cui" installbase="system32" installname="rosperf.exe">
- <include base="rosperf">.</include>
- <define name="UNICODE" />
- <library>version</library>
- <library>msimg32</library>
- <library>gdi32</library>
- <library>shell32</library>
- <library>advapi32</library>
- <library>user32</library>
- <library>ntdll</library>
- <file>rosperf.c</file>
- <file>lines.c</file>
- <file>fill.c</file>
+ <include base="rosperf">.</include>
+ <define name="UNICODE" />
+ <library>version</library>
+ <library>msimg32</library>
+ <library>gdi32</library>
+ <library>shell32</library>
+ <library>advapi32</library>
+ <library>user32</library>
+ <library>ntdll</library>
+ <file>rosperf.c</file>
+ <file>lines.c</file>
+ <file>fill.c</file>
<file>scroll.c</file>
- <file>text.c</file>
- <file>alphablend.c</file>
- <file>testlist.c</file>
- <file>gradient.c</file>
- <file>rosperf.rc</file>
+ <file>text.c</file>
+ <file>alphablend.c</file>
+ <file>testlist.c</file>
+ <file>gradient.c</file>
+ <file>rosperf.rc</file>
</module>
PEXTENSION_INFO ExtInfo;
PEXTENSION_INFO Info;
TCHAR *t;
- DWORD ln;
+ size_t ln;
ExtInfo = (PEXTENSION_INFO) HeapAlloc (GetProcessHeap(), 0, sizeof (EXTENSION_INFO));
if (!ExtInfo)
return NULL;
for(t = ExtName; *t != _T('\0'); t += _tcslen(t) + 1);
- ln = (DWORD)t - (DWORD)ExtName;
+ ln = t - ExtName;
ZeroMemory (ExtInfo, sizeof (EXTENSION_INFO));
memcpy (ExtInfo->ExtName, ExtName, ln);
#if !defined(_NO_EXTENSIONS) && defined(__WINE__)
if (*path == '/')
{
- /* read unix file system tree */
+ /* read unix file system tree */
root->drive_type = GetDriveTypeW(path);
lstrcatW(drv, sSlash);
LPITEMIDLIST local_pidl = get_path_pidl(path,child->hwnd);
if (local_pidl)
entry = read_tree(&child->root, NULL, local_pidl , drv, child->sortOrder, child->hwnd);
- else
+ else
entry = NULL;
}
else
return target_attr&FILE_ATTRIBUTE_DIRECTORY? TRUE: FALSE;
}
-
+
static BOOL prompt_target(Pane* pane, LPWSTR source, LPWSTR target)
{
WCHAR path[MAX_PATH];
static int winefile_main(HINSTANCE hinstance, int cmdshow, LPCWSTR path)
{
MSG msg;
-
+
InitInstance(hinstance);
if( !show_frame(0, cmdshow, path) )
<directory name="w32knapi">
<xi:include href="w32knapi/w32knapi.rbuild" />
</directory>
-
+
<directory name="ws2_32">
<xi:include href="ws2_32/ws2_32.rbuild" />
</directory>
-<module name="gdi32api" type="win32cui">
+<module name="gdi32api" type="win32cui" allowwarnings="true">
<include base="gdi32api">.</include>
<library>apitest</library>
<library>user32</library>
+++ /dev/null
-#
-# win32k systemcalls taken from Windows 2003 SP2 x86
-#
-NtGdiAbortDoc 1
-NtGdiAbortPath 1
-NtGdiAddFontResourceW 6
-NtGdiAddRemoteFontToDC 4
-NtGdiAddFontMemResourceEx 5
-NtGdiRemoveMergeFont 2
-NtGdiAddRemoteMMInstanceToDC 3
-NtGdiAlphaBlend 12
-NtGdiAngleArc 6
-NtGdiAnyLinkedFonts 0
-NtGdiFontIsLinked 1
-NtGdiArcInternal 10
-NtGdiBeginPath 1
-NtGdiBitBlt 11
-NtGdiCancelDC 1
-NtGdiCheckBitmapBits 8
-NtGdiCloseFigure 1
-NtGdiClearBitmapAttributes 2
-NtGdiClearBrushAttributes 2
-NtGdiColorCorrectPalette 6
-NtGdiCombineRgn 4
-NtGdiCombineTransform 3
-NtGdiComputeXformCoefficients 1
-NtGdiConsoleTextOut 4
-NtGdiConvertMetafileRect 2
-NtGdiCreateBitmap 5
-NtGdiCreateClientObj 1
-NtGdiCreateColorSpace 1
-NtGdiCreateColorTransform 8
-NtGdiCreateCompatibleBitmap 3
-NtGdiCreateCompatibleDC 1
-NtGdiCreateDIBBrush 6
-NtGdiCreateDIBitmapInternal 11
-NtGdiCreateDIBSection 9
-NtGdiCreateEllipticRgn 4
-NtGdiCreateHalftonePalette 1
-NtGdiCreateHatchBrushInternal 3
-NtGdiCreateMetafileDC 1
-NtGdiCreatePaletteInternal 2
-NtGdiCreatePatternBrushInternal 3
-NtGdiCreatePen 4
-NtGdiCreateRectRgn 4
-NtGdiCreateRoundRectRgn 6
-NtGdiCreateServerMetaFile 6
-NtGdiCreateSolidBrush 2
-NtGdiD3dContextCreate 4
-NtGdiD3dContextDestroy 1
-NtGdiD3dContextDestroyAll 1
-NtGdiD3dValidateTextureStageState 1
-NtGdiD3dDrawPrimitives2 7
-NtGdiDdGetDriverState 1
-NtGdiDdAddAttachedSurface 3
-NtGdiDdAlphaBlt 3
-NtGdiDdAttachSurface 2
-NtGdiDdBeginMoCompFrame 2
-NtGdiDdBlt 3
-NtGdiDdCanCreateSurface 2
-NtGdiDdCanCreateD3DBuffer 2
-NtGdiDdColorControl 2
-NtGdiDdCreateDirectDrawObject 1
-NtGdiDdCreateSurface 8
-NtGdiDdCreateD3DBuffer 8
-NtGdiDdCreateMoComp 2
-NtGdiDdCreateSurfaceObject 6
-NtGdiDdDeleteDirectDrawObject 1
-NtGdiDdDeleteSurfaceObject 1
-NtGdiDdDestroyMoComp 2
-NtGdiDdDestroySurface 2
-NtGdiDdDestroyD3DBuffer 1
-NtGdiDdEndMoCompFrame 2
-NtGdiDdFlip 5
-NtGdiDdFlipToGDISurface 2
-NtGdiDdGetAvailDriverMemory 2
-NtGdiDdGetBltStatus 2
-NtGdiDdGetDC 2
-NtGdiDdGetDriverInfo 2
-NtGdiDdGetDxHandle 3
-NtGdiDdGetFlipStatus 2
-NtGdiDdGetInternalMoCompInfo 2
-NtGdiDdGetMoCompBuffInfo 2
-NtGdiDdGetMoCompGuids 2
-NtGdiDdGetMoCompFormats 2
-NtGdiDdGetScanLine 2
-NtGdiDdLock 3
-NtGdiDdLockD3D 2
-NtGdiDdQueryDirectDrawObject 11
-NtGdiDdQueryMoCompStatus 2
-NtGdiDdReenableDirectDrawObject 2
-NtGdiDdReleaseDC 1
-NtGdiDdRenderMoComp 2
-NtGdiDdResetVisrgn 2
-NtGdiDdSetColorKey 2
-NtGdiDdSetExclusiveMode 2
-NtGdiDdSetGammaRamp 3
-NtGdiDdCreateSurfaceEx 3
-NtGdiDdSetOverlayPosition 3
-NtGdiDdUnattachSurface 2
-NtGdiDdUnlock 2
-NtGdiDdUnlockD3D 2
-NtGdiDdUpdateOverlay 3
-NtGdiDdWaitForVerticalBlank 2
-NtGdiDvpCanCreateVideoPort 2
-NtGdiDvpColorControl 2
-NtGdiDvpCreateVideoPort 2
-NtGdiDvpDestroyVideoPort 2
-NtGdiDvpFlipVideoPort 4
-NtGdiDvpGetVideoPortBandwidth 2
-NtGdiDvpGetVideoPortField 2
-NtGdiDvpGetVideoPortFlipStatus 2
-NtGdiDvpGetVideoPortInputFormats 2
-NtGdiDvpGetVideoPortLine 2
-NtGdiDvpGetVideoPortOutputFormats 2
-NtGdiDvpGetVideoPortConnectInfo 2
-NtGdiDvpGetVideoSignalStatus 2
-NtGdiDvpUpdateVideoPort 4
-NtGdiDvpWaitForVideoPortSync 2
-NtGdiDvpAcquireNotification 3
-NtGdiDvpReleaseNotification 2
-NtGdiDxgGenericThunk 6
-NtGdiDeleteClientObj 1
-NtGdiDeleteColorSpace 1
-NtGdiDeleteColorTransform 2
-NtGdiDeleteObjectApp 1
-NtGdiDescribePixelFormat 4
-NtGdiGetPerBandInfo 2
-NtGdiDoBanding 4
-NtGdiDoPalette 6
-NtGdiDrawEscape 4
-NtGdiEllipse 5
-NtGdiEnableEudc 1
-NtGdiEndDoc 1
-NtGdiEndPage 1
-NtGdiEndPath 1
-NtGdiEnumFontChunk 5
-NtGdiEnumFontClose 1
-NtGdiEnumFontOpen 7
-NtGdiEnumObjects 4
-NtGdiEqualRgn 2
-NtGdiEudcLoadUnloadLink 7
-NtGdiExcludeClipRect 5
-NtGdiExtCreatePen 11
-NtGdiExtCreateRegion 3
-NtGdiExtEscape 8
-NtGdiExtFloodFill 5
-NtGdiExtGetObjectW 3
-NtGdiExtSelectClipRgn 3
-NtGdiExtTextOutW 9
-NtGdiFillPath 1
-NtGdiFillRgn 3
-NtGdiFlattenPath 1
-NtGdiFlush 0
-NtGdiForceUFIMapping 2
-NtGdiFrameRgn 5
-NtGdiFullscreenControl 5
-NtGdiGetAndSetDCDword 4
-NtGdiGetAppClipBox 2
-NtGdiGetBitmapBits 3
-NtGdiGetBitmapDimension 2
-NtGdiGetBoundsRect 3
-NtGdiGetCharABCWidthsW 6
-NtGdiGetCharacterPlacementW 6
-NtGdiGetCharSet 1
-NtGdiGetCharWidthW 6
-NtGdiGetCharWidthInfo 2
-NtGdiGetColorAdjustment 2
-NtGdiGetColorSpaceforBitmap 1
-NtGdiGetDCDword 3
-NtGdiGetDCforBitmap 1
-NtGdiGetDCObject 2
-NtGdiGetDCPoint 3
-NtGdiGetDeviceCaps 2
-NtGdiGetDeviceGammaRamp 2
-NtGdiGetDeviceCapsAll 2
-NtGdiGetDIBitsInternal 9
-NtGdiGetETM 2
-NtGdiGetEudcTimeStampEx 3
-NtGdiGetFontData 5
-NtGdiGetFontResourceInfoInternalW 7
-NtGdiGetGlyphIndicesW 5
-NtGdiGetGlyphIndicesWInternal 6
-NtGdiGetGlyphOutline 8
-NtGdiGetKerningPairs 3
-NtGdiGetLinkedUFIs 3
-NtGdiGetMiterLimit 2
-NtGdiGetMonitorID 3
-NtGdiGetNearestColor 2
-NtGdiGetNearestPaletteIndex 2
-NtGdiGetObjectBitmapHandle 2
-NtGdiGetOutlineTextMetricsInternalW 4
-NtGdiGetPath 4
-NtGdiGetPixel 3
-NtGdiGetRandomRgn 3
-NtGdiGetRasterizerCaps 2
-NtGdiGetRealizationInfo 3
-NtGdiGetRegionData 3
-NtGdiGetRgnBox 2
-NtGdiGetServerMetaFileBits 7
-NtGdiGetSpoolMessage 4
-NtGdiGetStats 5
-NtGdiGetStockObject 1
-NtGdiGetStringBitmapW 5
-NtGdiGetSystemPaletteUse 1
-NtGdiGetTextCharsetInfo 3
-NtGdiGetTextExtent 5
-NtGdiGetTextExtentExW 8
-NtGdiGetTextFaceW 4
-NtGdiGetTextMetricsW 3
-NtGdiGetTransform 3
-NtGdiGetUFI 6
-NtGdiGetEmbUFI 7
-NtGdiGetUFIPathname 10
-NtGdiGetEmbedFonts 0
-NtGdiChangeGhostFont 2
-NtGdiAddEmbFontToDC 2
-NtGdiGetFontUnicodeRanges 2
-NtGdiGetWidthTable 7
-NtGdiGradientFill 6
-NtGdiHfontCreate 5
-NtGdiIcmBrushInfo 8
-NtGdiInit 0
-NtGdiInitSpool 0
-NtGdiIntersectClipRect 5
-NtGdiInvertRgn 2
-NtGdiLineTo 3
-NtGdiMakeFontDir 5
-NtGdiMakeInfoDC 2
-NtGdiMaskBlt 13
-NtGdiModifyWorldTransform 3
-NtGdiMonoBitmap 1
-NtGdiMoveTo 4
-NtGdiOffsetClipRgn 3
-NtGdiOffsetRgn 3
-NtGdiOpenDCW 7
-NtGdiPatBlt 6
-NtGdiPolyPatBlt 5
-NtGdiPathToRegion 1
-NtGdiPlgBlt 11
-NtGdiPolyDraw 4
-NtGdiPolyPolyDraw 5
-NtGdiPolyTextOutW 4
-NtGdiPtInRegion 3
-NtGdiPtVisible 3
-NtGdiQueryFonts 3
-NtGdiQueryFontAssocInfo 1
-NtGdiRectangle 5
-NtGdiRectInRegion 2
-NtGdiRectVisible 2
-NtGdiRemoveFontResourceW 6
-NtGdiRemoveFontMemResourceEx 1
-NtGdiResetDC 5
-NtGdiResizePalette 2
-NtGdiRestoreDC 2
-NtGdiRoundRect 7
-NtGdiSaveDC 1
-NtGdiScaleViewportExtEx 6
-NtGdiScaleWindowExtEx 6
-GreSelectBitmap 2
-NtGdiSelectBrush 2
-NtGdiSelectClipPath 2
-NtGdiSelectFont 2
-NtGdiSelectPen 2
-NtGdiSetBitmapAttributes 2
-NtGdiSetBitmapBits 3
-NtGdiSetBitmapDimension 4
-NtGdiSetBoundsRect 3
-NtGdiSetBrushAttributes 2
-NtGdiSetBrushOrg 4
-NtGdiSetColorAdjustment 2
-NtGdiSetColorSpace 2
-NtGdiSetDeviceGammaRamp 2
-NtGdiSetDIBitsToDeviceInternal 16
-NtGdiSetFontEnumeration 1
-NtGdiSetFontXform 3
-NtGdiSetIcmMode 3
-NtGdiSetLinkedUFIs 3
-NtGdiSetMagicColors 3
-NtGdiSetMetaRgn 1
-NtGdiSetMiterLimit 3
-NtGdiGetDeviceWidth 1
-NtGdiMirrorWindowOrg 1
-NtGdiSetLayout 3
-NtGdiSetPixel 4
-NtGdiSetPixelFormat 2
-NtGdiSetRectRgn 5
-NtGdiSetSystemPaletteUse 2
-NtGdiSetTextJustification 3
-NtGdiSetupPublicCFONT 3
-NtGdiSetVirtualResolution 5
-NtGdiSetSizeDevice 3
-NtGdiStartDoc 4
-NtGdiStartPage 1
-NtGdiStretchBlt 12
-NtGdiStretchDIBitsInternal 16
-NtGdiStrokeAndFillPath 1
-NtGdiStrokePath 1
-NtGdiSwapBuffers 1
-NtGdiTransformPoints 5
-NtGdiTransparentBlt 11
-NtGdiUnloadPrinterDriver 2
-NtGdiUnmapMemFont 1
-NtGdiUnrealizeObject 1
-NtGdiUpdateColors 1
-NtGdiWidenPath 1
-NtUserActivateKeyboardLayout 2
-NtUserAlterWindowStyle 3
-NtUserAssociateInputContext 3
-NtUserAttachThreadInput 3
-NtUserBeginPaint 2
-NtUserBitBltSysBmp 8
-NtUserBlockInput 1
-NtUserBuildHimcList 4
-NtUserBuildHwndList 7
-NtUserBuildNameList 4
-NtUserBuildPropList 4
-NtUserCallHwnd 2
-NtUserCallHwndLock 2
-NtUserCallHwndOpt 2
-NtUserCallHwndParam 3
-NtUserCallHwndParamLock 3
-NtUserCallMsgFilter 2
-NtUserCallNextHookEx 4
-NtUserCallNoParam 1
-NtUserCallOneParam 2
-NtUserCallTwoParam 3
-NtUserChangeClipboardChain 2
-NtUserChangeDisplaySettings 4
-NtUserCheckImeHotKey 2
-NtUserCheckMenuItem 3
-NtUserChildWindowFromPointEx 4
-NtUserClipCursor 1
-NtUserCloseClipboard 0
-NtUserCloseDesktop 1
-NtUserCloseWindowStation 1
-NtUserConsoleControl 3
-NtUserConvertMemHandle 2
-NtUserCopyAcceleratorTable 3
-NtUserCountClipboardFormats 0
-NtUserCreateAcceleratorTable 2
-NtUserCreateCaret 4
-NtUserCreateDesktop 5
-NtUserCreateInputContext 1
-NtUserCreateLocalMemHandle 4
-NtUserCreateWindowEx 15
-NtUserCreateWindowStation 7
-NtUserDdeGetQualityOfService 3
-NtUserDdeInitialize 5
-NtUserDdeSetQualityOfService 3
-NtUserDeferWindowPos 8
-NtUserDefSetText 2
-NtUserDeleteMenu 3
-NtUserDestroyAcceleratorTable 1
-NtUserDestroyCursor 2
-NtUserDestroyInputContext 1
-NtUserDestroyMenu 1
-NtUserDestroyWindow 1
-NtUserDisableThreadIme 1
-NtUserDispatchMessage 1
-NtUserDragDetect 3
-NtUserDragObject 5
-NtUserDrawAnimatedRects 4
-NtUserDrawCaption 4
-NtUserDrawCaptionTemp 7
-NtUserDrawIconEx 11
-NtUserDrawMenuBarTemp 5
-NtUserEmptyClipboard 0
-NtUserEnableMenuItem 3
-NtUserEnableScrollBar 3
-NtUserEndDeferWindowPosEx 2
-NtUserEndMenu 0
-NtUserEndPaint 2
-NtUserEnumDisplayDevices 4
-NtUserEnumDisplayMonitors 4
-NtUserEnumDisplaySettings 4
-NtUserEvent 1
-NtUserExcludeUpdateRgn 2
-NtUserFillWindow 4
-NtUserFindExistingCursorIcon 3
-NtUserFindWindowEx 5
-NtUserFlashWindowEx 1
-NtUserGetAltTabInfo 6
-NtUserGetAncestor 2
-NtUserGetAppImeLevel 1
-NtUserGetAsyncKeyState 1
-NtUserGetAtomName 2
-NtUserGetCaretBlinkTime 0
-NtUserGetCaretPos 1
-NtUserGetClassInfoEx 5
-NtUserGetClassName 3
-NtUserGetClipboardData 2
-NtUserGetClipboardFormatName 3
-NtUserGetClipboardOwner 0
-NtUserGetClipboardSequenceNumber 0
-NtUserGetClipboardViewer 0
-NtUserGetClipCursor 1
-NtUserGetComboBoxInfo 2
-NtUserGetControlBrush 3
-NtUserGetControlColor 4
-NtUserGetCPD 3
-NtUserGetCursorFrameInfo 4
-NtUserGetCursorInfo 1
-NtUserGetDC 1
-NtUserGetDCEx 3
-NtUserGetDoubleClickTime 0
-NtUserGetForegroundWindow 0
-NtUserGetGuiResources 2
-NtUserGetGUIThreadInfo 2
-NtUserGetIconInfo 6
-NtUserGetIconSize 4
-NtUserGetImeHotKey 4
-NtUserGetImeInfoEx 2
-NtUserGetInternalWindowPos 3
-NtUserGetKeyboardLayoutList 2
-NtUserGetKeyboardLayoutName 1
-NtUserGetKeyboardState 1
-NtUserGetKeyNameText 3
-NtUserGetKeyState 1
-NtUserGetListBoxInfo 1
-NtUserGetMenuBarInfo 4
-NtUserGetMenuIndex 2
-NtUserGetMenuItemRect 4
-NtUserGetMessage 4
-NtUserGetMouseMovePointsEx 5
-NtUserGetObjectInformation 5
-NtUserGetOpenClipboardWindow 0
-NtUserGetPriorityClipboardFormat 2
-NtUserGetProcessWindowStation 0
-NtUserGetRawInputBuffer 3
-NtUserGetRawInputData 5
-NtUserGetRawInputDeviceInfo 4
-NtUserGetRawInputDeviceList 3
-NtUserGetRegisteredRawInputDevices 3
-NtUserGetScrollBarInfo 3
-NtUserGetSystemMenu 2
-NtUserGetThreadDesktop 2
-NtUserGetThreadState 1
-NtUserGetTitleBarInfo 2
-NtUserGetUpdateRect 3
-NtUserGetUpdateRgn 3
-NtUserGetWindowDC 1
-NtUserGetWindowPlacement 2
-NtUserGetWOWClass 2
-NtUserHardErrorControl 3
-NtUserHideCaret 1
-NtUserHiliteMenuItem 4
-NtUserImpersonateDdeClientWindow 2
-NtUserInitialize 3
-NtUserInitializeClientPfnArrays 4
-NtUserInitTask 12
-NtUserInternalGetWindowText 3
-NtUserInvalidateRect 3
-NtUserInvalidateRgn 3
-NtUserIsClipboardFormatAvailable 1
-NtUserKillTimer 2
-NtUserLoadKeyboardLayoutEx 7
-NtUserLockWindowStation 1
-NtUserLockWindowUpdate 1
-NtUserLockWorkStation 0
-NtUserMapVirtualKeyEx 4
-NtUserMenuItemFromPoint 4
-NtUserMessageCall 7
-NtUserMinMaximize 3
-NtUserMNDragLeave 0
-NtUserMNDragOver 2
-NtUserModifyUserStartupInfoFlags 2
-NtUserMoveWindow 6
-NtUserNotifyIMEStatus 3
-NtUserNotifyProcessCreate 4
-NtUserNotifyWinEvent 4
-NtUserOpenClipboard 2
-NtUserOpenDesktop 3
-NtUserOpenInputDesktop 3
-NtUserOpenWindowStation 2
-NtUserPaintDesktop 1
-NtUserPeekMessage 5
-NtUserPostMessage 4
-NtUserPostThreadMessage 4
-NtUserPrintWindow 3
-NtUserProcessConnect 3
-NtUserQueryInformationThread 4
-NtUserQueryInputContext 2
-NtUserQuerySendMessage 1
-NtUserQueryWindow 2
-NtUserRealChildWindowFromPoint 3
-NtUserRealInternalGetMessage 6
-NtUserRealWaitMessageEx 2
-NtUserRedrawWindow 4
-NtUserRegisterClassExWOW 7
-NtUserRegisterUserApiHook 4
-NtUserRegisterHotKey 4
-NtUserRegisterRawInputDevices 3
-NtUserRegisterTasklist 1
-NtUserRegisterWindowMessage 1
-NtUserRemoveMenu 3
-NtUserRemoveProp 2
-NtUserResolveDesktop 4
-NtUserResolveDesktopForWOW 1
-NtUserSBGetParms 4
-NtUserScrollDC 7
-NtUserScrollWindowEx 8
-NtUserSelectPalette 3
-NtUserSendInput 3
-NtUserSetActiveWindow 1
-NtUserSetAppImeLevel 2
-NtUserSetCapture 1
-NtUserSetClassLong 4
-NtUserSetClassWord 3
-NtUserSetClipboardData 3
-NtUserSetClipboardViewer 1
-NtUserSetConsoleReserveKeys 2
-NtUserSetCursor 1
-NtUserSetCursorContents 2
-NtUserSetCursorIconData 4
-NtUserSetFocus 1
-NtUserSetImeHotKey 5
-NtUserSetImeInfoEx 1
-NtUserSetImeOwnerWindow 2
-NtUserSetInformationProcess 4
-NtUserSetInformationThread 4
-NtUserSetInternalWindowPos 4
-NtUserSetKeyboardState 1
-NtUserSetLogonNotifyWindow 1
-NtUserSetMenu 3
-NtUserSetMenuContextHelpId 2
-NtUserSetMenuDefaultItem 3
-NtUserSetMenuFlagRtoL 1
-NtUserSetObjectInformation 4
-NtUserSetParent 2
-NtUserSetProcessWindowStation 1
-NtUserSetProp 3
-NtUserSetScrollInfo 4
-NtUserSetShellWindowEx 2
-NtUserSetSysColors 4
-NtUserSetSystemCursor 2
-NtUserSetSystemMenu 2
-NtUserSetSystemTimer 4
-NtUserSetThreadDesktop 1
-NtUserSetThreadLayoutHandles 2
-NtUserSetThreadState 2
-NtUserSetTimer 4
-NtUserSetWindowFNID 2
-NtUserSetWindowLong 4
-NtUserSetWindowPlacement 2
-NtUserSetWindowPos 7
-NtUserSetWindowRgn 3
-NtUserSetWindowsHookAW 3
-NtUserSetWindowsHookEx 6
-NtUserSetWindowStationUser 4
-NtUserSetWindowWord 3
-NtUserSetWinEventHook 8
-NtUserShowCaret 1
-NtUserShowScrollBar 3
-NtUserShowWindow 2
-NtUserShowWindowAsync 2
-NtUserSoundSentry 0
-NtUserSwitchDesktop 1
-NtUserSystemParametersInfo 4
-NtUserTestForInteractiveUser 1
-NtUserThunkedMenuInfo 2
-NtUserThunkedMenuItemInfo 6
-NtUserToUnicodeEx 7
-NtUserTrackMouseEvent 1
-NtUserTrackPopupMenuEx 6
-NtUserCalcMenuBar 5
-NtUserPaintMenuBar 6
-NtUserTranslateAccelerator 3
-NtUserTranslateMessage 2
-NtUserUnhookWindowsHookEx 1
-NtUserUnhookWinEvent 1
-NtUserUnloadKeyboardLayout 1
-NtUserUnlockWindowStation 1
-NtUserUnregisterClass 3
-NtUserUnregisterUserApiHook 0
-NtUserUnregisterHotKey 2
-NtUserUpdateInputContext 3
-NtUserUpdateInstance 3
-NtUserUpdateLayeredWindow 10
-NtUserGetLayeredWindowAttributes 4
-NtUserSetLayeredWindowAttributes 4
-NtUserUpdatePerUserSystemParameters 2
-NtUserUserHandleGrantAccess 3
-NtUserValidateHandleSecure 1
-NtUserValidateRect 2
-NtUserValidateTimerCallback 1
-NtUserVkKeyScanEx 3
-NtUserWaitForInputIdle 3
-NtUserWaitForMsgAndEvent 1
-NtUserWaitMessage 0
-NtUserWin32PoolAllocationStats 6
-NtUserWindowFromPoint 2
-NtUserYieldTask 0
-NtUserRemoteConnect 3
-NtUserRemoteRedrawRectangle 4
-NtUserRemoteRedrawScreen 0
-NtUserRemoteStopScreenUpdates 0
-NtUserCtxDisplayIOCtl 3
-NtGdiEngAssociateSurface 3
-NtGdiEngCreateBitmap 6
-NtGdiEngCreateDeviceSurface 4
-NtGdiEngCreateDeviceBitmap 4
-NtGdiEngCreatePalette 6
-NtGdiEngComputeGlyphSet 3
-NtGdiEngCopyBits 6
-NtGdiEngDeletePalette 1
-NtGdiEngDeleteSurface 1
-NtGdiEngEraseSurface 3
-NtGdiEngUnlockSurface 1
-NtGdiEngLockSurface 1
-NtGdiEngBitBlt 11
-NtGdiEngStretchBlt 11
-NtGdiEngPlgBlt 11
-NtGdiEngMarkBandingSurface 1
-NtGdiEngStrokePath 8
-NtGdiEngFillPath 7
-NtGdiEngStrokeAndFillPath 10
-NtGdiEngPaint 5
-NtGdiEngLineTo 9
-NtGdiEngAlphaBlend 7
-NtGdiEngGradientFill 10
-NtGdiEngTransparentBlt 8
-NtGdiEngTextOut 10
-NtGdiEngStretchBltROP 13
-NtGdiXLATEOBJ_cGetPalette 4
-NtGdiXLATEOBJ_iXlate 2
-NtGdiXLATEOBJ_hGetColorTransform 1
-NtGdiCLIPOBJ_bEnum 3
-NtGdiCLIPOBJ_cEnumStart 5
-NtGdiCLIPOBJ_ppoGetPath 1
-NtGdiEngDeletePath 1
-NtGdiEngCreateClip 0
-NtGdiEngDeleteClip 1
-NtGdiBRUSHOBJ_ulGetBrushColor 1
-NtGdiBRUSHOBJ_pvAllocRbrush 2
-NtGdiBRUSHOBJ_pvGetRbrush 1
-NtGdiBRUSHOBJ_hGetColorTransform 1
-NtGdiXFORMOBJ_bApplyXform 5
-NtGdiXFORMOBJ_iGetXform 2
-NtGdiFONTOBJ_vGetInfo 3
-NtGdiFONTOBJ_pxoGetXform 1
-NtGdiFONTOBJ_cGetGlyphs 5
-NtGdiFONTOBJ_pifi 1
-NtGdiFONTOBJ_pfdg 1
-NtGdiFONTOBJ_pQueryGlyphAttrs 2
-NtGdiFONTOBJ_pvTrueTypeFontFile 2
-NtGdiFONTOBJ_cGetAllGlyphHandles 2
-NtGdiSTROBJ_bEnum 3
-NtGdiSTROBJ_bEnumPositionsOnly 3
-NtGdiSTROBJ_bGetAdvanceWidths 4
-NtGdiSTROBJ_vEnumStart 1
-NtGdiSTROBJ_dwGetCodePage 1
-NtGdiPATHOBJ_vGetBounds 2
-NtGdiPATHOBJ_bEnum 2
-NtGdiPATHOBJ_vEnumStart 1
-NtGdiPATHOBJ_vEnumStartClipLines 4
-NtGdiPATHOBJ_bEnumClipLines 3
-NtGdiGetDhpdev 1
-NtGdiEngCheckAbort 1
-NtGdiHT_Get8BPPFormatPalette 4
-NtGdiHT_Get8BPPMaskPalette 6
-NtGdiUpdateTransform 1
-NtGdiSetPUMPDOBJ 4
-NtGdiBRUSHOBJ_DeleteRbrush 2
-NtGdiUnmapMemFont 1
-NtGdiDrawStream 3
-NtGdiMakeObjectXferable 2
-NtGdiMakeObjectUnXferable 1
--- /dev/null
+/* FILE: System Call Stubs for Native API
+ * COPYRIGHT: See COPYING in the top level directory
+ * PURPOSE: obj-amd64\lib\win32ksys\win32k.S
+ * PROGRAMMER: Computer Generated File. See tools/nci/ncitool.c
+ * REMARK: DO NOT EDIT OR COMMIT MODIFICATIONS TO THIS FILE
+ */
+
+
+#include <ndk/asm.h>
+
+.global _NtGdiAbortDoc
+_NtGdiAbortDoc:
+ movl $0x1000, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiAbortPath
+_NtGdiAbortPath:
+ movl $0x1001, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiAddFontResourceW
+_NtGdiAddFontResourceW:
+ movl $0x1002, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiAddRemoteFontToDC
+_NtGdiAddRemoteFontToDC:
+ movl $0x1003, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiAddFontMemResourceEx
+_NtGdiAddFontMemResourceEx:
+ movl $0x1004, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiRemoveMergeFont
+_NtGdiRemoveMergeFont:
+ movl $0x1005, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiAddRemoteMMInstanceToDC
+_NtGdiAddRemoteMMInstanceToDC:
+ movl $0x1006, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiAlphaBlend
+_NtGdiAlphaBlend:
+ movl $0x1007, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x30
+
+.global _NtGdiAngleArc
+_NtGdiAngleArc:
+ movl $0x1008, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiAnyLinkedFonts
+_NtGdiAnyLinkedFonts:
+ movl $0x1009, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtGdiFontIsLinked
+_NtGdiFontIsLinked:
+ movl $0x100a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiArcInternal
+_NtGdiArcInternal:
+ movl $0x100b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x28
+
+.global _NtGdiBeginPath
+_NtGdiBeginPath:
+ movl $0x100c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiBitBlt
+_NtGdiBitBlt:
+ movl $0x100d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x2c
+
+.global _NtGdiCancelDC
+_NtGdiCancelDC:
+ movl $0x100e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiCheckBitmapBits
+_NtGdiCheckBitmapBits:
+ movl $0x100f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtGdiCloseFigure
+_NtGdiCloseFigure:
+ movl $0x1010, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiClearBitmapAttributes
+_NtGdiClearBitmapAttributes:
+ movl $0x1011, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiClearBrushAttributes
+_NtGdiClearBrushAttributes:
+ movl $0x1012, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiColorCorrectPalette
+_NtGdiColorCorrectPalette:
+ movl $0x1013, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiCombineRgn
+_NtGdiCombineRgn:
+ movl $0x1014, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiCombineTransform
+_NtGdiCombineTransform:
+ movl $0x1015, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiComputeXformCoefficients
+_NtGdiComputeXformCoefficients:
+ movl $0x1016, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiConsoleTextOut
+_NtGdiConsoleTextOut:
+ movl $0x1017, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiConvertMetafileRect
+_NtGdiConvertMetafileRect:
+ movl $0x1018, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiCreateBitmap
+_NtGdiCreateBitmap:
+ movl $0x1019, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiCreateClientObj
+_NtGdiCreateClientObj:
+ movl $0x101a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiCreateColorSpace
+_NtGdiCreateColorSpace:
+ movl $0x101b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiCreateColorTransform
+_NtGdiCreateColorTransform:
+ movl $0x101c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtGdiCreateCompatibleBitmap
+_NtGdiCreateCompatibleBitmap:
+ movl $0x101d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiCreateCompatibleDC
+_NtGdiCreateCompatibleDC:
+ movl $0x101e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiCreateDIBBrush
+_NtGdiCreateDIBBrush:
+ movl $0x101f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiCreateDIBitmapInternal
+_NtGdiCreateDIBitmapInternal:
+ movl $0x1020, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x2c
+
+.global _NtGdiCreateDIBSection
+_NtGdiCreateDIBSection:
+ movl $0x1021, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x24
+
+.global _NtGdiCreateEllipticRgn
+_NtGdiCreateEllipticRgn:
+ movl $0x1022, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiCreateHalftonePalette
+_NtGdiCreateHalftonePalette:
+ movl $0x1023, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiCreateHatchBrushInternal
+_NtGdiCreateHatchBrushInternal:
+ movl $0x1024, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiCreateMetafileDC
+_NtGdiCreateMetafileDC:
+ movl $0x1025, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiCreatePaletteInternal
+_NtGdiCreatePaletteInternal:
+ movl $0x1026, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiCreatePatternBrushInternal
+_NtGdiCreatePatternBrushInternal:
+ movl $0x1027, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiCreatePen
+_NtGdiCreatePen:
+ movl $0x1028, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiCreateRectRgn
+_NtGdiCreateRectRgn:
+ movl $0x1029, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiCreateRoundRectRgn
+_NtGdiCreateRoundRectRgn:
+ movl $0x102a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiCreateServerMetaFile
+_NtGdiCreateServerMetaFile:
+ movl $0x102b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiCreateSolidBrush
+_NtGdiCreateSolidBrush:
+ movl $0x102c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiD3dContextCreate
+_NtGdiD3dContextCreate:
+ movl $0x102d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiD3dContextDestroy
+_NtGdiD3dContextDestroy:
+ movl $0x102e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiD3dContextDestroyAll
+_NtGdiD3dContextDestroyAll:
+ movl $0x102f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiD3dValidateTextureStageState
+_NtGdiD3dValidateTextureStageState:
+ movl $0x1030, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiD3dDrawPrimitives2
+_NtGdiD3dDrawPrimitives2:
+ movl $0x1031, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtGdiDdGetDriverState
+_NtGdiDdGetDriverState:
+ movl $0x1032, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiDdAddAttachedSurface
+_NtGdiDdAddAttachedSurface:
+ movl $0x1033, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiDdAlphaBlt
+_NtGdiDdAlphaBlt:
+ movl $0x1034, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiDdAttachSurface
+_NtGdiDdAttachSurface:
+ movl $0x1035, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdBeginMoCompFrame
+_NtGdiDdBeginMoCompFrame:
+ movl $0x1036, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdBlt
+_NtGdiDdBlt:
+ movl $0x1037, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiDdCanCreateSurface
+_NtGdiDdCanCreateSurface:
+ movl $0x1038, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdCanCreateD3DBuffer
+_NtGdiDdCanCreateD3DBuffer:
+ movl $0x1039, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdColorControl
+_NtGdiDdColorControl:
+ movl $0x103a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdCreateDirectDrawObject
+_NtGdiDdCreateDirectDrawObject:
+ movl $0x103b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiDdCreateSurface
+_NtGdiDdCreateSurface:
+ movl $0x103c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtGdiDdCreateD3DBuffer
+_NtGdiDdCreateD3DBuffer:
+ movl $0x103d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtGdiDdCreateMoComp
+_NtGdiDdCreateMoComp:
+ movl $0x103e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdCreateSurfaceObject
+_NtGdiDdCreateSurfaceObject:
+ movl $0x103f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiDdDeleteDirectDrawObject
+_NtGdiDdDeleteDirectDrawObject:
+ movl $0x1040, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiDdDeleteSurfaceObject
+_NtGdiDdDeleteSurfaceObject:
+ movl $0x1041, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiDdDestroyMoComp
+_NtGdiDdDestroyMoComp:
+ movl $0x1042, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdDestroySurface
+_NtGdiDdDestroySurface:
+ movl $0x1043, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdDestroyD3DBuffer
+_NtGdiDdDestroyD3DBuffer:
+ movl $0x1044, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiDdEndMoCompFrame
+_NtGdiDdEndMoCompFrame:
+ movl $0x1045, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdFlip
+_NtGdiDdFlip:
+ movl $0x1046, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiDdFlipToGDISurface
+_NtGdiDdFlipToGDISurface:
+ movl $0x1047, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdGetAvailDriverMemory
+_NtGdiDdGetAvailDriverMemory:
+ movl $0x1048, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdGetBltStatus
+_NtGdiDdGetBltStatus:
+ movl $0x1049, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdGetDC
+_NtGdiDdGetDC:
+ movl $0x104a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdGetDriverInfo
+_NtGdiDdGetDriverInfo:
+ movl $0x104b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdGetDxHandle
+_NtGdiDdGetDxHandle:
+ movl $0x104c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiDdGetFlipStatus
+_NtGdiDdGetFlipStatus:
+ movl $0x104d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdGetInternalMoCompInfo
+_NtGdiDdGetInternalMoCompInfo:
+ movl $0x104e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdGetMoCompBuffInfo
+_NtGdiDdGetMoCompBuffInfo:
+ movl $0x104f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdGetMoCompGuids
+_NtGdiDdGetMoCompGuids:
+ movl $0x1050, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdGetMoCompFormats
+_NtGdiDdGetMoCompFormats:
+ movl $0x1051, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdGetScanLine
+_NtGdiDdGetScanLine:
+ movl $0x1052, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdLock
+_NtGdiDdLock:
+ movl $0x1053, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiDdLockD3D
+_NtGdiDdLockD3D:
+ movl $0x1054, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdQueryDirectDrawObject
+_NtGdiDdQueryDirectDrawObject:
+ movl $0x1055, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x2c
+
+.global _NtGdiDdQueryMoCompStatus
+_NtGdiDdQueryMoCompStatus:
+ movl $0x1056, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdReenableDirectDrawObject
+_NtGdiDdReenableDirectDrawObject:
+ movl $0x1057, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdReleaseDC
+_NtGdiDdReleaseDC:
+ movl $0x1058, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiDdRenderMoComp
+_NtGdiDdRenderMoComp:
+ movl $0x1059, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdResetVisrgn
+_NtGdiDdResetVisrgn:
+ movl $0x105a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdSetColorKey
+_NtGdiDdSetColorKey:
+ movl $0x105b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdSetExclusiveMode
+_NtGdiDdSetExclusiveMode:
+ movl $0x105c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdSetGammaRamp
+_NtGdiDdSetGammaRamp:
+ movl $0x105d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiDdCreateSurfaceEx
+_NtGdiDdCreateSurfaceEx:
+ movl $0x105e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiDdSetOverlayPosition
+_NtGdiDdSetOverlayPosition:
+ movl $0x105f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiDdUnattachSurface
+_NtGdiDdUnattachSurface:
+ movl $0x1060, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdUnlock
+_NtGdiDdUnlock:
+ movl $0x1061, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdUnlockD3D
+_NtGdiDdUnlockD3D:
+ movl $0x1062, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdUpdateOverlay
+_NtGdiDdUpdateOverlay:
+ movl $0x1063, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiDdWaitForVerticalBlank
+_NtGdiDdWaitForVerticalBlank:
+ movl $0x1064, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDvpCanCreateVideoPort
+_NtGdiDvpCanCreateVideoPort:
+ movl $0x1065, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDvpColorControl
+_NtGdiDvpColorControl:
+ movl $0x1066, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDvpCreateVideoPort
+_NtGdiDvpCreateVideoPort:
+ movl $0x1067, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDvpDestroyVideoPort
+_NtGdiDvpDestroyVideoPort:
+ movl $0x1068, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDvpFlipVideoPort
+_NtGdiDvpFlipVideoPort:
+ movl $0x1069, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiDvpGetVideoPortBandwidth
+_NtGdiDvpGetVideoPortBandwidth:
+ movl $0x106a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDvpGetVideoPortField
+_NtGdiDvpGetVideoPortField:
+ movl $0x106b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDvpGetVideoPortFlipStatus
+_NtGdiDvpGetVideoPortFlipStatus:
+ movl $0x106c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDvpGetVideoPortInputFormats
+_NtGdiDvpGetVideoPortInputFormats:
+ movl $0x106d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDvpGetVideoPortLine
+_NtGdiDvpGetVideoPortLine:
+ movl $0x106e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDvpGetVideoPortOutputFormats
+_NtGdiDvpGetVideoPortOutputFormats:
+ movl $0x106f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDvpGetVideoPortConnectInfo
+_NtGdiDvpGetVideoPortConnectInfo:
+ movl $0x1070, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDvpGetVideoSignalStatus
+_NtGdiDvpGetVideoSignalStatus:
+ movl $0x1071, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDvpUpdateVideoPort
+_NtGdiDvpUpdateVideoPort:
+ movl $0x1072, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiDvpWaitForVideoPortSync
+_NtGdiDvpWaitForVideoPortSync:
+ movl $0x1073, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDvpAcquireNotification
+_NtGdiDvpAcquireNotification:
+ movl $0x1074, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiDvpReleaseNotification
+_NtGdiDvpReleaseNotification:
+ movl $0x1075, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDxgGenericThunk
+_NtGdiDxgGenericThunk:
+ movl $0x1076, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiDeleteClientObj
+_NtGdiDeleteClientObj:
+ movl $0x1077, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiDeleteColorSpace
+_NtGdiDeleteColorSpace:
+ movl $0x1078, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiDeleteColorTransform
+_NtGdiDeleteColorTransform:
+ movl $0x1079, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDeleteObjectApp
+_NtGdiDeleteObjectApp:
+ movl $0x107a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiDescribePixelFormat
+_NtGdiDescribePixelFormat:
+ movl $0x107b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiGetPerBandInfo
+_NtGdiGetPerBandInfo:
+ movl $0x107c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDoBanding
+_NtGdiDoBanding:
+ movl $0x107d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiDoPalette
+_NtGdiDoPalette:
+ movl $0x107e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiDrawEscape
+_NtGdiDrawEscape:
+ movl $0x107f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiEllipse
+_NtGdiEllipse:
+ movl $0x1080, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiEnableEudc
+_NtGdiEnableEudc:
+ movl $0x1081, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiEndDoc
+_NtGdiEndDoc:
+ movl $0x1082, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiEndPage
+_NtGdiEndPage:
+ movl $0x1083, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiEndPath
+_NtGdiEndPath:
+ movl $0x1084, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiEnumFontChunk
+_NtGdiEnumFontChunk:
+ movl $0x1085, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiEnumFontClose
+_NtGdiEnumFontClose:
+ movl $0x1086, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiEnumFontOpen
+_NtGdiEnumFontOpen:
+ movl $0x1087, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtGdiEnumObjects
+_NtGdiEnumObjects:
+ movl $0x1088, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiEqualRgn
+_NtGdiEqualRgn:
+ movl $0x1089, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiEudcLoadUnloadLink
+_NtGdiEudcLoadUnloadLink:
+ movl $0x108a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtGdiExcludeClipRect
+_NtGdiExcludeClipRect:
+ movl $0x108b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiExtCreatePen
+_NtGdiExtCreatePen:
+ movl $0x108c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x2c
+
+.global _NtGdiExtCreateRegion
+_NtGdiExtCreateRegion:
+ movl $0x108d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiExtEscape
+_NtGdiExtEscape:
+ movl $0x108e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtGdiExtFloodFill
+_NtGdiExtFloodFill:
+ movl $0x108f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiExtGetObjectW
+_NtGdiExtGetObjectW:
+ movl $0x1090, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiExtSelectClipRgn
+_NtGdiExtSelectClipRgn:
+ movl $0x1091, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiExtTextOutW
+_NtGdiExtTextOutW:
+ movl $0x1092, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x24
+
+.global _NtGdiFillPath
+_NtGdiFillPath:
+ movl $0x1093, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiFillRgn
+_NtGdiFillRgn:
+ movl $0x1094, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiFlattenPath
+_NtGdiFlattenPath:
+ movl $0x1095, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiFlushUserBatch
+_NtGdiFlushUserBatch:
+ movl $0x1096, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtGdiFlush
+_NtGdiFlush:
+ movl $0x1097, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtGdiForceUFIMapping
+_NtGdiForceUFIMapping:
+ movl $0x1098, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiFrameRgn
+_NtGdiFrameRgn:
+ movl $0x1099, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiFullscreenControl
+_NtGdiFullscreenControl:
+ movl $0x109a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiGetAndSetDCDword
+_NtGdiGetAndSetDCDword:
+ movl $0x109b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiGetAppClipBox
+_NtGdiGetAppClipBox:
+ movl $0x109c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetBitmapBits
+_NtGdiGetBitmapBits:
+ movl $0x109d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetBitmapDimension
+_NtGdiGetBitmapDimension:
+ movl $0x109e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetBoundsRect
+_NtGdiGetBoundsRect:
+ movl $0x109f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetCharABCWidthsW
+_NtGdiGetCharABCWidthsW:
+ movl $0x10a0, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiGetCharacterPlacementW
+_NtGdiGetCharacterPlacementW:
+ movl $0x10a1, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiGetCharSet
+_NtGdiGetCharSet:
+ movl $0x10a2, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiGetCharWidthW
+_NtGdiGetCharWidthW:
+ movl $0x10a3, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiGetCharWidthInfo
+_NtGdiGetCharWidthInfo:
+ movl $0x10a4, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetColorAdjustment
+_NtGdiGetColorAdjustment:
+ movl $0x10a5, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetColorSpaceforBitmap
+_NtGdiGetColorSpaceforBitmap:
+ movl $0x10a6, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiGetDCDword
+_NtGdiGetDCDword:
+ movl $0x10a7, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetDCforBitmap
+_NtGdiGetDCforBitmap:
+ movl $0x10a8, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiGetDCObject
+_NtGdiGetDCObject:
+ movl $0x10a9, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetDCPoint
+_NtGdiGetDCPoint:
+ movl $0x10aa, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetDeviceCaps
+_NtGdiGetDeviceCaps:
+ movl $0x10ab, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetDeviceGammaRamp
+_NtGdiGetDeviceGammaRamp:
+ movl $0x10ac, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetDeviceCapsAll
+_NtGdiGetDeviceCapsAll:
+ movl $0x10ad, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetDIBitsInternal
+_NtGdiGetDIBitsInternal:
+ movl $0x10ae, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x24
+
+.global _NtGdiGetETM
+_NtGdiGetETM:
+ movl $0x10af, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetEudcTimeStampEx
+_NtGdiGetEudcTimeStampEx:
+ movl $0x10b0, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetFontData
+_NtGdiGetFontData:
+ movl $0x10b1, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiGetFontResourceInfoInternalW
+_NtGdiGetFontResourceInfoInternalW:
+ movl $0x10b2, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtGdiGetGlyphIndicesW
+_NtGdiGetGlyphIndicesW:
+ movl $0x10b3, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiGetGlyphIndicesWInternal
+_NtGdiGetGlyphIndicesWInternal:
+ movl $0x10b4, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiGetGlyphOutline
+_NtGdiGetGlyphOutline:
+ movl $0x10b5, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtGdiGetKerningPairs
+_NtGdiGetKerningPairs:
+ movl $0x10b6, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetLinkedUFIs
+_NtGdiGetLinkedUFIs:
+ movl $0x10b7, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetMiterLimit
+_NtGdiGetMiterLimit:
+ movl $0x10b8, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetMonitorID
+_NtGdiGetMonitorID:
+ movl $0x10b9, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetNearestColor
+_NtGdiGetNearestColor:
+ movl $0x10ba, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetNearestPaletteIndex
+_NtGdiGetNearestPaletteIndex:
+ movl $0x10bb, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetObjectBitmapHandle
+_NtGdiGetObjectBitmapHandle:
+ movl $0x10bc, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetOutlineTextMetricsInternalW
+_NtGdiGetOutlineTextMetricsInternalW:
+ movl $0x10bd, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiGetPath
+_NtGdiGetPath:
+ movl $0x10be, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiGetPixel
+_NtGdiGetPixel:
+ movl $0x10bf, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetRandomRgn
+_NtGdiGetRandomRgn:
+ movl $0x10c0, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetRasterizerCaps
+_NtGdiGetRasterizerCaps:
+ movl $0x10c1, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetRealizationInfo
+_NtGdiGetRealizationInfo:
+ movl $0x10c2, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetRegionData
+_NtGdiGetRegionData:
+ movl $0x10c3, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetRgnBox
+_NtGdiGetRgnBox:
+ movl $0x10c4, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetServerMetaFileBits
+_NtGdiGetServerMetaFileBits:
+ movl $0x10c5, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtGdiGetSpoolMessage
+_NtGdiGetSpoolMessage:
+ movl $0x10c6, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiGetStats
+_NtGdiGetStats:
+ movl $0x10c7, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiGetStockObject
+_NtGdiGetStockObject:
+ movl $0x10c8, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiGetStringBitmapW
+_NtGdiGetStringBitmapW:
+ movl $0x10c9, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiGetSystemPaletteUse
+_NtGdiGetSystemPaletteUse:
+ movl $0x10ca, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiGetTextCharsetInfo
+_NtGdiGetTextCharsetInfo:
+ movl $0x10cb, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetTextExtent
+_NtGdiGetTextExtent:
+ movl $0x10cc, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiGetTextExtentExW
+_NtGdiGetTextExtentExW:
+ movl $0x10cd, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtGdiGetTextFaceW
+_NtGdiGetTextFaceW:
+ movl $0x10ce, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiGetTextMetricsW
+_NtGdiGetTextMetricsW:
+ movl $0x10cf, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetTransform
+_NtGdiGetTransform:
+ movl $0x10d0, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetUFI
+_NtGdiGetUFI:
+ movl $0x10d1, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiGetEmbUFI
+_NtGdiGetEmbUFI:
+ movl $0x10d2, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtGdiGetUFIPathname
+_NtGdiGetUFIPathname:
+ movl $0x10d3, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x28
+
+.global _NtGdiGetEmbedFonts
+_NtGdiGetEmbedFonts:
+ movl $0x10d4, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtGdiChangeGhostFont
+_NtGdiChangeGhostFont:
+ movl $0x10d5, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiAddEmbFontToDC
+_NtGdiAddEmbFontToDC:
+ movl $0x10d6, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetFontUnicodeRanges
+_NtGdiGetFontUnicodeRanges:
+ movl $0x10d7, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetWidthTable
+_NtGdiGetWidthTable:
+ movl $0x10d8, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtGdiGradientFill
+_NtGdiGradientFill:
+ movl $0x10d9, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiHfontCreate
+_NtGdiHfontCreate:
+ movl $0x10da, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiIcmBrushInfo
+_NtGdiIcmBrushInfo:
+ movl $0x10db, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtGdiInit
+_NtGdiInit:
+ movl $0x10dc, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtGdiInitSpool
+_NtGdiInitSpool:
+ movl $0x10dd, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtGdiIntersectClipRect
+_NtGdiIntersectClipRect:
+ movl $0x10de, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiInvertRgn
+_NtGdiInvertRgn:
+ movl $0x10df, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiLineTo
+_NtGdiLineTo:
+ movl $0x10e0, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiMakeFontDir
+_NtGdiMakeFontDir:
+ movl $0x10e1, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiMakeInfoDC
+_NtGdiMakeInfoDC:
+ movl $0x10e2, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiMaskBlt
+_NtGdiMaskBlt:
+ movl $0x10e3, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x34
+
+.global _NtGdiModifyWorldTransform
+_NtGdiModifyWorldTransform:
+ movl $0x10e4, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiMonoBitmap
+_NtGdiMonoBitmap:
+ movl $0x10e5, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiMoveTo
+_NtGdiMoveTo:
+ movl $0x10e6, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiOffsetClipRgn
+_NtGdiOffsetClipRgn:
+ movl $0x10e7, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiOffsetRgn
+_NtGdiOffsetRgn:
+ movl $0x10e8, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiOpenDCW
+_NtGdiOpenDCW:
+ movl $0x10e9, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtGdiPatBlt
+_NtGdiPatBlt:
+ movl $0x10ea, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiPolyPatBlt
+_NtGdiPolyPatBlt:
+ movl $0x10eb, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiPathToRegion
+_NtGdiPathToRegion:
+ movl $0x10ec, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiPlgBlt
+_NtGdiPlgBlt:
+ movl $0x10ed, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x2c
+
+.global _NtGdiPolyDraw
+_NtGdiPolyDraw:
+ movl $0x10ee, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiPolyPolyDraw
+_NtGdiPolyPolyDraw:
+ movl $0x10ef, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiPolyTextOutW
+_NtGdiPolyTextOutW:
+ movl $0x10f0, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiPtInRegion
+_NtGdiPtInRegion:
+ movl $0x10f1, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiPtVisible
+_NtGdiPtVisible:
+ movl $0x10f2, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiQueryFonts
+_NtGdiQueryFonts:
+ movl $0x10f3, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiQueryFontAssocInfo
+_NtGdiQueryFontAssocInfo:
+ movl $0x10f4, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiRectangle
+_NtGdiRectangle:
+ movl $0x10f5, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiRectInRegion
+_NtGdiRectInRegion:
+ movl $0x10f6, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiRectVisible
+_NtGdiRectVisible:
+ movl $0x10f7, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiRemoveFontResourceW
+_NtGdiRemoveFontResourceW:
+ movl $0x10f8, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiRemoveFontMemResourceEx
+_NtGdiRemoveFontMemResourceEx:
+ movl $0x10f9, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiResetDC
+_NtGdiResetDC:
+ movl $0x10fa, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiResizePalette
+_NtGdiResizePalette:
+ movl $0x10fb, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiRestoreDC
+_NtGdiRestoreDC:
+ movl $0x10fc, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiRoundRect
+_NtGdiRoundRect:
+ movl $0x10fd, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtGdiSaveDC
+_NtGdiSaveDC:
+ movl $0x10fe, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiScaleViewportExtEx
+_NtGdiScaleViewportExtEx:
+ movl $0x10ff, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiScaleWindowExtEx
+_NtGdiScaleWindowExtEx:
+ movl $0x1100, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiSelectBitmap
+_NtGdiSelectBitmap:
+ movl $0x1101, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiSelectBrush
+_NtGdiSelectBrush:
+ movl $0x1102, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiSelectClipPath
+_NtGdiSelectClipPath:
+ movl $0x1103, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiSelectFont
+_NtGdiSelectFont:
+ movl $0x1104, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiSelectPen
+_NtGdiSelectPen:
+ movl $0x1105, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiSetBitmapAttributes
+_NtGdiSetBitmapAttributes:
+ movl $0x1106, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiSetBitmapBits
+_NtGdiSetBitmapBits:
+ movl $0x1107, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiSetBitmapDimension
+_NtGdiSetBitmapDimension:
+ movl $0x1108, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiSetBoundsRect
+_NtGdiSetBoundsRect:
+ movl $0x1109, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiSetBrushAttributes
+_NtGdiSetBrushAttributes:
+ movl $0x110a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiSetBrushOrg
+_NtGdiSetBrushOrg:
+ movl $0x110b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiSetColorAdjustment
+_NtGdiSetColorAdjustment:
+ movl $0x110c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiSetColorSpace
+_NtGdiSetColorSpace:
+ movl $0x110d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiSetDeviceGammaRamp
+_NtGdiSetDeviceGammaRamp:
+ movl $0x110e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiSetDIBitsToDeviceInternal
+_NtGdiSetDIBitsToDeviceInternal:
+ movl $0x110f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x40
+
+.global _NtGdiSetFontEnumeration
+_NtGdiSetFontEnumeration:
+ movl $0x1110, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiSetFontXform
+_NtGdiSetFontXform:
+ movl $0x1111, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiSetIcmMode
+_NtGdiSetIcmMode:
+ movl $0x1112, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiSetLinkedUFIs
+_NtGdiSetLinkedUFIs:
+ movl $0x1113, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiSetMagicColors
+_NtGdiSetMagicColors:
+ movl $0x1114, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiSetMetaRgn
+_NtGdiSetMetaRgn:
+ movl $0x1115, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiSetMiterLimit
+_NtGdiSetMiterLimit:
+ movl $0x1116, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetDeviceWidth
+_NtGdiGetDeviceWidth:
+ movl $0x1117, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiMirrorWindowOrg
+_NtGdiMirrorWindowOrg:
+ movl $0x1118, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiSetLayout
+_NtGdiSetLayout:
+ movl $0x1119, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiSetPixel
+_NtGdiSetPixel:
+ movl $0x111a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiSetPixelFormat
+_NtGdiSetPixelFormat:
+ movl $0x111b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiSetRectRgn
+_NtGdiSetRectRgn:
+ movl $0x111c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiSetSystemPaletteUse
+_NtGdiSetSystemPaletteUse:
+ movl $0x111d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiSetTextJustification
+_NtGdiSetTextJustification:
+ movl $0x111e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiSetupPublicCFONT
+_NtGdiSetupPublicCFONT:
+ movl $0x111f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiSetVirtualResolution
+_NtGdiSetVirtualResolution:
+ movl $0x1120, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiSetSizeDevice
+_NtGdiSetSizeDevice:
+ movl $0x1121, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiStartDoc
+_NtGdiStartDoc:
+ movl $0x1122, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiStartPage
+_NtGdiStartPage:
+ movl $0x1123, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiStretchBlt
+_NtGdiStretchBlt:
+ movl $0x1124, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x30
+
+.global _NtGdiStretchDIBitsInternal
+_NtGdiStretchDIBitsInternal:
+ movl $0x1125, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x40
+
+.global _NtGdiStrokeAndFillPath
+_NtGdiStrokeAndFillPath:
+ movl $0x1126, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiStrokePath
+_NtGdiStrokePath:
+ movl $0x1127, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiSwapBuffers
+_NtGdiSwapBuffers:
+ movl $0x1128, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiTransformPoints
+_NtGdiTransformPoints:
+ movl $0x1129, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiTransparentBlt
+_NtGdiTransparentBlt:
+ movl $0x112a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x2c
+
+.global _NtGdiUnloadPrinterDriver
+_NtGdiUnloadPrinterDriver:
+ movl $0x112b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiUnmapMemFont
+_NtGdiUnmapMemFont:
+ movl $0x112c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiUnrealizeObject
+_NtGdiUnrealizeObject:
+ movl $0x112d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiUpdateColors
+_NtGdiUpdateColors:
+ movl $0x112e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiWidenPath
+_NtGdiWidenPath:
+ movl $0x112f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserActivateKeyboardLayout
+_NtUserActivateKeyboardLayout:
+ movl $0x1130, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserAlterWindowStyle
+_NtUserAlterWindowStyle:
+ movl $0x1131, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserAssociateInputContext
+_NtUserAssociateInputContext:
+ movl $0x1132, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserAttachThreadInput
+_NtUserAttachThreadInput:
+ movl $0x1133, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserBeginPaint
+_NtUserBeginPaint:
+ movl $0x1134, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserBitBltSysBmp
+_NtUserBitBltSysBmp:
+ movl $0x1135, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtUserBlockInput
+_NtUserBlockInput:
+ movl $0x1136, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserBuildHimcList
+_NtUserBuildHimcList:
+ movl $0x1137, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserBuildHwndList
+_NtUserBuildHwndList:
+ movl $0x1138, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtUserBuildNameList
+_NtUserBuildNameList:
+ movl $0x1139, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserBuildPropList
+_NtUserBuildPropList:
+ movl $0x113a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserCallHwnd
+_NtUserCallHwnd:
+ movl $0x113b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserCallHwndLock
+_NtUserCallHwndLock:
+ movl $0x113c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserCallHwndOpt
+_NtUserCallHwndOpt:
+ movl $0x113d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserCallHwndParam
+_NtUserCallHwndParam:
+ movl $0x113e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserCallHwndParamLock
+_NtUserCallHwndParamLock:
+ movl $0x113f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserCallMsgFilter
+_NtUserCallMsgFilter:
+ movl $0x1140, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserCallNextHookEx
+_NtUserCallNextHookEx:
+ movl $0x1141, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserCallNoParam
+_NtUserCallNoParam:
+ movl $0x1142, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserCallOneParam
+_NtUserCallOneParam:
+ movl $0x1143, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserCallTwoParam
+_NtUserCallTwoParam:
+ movl $0x1144, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserChangeClipboardChain
+_NtUserChangeClipboardChain:
+ movl $0x1145, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserChangeDisplaySettings
+_NtUserChangeDisplaySettings:
+ movl $0x1146, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserCheckImeHotKey
+_NtUserCheckImeHotKey:
+ movl $0x1147, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserCheckMenuItem
+_NtUserCheckMenuItem:
+ movl $0x1148, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserChildWindowFromPointEx
+_NtUserChildWindowFromPointEx:
+ movl $0x1149, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserClipCursor
+_NtUserClipCursor:
+ movl $0x114a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserCloseClipboard
+_NtUserCloseClipboard:
+ movl $0x114b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserCloseDesktop
+_NtUserCloseDesktop:
+ movl $0x114c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserCloseWindowStation
+_NtUserCloseWindowStation:
+ movl $0x114d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserConsoleControl
+_NtUserConsoleControl:
+ movl $0x114e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserConvertMemHandle
+_NtUserConvertMemHandle:
+ movl $0x114f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserCopyAcceleratorTable
+_NtUserCopyAcceleratorTable:
+ movl $0x1150, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserCountClipboardFormats
+_NtUserCountClipboardFormats:
+ movl $0x1151, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserCreateAcceleratorTable
+_NtUserCreateAcceleratorTable:
+ movl $0x1152, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserCreateCaret
+_NtUserCreateCaret:
+ movl $0x1153, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserCreateDesktop
+_NtUserCreateDesktop:
+ movl $0x1154, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserCreateInputContext
+_NtUserCreateInputContext:
+ movl $0x1155, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserCreateLocalMemHandle
+_NtUserCreateLocalMemHandle:
+ movl $0x1156, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserCreateWindowEx
+_NtUserCreateWindowEx:
+ movl $0x1157, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x3c
+
+.global _NtUserCreateWindowStation
+_NtUserCreateWindowStation:
+ movl $0x1158, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtUserDdeGetQualityOfService
+_NtUserDdeGetQualityOfService:
+ movl $0x1159, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserDdeInitialize
+_NtUserDdeInitialize:
+ movl $0x115a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserDdeSetQualityOfService
+_NtUserDdeSetQualityOfService:
+ movl $0x115b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserDeferWindowPos
+_NtUserDeferWindowPos:
+ movl $0x115c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtUserDefSetText
+_NtUserDefSetText:
+ movl $0x115d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserDeleteMenu
+_NtUserDeleteMenu:
+ movl $0x115e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserDestroyAcceleratorTable
+_NtUserDestroyAcceleratorTable:
+ movl $0x115f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserDestroyCursor
+_NtUserDestroyCursor:
+ movl $0x1160, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserDestroyInputContext
+_NtUserDestroyInputContext:
+ movl $0x1161, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserDestroyMenu
+_NtUserDestroyMenu:
+ movl $0x1162, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserDestroyWindow
+_NtUserDestroyWindow:
+ movl $0x1163, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserDisableThreadIme
+_NtUserDisableThreadIme:
+ movl $0x1164, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserDispatchMessage
+_NtUserDispatchMessage:
+ movl $0x1165, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserDragDetect
+_NtUserDragDetect:
+ movl $0x1166, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserDragObject
+_NtUserDragObject:
+ movl $0x1167, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserDrawAnimatedRects
+_NtUserDrawAnimatedRects:
+ movl $0x1168, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserDrawCaption
+_NtUserDrawCaption:
+ movl $0x1169, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserDrawCaptionTemp
+_NtUserDrawCaptionTemp:
+ movl $0x116a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtUserDrawIconEx
+_NtUserDrawIconEx:
+ movl $0x116b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x2c
+
+.global _NtUserDrawMenuBarTemp
+_NtUserDrawMenuBarTemp:
+ movl $0x116c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserEmptyClipboard
+_NtUserEmptyClipboard:
+ movl $0x116d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserEnableMenuItem
+_NtUserEnableMenuItem:
+ movl $0x116e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserEnableScrollBar
+_NtUserEnableScrollBar:
+ movl $0x116f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserEndDeferWindowPosEx
+_NtUserEndDeferWindowPosEx:
+ movl $0x1170, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserEndMenu
+_NtUserEndMenu:
+ movl $0x1171, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserEndPaint
+_NtUserEndPaint:
+ movl $0x1172, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserEnumDisplayDevices
+_NtUserEnumDisplayDevices:
+ movl $0x1173, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserEnumDisplayMonitors
+_NtUserEnumDisplayMonitors:
+ movl $0x1174, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserEnumDisplaySettings
+_NtUserEnumDisplaySettings:
+ movl $0x1175, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserEvent
+_NtUserEvent:
+ movl $0x1176, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserExcludeUpdateRgn
+_NtUserExcludeUpdateRgn:
+ movl $0x1177, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserFillWindow
+_NtUserFillWindow:
+ movl $0x1178, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserFindExistingCursorIcon
+_NtUserFindExistingCursorIcon:
+ movl $0x1179, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserFindWindowEx
+_NtUserFindWindowEx:
+ movl $0x117a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserFlashWindowEx
+_NtUserFlashWindowEx:
+ movl $0x117b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserGetAltTabInfo
+_NtUserGetAltTabInfo:
+ movl $0x117c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtUserGetAncestor
+_NtUserGetAncestor:
+ movl $0x117d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetAppImeLevel
+_NtUserGetAppImeLevel:
+ movl $0x117e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserGetAsyncKeyState
+_NtUserGetAsyncKeyState:
+ movl $0x117f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserGetAtomName
+_NtUserGetAtomName:
+ movl $0x1180, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetCaretBlinkTime
+_NtUserGetCaretBlinkTime:
+ movl $0x1181, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserGetCaretPos
+_NtUserGetCaretPos:
+ movl $0x1182, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserGetClassInfo
+_NtUserGetClassInfo:
+ movl $0x1183, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserGetClassName
+_NtUserGetClassName:
+ movl $0x1184, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetClipboardData
+_NtUserGetClipboardData:
+ movl $0x1185, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetClipboardFormatName
+_NtUserGetClipboardFormatName:
+ movl $0x1186, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetClipboardOwner
+_NtUserGetClipboardOwner:
+ movl $0x1187, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserGetClipboardSequenceNumber
+_NtUserGetClipboardSequenceNumber:
+ movl $0x1188, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserGetClipboardViewer
+_NtUserGetClipboardViewer:
+ movl $0x1189, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserGetClipCursor
+_NtUserGetClipCursor:
+ movl $0x118a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserGetComboBoxInfo
+_NtUserGetComboBoxInfo:
+ movl $0x118b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetControlBrush
+_NtUserGetControlBrush:
+ movl $0x118c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetControlColor
+_NtUserGetControlColor:
+ movl $0x118d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserGetCPD
+_NtUserGetCPD:
+ movl $0x118e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetCursorFrameInfo
+_NtUserGetCursorFrameInfo:
+ movl $0x118f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserGetCursorInfo
+_NtUserGetCursorInfo:
+ movl $0x1190, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserGetDC
+_NtUserGetDC:
+ movl $0x1191, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserGetDCEx
+_NtUserGetDCEx:
+ movl $0x1192, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetDoubleClickTime
+_NtUserGetDoubleClickTime:
+ movl $0x1193, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserGetForegroundWindow
+_NtUserGetForegroundWindow:
+ movl $0x1194, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserGetGuiResources
+_NtUserGetGuiResources:
+ movl $0x1195, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetGUIThreadInfo
+_NtUserGetGUIThreadInfo:
+ movl $0x1196, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetIconInfo
+_NtUserGetIconInfo:
+ movl $0x1197, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtUserGetIconSize
+_NtUserGetIconSize:
+ movl $0x1198, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserGetImeHotKey
+_NtUserGetImeHotKey:
+ movl $0x1199, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserGetImeInfoEx
+_NtUserGetImeInfoEx:
+ movl $0x119a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetInternalWindowPos
+_NtUserGetInternalWindowPos:
+ movl $0x119b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetKeyboardLayoutList
+_NtUserGetKeyboardLayoutList:
+ movl $0x119c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetKeyboardLayoutName
+_NtUserGetKeyboardLayoutName:
+ movl $0x119d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserGetKeyboardState
+_NtUserGetKeyboardState:
+ movl $0x119e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserGetKeyNameText
+_NtUserGetKeyNameText:
+ movl $0x119f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetKeyState
+_NtUserGetKeyState:
+ movl $0x11a0, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserGetListBoxInfo
+_NtUserGetListBoxInfo:
+ movl $0x11a1, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserGetMenuBarInfo
+_NtUserGetMenuBarInfo:
+ movl $0x11a2, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserGetMenuIndex
+_NtUserGetMenuIndex:
+ movl $0x11a3, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetMenuItemRect
+_NtUserGetMenuItemRect:
+ movl $0x11a4, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserGetMessage
+_NtUserGetMessage:
+ movl $0x11a5, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserGetMouseMovePointsEx
+_NtUserGetMouseMovePointsEx:
+ movl $0x11a6, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserGetObjectInformation
+_NtUserGetObjectInformation:
+ movl $0x11a7, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserGetOpenClipboardWindow
+_NtUserGetOpenClipboardWindow:
+ movl $0x11a8, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserGetPriorityClipboardFormat
+_NtUserGetPriorityClipboardFormat:
+ movl $0x11a9, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetProcessWindowStation
+_NtUserGetProcessWindowStation:
+ movl $0x11aa, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserGetRawInputBuffer
+_NtUserGetRawInputBuffer:
+ movl $0x11ab, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetRawInputData
+_NtUserGetRawInputData:
+ movl $0x11ac, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserGetRawInputDeviceInfo
+_NtUserGetRawInputDeviceInfo:
+ movl $0x11ad, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserGetRawInputDeviceList
+_NtUserGetRawInputDeviceList:
+ movl $0x11ae, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetRegisteredRawInputDevices
+_NtUserGetRegisteredRawInputDevices:
+ movl $0x11af, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetScrollBarInfo
+_NtUserGetScrollBarInfo:
+ movl $0x11b0, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetSystemMenu
+_NtUserGetSystemMenu:
+ movl $0x11b1, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetThreadDesktop
+_NtUserGetThreadDesktop:
+ movl $0x11b2, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetThreadState
+_NtUserGetThreadState:
+ movl $0x11b3, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserGetTitleBarInfo
+_NtUserGetTitleBarInfo:
+ movl $0x11b4, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetUpdateRect
+_NtUserGetUpdateRect:
+ movl $0x11b5, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetUpdateRgn
+_NtUserGetUpdateRgn:
+ movl $0x11b6, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetWindowDC
+_NtUserGetWindowDC:
+ movl $0x11b7, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserGetWindowPlacement
+_NtUserGetWindowPlacement:
+ movl $0x11b8, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetWOWClass
+_NtUserGetWOWClass:
+ movl $0x11b9, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserHardErrorControl
+_NtUserHardErrorControl:
+ movl $0x11ba, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserHideCaret
+_NtUserHideCaret:
+ movl $0x11bb, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserHiliteMenuItem
+_NtUserHiliteMenuItem:
+ movl $0x11bc, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserImpersonateDdeClientWindow
+_NtUserImpersonateDdeClientWindow:
+ movl $0x11bd, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserInitialize
+_NtUserInitialize:
+ movl $0x11be, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserInitializeClientPfnArrays
+_NtUserInitializeClientPfnArrays:
+ movl $0x11bf, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserInitTask
+_NtUserInitTask:
+ movl $0x11c0, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x30
+
+.global _NtUserInternalGetWindowText
+_NtUserInternalGetWindowText:
+ movl $0x11c1, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserInvalidateRect
+_NtUserInvalidateRect:
+ movl $0x11c2, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserInvalidateRgn
+_NtUserInvalidateRgn:
+ movl $0x11c3, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserIsClipboardFormatAvailable
+_NtUserIsClipboardFormatAvailable:
+ movl $0x11c4, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserKillTimer
+_NtUserKillTimer:
+ movl $0x11c5, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserLoadKeyboardLayoutEx
+_NtUserLoadKeyboardLayoutEx:
+ movl $0x11c6, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtUserLockWindowStation
+_NtUserLockWindowStation:
+ movl $0x11c7, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserLockWindowUpdate
+_NtUserLockWindowUpdate:
+ movl $0x11c8, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserLockWorkStation
+_NtUserLockWorkStation:
+ movl $0x11c9, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserMapVirtualKeyEx
+_NtUserMapVirtualKeyEx:
+ movl $0x11ca, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserMenuItemFromPoint
+_NtUserMenuItemFromPoint:
+ movl $0x11cb, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserMessageCall
+_NtUserMessageCall:
+ movl $0x11cc, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtUserMinMaximize
+_NtUserMinMaximize:
+ movl $0x11cd, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserMNDragLeave
+_NtUserMNDragLeave:
+ movl $0x11ce, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserMNDragOver
+_NtUserMNDragOver:
+ movl $0x11cf, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserModifyUserStartupInfoFlags
+_NtUserModifyUserStartupInfoFlags:
+ movl $0x11d0, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserMoveWindow
+_NtUserMoveWindow:
+ movl $0x11d1, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtUserNotifyIMEStatus
+_NtUserNotifyIMEStatus:
+ movl $0x11d2, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserNotifyProcessCreate
+_NtUserNotifyProcessCreate:
+ movl $0x11d3, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserNotifyWinEvent
+_NtUserNotifyWinEvent:
+ movl $0x11d4, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserOpenClipboard
+_NtUserOpenClipboard:
+ movl $0x11d5, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserOpenDesktop
+_NtUserOpenDesktop:
+ movl $0x11d6, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserOpenInputDesktop
+_NtUserOpenInputDesktop:
+ movl $0x11d7, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserOpenWindowStation
+_NtUserOpenWindowStation:
+ movl $0x11d8, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserPaintDesktop
+_NtUserPaintDesktop:
+ movl $0x11d9, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserPeekMessage
+_NtUserPeekMessage:
+ movl $0x11da, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserPostMessage
+_NtUserPostMessage:
+ movl $0x11db, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserPostThreadMessage
+_NtUserPostThreadMessage:
+ movl $0x11dc, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserPrintWindow
+_NtUserPrintWindow:
+ movl $0x11dd, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserProcessConnect
+_NtUserProcessConnect:
+ movl $0x11de, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserQueryInformationThread
+_NtUserQueryInformationThread:
+ movl $0x11df, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserQueryInputContext
+_NtUserQueryInputContext:
+ movl $0x11e0, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserQuerySendMessage
+_NtUserQuerySendMessage:
+ movl $0x11e1, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserQueryUserCounters
+_NtUserQueryUserCounters:
+ movl $0x11e2, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserQueryWindow
+_NtUserQueryWindow:
+ movl $0x11e3, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserRealChildWindowFromPoint
+_NtUserRealChildWindowFromPoint:
+ movl $0x11e4, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserRealInternalGetMessage
+_NtUserRealInternalGetMessage:
+ movl $0x11e5, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtUserRealWaitMessageEx
+_NtUserRealWaitMessageEx:
+ movl $0x11e6, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserRedrawWindow
+_NtUserRedrawWindow:
+ movl $0x11e7, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserRegisterClassExWOW
+_NtUserRegisterClassExWOW:
+ movl $0x11e8, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtUserRegisterUserApiHook
+_NtUserRegisterUserApiHook:
+ movl $0x11e9, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserRegisterHotKey
+_NtUserRegisterHotKey:
+ movl $0x11ea, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserRegisterRawInputDevices
+_NtUserRegisterRawInputDevices:
+ movl $0x11eb, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserRegisterTasklist
+_NtUserRegisterTasklist:
+ movl $0x11ec, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserRegisterWindowMessage
+_NtUserRegisterWindowMessage:
+ movl $0x11ed, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserRemoveMenu
+_NtUserRemoveMenu:
+ movl $0x11ee, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserRemoveProp
+_NtUserRemoveProp:
+ movl $0x11ef, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserResolveDesktop
+_NtUserResolveDesktop:
+ movl $0x11f0, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserResolveDesktopForWOW
+_NtUserResolveDesktopForWOW:
+ movl $0x11f1, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserSBGetParms
+_NtUserSBGetParms:
+ movl $0x11f2, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserScrollDC
+_NtUserScrollDC:
+ movl $0x11f3, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtUserScrollWindowEx
+_NtUserScrollWindowEx:
+ movl $0x11f4, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtUserSelectPalette
+_NtUserSelectPalette:
+ movl $0x11f5, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserSendInput
+_NtUserSendInput:
+ movl $0x11f6, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserSetActiveWindow
+_NtUserSetActiveWindow:
+ movl $0x11f7, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserSetAppImeLevel
+_NtUserSetAppImeLevel:
+ movl $0x11f8, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetCapture
+_NtUserSetCapture:
+ movl $0x11f9, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserSetClassLong
+_NtUserSetClassLong:
+ movl $0x11fa, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserSetClassWord
+_NtUserSetClassWord:
+ movl $0x11fb, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserSetClipboardData
+_NtUserSetClipboardData:
+ movl $0x11fc, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserSetClipboardViewer
+_NtUserSetClipboardViewer:
+ movl $0x11fd, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserSetConsoleReserveKeys
+_NtUserSetConsoleReserveKeys:
+ movl $0x11fe, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetCursor
+_NtUserSetCursor:
+ movl $0x11ff, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserSetCursorContents
+_NtUserSetCursorContents:
+ movl $0x1200, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetCursorIconData
+_NtUserSetCursorIconData:
+ movl $0x1201, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtUserSetDbgTag
+_NtUserSetDbgTag:
+ movl $0x1202, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetFocus
+_NtUserSetFocus:
+ movl $0x1203, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserSetImeHotKey
+_NtUserSetImeHotKey:
+ movl $0x1204, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserSetImeInfoEx
+_NtUserSetImeInfoEx:
+ movl $0x1205, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserSetImeOwnerWindow
+_NtUserSetImeOwnerWindow:
+ movl $0x1206, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetInformationProcess
+_NtUserSetInformationProcess:
+ movl $0x1207, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserSetInformationThread
+_NtUserSetInformationThread:
+ movl $0x1208, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserSetInternalWindowPos
+_NtUserSetInternalWindowPos:
+ movl $0x1209, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserSetKeyboardState
+_NtUserSetKeyboardState:
+ movl $0x120a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserSetLogonNotifyWindow
+_NtUserSetLogonNotifyWindow:
+ movl $0x120b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserSetMenu
+_NtUserSetMenu:
+ movl $0x120c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserSetMenuContextHelpId
+_NtUserSetMenuContextHelpId:
+ movl $0x120d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetMenuDefaultItem
+_NtUserSetMenuDefaultItem:
+ movl $0x120e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserSetMenuFlagRtoL
+_NtUserSetMenuFlagRtoL:
+ movl $0x120f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserSetObjectInformation
+_NtUserSetObjectInformation:
+ movl $0x1210, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserSetParent
+_NtUserSetParent:
+ movl $0x1211, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetProcessWindowStation
+_NtUserSetProcessWindowStation:
+ movl $0x1212, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserSetProp
+_NtUserSetProp:
+ movl $0x1213, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserSetRipFlags
+_NtUserSetRipFlags:
+ movl $0x1214, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetScrollInfo
+_NtUserSetScrollInfo:
+ movl $0x1215, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserSetShellWindowEx
+_NtUserSetShellWindowEx:
+ movl $0x1216, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetSysColors
+_NtUserSetSysColors:
+ movl $0x1217, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserSetSystemCursor
+_NtUserSetSystemCursor:
+ movl $0x1218, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetSystemMenu
+_NtUserSetSystemMenu:
+ movl $0x1219, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetSystemTimer
+_NtUserSetSystemTimer:
+ movl $0x121a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserSetThreadDesktop
+_NtUserSetThreadDesktop:
+ movl $0x121b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserSetThreadLayoutHandles
+_NtUserSetThreadLayoutHandles:
+ movl $0x121c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetThreadState
+_NtUserSetThreadState:
+ movl $0x121d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetTimer
+_NtUserSetTimer:
+ movl $0x121e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserSetWindowFNID
+_NtUserSetWindowFNID:
+ movl $0x121f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetWindowLong
+_NtUserSetWindowLong:
+ movl $0x1220, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserSetWindowPlacement
+_NtUserSetWindowPlacement:
+ movl $0x1221, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetWindowPos
+_NtUserSetWindowPos:
+ movl $0x1222, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtUserSetWindowRgn
+_NtUserSetWindowRgn:
+ movl $0x1223, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserSetWindowsHookAW
+_NtUserSetWindowsHookAW:
+ movl $0x1224, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserSetWindowsHookEx
+_NtUserSetWindowsHookEx:
+ movl $0x1225, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtUserSetWindowStationUser
+_NtUserSetWindowStationUser:
+ movl $0x1226, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserSetWindowWord
+_NtUserSetWindowWord:
+ movl $0x1227, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserSetWinEventHook
+_NtUserSetWinEventHook:
+ movl $0x1228, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtUserShowCaret
+_NtUserShowCaret:
+ movl $0x1229, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserShowScrollBar
+_NtUserShowScrollBar:
+ movl $0x122a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserShowWindow
+_NtUserShowWindow:
+ movl $0x122b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserShowWindowAsync
+_NtUserShowWindowAsync:
+ movl $0x122c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSoundSentry
+_NtUserSoundSentry:
+ movl $0x122d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserSwitchDesktop
+_NtUserSwitchDesktop:
+ movl $0x122e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserSystemParametersInfo
+_NtUserSystemParametersInfo:
+ movl $0x122f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserTestForInteractiveUser
+_NtUserTestForInteractiveUser:
+ movl $0x1230, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserThunkedMenuInfo
+_NtUserThunkedMenuInfo:
+ movl $0x1231, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserThunkedMenuItemInfo
+_NtUserThunkedMenuItemInfo:
+ movl $0x1232, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtUserToUnicodeEx
+_NtUserToUnicodeEx:
+ movl $0x1233, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtUserTrackMouseEvent
+_NtUserTrackMouseEvent:
+ movl $0x1234, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserTrackPopupMenuEx
+_NtUserTrackPopupMenuEx:
+ movl $0x1235, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtUserCalcMenuBar
+_NtUserCalcMenuBar:
+ movl $0x1236, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserPaintMenuBar
+_NtUserPaintMenuBar:
+ movl $0x1237, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtUserTranslateAccelerator
+_NtUserTranslateAccelerator:
+ movl $0x1238, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserTranslateMessage
+_NtUserTranslateMessage:
+ movl $0x1239, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserUnhookWindowsHookEx
+_NtUserUnhookWindowsHookEx:
+ movl $0x123a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserUnhookWinEvent
+_NtUserUnhookWinEvent:
+ movl $0x123b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserUnloadKeyboardLayout
+_NtUserUnloadKeyboardLayout:
+ movl $0x123c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserUnlockWindowStation
+_NtUserUnlockWindowStation:
+ movl $0x123d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserUnregisterClass
+_NtUserUnregisterClass:
+ movl $0x123e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserUnregisterUserApiHook
+_NtUserUnregisterUserApiHook:
+ movl $0x123f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserUnregisterHotKey
+_NtUserUnregisterHotKey:
+ movl $0x1240, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserUpdateInputContext
+_NtUserUpdateInputContext:
+ movl $0x1241, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserUpdateInstance
+_NtUserUpdateInstance:
+ movl $0x1242, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserUpdateLayeredWindow
+_NtUserUpdateLayeredWindow:
+ movl $0x1243, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x28
+
+.global _NtUserGetLayeredWindowAttributes
+_NtUserGetLayeredWindowAttributes:
+ movl $0x1244, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserSetLayeredWindowAttributes
+_NtUserSetLayeredWindowAttributes:
+ movl $0x1245, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserUpdatePerUserSystemParameters
+_NtUserUpdatePerUserSystemParameters:
+ movl $0x1246, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserUserHandleGrantAccess
+_NtUserUserHandleGrantAccess:
+ movl $0x1247, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserValidateHandleSecure
+_NtUserValidateHandleSecure:
+ movl $0x1248, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserValidateRect
+_NtUserValidateRect:
+ movl $0x1249, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserValidateTimerCallback
+_NtUserValidateTimerCallback:
+ movl $0x124a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserVkKeyScanEx
+_NtUserVkKeyScanEx:
+ movl $0x124b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserWaitForInputIdle
+_NtUserWaitForInputIdle:
+ movl $0x124c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserWaitForMsgAndEvent
+_NtUserWaitForMsgAndEvent:
+ movl $0x124d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserWaitMessage
+_NtUserWaitMessage:
+ movl $0x124e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserWin32PoolAllocationStats
+_NtUserWin32PoolAllocationStats:
+ movl $0x124f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtUserWindowFromPhysicalPoint
+_NtUserWindowFromPhysicalPoint:
+ movl $0x1250, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserWindowFromPoint
+_NtUserWindowFromPoint:
+ movl $0x1251, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserYieldTask
+_NtUserYieldTask:
+ movl $0x1252, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserRemoteConnect
+_NtUserRemoteConnect:
+ movl $0x1253, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserRemoteRedrawRectangle
+_NtUserRemoteRedrawRectangle:
+ movl $0x1254, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserRemoteRedrawScreen
+_NtUserRemoteRedrawScreen:
+ movl $0x1255, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserRemoteStopScreenUpdates
+_NtUserRemoteStopScreenUpdates:
+ movl $0x1256, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserCtxDisplayIOCtl
+_NtUserCtxDisplayIOCtl:
+ movl $0x1257, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiEngAssociateSurface
+_NtGdiEngAssociateSurface:
+ movl $0x1258, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiEngCreateBitmap
+_NtGdiEngCreateBitmap:
+ movl $0x1259, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiEngCreateDeviceSurface
+_NtGdiEngCreateDeviceSurface:
+ movl $0x125a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiEngCreateDeviceBitmap
+_NtGdiEngCreateDeviceBitmap:
+ movl $0x125b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiEngCreatePalette
+_NtGdiEngCreatePalette:
+ movl $0x125c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiEngComputeGlyphSet
+_NtGdiEngComputeGlyphSet:
+ movl $0x125d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiEngCopyBits
+_NtGdiEngCopyBits:
+ movl $0x125e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiEngDeletePalette
+_NtGdiEngDeletePalette:
+ movl $0x125f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiEngDeleteSurface
+_NtGdiEngDeleteSurface:
+ movl $0x1260, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiEngEraseSurface
+_NtGdiEngEraseSurface:
+ movl $0x1261, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiEngUnlockSurface
+_NtGdiEngUnlockSurface:
+ movl $0x1262, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiEngLockSurface
+_NtGdiEngLockSurface:
+ movl $0x1263, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiEngBitBlt
+_NtGdiEngBitBlt:
+ movl $0x1264, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x2c
+
+.global _NtGdiEngStretchBlt
+_NtGdiEngStretchBlt:
+ movl $0x1265, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x2c
+
+.global _NtGdiEngPlgBlt
+_NtGdiEngPlgBlt:
+ movl $0x1266, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x2c
+
+.global _NtGdiEngMarkBandingSurface
+_NtGdiEngMarkBandingSurface:
+ movl $0x1267, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiEngStrokePath
+_NtGdiEngStrokePath:
+ movl $0x1268, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtGdiEngFillPath
+_NtGdiEngFillPath:
+ movl $0x1269, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtGdiEngStrokeAndFillPath
+_NtGdiEngStrokeAndFillPath:
+ movl $0x126a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x28
+
+.global _NtGdiEngPaint
+_NtGdiEngPaint:
+ movl $0x126b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiEngLineTo
+_NtGdiEngLineTo:
+ movl $0x126c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x24
+
+.global _NtGdiEngAlphaBlend
+_NtGdiEngAlphaBlend:
+ movl $0x126d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtGdiEngGradientFill
+_NtGdiEngGradientFill:
+ movl $0x126e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x28
+
+.global _NtGdiEngTransparentBlt
+_NtGdiEngTransparentBlt:
+ movl $0x126f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtGdiEngTextOut
+_NtGdiEngTextOut:
+ movl $0x1270, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x28
+
+.global _NtGdiEngStretchBltROP
+_NtGdiEngStretchBltROP:
+ movl $0x1271, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x34
+
+.global _NtGdiXLATEOBJ_cGetPalette
+_NtGdiXLATEOBJ_cGetPalette:
+ movl $0x1272, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiXLATEOBJ_iXlate
+_NtGdiXLATEOBJ_iXlate:
+ movl $0x1273, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiXLATEOBJ_hGetColorTransform
+_NtGdiXLATEOBJ_hGetColorTransform:
+ movl $0x1274, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiCLIPOBJ_bEnum
+_NtGdiCLIPOBJ_bEnum:
+ movl $0x1275, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiCLIPOBJ_cEnumStart
+_NtGdiCLIPOBJ_cEnumStart:
+ movl $0x1276, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiCLIPOBJ_ppoGetPath
+_NtGdiCLIPOBJ_ppoGetPath:
+ movl $0x1277, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiEngDeletePath
+_NtGdiEngDeletePath:
+ movl $0x1278, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiEngCreateClip
+_NtGdiEngCreateClip:
+ movl $0x1279, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtGdiEngDeleteClip
+_NtGdiEngDeleteClip:
+ movl $0x127a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiBRUSHOBJ_ulGetBrushColor
+_NtGdiBRUSHOBJ_ulGetBrushColor:
+ movl $0x127b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiBRUSHOBJ_pvAllocRbrush
+_NtGdiBRUSHOBJ_pvAllocRbrush:
+ movl $0x127c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiBRUSHOBJ_pvGetRbrush
+_NtGdiBRUSHOBJ_pvGetRbrush:
+ movl $0x127d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiBRUSHOBJ_hGetColorTransform
+_NtGdiBRUSHOBJ_hGetColorTransform:
+ movl $0x127e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiXFORMOBJ_bApplyXform
+_NtGdiXFORMOBJ_bApplyXform:
+ movl $0x127f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiXFORMOBJ_iGetXform
+_NtGdiXFORMOBJ_iGetXform:
+ movl $0x1280, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiFONTOBJ_vGetInfo
+_NtGdiFONTOBJ_vGetInfo:
+ movl $0x1281, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiFONTOBJ_pxoGetXform
+_NtGdiFONTOBJ_pxoGetXform:
+ movl $0x1282, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiFONTOBJ_cGetGlyphs
+_NtGdiFONTOBJ_cGetGlyphs:
+ movl $0x1283, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiFONTOBJ_pifi
+_NtGdiFONTOBJ_pifi:
+ movl $0x1284, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiFONTOBJ_pfdg
+_NtGdiFONTOBJ_pfdg:
+ movl $0x1285, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiFONTOBJ_pQueryGlyphAttrs
+_NtGdiFONTOBJ_pQueryGlyphAttrs:
+ movl $0x1286, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiFONTOBJ_pvTrueTypeFontFile
+_NtGdiFONTOBJ_pvTrueTypeFontFile:
+ movl $0x1287, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiFONTOBJ_cGetAllGlyphHandles
+_NtGdiFONTOBJ_cGetAllGlyphHandles:
+ movl $0x1288, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiSTROBJ_bEnum
+_NtGdiSTROBJ_bEnum:
+ movl $0x1289, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiSTROBJ_bEnumPositionsOnly
+_NtGdiSTROBJ_bEnumPositionsOnly:
+ movl $0x128a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiSTROBJ_bGetAdvanceWidths
+_NtGdiSTROBJ_bGetAdvanceWidths:
+ movl $0x128b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiSTROBJ_vEnumStart
+_NtGdiSTROBJ_vEnumStart:
+ movl $0x128c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiSTROBJ_dwGetCodePage
+_NtGdiSTROBJ_dwGetCodePage:
+ movl $0x128d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiPATHOBJ_vGetBounds
+_NtGdiPATHOBJ_vGetBounds:
+ movl $0x128e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiPATHOBJ_bEnum
+_NtGdiPATHOBJ_bEnum:
+ movl $0x128f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiPATHOBJ_vEnumStart
+_NtGdiPATHOBJ_vEnumStart:
+ movl $0x1290, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiPATHOBJ_vEnumStartClipLines
+_NtGdiPATHOBJ_vEnumStartClipLines:
+ movl $0x1291, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiPATHOBJ_bEnumClipLines
+_NtGdiPATHOBJ_bEnumClipLines:
+ movl $0x1292, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetDhpdev
+_NtGdiGetDhpdev:
+ movl $0x1293, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiEngCheckAbort
+_NtGdiEngCheckAbort:
+ movl $0x1294, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiHT_Get8BPPFormatPalette
+_NtGdiHT_Get8BPPFormatPalette:
+ movl $0x1295, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiHT_Get8BPPMaskPalette
+_NtGdiHT_Get8BPPMaskPalette:
+ movl $0x1296, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiUpdateTransform
+_NtGdiUpdateTransform:
+ movl $0x1297, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiSetPUMPDOBJ
+_NtGdiSetPUMPDOBJ:
+ movl $0x1298, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiBRUSHOBJ_DeleteRbrush
+_NtGdiBRUSHOBJ_DeleteRbrush:
+ movl $0x1299, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiUMPDEngFreeUserMem
+_NtGdiUMPDEngFreeUserMem:
+ movl $0x129a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiDrawStream
+_NtGdiDrawStream:
+ movl $0x129b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiSetDIBits
+_NtGdiSetDIBits:
+ movl $0x129c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtGdiSetViewportOrgEx
+_NtGdiSetViewportOrgEx:
+ movl $0x129d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiSetWindowOrgEx
+_NtGdiSetWindowOrgEx:
+ movl $0x129e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiGetFontFamilyInfo
+_NtGdiGetFontFamilyInfo:
+ movl $0x129f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiOffsetViewportOrgEx
+_NtGdiOffsetViewportOrgEx:
+ movl $0x12a0, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiOffsetWindowOrgEx
+_NtGdiOffsetWindowOrgEx:
+ movl $0x12a1, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserBuildMenuItemList
+_NtUserBuildMenuItemList:
+ movl $0x12a2, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserCreateCursorIconHandle
+_NtUserCreateCursorIconHandle:
+ movl $0x12a3, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetClassLong
+_NtUserGetClassLong:
+ movl $0x12a4, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetMenuDefaultItem
+_NtUserGetMenuDefaultItem:
+ movl $0x12a5, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetLastInputInfo
+_NtUserGetLastInputInfo:
+ movl $0x12a6, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserGetMinMaxInfo
+_NtUserGetMinMaxInfo:
+ movl $0x12a7, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetMonitorInfo
+_NtUserGetMonitorInfo:
+ movl $0x12a8, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetScrollInfo
+_NtUserGetScrollInfo:
+ movl $0x12a9, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetWindow
+_NtUserGetWindow:
+ movl $0x12aa, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetWindowLong
+_NtUserGetWindowLong:
+ movl $0x12ab, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserMenuInfo
+_NtUserMenuInfo:
+ movl $0x12ac, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserMenuItemInfo
+_NtUserMenuItemInfo:
+ movl $0x12ad, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserMonitorFromPoint
+_NtUserMonitorFromPoint:
+ movl $0x12ae, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserMonitorFromRect
+_NtUserMonitorFromRect:
+ movl $0x12af, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserMonitorFromWindow
+_NtUserMonitorFromWindow:
+ movl $0x12b0, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSendMessage
+_NtUserSendMessage:
+ movl $0x12b1, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserSendMessageTimeout
+_NtUserSendMessageTimeout:
+ movl $0x12b2, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtUserSetScrollBarInfo
+_NtUserSetScrollBarInfo:
+ movl $0x12b3, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
--- /dev/null
+; $Id: w32kdll.def 27344 2007-08-01 14:12:10Z tkreuzer $
+;
+; ReactOS Operating System
+;
+; This file contains all win32k native api functions from win xp
+; unsupported functions are commented out.
+;
+LIBRARY w32kdll.dll
+
+EXPORTS
+NtGdiAbortDoc
+NtGdiAbortPath
+NtGdiAddFontResourceW
+NtGdiAddRemoteFontToDC
+NtGdiAddFontMemResourceEx
+NtGdiRemoveMergeFont
+NtGdiAddRemoteMMInstanceToDC
+NtGdiAlphaBlend
+NtGdiAngleArc
+NtGdiAnyLinkedFonts
+NtGdiFontIsLinked
+NtGdiArcInternal
+NtGdiBeginPath
+NtGdiBitBlt
+NtGdiCancelDC
+NtGdiCheckBitmapBits
+NtGdiCloseFigure
+NtGdiClearBitmapAttributes
+NtGdiClearBrushAttributes
+NtGdiColorCorrectPalette
+NtGdiCombineRgn
+NtGdiCombineTransform
+NtGdiComputeXformCoefficients
+NtGdiConsoleTextOut
+NtGdiConvertMetafileRect
+NtGdiCreateBitmap
+NtGdiCreateClientObj
+NtGdiCreateColorSpace
+NtGdiCreateColorTransform
+NtGdiCreateCompatibleBitmap
+NtGdiCreateCompatibleDC
+NtGdiCreateDIBBrush
+NtGdiCreateDIBitmapInternal
+NtGdiCreateDIBSection
+NtGdiCreateEllipticRgn
+NtGdiCreateHalftonePalette
+NtGdiCreateHatchBrushInternal
+NtGdiCreateMetafileDC
+NtGdiCreatePaletteInternal
+NtGdiCreatePatternBrushInternal
+NtGdiCreatePen
+NtGdiCreateRectRgn
+NtGdiCreateRoundRectRgn
+NtGdiCreateServerMetaFile
+NtGdiCreateSolidBrush
+NtGdiD3dContextCreate
+NtGdiD3dContextDestroy
+NtGdiD3dContextDestroyAll
+NtGdiD3dValidateTextureStageState
+NtGdiD3dDrawPrimitives2
+NtGdiDdGetDriverState
+NtGdiDdAddAttachedSurface
+NtGdiDdAlphaBlt
+NtGdiDdAttachSurface
+NtGdiDdBeginMoCompFrame
+NtGdiDdBlt
+NtGdiDdCanCreateSurface
+NtGdiDdCanCreateD3DBuffer
+NtGdiDdColorControl
+NtGdiDdCreateDirectDrawObject
+NtGdiDdCreateSurface
+NtGdiDdCreateD3DBuffer
+NtGdiDdCreateMoComp
+NtGdiDdCreateSurfaceObject
+NtGdiDdDeleteDirectDrawObject
+NtGdiDdDeleteSurfaceObject
+NtGdiDdDestroyMoComp
+NtGdiDdDestroySurface
+NtGdiDdDestroyD3DBuffer
+NtGdiDdEndMoCompFrame
+NtGdiDdFlip
+NtGdiDdFlipToGDISurface
+NtGdiDdGetAvailDriverMemory
+NtGdiDdGetBltStatus
+NtGdiDdGetDC
+NtGdiDdGetDriverInfo
+NtGdiDdGetDxHandle
+NtGdiDdGetFlipStatus
+NtGdiDdGetInternalMoCompInfo
+NtGdiDdGetMoCompBuffInfo
+NtGdiDdGetMoCompGuids
+NtGdiDdGetMoCompFormats
+NtGdiDdGetScanLine
+NtGdiDdLock
+NtGdiDdLockD3D
+NtGdiDdQueryDirectDrawObject
+NtGdiDdQueryMoCompStatus
+NtGdiDdReenableDirectDrawObject
+NtGdiDdReleaseDC
+NtGdiDdRenderMoComp
+NtGdiDdResetVisrgn
+NtGdiDdSetColorKey
+NtGdiDdSetExclusiveMode
+NtGdiDdSetGammaRamp
+NtGdiDdCreateSurfaceEx
+NtGdiDdSetOverlayPosition
+NtGdiDdUnattachSurface
+NtGdiDdUnlock
+NtGdiDdUnlockD3D
+NtGdiDdUpdateOverlay
+NtGdiDdWaitForVerticalBlank
+NtGdiDvpCanCreateVideoPort
+NtGdiDvpColorControl
+NtGdiDvpCreateVideoPort
+NtGdiDvpDestroyVideoPort
+NtGdiDvpFlipVideoPort
+NtGdiDvpGetVideoPortBandwidth
+NtGdiDvpGetVideoPortField
+NtGdiDvpGetVideoPortFlipStatus
+NtGdiDvpGetVideoPortInputFormats
+NtGdiDvpGetVideoPortLine
+NtGdiDvpGetVideoPortOutputFormats
+NtGdiDvpGetVideoPortConnectInfo
+NtGdiDvpGetVideoSignalStatus
+NtGdiDvpUpdateVideoPort
+NtGdiDvpWaitForVideoPortSync
+NtGdiDvpAcquireNotification
+NtGdiDvpReleaseNotification
+NtGdiDxgGenericThunk
+NtGdiDeleteClientObj
+NtGdiDeleteColorSpace
+NtGdiDeleteColorTransform
+NtGdiDeleteObjectApp
+NtGdiDescribePixelFormat
+NtGdiGetPerBandInfo
+NtGdiDoBanding
+NtGdiDoPalette
+NtGdiDrawEscape
+NtGdiEllipse
+NtGdiEnableEudc
+NtGdiEndDoc
+NtGdiEndPage
+NtGdiEndPath
+NtGdiEnumFontChunk
+NtGdiEnumFontClose
+NtGdiEnumFontOpen
+NtGdiEnumObjects
+NtGdiEqualRgn
+NtGdiEudcLoadUnloadLink
+NtGdiExcludeClipRect
+NtGdiExtCreatePen
+NtGdiExtCreateRegion
+NtGdiExtEscape
+NtGdiExtFloodFill
+NtGdiExtGetObjectW
+NtGdiExtSelectClipRgn
+NtGdiExtTextOutW
+NtGdiFillPath
+NtGdiFillRgn
+NtGdiFlattenPath
+NtGdiFlushUserBatch
+NtGdiFlush
+NtGdiForceUFIMapping
+NtGdiFrameRgn
+NtGdiFullscreenControl
+NtGdiGetAndSetDCDword
+NtGdiGetAppClipBox
+NtGdiGetBitmapBits
+NtGdiGetBitmapDimension
+NtGdiGetBoundsRect
+NtGdiGetCharABCWidthsW
+NtGdiGetCharacterPlacementW
+NtGdiGetCharSet
+NtGdiGetCharWidthW
+NtGdiGetCharWidthInfo
+NtGdiGetColorAdjustment
+NtGdiGetColorSpaceforBitmap
+NtGdiGetDCDword
+NtGdiGetDCforBitmap
+NtGdiGetDCObject
+NtGdiGetDCPoint
+NtGdiGetDeviceCaps
+NtGdiGetDeviceGammaRamp
+NtGdiGetDeviceCapsAll
+NtGdiGetDIBitsInternal
+NtGdiGetETM
+NtGdiGetEudcTimeStampEx
+NtGdiGetFontData
+NtGdiGetFontResourceInfoInternalW
+NtGdiGetGlyphIndicesW
+NtGdiGetGlyphIndicesWInternal
+NtGdiGetGlyphOutline
+NtGdiGetKerningPairs
+NtGdiGetLinkedUFIs
+NtGdiGetMiterLimit
+NtGdiGetMonitorID
+NtGdiGetNearestColor
+NtGdiGetNearestPaletteIndex
+NtGdiGetObjectBitmapHandle
+NtGdiGetOutlineTextMetricsInternalW
+NtGdiGetPath
+NtGdiGetPixel
+NtGdiGetRandomRgn
+NtGdiGetRasterizerCaps
+NtGdiGetRealizationInfo
+NtGdiGetRegionData
+NtGdiGetRgnBox
+NtGdiGetServerMetaFileBits
+NtGdiGetSpoolMessage
+NtGdiGetStats
+NtGdiGetStockObject
+NtGdiGetStringBitmapW
+NtGdiGetSystemPaletteUse
+NtGdiGetTextCharsetInfo
+NtGdiGetTextExtent
+NtGdiGetTextExtentExW
+NtGdiGetTextFaceW
+NtGdiGetTextMetricsW
+NtGdiGetTransform
+NtGdiGetUFI
+NtGdiGetEmbUFI
+NtGdiGetUFIPathname
+NtGdiGetEmbedFonts
+NtGdiChangeGhostFont
+NtGdiAddEmbFontToDC
+NtGdiGetFontUnicodeRanges
+NtGdiGetWidthTable
+NtGdiGradientFill
+NtGdiHfontCreate
+NtGdiIcmBrushInfo
+NtGdiInit
+NtGdiInitSpool
+NtGdiIntersectClipRect
+NtGdiInvertRgn
+NtGdiLineTo
+NtGdiMakeFontDir
+NtGdiMakeInfoDC
+NtGdiMaskBlt
+NtGdiModifyWorldTransform
+NtGdiMonoBitmap
+NtGdiMoveTo
+NtGdiOffsetClipRgn
+NtGdiOffsetRgn
+NtGdiOpenDCW
+NtGdiPatBlt
+NtGdiPolyPatBlt
+NtGdiPathToRegion
+NtGdiPlgBlt
+NtGdiPolyDraw
+NtGdiPolyPolyDraw
+NtGdiPolyTextOutW
+NtGdiPtInRegion
+NtGdiPtVisible
+NtGdiQueryFonts
+NtGdiQueryFontAssocInfo
+NtGdiRectangle
+NtGdiRectInRegion
+NtGdiRectVisible
+NtGdiRemoveFontResourceW
+NtGdiRemoveFontMemResourceEx
+NtGdiResetDC
+NtGdiResizePalette
+NtGdiRestoreDC
+NtGdiRoundRect
+NtGdiSaveDC
+NtGdiScaleViewportExtEx
+NtGdiScaleWindowExtEx
+NtGdiSelectBitmap
+NtGdiSelectBrush
+NtGdiSelectClipPath
+NtGdiSelectFont
+NtGdiSelectPen
+NtGdiSetBitmapAttributes
+NtGdiSetBitmapBits
+NtGdiSetBitmapDimension
+NtGdiSetBoundsRect
+NtGdiSetBrushAttributes
+NtGdiSetBrushOrg
+NtGdiSetColorAdjustment
+NtGdiSetColorSpace
+NtGdiSetDeviceGammaRamp
+NtGdiSetDIBitsToDeviceInternal
+NtGdiSetFontEnumeration
+NtGdiSetFontXform
+NtGdiSetIcmMode
+NtGdiSetLinkedUFIs
+NtGdiSetMagicColors
+NtGdiSetMetaRgn
+NtGdiSetMiterLimit
+NtGdiGetDeviceWidth
+NtGdiMirrorWindowOrg
+NtGdiSetLayout
+NtGdiSetPixel
+NtGdiSetPixelFormat
+NtGdiSetRectRgn
+NtGdiSetSystemPaletteUse
+NtGdiSetTextJustification
+NtGdiSetupPublicCFONT
+NtGdiSetVirtualResolution
+NtGdiSetSizeDevice
+NtGdiStartDoc
+NtGdiStartPage
+NtGdiStretchBlt
+NtGdiStretchDIBitsInternal
+NtGdiStrokeAndFillPath
+NtGdiStrokePath
+NtGdiSwapBuffers
+NtGdiTransformPoints
+NtGdiTransparentBlt
+NtGdiUnloadPrinterDriver
+NtGdiUnmapMemFont
+NtGdiUnrealizeObject
+NtGdiUpdateColors
+NtGdiWidenPath
+NtUserActivateKeyboardLayout
+NtUserAlterWindowStyle
+NtUserAssociateInputContext
+NtUserAttachThreadInput
+NtUserBeginPaint
+NtUserBitBltSysBmp
+NtUserBlockInput
+NtUserBuildHimcList
+NtUserBuildHwndList
+NtUserBuildNameList
+NtUserBuildPropList
+NtUserCallHwnd
+NtUserCallHwndLock
+NtUserCallHwndOpt
+NtUserCallHwndParam
+NtUserCallHwndParamLock
+NtUserCallMsgFilter
+NtUserCallNextHookEx
+NtUserCallNoParam
+NtUserCallOneParam
+NtUserCallTwoParam
+NtUserChangeClipboardChain
+NtUserChangeDisplaySettings
+NtUserCheckImeHotKey
+NtUserCheckMenuItem
+NtUserChildWindowFromPointEx
+NtUserClipCursor
+NtUserCloseClipboard
+NtUserCloseDesktop
+NtUserCloseWindowStation
+NtUserConsoleControl
+NtUserConvertMemHandle
+NtUserCopyAcceleratorTable
+NtUserCountClipboardFormats
+NtUserCreateAcceleratorTable
+NtUserCreateCaret
+NtUserCreateDesktop
+NtUserCreateInputContext
+NtUserCreateLocalMemHandle
+NtUserCreateWindowEx
+NtUserCreateWindowStation
+NtUserDdeGetQualityOfService
+NtUserDdeInitialize
+NtUserDdeSetQualityOfService
+NtUserDeferWindowPos
+NtUserDefSetText
+NtUserDeleteMenu
+NtUserDestroyAcceleratorTable
+NtUserDestroyCursor
+NtUserDestroyInputContext
+NtUserDestroyMenu
+NtUserDestroyWindow
+NtUserDisableThreadIme
+NtUserDispatchMessage
+NtUserDragDetect
+NtUserDragObject
+NtUserDrawAnimatedRects
+NtUserDrawCaption
+NtUserDrawCaptionTemp
+NtUserDrawIconEx
+NtUserDrawMenuBarTemp
+NtUserEmptyClipboard
+NtUserEnableMenuItem
+NtUserEnableScrollBar
+NtUserEndDeferWindowPosEx
+NtUserEndMenu
+NtUserEndPaint
+NtUserEnumDisplayDevices
+;NtUserEnumDisplayMonitors
+NtUserEnumDisplaySettings
+NtUserEvent
+NtUserExcludeUpdateRgn
+NtUserFillWindow
+;NtUserFindExistingCursorIcon
+NtUserFindWindowEx
+NtUserFlashWindowEx
+NtUserGetAltTabInfo
+NtUserGetAncestor
+;NtUserGetAppImeLevel
+NtUserGetAsyncKeyState
+NtUserGetAtomName
+NtUserGetCaretBlinkTime
+NtUserGetCaretPos
+;NtUserGetClassInfo
+NtUserGetClassName
+NtUserGetClipboardData
+NtUserGetClipboardFormatName
+NtUserGetClipboardOwner
+NtUserGetClipboardSequenceNumber
+NtUserGetClipboardViewer
+NtUserGetClipCursor
+NtUserGetComboBoxInfo
+NtUserGetControlBrush
+NtUserGetControlColor
+NtUserGetCPD
+NtUserGetCursorFrameInfo
+NtUserGetCursorInfo
+NtUserGetDC
+NtUserGetDCEx
+NtUserGetDoubleClickTime
+NtUserGetForegroundWindow
+NtUserGetGuiResources
+NtUserGetGUIThreadInfo
+NtUserGetIconInfo
+NtUserGetIconSize
+NtUserGetImeHotKey
+NtUserGetImeInfoEx
+NtUserGetInternalWindowPos
+NtUserGetKeyboardLayoutList
+NtUserGetKeyboardLayoutName
+NtUserGetKeyboardState
+NtUserGetKeyNameText
+NtUserGetKeyState
+NtUserGetListBoxInfo
+NtUserGetMenuBarInfo
+NtUserGetMenuIndex
+NtUserGetMenuItemRect
+NtUserGetMessage
+NtUserGetMouseMovePointsEx
+NtUserGetObjectInformation
+NtUserGetOpenClipboardWindow
+NtUserGetPriorityClipboardFormat
+NtUserGetProcessWindowStation
+NtUserGetRawInputBuffer
+NtUserGetRawInputData
+NtUserGetRawInputDeviceInfo
+NtUserGetRawInputDeviceList
+NtUserGetRegisteredRawInputDevices
+NtUserGetScrollBarInfo
+NtUserGetSystemMenu
+NtUserGetThreadDesktop
+NtUserGetThreadState
+NtUserGetTitleBarInfo
+NtUserGetUpdateRect
+NtUserGetUpdateRgn
+NtUserGetWindowDC
+NtUserGetWindowPlacement
+NtUserGetWOWClass
+NtUserHardErrorControl
+NtUserHideCaret
+NtUserHiliteMenuItem
+NtUserImpersonateDdeClientWindow
+NtUserInitialize
+NtUserInitializeClientPfnArrays
+;NtUserInitTask8
+NtUserInternalGetWindowText
+NtUserInvalidateRect
+NtUserInvalidateRgn
+NtUserIsClipboardFormatAvailable
+NtUserKillTimer
+NtUserLoadKeyboardLayoutEx
+NtUserLockWindowStation
+NtUserLockWindowUpdate
+NtUserLockWorkStation
+NtUserMapVirtualKeyEx
+NtUserMenuItemFromPoint
+NtUserMessageCall
+NtUserMinMaximize
+NtUserMNDragLeave
+NtUserMNDragOver
+NtUserModifyUserStartupInfoFlags
+NtUserMoveWindow
+NtUserNotifyIMEStatus
+NtUserNotifyProcessCreate
+NtUserNotifyWinEvent
+NtUserOpenClipboard
+NtUserOpenDesktop
+NtUserOpenInputDesktop
+NtUserOpenWindowStation
+NtUserPaintDesktop
+NtUserPeekMessage
+NtUserPostMessage
+NtUserPostThreadMessage
+NtUserPrintWindow
+NtUserProcessConnect
+NtUserQueryInformationThread
+NtUserQueryInputContext
+NtUserQuerySendMessage
+NtUserQueryUserCounters
+NtUserQueryWindow
+NtUserRealChildWindowFromPoint
+NtUserRealInternalGetMessage
+NtUserRealWaitMessageEx
+NtUserRedrawWindow
+NtUserRegisterClassExWOW
+NtUserRegisterUserApiHook
+NtUserRegisterHotKey
+NtUserRegisterRawInputDevices
+NtUserRegisterTasklist
+NtUserRegisterWindowMessage
+NtUserRemoveMenu
+NtUserRemoveProp
+NtUserResolveDesktop
+NtUserResolveDesktopForWOW
+NtUserSBGetParms
+NtUserScrollDC
+NtUserScrollWindowEx
+NtUserSelectPalette
+NtUserSendInput
+NtUserSetActiveWindow
+NtUserSetAppImeLevel
+NtUserSetCapture
+NtUserSetClassLong
+NtUserSetClassWord
+NtUserSetClipboardData
+NtUserSetClipboardViewer
+NtUserSetConsoleReserveKeys
+NtUserSetCursor
+NtUserSetCursorContents
+;NtUserSetCursorIconData
+NtUserSetDbgTag
+NtUserSetFocus
+NtUserSetImeHotKey
+NtUserSetImeInfoEx
+NtUserSetImeOwnerWindow
+NtUserSetInformationProcess
+NtUserSetInformationThread
+NtUserSetInternalWindowPos
+NtUserSetKeyboardState
+NtUserSetLogonNotifyWindow
+NtUserSetMenu
+NtUserSetMenuContextHelpId
+NtUserSetMenuDefaultItem
+NtUserSetMenuFlagRtoL
+NtUserSetObjectInformation
+NtUserSetParent
+NtUserSetProcessWindowStation
+NtUserSetProp
+NtUserSetRipFlags
+NtUserSetScrollInfo
+NtUserSetShellWindowEx
+NtUserSetSysColors
+NtUserSetSystemCursor
+NtUserSetSystemMenu
+NtUserSetSystemTimer
+NtUserSetThreadDesktop
+NtUserSetThreadLayoutHandles
+NtUserSetThreadState
+NtUserSetTimer
+NtUserSetWindowFNID
+NtUserSetWindowLong
+NtUserSetWindowPlacement
+NtUserSetWindowPos
+NtUserSetWindowRgn
+NtUserSetWindowsHookAW
+NtUserSetWindowsHookEx
+NtUserSetWindowStationUser
+NtUserSetWindowWord
+NtUserSetWinEventHook
+NtUserShowCaret
+NtUserShowScrollBar
+NtUserShowWindow
+NtUserShowWindowAsync
+NtUserSoundSentry
+NtUserSwitchDesktop
+NtUserSystemParametersInfo
+NtUserTestForInteractiveUser
+NtUserThunkedMenuInfo
+NtUserThunkedMenuItemInfo
+NtUserToUnicodeEx
+NtUserTrackMouseEvent
+NtUserTrackPopupMenuEx
+NtUserCalcMenuBar
+NtUserPaintMenuBar
+NtUserTranslateAccelerator
+NtUserTranslateMessage
+NtUserUnhookWindowsHookEx
+NtUserUnhookWinEvent
+NtUserUnloadKeyboardLayout
+NtUserUnlockWindowStation
+;NtUserUnregisterClass
+NtUserUnregisterUserApiHook
+NtUserUnregisterHotKey
+NtUserUpdateInputContext
+NtUserUpdateInstance
+NtUserUpdateLayeredWindow
+NtUserGetLayeredWindowAttributes
+NtUserSetLayeredWindowAttributes
+NtUserUpdatePerUserSystemParameters
+NtUserUserHandleGrantAccess
+NtUserValidateHandleSecure
+NtUserValidateRect
+NtUserValidateTimerCallback
+NtUserVkKeyScanEx
+NtUserWaitForInputIdle
+NtUserWaitForMsgAndEvent
+NtUserWaitMessage
+NtUserWin32PoolAllocationStats
+NtUserWindowFromPoint
+NtUserYieldTask
+NtUserRemoteConnect
+NtUserRemoteRedrawRectangle
+NtUserRemoteRedrawScreen
+NtUserRemoteStopScreenUpdates
+NtUserCtxDisplayIOCtl
+NtGdiEngAssociateSurface
+NtGdiEngCreateBitmap
+NtGdiEngCreateDeviceSurface
+NtGdiEngCreateDeviceBitmap
+NtGdiEngCreatePalette
+NtGdiEngComputeGlyphSet
+NtGdiEngCopyBits
+NtGdiEngDeletePalette
+NtGdiEngDeleteSurface
+NtGdiEngEraseSurface
+NtGdiEngUnlockSurface
+NtGdiEngLockSurface
+NtGdiEngBitBlt
+NtGdiEngStretchBlt
+NtGdiEngPlgBlt
+NtGdiEngMarkBandingSurface
+NtGdiEngStrokePath
+NtGdiEngFillPath
+NtGdiEngStrokeAndFillPath
+NtGdiEngPaint
+NtGdiEngLineTo
+NtGdiEngAlphaBlend
+NtGdiEngGradientFill
+NtGdiEngTransparentBlt
+NtGdiEngTextOut
+NtGdiEngStretchBltROP
+NtGdiXLATEOBJ_cGetPalette
+NtGdiXLATEOBJ_iXlate
+NtGdiXLATEOBJ_hGetColorTransform
+NtGdiCLIPOBJ_bEnum
+NtGdiCLIPOBJ_cEnumStart
+NtGdiCLIPOBJ_ppoGetPath
+NtGdiEngDeletePath
+NtGdiEngCreateClip
+NtGdiEngDeleteClip
+NtGdiBRUSHOBJ_ulGetBrushColor
+NtGdiBRUSHOBJ_pvAllocRbrush
+NtGdiBRUSHOBJ_pvGetRbrush
+NtGdiBRUSHOBJ_hGetColorTransform
+NtGdiXFORMOBJ_bApplyXform
+NtGdiXFORMOBJ_iGetXform
+NtGdiFONTOBJ_vGetInfo
+NtGdiFONTOBJ_pxoGetXform
+NtGdiFONTOBJ_cGetGlyphs
+NtGdiFONTOBJ_pifi
+NtGdiFONTOBJ_pfdg
+NtGdiFONTOBJ_pQueryGlyphAttrs
+NtGdiFONTOBJ_pvTrueTypeFontFile
+NtGdiFONTOBJ_cGetAllGlyphHandles
+NtGdiSTROBJ_bEnum
+NtGdiSTROBJ_bEnumPositionsOnly
+NtGdiSTROBJ_bGetAdvanceWidths
+NtGdiSTROBJ_vEnumStart
+NtGdiSTROBJ_dwGetCodePage
+NtGdiPATHOBJ_vGetBounds
+NtGdiPATHOBJ_bEnum
+NtGdiPATHOBJ_vEnumStart
+NtGdiPATHOBJ_vEnumStartClipLines
+NtGdiPATHOBJ_bEnumClipLines
+NtGdiGetDhpdev
+NtGdiEngCheckAbort
+NtGdiHT_Get8BPPFormatPalette
+NtGdiHT_Get8BPPMaskPalette
+NtGdiUpdateTransform
+NtGdiSetPUMPDOBJ
+NtGdiBRUSHOBJ_DeleteRbrush
+NtGdiUMPDEngFreeUserMem
+NtGdiUnmapMemFont
+NtGdiDrawStream
+
--- /dev/null
+; $Id: w32kdll.def 27344 2007-08-01 14:12:10Z tkreuzer $
+;
+; ReactOS Operating System
+;
+; This file contains all win32k native api functions from win 2k3 sp 2
+;
+LIBRARY w32kdll.dll
+
+EXPORTS
+NtGdiAbortDoc@4
+NtGdiAbortPath@4
+NtGdiAddFontResourceW@24
+NtGdiAddRemoteFontToDC@16
+NtGdiAddFontMemResourceEx@20
+NtGdiRemoveMergeFont@8
+NtGdiAddRemoteMMInstanceToDC@12
+NtGdiAlphaBlend@48
+NtGdiAngleArc@24
+NtGdiAnyLinkedFonts@0
+NtGdiFontIsLinked@4
+NtGdiArcInternal@40
+NtGdiBeginPath@4
+NtGdiBitBlt@44
+NtGdiCancelDC@4
+NtGdiCheckBitmapBits@32
+NtGdiCloseFigure@4
+NtGdiClearBitmapAttributes@8
+NtGdiClearBrushAttributes@8
+NtGdiColorCorrectPalette@24
+NtGdiCombineRgn@16
+NtGdiCombineTransform@12
+NtGdiComputeXformCoefficients@4
+NtGdiConsoleTextOut@16
+NtGdiConvertMetafileRect@8
+NtGdiCreateBitmap@20
+NtGdiCreateClientObj@4
+NtGdiCreateColorSpace@4
+NtGdiCreateColorTransform@32
+NtGdiCreateCompatibleBitmap@12
+NtGdiCreateCompatibleDC@4
+NtGdiCreateDIBBrush@24
+NtGdiCreateDIBitmapInternal@44
+NtGdiCreateDIBSection@36
+NtGdiCreateEllipticRgn@16
+NtGdiCreateHalftonePalette@4
+NtGdiCreateHatchBrushInternal@12
+NtGdiCreateMetafileDC@4
+NtGdiCreatePaletteInternal@8
+NtGdiCreatePatternBrushInternal@12
+NtGdiCreatePen@16
+NtGdiCreateRectRgn@16
+NtGdiCreateRoundRectRgn@24
+NtGdiCreateServerMetaFile@24
+NtGdiCreateSolidBrush@8
+NtGdiD3dContextCreate@16
+NtGdiD3dContextDestroy@4
+NtGdiD3dContextDestroyAll@4
+NtGdiD3dValidateTextureStageState@4
+NtGdiD3dDrawPrimitives2@28
+NtGdiDdGetDriverState@4
+NtGdiDdAddAttachedSurface@12
+NtGdiDdAlphaBlt@12
+NtGdiDdAttachSurface@8
+NtGdiDdBeginMoCompFrame@8
+NtGdiDdBlt@12
+NtGdiDdCanCreateSurface@8
+NtGdiDdCanCreateD3DBuffer@8
+NtGdiDdColorControl@8
+NtGdiDdCreateDirectDrawObject@4
+NtGdiDdCreateSurface@32
+NtGdiDdCreateD3DBuffer@32
+NtGdiDdCreateMoComp@8
+NtGdiDdCreateSurfaceObject@24
+NtGdiDdDeleteDirectDrawObject@4
+NtGdiDdDeleteSurfaceObject@4
+NtGdiDdDestroyMoComp@8
+NtGdiDdDestroySurface@8
+NtGdiDdDestroyD3DBuffer@4
+NtGdiDdEndMoCompFrame@8
+NtGdiDdFlip@20
+NtGdiDdFlipToGDISurface@8
+NtGdiDdGetAvailDriverMemory@8
+NtGdiDdGetBltStatus@8
+NtGdiDdGetDC@8
+NtGdiDdGetDriverInfo@8
+NtGdiDdGetDxHandle@12
+NtGdiDdGetFlipStatus@8
+NtGdiDdGetInternalMoCompInfo@8
+NtGdiDdGetMoCompBuffInfo@8
+NtGdiDdGetMoCompGuids@8
+NtGdiDdGetMoCompFormats@8
+NtGdiDdGetScanLine@8
+NtGdiDdLock@12
+NtGdiDdLockD3D@8
+NtGdiDdQueryDirectDrawObject@44
+NtGdiDdQueryMoCompStatus@8
+NtGdiDdReenableDirectDrawObject@8
+NtGdiDdReleaseDC@4
+NtGdiDdRenderMoComp@8
+NtGdiDdResetVisrgn@8
+NtGdiDdSetColorKey@8
+NtGdiDdSetExclusiveMode@8
+NtGdiDdSetGammaRamp@12
+NtGdiDdCreateSurfaceEx@12
+NtGdiDdSetOverlayPosition@12
+NtGdiDdUnattachSurface@8
+NtGdiDdUnlock@8
+NtGdiDdUnlockD3D@8
+NtGdiDdUpdateOverlay@12
+NtGdiDdWaitForVerticalBlank@8
+NtGdiDvpCanCreateVideoPort@8
+NtGdiDvpColorControl@8
+NtGdiDvpCreateVideoPort@8
+NtGdiDvpDestroyVideoPort@8
+NtGdiDvpFlipVideoPort@16
+NtGdiDvpGetVideoPortBandwidth@8
+NtGdiDvpGetVideoPortField@8
+NtGdiDvpGetVideoPortFlipStatus@8
+NtGdiDvpGetVideoPortInputFormats@8
+NtGdiDvpGetVideoPortLine@8
+NtGdiDvpGetVideoPortOutputFormats@8
+NtGdiDvpGetVideoPortConnectInfo@8
+NtGdiDvpGetVideoSignalStatus@8
+NtGdiDvpUpdateVideoPort@16
+NtGdiDvpWaitForVideoPortSync@8
+NtGdiDvpAcquireNotification@12
+NtGdiDvpReleaseNotification@8
+NtGdiDxgGenericThunk@24
+NtGdiDeleteClientObj@4
+NtGdiDeleteColorSpace@4
+NtGdiDeleteColorTransform@8
+NtGdiDeleteObjectApp@4
+NtGdiDescribePixelFormat@16
+NtGdiGetPerBandInfo@8
+NtGdiDoBanding@16
+NtGdiDoPalette@24
+NtGdiDrawEscape@16
+NtGdiEllipse@20
+NtGdiEnableEudc@4
+NtGdiEndDoc@4
+NtGdiEndPage@4
+NtGdiEndPath@4
+NtGdiEnumFontChunk@20
+NtGdiEnumFontClose@4
+NtGdiEnumFontOpen@28
+NtGdiEnumObjects@16
+NtGdiEqualRgn@8
+NtGdiEudcLoadUnloadLink@28
+NtGdiExcludeClipRect@20
+NtGdiExtCreatePen@44
+NtGdiExtCreateRegion@12
+NtGdiExtEscape@32
+NtGdiExtFloodFill@20
+NtGdiExtGetObjectW@12
+NtGdiExtSelectClipRgn@12
+NtGdiExtTextOutW@36
+NtGdiFillPath@4
+NtGdiFillRgn@12
+NtGdiFlattenPath@4
+NtGdiFlush@0
+NtGdiForceUFIMapping@8
+NtGdiFrameRgn@20
+NtGdiFullscreenControl@20
+NtGdiGetAndSetDCDword@16
+NtGdiGetAppClipBox@8
+NtGdiGetBitmapBits@12
+NtGdiGetBitmapDimension@8
+NtGdiGetBoundsRect@12
+NtGdiGetCharABCWidthsW@24
+NtGdiGetCharacterPlacementW@24
+NtGdiGetCharSet@4
+NtGdiGetCharWidthW@24
+NtGdiGetCharWidthInfo@8
+NtGdiGetColorAdjustment@8
+NtGdiGetColorSpaceforBitmap@4
+NtGdiGetDCDword@12
+NtGdiGetDCforBitmap@4
+NtGdiGetDCObject@8
+NtGdiGetDCPoint@12
+NtGdiGetDeviceCaps@8
+NtGdiGetDeviceGammaRamp@8
+NtGdiGetDeviceCapsAll@8
+NtGdiGetDIBitsInternal@36
+NtGdiGetETM@8
+NtGdiGetEudcTimeStampEx@12
+NtGdiGetFontData@20
+NtGdiGetFontResourceInfoInternalW@28
+NtGdiGetGlyphIndicesW@20
+NtGdiGetGlyphIndicesWInternal@24
+NtGdiGetGlyphOutline@32
+NtGdiGetKerningPairs@12
+NtGdiGetLinkedUFIs@12
+NtGdiGetMiterLimit@8
+NtGdiGetMonitorID@12
+NtGdiGetNearestColor@8
+NtGdiGetNearestPaletteIndex@8
+NtGdiGetObjectBitmapHandle@8
+NtGdiGetOutlineTextMetricsInternalW@16
+NtGdiGetPath@16
+NtGdiGetPixel@12
+NtGdiGetRandomRgn@12
+NtGdiGetRasterizerCaps@8
+NtGdiGetRealizationInfo@12
+NtGdiGetRegionData@12
+NtGdiGetRgnBox@8
+NtGdiGetServerMetaFileBits@28
+NtGdiGetSpoolMessage@16
+NtGdiGetStats@20
+NtGdiGetStockObject@4
+NtGdiGetStringBitmapW@20
+NtGdiGetSystemPaletteUse@4
+NtGdiGetTextCharsetInfo@12
+NtGdiGetTextExtent@20
+NtGdiGetTextExtentExW@32
+NtGdiGetTextFaceW@16
+NtGdiGetTextMetricsW@12
+NtGdiGetTransform@12
+NtGdiGetUFI@24
+NtGdiGetEmbUFI@28
+NtGdiGetUFIPathname@40
+NtGdiGetEmbedFonts@0
+NtGdiChangeGhostFont@8
+NtGdiAddEmbFontToDC@8
+NtGdiGetFontUnicodeRanges@8
+NtGdiGetWidthTable@28
+NtGdiGradientFill@24
+NtGdiHfontCreate@20
+NtGdiIcmBrushInfo@32
+NtGdiInit@0
+NtGdiInitSpool@0
+NtGdiIntersectClipRect@20
+NtGdiInvertRgn@8
+NtGdiLineTo@12
+NtGdiMakeFontDir@20
+NtGdiMakeInfoDC@8
+NtGdiMaskBlt@52
+NtGdiModifyWorldTransform@12
+NtGdiMonoBitmap@4
+NtGdiMoveTo@16
+NtGdiOffsetClipRgn@12
+NtGdiOffsetRgn@12
+NtGdiOpenDCW@28
+NtGdiPatBlt@24
+NtGdiPolyPatBlt@20
+NtGdiPathToRegion@4
+NtGdiPlgBlt@44
+NtGdiPolyDraw@16
+NtGdiPolyPolyDraw@20
+NtGdiPolyTextOutW@16
+NtGdiPtInRegion@12
+NtGdiPtVisible@12
+NtGdiQueryFonts@12
+NtGdiQueryFontAssocInfo@4
+NtGdiRectangle@20
+NtGdiRectInRegion@8
+NtGdiRectVisible@8
+NtGdiRemoveFontResourceW@24
+NtGdiRemoveFontMemResourceEx@4
+NtGdiResetDC@20
+NtGdiResizePalette@8
+NtGdiRestoreDC@8
+NtGdiRoundRect@28
+NtGdiSaveDC@4
+NtGdiScaleViewportExtEx@24
+NtGdiScaleWindowExtEx@24
+NtGdiSelectBitmap@8
+NtGdiSelectBrush@8
+NtGdiSelectClipPath@8
+NtGdiSelectFont@8
+NtGdiSelectPen@8
+NtGdiSetBitmapAttributes@8
+NtGdiSetBitmapBits@12
+NtGdiSetBitmapDimension@16
+NtGdiSetBoundsRect@12
+NtGdiSetBrushAttributes@8
+NtGdiSetBrushOrg@16
+NtGdiSetColorAdjustment@8
+NtGdiSetColorSpace@8
+NtGdiSetDeviceGammaRamp@8
+NtGdiSetDIBitsToDeviceInternal@64
+NtGdiSetFontEnumeration@4
+NtGdiSetFontXform@12
+NtGdiSetIcmMode@12
+NtGdiSetLinkedUFIs@12
+NtGdiSetMagicColors@12
+NtGdiSetMetaRgn@4
+NtGdiSetMiterLimit@12
+NtGdiGetDeviceWidth@4
+NtGdiMirrorWindowOrg@4
+NtGdiSetLayout@12
+NtGdiSetPixel@16
+NtGdiSetPixelFormat@8
+NtGdiSetRectRgn@20
+NtGdiSetSystemPaletteUse@8
+NtGdiSetTextJustification@12
+NtGdiSetupPublicCFONT@12
+NtGdiSetVirtualResolution@20
+NtGdiSetSizeDevice@12
+NtGdiStartDoc@16
+NtGdiStartPage@4
+NtGdiStretchBlt@48
+NtGdiStretchDIBitsInternal@64
+NtGdiStrokeAndFillPath@4
+NtGdiStrokePath@4
+NtGdiSwapBuffers@4
+NtGdiTransformPoints@20
+NtGdiTransparentBlt@44
+NtGdiUnloadPrinterDriver@8
+NtGdiUnmapMemFont@4
+NtGdiUnrealizeObject@4
+NtGdiUpdateColors@4
+NtGdiWidenPath@4
+NtUserActivateKeyboardLayout@8
+NtUserAlterWindowStyle@12
+NtUserAssociateInputContext@12
+NtUserAttachThreadInput@12
+NtUserBeginPaint@8
+NtUserBitBltSysBmp@32
+NtUserBlockInput@4
+NtUserBuildHimcList@16
+NtUserBuildHwndList@28
+NtUserBuildNameList@16
+NtUserBuildPropList@16
+NtUserCallHwnd@8
+NtUserCallHwndLock@8
+NtUserCallHwndOpt@8
+NtUserCallHwndParam@12
+NtUserCallHwndParamLock@12
+NtUserCallMsgFilter@8
+NtUserCallNextHookEx@16
+NtUserCallNoParam@4
+NtUserCallOneParam@8
+NtUserCallTwoParam@12
+NtUserChangeClipboardChain@8
+NtUserChangeDisplaySettings@16
+NtUserCheckImeHotKey@8
+NtUserCheckMenuItem@12
+NtUserChildWindowFromPointEx@16
+NtUserClipCursor@4
+NtUserCloseClipboard@0
+NtUserCloseDesktop@4
+NtUserCloseWindowStation@4
+NtUserConsoleControl@12
+NtUserConvertMemHandle@8
+NtUserCopyAcceleratorTable@12
+NtUserCountClipboardFormats@0
+NtUserCreateAcceleratorTable@8
+NtUserCreateCaret@16
+NtUserCreateDesktop@20
+NtUserCreateInputContext@4
+NtUserCreateLocalMemHandle@16
+NtUserCreateWindowEx@60
+NtUserCreateWindowStation@28
+NtUserDdeGetQualityOfService@12
+NtUserDdeInitialize@20
+NtUserDdeSetQualityOfService@12
+NtUserDeferWindowPos@32
+NtUserDefSetText@8
+NtUserDeleteMenu@12
+NtUserDestroyAcceleratorTable@4
+NtUserDestroyCursor@8
+NtUserDestroyInputContext@4
+NtUserDestroyMenu@4
+NtUserDestroyWindow@4
+NtUserDisableThreadIme@4
+NtUserDispatchMessage@4
+NtUserDragDetect@12
+NtUserDragObject@20
+NtUserDrawAnimatedRects@16
+NtUserDrawCaption@16
+NtUserDrawCaptionTemp@28
+NtUserDrawIconEx@44
+NtUserDrawMenuBarTemp@20
+NtUserEmptyClipboard@0
+NtUserEnableMenuItem@12
+NtUserEnableScrollBar@12
+NtUserEndDeferWindowPosEx@8
+NtUserEndMenu@0
+NtUserEndPaint@8
+NtUserEnumDisplayDevices@16
+NtUserEnumDisplayMonitors@16
+NtUserEnumDisplaySettings@16
+NtUserEvent@4
+NtUserExcludeUpdateRgn@8
+NtUserFillWindow@16
+NtUserFindExistingCursorIcon@12
+NtUserFindWindowEx@20
+NtUserFlashWindowEx@4
+NtUserGetAltTabInfo@24
+NtUserGetAncestor@8
+NtUserGetAppImeLevel@4
+NtUserGetAsyncKeyState@4
+NtUserGetAtomName@8
+NtUserGetCaretBlinkTime@0
+NtUserGetCaretPos@4
+NtUserGetClassInfoEx@20
+NtUserGetClassName@12
+NtUserGetClipboardData@8
+NtUserGetClipboardFormatName@12
+NtUserGetClipboardOwner@0
+NtUserGetClipboardSequenceNumber@0
+NtUserGetClipboardViewer@0
+NtUserGetClipCursor@4
+NtUserGetComboBoxInfo@8
+NtUserGetControlBrush@12
+NtUserGetControlColor@16
+NtUserGetCPD@12
+NtUserGetCursorFrameInfo@16
+NtUserGetCursorInfo@4
+NtUserGetDC@4
+NtUserGetDCEx@12
+NtUserGetDoubleClickTime@0
+NtUserGetForegroundWindow@0
+NtUserGetGuiResources@8
+NtUserGetGUIThreadInfo@8
+NtUserGetIconInfo@24
+NtUserGetIconSize@16
+NtUserGetImeHotKey@16
+NtUserGetImeInfoEx@8
+NtUserGetInternalWindowPos@12
+NtUserGetKeyboardLayoutList@8
+NtUserGetKeyboardLayoutName@4
+NtUserGetKeyboardState@4
+NtUserGetKeyNameText@12
+NtUserGetKeyState@4
+NtUserGetListBoxInfo@4
+NtUserGetMenuBarInfo@16
+NtUserGetMenuIndex@8
+NtUserGetMenuItemRect@16
+NtUserGetMessage@16
+NtUserGetMouseMovePointsEx@20
+NtUserGetObjectInformation@20
+NtUserGetOpenClipboardWindow@0
+NtUserGetPriorityClipboardFormat@8
+NtUserGetProcessWindowStation@0
+NtUserGetRawInputBuffer@12
+NtUserGetRawInputData@20
+NtUserGetRawInputDeviceInfo@16
+NtUserGetRawInputDeviceList@12
+NtUserGetRegisteredRawInputDevices@12
+NtUserGetScrollBarInfo@12
+NtUserGetSystemMenu@8
+NtUserGetThreadDesktop@8
+NtUserGetThreadState@4
+NtUserGetTitleBarInfo@8
+NtUserGetUpdateRect@12
+NtUserGetUpdateRgn@12
+NtUserGetWindowDC@4
+NtUserGetWindowPlacement@8
+NtUserGetWOWClass@8
+NtUserHardErrorControl@12
+NtUserHideCaret@4
+NtUserHiliteMenuItem@16
+NtUserImpersonateDdeClientWindow@8
+NtUserInitialize@12
+NtUserInitializeClientPfnArrays@16
+NtUserInitTask@48
+NtUserInternalGetWindowText@12
+NtUserInvalidateRect@12
+NtUserInvalidateRgn@12
+NtUserIsClipboardFormatAvailable@4
+NtUserKillTimer@8
+NtUserLoadKeyboardLayoutEx@28
+NtUserLockWindowStation@4
+NtUserLockWindowUpdate@4
+NtUserLockWorkStation@0
+NtUserMapVirtualKeyEx@16
+NtUserMenuItemFromPoint@16
+NtUserMessageCall@28
+NtUserMinMaximize@12
+NtUserMNDragLeave@0
+NtUserMNDragOver@8
+NtUserModifyUserStartupInfoFlags@8
+NtUserMoveWindow@24
+NtUserNotifyIMEStatus@12
+NtUserNotifyProcessCreate@16
+NtUserNotifyWinEvent@16
+NtUserOpenClipboard@8
+NtUserOpenDesktop@12
+NtUserOpenInputDesktop@12
+NtUserOpenWindowStation@8
+NtUserPaintDesktop@4
+NtUserPeekMessage@20
+NtUserPostMessage@16
+NtUserPostThreadMessage@16
+NtUserPrintWindow@12
+NtUserProcessConnect@12
+NtUserQueryInformationThread@16
+NtUserQueryInputContext@8
+NtUserQuerySendMessage@4
+NtUserQueryWindow@8
+NtUserRealChildWindowFromPoint@12
+NtUserRealInternalGetMessage@24
+NtUserRealWaitMessageEx@8
+NtUserRedrawWindow@16
+NtUserRegisterClassExWOW@28
+NtUserRegisterUserApiHook@16
+NtUserRegisterHotKey@16
+NtUserRegisterRawInputDevices@12
+NtUserRegisterTasklist@4
+NtUserRegisterWindowMessage@4
+NtUserRemoveMenu@12
+NtUserRemoveProp@8
+NtUserResolveDesktop@16
+NtUserResolveDesktopForWOW@4
+NtUserSBGetParms@16
+NtUserScrollDC@28
+NtUserScrollWindowEx@32
+NtUserSelectPalette@12
+NtUserSendInput@12
+NtUserSetActiveWindow@4
+NtUserSetAppImeLevel@8
+NtUserSetCapture@4
+NtUserSetClassLong@16
+NtUserSetClassWord@12
+NtUserSetClipboardData@12
+NtUserSetClipboardViewer@4
+NtUserSetConsoleReserveKeys@8
+NtUserSetCursor@4
+NtUserSetCursorContents@8
+NtUserSetCursorIconData@16
+NtUserSetFocus@4
+NtUserSetImeHotKey@20
+NtUserSetImeInfoEx@4
+NtUserSetImeOwnerWindow@8
+NtUserSetInformationProcess@16
+NtUserSetInformationThread@16
+NtUserSetInternalWindowPos@16
+NtUserSetKeyboardState@4
+NtUserSetLogonNotifyWindow@4
+NtUserSetMenu@12
+NtUserSetMenuContextHelpId@8
+NtUserSetMenuDefaultItem@12
+NtUserSetMenuFlagRtoL@4
+NtUserSetObjectInformation@16
+NtUserSetParent@8
+NtUserSetProcessWindowStation@4
+NtUserSetProp@12
+NtUserSetScrollInfo@16
+NtUserSetShellWindowEx@8
+NtUserSetSysColors@16
+NtUserSetSystemCursor@8
+NtUserSetSystemMenu@8
+NtUserSetSystemTimer@16
+NtUserSetThreadDesktop@4
+NtUserSetThreadLayoutHandles@8
+NtUserSetThreadState@8
+NtUserSetTimer@16
+NtUserSetWindowFNID@8
+NtUserSetWindowLong@16
+NtUserSetWindowPlacement@8
+NtUserSetWindowPos@28
+NtUserSetWindowRgn@12
+NtUserSetWindowsHookAW@12
+NtUserSetWindowsHookEx@24
+NtUserSetWindowStationUser@16
+NtUserSetWindowWord@12
+NtUserSetWinEventHook@32
+NtUserShowCaret@4
+NtUserShowScrollBar@12
+NtUserShowWindow@8
+NtUserShowWindowAsync@8
+NtUserSoundSentry@0
+NtUserSwitchDesktop@4
+NtUserSystemParametersInfo@16
+NtUserTestForInteractiveUser@4
+NtUserThunkedMenuInfo@8
+NtUserThunkedMenuItemInfo@24
+NtUserToUnicodeEx@28
+NtUserTrackMouseEvent@4
+NtUserTrackPopupMenuEx@24
+NtUserCalcMenuBar@20
+NtUserPaintMenuBar@24
+NtUserTranslateAccelerator@12
+NtUserTranslateMessage@8
+NtUserUnhookWindowsHookEx@4
+NtUserUnhookWinEvent@4
+NtUserUnloadKeyboardLayout@4
+NtUserUnlockWindowStation@4
+NtUserUnregisterClass@12
+NtUserUnregisterUserApiHook@0
+NtUserUnregisterHotKey@8
+NtUserUpdateInputContext@12
+NtUserUpdateInstance@12
+NtUserUpdateLayeredWindow@40
+NtUserGetLayeredWindowAttributes@16
+NtUserSetLayeredWindowAttributes@16
+NtUserUpdatePerUserSystemParameters@8
+NtUserUserHandleGrantAccess@12
+NtUserValidateHandleSecure@4
+NtUserValidateRect@8
+NtUserValidateTimerCallback@4
+NtUserVkKeyScanEx@12
+NtUserWaitForInputIdle@12
+NtUserWaitForMsgAndEvent@4
+NtUserWaitMessage@0
+NtUserWin32PoolAllocationStats@24
+NtUserWindowFromPoint@8
+NtUserYieldTask@0
+NtUserRemoteConnect@12
+NtUserRemoteRedrawRectangle@16
+NtUserRemoteRedrawScreen@0
+NtUserRemoteStopScreenUpdates@0
+NtUserCtxDisplayIOCtl@12
+NtGdiEngAssociateSurface@12
+NtGdiEngCreateBitmap@24
+NtGdiEngCreateDeviceSurface@16
+NtGdiEngCreateDeviceBitmap@16
+NtGdiEngCreatePalette@24
+NtGdiEngComputeGlyphSet@12
+NtGdiEngCopyBits@24
+NtGdiEngDeletePalette@4
+NtGdiEngDeleteSurface@4
+NtGdiEngEraseSurface@12
+NtGdiEngUnlockSurface@4
+NtGdiEngLockSurface@4
+NtGdiEngBitBlt@44
+NtGdiEngStretchBlt@44
+NtGdiEngPlgBlt@44
+NtGdiEngMarkBandingSurface@4
+NtGdiEngStrokePath@32
+NtGdiEngFillPath@28
+NtGdiEngStrokeAndFillPath@40
+NtGdiEngPaint@20
+NtGdiEngLineTo@36
+NtGdiEngAlphaBlend@28
+NtGdiEngGradientFill@40
+NtGdiEngTransparentBlt@32
+NtGdiEngTextOut@40
+NtGdiEngStretchBltROP@52
+NtGdiXLATEOBJ_cGetPalette@16
+NtGdiXLATEOBJ_iXlate@8
+NtGdiXLATEOBJ_hGetColorTransform@4
+NtGdiCLIPOBJ_bEnum@12
+NtGdiCLIPOBJ_cEnumStart@20
+NtGdiCLIPOBJ_ppoGetPath@4
+NtGdiEngDeletePath@4
+NtGdiEngCreateClip@0
+NtGdiEngDeleteClip@4
+NtGdiBRUSHOBJ_ulGetBrushColor@4
+NtGdiBRUSHOBJ_pvAllocRbrush@8
+NtGdiBRUSHOBJ_pvGetRbrush@4
+NtGdiBRUSHOBJ_hGetColorTransform@4
+NtGdiXFORMOBJ_bApplyXform@20
+NtGdiXFORMOBJ_iGetXform@8
+NtGdiFONTOBJ_vGetInfo@12
+NtGdiFONTOBJ_pxoGetXform@4
+NtGdiFONTOBJ_cGetGlyphs@20
+NtGdiFONTOBJ_pifi@4
+NtGdiFONTOBJ_pfdg@4
+NtGdiFONTOBJ_pQueryGlyphAttrs@8
+NtGdiFONTOBJ_pvTrueTypeFontFile@8
+NtGdiFONTOBJ_cGetAllGlyphHandles@8
+NtGdiSTROBJ_bEnum@12
+NtGdiSTROBJ_bEnumPositionsOnly@12
+NtGdiSTROBJ_bGetAdvanceWidths@16
+NtGdiSTROBJ_vEnumStart@4
+NtGdiSTROBJ_dwGetCodePage@4
+NtGdiPATHOBJ_vGetBounds@8
+NtGdiPATHOBJ_bEnum@8
+NtGdiPATHOBJ_vEnumStart@4
+NtGdiPATHOBJ_vEnumStartClipLines@16
+NtGdiPATHOBJ_bEnumClipLines@12
+NtGdiGetDhpdev@4
+NtGdiEngCheckAbort@4
+NtGdiHT_Get8BPPFormatPalette@16
+NtGdiHT_Get8BPPMaskPalette@24
+NtGdiUpdateTransform@4
+NtGdiSetPUMPDOBJ@16
+NtGdiBRUSHOBJ_DeleteRbrush@8
+NtGdiUMPDEngFreeUserMem@4
+NtGdiDrawStream@12
+NtGdiMakeObjectXferable@8
+NtGdiMakeObjectUnXferable@4
<module name="w32kdll_2k3sp2" type="win32dll" entrypoint="0" installname="w32kdll_2k3sp2.dll">
- <importlibrary definition="w32kdll_2k3sp2.def" />
- <file>w32kdll_2k3sp2.S</file>
+ <importlibrary definition="w32kdll_2k3sp2-$(ARCH).def" />
+ <if property="ARCH" value="i386">
+ <file>w32kdll_2k3sp2-i386.S</file>
+ </if>
+ <if property="ARCH" value="amd64">
+ <file>w32kdll_2k3sp2-amd64.S</file>
+ </if>
<file>main.c</file>
</module>
+++ /dev/null
-#
-# win32k systemcalls taken from Windows 2000 SP4 x86
-#
-NtGdiAbortDoc 1
-NtGdiAbortPath 1
-NtGdiAddFontResourceW 6
-NtGdiAddRemoteFontToDC 4
-NtGdiAddFontMemResourceEx 5
-NtGdiRemoveMergeFont 2
-NtGdiAddRemoteMMInstanceToDC 3
-NtGdiAlphaBlend 12
-NtGdiAngleArc 6
-NtGdiAnyLinkedFonts 0
-NtGdiFontIsLinked 1
-NtGdiArcInternal 10
-NtGdiBeginPath 1
-NtGdiBitBlt 11
-NtGdiCancelDC 1
-NtGdiCheckBitmapBits 8
-NtGdiCloseFigure 1
-NtGdiColorCorrectPalette 6
-NtGdiCombineRgn 4
-NtGdiCombineTransform 3
-NtGdiComputeXformCoefficients 1
-NtGdiConsoleTextOut 4
-NtGdiConvertMetafileRect 2
-NtGdiCreateBitmap 5
-NtGdiCreateClientObj 1
-NtGdiCreateColorSpace 1
-NtGdiCreateColorTransform 8
-NtGdiCreateCompatibleBitmap 3
-NtGdiCreateCompatibleDC 1
-NtGdiCreateDIBBrush 6
-NtGdiCreateDIBitmapInternal 11
-NtGdiCreateDIBSection 9
-NtGdiCreateEllipticRgn 4
-NtGdiCreateHalftonePalette 1
-NtGdiCreateHatchBrushInternal 3
-NtGdiCreateMetafileDC 1
-NtGdiCreatePaletteInternal 2
-NtGdiCreatePatternBrushInternal 3
-NtGdiCreatePen 4
-NtGdiCreateRectRgn 4
-NtGdiCreateRoundRectRgn 6
-NtGdiCreateServerMetaFile 6
-NtGdiCreateSolidBrush 2
-NtGdiD3dContextCreate 4
-NtGdiD3dContextDestroy 1
-NtGdiD3dContextDestroyAll 1
-NtGdiD3dValidateTextureStageState 1
-NtGdiD3dDrawPrimitives2 7
-NtGdiDdGetDriverState 1
-NtGdiDdAddAttachedSurface 3
-NtGdiDdAlphaBlt 3
-NtGdiDdAttachSurface 2
-NtGdiDdBeginMoCompFrame 2
-NtGdiDdBlt 3
-NtGdiDdCanCreateSurface 2
-NtGdiDdCanCreateD3DBuffer 2
-NtGdiDdColorControl 2
-NtGdiDdCreateDirectDrawObject 1
-NtGdiDdCreateSurface 8
-NtGdiDdCreateD3DBuffer 8
-NtGdiDdCreateMoComp 2
-NtGdiDdCreateSurfaceObject 6
-NtGdiDdDeleteDirectDrawObject 1
-NtGdiDdDeleteSurfaceObject 1
-NtGdiDdDestroyMoComp 2
-NtGdiDdDestroySurface 2
-NtGdiDdDestroyD3DBuffer 1
-NtGdiDdEndMoCompFrame 2
-NtGdiDdFlip 5
-NtGdiDdFlipToGDISurface 2
-NtGdiDdGetAvailDriverMemory 2
-NtGdiDdGetBltStatus 2
-NtGdiDdGetDC 2
-NtGdiDdGetDriverInfo 2
-NtGdiDdGetDxHandle 3
-NtGdiDdGetFlipStatus 2
-NtGdiDdGetInternalMoCompInfo 2
-NtGdiDdGetMoCompBuffInfo 2
-NtGdiDdGetMoCompGuids 2
-NtGdiDdGetMoCompFormats 2
-NtGdiDdGetScanLine 2
-NtGdiDdLock 3
-NtGdiDdLockD3D 2
-NtGdiDdQueryDirectDrawObject 11
-NtGdiDdQueryMoCompStatus 2
-NtGdiDdReenableDirectDrawObject 2
-NtGdiDdReleaseDC 1
-NtGdiDdRenderMoComp 2
-NtGdiDdResetVisrgn 2
-NtGdiDdSetColorKey 2
-NtGdiDdSetExclusiveMode 2
-NtGdiDdSetGammaRamp 3
-NtGdiDdCreateSurfaceEx 3
-NtGdiDdSetOverlayPosition 3
-NtGdiDdUnattachSurface 2
-NtGdiDdUnlock 2
-NtGdiDdUnlockD3D 2
-NtGdiDdUpdateOverlay 3
-NtGdiDdWaitForVerticalBlank 2
-NtGdiDvpCanCreateVideoPort 2
-NtGdiDvpColorControl 2
-NtGdiDvpCreateVideoPort 2
-NtGdiDvpDestroyVideoPort 2
-NtGdiDvpFlipVideoPort 4
-NtGdiDvpGetVideoPortBandwidth 2
-NtGdiDvpGetVideoPortField 2
-NtGdiDvpGetVideoPortFlipStatus 2
-NtGdiDvpGetVideoPortInputFormats 2
-NtGdiDvpGetVideoPortLine 2
-NtGdiDvpGetVideoPortOutputFormats 2
-NtGdiDvpGetVideoPortConnectInfo 2
-NtGdiDvpGetVideoSignalStatus 2
-NtGdiDvpUpdateVideoPort 4
-NtGdiDvpWaitForVideoPortSync 2
-NtGdiDeleteClientObj 1
-NtGdiDeleteColorSpace 1
-NtGdiDeleteColorTransform 2
-NtGdiDeleteObjectApp 1
-NtGdiDescribePixelFormat 4
-NtGdiGetPerBandInfo 2
-NtGdiDoBanding 4
-NtGdiDoPalette 6
-NtGdiDrawEscape 4
-NtGdiEllipse 5
-NtGdiEnableEudc 1
-NtGdiEndDoc 1
-NtGdiEndPage 1
-NtGdiEndPath 1
-NtGdiEnumFontChunk 5
-NtGdiEnumFontClose 1
-NtGdiEnumFontOpen 7
-NtGdiEnumObjects 4
-NtGdiEqualRgn 2
-NtGdiEudcEnumFaceNameLinkW 4
-NtGdiEudcLoadUnloadLink 7
-NtGdiExcludeClipRect 5
-NtGdiExtCreatePen 11
-NtGdiExtCreateRegion 3
-NtGdiExtEscape 8
-NtGdiExtFloodFill 5
-NtGdiExtGetObjectW 3
-NtGdiExtSelectClipRgn 3
-NtGdiExtTextOutW 9
-NtGdiFillPath 1
-NtGdiFillRgn 3
-NtGdiFlattenPath 1
-NtGdiFlushUserBatch 0
-NtGdiFlush 0
-NtGdiForceUFIMapping 2
-NtGdiFrameRgn 5
-NtGdiFullscreenControl 5
-NtGdiGetAndSetDCDword 4
-NtGdiGetAppClipBox 2
-NtGdiGetBitmapBits 3
-NtGdiGetBitmapDimension 2
-NtGdiGetBoundsRect 3
-NtGdiGetCharABCWidthsW 6
-NtGdiGetCharacterPlacementW 6
-NtGdiGetCharSet 1
-NtGdiGetCharWidthW 6
-NtGdiGetCharWidthInfo 2
-NtGdiGetColorAdjustment 2
-NtGdiGetColorSpaceforBitmap 1
-NtGdiGetDCDword 3
-NtGdiGetDCforBitmap 1
-NtGdiGetDCObject 2
-NtGdiGetDCPoint 3
-NtGdiGetDeviceCaps 2
-NtGdiGetDeviceGammaRamp 2
-NtGdiGetDeviceCapsAll 2
-NtGdiGetDIBitsInternal 9
-NtGdiGetETM 2
-NtGdiGetEudcTimeStampEx 3
-NtGdiGetFontData 5
-NtGdiGetFontResourceInfoInternalW 7
-NtGdiGetGlyphIndicesW 5
-NtGdiGetGlyphIndicesWInternal 6
-NtGdiGetGlyphOutline 8
-NtGdiGetKerningPairs 3
-NtGdiGetLinkedUFIs 3
-NtGdiGetMiterLimit 2
-NtGdiGetMonitorID 3
-NtGdiGetNearestColor 2
-NtGdiGetNearestPaletteIndex 2
-NtGdiGetObjectBitmapHandle 2
-NtGdiGetOutlineTextMetricsInternalW 4
-NtGdiGetPath 4
-NtGdiGetPixel 3
-NtGdiGetRandomRgn 3
-NtGdiGetRasterizerCaps 2
-NtGdiGetRealizationInfo 2
-NtGdiGetRegionData 3
-NtGdiGetRgnBox 2
-NtGdiGetServerMetaFileBits 7
-NtGdiGetSpoolMessage 4
-NtGdiGetStats 5
-NtGdiGetStockObject 1
-NtGdiGetStringBitmapW 5
-NtGdiGetSystemPaletteUse 1
-NtGdiGetTextCharsetInfo 3
-NtGdiGetTextExtent 5
-NtGdiGetTextExtentExW 8
-NtGdiGetTextFaceW 4
-NtGdiGetTextMetricsW 3
-NtGdiGetTransform 3
-NtGdiGetUFI 6
-NtGdiGetUFIPathname 10
-NtGdiGetFontUnicodeRanges 2
-NtGdiGetWidthTable 7
-NtGdiGradientFill 6
-NtGdiHfontCreate 5
-NtGdiIcmBrushInfo 8
-NtGdiInit 0
-NtGdiInitSpool 0
-NtGdiIntersectClipRect 5
-NtGdiInvertRgn 2
-NtGdiLineTo 3
-NtGdiMakeFontDir 5
-NtGdiMakeInfoDC 2
-NtGdiMaskBlt 13
-NtGdiModifyWorldTransform 3
-NtGdiMonoBitmap 1
-NtGdiMoveTo 4
-NtGdiOffsetClipRgn 3
-NtGdiOffsetRgn 3
-NtGdiOpenDCW 7
-NtGdiPatBlt 6
-NtGdiPolyPatBlt 5
-NtGdiPathToRegion 1
-NtGdiPlgBlt 11
-NtGdiPolyDraw 4
-NtGdiPolyPolyDraw 5
-NtGdiPolyTextOutW 4
-NtGdiPtInRegion 3
-NtGdiPtVisible 3
-NtGdiQueryFonts 3
-NtGdiQueryFontAssocInfo 1
-NtGdiRectangle 5
-NtGdiRectInRegion 2
-NtGdiRectVisible 2
-NtGdiRemoveFontResourceW 6
-NtGdiRemoveFontMemResourceEx 1
-NtGdiResetDC 5
-NtGdiResizePalette 2
-NtGdiRestoreDC 2
-NtGdiRoundRect 7
-NtGdiSaveDC 1
-NtGdiScaleViewportExtEx 6
-NtGdiScaleWindowExtEx 6
-NtGdiSelectBitmap 2
-NtGdiSelectBrush 2
-NtGdiSelectClipPath 2
-NtGdiSelectFont 2
-NtGdiSelectPen 2
-NtGdiSetBitmapBits 3
-NtGdiSetBitmapDimension 4
-NtGdiSetBoundsRect 3
-NtGdiSetBrushOrg 4
-NtGdiSetColorAdjustment 2
-NtGdiSetColorSpace 2
-NtGdiSetDeviceGammaRamp 2
-NtGdiSetDIBitsToDeviceInternal 16
-NtGdiSetFontEnumeration 1
-NtGdiSetFontXform 3
-NtGdiSetIcmMode 3
-NtGdiSetLinkedUFIs 3
-NtGdiSetMagicColors 3
-NtGdiSetMetaRgn 1
-NtGdiSetMiterLimit 3
-NtGdiGetDeviceWidth 1
-NtGdiMirrorWindowOrg 1
-NtGdiSetLayout 3
-NtGdiSetPixel 4
-NtGdiSetPixelFormat 2
-NtGdiSetRectRgn 5
-NtGdiSetSystemPaletteUse 2
-NtGdiSetTextJustification 3
-NtGdiSetupPublicCFONT 3
-NtGdiSetVirtualResolution 5
-NtGdiSetSizeDevice 3
-NtGdiStartDoc 4
-NtGdiStartPage 1
-NtGdiStretchBlt 12
-NtGdiStretchDIBitsInternal 16
-NtGdiStrokeAndFillPath 1
-NtGdiStrokePath 1
-NtGdiSwapBuffers 1
-NtGdiTransformPoints 5
-NtGdiTransparentBlt 11
-NtGdiUnloadPrinterDriver 2
-NtGdiUnmapMemFont 1
-NtGdiUnrealizeObject 1
-NtGdiUpdateColors 1
-NtGdiWidenPath 1
-NtUserActivateKeyboardLayout 2
-NtUserAlterWindowStyle 3
-NtUserAssociateInputContext 3
-NtUserAttachThreadInput 3
-NtUserBeginPaint 2
-NtUserBitBltSysBmp 8
-NtUserBlockInput 1
-NtUserBuildHimcList 4
-NtUserBuildHwndList 7
-NtUserBuildNameList 4
-NtUserBuildPropList 4
-NtUserCallHwnd 2
-NtUserCallHwndLock 2
-NtUserCallHwndOpt 2
-NtUserCallHwndParam 3
-NtUserCallHwndParamLock 3
-NtUserCallMsgFilter 2
-NtUserCallNextHookEx 4
-NtUserCallNoParam 1
-NtUserCallOneParam 1
-NtUserCallTwoParam 3
-NtUserChangeClipboardChain 2
-NtUserChangeDisplaySettings 5
-NtUserCheckImeHotKey 3
-NtUserCheckMenuItem 3
-NtUserChildWindowFromPointEx 4
-NtUserClipCursor 1
-NtUserCloseClipboard 0
-NtUserCloseDesktop 1
-NtUserCloseWindowStation 1
-NtUserConsoleControl 3
-NtUserConvertMemHandle 2
-NtUserCopyAcceleratorTable 3
-NtUserCountClipboardFormats 1
-NtUserCreateAcceleratorTable 2
-NtUserCreateCaret 4
-NtUserCreateDesktop 5
-NtUserCreateInputContext 1
-NtUserCreateLocalMemHandle 4
-NtUserCreateWindowEx 13
-NtUserCreateWindowStation 6
-NtUserDdeGetQualityOfService 3
-NtUserDdeInitialize 5
-NtUserDdeSetQualityOfService 3
-NtUserDeferWindowPos 8
-NtUserDefSetText 2
-NtUserDeleteMenu 3
-NtUserDestroyAcceleratorTable 1
-NtUserDestroyCursor 2
-NtUserDestroyInputContext 1
-NtUserDestroyMenu 1
-NtUserDestroyWindow 1
-NtUserDisableThreadIme 1
-NtUserDispatchMessage 1
-NtUserDragDetect 3
-NtUserDragObject 5
-NtUserDrawAnimatedRects 4
-NtUserDrawCaption 4
-NtUserDrawCaptionTemp 7
-NtUserDrawIconEx 11
-NtUserDrawMenuBarTemp 5
-NtUserEmptyClipboard 0
-NtUserEnableMenuItem 3
-NtUserEnableScrollBar 3
-NtUserEndDeferWindowPosEx 2
-NtUserEndMenu 0
-NtUserEndPaint 2
-NtUserEnumDisplayDevices 4
-NtUserEnumDisplayMonitors 4
-NtUserEnumDisplaySettings 4
-NtUserEvent 1
-NtUserExcludeUpdateRgn 2
-NtUserFillWindow 4
-NtUserFindExistingCursorIcon 3
-NtUserFindWindowEx 5
-NtUserFlashWindowEx 1
-NtUserGetAltTabInfo 6
-NtUserGetAncestor 2
-NtUserGetAppImeLevel 1
-NtUserGetAsyncKeyState 1
-NtUserGetCaretBlinkTime 0
-NtUserGetCaretPos 1
-NtUserGetClassInfo 5
-NtUserGetClassName 3
-NtUserGetClipboardData 2
-NtUserGetClipboardFormatName 3
-NtUserGetClipboardOwner 0
-NtUserGetClipboardSequenceNumber 0
-NtUserGetClipboardViewer 0
-NtUserGetClipCursor 1
-NtUserGetComboBoxInfo 2
-NtUserGetControlBrush 3
-NtUserGetControlColor 4
-NtUserGetCPD 3
-NtUserGetCursorFrameInfo 4
-NtUserGetCursorInfo 1
-NtUserGetDC 1
-NtUserGetDCEx 3
-NtUserGetDoubleClickTime 0
-NtUserGetForegroundWindow 0
-NtUserGetGuiResources 2
-NtUserGetGUIThreadInfo 2
-NtUserGetIconInfo 6
-NtUserGetIconSize 4
-NtUserGetImeHotKey 4
-NtUserGetImeInfoEx 2
-NtUserGetInternalWindowPos 3
-NtUserGetKeyboardLayoutList 2
-NtUserGetKeyboardLayoutName 1
-NtUserGetKeyboardState 1
-NtUserGetKeyNameText 3
-NtUserGetKeyState 1
-NtUserGetListBoxInfo 1
-NtUserGetMenuBarInfo 4
-NtUserGetMenuIndex 2
-NtUserGetMenuItemRect 4
-NtUserGetMessage 4
-NtUserGetMouseMovePointsEx 5
-NtUserGetObjectInformation 5
-NtUserGetOpenClipboardWindow 0
-NtUserGetPriorityClipboardFormat 2
-NtUserGetProcessWindowStation 0
-NtUserGetScrollBarInfo 3
-NtUserGetSystemMenu 2
-NtUserGetThreadDesktop 2
-NtUserGetThreadState 1
-NtUserGetTitleBarInfo 2
-NtUserGetUpdateRect 3
-NtUserGetUpdateRgn 3
-NtUserGetWindowDC 1
-NtUserGetWindowPlacement 2
-NtUserGetWOWClass 2
-NtUserHardErrorControl 3
-NtUserHideCaret 1
-NtUserHiliteMenuItem 4
-NtUserImpersonateDdeClientWindow 2
-NtUserInitialize 3
-NtUserInitializeClientPfnArrays 4
-NtUserInitTask 11
-NtUserInternalGetWindowText 3
-NtUserInvalidateRect 3
-NtUserInvalidateRgn 3
-NtUserIsClipboardFormatAvailable 1
-NtUserKillTimer 2
-NtUserLoadKeyboardLayoutEx 6
-NtUserLockWindowStation 1
-NtUserLockWindowUpdate 1
-NtUserLockWorkStation 0
-NtUserMapVirtualKeyEx 4
-NtUserMenuItemFromPoint 4
-NtUserMessageCall 7
-NtUserMinMaximize 3
-NtUserMNDragLeave 1
-NtUserMNDragOver 2
-NtUserModifyUserStartupInfoFlags 2
-NtUserMoveWindow 6
-NtUserNotifyIMEStatus 3
-NtUserNotifyProcessCreate 4
-NtUserNotifyWinEvent 4
-NtUserOpenClipboard 2
-NtUserOpenDesktop 3
-NtUserOpenInputDesktop 3
-NtUserOpenWindowStation 2
-NtUserPaintDesktop 1
-NtUserPeekMessage 5
-NtUserPostMessage 4
-NtUserPostThreadMessage 4
-NtUserProcessConnect 3
-NtUserQueryInformationThread 5
-NtUserQueryInputContext 2
-NtUserQuerySendMessage 1
-NtUserQueryUserCounters 5
-NtUserQueryWindow 2
-NtUserRealChildWindowFromPoint 3
-NtUserRedrawWindow 4
-NtUserRegisterClassExWOW 6
-NtUserRegisterHotKey 4
-NtUserRegisterTasklist 1
-NtUserRegisterWindowMessage 1
-NtUserRemoveMenu 3
-NtUserRemoveProp 2
-NtUserResolveDesktop 4
-NtUserResolveDesktopForWOW 1
-NtUserSBGetParms 4
-NtUserScrollDC 7
-NtUserScrollWindowEx 8
-NtUserSelectPalette 3
-NtUserSendInput 3
-NtUserSendMessageCallback 6
-NtUserSendNotifyMessage 4
-NtUserSetActiveWindow 1
-NtUserSetAppImeLevel 2
-NtUserSetCapture 1
-NtUserSetClassLong 4
-NtUserSetClassWord 3
-NtUserSetClipboardData 3
-NtUserSetClipboardViewer 1
-NtUserSetConsoleReserveKeys 2
-NtUserSetCursor 1
-NtUserSetCursorContents 2
-NtUserSetCursorIconData 4
-NtUserSetDbgTag 2
-NtUserSetFocus 1
-NtUserSetImeHotKey 5
-NtUserSetImeInfoEx 1
-NtUserSetImeOwnerWindow 2
-NtUserSetInformationProcess 4
-NtUserSetInformationThread 5
-NtUserSetInternalWindowPos 4
-NtUserSetKeyboardState 1
-NtUserSetLogonNotifyWindow 1
-NtUserSetMenu 3
-NtUserSetMenuContextHelpId 2
-NtUserSetMenuDefaultItem 3
-NtUserSetMenuFlagRtoL 1
-NtUserSetObjectInformation 4
-NtUserSetParent 2
-NtUserSetProcessWindowStation 1
-NtUserSetProp 3
-NtUserSetRipFlags 2
-NtUserSetScrollInfo 4
-NtUserSetShellWindowEx 2
-NtUserSetSysColors 4
-NtUserSetSystemCursor 2
-NtUserSetSystemMenu 2
-NtUserSetSystemTimer 4
-NtUserSetThreadDesktop 1
-NtUserSetThreadLayoutHandles 2
-NtUserSetThreadState 2
-NtUserSetTimer 4
-NtUserSetWindowFNID 2
-NtUserSetWindowLong 4
-NtUserSetWindowPlacement 2
-NtUserSetWindowPos 7
-NtUserSetWindowRgn 3
-NtUserSetWindowsHookAW 3
-NtUserSetWindowsHookEx 6
-NtUserSetWindowStationUser 4
-NtUserSetWindowWord 3
-NtUserSetWinEventHook 8
-NtUserShowCaret 1
-NtUserShowScrollBar 3
-NtUserShowWindow 2
-NtUserShowWindowAsync 2
-NtUserSoundSentry 0
-NtUserSwitchDesktop 1
-NtUserSystemParametersInfo 4
-NtUserTestForInteractiveUser 1
-NtUserThunkedMenuInfo 2
-NtUserThunkedMenuItemInfo 6
-NtUserToUnicodeEx 7
-NtUserTrackMouseEvent 1
-NtUserTrackPopupMenuEx 6
-NtUserTranslateAccelerator 3
-NtUserTranslateMessage 2
-NtUserUnhookWindowsHookEx 1
-NtUserUnhookWinEvent 1
-NtUserUnloadKeyboardLayout 1
-NtUserUnlockWindowStation 1
-NtUserUnregisterClass 3
-NtUserUnregisterHotKey 2
-NtUserUpdateInputContext 3
-NtUserUpdateInstance 3
-NtUserUpdateLayeredWindow 9
-NtUserSetLayeredWindowAttributes 4
-NtUserUpdatePerUserSystemParameters 2
-NtUserUserHandleGrantAccess 3
-NtUserValidateHandleSecure 1
-NtUserValidateRect 2
-NtUserVkKeyScanEx 3
-NtUserWaitForInputIdle 3
-NtUserWaitForMsgAndEvent 1
-NtUserWaitMessage 0
-NtUserWin32PoolAllocationStats 6
-NtUserWindowFromPoint 2
-NtUserYieldTask 0
-NtUserRemoteConnect 3
-NtUserRemoteRedrawRectangle 4
-NtUserRemoteRedrawScreen 0
-NtUserRemoteStopScreenUpdates 0
-NtUserCtxDisplayIOCtl 3
-NtGdiEngAssociateSurface 3
-NtGdiEngCreateBitmap 6
-NtGdiEngCreateDeviceSurface 4
-NtGdiEngCreateDeviceBitmap 4
-NtGdiEngCreatePalette 6
-NtGdiEngComputeGlyphSet 3
-NtGdiEngCopyBits 6
-NtGdiEngDeletePalette 1
-NtGdiEngDeleteSurface 1
-NtGdiEngEraseSurface 3
-NtGdiEngUnlockSurface 1
-NtGdiEngLockSurface 1
-NtGdiEngBitBlt 11
-NtGdiEngStretchBlt 11
-NtGdiEngPlgBlt 11
-NtGdiEngMarkBandingSurface 1
-NtGdiEngStrokePath 8
-NtGdiEngFillPath 7
-NtGdiEngStrokeAndFillPath 10
-NtGdiEngPaint 5
-NtGdiEngLineTo 9
-NtGdiEngAlphaBlend 7
-NtGdiEngGradientFill 10
-NtGdiEngTransparentBlt 8
-NtGdiEngTextOut 10
-NtGdiEngStretchBltROP 13
-NtGdiXLATEOBJ_cGetPalette 4
-NtGdiXLATEOBJ_iXlate 2
-NtGdiXLATEOBJ_hGetColorTransform 1
-NtGdiCLIPOBJ_bEnum 3
-NtGdiCLIPOBJ_cEnumStart 5
-NtGdiCLIPOBJ_ppoGetPath 1
-NtGdiEngDeletePath 1
-NtGdiEngCreateClip 0
-NtGdiEngDeleteClip 1
-NtGdiBRUSHOBJ_ulGetBrushColor 1
-NtGdiBRUSHOBJ_pvAllocRbrush 2
-NtGdiBRUSHOBJ_pvGetRbrush 1
-NtGdiBRUSHOBJ_hGetColorTransform 1
-NtGdiXFORMOBJ_bApplyXform 5
-NtGdiXFORMOBJ_iGetXform 2
-NtGdiFONTOBJ_vGetInfo 3
-NtGdiFONTOBJ_pxoGetXform 1
-NtGdiFONTOBJ_cGetGlyphs 5
-NtGdiFONTOBJ_pifi 1
-NtGdiFONTOBJ_pfdg 1
-NtGdiFONTOBJ_pQueryGlyphAttrs 2
-NtGdiFONTOBJ_pvTrueTypeFontFile 2
-NtGdiFONTOBJ_cGetAllGlyphHandles 2
-NtGdiSTROBJ_bEnum 3
-NtGdiSTROBJ_bEnumPositionsOnly 3
-NtGdiSTROBJ_bGetAdvanceWidths 4
-NtGdiSTROBJ_vEnumStart 1
-NtGdiSTROBJ_dwGetCodePage 1
-NtGdiPATHOBJ_vGetBounds 2
-NtGdiPATHOBJ_bEnum 2
-NtGdiPATHOBJ_vEnumStart 1
-NtGdiPATHOBJ_vEnumStartClipLines 4
-NtGdiPATHOBJ_bEnumClipLines 3
-NtGdiGetDhpdev 1
-NtGdiEngCheckAbort 1
-NtGdiHT_Get8BPPFormatPalette 4
-NtGdiHT_Get8BPPMaskPalette 6
-NtGdiUpdateTransform 1
-NtUserValidateTimerCallback 3
--- /dev/null
+; $Id: w32kdll.def 27344 2007-08-01 14:12:10Z tkreuzer $
+;
+; ReactOS Operating System
+;
+; This file contains all win32k native api functions from win xp
+; unsupported functions are commented out.
+;
+LIBRARY w32kdll.dll
+
+EXPORTS
+NtGdiAbortDoc
+NtGdiAbortPath
+NtGdiAddFontResourceW
+NtGdiAddRemoteFontToDC
+NtGdiAddFontMemResourceEx
+NtGdiRemoveMergeFont
+NtGdiAddRemoteMMInstanceToDC
+NtGdiAlphaBlend
+NtGdiAngleArc
+NtGdiAnyLinkedFonts
+NtGdiFontIsLinked
+NtGdiArcInternal
+NtGdiBeginPath
+NtGdiBitBlt
+NtGdiCancelDC
+NtGdiCheckBitmapBits
+NtGdiCloseFigure
+NtGdiClearBitmapAttributes
+NtGdiClearBrushAttributes
+NtGdiColorCorrectPalette
+NtGdiCombineRgn
+NtGdiCombineTransform
+NtGdiComputeXformCoefficients
+NtGdiConsoleTextOut
+NtGdiConvertMetafileRect
+NtGdiCreateBitmap
+NtGdiCreateClientObj
+NtGdiCreateColorSpace
+NtGdiCreateColorTransform
+NtGdiCreateCompatibleBitmap
+NtGdiCreateCompatibleDC
+NtGdiCreateDIBBrush
+NtGdiCreateDIBitmapInternal
+NtGdiCreateDIBSection
+NtGdiCreateEllipticRgn
+NtGdiCreateHalftonePalette
+NtGdiCreateHatchBrushInternal
+NtGdiCreateMetafileDC
+NtGdiCreatePaletteInternal
+NtGdiCreatePatternBrushInternal
+NtGdiCreatePen
+NtGdiCreateRectRgn
+NtGdiCreateRoundRectRgn
+NtGdiCreateServerMetaFile
+NtGdiCreateSolidBrush
+NtGdiD3dContextCreate
+NtGdiD3dContextDestroy
+NtGdiD3dContextDestroyAll
+NtGdiD3dValidateTextureStageState
+NtGdiD3dDrawPrimitives2
+NtGdiDdGetDriverState
+NtGdiDdAddAttachedSurface
+NtGdiDdAlphaBlt
+NtGdiDdAttachSurface
+NtGdiDdBeginMoCompFrame
+NtGdiDdBlt
+NtGdiDdCanCreateSurface
+NtGdiDdCanCreateD3DBuffer
+NtGdiDdColorControl
+NtGdiDdCreateDirectDrawObject
+NtGdiDdCreateSurface
+NtGdiDdCreateD3DBuffer
+NtGdiDdCreateMoComp
+NtGdiDdCreateSurfaceObject
+NtGdiDdDeleteDirectDrawObject
+NtGdiDdDeleteSurfaceObject
+NtGdiDdDestroyMoComp
+NtGdiDdDestroySurface
+NtGdiDdDestroyD3DBuffer
+NtGdiDdEndMoCompFrame
+NtGdiDdFlip
+NtGdiDdFlipToGDISurface
+NtGdiDdGetAvailDriverMemory
+NtGdiDdGetBltStatus
+NtGdiDdGetDC
+NtGdiDdGetDriverInfo
+NtGdiDdGetDxHandle
+NtGdiDdGetFlipStatus
+NtGdiDdGetInternalMoCompInfo
+NtGdiDdGetMoCompBuffInfo
+NtGdiDdGetMoCompGuids
+NtGdiDdGetMoCompFormats
+NtGdiDdGetScanLine
+NtGdiDdLock
+NtGdiDdLockD3D
+NtGdiDdQueryDirectDrawObject
+NtGdiDdQueryMoCompStatus
+NtGdiDdReenableDirectDrawObject
+NtGdiDdReleaseDC
+NtGdiDdRenderMoComp
+NtGdiDdResetVisrgn
+NtGdiDdSetColorKey
+NtGdiDdSetExclusiveMode
+NtGdiDdSetGammaRamp
+NtGdiDdCreateSurfaceEx
+NtGdiDdSetOverlayPosition
+NtGdiDdUnattachSurface
+NtGdiDdUnlock
+NtGdiDdUnlockD3D
+NtGdiDdUpdateOverlay
+NtGdiDdWaitForVerticalBlank
+NtGdiDvpCanCreateVideoPort
+NtGdiDvpColorControl
+NtGdiDvpCreateVideoPort
+NtGdiDvpDestroyVideoPort
+NtGdiDvpFlipVideoPort
+NtGdiDvpGetVideoPortBandwidth
+NtGdiDvpGetVideoPortField
+NtGdiDvpGetVideoPortFlipStatus
+NtGdiDvpGetVideoPortInputFormats
+NtGdiDvpGetVideoPortLine
+NtGdiDvpGetVideoPortOutputFormats
+NtGdiDvpGetVideoPortConnectInfo
+NtGdiDvpGetVideoSignalStatus
+NtGdiDvpUpdateVideoPort
+NtGdiDvpWaitForVideoPortSync
+NtGdiDvpAcquireNotification
+NtGdiDvpReleaseNotification
+NtGdiDxgGenericThunk
+NtGdiDeleteClientObj
+NtGdiDeleteColorSpace
+NtGdiDeleteColorTransform
+NtGdiDeleteObjectApp
+NtGdiDescribePixelFormat
+NtGdiGetPerBandInfo
+NtGdiDoBanding
+NtGdiDoPalette
+NtGdiDrawEscape
+NtGdiEllipse
+NtGdiEnableEudc
+NtGdiEndDoc
+NtGdiEndPage
+NtGdiEndPath
+NtGdiEnumFontChunk
+NtGdiEnumFontClose
+NtGdiEnumFontOpen
+NtGdiEnumObjects
+NtGdiEqualRgn
+NtGdiEudcLoadUnloadLink
+NtGdiExcludeClipRect
+NtGdiExtCreatePen
+NtGdiExtCreateRegion
+NtGdiExtEscape
+NtGdiExtFloodFill
+NtGdiExtGetObjectW
+NtGdiExtSelectClipRgn
+NtGdiExtTextOutW
+NtGdiFillPath
+NtGdiFillRgn
+NtGdiFlattenPath
+NtGdiFlushUserBatch
+NtGdiFlush
+NtGdiForceUFIMapping
+NtGdiFrameRgn
+NtGdiFullscreenControl
+NtGdiGetAndSetDCDword
+NtGdiGetAppClipBox
+NtGdiGetBitmapBits
+NtGdiGetBitmapDimension
+NtGdiGetBoundsRect
+NtGdiGetCharABCWidthsW
+NtGdiGetCharacterPlacementW
+NtGdiGetCharSet
+NtGdiGetCharWidthW
+NtGdiGetCharWidthInfo
+NtGdiGetColorAdjustment
+NtGdiGetColorSpaceforBitmap
+NtGdiGetDCDword
+NtGdiGetDCforBitmap
+NtGdiGetDCObject
+NtGdiGetDCPoint
+NtGdiGetDeviceCaps
+NtGdiGetDeviceGammaRamp
+NtGdiGetDeviceCapsAll
+NtGdiGetDIBitsInternal
+NtGdiGetETM
+NtGdiGetEudcTimeStampEx
+NtGdiGetFontData
+NtGdiGetFontResourceInfoInternalW
+NtGdiGetGlyphIndicesW
+NtGdiGetGlyphIndicesWInternal
+NtGdiGetGlyphOutline
+NtGdiGetKerningPairs
+NtGdiGetLinkedUFIs
+NtGdiGetMiterLimit
+NtGdiGetMonitorID
+NtGdiGetNearestColor
+NtGdiGetNearestPaletteIndex
+NtGdiGetObjectBitmapHandle
+NtGdiGetOutlineTextMetricsInternalW
+NtGdiGetPath
+NtGdiGetPixel
+NtGdiGetRandomRgn
+NtGdiGetRasterizerCaps
+NtGdiGetRealizationInfo
+NtGdiGetRegionData
+NtGdiGetRgnBox
+NtGdiGetServerMetaFileBits
+NtGdiGetSpoolMessage
+NtGdiGetStats
+NtGdiGetStockObject
+NtGdiGetStringBitmapW
+NtGdiGetSystemPaletteUse
+NtGdiGetTextCharsetInfo
+NtGdiGetTextExtent
+NtGdiGetTextExtentExW
+NtGdiGetTextFaceW
+NtGdiGetTextMetricsW
+NtGdiGetTransform
+NtGdiGetUFI
+NtGdiGetEmbUFI
+NtGdiGetUFIPathname
+NtGdiGetEmbedFonts
+NtGdiChangeGhostFont
+NtGdiAddEmbFontToDC
+NtGdiGetFontUnicodeRanges
+NtGdiGetWidthTable
+NtGdiGradientFill
+NtGdiHfontCreate
+NtGdiIcmBrushInfo
+NtGdiInit
+NtGdiInitSpool
+NtGdiIntersectClipRect
+NtGdiInvertRgn
+NtGdiLineTo
+NtGdiMakeFontDir
+NtGdiMakeInfoDC
+NtGdiMaskBlt
+NtGdiModifyWorldTransform
+NtGdiMonoBitmap
+NtGdiMoveTo
+NtGdiOffsetClipRgn
+NtGdiOffsetRgn
+NtGdiOpenDCW
+NtGdiPatBlt
+NtGdiPolyPatBlt
+NtGdiPathToRegion
+NtGdiPlgBlt
+NtGdiPolyDraw
+NtGdiPolyPolyDraw
+NtGdiPolyTextOutW
+NtGdiPtInRegion
+NtGdiPtVisible
+NtGdiQueryFonts
+NtGdiQueryFontAssocInfo
+NtGdiRectangle
+NtGdiRectInRegion
+NtGdiRectVisible
+NtGdiRemoveFontResourceW
+NtGdiRemoveFontMemResourceEx
+NtGdiResetDC
+NtGdiResizePalette
+NtGdiRestoreDC
+NtGdiRoundRect
+NtGdiSaveDC
+NtGdiScaleViewportExtEx
+NtGdiScaleWindowExtEx
+NtGdiSelectBitmap
+NtGdiSelectBrush
+NtGdiSelectClipPath
+NtGdiSelectFont
+NtGdiSelectPen
+NtGdiSetBitmapAttributes
+NtGdiSetBitmapBits
+NtGdiSetBitmapDimension
+NtGdiSetBoundsRect
+NtGdiSetBrushAttributes
+NtGdiSetBrushOrg
+NtGdiSetColorAdjustment
+NtGdiSetColorSpace
+NtGdiSetDeviceGammaRamp
+NtGdiSetDIBitsToDeviceInternal
+NtGdiSetFontEnumeration
+NtGdiSetFontXform
+NtGdiSetIcmMode
+NtGdiSetLinkedUFIs
+NtGdiSetMagicColors
+NtGdiSetMetaRgn
+NtGdiSetMiterLimit
+NtGdiGetDeviceWidth
+NtGdiMirrorWindowOrg
+NtGdiSetLayout
+NtGdiSetPixel
+NtGdiSetPixelFormat
+NtGdiSetRectRgn
+NtGdiSetSystemPaletteUse
+NtGdiSetTextJustification
+NtGdiSetupPublicCFONT
+NtGdiSetVirtualResolution
+NtGdiSetSizeDevice
+NtGdiStartDoc
+NtGdiStartPage
+NtGdiStretchBlt
+NtGdiStretchDIBitsInternal
+NtGdiStrokeAndFillPath
+NtGdiStrokePath
+NtGdiSwapBuffers
+NtGdiTransformPoints
+NtGdiTransparentBlt
+NtGdiUnloadPrinterDriver
+NtGdiUnmapMemFont
+NtGdiUnrealizeObject
+NtGdiUpdateColors
+NtGdiWidenPath
+NtUserActivateKeyboardLayout
+NtUserAlterWindowStyle
+NtUserAssociateInputContext
+NtUserAttachThreadInput
+NtUserBeginPaint
+NtUserBitBltSysBmp
+NtUserBlockInput
+NtUserBuildHimcList
+NtUserBuildHwndList
+NtUserBuildNameList
+NtUserBuildPropList
+NtUserCallHwnd
+NtUserCallHwndLock
+NtUserCallHwndOpt
+NtUserCallHwndParam
+NtUserCallHwndParamLock
+NtUserCallMsgFilter
+NtUserCallNextHookEx
+NtUserCallNoParam
+NtUserCallOneParam
+NtUserCallTwoParam
+NtUserChangeClipboardChain
+NtUserChangeDisplaySettings
+NtUserCheckImeHotKey
+NtUserCheckMenuItem
+NtUserChildWindowFromPointEx
+NtUserClipCursor
+NtUserCloseClipboard
+NtUserCloseDesktop
+NtUserCloseWindowStation
+NtUserConsoleControl
+NtUserConvertMemHandle
+NtUserCopyAcceleratorTable
+NtUserCountClipboardFormats
+NtUserCreateAcceleratorTable
+NtUserCreateCaret
+NtUserCreateDesktop
+NtUserCreateInputContext
+NtUserCreateLocalMemHandle
+NtUserCreateWindowEx
+NtUserCreateWindowStation
+NtUserDdeGetQualityOfService
+NtUserDdeInitialize
+NtUserDdeSetQualityOfService
+NtUserDeferWindowPos
+NtUserDefSetText
+NtUserDeleteMenu
+NtUserDestroyAcceleratorTable
+NtUserDestroyCursor
+NtUserDestroyInputContext
+NtUserDestroyMenu
+NtUserDestroyWindow
+NtUserDisableThreadIme
+NtUserDispatchMessage
+NtUserDragDetect
+NtUserDragObject
+NtUserDrawAnimatedRects
+NtUserDrawCaption
+NtUserDrawCaptionTemp
+NtUserDrawIconEx
+NtUserDrawMenuBarTemp
+NtUserEmptyClipboard
+NtUserEnableMenuItem
+NtUserEnableScrollBar
+NtUserEndDeferWindowPosEx
+NtUserEndMenu
+NtUserEndPaint
+NtUserEnumDisplayDevices
+;NtUserEnumDisplayMonitors
+NtUserEnumDisplaySettings
+NtUserEvent
+NtUserExcludeUpdateRgn
+NtUserFillWindow
+;NtUserFindExistingCursorIcon
+NtUserFindWindowEx
+NtUserFlashWindowEx
+NtUserGetAltTabInfo
+NtUserGetAncestor
+;NtUserGetAppImeLevel
+NtUserGetAsyncKeyState
+NtUserGetAtomName
+NtUserGetCaretBlinkTime
+NtUserGetCaretPos
+;NtUserGetClassInfo
+NtUserGetClassName
+NtUserGetClipboardData
+NtUserGetClipboardFormatName
+NtUserGetClipboardOwner
+NtUserGetClipboardSequenceNumber
+NtUserGetClipboardViewer
+NtUserGetClipCursor
+NtUserGetComboBoxInfo
+NtUserGetControlBrush
+NtUserGetControlColor
+NtUserGetCPD
+NtUserGetCursorFrameInfo
+NtUserGetCursorInfo
+NtUserGetDC
+NtUserGetDCEx
+NtUserGetDoubleClickTime
+NtUserGetForegroundWindow
+NtUserGetGuiResources
+NtUserGetGUIThreadInfo
+NtUserGetIconInfo
+NtUserGetIconSize
+NtUserGetImeHotKey
+NtUserGetImeInfoEx
+NtUserGetInternalWindowPos
+NtUserGetKeyboardLayoutList
+NtUserGetKeyboardLayoutName
+NtUserGetKeyboardState
+NtUserGetKeyNameText
+NtUserGetKeyState
+NtUserGetListBoxInfo
+NtUserGetMenuBarInfo
+NtUserGetMenuIndex
+NtUserGetMenuItemRect
+NtUserGetMessage
+NtUserGetMouseMovePointsEx
+NtUserGetObjectInformation
+NtUserGetOpenClipboardWindow
+NtUserGetPriorityClipboardFormat
+NtUserGetProcessWindowStation
+NtUserGetRawInputBuffer
+NtUserGetRawInputData
+NtUserGetRawInputDeviceInfo
+NtUserGetRawInputDeviceList
+NtUserGetRegisteredRawInputDevices
+NtUserGetScrollBarInfo
+NtUserGetSystemMenu
+NtUserGetThreadDesktop
+NtUserGetThreadState
+NtUserGetTitleBarInfo
+NtUserGetUpdateRect
+NtUserGetUpdateRgn
+NtUserGetWindowDC
+NtUserGetWindowPlacement
+NtUserGetWOWClass
+NtUserHardErrorControl
+NtUserHideCaret
+NtUserHiliteMenuItem
+NtUserImpersonateDdeClientWindow
+NtUserInitialize
+NtUserInitializeClientPfnArrays
+;NtUserInitTask8
+NtUserInternalGetWindowText
+NtUserInvalidateRect
+NtUserInvalidateRgn
+NtUserIsClipboardFormatAvailable
+NtUserKillTimer
+NtUserLoadKeyboardLayoutEx
+NtUserLockWindowStation
+NtUserLockWindowUpdate
+NtUserLockWorkStation
+NtUserMapVirtualKeyEx
+NtUserMenuItemFromPoint
+NtUserMessageCall
+NtUserMinMaximize
+NtUserMNDragLeave
+NtUserMNDragOver
+NtUserModifyUserStartupInfoFlags
+NtUserMoveWindow
+NtUserNotifyIMEStatus
+NtUserNotifyProcessCreate
+NtUserNotifyWinEvent
+NtUserOpenClipboard
+NtUserOpenDesktop
+NtUserOpenInputDesktop
+NtUserOpenWindowStation
+NtUserPaintDesktop
+NtUserPeekMessage
+NtUserPostMessage
+NtUserPostThreadMessage
+NtUserPrintWindow
+NtUserProcessConnect
+NtUserQueryInformationThread
+NtUserQueryInputContext
+NtUserQuerySendMessage
+NtUserQueryUserCounters
+NtUserQueryWindow
+NtUserRealChildWindowFromPoint
+NtUserRealInternalGetMessage
+NtUserRealWaitMessageEx
+NtUserRedrawWindow
+NtUserRegisterClassExWOW
+NtUserRegisterUserApiHook
+NtUserRegisterHotKey
+NtUserRegisterRawInputDevices
+NtUserRegisterTasklist
+NtUserRegisterWindowMessage
+NtUserRemoveMenu
+NtUserRemoveProp
+NtUserResolveDesktop
+NtUserResolveDesktopForWOW
+NtUserSBGetParms
+NtUserScrollDC
+NtUserScrollWindowEx
+NtUserSelectPalette
+NtUserSendInput
+NtUserSetActiveWindow
+NtUserSetAppImeLevel
+NtUserSetCapture
+NtUserSetClassLong
+NtUserSetClassWord
+NtUserSetClipboardData
+NtUserSetClipboardViewer
+NtUserSetConsoleReserveKeys
+NtUserSetCursor
+NtUserSetCursorContents
+;NtUserSetCursorIconData
+NtUserSetDbgTag
+NtUserSetFocus
+NtUserSetImeHotKey
+NtUserSetImeInfoEx
+NtUserSetImeOwnerWindow
+NtUserSetInformationProcess
+NtUserSetInformationThread
+NtUserSetInternalWindowPos
+NtUserSetKeyboardState
+NtUserSetLogonNotifyWindow
+NtUserSetMenu
+NtUserSetMenuContextHelpId
+NtUserSetMenuDefaultItem
+NtUserSetMenuFlagRtoL
+NtUserSetObjectInformation
+NtUserSetParent
+NtUserSetProcessWindowStation
+NtUserSetProp
+NtUserSetRipFlags
+NtUserSetScrollInfo
+NtUserSetShellWindowEx
+NtUserSetSysColors
+NtUserSetSystemCursor
+NtUserSetSystemMenu
+NtUserSetSystemTimer
+NtUserSetThreadDesktop
+NtUserSetThreadLayoutHandles
+NtUserSetThreadState
+NtUserSetTimer
+NtUserSetWindowFNID
+NtUserSetWindowLong
+NtUserSetWindowPlacement
+NtUserSetWindowPos
+NtUserSetWindowRgn
+NtUserSetWindowsHookAW
+NtUserSetWindowsHookEx
+NtUserSetWindowStationUser
+NtUserSetWindowWord
+NtUserSetWinEventHook
+NtUserShowCaret
+NtUserShowScrollBar
+NtUserShowWindow
+NtUserShowWindowAsync
+NtUserSoundSentry
+NtUserSwitchDesktop
+NtUserSystemParametersInfo
+NtUserTestForInteractiveUser
+NtUserThunkedMenuInfo
+NtUserThunkedMenuItemInfo
+NtUserToUnicodeEx
+NtUserTrackMouseEvent
+NtUserTrackPopupMenuEx
+NtUserCalcMenuBar
+NtUserPaintMenuBar
+NtUserTranslateAccelerator
+NtUserTranslateMessage
+NtUserUnhookWindowsHookEx
+NtUserUnhookWinEvent
+NtUserUnloadKeyboardLayout
+NtUserUnlockWindowStation
+;NtUserUnregisterClass
+NtUserUnregisterUserApiHook
+NtUserUnregisterHotKey
+NtUserUpdateInputContext
+NtUserUpdateInstance
+NtUserUpdateLayeredWindow
+NtUserGetLayeredWindowAttributes
+NtUserSetLayeredWindowAttributes
+NtUserUpdatePerUserSystemParameters
+NtUserUserHandleGrantAccess
+NtUserValidateHandleSecure
+NtUserValidateRect
+NtUserValidateTimerCallback
+NtUserVkKeyScanEx
+NtUserWaitForInputIdle
+NtUserWaitForMsgAndEvent
+NtUserWaitMessage
+NtUserWin32PoolAllocationStats
+NtUserWindowFromPoint
+NtUserYieldTask
+NtUserRemoteConnect
+NtUserRemoteRedrawRectangle
+NtUserRemoteRedrawScreen
+NtUserRemoteStopScreenUpdates
+NtUserCtxDisplayIOCtl
+NtGdiEngAssociateSurface
+NtGdiEngCreateBitmap
+NtGdiEngCreateDeviceSurface
+NtGdiEngCreateDeviceBitmap
+NtGdiEngCreatePalette
+NtGdiEngComputeGlyphSet
+NtGdiEngCopyBits
+NtGdiEngDeletePalette
+NtGdiEngDeleteSurface
+NtGdiEngEraseSurface
+NtGdiEngUnlockSurface
+NtGdiEngLockSurface
+NtGdiEngBitBlt
+NtGdiEngStretchBlt
+NtGdiEngPlgBlt
+NtGdiEngMarkBandingSurface
+NtGdiEngStrokePath
+NtGdiEngFillPath
+NtGdiEngStrokeAndFillPath
+NtGdiEngPaint
+NtGdiEngLineTo
+NtGdiEngAlphaBlend
+NtGdiEngGradientFill
+NtGdiEngTransparentBlt
+NtGdiEngTextOut
+NtGdiEngStretchBltROP
+NtGdiXLATEOBJ_cGetPalette
+NtGdiXLATEOBJ_iXlate
+NtGdiXLATEOBJ_hGetColorTransform
+NtGdiCLIPOBJ_bEnum
+NtGdiCLIPOBJ_cEnumStart
+NtGdiCLIPOBJ_ppoGetPath
+NtGdiEngDeletePath
+NtGdiEngCreateClip
+NtGdiEngDeleteClip
+NtGdiBRUSHOBJ_ulGetBrushColor
+NtGdiBRUSHOBJ_pvAllocRbrush
+NtGdiBRUSHOBJ_pvGetRbrush
+NtGdiBRUSHOBJ_hGetColorTransform
+NtGdiXFORMOBJ_bApplyXform
+NtGdiXFORMOBJ_iGetXform
+NtGdiFONTOBJ_vGetInfo
+NtGdiFONTOBJ_pxoGetXform
+NtGdiFONTOBJ_cGetGlyphs
+NtGdiFONTOBJ_pifi
+NtGdiFONTOBJ_pfdg
+NtGdiFONTOBJ_pQueryGlyphAttrs
+NtGdiFONTOBJ_pvTrueTypeFontFile
+NtGdiFONTOBJ_cGetAllGlyphHandles
+NtGdiSTROBJ_bEnum
+NtGdiSTROBJ_bEnumPositionsOnly
+NtGdiSTROBJ_bGetAdvanceWidths
+NtGdiSTROBJ_vEnumStart
+NtGdiSTROBJ_dwGetCodePage
+NtGdiPATHOBJ_vGetBounds
+NtGdiPATHOBJ_bEnum
+NtGdiPATHOBJ_vEnumStart
+NtGdiPATHOBJ_vEnumStartClipLines
+NtGdiPATHOBJ_bEnumClipLines
+NtGdiGetDhpdev
+NtGdiEngCheckAbort
+NtGdiHT_Get8BPPFormatPalette
+NtGdiHT_Get8BPPMaskPalette
+NtGdiUpdateTransform
+NtGdiSetPUMPDOBJ
+NtGdiBRUSHOBJ_DeleteRbrush
+NtGdiUMPDEngFreeUserMem
+NtGdiUnmapMemFont
+NtGdiDrawStream
+
<module name="w32kdll" type="win32dll" entrypoint="0" installname="w32kdll.dll">
- <importlibrary definition="w32kdll_ros.def" />
+ <importlibrary definition="w32kdll_ros-$(ARCH).def" />
<library>win32ksys</library>
<file>main.c</file>
</module>
--- /dev/null
+/* FILE: System Call Stubs for Native API
+ * COPYRIGHT: See COPYING in the top level directory
+ * PURPOSE: obj-amd64\lib\win32ksys\win32k.S
+ * PROGRAMMER: Computer Generated File. See tools/nci/ncitool.c
+ * REMARK: DO NOT EDIT OR COMMIT MODIFICATIONS TO THIS FILE
+ */
+
+
+#include <ndk/asm.h>
+
+.global _NtGdiAbortDoc
+_NtGdiAbortDoc:
+ movl $0x1000, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiAbortPath
+_NtGdiAbortPath:
+ movl $0x1001, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiAddFontResourceW
+_NtGdiAddFontResourceW:
+ movl $0x1002, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiAddRemoteFontToDC
+_NtGdiAddRemoteFontToDC:
+ movl $0x1003, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiAddFontMemResourceEx
+_NtGdiAddFontMemResourceEx:
+ movl $0x1004, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiRemoveMergeFont
+_NtGdiRemoveMergeFont:
+ movl $0x1005, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiAddRemoteMMInstanceToDC
+_NtGdiAddRemoteMMInstanceToDC:
+ movl $0x1006, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiAlphaBlend
+_NtGdiAlphaBlend:
+ movl $0x1007, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x30
+
+.global _NtGdiAngleArc
+_NtGdiAngleArc:
+ movl $0x1008, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiAnyLinkedFonts
+_NtGdiAnyLinkedFonts:
+ movl $0x1009, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtGdiFontIsLinked
+_NtGdiFontIsLinked:
+ movl $0x100a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiArcInternal
+_NtGdiArcInternal:
+ movl $0x100b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x28
+
+.global _NtGdiBeginPath
+_NtGdiBeginPath:
+ movl $0x100c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiBitBlt
+_NtGdiBitBlt:
+ movl $0x100d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x2c
+
+.global _NtGdiCancelDC
+_NtGdiCancelDC:
+ movl $0x100e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiCheckBitmapBits
+_NtGdiCheckBitmapBits:
+ movl $0x100f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtGdiCloseFigure
+_NtGdiCloseFigure:
+ movl $0x1010, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiClearBitmapAttributes
+_NtGdiClearBitmapAttributes:
+ movl $0x1011, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiClearBrushAttributes
+_NtGdiClearBrushAttributes:
+ movl $0x1012, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiColorCorrectPalette
+_NtGdiColorCorrectPalette:
+ movl $0x1013, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiCombineRgn
+_NtGdiCombineRgn:
+ movl $0x1014, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiCombineTransform
+_NtGdiCombineTransform:
+ movl $0x1015, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiComputeXformCoefficients
+_NtGdiComputeXformCoefficients:
+ movl $0x1016, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiConsoleTextOut
+_NtGdiConsoleTextOut:
+ movl $0x1017, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiConvertMetafileRect
+_NtGdiConvertMetafileRect:
+ movl $0x1018, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiCreateBitmap
+_NtGdiCreateBitmap:
+ movl $0x1019, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiCreateClientObj
+_NtGdiCreateClientObj:
+ movl $0x101a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiCreateColorSpace
+_NtGdiCreateColorSpace:
+ movl $0x101b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiCreateColorTransform
+_NtGdiCreateColorTransform:
+ movl $0x101c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtGdiCreateCompatibleBitmap
+_NtGdiCreateCompatibleBitmap:
+ movl $0x101d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiCreateCompatibleDC
+_NtGdiCreateCompatibleDC:
+ movl $0x101e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiCreateDIBBrush
+_NtGdiCreateDIBBrush:
+ movl $0x101f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiCreateDIBitmapInternal
+_NtGdiCreateDIBitmapInternal:
+ movl $0x1020, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x2c
+
+.global _NtGdiCreateDIBSection
+_NtGdiCreateDIBSection:
+ movl $0x1021, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x24
+
+.global _NtGdiCreateEllipticRgn
+_NtGdiCreateEllipticRgn:
+ movl $0x1022, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiCreateHalftonePalette
+_NtGdiCreateHalftonePalette:
+ movl $0x1023, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiCreateHatchBrushInternal
+_NtGdiCreateHatchBrushInternal:
+ movl $0x1024, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiCreateMetafileDC
+_NtGdiCreateMetafileDC:
+ movl $0x1025, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiCreatePaletteInternal
+_NtGdiCreatePaletteInternal:
+ movl $0x1026, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiCreatePatternBrushInternal
+_NtGdiCreatePatternBrushInternal:
+ movl $0x1027, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiCreatePen
+_NtGdiCreatePen:
+ movl $0x1028, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiCreateRectRgn
+_NtGdiCreateRectRgn:
+ movl $0x1029, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiCreateRoundRectRgn
+_NtGdiCreateRoundRectRgn:
+ movl $0x102a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiCreateServerMetaFile
+_NtGdiCreateServerMetaFile:
+ movl $0x102b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiCreateSolidBrush
+_NtGdiCreateSolidBrush:
+ movl $0x102c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiD3dContextCreate
+_NtGdiD3dContextCreate:
+ movl $0x102d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiD3dContextDestroy
+_NtGdiD3dContextDestroy:
+ movl $0x102e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiD3dContextDestroyAll
+_NtGdiD3dContextDestroyAll:
+ movl $0x102f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiD3dValidateTextureStageState
+_NtGdiD3dValidateTextureStageState:
+ movl $0x1030, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiD3dDrawPrimitives2
+_NtGdiD3dDrawPrimitives2:
+ movl $0x1031, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtGdiDdGetDriverState
+_NtGdiDdGetDriverState:
+ movl $0x1032, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiDdAddAttachedSurface
+_NtGdiDdAddAttachedSurface:
+ movl $0x1033, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiDdAlphaBlt
+_NtGdiDdAlphaBlt:
+ movl $0x1034, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiDdAttachSurface
+_NtGdiDdAttachSurface:
+ movl $0x1035, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdBeginMoCompFrame
+_NtGdiDdBeginMoCompFrame:
+ movl $0x1036, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdBlt
+_NtGdiDdBlt:
+ movl $0x1037, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiDdCanCreateSurface
+_NtGdiDdCanCreateSurface:
+ movl $0x1038, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdCanCreateD3DBuffer
+_NtGdiDdCanCreateD3DBuffer:
+ movl $0x1039, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdColorControl
+_NtGdiDdColorControl:
+ movl $0x103a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdCreateDirectDrawObject
+_NtGdiDdCreateDirectDrawObject:
+ movl $0x103b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiDdCreateSurface
+_NtGdiDdCreateSurface:
+ movl $0x103c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtGdiDdCreateD3DBuffer
+_NtGdiDdCreateD3DBuffer:
+ movl $0x103d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtGdiDdCreateMoComp
+_NtGdiDdCreateMoComp:
+ movl $0x103e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdCreateSurfaceObject
+_NtGdiDdCreateSurfaceObject:
+ movl $0x103f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiDdDeleteDirectDrawObject
+_NtGdiDdDeleteDirectDrawObject:
+ movl $0x1040, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiDdDeleteSurfaceObject
+_NtGdiDdDeleteSurfaceObject:
+ movl $0x1041, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiDdDestroyMoComp
+_NtGdiDdDestroyMoComp:
+ movl $0x1042, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdDestroySurface
+_NtGdiDdDestroySurface:
+ movl $0x1043, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdDestroyD3DBuffer
+_NtGdiDdDestroyD3DBuffer:
+ movl $0x1044, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiDdEndMoCompFrame
+_NtGdiDdEndMoCompFrame:
+ movl $0x1045, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdFlip
+_NtGdiDdFlip:
+ movl $0x1046, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiDdFlipToGDISurface
+_NtGdiDdFlipToGDISurface:
+ movl $0x1047, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdGetAvailDriverMemory
+_NtGdiDdGetAvailDriverMemory:
+ movl $0x1048, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdGetBltStatus
+_NtGdiDdGetBltStatus:
+ movl $0x1049, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdGetDC
+_NtGdiDdGetDC:
+ movl $0x104a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdGetDriverInfo
+_NtGdiDdGetDriverInfo:
+ movl $0x104b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdGetDxHandle
+_NtGdiDdGetDxHandle:
+ movl $0x104c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiDdGetFlipStatus
+_NtGdiDdGetFlipStatus:
+ movl $0x104d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdGetInternalMoCompInfo
+_NtGdiDdGetInternalMoCompInfo:
+ movl $0x104e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdGetMoCompBuffInfo
+_NtGdiDdGetMoCompBuffInfo:
+ movl $0x104f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdGetMoCompGuids
+_NtGdiDdGetMoCompGuids:
+ movl $0x1050, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdGetMoCompFormats
+_NtGdiDdGetMoCompFormats:
+ movl $0x1051, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdGetScanLine
+_NtGdiDdGetScanLine:
+ movl $0x1052, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdLock
+_NtGdiDdLock:
+ movl $0x1053, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiDdLockD3D
+_NtGdiDdLockD3D:
+ movl $0x1054, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdQueryDirectDrawObject
+_NtGdiDdQueryDirectDrawObject:
+ movl $0x1055, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x2c
+
+.global _NtGdiDdQueryMoCompStatus
+_NtGdiDdQueryMoCompStatus:
+ movl $0x1056, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdReenableDirectDrawObject
+_NtGdiDdReenableDirectDrawObject:
+ movl $0x1057, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdReleaseDC
+_NtGdiDdReleaseDC:
+ movl $0x1058, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiDdRenderMoComp
+_NtGdiDdRenderMoComp:
+ movl $0x1059, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdResetVisrgn
+_NtGdiDdResetVisrgn:
+ movl $0x105a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdSetColorKey
+_NtGdiDdSetColorKey:
+ movl $0x105b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdSetExclusiveMode
+_NtGdiDdSetExclusiveMode:
+ movl $0x105c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdSetGammaRamp
+_NtGdiDdSetGammaRamp:
+ movl $0x105d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiDdCreateSurfaceEx
+_NtGdiDdCreateSurfaceEx:
+ movl $0x105e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiDdSetOverlayPosition
+_NtGdiDdSetOverlayPosition:
+ movl $0x105f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiDdUnattachSurface
+_NtGdiDdUnattachSurface:
+ movl $0x1060, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdUnlock
+_NtGdiDdUnlock:
+ movl $0x1061, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdUnlockD3D
+_NtGdiDdUnlockD3D:
+ movl $0x1062, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDdUpdateOverlay
+_NtGdiDdUpdateOverlay:
+ movl $0x1063, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiDdWaitForVerticalBlank
+_NtGdiDdWaitForVerticalBlank:
+ movl $0x1064, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDvpCanCreateVideoPort
+_NtGdiDvpCanCreateVideoPort:
+ movl $0x1065, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDvpColorControl
+_NtGdiDvpColorControl:
+ movl $0x1066, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDvpCreateVideoPort
+_NtGdiDvpCreateVideoPort:
+ movl $0x1067, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDvpDestroyVideoPort
+_NtGdiDvpDestroyVideoPort:
+ movl $0x1068, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDvpFlipVideoPort
+_NtGdiDvpFlipVideoPort:
+ movl $0x1069, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiDvpGetVideoPortBandwidth
+_NtGdiDvpGetVideoPortBandwidth:
+ movl $0x106a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDvpGetVideoPortField
+_NtGdiDvpGetVideoPortField:
+ movl $0x106b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDvpGetVideoPortFlipStatus
+_NtGdiDvpGetVideoPortFlipStatus:
+ movl $0x106c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDvpGetVideoPortInputFormats
+_NtGdiDvpGetVideoPortInputFormats:
+ movl $0x106d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDvpGetVideoPortLine
+_NtGdiDvpGetVideoPortLine:
+ movl $0x106e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDvpGetVideoPortOutputFormats
+_NtGdiDvpGetVideoPortOutputFormats:
+ movl $0x106f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDvpGetVideoPortConnectInfo
+_NtGdiDvpGetVideoPortConnectInfo:
+ movl $0x1070, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDvpGetVideoSignalStatus
+_NtGdiDvpGetVideoSignalStatus:
+ movl $0x1071, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDvpUpdateVideoPort
+_NtGdiDvpUpdateVideoPort:
+ movl $0x1072, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiDvpWaitForVideoPortSync
+_NtGdiDvpWaitForVideoPortSync:
+ movl $0x1073, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDvpAcquireNotification
+_NtGdiDvpAcquireNotification:
+ movl $0x1074, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiDvpReleaseNotification
+_NtGdiDvpReleaseNotification:
+ movl $0x1075, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDxgGenericThunk
+_NtGdiDxgGenericThunk:
+ movl $0x1076, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiDeleteClientObj
+_NtGdiDeleteClientObj:
+ movl $0x1077, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiDeleteColorSpace
+_NtGdiDeleteColorSpace:
+ movl $0x1078, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiDeleteColorTransform
+_NtGdiDeleteColorTransform:
+ movl $0x1079, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDeleteObjectApp
+_NtGdiDeleteObjectApp:
+ movl $0x107a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiDescribePixelFormat
+_NtGdiDescribePixelFormat:
+ movl $0x107b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiGetPerBandInfo
+_NtGdiGetPerBandInfo:
+ movl $0x107c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiDoBanding
+_NtGdiDoBanding:
+ movl $0x107d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiDoPalette
+_NtGdiDoPalette:
+ movl $0x107e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiDrawEscape
+_NtGdiDrawEscape:
+ movl $0x107f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiEllipse
+_NtGdiEllipse:
+ movl $0x1080, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiEnableEudc
+_NtGdiEnableEudc:
+ movl $0x1081, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiEndDoc
+_NtGdiEndDoc:
+ movl $0x1082, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiEndPage
+_NtGdiEndPage:
+ movl $0x1083, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiEndPath
+_NtGdiEndPath:
+ movl $0x1084, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiEnumFontChunk
+_NtGdiEnumFontChunk:
+ movl $0x1085, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiEnumFontClose
+_NtGdiEnumFontClose:
+ movl $0x1086, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiEnumFontOpen
+_NtGdiEnumFontOpen:
+ movl $0x1087, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtGdiEnumObjects
+_NtGdiEnumObjects:
+ movl $0x1088, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiEqualRgn
+_NtGdiEqualRgn:
+ movl $0x1089, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiEudcLoadUnloadLink
+_NtGdiEudcLoadUnloadLink:
+ movl $0x108a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtGdiExcludeClipRect
+_NtGdiExcludeClipRect:
+ movl $0x108b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiExtCreatePen
+_NtGdiExtCreatePen:
+ movl $0x108c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x2c
+
+.global _NtGdiExtCreateRegion
+_NtGdiExtCreateRegion:
+ movl $0x108d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiExtEscape
+_NtGdiExtEscape:
+ movl $0x108e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtGdiExtFloodFill
+_NtGdiExtFloodFill:
+ movl $0x108f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiExtGetObjectW
+_NtGdiExtGetObjectW:
+ movl $0x1090, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiExtSelectClipRgn
+_NtGdiExtSelectClipRgn:
+ movl $0x1091, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiExtTextOutW
+_NtGdiExtTextOutW:
+ movl $0x1092, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x24
+
+.global _NtGdiFillPath
+_NtGdiFillPath:
+ movl $0x1093, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiFillRgn
+_NtGdiFillRgn:
+ movl $0x1094, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiFlattenPath
+_NtGdiFlattenPath:
+ movl $0x1095, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiFlushUserBatch
+_NtGdiFlushUserBatch:
+ movl $0x1096, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtGdiFlush
+_NtGdiFlush:
+ movl $0x1097, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtGdiForceUFIMapping
+_NtGdiForceUFIMapping:
+ movl $0x1098, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiFrameRgn
+_NtGdiFrameRgn:
+ movl $0x1099, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiFullscreenControl
+_NtGdiFullscreenControl:
+ movl $0x109a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiGetAndSetDCDword
+_NtGdiGetAndSetDCDword:
+ movl $0x109b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiGetAppClipBox
+_NtGdiGetAppClipBox:
+ movl $0x109c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetBitmapBits
+_NtGdiGetBitmapBits:
+ movl $0x109d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetBitmapDimension
+_NtGdiGetBitmapDimension:
+ movl $0x109e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetBoundsRect
+_NtGdiGetBoundsRect:
+ movl $0x109f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetCharABCWidthsW
+_NtGdiGetCharABCWidthsW:
+ movl $0x10a0, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiGetCharacterPlacementW
+_NtGdiGetCharacterPlacementW:
+ movl $0x10a1, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiGetCharSet
+_NtGdiGetCharSet:
+ movl $0x10a2, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiGetCharWidthW
+_NtGdiGetCharWidthW:
+ movl $0x10a3, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiGetCharWidthInfo
+_NtGdiGetCharWidthInfo:
+ movl $0x10a4, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetColorAdjustment
+_NtGdiGetColorAdjustment:
+ movl $0x10a5, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetColorSpaceforBitmap
+_NtGdiGetColorSpaceforBitmap:
+ movl $0x10a6, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiGetDCDword
+_NtGdiGetDCDword:
+ movl $0x10a7, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetDCforBitmap
+_NtGdiGetDCforBitmap:
+ movl $0x10a8, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiGetDCObject
+_NtGdiGetDCObject:
+ movl $0x10a9, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetDCPoint
+_NtGdiGetDCPoint:
+ movl $0x10aa, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetDeviceCaps
+_NtGdiGetDeviceCaps:
+ movl $0x10ab, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetDeviceGammaRamp
+_NtGdiGetDeviceGammaRamp:
+ movl $0x10ac, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetDeviceCapsAll
+_NtGdiGetDeviceCapsAll:
+ movl $0x10ad, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetDIBitsInternal
+_NtGdiGetDIBitsInternal:
+ movl $0x10ae, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x24
+
+.global _NtGdiGetETM
+_NtGdiGetETM:
+ movl $0x10af, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetEudcTimeStampEx
+_NtGdiGetEudcTimeStampEx:
+ movl $0x10b0, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetFontData
+_NtGdiGetFontData:
+ movl $0x10b1, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiGetFontResourceInfoInternalW
+_NtGdiGetFontResourceInfoInternalW:
+ movl $0x10b2, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtGdiGetGlyphIndicesW
+_NtGdiGetGlyphIndicesW:
+ movl $0x10b3, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiGetGlyphIndicesWInternal
+_NtGdiGetGlyphIndicesWInternal:
+ movl $0x10b4, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiGetGlyphOutline
+_NtGdiGetGlyphOutline:
+ movl $0x10b5, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtGdiGetKerningPairs
+_NtGdiGetKerningPairs:
+ movl $0x10b6, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetLinkedUFIs
+_NtGdiGetLinkedUFIs:
+ movl $0x10b7, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetMiterLimit
+_NtGdiGetMiterLimit:
+ movl $0x10b8, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetMonitorID
+_NtGdiGetMonitorID:
+ movl $0x10b9, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetNearestColor
+_NtGdiGetNearestColor:
+ movl $0x10ba, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetNearestPaletteIndex
+_NtGdiGetNearestPaletteIndex:
+ movl $0x10bb, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetObjectBitmapHandle
+_NtGdiGetObjectBitmapHandle:
+ movl $0x10bc, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetOutlineTextMetricsInternalW
+_NtGdiGetOutlineTextMetricsInternalW:
+ movl $0x10bd, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiGetPath
+_NtGdiGetPath:
+ movl $0x10be, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiGetPixel
+_NtGdiGetPixel:
+ movl $0x10bf, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetRandomRgn
+_NtGdiGetRandomRgn:
+ movl $0x10c0, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetRasterizerCaps
+_NtGdiGetRasterizerCaps:
+ movl $0x10c1, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetRealizationInfo
+_NtGdiGetRealizationInfo:
+ movl $0x10c2, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetRegionData
+_NtGdiGetRegionData:
+ movl $0x10c3, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetRgnBox
+_NtGdiGetRgnBox:
+ movl $0x10c4, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetServerMetaFileBits
+_NtGdiGetServerMetaFileBits:
+ movl $0x10c5, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtGdiGetSpoolMessage
+_NtGdiGetSpoolMessage:
+ movl $0x10c6, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiGetStats
+_NtGdiGetStats:
+ movl $0x10c7, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiGetStockObject
+_NtGdiGetStockObject:
+ movl $0x10c8, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiGetStringBitmapW
+_NtGdiGetStringBitmapW:
+ movl $0x10c9, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiGetSystemPaletteUse
+_NtGdiGetSystemPaletteUse:
+ movl $0x10ca, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiGetTextCharsetInfo
+_NtGdiGetTextCharsetInfo:
+ movl $0x10cb, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetTextExtent
+_NtGdiGetTextExtent:
+ movl $0x10cc, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiGetTextExtentExW
+_NtGdiGetTextExtentExW:
+ movl $0x10cd, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtGdiGetTextFaceW
+_NtGdiGetTextFaceW:
+ movl $0x10ce, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiGetTextMetricsW
+_NtGdiGetTextMetricsW:
+ movl $0x10cf, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetTransform
+_NtGdiGetTransform:
+ movl $0x10d0, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetUFI
+_NtGdiGetUFI:
+ movl $0x10d1, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiGetEmbUFI
+_NtGdiGetEmbUFI:
+ movl $0x10d2, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtGdiGetUFIPathname
+_NtGdiGetUFIPathname:
+ movl $0x10d3, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x28
+
+.global _NtGdiGetEmbedFonts
+_NtGdiGetEmbedFonts:
+ movl $0x10d4, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtGdiChangeGhostFont
+_NtGdiChangeGhostFont:
+ movl $0x10d5, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiAddEmbFontToDC
+_NtGdiAddEmbFontToDC:
+ movl $0x10d6, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetFontUnicodeRanges
+_NtGdiGetFontUnicodeRanges:
+ movl $0x10d7, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiGetWidthTable
+_NtGdiGetWidthTable:
+ movl $0x10d8, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtGdiGradientFill
+_NtGdiGradientFill:
+ movl $0x10d9, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiHfontCreate
+_NtGdiHfontCreate:
+ movl $0x10da, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiIcmBrushInfo
+_NtGdiIcmBrushInfo:
+ movl $0x10db, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtGdiInit
+_NtGdiInit:
+ movl $0x10dc, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtGdiInitSpool
+_NtGdiInitSpool:
+ movl $0x10dd, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtGdiIntersectClipRect
+_NtGdiIntersectClipRect:
+ movl $0x10de, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiInvertRgn
+_NtGdiInvertRgn:
+ movl $0x10df, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiLineTo
+_NtGdiLineTo:
+ movl $0x10e0, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiMakeFontDir
+_NtGdiMakeFontDir:
+ movl $0x10e1, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiMakeInfoDC
+_NtGdiMakeInfoDC:
+ movl $0x10e2, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiMaskBlt
+_NtGdiMaskBlt:
+ movl $0x10e3, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x34
+
+.global _NtGdiModifyWorldTransform
+_NtGdiModifyWorldTransform:
+ movl $0x10e4, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiMonoBitmap
+_NtGdiMonoBitmap:
+ movl $0x10e5, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiMoveTo
+_NtGdiMoveTo:
+ movl $0x10e6, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiOffsetClipRgn
+_NtGdiOffsetClipRgn:
+ movl $0x10e7, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiOffsetRgn
+_NtGdiOffsetRgn:
+ movl $0x10e8, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiOpenDCW
+_NtGdiOpenDCW:
+ movl $0x10e9, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtGdiPatBlt
+_NtGdiPatBlt:
+ movl $0x10ea, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiPolyPatBlt
+_NtGdiPolyPatBlt:
+ movl $0x10eb, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiPathToRegion
+_NtGdiPathToRegion:
+ movl $0x10ec, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiPlgBlt
+_NtGdiPlgBlt:
+ movl $0x10ed, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x2c
+
+.global _NtGdiPolyDraw
+_NtGdiPolyDraw:
+ movl $0x10ee, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiPolyPolyDraw
+_NtGdiPolyPolyDraw:
+ movl $0x10ef, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiPolyTextOutW
+_NtGdiPolyTextOutW:
+ movl $0x10f0, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiPtInRegion
+_NtGdiPtInRegion:
+ movl $0x10f1, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiPtVisible
+_NtGdiPtVisible:
+ movl $0x10f2, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiQueryFonts
+_NtGdiQueryFonts:
+ movl $0x10f3, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiQueryFontAssocInfo
+_NtGdiQueryFontAssocInfo:
+ movl $0x10f4, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiRectangle
+_NtGdiRectangle:
+ movl $0x10f5, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiRectInRegion
+_NtGdiRectInRegion:
+ movl $0x10f6, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiRectVisible
+_NtGdiRectVisible:
+ movl $0x10f7, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiRemoveFontResourceW
+_NtGdiRemoveFontResourceW:
+ movl $0x10f8, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiRemoveFontMemResourceEx
+_NtGdiRemoveFontMemResourceEx:
+ movl $0x10f9, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiResetDC
+_NtGdiResetDC:
+ movl $0x10fa, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiResizePalette
+_NtGdiResizePalette:
+ movl $0x10fb, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiRestoreDC
+_NtGdiRestoreDC:
+ movl $0x10fc, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiRoundRect
+_NtGdiRoundRect:
+ movl $0x10fd, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtGdiSaveDC
+_NtGdiSaveDC:
+ movl $0x10fe, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiScaleViewportExtEx
+_NtGdiScaleViewportExtEx:
+ movl $0x10ff, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiScaleWindowExtEx
+_NtGdiScaleWindowExtEx:
+ movl $0x1100, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiSelectBitmap
+_NtGdiSelectBitmap:
+ movl $0x1101, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiSelectBrush
+_NtGdiSelectBrush:
+ movl $0x1102, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiSelectClipPath
+_NtGdiSelectClipPath:
+ movl $0x1103, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiSelectFont
+_NtGdiSelectFont:
+ movl $0x1104, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiSelectPen
+_NtGdiSelectPen:
+ movl $0x1105, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiSetBitmapAttributes
+_NtGdiSetBitmapAttributes:
+ movl $0x1106, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiSetBitmapBits
+_NtGdiSetBitmapBits:
+ movl $0x1107, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiSetBitmapDimension
+_NtGdiSetBitmapDimension:
+ movl $0x1108, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiSetBoundsRect
+_NtGdiSetBoundsRect:
+ movl $0x1109, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiSetBrushAttributes
+_NtGdiSetBrushAttributes:
+ movl $0x110a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiSetBrushOrg
+_NtGdiSetBrushOrg:
+ movl $0x110b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiSetColorAdjustment
+_NtGdiSetColorAdjustment:
+ movl $0x110c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiSetColorSpace
+_NtGdiSetColorSpace:
+ movl $0x110d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiSetDeviceGammaRamp
+_NtGdiSetDeviceGammaRamp:
+ movl $0x110e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiSetDIBitsToDeviceInternal
+_NtGdiSetDIBitsToDeviceInternal:
+ movl $0x110f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x40
+
+.global _NtGdiSetFontEnumeration
+_NtGdiSetFontEnumeration:
+ movl $0x1110, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiSetFontXform
+_NtGdiSetFontXform:
+ movl $0x1111, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiSetIcmMode
+_NtGdiSetIcmMode:
+ movl $0x1112, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiSetLinkedUFIs
+_NtGdiSetLinkedUFIs:
+ movl $0x1113, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiSetMagicColors
+_NtGdiSetMagicColors:
+ movl $0x1114, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiSetMetaRgn
+_NtGdiSetMetaRgn:
+ movl $0x1115, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiSetMiterLimit
+_NtGdiSetMiterLimit:
+ movl $0x1116, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetDeviceWidth
+_NtGdiGetDeviceWidth:
+ movl $0x1117, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiMirrorWindowOrg
+_NtGdiMirrorWindowOrg:
+ movl $0x1118, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiSetLayout
+_NtGdiSetLayout:
+ movl $0x1119, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiSetPixel
+_NtGdiSetPixel:
+ movl $0x111a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiSetPixelFormat
+_NtGdiSetPixelFormat:
+ movl $0x111b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiSetRectRgn
+_NtGdiSetRectRgn:
+ movl $0x111c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiSetSystemPaletteUse
+_NtGdiSetSystemPaletteUse:
+ movl $0x111d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiSetTextJustification
+_NtGdiSetTextJustification:
+ movl $0x111e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiSetupPublicCFONT
+_NtGdiSetupPublicCFONT:
+ movl $0x111f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiSetVirtualResolution
+_NtGdiSetVirtualResolution:
+ movl $0x1120, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiSetSizeDevice
+_NtGdiSetSizeDevice:
+ movl $0x1121, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiStartDoc
+_NtGdiStartDoc:
+ movl $0x1122, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiStartPage
+_NtGdiStartPage:
+ movl $0x1123, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiStretchBlt
+_NtGdiStretchBlt:
+ movl $0x1124, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x30
+
+.global _NtGdiStretchDIBitsInternal
+_NtGdiStretchDIBitsInternal:
+ movl $0x1125, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x40
+
+.global _NtGdiStrokeAndFillPath
+_NtGdiStrokeAndFillPath:
+ movl $0x1126, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiStrokePath
+_NtGdiStrokePath:
+ movl $0x1127, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiSwapBuffers
+_NtGdiSwapBuffers:
+ movl $0x1128, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiTransformPoints
+_NtGdiTransformPoints:
+ movl $0x1129, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiTransparentBlt
+_NtGdiTransparentBlt:
+ movl $0x112a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x2c
+
+.global _NtGdiUnloadPrinterDriver
+_NtGdiUnloadPrinterDriver:
+ movl $0x112b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiUnmapMemFont
+_NtGdiUnmapMemFont:
+ movl $0x112c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiUnrealizeObject
+_NtGdiUnrealizeObject:
+ movl $0x112d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiUpdateColors
+_NtGdiUpdateColors:
+ movl $0x112e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiWidenPath
+_NtGdiWidenPath:
+ movl $0x112f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserActivateKeyboardLayout
+_NtUserActivateKeyboardLayout:
+ movl $0x1130, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserAlterWindowStyle
+_NtUserAlterWindowStyle:
+ movl $0x1131, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserAssociateInputContext
+_NtUserAssociateInputContext:
+ movl $0x1132, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserAttachThreadInput
+_NtUserAttachThreadInput:
+ movl $0x1133, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserBeginPaint
+_NtUserBeginPaint:
+ movl $0x1134, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserBitBltSysBmp
+_NtUserBitBltSysBmp:
+ movl $0x1135, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtUserBlockInput
+_NtUserBlockInput:
+ movl $0x1136, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserBuildHimcList
+_NtUserBuildHimcList:
+ movl $0x1137, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserBuildHwndList
+_NtUserBuildHwndList:
+ movl $0x1138, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtUserBuildNameList
+_NtUserBuildNameList:
+ movl $0x1139, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserBuildPropList
+_NtUserBuildPropList:
+ movl $0x113a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserCallHwnd
+_NtUserCallHwnd:
+ movl $0x113b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserCallHwndLock
+_NtUserCallHwndLock:
+ movl $0x113c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserCallHwndOpt
+_NtUserCallHwndOpt:
+ movl $0x113d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserCallHwndParam
+_NtUserCallHwndParam:
+ movl $0x113e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserCallHwndParamLock
+_NtUserCallHwndParamLock:
+ movl $0x113f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserCallMsgFilter
+_NtUserCallMsgFilter:
+ movl $0x1140, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserCallNextHookEx
+_NtUserCallNextHookEx:
+ movl $0x1141, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserCallNoParam
+_NtUserCallNoParam:
+ movl $0x1142, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserCallOneParam
+_NtUserCallOneParam:
+ movl $0x1143, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserCallTwoParam
+_NtUserCallTwoParam:
+ movl $0x1144, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserChangeClipboardChain
+_NtUserChangeClipboardChain:
+ movl $0x1145, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserChangeDisplaySettings
+_NtUserChangeDisplaySettings:
+ movl $0x1146, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserCheckImeHotKey
+_NtUserCheckImeHotKey:
+ movl $0x1147, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserCheckMenuItem
+_NtUserCheckMenuItem:
+ movl $0x1148, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserChildWindowFromPointEx
+_NtUserChildWindowFromPointEx:
+ movl $0x1149, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserClipCursor
+_NtUserClipCursor:
+ movl $0x114a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserCloseClipboard
+_NtUserCloseClipboard:
+ movl $0x114b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserCloseDesktop
+_NtUserCloseDesktop:
+ movl $0x114c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserCloseWindowStation
+_NtUserCloseWindowStation:
+ movl $0x114d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserConsoleControl
+_NtUserConsoleControl:
+ movl $0x114e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserConvertMemHandle
+_NtUserConvertMemHandle:
+ movl $0x114f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserCopyAcceleratorTable
+_NtUserCopyAcceleratorTable:
+ movl $0x1150, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserCountClipboardFormats
+_NtUserCountClipboardFormats:
+ movl $0x1151, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserCreateAcceleratorTable
+_NtUserCreateAcceleratorTable:
+ movl $0x1152, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserCreateCaret
+_NtUserCreateCaret:
+ movl $0x1153, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserCreateDesktop
+_NtUserCreateDesktop:
+ movl $0x1154, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserCreateInputContext
+_NtUserCreateInputContext:
+ movl $0x1155, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserCreateLocalMemHandle
+_NtUserCreateLocalMemHandle:
+ movl $0x1156, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserCreateWindowEx
+_NtUserCreateWindowEx:
+ movl $0x1157, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x3c
+
+.global _NtUserCreateWindowStation
+_NtUserCreateWindowStation:
+ movl $0x1158, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtUserDdeGetQualityOfService
+_NtUserDdeGetQualityOfService:
+ movl $0x1159, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserDdeInitialize
+_NtUserDdeInitialize:
+ movl $0x115a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserDdeSetQualityOfService
+_NtUserDdeSetQualityOfService:
+ movl $0x115b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserDeferWindowPos
+_NtUserDeferWindowPos:
+ movl $0x115c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtUserDefSetText
+_NtUserDefSetText:
+ movl $0x115d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserDeleteMenu
+_NtUserDeleteMenu:
+ movl $0x115e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserDestroyAcceleratorTable
+_NtUserDestroyAcceleratorTable:
+ movl $0x115f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserDestroyCursor
+_NtUserDestroyCursor:
+ movl $0x1160, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserDestroyInputContext
+_NtUserDestroyInputContext:
+ movl $0x1161, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserDestroyMenu
+_NtUserDestroyMenu:
+ movl $0x1162, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserDestroyWindow
+_NtUserDestroyWindow:
+ movl $0x1163, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserDisableThreadIme
+_NtUserDisableThreadIme:
+ movl $0x1164, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserDispatchMessage
+_NtUserDispatchMessage:
+ movl $0x1165, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserDragDetect
+_NtUserDragDetect:
+ movl $0x1166, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserDragObject
+_NtUserDragObject:
+ movl $0x1167, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserDrawAnimatedRects
+_NtUserDrawAnimatedRects:
+ movl $0x1168, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserDrawCaption
+_NtUserDrawCaption:
+ movl $0x1169, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserDrawCaptionTemp
+_NtUserDrawCaptionTemp:
+ movl $0x116a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtUserDrawIconEx
+_NtUserDrawIconEx:
+ movl $0x116b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x2c
+
+.global _NtUserDrawMenuBarTemp
+_NtUserDrawMenuBarTemp:
+ movl $0x116c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserEmptyClipboard
+_NtUserEmptyClipboard:
+ movl $0x116d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserEnableMenuItem
+_NtUserEnableMenuItem:
+ movl $0x116e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserEnableScrollBar
+_NtUserEnableScrollBar:
+ movl $0x116f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserEndDeferWindowPosEx
+_NtUserEndDeferWindowPosEx:
+ movl $0x1170, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserEndMenu
+_NtUserEndMenu:
+ movl $0x1171, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserEndPaint
+_NtUserEndPaint:
+ movl $0x1172, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserEnumDisplayDevices
+_NtUserEnumDisplayDevices:
+ movl $0x1173, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserEnumDisplayMonitors
+_NtUserEnumDisplayMonitors:
+ movl $0x1174, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserEnumDisplaySettings
+_NtUserEnumDisplaySettings:
+ movl $0x1175, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserEvent
+_NtUserEvent:
+ movl $0x1176, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserExcludeUpdateRgn
+_NtUserExcludeUpdateRgn:
+ movl $0x1177, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserFillWindow
+_NtUserFillWindow:
+ movl $0x1178, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserFindExistingCursorIcon
+_NtUserFindExistingCursorIcon:
+ movl $0x1179, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserFindWindowEx
+_NtUserFindWindowEx:
+ movl $0x117a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserFlashWindowEx
+_NtUserFlashWindowEx:
+ movl $0x117b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserGetAltTabInfo
+_NtUserGetAltTabInfo:
+ movl $0x117c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtUserGetAncestor
+_NtUserGetAncestor:
+ movl $0x117d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetAppImeLevel
+_NtUserGetAppImeLevel:
+ movl $0x117e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserGetAsyncKeyState
+_NtUserGetAsyncKeyState:
+ movl $0x117f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserGetAtomName
+_NtUserGetAtomName:
+ movl $0x1180, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetCaretBlinkTime
+_NtUserGetCaretBlinkTime:
+ movl $0x1181, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserGetCaretPos
+_NtUserGetCaretPos:
+ movl $0x1182, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserGetClassInfo
+_NtUserGetClassInfo:
+ movl $0x1183, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserGetClassName
+_NtUserGetClassName:
+ movl $0x1184, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetClipboardData
+_NtUserGetClipboardData:
+ movl $0x1185, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetClipboardFormatName
+_NtUserGetClipboardFormatName:
+ movl $0x1186, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetClipboardOwner
+_NtUserGetClipboardOwner:
+ movl $0x1187, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserGetClipboardSequenceNumber
+_NtUserGetClipboardSequenceNumber:
+ movl $0x1188, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserGetClipboardViewer
+_NtUserGetClipboardViewer:
+ movl $0x1189, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserGetClipCursor
+_NtUserGetClipCursor:
+ movl $0x118a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserGetComboBoxInfo
+_NtUserGetComboBoxInfo:
+ movl $0x118b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetControlBrush
+_NtUserGetControlBrush:
+ movl $0x118c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetControlColor
+_NtUserGetControlColor:
+ movl $0x118d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserGetCPD
+_NtUserGetCPD:
+ movl $0x118e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetCursorFrameInfo
+_NtUserGetCursorFrameInfo:
+ movl $0x118f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserGetCursorInfo
+_NtUserGetCursorInfo:
+ movl $0x1190, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserGetDC
+_NtUserGetDC:
+ movl $0x1191, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserGetDCEx
+_NtUserGetDCEx:
+ movl $0x1192, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetDoubleClickTime
+_NtUserGetDoubleClickTime:
+ movl $0x1193, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserGetForegroundWindow
+_NtUserGetForegroundWindow:
+ movl $0x1194, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserGetGuiResources
+_NtUserGetGuiResources:
+ movl $0x1195, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetGUIThreadInfo
+_NtUserGetGUIThreadInfo:
+ movl $0x1196, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetIconInfo
+_NtUserGetIconInfo:
+ movl $0x1197, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtUserGetIconSize
+_NtUserGetIconSize:
+ movl $0x1198, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserGetImeHotKey
+_NtUserGetImeHotKey:
+ movl $0x1199, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserGetImeInfoEx
+_NtUserGetImeInfoEx:
+ movl $0x119a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetInternalWindowPos
+_NtUserGetInternalWindowPos:
+ movl $0x119b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetKeyboardLayoutList
+_NtUserGetKeyboardLayoutList:
+ movl $0x119c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetKeyboardLayoutName
+_NtUserGetKeyboardLayoutName:
+ movl $0x119d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserGetKeyboardState
+_NtUserGetKeyboardState:
+ movl $0x119e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserGetKeyNameText
+_NtUserGetKeyNameText:
+ movl $0x119f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetKeyState
+_NtUserGetKeyState:
+ movl $0x11a0, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserGetListBoxInfo
+_NtUserGetListBoxInfo:
+ movl $0x11a1, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserGetMenuBarInfo
+_NtUserGetMenuBarInfo:
+ movl $0x11a2, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserGetMenuIndex
+_NtUserGetMenuIndex:
+ movl $0x11a3, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetMenuItemRect
+_NtUserGetMenuItemRect:
+ movl $0x11a4, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserGetMessage
+_NtUserGetMessage:
+ movl $0x11a5, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserGetMouseMovePointsEx
+_NtUserGetMouseMovePointsEx:
+ movl $0x11a6, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserGetObjectInformation
+_NtUserGetObjectInformation:
+ movl $0x11a7, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserGetOpenClipboardWindow
+_NtUserGetOpenClipboardWindow:
+ movl $0x11a8, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserGetPriorityClipboardFormat
+_NtUserGetPriorityClipboardFormat:
+ movl $0x11a9, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetProcessWindowStation
+_NtUserGetProcessWindowStation:
+ movl $0x11aa, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserGetRawInputBuffer
+_NtUserGetRawInputBuffer:
+ movl $0x11ab, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetRawInputData
+_NtUserGetRawInputData:
+ movl $0x11ac, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserGetRawInputDeviceInfo
+_NtUserGetRawInputDeviceInfo:
+ movl $0x11ad, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserGetRawInputDeviceList
+_NtUserGetRawInputDeviceList:
+ movl $0x11ae, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetRegisteredRawInputDevices
+_NtUserGetRegisteredRawInputDevices:
+ movl $0x11af, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetScrollBarInfo
+_NtUserGetScrollBarInfo:
+ movl $0x11b0, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetSystemMenu
+_NtUserGetSystemMenu:
+ movl $0x11b1, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetThreadDesktop
+_NtUserGetThreadDesktop:
+ movl $0x11b2, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetThreadState
+_NtUserGetThreadState:
+ movl $0x11b3, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserGetTitleBarInfo
+_NtUserGetTitleBarInfo:
+ movl $0x11b4, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetUpdateRect
+_NtUserGetUpdateRect:
+ movl $0x11b5, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetUpdateRgn
+_NtUserGetUpdateRgn:
+ movl $0x11b6, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetWindowDC
+_NtUserGetWindowDC:
+ movl $0x11b7, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserGetWindowPlacement
+_NtUserGetWindowPlacement:
+ movl $0x11b8, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetWOWClass
+_NtUserGetWOWClass:
+ movl $0x11b9, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserHardErrorControl
+_NtUserHardErrorControl:
+ movl $0x11ba, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserHideCaret
+_NtUserHideCaret:
+ movl $0x11bb, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserHiliteMenuItem
+_NtUserHiliteMenuItem:
+ movl $0x11bc, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserImpersonateDdeClientWindow
+_NtUserImpersonateDdeClientWindow:
+ movl $0x11bd, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserInitialize
+_NtUserInitialize:
+ movl $0x11be, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserInitializeClientPfnArrays
+_NtUserInitializeClientPfnArrays:
+ movl $0x11bf, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserInitTask
+_NtUserInitTask:
+ movl $0x11c0, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x30
+
+.global _NtUserInternalGetWindowText
+_NtUserInternalGetWindowText:
+ movl $0x11c1, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserInvalidateRect
+_NtUserInvalidateRect:
+ movl $0x11c2, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserInvalidateRgn
+_NtUserInvalidateRgn:
+ movl $0x11c3, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserIsClipboardFormatAvailable
+_NtUserIsClipboardFormatAvailable:
+ movl $0x11c4, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserKillTimer
+_NtUserKillTimer:
+ movl $0x11c5, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserLoadKeyboardLayoutEx
+_NtUserLoadKeyboardLayoutEx:
+ movl $0x11c6, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtUserLockWindowStation
+_NtUserLockWindowStation:
+ movl $0x11c7, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserLockWindowUpdate
+_NtUserLockWindowUpdate:
+ movl $0x11c8, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserLockWorkStation
+_NtUserLockWorkStation:
+ movl $0x11c9, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserMapVirtualKeyEx
+_NtUserMapVirtualKeyEx:
+ movl $0x11ca, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserMenuItemFromPoint
+_NtUserMenuItemFromPoint:
+ movl $0x11cb, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserMessageCall
+_NtUserMessageCall:
+ movl $0x11cc, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtUserMinMaximize
+_NtUserMinMaximize:
+ movl $0x11cd, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserMNDragLeave
+_NtUserMNDragLeave:
+ movl $0x11ce, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserMNDragOver
+_NtUserMNDragOver:
+ movl $0x11cf, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserModifyUserStartupInfoFlags
+_NtUserModifyUserStartupInfoFlags:
+ movl $0x11d0, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserMoveWindow
+_NtUserMoveWindow:
+ movl $0x11d1, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtUserNotifyIMEStatus
+_NtUserNotifyIMEStatus:
+ movl $0x11d2, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserNotifyProcessCreate
+_NtUserNotifyProcessCreate:
+ movl $0x11d3, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserNotifyWinEvent
+_NtUserNotifyWinEvent:
+ movl $0x11d4, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserOpenClipboard
+_NtUserOpenClipboard:
+ movl $0x11d5, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserOpenDesktop
+_NtUserOpenDesktop:
+ movl $0x11d6, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserOpenInputDesktop
+_NtUserOpenInputDesktop:
+ movl $0x11d7, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserOpenWindowStation
+_NtUserOpenWindowStation:
+ movl $0x11d8, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserPaintDesktop
+_NtUserPaintDesktop:
+ movl $0x11d9, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserPeekMessage
+_NtUserPeekMessage:
+ movl $0x11da, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserPostMessage
+_NtUserPostMessage:
+ movl $0x11db, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserPostThreadMessage
+_NtUserPostThreadMessage:
+ movl $0x11dc, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserPrintWindow
+_NtUserPrintWindow:
+ movl $0x11dd, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserProcessConnect
+_NtUserProcessConnect:
+ movl $0x11de, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserQueryInformationThread
+_NtUserQueryInformationThread:
+ movl $0x11df, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserQueryInputContext
+_NtUserQueryInputContext:
+ movl $0x11e0, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserQuerySendMessage
+_NtUserQuerySendMessage:
+ movl $0x11e1, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserQueryUserCounters
+_NtUserQueryUserCounters:
+ movl $0x11e2, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserQueryWindow
+_NtUserQueryWindow:
+ movl $0x11e3, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserRealChildWindowFromPoint
+_NtUserRealChildWindowFromPoint:
+ movl $0x11e4, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserRealInternalGetMessage
+_NtUserRealInternalGetMessage:
+ movl $0x11e5, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtUserRealWaitMessageEx
+_NtUserRealWaitMessageEx:
+ movl $0x11e6, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserRedrawWindow
+_NtUserRedrawWindow:
+ movl $0x11e7, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserRegisterClassExWOW
+_NtUserRegisterClassExWOW:
+ movl $0x11e8, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtUserRegisterUserApiHook
+_NtUserRegisterUserApiHook:
+ movl $0x11e9, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserRegisterHotKey
+_NtUserRegisterHotKey:
+ movl $0x11ea, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserRegisterRawInputDevices
+_NtUserRegisterRawInputDevices:
+ movl $0x11eb, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserRegisterTasklist
+_NtUserRegisterTasklist:
+ movl $0x11ec, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserRegisterWindowMessage
+_NtUserRegisterWindowMessage:
+ movl $0x11ed, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserRemoveMenu
+_NtUserRemoveMenu:
+ movl $0x11ee, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserRemoveProp
+_NtUserRemoveProp:
+ movl $0x11ef, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserResolveDesktop
+_NtUserResolveDesktop:
+ movl $0x11f0, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserResolveDesktopForWOW
+_NtUserResolveDesktopForWOW:
+ movl $0x11f1, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserSBGetParms
+_NtUserSBGetParms:
+ movl $0x11f2, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserScrollDC
+_NtUserScrollDC:
+ movl $0x11f3, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtUserScrollWindowEx
+_NtUserScrollWindowEx:
+ movl $0x11f4, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtUserSelectPalette
+_NtUserSelectPalette:
+ movl $0x11f5, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserSendInput
+_NtUserSendInput:
+ movl $0x11f6, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserSetActiveWindow
+_NtUserSetActiveWindow:
+ movl $0x11f7, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserSetAppImeLevel
+_NtUserSetAppImeLevel:
+ movl $0x11f8, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetCapture
+_NtUserSetCapture:
+ movl $0x11f9, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserSetClassLong
+_NtUserSetClassLong:
+ movl $0x11fa, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserSetClassWord
+_NtUserSetClassWord:
+ movl $0x11fb, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserSetClipboardData
+_NtUserSetClipboardData:
+ movl $0x11fc, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserSetClipboardViewer
+_NtUserSetClipboardViewer:
+ movl $0x11fd, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserSetConsoleReserveKeys
+_NtUserSetConsoleReserveKeys:
+ movl $0x11fe, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetCursor
+_NtUserSetCursor:
+ movl $0x11ff, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserSetCursorContents
+_NtUserSetCursorContents:
+ movl $0x1200, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetCursorIconData
+_NtUserSetCursorIconData:
+ movl $0x1201, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtUserSetDbgTag
+_NtUserSetDbgTag:
+ movl $0x1202, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetFocus
+_NtUserSetFocus:
+ movl $0x1203, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserSetImeHotKey
+_NtUserSetImeHotKey:
+ movl $0x1204, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserSetImeInfoEx
+_NtUserSetImeInfoEx:
+ movl $0x1205, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserSetImeOwnerWindow
+_NtUserSetImeOwnerWindow:
+ movl $0x1206, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetInformationProcess
+_NtUserSetInformationProcess:
+ movl $0x1207, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserSetInformationThread
+_NtUserSetInformationThread:
+ movl $0x1208, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserSetInternalWindowPos
+_NtUserSetInternalWindowPos:
+ movl $0x1209, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserSetKeyboardState
+_NtUserSetKeyboardState:
+ movl $0x120a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserSetLogonNotifyWindow
+_NtUserSetLogonNotifyWindow:
+ movl $0x120b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserSetMenu
+_NtUserSetMenu:
+ movl $0x120c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserSetMenuContextHelpId
+_NtUserSetMenuContextHelpId:
+ movl $0x120d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetMenuDefaultItem
+_NtUserSetMenuDefaultItem:
+ movl $0x120e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserSetMenuFlagRtoL
+_NtUserSetMenuFlagRtoL:
+ movl $0x120f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserSetObjectInformation
+_NtUserSetObjectInformation:
+ movl $0x1210, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserSetParent
+_NtUserSetParent:
+ movl $0x1211, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetProcessWindowStation
+_NtUserSetProcessWindowStation:
+ movl $0x1212, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserSetProp
+_NtUserSetProp:
+ movl $0x1213, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserSetRipFlags
+_NtUserSetRipFlags:
+ movl $0x1214, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetScrollInfo
+_NtUserSetScrollInfo:
+ movl $0x1215, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserSetShellWindowEx
+_NtUserSetShellWindowEx:
+ movl $0x1216, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetSysColors
+_NtUserSetSysColors:
+ movl $0x1217, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserSetSystemCursor
+_NtUserSetSystemCursor:
+ movl $0x1218, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetSystemMenu
+_NtUserSetSystemMenu:
+ movl $0x1219, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetSystemTimer
+_NtUserSetSystemTimer:
+ movl $0x121a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserSetThreadDesktop
+_NtUserSetThreadDesktop:
+ movl $0x121b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserSetThreadLayoutHandles
+_NtUserSetThreadLayoutHandles:
+ movl $0x121c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetThreadState
+_NtUserSetThreadState:
+ movl $0x121d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetTimer
+_NtUserSetTimer:
+ movl $0x121e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserSetWindowFNID
+_NtUserSetWindowFNID:
+ movl $0x121f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetWindowLong
+_NtUserSetWindowLong:
+ movl $0x1220, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserSetWindowPlacement
+_NtUserSetWindowPlacement:
+ movl $0x1221, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSetWindowPos
+_NtUserSetWindowPos:
+ movl $0x1222, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtUserSetWindowRgn
+_NtUserSetWindowRgn:
+ movl $0x1223, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserSetWindowsHookAW
+_NtUserSetWindowsHookAW:
+ movl $0x1224, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserSetWindowsHookEx
+_NtUserSetWindowsHookEx:
+ movl $0x1225, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtUserSetWindowStationUser
+_NtUserSetWindowStationUser:
+ movl $0x1226, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserSetWindowWord
+_NtUserSetWindowWord:
+ movl $0x1227, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserSetWinEventHook
+_NtUserSetWinEventHook:
+ movl $0x1228, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtUserShowCaret
+_NtUserShowCaret:
+ movl $0x1229, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserShowScrollBar
+_NtUserShowScrollBar:
+ movl $0x122a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserShowWindow
+_NtUserShowWindow:
+ movl $0x122b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserShowWindowAsync
+_NtUserShowWindowAsync:
+ movl $0x122c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSoundSentry
+_NtUserSoundSentry:
+ movl $0x122d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserSwitchDesktop
+_NtUserSwitchDesktop:
+ movl $0x122e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserSystemParametersInfo
+_NtUserSystemParametersInfo:
+ movl $0x122f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserTestForInteractiveUser
+_NtUserTestForInteractiveUser:
+ movl $0x1230, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserThunkedMenuInfo
+_NtUserThunkedMenuInfo:
+ movl $0x1231, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserThunkedMenuItemInfo
+_NtUserThunkedMenuItemInfo:
+ movl $0x1232, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtUserToUnicodeEx
+_NtUserToUnicodeEx:
+ movl $0x1233, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtUserTrackMouseEvent
+_NtUserTrackMouseEvent:
+ movl $0x1234, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserTrackPopupMenuEx
+_NtUserTrackPopupMenuEx:
+ movl $0x1235, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtUserCalcMenuBar
+_NtUserCalcMenuBar:
+ movl $0x1236, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserPaintMenuBar
+_NtUserPaintMenuBar:
+ movl $0x1237, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtUserTranslateAccelerator
+_NtUserTranslateAccelerator:
+ movl $0x1238, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserTranslateMessage
+_NtUserTranslateMessage:
+ movl $0x1239, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserUnhookWindowsHookEx
+_NtUserUnhookWindowsHookEx:
+ movl $0x123a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserUnhookWinEvent
+_NtUserUnhookWinEvent:
+ movl $0x123b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserUnloadKeyboardLayout
+_NtUserUnloadKeyboardLayout:
+ movl $0x123c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserUnlockWindowStation
+_NtUserUnlockWindowStation:
+ movl $0x123d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserUnregisterClass
+_NtUserUnregisterClass:
+ movl $0x123e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserUnregisterUserApiHook
+_NtUserUnregisterUserApiHook:
+ movl $0x123f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserUnregisterHotKey
+_NtUserUnregisterHotKey:
+ movl $0x1240, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserUpdateInputContext
+_NtUserUpdateInputContext:
+ movl $0x1241, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserUpdateInstance
+_NtUserUpdateInstance:
+ movl $0x1242, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserUpdateLayeredWindow
+_NtUserUpdateLayeredWindow:
+ movl $0x1243, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x28
+
+.global _NtUserGetLayeredWindowAttributes
+_NtUserGetLayeredWindowAttributes:
+ movl $0x1244, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserSetLayeredWindowAttributes
+_NtUserSetLayeredWindowAttributes:
+ movl $0x1245, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserUpdatePerUserSystemParameters
+_NtUserUpdatePerUserSystemParameters:
+ movl $0x1246, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserUserHandleGrantAccess
+_NtUserUserHandleGrantAccess:
+ movl $0x1247, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserValidateHandleSecure
+_NtUserValidateHandleSecure:
+ movl $0x1248, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserValidateRect
+_NtUserValidateRect:
+ movl $0x1249, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserValidateTimerCallback
+_NtUserValidateTimerCallback:
+ movl $0x124a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserVkKeyScanEx
+_NtUserVkKeyScanEx:
+ movl $0x124b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserWaitForInputIdle
+_NtUserWaitForInputIdle:
+ movl $0x124c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserWaitForMsgAndEvent
+_NtUserWaitForMsgAndEvent:
+ movl $0x124d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserWaitMessage
+_NtUserWaitMessage:
+ movl $0x124e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserWin32PoolAllocationStats
+_NtUserWin32PoolAllocationStats:
+ movl $0x124f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtUserWindowFromPhysicalPoint
+_NtUserWindowFromPhysicalPoint:
+ movl $0x1250, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserWindowFromPoint
+_NtUserWindowFromPoint:
+ movl $0x1251, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserYieldTask
+_NtUserYieldTask:
+ movl $0x1252, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserRemoteConnect
+_NtUserRemoteConnect:
+ movl $0x1253, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserRemoteRedrawRectangle
+_NtUserRemoteRedrawRectangle:
+ movl $0x1254, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserRemoteRedrawScreen
+_NtUserRemoteRedrawScreen:
+ movl $0x1255, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserRemoteStopScreenUpdates
+_NtUserRemoteStopScreenUpdates:
+ movl $0x1256, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtUserCtxDisplayIOCtl
+_NtUserCtxDisplayIOCtl:
+ movl $0x1257, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiEngAssociateSurface
+_NtGdiEngAssociateSurface:
+ movl $0x1258, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiEngCreateBitmap
+_NtGdiEngCreateBitmap:
+ movl $0x1259, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiEngCreateDeviceSurface
+_NtGdiEngCreateDeviceSurface:
+ movl $0x125a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiEngCreateDeviceBitmap
+_NtGdiEngCreateDeviceBitmap:
+ movl $0x125b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiEngCreatePalette
+_NtGdiEngCreatePalette:
+ movl $0x125c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiEngComputeGlyphSet
+_NtGdiEngComputeGlyphSet:
+ movl $0x125d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiEngCopyBits
+_NtGdiEngCopyBits:
+ movl $0x125e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiEngDeletePalette
+_NtGdiEngDeletePalette:
+ movl $0x125f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiEngDeleteSurface
+_NtGdiEngDeleteSurface:
+ movl $0x1260, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiEngEraseSurface
+_NtGdiEngEraseSurface:
+ movl $0x1261, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiEngUnlockSurface
+_NtGdiEngUnlockSurface:
+ movl $0x1262, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiEngLockSurface
+_NtGdiEngLockSurface:
+ movl $0x1263, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiEngBitBlt
+_NtGdiEngBitBlt:
+ movl $0x1264, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x2c
+
+.global _NtGdiEngStretchBlt
+_NtGdiEngStretchBlt:
+ movl $0x1265, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x2c
+
+.global _NtGdiEngPlgBlt
+_NtGdiEngPlgBlt:
+ movl $0x1266, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x2c
+
+.global _NtGdiEngMarkBandingSurface
+_NtGdiEngMarkBandingSurface:
+ movl $0x1267, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiEngStrokePath
+_NtGdiEngStrokePath:
+ movl $0x1268, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtGdiEngFillPath
+_NtGdiEngFillPath:
+ movl $0x1269, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtGdiEngStrokeAndFillPath
+_NtGdiEngStrokeAndFillPath:
+ movl $0x126a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x28
+
+.global _NtGdiEngPaint
+_NtGdiEngPaint:
+ movl $0x126b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiEngLineTo
+_NtGdiEngLineTo:
+ movl $0x126c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x24
+
+.global _NtGdiEngAlphaBlend
+_NtGdiEngAlphaBlend:
+ movl $0x126d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtGdiEngGradientFill
+_NtGdiEngGradientFill:
+ movl $0x126e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x28
+
+.global _NtGdiEngTransparentBlt
+_NtGdiEngTransparentBlt:
+ movl $0x126f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtGdiEngTextOut
+_NtGdiEngTextOut:
+ movl $0x1270, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x28
+
+.global _NtGdiEngStretchBltROP
+_NtGdiEngStretchBltROP:
+ movl $0x1271, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x34
+
+.global _NtGdiXLATEOBJ_cGetPalette
+_NtGdiXLATEOBJ_cGetPalette:
+ movl $0x1272, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiXLATEOBJ_iXlate
+_NtGdiXLATEOBJ_iXlate:
+ movl $0x1273, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiXLATEOBJ_hGetColorTransform
+_NtGdiXLATEOBJ_hGetColorTransform:
+ movl $0x1274, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiCLIPOBJ_bEnum
+_NtGdiCLIPOBJ_bEnum:
+ movl $0x1275, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiCLIPOBJ_cEnumStart
+_NtGdiCLIPOBJ_cEnumStart:
+ movl $0x1276, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiCLIPOBJ_ppoGetPath
+_NtGdiCLIPOBJ_ppoGetPath:
+ movl $0x1277, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiEngDeletePath
+_NtGdiEngDeletePath:
+ movl $0x1278, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiEngCreateClip
+_NtGdiEngCreateClip:
+ movl $0x1279, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x0
+
+.global _NtGdiEngDeleteClip
+_NtGdiEngDeleteClip:
+ movl $0x127a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiBRUSHOBJ_ulGetBrushColor
+_NtGdiBRUSHOBJ_ulGetBrushColor:
+ movl $0x127b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiBRUSHOBJ_pvAllocRbrush
+_NtGdiBRUSHOBJ_pvAllocRbrush:
+ movl $0x127c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiBRUSHOBJ_pvGetRbrush
+_NtGdiBRUSHOBJ_pvGetRbrush:
+ movl $0x127d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiBRUSHOBJ_hGetColorTransform
+_NtGdiBRUSHOBJ_hGetColorTransform:
+ movl $0x127e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiXFORMOBJ_bApplyXform
+_NtGdiXFORMOBJ_bApplyXform:
+ movl $0x127f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiXFORMOBJ_iGetXform
+_NtGdiXFORMOBJ_iGetXform:
+ movl $0x1280, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiFONTOBJ_vGetInfo
+_NtGdiFONTOBJ_vGetInfo:
+ movl $0x1281, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiFONTOBJ_pxoGetXform
+_NtGdiFONTOBJ_pxoGetXform:
+ movl $0x1282, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiFONTOBJ_cGetGlyphs
+_NtGdiFONTOBJ_cGetGlyphs:
+ movl $0x1283, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtGdiFONTOBJ_pifi
+_NtGdiFONTOBJ_pifi:
+ movl $0x1284, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiFONTOBJ_pfdg
+_NtGdiFONTOBJ_pfdg:
+ movl $0x1285, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiFONTOBJ_pQueryGlyphAttrs
+_NtGdiFONTOBJ_pQueryGlyphAttrs:
+ movl $0x1286, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiFONTOBJ_pvTrueTypeFontFile
+_NtGdiFONTOBJ_pvTrueTypeFontFile:
+ movl $0x1287, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiFONTOBJ_cGetAllGlyphHandles
+_NtGdiFONTOBJ_cGetAllGlyphHandles:
+ movl $0x1288, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiSTROBJ_bEnum
+_NtGdiSTROBJ_bEnum:
+ movl $0x1289, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiSTROBJ_bEnumPositionsOnly
+_NtGdiSTROBJ_bEnumPositionsOnly:
+ movl $0x128a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiSTROBJ_bGetAdvanceWidths
+_NtGdiSTROBJ_bGetAdvanceWidths:
+ movl $0x128b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiSTROBJ_vEnumStart
+_NtGdiSTROBJ_vEnumStart:
+ movl $0x128c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiSTROBJ_dwGetCodePage
+_NtGdiSTROBJ_dwGetCodePage:
+ movl $0x128d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiPATHOBJ_vGetBounds
+_NtGdiPATHOBJ_vGetBounds:
+ movl $0x128e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiPATHOBJ_bEnum
+_NtGdiPATHOBJ_bEnum:
+ movl $0x128f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiPATHOBJ_vEnumStart
+_NtGdiPATHOBJ_vEnumStart:
+ movl $0x1290, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiPATHOBJ_vEnumStartClipLines
+_NtGdiPATHOBJ_vEnumStartClipLines:
+ movl $0x1291, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiPATHOBJ_bEnumClipLines
+_NtGdiPATHOBJ_bEnumClipLines:
+ movl $0x1292, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiGetDhpdev
+_NtGdiGetDhpdev:
+ movl $0x1293, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiEngCheckAbort
+_NtGdiEngCheckAbort:
+ movl $0x1294, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiHT_Get8BPPFormatPalette
+_NtGdiHT_Get8BPPFormatPalette:
+ movl $0x1295, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiHT_Get8BPPMaskPalette
+_NtGdiHT_Get8BPPMaskPalette:
+ movl $0x1296, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x18
+
+.global _NtGdiUpdateTransform
+_NtGdiUpdateTransform:
+ movl $0x1297, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiSetPUMPDOBJ
+_NtGdiSetPUMPDOBJ:
+ movl $0x1298, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiBRUSHOBJ_DeleteRbrush
+_NtGdiBRUSHOBJ_DeleteRbrush:
+ movl $0x1299, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtGdiUMPDEngFreeUserMem
+_NtGdiUMPDEngFreeUserMem:
+ movl $0x129a, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtGdiDrawStream
+_NtGdiDrawStream:
+ movl $0x129b, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtGdiSetDIBits
+_NtGdiSetDIBits:
+ movl $0x129c, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x1c
+
+.global _NtGdiSetViewportOrgEx
+_NtGdiSetViewportOrgEx:
+ movl $0x129d, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiSetWindowOrgEx
+_NtGdiSetWindowOrgEx:
+ movl $0x129e, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiGetFontFamilyInfo
+_NtGdiGetFontFamilyInfo:
+ movl $0x129f, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiOffsetViewportOrgEx
+_NtGdiOffsetViewportOrgEx:
+ movl $0x12a0, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtGdiOffsetWindowOrgEx
+_NtGdiOffsetWindowOrgEx:
+ movl $0x12a1, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserBuildMenuItemList
+_NtUserBuildMenuItemList:
+ movl $0x12a2, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x10
+
+.global _NtUserCreateCursorIconHandle
+_NtUserCreateCursorIconHandle:
+ movl $0x12a3, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetClassLong
+_NtUserGetClassLong:
+ movl $0x12a4, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetMenuDefaultItem
+_NtUserGetMenuDefaultItem:
+ movl $0x12a5, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetLastInputInfo
+_NtUserGetLastInputInfo:
+ movl $0x12a6, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x4
+
+.global _NtUserGetMinMaxInfo
+_NtUserGetMinMaxInfo:
+ movl $0x12a7, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetMonitorInfo
+_NtUserGetMonitorInfo:
+ movl $0x12a8, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetScrollInfo
+_NtUserGetScrollInfo:
+ movl $0x12a9, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserGetWindow
+_NtUserGetWindow:
+ movl $0x12aa, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserGetWindowLong
+_NtUserGetWindowLong:
+ movl $0x12ab, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserMenuInfo
+_NtUserMenuInfo:
+ movl $0x12ac, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserMenuItemInfo
+_NtUserMenuItemInfo:
+ movl $0x12ad, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserMonitorFromPoint
+_NtUserMonitorFromPoint:
+ movl $0x12ae, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
+.global _NtUserMonitorFromRect
+_NtUserMonitorFromRect:
+ movl $0x12af, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserMonitorFromWindow
+_NtUserMonitorFromWindow:
+ movl $0x12b0, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x8
+
+.global _NtUserSendMessage
+_NtUserSendMessage:
+ movl $0x12b1, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x14
+
+.global _NtUserSendMessageTimeout
+_NtUserSendMessageTimeout:
+ movl $0x12b2, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0x20
+
+.global _NtUserSetScrollBarInfo
+_NtUserSetScrollBarInfo:
+ movl $0x12b3, %eax
+ movq %rcx, %r10
+ syscall
+ ret $0xc
+
--- /dev/null
+; $Id: w32kdll.def 27344 2007-08-01 14:12:10Z tkreuzer $
+;
+; ReactOS Operating System
+;
+; This file contains all win32k native api functions from win 2k3 sp 2
+;
+LIBRARY w32kdll.dll
+
+EXPORTS
+NtGdiAbortDoc
+NtGdiAbortPath
+NtGdiAddFontResourceW
+NtGdiAddRemoteFontToDC
+NtGdiAddFontMemResourceEx
+NtGdiRemoveMergeFont
+NtGdiAddRemoteMMInstanceToDC
+NtGdiAlphaBlend
+NtGdiAngleArc
+NtGdiAnyLinkedFonts
+NtGdiFontIsLinked
+NtGdiArcInternal
+NtGdiBeginPath
+NtGdiBitBlt
+NtGdiCancelDC
+NtGdiCheckBitmapBits
+NtGdiCloseFigure
+NtGdiClearBitmapAttributes
+NtGdiClearBrushAttributes
+NtGdiColorCorrectPalette
+NtGdiCombineRgn
+NtGdiCombineTransform
+NtGdiComputeXformCoefficients
+;NtGdiConfigureOPMProtectedOutput
+NtGdiConsoleTextOut
+NtGdiConvertMetafileRect
+NtGdiCreateBitmap
+NtGdiCreateClientObj
+NtGdiCreateColorSpace
+NtGdiCreateColorTransform
+NtGdiCreateCompatibleBitmap
+NtGdiCreateCompatibleDC
+NtGdiCreateDIBBrush
+NtGdiCreateDIBitmapInternal
+NtGdiCreateDIBSection
+NtGdiCreateEllipticRgn
+NtGdiCreateHalftonePalette
+NtGdiCreateHatchBrushInternal
+NtGdiCreateMetafileDC
+;NtGdiCreateOPMProtectedOutputs
+NtGdiCreatePaletteInternal
+NtGdiCreatePatternBrushInternal
+NtGdiCreatePen
+NtGdiCreateRectRgn
+NtGdiCreateRoundRectRgn
+NtGdiCreateServerMetaFile
+NtGdiCreateSolidBrush
+NtGdiD3dContextCreate
+NtGdiD3dContextDestroy
+NtGdiD3dContextDestroyAll
+NtGdiD3dValidateTextureStageState
+NtGdiD3dDrawPrimitives2
+NtGdiDdGetDriverState
+NtGdiDdAddAttachedSurface
+NtGdiDdAlphaBlt
+NtGdiDdAttachSurface
+NtGdiDdBeginMoCompFrame
+NtGdiDdBlt
+NtGdiDdCanCreateSurface
+NtGdiDdCanCreateD3DBuffer
+NtGdiDdColorControl
+NtGdiDdCreateDirectDrawObject
+NtGdiDdCreateSurface
+NtGdiDdCreateD3DBuffer
+NtGdiDdCreateMoComp
+NtGdiDdCreateSurfaceObject
+NtGdiDdDeleteDirectDrawObject
+NtGdiDdDeleteSurfaceObject
+NtGdiDdDestroyMoComp
+NtGdiDdDestroySurface
+NtGdiDdDestroyD3DBuffer
+NtGdiDdEndMoCompFrame
+NtGdiDdFlip
+NtGdiDdFlipToGDISurface
+NtGdiDdGetAvailDriverMemory
+NtGdiDdGetBltStatus
+NtGdiDdGetDC
+NtGdiDdGetDriverInfo
+NtGdiDdGetDxHandle
+NtGdiDdGetFlipStatus
+NtGdiDdGetInternalMoCompInfo
+NtGdiDdGetMoCompBuffInfo
+NtGdiDdGetMoCompGuids
+NtGdiDdGetMoCompFormats
+NtGdiDdGetScanLine
+NtGdiDdLock
+NtGdiDdLockD3D
+NtGdiDdQueryDirectDrawObject
+NtGdiDdQueryMoCompStatus
+NtGdiDdReenableDirectDrawObject
+NtGdiDdReleaseDC
+NtGdiDdRenderMoComp
+NtGdiDdResetVisrgn
+NtGdiDdSetColorKey
+NtGdiDdSetExclusiveMode
+NtGdiDdSetGammaRamp
+NtGdiDdCreateSurfaceEx
+NtGdiDdSetOverlayPosition
+NtGdiDdUnattachSurface
+NtGdiDdUnlock
+NtGdiDdUnlockD3D
+NtGdiDdUpdateOverlay
+NtGdiDdWaitForVerticalBlank
+NtGdiDvpCanCreateVideoPort
+NtGdiDvpColorControl
+NtGdiDvpCreateVideoPort
+NtGdiDvpDestroyVideoPort
+NtGdiDvpFlipVideoPort
+NtGdiDvpGetVideoPortBandwidth
+NtGdiDvpGetVideoPortField
+NtGdiDvpGetVideoPortFlipStatus
+NtGdiDvpGetVideoPortInputFormats
+NtGdiDvpGetVideoPortLine
+NtGdiDvpGetVideoPortOutputFormats
+NtGdiDvpGetVideoPortConnectInfo
+NtGdiDvpGetVideoSignalStatus
+NtGdiDvpUpdateVideoPort
+NtGdiDvpWaitForVideoPortSync
+NtGdiDvpAcquireNotification
+NtGdiDvpReleaseNotification
+NtGdiDxgGenericThunk
+NtGdiDeleteClientObj
+NtGdiDeleteColorSpace
+NtGdiDeleteColorTransform
+NtGdiDeleteObjectApp
+NtGdiDescribePixelFormat
+;NtGdiDestroyOPMProtectedOutput
+NtGdiGetPerBandInfo
+NtGdiDoBanding
+NtGdiDoPalette
+NtGdiDrawEscape
+NtGdiEllipse
+NtGdiEnableEudc
+NtGdiEndDoc
+NtGdiEndPage
+NtGdiEndPath
+NtGdiEnumFontChunk
+NtGdiEnumFontClose
+NtGdiEnumFontOpen
+NtGdiEnumObjects
+NtGdiEqualRgn
+NtGdiEudcLoadUnloadLink
+NtGdiExcludeClipRect
+NtGdiExtCreatePen
+NtGdiExtCreateRegion
+NtGdiExtEscape
+NtGdiExtFloodFill
+NtGdiExtGetObjectW
+NtGdiExtSelectClipRgn
+NtGdiExtTextOutW
+NtGdiFillPath
+NtGdiFillRgn
+NtGdiFlattenPath
+NtGdiFlush
+NtGdiForceUFIMapping
+NtGdiFrameRgn
+NtGdiFullscreenControl
+NtGdiGetAndSetDCDword
+NtGdiGetAppClipBox
+NtGdiGetBitmapBits
+NtGdiGetBitmapDimension
+NtGdiGetBoundsRect
+;NtGdiGetCertificate
+;NtGdiGetCertificateSize
+NtGdiGetCharABCWidthsW
+NtGdiGetCharacterPlacementW
+NtGdiGetCharSet
+NtGdiGetCharWidthW
+NtGdiGetCharWidthInfo
+NtGdiGetColorAdjustment
+NtGdiGetColorSpaceforBitmap
+;NtGdiGetCOPPCompatibleOPMInformation
+NtGdiGetDCDword
+NtGdiGetDCforBitmap
+NtGdiGetDCObject
+NtGdiGetDCPoint
+NtGdiGetDeviceCaps
+NtGdiGetDeviceGammaRamp
+NtGdiGetDeviceCapsAll
+NtGdiGetDIBitsInternal
+NtGdiGetETM
+NtGdiGetEudcTimeStampEx
+NtGdiGetFontData
+NtGdiGetFontResourceInfoInternalW
+NtGdiGetGlyphIndicesW
+NtGdiGetGlyphIndicesWInternal
+NtGdiGetGlyphOutline
+;NtGdiGetOPMInformation
+NtGdiGetKerningPairs
+NtGdiGetLinkedUFIs
+NtGdiGetMiterLimit
+NtGdiGetMonitorID
+NtGdiGetNearestColor
+NtGdiGetNearestPaletteIndex
+NtGdiGetObjectBitmapHandle
+;NtGdiGetOPMRandomNumber
+NtGdiGetOutlineTextMetricsInternalW
+NtGdiGetPath
+NtGdiGetPixel
+NtGdiGetRandomRgn
+NtGdiGetRasterizerCaps
+NtGdiGetRealizationInfo
+NtGdiGetRegionData
+NtGdiGetRgnBox
+NtGdiGetServerMetaFileBits
+NtGdiGetSpoolMessage
+NtGdiGetStats
+NtGdiGetStockObject
+NtGdiGetStringBitmapW
+;NtGdiGetSuggestedOPMProtectedOutputArraySize
+NtGdiGetSystemPaletteUse
+NtGdiGetTextCharsetInfo
+NtGdiGetTextExtent
+NtGdiGetTextExtentExW
+NtGdiGetTextFaceW
+NtGdiGetTextMetricsW
+NtGdiGetTransform
+NtGdiGetUFI
+NtGdiGetEmbUFI
+NtGdiGetUFIPathname
+NtGdiGetEmbedFonts
+NtGdiChangeGhostFont
+NtGdiAddEmbFontToDC
+NtGdiGetFontUnicodeRanges
+NtGdiGetWidthTable
+NtGdiGradientFill
+NtGdiHfontCreate
+NtGdiIcmBrushInfo
+NtGdiInit
+NtGdiInitSpool
+NtGdiIntersectClipRect
+NtGdiInvertRgn
+NtGdiLineTo
+NtGdiMakeFontDir
+NtGdiMakeInfoDC
+NtGdiMaskBlt
+NtGdiModifyWorldTransform
+NtGdiMonoBitmap
+NtGdiMoveTo
+NtGdiOffsetClipRgn
+NtGdiOffsetRgn
+NtGdiOpenDCW
+NtGdiPatBlt
+NtGdiPolyPatBlt
+NtGdiPathToRegion
+NtGdiPlgBlt
+NtGdiPolyDraw
+NtGdiPolyPolyDraw
+NtGdiPolyTextOutW
+NtGdiPtInRegion
+NtGdiPtVisible
+NtGdiQueryFonts
+NtGdiQueryFontAssocInfo
+NtGdiRectangle
+NtGdiRectInRegion
+NtGdiRectVisible
+NtGdiRemoveFontResourceW
+NtGdiRemoveFontMemResourceEx
+NtGdiResetDC
+NtGdiResizePalette
+NtGdiRestoreDC
+NtGdiRoundRect
+NtGdiSaveDC
+NtGdiScaleViewportExtEx
+NtGdiScaleWindowExtEx
+NtGdiSelectBitmap
+NtGdiSelectBrush
+NtGdiSelectClipPath
+NtGdiSelectFont
+NtGdiSelectPen
+NtGdiSetBitmapAttributes
+NtGdiSetBitmapBits
+NtGdiSetBitmapDimension
+NtGdiSetBoundsRect
+NtGdiSetBrushAttributes
+NtGdiSetBrushOrg
+NtGdiSetColorAdjustment
+NtGdiSetColorSpace
+NtGdiSetDeviceGammaRamp
+NtGdiSetDIBitsToDeviceInternal
+NtGdiSetFontEnumeration
+NtGdiSetFontXform
+NtGdiSetIcmMode
+NtGdiSetLinkedUFIs
+NtGdiSetMagicColors
+NtGdiSetMetaRgn
+NtGdiSetMiterLimit
+NtGdiGetDeviceWidth
+NtGdiMirrorWindowOrg
+NtGdiSetLayout
+;NtGdiSetOPMSigningKeyAndSequenceNumbers
+NtGdiSetPixel
+NtGdiSetPixelFormat
+NtGdiSetRectRgn
+NtGdiSetSystemPaletteUse
+NtGdiSetTextJustification
+NtGdiSetupPublicCFONT
+NtGdiSetVirtualResolution
+NtGdiSetSizeDevice
+NtGdiStartDoc
+NtGdiStartPage
+NtGdiStretchBlt
+NtGdiStretchDIBitsInternal
+NtGdiStrokeAndFillPath
+NtGdiStrokePath
+NtGdiSwapBuffers
+NtGdiTransformPoints
+NtGdiTransparentBlt
+NtGdiUnloadPrinterDriver
+NtGdiUnmapMemFont
+NtGdiUnrealizeObject
+NtGdiUpdateColors
+NtGdiWidenPath
+NtUserActivateKeyboardLayout
+;NtUserAddClipboardFormatListener
+NtUserAlterWindowStyle
+NtUserAssociateInputContext
+NtUserAttachThreadInput
+NtUserBeginPaint
+NtUserBitBltSysBmp
+NtUserBlockInput
+NtUserBuildHimcList
+NtUserBuildHwndList
+NtUserBuildNameList
+NtUserBuildPropList
+NtUserCallHwnd
+NtUserCallHwndLock
+NtUserCallHwndOpt
+NtUserCallHwndParam
+NtUserCallHwndParamLock
+NtUserCallMsgFilter
+NtUserCallNextHookEx
+NtUserCallNoParam
+NtUserCallOneParam
+NtUserCallTwoParam
+NtUserChangeClipboardChain
+NtUserChangeDisplaySettings
+;NtUserCheckAccessForIntegrityLevel
+;NtUserCheckDesktopByThreadId
+;NtUserCheckWindowThreadDesktop
+NtUserCheckImeHotKey
+NtUserCheckMenuItem
+NtUserChildWindowFromPointEx
+NtUserClipCursor
+NtUserCloseClipboard
+NtUserCloseDesktop
+NtUserCloseWindowStation
+NtUserConsoleControl
+NtUserConvertMemHandle
+NtUserCopyAcceleratorTable
+NtUserCountClipboardFormats
+NtUserCreateAcceleratorTable
+NtUserCreateCaret
+;NtUserCreateDesktopEx
+NtUserCreateInputContext
+NtUserCreateLocalMemHandle
+NtUserCreateWindowEx
+NtUserCreateWindowStation
+NtUserDdeInitialize
+NtUserDeferWindowPos
+NtUserDefSetText
+NtUserDeleteMenu
+NtUserDestroyAcceleratorTable
+NtUserDestroyCursor
+NtUserDestroyInputContext
+NtUserDestroyMenu
+NtUserDestroyWindow
+NtUserDisableThreadIme
+NtUserDispatchMessage
+;NtUserDoSoundConnect
+;NtUserDoSoundDisconnect
+NtUserDragDetect
+NtUserDragObject
+NtUserDrawAnimatedRects
+NtUserDrawCaption
+NtUserDrawCaptionTemp
+NtUserDrawIconEx
+NtUserDrawMenuBarTemp
+NtUserEmptyClipboard
+NtUserEnableMenuItem
+NtUserEnableScrollBar
+NtUserEndDeferWindowPosEx
+NtUserEndMenu
+NtUserEndPaint
+NtUserEnumDisplayDevices
+NtUserEnumDisplayMonitors
+NtUserEnumDisplaySettings
+NtUserEvent
+NtUserExcludeUpdateRgn
+NtUserFillWindow
+NtUserFindExistingCursorIcon
+NtUserFindWindowEx
+NtUserFlashWindowEx
+;NtUserFrostCrashedWindow
+NtUserGetAltTabInfo
+NtUserGetAncestor
+NtUserGetAppImeLevel
+NtUserGetAsyncKeyState
+NtUserGetAtomName
+NtUserGetCaretBlinkTime
+NtUserGetCaretPos
+;NtUserGetClassInfoEx
+NtUserGetClassName
+NtUserGetClipboardData
+NtUserGetClipboardFormatName
+NtUserGetClipboardOwner
+NtUserGetClipboardSequenceNumber
+NtUserGetClipboardViewer
+NtUserGetClipCursor
+NtUserGetComboBoxInfo
+NtUserGetControlBrush
+NtUserGetControlColor
+NtUserGetCPD
+NtUserGetCursorFrameInfo
+NtUserGetCursorInfo
+NtUserGetDC
+NtUserGetDCEx
+NtUserGetDoubleClickTime
+NtUserGetForegroundWindow
+NtUserGetGuiResources
+NtUserGetGUIThreadInfo
+NtUserGetIconInfo
+NtUserGetIconSize
+NtUserGetImeHotKey
+NtUserGetImeInfoEx
+NtUserGetInternalWindowPos
+NtUserGetKeyboardLayoutList
+NtUserGetKeyboardLayoutName
+NtUserGetKeyboardState
+NtUserGetKeyNameText
+NtUserGetKeyState
+NtUserGetListBoxInfo
+NtUserGetMenuBarInfo
+NtUserGetMenuIndex
+NtUserGetMenuItemRect
+NtUserGetMessage
+NtUserGetMouseMovePointsEx
+NtUserGetObjectInformation
+NtUserGetOpenClipboardWindow
+NtUserGetPriorityClipboardFormat
+NtUserGetProcessWindowStation
+NtUserGetRawInputBuffer
+NtUserGetRawInputData
+NtUserGetRawInputDeviceInfo
+NtUserGetRawInputDeviceList
+NtUserGetRegisteredRawInputDevices
+NtUserGetScrollBarInfo
+NtUserGetSystemMenu
+NtUserGetThreadDesktop
+NtUserGetThreadState
+NtUserGetTitleBarInfo
+;NtUserGetUpdatedClipboardFormats
+NtUserGetUpdateRect
+NtUserGetUpdateRgn
+NtUserGetWindowDC
+NtUserGetWindowPlacement
+NtUserGetWOWClass
+;NtUserGhostWindowFromHungWindow
+NtUserHardErrorControl
+NtUserHideCaret
+NtUserHiliteMenuItem
+;NtUserHungWindowFromGhostWindow
+NtUserImpersonateDdeClientWindow
+NtUserInitialize
+NtUserInitializeClientPfnArrays
+NtUserInitTask
+NtUserInternalGetWindowText
+;NtUserInternalGetWindowIcon
+NtUserInvalidateRect
+NtUserInvalidateRgn
+NtUserIsClipboardFormatAvailable
+NtUserKillTimer
+NtUserLoadKeyboardLayoutEx
+NtUserLockWindowStation
+NtUserLockWindowUpdate
+NtUserLockWorkStation
+;NtUserLogicalToPhysicalPoint
+NtUserMapVirtualKeyEx
+NtUserMenuItemFromPoint
+NtUserMessageCall
+NtUserMinMaximize
+NtUserMNDragLeave
+NtUserMNDragOver
+NtUserModifyUserStartupInfoFlags
+NtUserMoveWindow
+NtUserNotifyIMEStatus
+NtUserNotifyProcessCreate
+NtUserNotifyWinEvent
+NtUserOpenClipboard
+NtUserOpenDesktop
+NtUserOpenInputDesktop
+;NtUserOpenThreadDesktop
+NtUserOpenWindowStation
+NtUserPaintDesktop
+;NtUserPaintMonitor
+NtUserPeekMessage
+;NtUserPhysicalToLogicalPoint
+NtUserPostMessage
+NtUserPostThreadMessage
+NtUserPrintWindow
+NtUserProcessConnect
+NtUserQueryInformationThread
+NtUserQueryInputContext
+NtUserQuerySendMessage
+NtUserQueryWindow
+NtUserRealChildWindowFromPoint
+NtUserRealInternalGetMessage
+NtUserRealWaitMessageEx
+NtUserRedrawWindow
+NtUserRegisterClassExWOW
+;NtUserRegisterErrorReportingDialog
+NtUserRegisterUserApiHook
+NtUserRegisterHotKey
+NtUserRegisterRawInputDevices
+NtUserRegisterTasklist
+NtUserRegisterWindowMessage
+;NtUserRemoveClipboardFormatListener
+NtUserRemoveMenu
+NtUserRemoveProp
+NtUserResolveDesktop
+NtUserResolveDesktopForWOW
+NtUserSBGetParms
+NtUserScrollDC
+NtUserScrollWindowEx
+NtUserSelectPalette
+NtUserSendInput
+NtUserSetActiveWindow
+NtUserSetAppImeLevel
+NtUserSetCapture
+NtUserSetClassLong
+NtUserSetClassWord
+NtUserSetClipboardData
+NtUserSetClipboardViewer
+NtUserSetConsoleReserveKeys
+NtUserSetCursor
+NtUserSetCursorContents
+NtUserSetCursorIconData
+NtUserSetFocus
+NtUserSetImeHotKey
+NtUserSetImeInfoEx
+NtUserSetImeOwnerWindow
+NtUserSetInformationProcess
+NtUserSetInformationThread
+NtUserSetInternalWindowPos
+NtUserSetKeyboardState
+NtUserSetMenu
+NtUserSetMenuContextHelpId
+NtUserSetMenuDefaultItem
+NtUserSetMenuFlagRtoL
+NtUserSetObjectInformation
+NtUserSetParent
+NtUserSetProcessWindowStation
+;NtUserGetProp
+;NtUserSetProp
+NtUserSetScrollInfo
+NtUserSetShellWindowEx
+NtUserSetSysColors
+NtUserSetSystemCursor
+NtUserSetSystemMenu
+NtUserSetSystemTimer
+NtUserSetThreadDesktop
+NtUserSetThreadLayoutHandles
+NtUserSetThreadState
+NtUserSetTimer
+;NtUserSetProcessDPIAware
+NtUserSetWindowFNID
+NtUserSetWindowLong
+NtUserSetWindowPlacement
+NtUserSetWindowPos
+NtUserSetWindowRgn
+;NtUserGetWindowRgnEx
+;NtUserSetWindowRgnEx
+NtUserSetWindowsHookAW
+NtUserSetWindowsHookEx
+NtUserSetWindowStationUser
+NtUserSetWindowWord
+NtUserSetWinEventHook
+NtUserShowCaret
+NtUserShowScrollBar
+NtUserShowWindow
+NtUserShowWindowAsync
+NtUserSoundSentry
+NtUserSwitchDesktop
+NtUserSystemParametersInfo
+NtUserTestForInteractiveUser
+NtUserThunkedMenuInfo
+NtUserThunkedMenuItemInfo
+NtUserToUnicodeEx
+NtUserTrackMouseEvent
+NtUserTrackPopupMenuEx
+NtUserCalcMenuBar
+NtUserPaintMenuBar
+NtUserTranslateAccelerator
+NtUserTranslateMessage
+NtUserUnhookWindowsHookEx
+NtUserUnhookWinEvent
+NtUserUnloadKeyboardLayout
+NtUserUnlockWindowStation
+NtUserUnregisterClass
+NtUserUnregisterUserApiHook
+NtUserUnregisterHotKey
+NtUserUpdateInputContext
+NtUserUpdateInstance
+NtUserUpdateLayeredWindow
+NtUserGetLayeredWindowAttributes
+NtUserSetLayeredWindowAttributes
+NtUserUpdatePerUserSystemParameters
+NtUserUserHandleGrantAccess
+NtUserValidateHandleSecure
+NtUserValidateRect
+NtUserValidateTimerCallback
+NtUserVkKeyScanEx
+NtUserWaitForInputIdle
+NtUserWaitForMsgAndEvent
+NtUserWaitMessage
+NtUserWin32PoolAllocationStats
+NtUserWindowFromPhysicalPoint
+NtUserWindowFromPoint
+NtUserYieldTask
+NtUserRemoteConnect
+NtUserRemoteRedrawRectangle
+NtUserRemoteRedrawScreen
+NtUserRemoteStopScreenUpdates
+NtUserCtxDisplayIOCtl
+;NtUserRegisterSessionPort
+;NtUserUnregisterSessionPort
+;NtUserUpdateWindowTransform
+;NtUserDwmStartRedirection
+;NtUserDwmStopRedirection
+;NtUserDwmHintDxUpdate
+;NtUserDwmGetDxRgn
+;NtUserGetWindowMinimizeRect
+NtGdiEngAssociateSurface
+NtGdiEngCreateBitmap
+NtGdiEngCreateDeviceSurface
+NtGdiEngCreateDeviceBitmap
+NtGdiEngCreatePalette
+NtGdiEngComputeGlyphSet
+NtGdiEngCopyBits
+NtGdiEngDeletePalette
+NtGdiEngDeleteSurface
+NtGdiEngEraseSurface
+NtGdiEngUnlockSurface
+NtGdiEngLockSurface
+NtGdiEngBitBlt
+NtGdiEngStretchBlt
+NtGdiEngPlgBlt
+NtGdiEngMarkBandingSurface
+NtGdiEngStrokePath
+NtGdiEngFillPath
+NtGdiEngStrokeAndFillPath
+NtGdiEngPaint
+NtGdiEngLineTo
+NtGdiEngAlphaBlend
+NtGdiEngGradientFill
+NtGdiEngTransparentBlt
+NtGdiEngTextOut
+NtGdiEngStretchBltROP
+NtGdiXLATEOBJ_cGetPalette
+NtGdiXLATEOBJ_iXlate
+NtGdiXLATEOBJ_hGetColorTransform
+NtGdiCLIPOBJ_bEnum
+NtGdiCLIPOBJ_cEnumStart
+NtGdiCLIPOBJ_ppoGetPath
+NtGdiEngDeletePath
+NtGdiEngCreateClip
+NtGdiEngDeleteClip
+NtGdiBRUSHOBJ_ulGetBrushColor
+NtGdiBRUSHOBJ_pvAllocRbrush
+NtGdiBRUSHOBJ_pvGetRbrush
+NtGdiBRUSHOBJ_hGetColorTransform
+NtGdiXFORMOBJ_bApplyXform
+NtGdiXFORMOBJ_iGetXform
+NtGdiFONTOBJ_vGetInfo
+NtGdiFONTOBJ_pxoGetXform
+NtGdiFONTOBJ_cGetGlyphs
+NtGdiFONTOBJ_pifi
+NtGdiFONTOBJ_pfdg
+NtGdiFONTOBJ_pQueryGlyphAttrs
+NtGdiFONTOBJ_pvTrueTypeFontFile
+NtGdiFONTOBJ_cGetAllGlyphHandles
+NtGdiSTROBJ_bEnum
+NtGdiSTROBJ_bEnumPositionsOnly
+NtGdiSTROBJ_bGetAdvanceWidths
+NtGdiSTROBJ_vEnumStart
+NtGdiSTROBJ_dwGetCodePage
+NtGdiPATHOBJ_vGetBounds
+NtGdiPATHOBJ_bEnum
+NtGdiPATHOBJ_vEnumStart
+NtGdiPATHOBJ_vEnumStartClipLines
+NtGdiPATHOBJ_bEnumClipLines
+NtGdiGetDhpdev
+NtGdiEngCheckAbort
+NtGdiHT_Get8BPPFormatPalette
+NtGdiHT_Get8BPPMaskPalette
+NtGdiUpdateTransform
+NtGdiSetPUMPDOBJ
+NtGdiBRUSHOBJ_DeleteRbrush
+NtGdiUMPDEngFreeUserMem
+NtGdiDrawStream
+;NtGdiDwmGetDirtyRgn
+;NtGdiDwmGetSurfaceData
+;NtGdiDdDDICreateAllocation
+;NtGdiDdDDIQueryResourceInfo
+;NtGdiDdDDIOpenResource
+;NtGdiDdDDIDestroyAllocation
+;NtGdiDdDDISetAllocationPriority
+;NtGdiDdDDIQueryAllocationResidency
+;NtGdiDdDDICreateDevice
+;NtGdiDdDDIDestroyDevice
+;NtGdiDdDDICreateContext
+;NtGdiDdDDIDestroyContext
+;NtGdiDdDDICreateSynchronizationObject
+;NtGdiDdDDIDestroySynchronizationObject
+;NtGdiDdDDIWaitForSynchronizationObject
+;NtGdiDdDDISignalSynchronizationObject
+;NtGdiDdDDIGetRuntimeData
+;NtGdiDdDDIQueryAdapterInfo
+;NtGdiDdDDILock
+;NtGdiDdDDIUnlock
+;NtGdiDdDDIGetDisplayModeList
+;NtGdiDdDDISetDisplayMode
+;NtGdiDdDDIGetMultisampleMethodList
+;NtGdiDdDDIPresent
+;NtGdiDdDDIRender
+;NtGdiDdDDIOpenAdapterFromDeviceName
+;NtGdiDdDDIOpenAdapterFromHdc
+;NtGdiDdDDICloseAdapter
+;NtGdiDdDDIGetSharedPrimaryHandle
+;NtGdiDdDDIEscape
+;NtGdiDdDDIQueryStatistics
+;NtGdiDdDDISetVidPnSourceOwner
+;NtGdiDdDDIGetPresentHistory
+;NtGdiDdDDICreateOverlay
+;NtGdiDdDDIUpdateOverlay
+;NtGdiDdDDIFlipOverlay
+;NtGdiDdDDIDestroyOverlay
+;NtGdiDdDDIWaitForVerticalBlankEvent
+;NtGdiDdDDISetGammaRamp
+;NtGdiDdDDIGetDeviceState
+;NtGdiDdDDICreateDCFromMemory
+;NtGdiDdDDIDestroyDCFromMemory
+;NtGdiDdDDISetContextSchedulingPriority
+;NtGdiDdDDIGetContextSchedulingPriority
+;NtGdiDdDDISetProcessSchedulingPriorityClass
+;NtGdiDdDDIGetProcessSchedulingPriorityClass
+;NtGdiDdDDIReleaseProcessVidPnSourceOwners
+;NtGdiDdDDIGetScanLine
+;NtGdiDdDDISetQueuedLimit
+;NtGdiDdDDIPollDisplayChildren
+;NtGdiDdDDIInvalidateActiveVidPn
+;NtGdiDdDDICheckOcclusion
+;NtGdiDdDDIWaitForIdle
+;NtGdiDdDDICheckMonitorPowerState
+;NtGdiDdDDICheckExclusiveOwnership
+;NtGdiDdDDISetDisplayPrivateDriverFormat
+;NtGdiDdDDISharedPrimaryLockNotification
+;NtGdiDdDDISharedPrimaryUnLockNotification
+;NtGdiMakeObjectXferable
+;NtGdiMakeObjectUnXferable
+;NtGdiGetNumberOfPhysicalMonitors
+;NtGdiGetPhysicalMonitors
+;NtGdiGetPhysicalMonitorDescription
+;NtGdiDestroyPhysicalMonitor
+;NtGdiDDCCIGetVCPFeature
+;NtGdiDDCCISetVCPFeature
+;NtGdiDDCCISaveCurrentSettings
+;NtGdiDDCCIGetCapabilitiesStringLength
+;NtGdiDDCCIGetCapabilitiesString
+;NtGdiDDCCIGetTimingReport
+;NtUserSetMirrorRendering
+;NtUserShowSystemCursor
--- /dev/null
+; $Id: w32kdll.def 27344 2007-08-01 14:12:10Z tkreuzer $
+;
+; ReactOS Operating System
+;
+; This file contains all win32k native api functions from win 2k3 sp 2
+;
+LIBRARY w32kdll.dll
+
+EXPORTS
+NtGdiAbortDoc@4
+NtGdiAbortPath@4
+NtGdiAddFontResourceW@24
+NtGdiAddRemoteFontToDC@16
+NtGdiAddFontMemResourceEx@20
+NtGdiRemoveMergeFont@8
+NtGdiAddRemoteMMInstanceToDC@12
+NtGdiAlphaBlend@48
+NtGdiAngleArc@24
+NtGdiAnyLinkedFonts@0
+NtGdiFontIsLinked@4
+NtGdiArcInternal@40
+NtGdiBeginPath@4
+NtGdiBitBlt@44
+NtGdiCancelDC@4
+NtGdiCheckBitmapBits@32
+NtGdiCloseFigure@4
+NtGdiClearBitmapAttributes@8
+NtGdiClearBrushAttributes@8
+NtGdiColorCorrectPalette@24
+NtGdiCombineRgn@16
+NtGdiCombineTransform@12
+NtGdiComputeXformCoefficients@4
+NtGdiConfigureOPMProtectedOutput@16
+NtGdiConsoleTextOut@16
+NtGdiConvertMetafileRect@8
+NtGdiCreateBitmap@20
+NtGdiCreateClientObj@4
+NtGdiCreateColorSpace@4
+NtGdiCreateColorTransform@32
+NtGdiCreateCompatibleBitmap@12
+NtGdiCreateCompatibleDC@4
+NtGdiCreateDIBBrush@24
+NtGdiCreateDIBitmapInternal@44
+NtGdiCreateDIBSection@36
+NtGdiCreateEllipticRgn@16
+NtGdiCreateHalftonePalette@4
+NtGdiCreateHatchBrushInternal@12
+NtGdiCreateMetafileDC@4
+NtGdiCreateOPMProtectedOutputs@20
+NtGdiCreatePaletteInternal@8
+NtGdiCreatePatternBrushInternal@12
+NtGdiCreatePen@16
+NtGdiCreateRectRgn@16
+NtGdiCreateRoundRectRgn@24
+NtGdiCreateServerMetaFile@24
+NtGdiCreateSolidBrush@8
+NtGdiD3dContextCreate@16
+NtGdiD3dContextDestroy@4
+NtGdiD3dContextDestroyAll@4
+NtGdiD3dValidateTextureStageState@4
+NtGdiD3dDrawPrimitives2@28
+NtGdiDdGetDriverState@4
+NtGdiDdAddAttachedSurface@12
+NtGdiDdAlphaBlt@12
+NtGdiDdAttachSurface@8
+NtGdiDdBeginMoCompFrame@8
+NtGdiDdBlt@12
+NtGdiDdCanCreateSurface@8
+NtGdiDdCanCreateD3DBuffer@8
+NtGdiDdColorControl@8
+NtGdiDdCreateDirectDrawObject@4
+NtGdiDdCreateSurface@32
+NtGdiDdCreateD3DBuffer@32
+NtGdiDdCreateMoComp@8
+NtGdiDdCreateSurfaceObject@24
+NtGdiDdDeleteDirectDrawObject@4
+NtGdiDdDeleteSurfaceObject@4
+NtGdiDdDestroyMoComp@8
+NtGdiDdDestroySurface@8
+NtGdiDdDestroyD3DBuffer@4
+NtGdiDdEndMoCompFrame@8
+NtGdiDdFlip@20
+NtGdiDdFlipToGDISurface@8
+NtGdiDdGetAvailDriverMemory@8
+NtGdiDdGetBltStatus@8
+NtGdiDdGetDC@8
+NtGdiDdGetDriverInfo@8
+NtGdiDdGetDxHandle@12
+NtGdiDdGetFlipStatus@8
+NtGdiDdGetInternalMoCompInfo@8
+NtGdiDdGetMoCompBuffInfo@8
+NtGdiDdGetMoCompGuids@8
+NtGdiDdGetMoCompFormats@8
+NtGdiDdGetScanLine@8
+NtGdiDdLock@12
+NtGdiDdLockD3D@8
+NtGdiDdQueryDirectDrawObject@44
+NtGdiDdQueryMoCompStatus@8
+NtGdiDdReenableDirectDrawObject@8
+NtGdiDdReleaseDC@4
+NtGdiDdRenderMoComp@8
+NtGdiDdResetVisrgn@8
+NtGdiDdSetColorKey@8
+NtGdiDdSetExclusiveMode@8
+NtGdiDdSetGammaRamp@12
+NtGdiDdCreateSurfaceEx@12
+NtGdiDdSetOverlayPosition@12
+NtGdiDdUnattachSurface@8
+NtGdiDdUnlock@8
+NtGdiDdUnlockD3D@8
+NtGdiDdUpdateOverlay@12
+NtGdiDdWaitForVerticalBlank@8
+NtGdiDvpCanCreateVideoPort@8
+NtGdiDvpColorControl@8
+NtGdiDvpCreateVideoPort@8
+NtGdiDvpDestroyVideoPort@8
+NtGdiDvpFlipVideoPort@16
+NtGdiDvpGetVideoPortBandwidth@8
+NtGdiDvpGetVideoPortField@8
+NtGdiDvpGetVideoPortFlipStatus@8
+NtGdiDvpGetVideoPortInputFormats@8
+NtGdiDvpGetVideoPortLine@8
+NtGdiDvpGetVideoPortOutputFormats@8
+NtGdiDvpGetVideoPortConnectInfo@8
+NtGdiDvpGetVideoSignalStatus@8
+NtGdiDvpUpdateVideoPort@16
+NtGdiDvpWaitForVideoPortSync@8
+NtGdiDvpAcquireNotification@12
+NtGdiDvpReleaseNotification@8
+NtGdiDxgGenericThunk@24
+NtGdiDeleteClientObj@4
+NtGdiDeleteColorSpace@4
+NtGdiDeleteColorTransform@8
+NtGdiDeleteObjectApp@4
+NtGdiDescribePixelFormat@16
+NtGdiDestroyOPMProtectedOutput@4
+NtGdiGetPerBandInfo@8
+NtGdiDoBanding@16
+NtGdiDoPalette@24
+NtGdiDrawEscape@16
+NtGdiEllipse@20
+NtGdiEnableEudc@4
+NtGdiEndDoc@4
+NtGdiEndPage@4
+NtGdiEndPath@4
+NtGdiEnumFontChunk@20
+NtGdiEnumFontClose@4
+NtGdiEnumFontOpen@28
+NtGdiEnumObjects@16
+NtGdiEqualRgn@8
+NtGdiEudcLoadUnloadLink@28
+NtGdiExcludeClipRect@20
+NtGdiExtCreatePen@44
+NtGdiExtCreateRegion@12
+NtGdiExtEscape@32
+NtGdiExtFloodFill@20
+NtGdiExtGetObjectW@12
+NtGdiExtSelectClipRgn@12
+NtGdiExtTextOutW@36
+NtGdiFillPath@4
+NtGdiFillRgn@12
+NtGdiFlattenPath@4
+NtGdiFlush@0
+NtGdiForceUFIMapping@8
+NtGdiFrameRgn@20
+NtGdiFullscreenControl@20
+NtGdiGetAndSetDCDword@16
+NtGdiGetAppClipBox@8
+NtGdiGetBitmapBits@12
+NtGdiGetBitmapDimension@8
+NtGdiGetBoundsRect@12
+NtGdiGetCertificate@16
+NtGdiGetCertificateSize@12
+NtGdiGetCharABCWidthsW@24
+NtGdiGetCharacterPlacementW@24
+NtGdiGetCharSet@4
+NtGdiGetCharWidthW@24
+NtGdiGetCharWidthInfo@8
+NtGdiGetColorAdjustment@8
+NtGdiGetColorSpaceforBitmap@4
+NtGdiGetCOPPCompatibleOPMInformation@12
+NtGdiGetDCDword@12
+NtGdiGetDCforBitmap@4
+NtGdiGetDCObject@8
+NtGdiGetDCPoint@12
+NtGdiGetDeviceCaps@8
+NtGdiGetDeviceGammaRamp@8
+NtGdiGetDeviceCapsAll@8
+NtGdiGetDIBitsInternal@36
+NtGdiGetETM@8
+NtGdiGetEudcTimeStampEx@12
+NtGdiGetFontData@20
+NtGdiGetFontResourceInfoInternalW@28
+NtGdiGetGlyphIndicesW@20
+NtGdiGetGlyphIndicesWInternal@24
+NtGdiGetGlyphOutline@32
+NtGdiGetOPMInformation@12
+NtGdiGetKerningPairs@12
+NtGdiGetLinkedUFIs@12
+NtGdiGetMiterLimit@8
+NtGdiGetMonitorID@12
+NtGdiGetNearestColor@8
+NtGdiGetNearestPaletteIndex@8
+NtGdiGetObjectBitmapHandle@8
+NtGdiGetOPMRandomNumber@8
+NtGdiGetOutlineTextMetricsInternalW@16
+NtGdiGetPath@16
+NtGdiGetPixel@12
+NtGdiGetRandomRgn@12
+NtGdiGetRasterizerCaps@8
+NtGdiGetRealizationInfo@12
+NtGdiGetRegionData@12
+NtGdiGetRgnBox@8
+NtGdiGetServerMetaFileBits@28
+NtGdiGetSpoolMessage@16
+NtGdiGetStats@20
+NtGdiGetStockObject@4
+NtGdiGetStringBitmapW@20
+NtGdiGetSuggestedOPMProtectedOutputArraySize@8
+NtGdiGetSystemPaletteUse@4
+NtGdiGetTextCharsetInfo@12
+NtGdiGetTextExtent@20
+NtGdiGetTextExtentExW@32
+NtGdiGetTextFaceW@16
+NtGdiGetTextMetricsW@12
+NtGdiGetTransform@12
+NtGdiGetUFI@24
+NtGdiGetEmbUFI@28
+NtGdiGetUFIPathname@40
+NtGdiGetEmbedFonts@0
+NtGdiChangeGhostFont@8
+NtGdiAddEmbFontToDC@8
+NtGdiGetFontUnicodeRanges@8
+NtGdiGetWidthTable@28
+NtGdiGradientFill@24
+NtGdiHfontCreate@20
+NtGdiIcmBrushInfo@32
+NtGdiInit@0
+NtGdiInitSpool@0
+NtGdiIntersectClipRect@20
+NtGdiInvertRgn@8
+NtGdiLineTo@12
+NtGdiMakeFontDir@20
+NtGdiMakeInfoDC@8
+NtGdiMaskBlt@52
+NtGdiModifyWorldTransform@12
+NtGdiMonoBitmap@4
+NtGdiMoveTo@16
+NtGdiOffsetClipRgn@12
+NtGdiOffsetRgn@12
+NtGdiOpenDCW@32
+NtGdiPatBlt@24
+NtGdiPolyPatBlt@20
+NtGdiPathToRegion@4
+NtGdiPlgBlt@44
+NtGdiPolyDraw@16
+NtGdiPolyPolyDraw@20
+NtGdiPolyTextOutW@16
+NtGdiPtInRegion@12
+NtGdiPtVisible@12
+NtGdiQueryFonts@12
+NtGdiQueryFontAssocInfo@4
+NtGdiRectangle@20
+NtGdiRectInRegion@8
+NtGdiRectVisible@8
+NtGdiRemoveFontResourceW@24
+NtGdiRemoveFontMemResourceEx@4
+NtGdiResetDC@20
+NtGdiResizePalette@8
+NtGdiRestoreDC@8
+NtGdiRoundRect@28
+NtGdiSaveDC@4
+NtGdiScaleViewportExtEx@24
+NtGdiScaleWindowExtEx@24
+NtGdiSelectBitmap@8
+NtGdiSelectBrush@8
+NtGdiSelectClipPath@8
+NtGdiSelectFont@8
+NtGdiSelectPen@8
+NtGdiSetBitmapAttributes@8
+NtGdiSetBitmapBits@12
+NtGdiSetBitmapDimension@16
+NtGdiSetBoundsRect@12
+NtGdiSetBrushAttributes@8
+NtGdiSetBrushOrg@16
+NtGdiSetColorAdjustment@8
+NtGdiSetColorSpace@8
+NtGdiSetDeviceGammaRamp@8
+NtGdiSetDIBitsToDeviceInternal@64
+NtGdiSetFontEnumeration@4
+NtGdiSetFontXform@12
+NtGdiSetIcmMode@12
+NtGdiSetLinkedUFIs@12
+NtGdiSetMagicColors@12
+NtGdiSetMetaRgn@4
+NtGdiSetMiterLimit@12
+NtGdiGetDeviceWidth@4
+NtGdiMirrorWindowOrg@4
+NtGdiSetLayout@12
+NtGdiSetOPMSigningKeyAndSequenceNumbers@8
+NtGdiSetPixel@16
+NtGdiSetPixelFormat@8
+NtGdiSetRectRgn@20
+NtGdiSetSystemPaletteUse@8
+NtGdiSetTextJustification@12
+NtGdiSetupPublicCFONT@12
+NtGdiSetVirtualResolution@20
+NtGdiSetSizeDevice@12
+NtGdiStartDoc@16
+NtGdiStartPage@4
+NtGdiStretchBlt@48
+NtGdiStretchDIBitsInternal@64
+NtGdiStrokeAndFillPath@4
+NtGdiStrokePath@4
+NtGdiSwapBuffers@4
+NtGdiTransformPoints@20
+NtGdiTransparentBlt@44
+NtGdiUnloadPrinterDriver@8
+NtGdiUnmapMemFont@4
+NtGdiUnrealizeObject@4
+NtGdiUpdateColors@4
+NtGdiWidenPath@4
+NtUserActivateKeyboardLayout@8
+NtUserAddClipboardFormatListener@4
+NtUserAlterWindowStyle@12
+NtUserAssociateInputContext@12
+NtUserAttachThreadInput@12
+NtUserBeginPaint@8
+NtUserBitBltSysBmp@32
+NtUserBlockInput@4
+NtUserBuildHimcList@16
+NtUserBuildHwndList@28
+NtUserBuildNameList@16
+NtUserBuildPropList@16
+NtUserCallHwnd@8
+NtUserCallHwndLock@8
+NtUserCallHwndOpt@8
+NtUserCallHwndParam@12
+NtUserCallHwndParamLock@12
+NtUserCallMsgFilter@8
+NtUserCallNextHookEx@16
+NtUserCallNoParam@4
+NtUserCallOneParam@8
+NtUserCallTwoParam@12
+NtUserChangeClipboardChain@8
+NtUserChangeDisplaySettings@16
+NtUserCheckAccessForIntegrityLevel@12
+NtUserCheckDesktopByThreadId@4
+NtUserCheckWindowThreadDesktop@12
+NtUserCheckImeHotKey@8
+NtUserCheckMenuItem@12
+NtUserChildWindowFromPointEx@16
+NtUserClipCursor@4
+NtUserCloseClipboard@0
+NtUserCloseDesktop@4
+NtUserCloseWindowStation@4
+NtUserConsoleControl@12
+NtUserConvertMemHandle@8
+NtUserCopyAcceleratorTable@12
+NtUserCountClipboardFormats@0
+NtUserCreateAcceleratorTable@8
+NtUserCreateCaret@16
+NtUserCreateDesktopEx@24
+NtUserCreateInputContext@4
+NtUserCreateLocalMemHandle@16
+NtUserCreateWindowEx@60
+NtUserCreateWindowStation@28
+NtUserDdeInitialize@20
+NtUserDeferWindowPos@32
+NtUserDefSetText@8
+NtUserDeleteMenu@12
+NtUserDestroyAcceleratorTable@4
+NtUserDestroyCursor@8
+NtUserDestroyInputContext@4
+NtUserDestroyMenu@4
+NtUserDestroyWindow@4
+NtUserDisableThreadIme@4
+NtUserDispatchMessage@4
+NtUserDoSoundConnect@0
+NtUserDoSoundDisconnect@0
+NtUserDragDetect@12
+NtUserDragObject@20
+NtUserDrawAnimatedRects@16
+NtUserDrawCaption@16
+NtUserDrawCaptionTemp@28
+NtUserDrawIconEx@44
+NtUserDrawMenuBarTemp@20
+NtUserEmptyClipboard@0
+NtUserEnableMenuItem@12
+NtUserEnableScrollBar@12
+NtUserEndDeferWindowPosEx@8
+NtUserEndMenu@0
+NtUserEndPaint@8
+NtUserEnumDisplayDevices@16
+NtUserEnumDisplayMonitors@16
+NtUserEnumDisplaySettings@16
+NtUserEvent@4
+NtUserExcludeUpdateRgn@8
+NtUserFillWindow@16
+NtUserFindExistingCursorIcon@12
+NtUserFindWindowEx@20
+NtUserFlashWindowEx@4
+NtUserFrostCrashedWindow@8
+NtUserGetAltTabInfo@24
+NtUserGetAncestor@8
+NtUserGetAppImeLevel@4
+NtUserGetAsyncKeyState@4
+NtUserGetAtomName@8
+NtUserGetCaretBlinkTime@0
+NtUserGetCaretPos@4
+NtUserGetClassInfoEx@20
+NtUserGetClassName@12
+NtUserGetClipboardData@8
+NtUserGetClipboardFormatName@12
+NtUserGetClipboardOwner@0
+NtUserGetClipboardSequenceNumber@0
+NtUserGetClipboardViewer@0
+NtUserGetClipCursor@4
+NtUserGetComboBoxInfo@8
+NtUserGetControlBrush@12
+NtUserGetControlColor@16
+NtUserGetCPD@12
+NtUserGetCursorFrameInfo@16
+NtUserGetCursorInfo@4
+NtUserGetDC@4
+NtUserGetDCEx@12
+NtUserGetDoubleClickTime@0
+NtUserGetForegroundWindow@0
+NtUserGetGuiResources@8
+NtUserGetGUIThreadInfo@8
+NtUserGetIconInfo@24
+NtUserGetIconSize@16
+NtUserGetImeHotKey@16
+NtUserGetImeInfoEx@8
+NtUserGetInternalWindowPos@12
+NtUserGetKeyboardLayoutList@8
+NtUserGetKeyboardLayoutName@4
+NtUserGetKeyboardState@4
+NtUserGetKeyNameText@12
+NtUserGetKeyState@4
+NtUserGetListBoxInfo@4
+NtUserGetMenuBarInfo@16
+NtUserGetMenuIndex@8
+NtUserGetMenuItemRect@16
+NtUserGetMessage@16
+NtUserGetMouseMovePointsEx@20
+NtUserGetObjectInformation@20
+NtUserGetOpenClipboardWindow@0
+NtUserGetPriorityClipboardFormat@8
+NtUserGetProcessWindowStation@0
+NtUserGetRawInputBuffer@12
+NtUserGetRawInputData@20
+NtUserGetRawInputDeviceInfo@16
+NtUserGetRawInputDeviceList@12
+NtUserGetRegisteredRawInputDevices@12
+NtUserGetScrollBarInfo@12
+NtUserGetSystemMenu@8
+NtUserGetThreadDesktop@8
+NtUserGetThreadState@4
+NtUserGetTitleBarInfo@8
+NtUserGetUpdatedClipboardFormats@12
+NtUserGetUpdateRect@12
+NtUserGetUpdateRgn@12
+NtUserGetWindowDC@4
+NtUserGetWindowPlacement@8
+NtUserGetWOWClass@8
+NtUserGhostWindowFromHungWindow@4
+NtUserHardErrorControl@12
+NtUserHideCaret@4
+NtUserHiliteMenuItem@16
+NtUserHungWindowFromGhostWindow@4
+NtUserImpersonateDdeClientWindow@8
+NtUserInitialize@8
+NtUserInitializeClientPfnArrays@16
+NtUserInitTask@48
+NtUserInternalGetWindowText@12
+NtUserInternalGetWindowIcon@8
+NtUserInvalidateRect@12
+NtUserInvalidateRgn@12
+NtUserIsClipboardFormatAvailable@4
+NtUserKillTimer@8
+NtUserLoadKeyboardLayoutEx@28
+NtUserLockWindowStation@4
+NtUserLockWindowUpdate@4
+NtUserLockWorkStation@0
+NtUserLogicalToPhysicalPoint@8
+NtUserMapVirtualKeyEx@16
+NtUserMenuItemFromPoint@16
+NtUserMessageCall@28
+NtUserMinMaximize@12
+NtUserMNDragLeave@0
+NtUserMNDragOver@8
+NtUserModifyUserStartupInfoFlags@8
+NtUserMoveWindow@24
+NtUserNotifyIMEStatus@12
+NtUserNotifyProcessCreate@16
+NtUserNotifyWinEvent@16
+NtUserOpenClipboard@8
+NtUserOpenDesktop@12
+NtUserOpenInputDesktop@12
+NtUserOpenThreadDesktop@20
+NtUserOpenWindowStation@8
+NtUserPaintDesktop@4
+NtUserPaintMonitor@12
+NtUserPeekMessage@20
+NtUserPhysicalToLogicalPoint@8
+NtUserPostMessage@16
+NtUserPostThreadMessage@16
+NtUserPrintWindow@12
+NtUserProcessConnect@8
+NtUserQueryInformationThread@16
+NtUserQueryInputContext@8
+NtUserQuerySendMessage@4
+NtUserQueryWindow@8
+NtUserRealChildWindowFromPoint@12
+NtUserRealInternalGetMessage@24
+NtUserRealWaitMessageEx@8
+NtUserRedrawWindow@16
+NtUserRegisterClassExWOW@28
+NtUserRegisterErrorReportingDialog@8
+NtUserRegisterUserApiHook@16
+NtUserRegisterHotKey@16
+NtUserRegisterRawInputDevices@12
+NtUserRegisterTasklist@4
+NtUserRegisterWindowMessage@4
+NtUserRemoveClipboardFormatListener@4
+NtUserRemoveMenu@12
+NtUserRemoveProp@8
+NtUserResolveDesktop@16
+NtUserResolveDesktopForWOW@4
+NtUserSBGetParms@16
+NtUserScrollDC@28
+NtUserScrollWindowEx@32
+NtUserSelectPalette@12
+NtUserSendInput@12
+NtUserSetActiveWindow@4
+NtUserSetAppImeLevel@8
+NtUserSetCapture@4
+NtUserSetClassLong@16
+NtUserSetClassWord@12
+NtUserSetClipboardData@12
+NtUserSetClipboardViewer@4
+NtUserSetConsoleReserveKeys@8
+NtUserSetCursor@4
+NtUserSetCursorContents@8
+NtUserSetCursorIconData@16
+NtUserSetFocus@4
+NtUserSetImeHotKey@20
+NtUserSetImeInfoEx@4
+NtUserSetImeOwnerWindow@8
+NtUserSetInformationProcess@16
+NtUserSetInformationThread@16
+NtUserSetInternalWindowPos@16
+NtUserSetKeyboardState@4
+NtUserSetMenu@12
+NtUserSetMenuContextHelpId@8
+NtUserSetMenuDefaultItem@12
+NtUserSetMenuFlagRtoL@4
+NtUserSetObjectInformation@16
+NtUserSetParent@8
+NtUserSetProcessWindowStation@4
+NtUserGetProp@8
+NtUserSetProp@12
+NtUserSetScrollInfo@16
+NtUserSetShellWindowEx@8
+NtUserSetSysColors@16
+NtUserSetSystemCursor@8
+NtUserSetSystemMenu@8
+NtUserSetSystemTimer@12
+NtUserSetThreadDesktop@4
+NtUserSetThreadLayoutHandles@8
+NtUserSetThreadState@8
+NtUserSetTimer@16
+NtUserSetProcessDPIAware@0
+NtUserSetWindowFNID@8
+NtUserSetWindowLong@16
+NtUserSetWindowPlacement@8
+NtUserSetWindowPos@28
+NtUserSetWindowRgn@12
+NtUserGetWindowRgnEx@12
+NtUserSetWindowRgnEx@12
+NtUserSetWindowsHookAW@12
+NtUserSetWindowsHookEx@24
+NtUserSetWindowStationUser@16
+NtUserSetWindowWord@12
+NtUserSetWinEventHook@32
+NtUserShowCaret@4
+NtUserShowScrollBar@12
+NtUserShowWindow@8
+NtUserShowWindowAsync@8
+NtUserSoundSentry@0
+NtUserSwitchDesktop@8
+NtUserSystemParametersInfo@16
+NtUserTestForInteractiveUser@4
+NtUserThunkedMenuInfo@8
+NtUserThunkedMenuItemInfo@24
+NtUserToUnicodeEx@28
+NtUserTrackMouseEvent@4
+NtUserTrackPopupMenuEx@24
+NtUserCalcMenuBar@20
+NtUserPaintMenuBar@24
+NtUserTranslateAccelerator@12
+NtUserTranslateMessage@8
+NtUserUnhookWindowsHookEx@4
+NtUserUnhookWinEvent@4
+NtUserUnloadKeyboardLayout@4
+NtUserUnlockWindowStation@4
+NtUserUnregisterClass@12
+NtUserUnregisterUserApiHook@0
+NtUserUnregisterHotKey@8
+NtUserUpdateInputContext@12
+NtUserUpdateInstance@12
+NtUserUpdateLayeredWindow@40
+NtUserGetLayeredWindowAttributes@16
+NtUserSetLayeredWindowAttributes@16
+NtUserUpdatePerUserSystemParameters@4
+NtUserUserHandleGrantAccess@12
+NtUserValidateHandleSecure@4
+NtUserValidateRect@8
+NtUserValidateTimerCallback@4
+NtUserVkKeyScanEx@12
+NtUserWaitForInputIdle@12
+NtUserWaitForMsgAndEvent@4
+NtUserWaitMessage@0
+NtUserWin32PoolAllocationStats@24
+NtUserWindowFromPhysicalPoint@8
+NtUserWindowFromPoint@8
+NtUserYieldTask@0
+NtUserRemoteConnect@12
+NtUserRemoteRedrawRectangle@16
+NtUserRemoteRedrawScreen@0
+NtUserRemoteStopScreenUpdates@0
+NtUserCtxDisplayIOCtl@12
+NtUserRegisterSessionPort@4
+NtUserUnregisterSessionPort@0
+NtUserUpdateWindowTransform@12
+NtUserDwmStartRedirection@4
+NtUserDwmStopRedirection@0
+NtUserDwmHintDxUpdate@8
+NtUserDwmGetDxRgn@12
+NtUserGetWindowMinimizeRect@8
+NtGdiEngAssociateSurface@12
+NtGdiEngCreateBitmap@24
+NtGdiEngCreateDeviceSurface@16
+NtGdiEngCreateDeviceBitmap@16
+NtGdiEngCreatePalette@24
+NtGdiEngComputeGlyphSet@12
+NtGdiEngCopyBits@24
+NtGdiEngDeletePalette@4
+NtGdiEngDeleteSurface@4
+NtGdiEngEraseSurface@12
+NtGdiEngUnlockSurface@4
+NtGdiEngLockSurface@4
+NtGdiEngBitBlt@44
+NtGdiEngStretchBlt@44
+NtGdiEngPlgBlt@44
+NtGdiEngMarkBandingSurface@4
+NtGdiEngStrokePath@32
+NtGdiEngFillPath@28
+NtGdiEngStrokeAndFillPath@40
+NtGdiEngPaint@20
+NtGdiEngLineTo@36
+NtGdiEngAlphaBlend@28
+NtGdiEngGradientFill@40
+NtGdiEngTransparentBlt@32
+NtGdiEngTextOut@40
+NtGdiEngStretchBltROP@52
+NtGdiXLATEOBJ_cGetPalette@16
+NtGdiXLATEOBJ_iXlate@8
+NtGdiXLATEOBJ_hGetColorTransform@4
+NtGdiCLIPOBJ_bEnum@12
+NtGdiCLIPOBJ_cEnumStart@20
+NtGdiCLIPOBJ_ppoGetPath@4
+NtGdiEngDeletePath@4
+NtGdiEngCreateClip@0
+NtGdiEngDeleteClip@4
+NtGdiBRUSHOBJ_ulGetBrushColor@4
+NtGdiBRUSHOBJ_pvAllocRbrush@8
+NtGdiBRUSHOBJ_pvGetRbrush@4
+NtGdiBRUSHOBJ_hGetColorTransform@4
+NtGdiXFORMOBJ_bApplyXform@20
+NtGdiXFORMOBJ_iGetXform@8
+NtGdiFONTOBJ_vGetInfo@12
+NtGdiFONTOBJ_pxoGetXform@4
+NtGdiFONTOBJ_cGetGlyphs@20
+NtGdiFONTOBJ_pifi@4
+NtGdiFONTOBJ_pfdg@4
+NtGdiFONTOBJ_pQueryGlyphAttrs@8
+NtGdiFONTOBJ_pvTrueTypeFontFile@8
+NtGdiFONTOBJ_cGetAllGlyphHandles@8
+NtGdiSTROBJ_bEnum@12
+NtGdiSTROBJ_bEnumPositionsOnly@12
+NtGdiSTROBJ_bGetAdvanceWidths@16
+NtGdiSTROBJ_vEnumStart@4
+NtGdiSTROBJ_dwGetCodePage@4
+NtGdiPATHOBJ_vGetBounds@8
+NtGdiPATHOBJ_bEnum@8
+NtGdiPATHOBJ_vEnumStart@4
+NtGdiPATHOBJ_vEnumStartClipLines@16
+NtGdiPATHOBJ_bEnumClipLines@12
+NtGdiGetDhpdev@4
+NtGdiEngCheckAbort@4
+NtGdiHT_Get8BPPFormatPalette@16
+NtGdiHT_Get8BPPMaskPalette@24
+NtGdiUpdateTransform@4
+NtGdiSetPUMPDOBJ@16
+NtGdiBRUSHOBJ_DeleteRbrush@8
+NtGdiUMPDEngFreeUserMem@4
+NtGdiDrawStream@12
+NtGdiDwmGetDirtyRgn@20
+NtGdiDwmGetSurfaceData@8
+NtGdiDdDDICreateAllocation@4
+NtGdiDdDDIQueryResourceInfo@4
+NtGdiDdDDIOpenResource@4
+NtGdiDdDDIDestroyAllocation@4
+NtGdiDdDDISetAllocationPriority@4
+NtGdiDdDDIQueryAllocationResidency@4
+NtGdiDdDDICreateDevice@4
+NtGdiDdDDIDestroyDevice@4
+NtGdiDdDDICreateContext@4
+NtGdiDdDDIDestroyContext@4
+NtGdiDdDDICreateSynchronizationObject@4
+NtGdiDdDDIDestroySynchronizationObject@4
+NtGdiDdDDIWaitForSynchronizationObject@4
+NtGdiDdDDISignalSynchronizationObject@4
+NtGdiDdDDIGetRuntimeData@4
+NtGdiDdDDIQueryAdapterInfo@4
+NtGdiDdDDILock@4
+NtGdiDdDDIUnlock@4
+NtGdiDdDDIGetDisplayModeList@4
+NtGdiDdDDISetDisplayMode@4
+NtGdiDdDDIGetMultisampleMethodList@4
+NtGdiDdDDIPresent@4
+NtGdiDdDDIRender@4
+NtGdiDdDDIOpenAdapterFromDeviceName@4
+NtGdiDdDDIOpenAdapterFromHdc@4
+NtGdiDdDDICloseAdapter@4
+NtGdiDdDDIGetSharedPrimaryHandle@4
+NtGdiDdDDIEscape@4
+NtGdiDdDDIQueryStatistics@4
+NtGdiDdDDISetVidPnSourceOwner@4
+NtGdiDdDDIGetPresentHistory@4
+NtGdiDdDDICreateOverlay@4
+NtGdiDdDDIUpdateOverlay@4
+NtGdiDdDDIFlipOverlay@4
+NtGdiDdDDIDestroyOverlay@4
+NtGdiDdDDIWaitForVerticalBlankEvent@4
+NtGdiDdDDISetGammaRamp@4
+NtGdiDdDDIGetDeviceState@4
+NtGdiDdDDICreateDCFromMemory@4
+NtGdiDdDDIDestroyDCFromMemory@4
+NtGdiDdDDISetContextSchedulingPriority@4
+NtGdiDdDDIGetContextSchedulingPriority@4
+NtGdiDdDDISetProcessSchedulingPriorityClass@8
+NtGdiDdDDIGetProcessSchedulingPriorityClass@8
+NtGdiDdDDIReleaseProcessVidPnSourceOwners@4
+NtGdiDdDDIGetScanLine@4
+NtGdiDdDDISetQueuedLimit@4
+NtGdiDdDDIPollDisplayChildren@4
+NtGdiDdDDIInvalidateActiveVidPn@4
+NtGdiDdDDICheckOcclusion@4
+NtGdiDdDDIWaitForIdle@4
+NtGdiDdDDICheckMonitorPowerState@4
+NtGdiDdDDICheckExclusiveOwnership@0
+NtGdiDdDDISetDisplayPrivateDriverFormat@4
+NtGdiDdDDISharedPrimaryLockNotification@4
+NtGdiDdDDISharedPrimaryUnLockNotification@4
+NtGdiMakeObjectXferable@8
+NtGdiMakeObjectUnXferable@4
+NtGdiGetNumberOfPhysicalMonitors@8
+NtGdiGetPhysicalMonitors@16
+NtGdiGetPhysicalMonitorDescription@12
+NtGdiDestroyPhysicalMonitor@4
+NtGdiDDCCIGetVCPFeature@20
+NtGdiDDCCISetVCPFeature@12
+NtGdiDDCCISaveCurrentSettings@4
+NtGdiDDCCIGetCapabilitiesStringLength@8
+NtGdiDDCCIGetCapabilitiesString@12
+NtGdiDDCCIGetTimingReport@8
+NtUserSetMirrorRendering@8
+NtUserShowSystemCursor@4
+++ /dev/null
-#
-# win32k systemcalls taken from Windows Vista SP0 x86
-#
-NtGdiAbortDoc 1
-NtGdiAbortPath 1
-NtGdiAddFontResourceW 6
-NtGdiAddRemoteFontToDC 4
-NtGdiAddFontMemResourceEx 5
-NtGdiRemoveMergeFont 2
-NtGdiAddRemoteMMInstanceToDC 3
-NtGdiAlphaBlend 12
-NtGdiAngleArc 6
-NtGdiAnyLinkedFonts 0
-NtGdiFontIsLinked 1
-NtGdiArcInternal 10
-NtGdiBeginPath 1
-NtGdiBitBlt 11
-NtGdiCancelDC 1
-NtGdiCheckBitmapBits 8
-NtGdiCloseFigure 1
-NtGdiClearBitmapAttributes 2
-NtGdiClearBrushAttributes 2
-NtGdiColorCorrectPalette 6
-NtGdiCombineRgn 4
-NtGdiCombineTransform 3
-NtGdiComputeXformCoefficients 1
-NtGdiConfigureOPMProtectedOutput 4
-NtGdiConsoleTextOut 4
-NtGdiConvertMetafileRect 2
-NtGdiCreateBitmap 5
-NtGdiCreateClientObj 1
-NtGdiCreateColorSpace 1
-NtGdiCreateColorTransform 8
-NtGdiCreateCompatibleBitmap 3
-NtGdiCreateCompatibleDC 1
-NtGdiCreateDIBBrush 6
-NtGdiCreateDIBitmapInternal 11
-NtGdiCreateDIBSection 9
-NtGdiCreateEllipticRgn 4
-NtGdiCreateHalftonePalette 1
-NtGdiCreateHatchBrushInternal 3
-NtGdiCreateMetafileDC 1
-NtGdiCreateOPMProtectedOutputs 5
-NtGdiCreatePaletteInternal 2
-NtGdiCreatePatternBrushInternal 3
-NtGdiCreatePen 4
-NtGdiCreateRectRgn 4
-NtGdiCreateRoundRectRgn 6
-NtGdiCreateServerMetaFile 6
-NtGdiCreateSolidBrush 2
-NtGdiD3dContextCreate 4
-NtGdiD3dContextDestroy 1
-NtGdiD3dContextDestroyAll 1
-NtGdiD3dValidateTextureStageState 1
-NtGdiD3dDrawPrimitives2 7
-NtGdiDdGetDriverState 1
-NtGdiDdAddAttachedSurface 3
-NtGdiDdAlphaBlt 3
-NtGdiDdAttachSurface 2
-NtGdiDdBeginMoCompFrame 2
-NtGdiDdBlt 3
-NtGdiDdCanCreateSurface 2
-NtGdiDdCanCreateD3DBuffer 2
-NtGdiDdColorControl 2
-NtGdiDdCreateDirectDrawObject 1
-NtGdiDdCreateSurface 8
-NtGdiDdCreateD3DBuffer 8
-NtGdiDdCreateMoComp 2
-NtGdiDdCreateSurfaceObject 6
-NtGdiDdDeleteDirectDrawObject 1
-NtGdiDdDeleteSurfaceObject 1
-NtGdiDdDestroyMoComp 2
-NtGdiDdDestroySurface 2
-NtGdiDdDestroyD3DBuffer 1
-NtGdiDdEndMoCompFrame 2
-NtGdiDdFlip 5
-NtGdiDdFlipToGDISurface 2
-NtGdiDdGetAvailDriverMemory 2
-NtGdiDdGetBltStatus 2
-NtGdiDdGetDC 2
-NtGdiDdGetDriverInfo 2
-NtGdiDdGetDxHandle 3
-NtGdiDdGetFlipStatus 2
-NtGdiDdGetInternalMoCompInfo 2
-NtGdiDdGetMoCompBuffInfo 2
-NtGdiDdGetMoCompGuids 2
-NtGdiDdGetMoCompFormats 2
-NtGdiDdGetScanLine 2
-NtGdiDdLock 3
-NtGdiDdLockD3D 2
-NtGdiDdQueryDirectDrawObject 11
-NtGdiDdQueryMoCompStatus 2
-NtGdiDdReenableDirectDrawObject 2
-NtGdiDdReleaseDC 1
-NtGdiDdRenderMoComp 2
-NtGdiDdResetVisrgn 2
-NtGdiDdSetColorKey 2
-NtGdiDdSetExclusiveMode 2
-NtGdiDdSetGammaRamp 3
-NtGdiDdCreateSurfaceEx 3
-NtGdiDdSetOverlayPosition 3
-NtGdiDdUnattachSurface 2
-NtGdiDdUnlock 2
-NtGdiDdUnlockD3D 2
-NtGdiDdUpdateOverlay 3
-NtGdiDdWaitForVerticalBlank 2
-NtGdiDvpCanCreateVideoPort 2
-NtGdiDvpColorControl 2
-NtGdiDvpCreateVideoPort 2
-NtGdiDvpDestroyVideoPort 2
-NtGdiDvpFlipVideoPort 4
-NtGdiDvpGetVideoPortBandwidth 2
-NtGdiDvpGetVideoPortField 2
-NtGdiDvpGetVideoPortFlipStatus 2
-NtGdiDvpGetVideoPortInputFormats 2
-NtGdiDvpGetVideoPortLine 2
-NtGdiDvpGetVideoPortOutputFormats 2
-NtGdiDvpGetVideoPortConnectInfo 2
-NtGdiDvpGetVideoSignalStatus 2
-NtGdiDvpUpdateVideoPort 4
-NtGdiDvpWaitForVideoPortSync 2
-NtGdiDvpAcquireNotification 3
-NtGdiDvpReleaseNotification 2
-NtGdiDxgGenericThunk 6
-NtGdiDeleteClientObj 1
-NtGdiDeleteColorSpace 1
-NtGdiDeleteColorTransform 2
-NtGdiDeleteObjectApp 1
-NtGdiDescribePixelFormat 4
-NtGdiDestroyOPMProtectedOutput 1
-NtGdiGetPerBandInfo 2
-NtGdiDoBanding 4
-NtGdiDoPalette 6
-NtGdiDrawEscape 4
-NtGdiEllipse 5
-NtGdiEnableEudc 1
-NtGdiEndDoc 1
-NtGdiEndPage 1
-NtGdiEndPath 1
-NtGdiEnumFontChunk 5
-NtGdiEnumFontClose 1
-NtGdiEnumFontOpen 7
-NtGdiEnumObjects 4
-NtGdiEqualRgn 2
-NtGdiEudcLoadUnloadLink 7
-NtGdiExcludeClipRect 5
-NtGdiExtCreatePen 11
-NtGdiExtCreateRegion 3
-NtGdiExtEscape 8
-NtGdiExtFloodFill 5
-NtGdiExtGetObjectW 3
-NtGdiExtSelectClipRgn 3
-NtGdiExtTextOutW 9
-NtGdiFillPath 1
-NtGdiFillRgn 3
-NtGdiFlattenPath 1
-NtGdiFlush 0
-NtGdiForceUFIMapping 2
-NtGdiFrameRgn 5
-NtGdiFullscreenControl 5
-NtGdiGetAndSetDCDword 4
-NtGdiGetAppClipBox 2
-NtGdiGetBitmapBits 3
-NtGdiGetBitmapDimension 2
-NtGdiGetBoundsRect 3
-NtGdiGetCertificate 4
-NtGdiGetCertificateSize 3
-NtGdiGetCharABCWidthsW 6
-NtGdiGetCharacterPlacementW 6
-NtGdiGetCharSet 1
-NtGdiGetCharWidthW 6
-NtGdiGetCharWidthInfo 2
-NtGdiGetColorAdjustment 2
-NtGdiGetColorSpaceforBitmap 1
-NtGdiGetCOPPCompatibleOPMInformation 3
-NtGdiGetDCDword 3
-NtGdiGetDCforBitmap 1
-NtGdiGetDCObject 2
-NtGdiGetDCPoint 3
-NtGdiGetDeviceCaps 2
-NtGdiGetDeviceGammaRamp 2
-NtGdiGetDeviceCapsAll 2
-NtGdiGetDIBitsInternal 9
-NtGdiGetETM 2
-NtGdiGetEudcTimeStampEx 3
-NtGdiGetFontData 5
-NtGdiGetFontResourceInfoInternalW 7
-NtGdiGetGlyphIndicesW 5
-NtGdiGetGlyphIndicesWInternal 6
-NtGdiGetGlyphOutline 8
-NtGdiGetOPMInformation 3
-NtGdiGetKerningPairs 3
-NtGdiGetLinkedUFIs 3
-NtGdiGetMiterLimit 2
-NtGdiGetMonitorID 3
-NtGdiGetNearestColor 2
-NtGdiGetNearestPaletteIndex 2
-NtGdiGetObjectBitmapHandle 2
-NtGdiGetOPMRandomNumber 2
-NtGdiGetOutlineTextMetricsInternalW 4
-NtGdiGetPath 4
-NtGdiGetPixel 3
-NtGdiGetRandomRgn 3
-NtGdiGetRasterizerCaps 2
-NtGdiGetRealizationInfo 3
-NtGdiGetRegionData 3
-NtGdiGetRgnBox 2
-NtGdiGetServerMetaFileBits 7
-NtGdiGetSpoolMessage 4
-NtGdiGetStats 5
-NtGdiGetStockObject 1
-NtGdiGetStringBitmapW 5
-NtGdiGetSuggestedOPMProtectedOutputArraySize 2
-NtGdiGetSystemPaletteUse 1
-NtGdiGetTextCharsetInfo 3
-NtGdiGetTextExtent 5
-NtGdiGetTextExtentExW 8
-NtGdiGetTextFaceW 4
-NtGdiGetTextMetricsW 3
-NtGdiGetTransform 3
-NtGdiGetUFI 6
-NtGdiGetEmbUFI 7
-NtGdiGetUFIPathname 10
-NtGdiGetEmbedFonts 0
-NtGdiChangeGhostFont 2
-NtGdiAddEmbFontToDC 2
-NtGdiGetFontUnicodeRanges 2
-NtGdiGetWidthTable 7
-NtGdiGradientFill 6
-NtGdiHfontCreate 5
-NtGdiIcmBrushInfo 8
-NtGdiInit 0
-NtGdiInitSpool 0
-NtGdiIntersectClipRect 5
-NtGdiInvertRgn 2
-NtGdiLineTo 3
-NtGdiMakeFontDir 5
-NtGdiMakeInfoDC 2
-NtGdiMaskBlt 13
-NtGdiModifyWorldTransform 3
-NtGdiMonoBitmap 1
-NtGdiMoveTo 4
-NtGdiOffsetClipRgn 3
-NtGdiOffsetRgn 3
-NtGdiOpenDCW 8
-NtGdiPatBlt 6
-NtGdiPolyPatBlt 5
-NtGdiPathToRegion 1
-NtGdiPlgBlt 11
-NtGdiPolyDraw 4
-NtGdiPolyPolyDraw 5
-NtGdiPolyTextOutW 4
-NtGdiPtInRegion 3
-NtGdiPtVisible 3
-NtGdiQueryFonts 3
-NtGdiQueryFontAssocInfo 1
-NtGdiRectangle 5
-NtGdiRectInRegion 2
-NtGdiRectVisible 2
-NtGdiRemoveFontResourceW 6
-NtGdiRemoveFontMemResourceEx 1
-NtGdiResetDC 5
-NtGdiResizePalette 2
-NtGdiRestoreDC 2
-NtGdiRoundRect 7
-NtGdiSaveDC 1
-NtGdiScaleViewportExtEx 6
-NtGdiScaleWindowExtEx 6
-NtGdiSelectBitmap 2
-NtGdiSelectBrush 2
-NtGdiSelectClipPath 2
-NtGdiSelectFont 2
-NtGdiSelectPen 2
-NtGdiSetBitmapAttributes 2
-NtGdiSetBitmapBits 3
-NtGdiSetBitmapDimension 4
-NtGdiSetBoundsRect 3
-NtGdiSetBrushAttributes 2
-NtGdiSetBrushOrg 4
-NtGdiSetColorAdjustment 2
-NtGdiSetColorSpace 2
-NtGdiSetDeviceGammaRamp 2
-NtGdiSetDIBitsToDeviceInternal 16
-NtGdiSetFontEnumeration 1
-NtGdiSetFontXform 3
-NtGdiSetIcmMode 3
-NtGdiSetLinkedUFIs 3
-NtGdiSetMagicColors 3
-NtGdiSetMetaRgn 1
-NtGdiSetMiterLimit 3
-NtGdiGetDeviceWidth 1
-NtGdiMirrorWindowOrg 1
-NtGdiSetLayout 3
-NtGdiSetOPMSigningKeyAndSequenceNumbers 2
-NtGdiSetPixel 4
-NtGdiSetPixelFormat 2
-NtGdiSetRectRgn 5
-NtGdiSetSystemPaletteUse 2
-NtGdiSetTextJustification 3
-NtGdiSetupPublicCFONT 3
-NtGdiSetVirtualResolution 5
-NtGdiSetSizeDevice 3
-NtGdiStartDoc 4
-NtGdiStartPage 1
-NtGdiStretchBlt 12
-NtGdiStretchDIBitsInternal 16
-NtGdiStrokeAndFillPath 1
-NtGdiStrokePath 1
-NtGdiSwapBuffers 1
-NtGdiTransformPoints 5
-NtGdiTransparentBlt 11
-NtGdiUnloadPrinterDriver 2
-NtGdiUnmapMemFont 1
-NtGdiUnrealizeObject 1
-NtGdiUpdateColors 1
-NtGdiWidenPath 1
-NtUserActivateKeyboardLayout 2
-NtUserAddClipboardFormatListener 1
-NtUserAlterWindowStyle 3
-NtUserAssociateInputContext 3
-NtUserAttachThreadInput 3
-NtUserBeginPaint 2
-NtUserBitBltSysBmp 8
-NtUserBlockInput 1
-NtUserBuildHimcList 4
-NtUserBuildHwndList 7
-NtUserBuildNameList 4
-NtUserBuildPropList 4
-NtUserCallHwnd 2
-NtUserCallHwndLock 2
-NtUserCallHwndOpt 2
-NtUserCallHwndParam 3
-NtUserCallHwndParamLock 3
-NtUserCallMsgFilter 2
-NtUserCallNextHookEx 4
-NtUserCallNoParam 1
-NtUserCallOneParam 2
-NtUserCallTwoParam 3
-NtUserChangeClipboardChain 2
-NtUserChangeDisplaySettings 4
-NtUserCheckAccessForIntegrityLevel 3
-NtUserCheckDesktopByThreadId 1
-NtUserCheckWindowThreadDesktop 3
-NtUserCheckImeHotKey 2
-NtUserCheckMenuItem 3
-NtUserChildWindowFromPointEx 4
-NtUserClipCursor 1
-NtUserCloseClipboard 0
-NtUserCloseDesktop 1
-NtUserCloseWindowStation 1
-NtUserConsoleControl 3
-NtUserConvertMemHandle 2
-NtUserCopyAcceleratorTable 3
-NtUserCountClipboardFormats 0
-NtUserCreateAcceleratorTable 2
-NtUserCreateCaret 4
-NtUserCreateDesktopEx 6
-NtUserCreateInputContext 1
-NtUserCreateLocalMemHandle 4
-NtUserCreateWindowEx 15
-NtUserCreateWindowStation 7
-NtUserDdeInitialize 5
-NtUserDeferWindowPos 8
-NtUserDefSetText 2
-NtUserDeleteMenu 3
-NtUserDestroyAcceleratorTable 1
-NtUserDestroyCursor 2
-NtUserDestroyInputContext 1
-NtUserDestroyMenu 1
-NtUserDestroyWindow 1
-NtUserDisableThreadIme 1
-NtUserDispatchMessage 1
-NtUserDoSoundConnect 0
-NtUserDoSoundDisconnect 0
-NtUserDragDetect 3
-NtUserDragObject 5
-NtUserDrawAnimatedRects 4
-NtUserDrawCaption 4
-NtUserDrawCaptionTemp 7
-NtUserDrawIconEx 11
-NtUserDrawMenuBarTemp 5
-NtUserEmptyClipboard 0
-NtUserEnableMenuItem 3
-NtUserEnableScrollBar 3
-NtUserEndDeferWindowPosEx 2
-NtUserEndMenu 0
-NtUserEndPaint 2
-NtUserEnumDisplayDevices 4
-NtUserEnumDisplayMonitors 4
-NtUserEnumDisplaySettings 4
-NtUserEvent 1
-NtUserExcludeUpdateRgn 2
-NtUserFillWindow 4
-NtUserFindExistingCursorIcon 3
-NtUserFindWindowEx 5
-NtUserFlashWindowEx 1
-NtUserFrostCrashedWindow 2
-NtUserGetAltTabInfo 6
-NtUserGetAncestor 2
-NtUserGetAppImeLevel 1
-NtUserGetAsyncKeyState 1
-NtUserGetAtomName 2
-NtUserGetCaretBlinkTime 0
-NtUserGetCaretPos 1
-NtUserGetClassInfoEx 5
-NtUserGetClassName 3
-NtUserGetClipboardData 2
-NtUserGetClipboardFormatName 3
-NtUserGetClipboardOwner 0
-NtUserGetClipboardSequenceNumber 0
-NtUserGetClipboardViewer 0
-NtUserGetClipCursor 1
-NtUserGetComboBoxInfo 2
-NtUserGetControlBrush 3
-NtUserGetControlColor 4
-NtUserGetCPD 3
-NtUserGetCursorFrameInfo 4
-NtUserGetCursorInfo 1
-NtUserGetDC 1
-NtUserGetDCEx 3
-NtUserGetDoubleClickTime 0
-NtUserGetForegroundWindow 0
-NtUserGetGuiResources 2
-NtUserGetGUIThreadInfo 2
-NtUserGetIconInfo 6
-NtUserGetIconSize 4
-NtUserGetImeHotKey 4
-NtUserGetImeInfoEx 2
-NtUserGetInternalWindowPos 3
-NtUserGetKeyboardLayoutList 2
-NtUserGetKeyboardLayoutName 1
-NtUserGetKeyboardState 1
-NtUserGetKeyNameText 3
-NtUserGetKeyState 1
-NtUserGetListBoxInfo 1
-NtUserGetMenuBarInfo 4
-NtUserGetMenuIndex 2
-NtUserGetMenuItemRect 4
-NtUserGetMessage 4
-NtUserGetMouseMovePointsEx 5
-NtUserGetObjectInformation 5
-NtUserGetOpenClipboardWindow 0
-NtUserGetPriorityClipboardFormat 2
-NtUserGetProcessWindowStation 0
-NtUserGetRawInputBuffer 3
-NtUserGetRawInputData 5
-NtUserGetRawInputDeviceInfo 4
-NtUserGetRawInputDeviceList 3
-NtUserGetRegisteredRawInputDevices 3
-NtUserGetScrollBarInfo 3
-NtUserGetSystemMenu 2
-NtUserGetThreadDesktop 2
-NtUserGetThreadState 1
-NtUserGetTitleBarInfo 2
-NtUserGetUpdatedClipboardFormats 3
-NtUserGetUpdateRect 3
-NtUserGetUpdateRgn 3
-NtUserGetWindowDC 1
-NtUserGetWindowPlacement 2
-NtUserGetWOWClass 2
-NtUserGhostWindowFromHungWindow 1
-NtUserHardErrorControl 3
-NtUserHideCaret 1
-NtUserHiliteMenuItem 4
-NtUserHungWindowFromGhostWindow 1
-NtUserImpersonateDdeClientWindow 2
-NtUserInitialize 2
-NtUserInitializeClientPfnArrays 4
-NtUserInitTask 12
-NtUserInternalGetWindowText 3
-NtUserInternalGetWindowIcon 2
-NtUserInvalidateRect 3
-NtUserInvalidateRgn 3
-NtUserIsClipboardFormatAvailable 1
-NtUserKillTimer 2
-NtUserLoadKeyboardLayoutEx 7
-NtUserLockWindowStation 1
-NtUserLockWindowUpdate 1
-NtUserLockWorkStation 0
-NtUserLogicalToPhysicalPoint 2
-NtUserMapVirtualKeyEx 4
-NtUserMenuItemFromPoint 4
-NtUserMessageCall 7
-NtUserMinMaximize 3
-NtUserMNDragLeave 0
-NtUserMNDragOver 2
-NtUserModifyUserStartupInfoFlags 2
-NtUserMoveWindow 6
-NtUserNotifyIMEStatus 3
-NtUserNotifyProcessCreate 4
-NtUserNotifyWinEvent 4
-NtUserOpenClipboard 2
-NtUserOpenDesktop 3
-NtUserOpenInputDesktop 3
-NtUserOpenThreadDesktop 5
-NtUserOpenWindowStation 2
-NtUserPaintDesktop 1
-NtUserPaintMonitor 3
-NtUserPeekMessage 5
-NtUserPhysicalToLogicalPoint 2
-NtUserPostMessage 4
-NtUserPostThreadMessage 4
-NtUserPrintWindow 3
-NtUserProcessConnect 2
-NtUserQueryInformationThread 4
-NtUserQueryInputContext 2
-NtUserQuerySendMessage 1
-NtUserQueryWindow 2
-NtUserRealChildWindowFromPoint 3
-NtUserRealInternalGetMessage 6
-NtUserRealWaitMessageEx 2
-NtUserRedrawWindow 4
-NtUserRegisterClassExWOW 7
-NtUserRegisterErrorReportingDialog 2
-NtUserRegisterUserApiHook 4
-NtUserRegisterHotKey 4
-NtUserRegisterRawInputDevices 3
-NtUserRegisterTasklist 1
-NtUserRegisterWindowMessage 1
-NtUserRemoveClipboardFormatListener 1
-NtUserRemoveMenu 3
-NtUserRemoveProp 2
-NtUserResolveDesktop 4
-NtUserResolveDesktopForWOW 1
-NtUserSBGetParms 4
-NtUserScrollDC 7
-NtUserScrollWindowEx 8
-NtUserSelectPalette 3
-NtUserSendInput 3
-NtUserSetActiveWindow 1
-NtUserSetAppImeLevel 2
-NtUserSetCapture 1
-NtUserSetClassLong 4
-NtUserSetClassWord 3
-NtUserSetClipboardData 3
-NtUserSetClipboardViewer 1
-NtUserSetConsoleReserveKeys 2
-NtUserSetCursor 1
-NtUserSetCursorContents 2
-NtUserSetCursorIconData 4
-NtUserSetFocus 1
-NtUserSetImeHotKey 5
-NtUserSetImeInfoEx 1
-NtUserSetImeOwnerWindow 2
-NtUserSetInformationProcess 4
-NtUserSetInformationThread 4
-NtUserSetInternalWindowPos 4
-NtUserSetKeyboardState 1
-NtUserSetMenu 3
-NtUserSetMenuContextHelpId 2
-NtUserSetMenuDefaultItem 3
-NtUserSetMenuFlagRtoL 1
-NtUserSetObjectInformation 4
-NtUserSetParent 2
-NtUserSetProcessWindowStation 1
-NtUserGetProp 2
-NtUserSetProp 3
-NtUserSetScrollInfo 4
-NtUserSetShellWindowEx 2
-NtUserSetSysColors 4
-NtUserSetSystemCursor 2
-NtUserSetSystemMenu 2
-NtUserSetSystemTimer 3
-NtUserSetThreadDesktop 1
-NtUserSetThreadLayoutHandles 2
-NtUserSetThreadState 2
-NtUserSetTimer 4
-NtUserSetProcessDPIAware 0
-NtUserSetWindowFNID 2
-NtUserSetWindowLong 4
-NtUserSetWindowPlacement 2
-NtUserSetWindowPos 7
-NtUserSetWindowRgn 3
-NtUserGetWindowRgnEx 3
-NtUserSetWindowRgnEx 3
-NtUserSetWindowsHookAW 3
-NtUserSetWindowsHookEx 6
-NtUserSetWindowStationUser 4
-NtUserSetWindowWord 3
-NtUserSetWinEventHook 8
-NtUserShowCaret 1
-NtUserShowScrollBar 3
-NtUserShowWindow 2
-NtUserShowWindowAsync 2
-NtUserSoundSentry 0
-NtUserSwitchDesktop 2
-NtUserSystemParametersInfo 4
-NtUserTestForInteractiveUser 1
-NtUserThunkedMenuInfo 2
-NtUserThunkedMenuItemInfo 6
-NtUserToUnicodeEx 7
-NtUserTrackMouseEvent 1
-NtUserTrackPopupMenuEx 6
-NtUserCalcMenuBar 5
-NtUserPaintMenuBar 6
-NtUserTranslateAccelerator 3
-NtUserTranslateMessage 2
-NtUserUnhookWindowsHookEx 1
-NtUserUnhookWinEvent 1
-NtUserUnloadKeyboardLayout 1
-NtUserUnlockWindowStation 1
-NtUserUnregisterClass 3
-NtUserUnregisterUserApiHook 0
-NtUserUnregisterHotKey 2
-NtUserUpdateInputContext 3
-NtUserUpdateInstance 3
-NtUserUpdateLayeredWindow 10
-NtUserGetLayeredWindowAttributes 4
-NtUserSetLayeredWindowAttributes 4
-NtUserUpdatePerUserSystemParameters 1
-NtUserUserHandleGrantAccess 3
-NtUserValidateHandleSecure 1
-NtUserValidateRect 2
-NtUserValidateTimerCallback 1
-NtUserVkKeyScanEx 3
-NtUserWaitForInputIdle 3
-NtUserWaitForMsgAndEvent 1
-NtUserWaitMessage 0
-NtUserWin32PoolAllocationStats 6
-NtUserWindowFromPhysicalPoint 2
-NtUserWindowFromPoint 2
-NtUserYieldTask 0
-NtUserRemoteConnect 3
-NtUserRemoteRedrawRectangle 4
-NtUserRemoteRedrawScreen 0
-NtUserRemoteStopScreenUpdates 0
-NtUserCtxDisplayIOCtl 3
-NtUserRegisterSessionPort 1
-NtUserUnregisterSessionPort 0
-NtUserUpdateWindowTransform 3
-NtUserDwmStartRedirection 1
-NtUserDwmStopRedirection 0
-NtUserDwmHintDxUpdate 2
-NtUserDwmGetDxRgn 3
-NtUserGetWindowMinimizeRect 2
-NtGdiEngAssociateSurface 3
-NtGdiEngCreateBitmap 6
-NtGdiEngCreateDeviceSurface 4
-NtGdiEngCreateDeviceBitmap 4
-NtGdiEngCreatePalette 6
-NtGdiEngComputeGlyphSet 3
-NtGdiEngCopyBits 6
-NtGdiEngDeletePalette 1
-NtGdiEngDeleteSurface 1
-NtGdiEngEraseSurface 3
-NtGdiEngUnlockSurface 1
-NtGdiEngLockSurface 1
-NtGdiEngBitBlt 11
-NtGdiEngStretchBlt 11
-NtGdiEngPlgBlt 11
-NtGdiEngMarkBandingSurface 1
-NtGdiEngStrokePath 8
-NtGdiEngFillPath 7
-NtGdiEngStrokeAndFillPath 10
-NtGdiEngPaint 5
-NtGdiEngLineTo 9
-NtGdiEngAlphaBlend 7
-NtGdiEngGradientFill 10
-NtGdiEngTransparentBlt 8
-NtGdiEngTextOut 10
-NtGdiEngStretchBltROP 13
-NtGdiXLATEOBJ_cGetPalette 4
-NtGdiXLATEOBJ_iXlate 2
-NtGdiXLATEOBJ_hGetColorTransform 1
-NtGdiCLIPOBJ_bEnum 3
-NtGdiCLIPOBJ_cEnumStart 5
-NtGdiCLIPOBJ_ppoGetPath 1
-NtGdiEngDeletePath 1
-NtGdiEngCreateClip 0
-NtGdiEngDeleteClip 1
-NtGdiBRUSHOBJ_ulGetBrushColor 1
-NtGdiBRUSHOBJ_pvAllocRbrush 2
-NtGdiBRUSHOBJ_pvGetRbrush 1
-NtGdiBRUSHOBJ_hGetColorTransform 1
-NtGdiXFORMOBJ_bApplyXform 5
-NtGdiXFORMOBJ_iGetXform 2
-NtGdiFONTOBJ_vGetInfo 3
-NtGdiFONTOBJ_pxoGetXform 1
-NtGdiFONTOBJ_cGetGlyphs 5
-NtGdiFONTOBJ_pifi 1
-NtGdiFONTOBJ_pfdg 1
-NtGdiFONTOBJ_pQueryGlyphAttrs 2
-NtGdiFONTOBJ_pvTrueTypeFontFile 2
-NtGdiFONTOBJ_cGetAllGlyphHandles 2
-NtGdiSTROBJ_bEnum 3
-NtGdiSTROBJ_bEnumPositionsOnly 3
-NtGdiSTROBJ_bGetAdvanceWidths 4
-NtGdiSTROBJ_vEnumStart 1
-NtGdiSTROBJ_dwGetCodePage 1
-NtGdiPATHOBJ_vGetBounds 2
-NtGdiPATHOBJ_bEnum 2
-NtGdiPATHOBJ_vEnumStart 1
-NtGdiPATHOBJ_vEnumStartClipLines 4
-NtGdiPATHOBJ_bEnumClipLines 3
-NtGdiGetDhpdev 1
-NtGdiEngCheckAbort 1
-NtGdiHT_Get8BPPFormatPalette 4
-NtGdiHT_Get8BPPMaskPalette 6
-NtGdiUpdateTransform 1
-NtGdiSetPUMPDOBJ 4
-NtGdiBRUSHOBJ_DeleteRbrush 2
-NtGdiUMPDEngFreeUserMem 1
-NtGdiDrawStream 3
-NtGdiDwmGetDirtyRgn 5
-NtGdiDwmGetSurfaceData 2
-NtGdiDdDDICreateAllocation 1
-NtGdiDdDDIQueryResourceInfo 1
-NtGdiDdDDIOpenResource 1
-NtGdiDdDDIDestroyAllocation 1
-NtGdiDdDDISetAllocationPriority 1
-NtGdiDdDDIQueryAllocationResidency 1
-NtGdiDdDDICreateDevice 1
-NtGdiDdDDIDestroyDevice 1
-NtGdiDdDDICreateContext 1
-NtGdiDdDDIDestroyContext 1
-NtGdiDdDDICreateSynchronizationObject 1
-NtGdiDdDDIDestroySynchronizationObject 1
-NtGdiDdDDIWaitForSynchronizationObject 1
-NtGdiDdDDISignalSynchronizationObject 1
-NtGdiDdDDIGetRuntimeData 1
-NtGdiDdDDIQueryAdapterInfo 1
-NtGdiDdDDILock 1
-NtGdiDdDDIUnlock 1
-NtGdiDdDDIGetDisplayModeList 1
-NtGdiDdDDISetDisplayMode 1
-NtGdiDdDDIGetMultisampleMethodList 1
-NtGdiDdDDIPresent 1
-NtGdiDdDDIRender 1
-NtGdiDdDDIOpenAdapterFromDeviceName 1
-NtGdiDdDDIOpenAdapterFromHdc 1
-NtGdiDdDDICloseAdapter 1
-NtGdiDdDDIGetSharedPrimaryHandle 1
-NtGdiDdDDIEscape 1
-NtGdiDdDDIQueryStatistics 1
-NtGdiDdDDISetVidPnSourceOwner 1
-NtGdiDdDDIGetPresentHistory 1
-NtGdiDdDDICreateOverlay 1
-NtGdiDdDDIUpdateOverlay 1
-NtGdiDdDDIFlipOverlay 1
-NtGdiDdDDIDestroyOverlay 1
-NtGdiDdDDIWaitForVerticalBlankEvent 1
-NtGdiDdDDISetGammaRamp 1
-NtGdiDdDDIGetDeviceState 1
-NtGdiDdDDICreateDCFromMemory 1
-NtGdiDdDDIDestroyDCFromMemory 1
-NtGdiDdDDISetContextSchedulingPriority 1
-NtGdiDdDDIGetContextSchedulingPriority 1
-NtGdiDdDDISetProcessSchedulingPriorityClass 2
-NtGdiDdDDIGetProcessSchedulingPriorityClass 2
-NtGdiDdDDIReleaseProcessVidPnSourceOwners 1
-NtGdiDdDDIGetScanLine 1
-NtGdiDdDDISetQueuedLimit 1
-NtGdiDdDDIPollDisplayChildren 1
-NtGdiDdDDIInvalidateActiveVidPn 1
-NtGdiDdDDICheckOcclusion 1
-NtGdiDdDDIWaitForIdle 1
-NtGdiDdDDICheckMonitorPowerState 1
-NtGdiDdDDICheckExclusiveOwnership 0
-NtGdiDdDDISetDisplayPrivateDriverFormat 1
-NtGdiDdDDISharedPrimaryLockNotification 1
-NtGdiDdDDISharedPrimaryUnLockNotification 1
-NtGdiMakeObjectXferable 2
-NtGdiMakeObjectUnXferable 1
-NtGdiGetNumberOfPhysicalMonitors 2
-NtGdiGetPhysicalMonitors 4
-NtGdiGetPhysicalMonitorDescription 3
-NtGdiDestroyPhysicalMonitor 1
-NtGdiDDCCIGetVCPFeature 5
-NtGdiDDCCISetVCPFeature 3
-NtGdiDDCCISaveCurrentSettings 1
-NtGdiDDCCIGetCapabilitiesStringLength 2
-NtGdiDDCCIGetCapabilitiesString 3
-NtGdiDDCCIGetTimingReport 2
-NtUserSetMirrorRendering 2
-NtUserShowSystemCursor 1
<module name="w32kdll_vista" type="win32dll" entrypoint="0" installname="w32kdll_vista.dll">
- <importlibrary definition="w32kdll_vista.def" />
- <file>w32kdll_vista.S</file>
+ <importlibrary definition="w32kdll_vista-$(ARCH).def" />
+ <if property="ARCH" value="i386">
+ <file>w32kdll_vista-i386.S</file>
+ </if>
+ <if property="ARCH" value="amd64">
+ <file>w32kdll_vista-amd64.S</file>
+ </if>
<file>main.c</file>
</module>
+++ /dev/null
-#
-# win32k systemcalls taken from Windows XP SP2 x86
-#
-NtGdiAbortDoc 1
-NtGdiAbortPath 1
-NtGdiAddFontResourceW 6
-NtGdiAddRemoteFontToDC 4
-NtGdiAddFontMemResourceEx 5
-NtGdiRemoveMergeFont 2
-NtGdiAddRemoteMMInstanceToDC 3
-NtGdiAlphaBlend 12
-NtGdiAngleArc 6
-NtGdiAnyLinkedFonts 0
-NtGdiFontIsLinked 1
-NtGdiArcInternal 10
-NtGdiBeginPath 1
-NtGdiBitBlt 11
-NtGdiCancelDC 1
-NtGdiCheckBitmapBits 8
-NtGdiCloseFigure 1
-NtGdiClearBitmapAttributes 2
-NtGdiClearBrushAttributes 2
-NtGdiColorCorrectPalette 6
-NtGdiCombineRgn 4
-NtGdiCombineTransform 3
-NtGdiComputeXformCoefficients 1
-NtGdiConsoleTextOut 4
-NtGdiConvertMetafileRect 2
-NtGdiCreateBitmap 5
-NtGdiCreateClientObj 1
-NtGdiCreateColorSpace 1
-NtGdiCreateColorTransform 8
-NtGdiCreateCompatibleBitmap 3
-NtGdiCreateCompatibleDC 1
-NtGdiCreateDIBBrush 6
-NtGdiCreateDIBitmapInternal 11
-NtGdiCreateDIBSection 9
-NtGdiCreateEllipticRgn 4
-NtGdiCreateHalftonePalette 1
-NtGdiCreateHatchBrushInternal 3
-NtGdiCreateMetafileDC 1
-NtGdiCreatePaletteInternal 2
-NtGdiCreatePatternBrushInternal 3
-NtGdiCreatePen 4
-NtGdiCreateRectRgn 4
-NtGdiCreateRoundRectRgn 6
-NtGdiCreateServerMetaFile 6
-NtGdiCreateSolidBrush 2
-NtGdiD3dContextCreate 4
-NtGdiD3dContextDestroy 1
-NtGdiD3dContextDestroyAll 1
-NtGdiD3dValidateTextureStageState 1
-NtGdiD3dDrawPrimitives2 7
-NtGdiDdGetDriverState 1
-NtGdiDdAddAttachedSurface 3
-NtGdiDdAlphaBlt 3
-NtGdiDdAttachSurface 2
-NtGdiDdBeginMoCompFrame 2
-NtGdiDdBlt 3
-NtGdiDdCanCreateSurface 2
-NtGdiDdCanCreateD3DBuffer 2
-NtGdiDdColorControl 2
-NtGdiDdCreateDirectDrawObject 1
-NtGdiDdCreateSurface 8
-NtGdiDdCreateD3DBuffer 8
-NtGdiDdCreateMoComp 2
-NtGdiDdCreateSurfaceObject 6
-NtGdiDdDeleteDirectDrawObject 1
-NtGdiDdDeleteSurfaceObject 1
-NtGdiDdDestroyMoComp 2
-NtGdiDdDestroySurface 2
-NtGdiDdDestroyD3DBuffer 1
-NtGdiDdEndMoCompFrame 2
-NtGdiDdFlip 5
-NtGdiDdFlipToGDISurface 2
-NtGdiDdGetAvailDriverMemory 2
-NtGdiDdGetBltStatus 2
-NtGdiDdGetDC 2
-NtGdiDdGetDriverInfo 2
-NtGdiDdGetDxHandle 3
-NtGdiDdGetFlipStatus 2
-NtGdiDdGetInternalMoCompInfo 2
-NtGdiDdGetMoCompBuffInfo 2
-NtGdiDdGetMoCompGuids 2
-NtGdiDdGetMoCompFormats 2
-NtGdiDdGetScanLine 2
-NtGdiDdLock 3
-NtGdiDdLockD3D 2
-NtGdiDdQueryDirectDrawObject 11
-NtGdiDdQueryMoCompStatus 2
-NtGdiDdReenableDirectDrawObject 2
-NtGdiDdReleaseDC 1
-NtGdiDdRenderMoComp 2
-NtGdiDdResetVisrgn 2
-NtGdiDdSetColorKey 2
-NtGdiDdSetExclusiveMode 2
-NtGdiDdSetGammaRamp 3
-NtGdiDdCreateSurfaceEx 3
-NtGdiDdSetOverlayPosition 3
-NtGdiDdUnattachSurface 2
-NtGdiDdUnlock 2
-NtGdiDdUnlockD3D 2
-NtGdiDdUpdateOverlay 3
-NtGdiDdWaitForVerticalBlank 2
-NtGdiDvpCanCreateVideoPort 2
-NtGdiDvpColorControl 2
-NtGdiDvpCreateVideoPort 2
-NtGdiDvpDestroyVideoPort 2
-NtGdiDvpFlipVideoPort 4
-NtGdiDvpGetVideoPortBandwidth 2
-NtGdiDvpGetVideoPortField 2
-NtGdiDvpGetVideoPortFlipStatus 2
-NtGdiDvpGetVideoPortInputFormats 2
-NtGdiDvpGetVideoPortLine 2
-NtGdiDvpGetVideoPortOutputFormats 2
-NtGdiDvpGetVideoPortConnectInfo 2
-NtGdiDvpGetVideoSignalStatus 2
-NtGdiDvpUpdateVideoPort 4
-NtGdiDvpWaitForVideoPortSync 2
-NtGdiDvpAcquireNotification 3
-NtGdiDvpReleaseNotification 2
-NtGdiDxgGenericThunk 6
-NtGdiDeleteClientObj 1
-NtGdiDeleteColorSpace 1
-NtGdiDeleteColorTransform 2
-NtGdiDeleteObjectApp 1
-NtGdiDescribePixelFormat 4
-NtGdiGetPerBandInfo 2
-NtGdiDoBanding 4
-NtGdiDoPalette 6
-NtGdiDrawEscape 4
-NtGdiEllipse 5
-NtGdiEnableEUDC 1
-NtGdiEndDoc 1
-NtGdiEndPage 1
-NtGdiEndPath 1
-NtGdiEnumFontChunk 5
-NtGdiEnumFontClose 1
-NtGdiEnumFontOpen 7
-NtGdiEnumObjects 4
-NtGdiEqualRgn 2
-NtGdiEudcLoadUnloadLink 7
-NtGdiExcludeClipRect 5
-NtGdiExtCreatePen 11
-NtGdiExtCreateRegion 3
-NtGdiExtEscape 8
-NtGdiExtFloodFill 5
-NtGdiExtGetObjectW 3
-NtGdiExtSelectClipRgn 3
-NtGdiExtTextOutW 9
-NtGdiFillPath 1
-NtGdiFillRgn 3
-NtGdiFlattenPath 1
-NtGdiFlushUserBatch 0
-NtGdiFlush 0
-NtGdiForceUFIMapping 2
-NtGdiFrameRgn 5
-NtGdiFullscreenControl 5
-NtGdiGetAndSetDCDword 4
-NtGdiGetAppClipBox 2
-NtGdiGetBitmapBits 3
-NtGdiGetBitmapDimension 2
-NtGdiGetBoundsRect 3
-NtGdiGetCharABCWidthsW 6
-NtGdiGetCharacterPlacementW 6
-NtGdiGetCharSet 1
-NtGdiGetCharWidthW 6
-NtGdiGetCharWidthInfo 2
-NtGdiGetColorAdjustment 2
-NtGdiGetColorSpaceforBitmap 1
-NtGdiGetDCDword 3
-NtGdiGetDCforBitmap 1
-NtGdiGetDCObject 2
-NtGdiGetDCPoint 3
-NtGdiGetDeviceCaps 2
-NtGdiGetDeviceGammaRamp 2
-NtGdiGetDeviceCapsAll 2
-NtGdiGetDIBitsInternal 9
-NtGdiGetETM 2
-NtGdiGetEudcTimeStampEx 3
-NtGdiGetFontData 5
-NtGdiGetFontResourceInfoInternalW 7
-NtGdiGetGlyphIndicesW 5
-NtGdiGetGlyphIndicesWInternal 6
-NtGdiGetGlyphOutline 8
-NtGdiGetKerningPairs 3
-NtGdiGetLinkedUFIs 3
-NtGdiGetMiterLimit 2
-NtGdiGetMonitorID 3
-NtGdiGetNearestColor 2
-NtGdiGetNearestPaletteIndex 2
-NtGdiGetObjectBitmapHandle 2
-NtGdiGetOutlineTextMetricsInternalW 4
-NtGdiGetPath 4
-NtGdiGetPixel 3
-NtGdiGetRandomRgn 3
-NtGdiGetRasterizerCaps 2
-NtGdiGetRealizationInfo 3
-NtGdiGetRegionData 3
-NtGdiGetRgnBox 2
-NtGdiGetServerMetaFileBits 7
-NtGdiGetSpoolMessage 4
-NtGdiGetStats 5
-NtGdiGetStockObject 1
-NtGdiGetStringBitmapW 5
-NtGdiGetSystemPaletteUse 1
-NtGdiGetTextCharsetInfo 3
-NtGdiGetTextExtent 5
-NtGdiGetTextExtentExW 8
-NtGdiGetTextFaceW 4
-NtGdiGetTextMetricsW 3
-NtGdiGetTransform 3
-NtGdiGetUFI 6
-NtGdiGetEmbUFI 7
-NtGdiGetUFIPathname 10
-NtGdiGetEmbedFonts 0
-NtGdiChangeGhostFont 2
-NtGdiAddEmbFontToDC 2
-NtGdiGetFontUnicodeRanges 2
-NtGdiGetWidthTable 7
-NtGdiGradientFill 6
-NtGdiHfontCreate 5
-NtGdiIcmBrushInfo 8
-NtGdiInit 0
-NtGdiInitSpool 0
-NtGdiIntersectClipRect 5
-NtGdiInvertRgn 2
-NtGdiLineTo 3
-NtGdiMakeFontDir 5
-NtGdiMakeInfoDC 2
-NtGdiMaskBlt 13
-NtGdiModifyWorldTransform 3
-NtGdiMonoBitmap 1
-NtGdiMoveTo 4
-NtGdiOffsetClipRgn 3
-NtGdiOffsetRgn 3
-NtGdiOpenDCW 7
-NtGdiPatBlt 6
-NtGdiPolyPatBlt 5
-NtGdiPathToRegion 1
-NtGdiPlgBlt 11
-NtGdiPolyDraw 4
-NtGdiPolyPolyDraw 5
-NtGdiPolyTextOutW 4
-NtGdiPtInRegion 3
-NtGdiPtVisible 3
-NtGdiQueryFonts 3
-NtGdiQueryFontAssocInfo 1
-NtGdiRectangle 5
-NtGdiRectInRegion 2
-NtGdiRectVisible 2
-NtGdiRemoveFontResourceW 6
-NtGdiRemoveFontMemResourceEx 1
-NtGdiResetDC 5
-NtGdiResizePalette 2
-NtGdiRestoreDC 2
-NtGdiRoundRect 7
-NtGdiSaveDC 1
-NtGdiScaleViewportExtEx 6
-NtGdiScaleWindowExtEx 6
-NtGdiSelectBitmap 2
-NtGdiSelectBrush 2
-NtGdiSelectClipPath 2
-NtGdiSelectFont 2
-NtGdiSelectPen 2
-NtGdiSetBitmapAttributes 2
-NtGdiSetBitmapBits 3
-NtGdiSetBitmapDimension 4
-NtGdiSetBoundsRect 3
-NtGdiSetBrushAttributes 2
-NtGdiSetBrushOrg 4
-NtGdiSetColorAdjustment 2
-NtGdiSetColorSpace 2
-NtGdiSetDeviceGammaRamp 2
-NtGdiSetDIBitsToDeviceInternal 16
-NtGdiSetFontEnumeration 1
-NtGdiSetFontXform 3
-NtGdiSetIcmMode 3
-NtGdiSetLinkedUFIs 3
-NtGdiSetMagicColors 3
-NtGdiSetMetaRgn 1
-NtGdiSetMiterLimit 3
-NtGdiGetDeviceWidth 1
-NtGdiMirrorWindowOrg 1
-NtGdiSetLayout 3
-NtGdiSetPixel 4
-NtGdiSetPixelFormat 2
-NtGdiSetRectRgn 5
-NtGdiSetSystemPaletteUse 2
-NtGdiSetTextJustification 3
-NtGdiSetupPublicCFONT 3
-NtGdiSetVirtualResolution 5
-NtGdiSetSizeDevice 3
-NtGdiStartDoc 4
-NtGdiStartPage 1
-NtGdiStretchBlt 12
-NtGdiStretchDIBitsInternal 16
-NtGdiStrokeAndFillPath 1
-NtGdiStrokePath 1
-NtGdiSwapBuffers 1
-NtGdiTransformPoints 5
-NtGdiTransparentBlt 11
-NtGdiUnloadPrinterDriver 2
-NtGdiUnmapMemFont 1
-NtGdiUnrealizeObject 1
-NtGdiUpdateColors 1
-NtGdiWidenPath 1
-NtUserActivateKeyboardLayout 2
-NtUserAlterWindowStyle 3
-NtUserAssociateInputContext 3
-NtUserAttachThreadInput 3
-NtUserBeginPaint 2
-NtUserBitBltSysBmp 8
-NtUserBlockInput 1
-NtUserBuildHimcList 4
-NtUserBuildHwndList 7
-NtUserBuildNameList 4
-NtUserBuildPropList 4
-NtUserCallHwnd 2
-NtUserCallHwndLock 2
-NtUserCallHwndOpt 2
-NtUserCallHwndParam 3
-NtUserCallHwndParamLock 3
-NtUserCallMsgFilter 2
-NtUserCallNextHookEx 4
-NtUserCallNoParam 1
-NtUserCallOneParam 2
-NtUserCallTwoParam 3
-NtUserChangeClipboardChain 2
-NtUserChangeDisplaySettings 5
-NtUserCheckImeHotKey 2
-NtUserCheckMenuItem 3
-NtUserChildWindowFromPointEx 4
-NtUserClipCursor 1
-NtUserCloseClipboard 0
-NtUserCloseDesktop 1
-NtUserCloseWindowStation 1
-NtUserConsoleControl 3
-NtUserConvertMemHandle 2
-NtUserCopyAcceleratorTable 3
-NtUserCountClipboardFormats 0
-NtUserCreateAcceleratorTable 2
-NtUserCreateCaret 4
-NtUserCreateDesktop 5
-NtUserCreateInputContext 1
-NtUserCreateLocalMemHandle 4
-NtUserCreateWindowEx 15
-NtUserCreateWindowStation 7
-NtUserDdeGetQualityOfService 3
-NtUserDdeInitialize 5
-NtUserDdeSetQualityOfService 3
-NtUserDeferWindowPos 8
-NtUserDefSetText 2
-NtUserDeleteMenu 3
-NtUserDestroyAcceleratorTable 1
-NtUserDestroyCursor 2
-NtUserDestroyInputContext 1
-NtUserDestroyMenu 1
-NtUserDestroyWindow 1
-NtUserDisableThreadIme 1
-NtUserDispatchMessage 1
-NtUserDragDetect 3
-NtUserDragObject 5
-NtUserDrawAnimatedRects 4
-NtUserDrawCaption 4
-NtUserDrawCaptionTemp 7
-NtUserDrawIconEx 11
-NtUserDrawMenuBarTemp 5
-NtUserEmptyClipboard 0
-NtUserEnableMenuItem 3
-NtUserEnableScrollBar 3
-NtUserEndDeferWindowPosEx 2
-NtUserEndMenu 0
-NtUserEndPaint 2
-NtUserEnumDisplayDevices 4
-NtUserEnumDisplayMonitors 4
-NtUserEnumDisplaySettings 4
-NtUserEvent 1
-NtUserExcludeUpdateRgn 2
-NtUserFillWindow 4
-NtUserFindExistingCursorIcon 3
-NtUserFindWindowEx 5
-NtUserFlashWindowEx 1
-NtUserGetAltTabInfo 6
-NtUserGetAncestor 2
-NtUserGetAppImeLevel 1
-NtUserGetAsyncKeyState 1
-NtUserGetAtomName 2
-NtUserGetCaretBlinkTime 0
-NtUserGetCaretPos 1
-NtUserGetClassInfo 5
-NtUserGetClassName 3
-NtUserGetClipboardData 2
-NtUserGetClipboardFormatName 3
-NtUserGetClipboardOwner 0
-NtUserGetClipboardSequenceNumber 0
-NtUserGetClipboardViewer 0
-NtUserGetClipCursor 1
-NtUserGetComboBoxInfo 2
-NtUserGetControlBrush 3
-NtUserGetControlColor 4
-NtUserGetCPD 3
-NtUserGetCursorFrameInfo 4
-NtUserGetCursorInfo 1
-NtUserGetDC 1
-NtUserGetDCEx 3
-NtUserGetDoubleClickTime 0
-NtUserGetForegroundWindow 0
-NtUserGetGuiResources 2
-NtUserGetGUIThreadInfo 2
-NtUserGetIconInfo 6
-NtUserGetIconSize 4
-NtUserGetImeHotKey 4
-NtUserGetImeInfoEx 2
-NtUserGetInternalWindowPos 3
-NtUserGetKeyboardLayoutList 2
-NtUserGetKeyboardLayoutName 1
-NtUserGetKeyboardState 1
-NtUserGetKeyNameText 3
-NtUserGetKeyState 1
-NtUserGetListBoxInfo 1
-NtUserGetMenuBarInfo 4
-NtUserGetMenuIndex 2
-NtUserGetMenuItemRect 4
-NtUserGetMessage 4
-NtUserGetMouseMovePointsEx 5
-NtUserGetObjectInformation 5
-NtUserGetOpenClipboardWindow 0
-NtUserGetPriorityClipboardFormat 2
-NtUserGetProcessWindowStation 0
-NtUserGetRawInputBuffer 3
-NtUserGetRawInputData 5
-NtUserGetRawInputDeviceInfo 4
-NtUserGetRawInputDeviceList 3
-NtUserGetRegisteredRawInputDevices 3
-NtUserGetScrollBarInfo 3
-NtUserGetSystemMenu 2
-NtUserGetThreadDesktop 2
-NtUserGetThreadState 1
-NtUserGetTitleBarInfo 2
-NtUserGetUpdateRect 3
-NtUserGetUpdateRgn 3
-NtUserGetWindowDC 1
-NtUserGetWindowPlacement 2
-NtUserGetWOWClass 2
-NtUserHardErrorControl 3
-NtUserHideCaret 1
-NtUserHiliteMenuItem 4
-NtUserImpersonateDdeClientWindow 2
-NtUserInitialize 3
-NtUserInitializeClientPfnArrays 4
-NtUserInitTask 12
-NtUserInternalGetWindowText 3
-NtUserInvalidateRect 3
-NtUserInvalidateRgn 3
-NtUserIsClipboardFormatAvailable 1
-NtUserKillTimer 2
-NtUserLoadKeyboardLayoutEx 7
-NtUserLockWindowStation 1
-NtUserLockWindowUpdate 1
-NtUserLockWorkStation 0
-NtUserMapVirtualKeyEx 4
-NtUserMenuItemFromPoint 4
-NtUserMessageCall 7
-NtUserMinMaximize 3
-NtUserMNDragLeave 0
-NtUserMNDragOver 2
-NtUserModifyUserStartupInfoFlags 2
-NtUserMoveWindow 6
-NtUserNotifyIMEStatus 3
-NtUserNotifyProcessCreate 4
-NtUserNotifyWinEvent 4
-NtUserOpenClipboard 2
-NtUserOpenDesktop 3
-NtUserOpenInputDesktop 3
-NtUserOpenWindowStation 2
-NtUserPaintDesktop 1
-NtUserPeekMessage 5
-NtUserPostMessage 4
-NtUserPostThreadMessage 4
-NtUserPrintWindow 3
-NtUserProcessConnect 3
-NtUserQueryInformationThread 5
-NtUserQueryInputContext 2
-NtUserQuerySendMessage 1
-NtUserQueryUserCounters 5
-NtUserQueryWindow 2
-NtUserRealChildWindowFromPoint 3
-NtUserRealInternalGetMessage 6
-NtUserRealWaitMessageEx 2
-NtUserRedrawWindow 4
-NtUserRegisterClassExWOW 7
-NtUserRegisterUserApiHook 2
-NtUserRegisterHotKey 4
-NtUserRegisterRawInputDevices 3
-NtUserRegisterTasklist 1
-NtUserRegisterWindowMessage 1
-NtUserRemoveMenu 3
-NtUserRemoveProp 2
-NtUserResolveDesktop 4
-NtUserResolveDesktopForWOW 1
-NtUserSBGetParms 4
-NtUserScrollDC 7
-NtUserScrollWindowEx 8
-NtUserSelectPalette 3
-NtUserSendInput 3
-NtUserSetActiveWindow 1
-NtUserSetAppImeLevel 2
-NtUserSetCapture 1
-NtUserSetClassLong 4
-NtUserSetClassWord 3
-NtUserSetClipboardData 3
-NtUserSetClipboardViewer 1
-NtUserSetConsoleReserveKeys 2
-NtUserSetCursor 1
-NtUserSetCursorContents 2
-NtUserSetCursorIconData 4
-NtUserSetDbgTag 2
-NtUserSetFocus 1
-NtUserSetImeHotKey 5
-NtUserSetImeInfoEx 1
-NtUserSetImeOwnerWindow 2
-NtUserSetInformationProcess 4
-NtUserSetInformationThread 4
-NtUserSetInternalWindowPos 4
-NtUserSetKeyboardState 1
-NtUserSetLogonNotifyWindow 1
-NtUserSetMenu 3
-NtUserSetMenuContextHelpId 2
-NtUserSetMenuDefaultItem 3
-NtUserSetMenuFlagRtoL 1
-NtUserSetObjectInformation 4
-NtUserSetParent 2
-NtUserSetProcessWindowStation 1
-NtUserSetProp 3
-NtUserSetRipFlags 2
-NtUserSetScrollInfo 4
-NtUserSetShellWindowEx 2
-NtUserSetSysColors 4
-NtUserSetSystemCursor 2
-NtUserSetSystemMenu 2
-NtUserSetSystemTimer 4
-NtUserSetThreadDesktop 1
-NtUserSetThreadLayoutHandles 2
-NtUserSetThreadState 2
-NtUserSetTimer 4
-NtUserSetWindowFNID 2
-NtUserSetWindowLong 4
-NtUserSetWindowPlacement 2
-NtUserSetWindowPos 7
-NtUserSetWindowRgn 3
-NtUserSetWindowsHookAW 3
-NtUserSetWindowsHookEx 6
-NtUserSetWindowStationUser 4
-NtUserSetWindowWord 3
-NtUserSetWinEventHook 8
-NtUserShowCaret 1
-NtUserShowScrollBar 3
-NtUserShowWindow 2
-NtUserShowWindowAsync 2
-NtUserSoundSentry 0
-NtUserSwitchDesktop 1
-NtUserSystemParametersInfo 4
-NtUserTestForInteractiveUser 1
-NtUserThunkedMenuInfo 2
-NtUserThunkedMenuItemInfo 6
-NtUserToUnicodeEx 7
-NtUserTrackMouseEvent 1
-NtUserTrackPopupMenuEx 6
-NtUserCalcMenuBar 5
-NtUserPaintMenuBar 6
-NtUserTranslateAccelerator 3
-NtUserTranslateMessage 2
-NtUserUnhookWindowsHookEx 1
-NtUserUnhookWinEvent 1
-NtUserUnloadKeyboardLayout 1
-NtUserUnlockWindowStation 1
-NtUserUnregisterClass 3
-NtUserUnregisterUserApiHook 0
-NtUserUnregisterHotKey 2
-NtUserUpdateInputContext 3
-NtUserUpdateInstance 3
-NtUserUpdateLayeredWindow 9
-NtUserGetLayeredWindowAttributes 4
-NtUserSetLayeredWindowAttributes 4
-NtUserUpdatePerUserSystemParameters 2
-NtUserUserHandleGrantAccess 3
-NtUserValidateHandleSecure 1
-NtUserValidateRect 2
-NtUserValidateTimerCallback 3
-NtUserVkKeyScanEx 3
-NtUserWaitForInputIdle 3
-NtUserWaitForMsgAndEvent 1
-NtUserWaitMessage 0
-NtUserWin32PoolAllocationStats 6
-NtUserWindowFromPoint 2
-NtUserYieldTask 0
-NtUserRemoteConnect 3
-NtUserRemoteRedrawRectangle 4
-NtUserRemoteRedrawScreen 0
-NtUserRemoteStopScreenUpdates 0
-NtUserCtxDisplayIOCtl 3
-NtGdiEngAssociateSurface 3
-NtGdiEngCreateBitmap 6
-NtGdiEngCreateDeviceSurface 4
-NtGdiEngCreateDeviceBitmap 4
-NtGdiEngCreatePalette 6
-NtGdiEngComputeGlyphSet 3
-NtGdiEngCopyBits 6
-NtGdiEngDeletePalette 1
-NtGdiEngDeleteSurface 1
-NtGdiEngEraseSurface 3
-NtGdiEngUnlockSurface 1
-NtGdiEngLockSurface 1
-NtGdiEngBitBlt 11
-NtGdiEngStretchBlt 11
-NtGdiEngPlgBlt 11
-NtGdiEngMarkBandingSurface 1
-NtGdiEngStrokePath 8
-NtGdiEngFillPath 7
-NtGdiEngStrokeAndFillPath 10
-NtGdiEngPaint 5
-NtGdiEngLineTo 9
-NtGdiEngAlphaBlend 7
-NtGdiEngGradientFill 10
-NtGdiEngTransparentBlt 8
-NtGdiEngTextOut 10
-NtGdiEngStretchBltROP 13
-NtGdiXLATEOBJ_cGetPalette 4
-NtGdiXLATEOBJ_iXlate 2
-NtGdiXLATEOBJ_hGetColorTransform 1
-NtGdiCLIPOBJ_bEnum 3
-NtGdiCLIPOBJ_cEnumStart 5
-NtGdiCLIPOBJ_ppoGetPath 1
-NtGdiEngDeletePath 1
-NtGdiEngCreateClip 0
-NtGdiEngDeleteClip 1
-NtGdiBRUSHOBJ_ulGetBrushColor 1
-NtGdiBRUSHOBJ_pvAllocRbrush 2
-NtGdiBRUSHOBJ_pvGetRbrush 1
-NtGdiBRUSHOBJ_hGetColorTransform 1
-NtGdiXFORMOBJ_bApplyXform 5
-NtGdiXFORMOBJ_iGetXform 2
-NtGdiFONTOBJ_vGetInfo 3
-NtGdiFONTOBJ_pxoGetXform 1
-NtGdiFONTOBJ_cGetGlyphs 5
-NtGdiFONTOBJ_pifi 1
-NtGdiFONTOBJ_pfdg 1
-NtGdiFONTOBJ_pQueryGlyphAttrs 2
-NtGdiFONTOBJ_pvTrueTypeFontFile 2
-NtGdiFONTOBJ_cGetAllGlyphHandles 2
-NtGdiSTROBJ_bEnum 3
-NtGdiSTROBJ_bEnumPositionsOnly 3
-NtGdiSTROBJ_bGetAdvanceWidths 4
-NtGdiSTROBJ_vEnumStart 1
-NtGdiSTROBJ_dwGetCodePage 1
-NtGdiPATHOBJ_vGetBounds 2
-NtGdiPATHOBJ_bEnum 2
-NtGdiPATHOBJ_vEnumStart 1
-NtGdiPATHOBJ_vEnumStartClipLines 4
-NtGdiPATHOBJ_bEnumClipLines 3
-NtGdiGetDhpdev 1
-NtGdiEngCheckAbort 1
-NtGdiHT_Get8BPPFormatPalette 4
-NtGdiHT_Get8BPPMaskPalette 6
-NtGdiUpdateTransform 1
-NtGdiSetPUMPDOBJ 4
-NtGdiBRUSHOBJ_DeleteRbrush 2
-NtGdiUMPDEngFreeUserMem 1
-NtGdiDrawStream 3
static DWORD WINAPI
IntSyscall(FARPROC proc, UINT cParams, PVOID pFirstParam)
{
- DWORD retval;
+ DWORD retval = 0;
+#ifdef _M_I386
#ifdef __GNUC__
asm volatile
(
mov retval, eax
popf
};
+#endif
#endif
return retval;
-<module name="w32knapi" type="win32cui">
+<module name="w32knapi" type="win32cui" allowwarnings="true">
<include base="w32knapi">.</include>
<library>apitest</library>
<library>ntdll</library>
ok(Mdl == NULL,
"IoAllocateMdl should fail allocation of 2Gb or more, but got Mdl=0x%X",
- (UINT32)Mdl);
+ (UINT_PTR)Mdl);
if (Mdl)
IoFreeMdl(Mdl);
ok(Mdl != NULL, "Mdl allocation failed");
// Check fields of the allocated struct
ok(Mdl->Next == NULL, "Mdl->Next should be NULL, but is 0x%X",
- (UINT32)Mdl->Next);
+ (UINT_PTR)Mdl->Next);
ok(Mdl->ByteCount == MdlSize,
"Mdl->ByteCount should be equal to MdlSize, but is 0x%X",
- (UINT32)Mdl->ByteCount);
+ (UINT_PTR)Mdl->ByteCount);
// TODO: Check other fields of MDL struct
IoFreeMdl(Mdl);
Mdl = IoAllocateMdl(VirtualAddress, MdlSize, FALSE, FALSE, Irp);
ok(Mdl != NULL, "Mdl allocation failed");
ok(Irp->MdlAddress == Mdl, "Irp->MdlAddress should be 0x%X, but is 0x%X",
- (UINT32)Mdl, (UINT32)Irp->MdlAddress);
+ (UINT_PTR)Mdl, (UINT_PTR)Irp->MdlAddress);
IoFreeMdl(Mdl);
"Object insertion should have failed, but got 0x%lX", Status);
ok(ObBody[0] == ObBody1[1],
"Object bodies doesn't match, 0x%p != 0x%p", ObBody[0], ObBody1[1]);
- ok(ObHandle2[0] != NULL, "Bad handle returned 0x%lX", (ULONG)ObHandle2[0]);
+ ok(ObHandle2[0] != NULL, "Bad handle returned 0x%lX", (ULONG_PTR)ObHandle2[0]);
DPRINT1("%d %d %d %d %d %d %d\n", DumpCount, OpenCount, // deletecount+1
CloseCount, DeleteCount, ParseCount, OkayToCloseCount, QueryNameCount);
/* Remove the current driver name from the string */
/* FIXME: Dont use hard coded driver name, determine it from the string returned from the above Query */
Length = (wcslen((PWCHAR)ValuePartialInfo->Data) * 2) - (wcslen(L"kmtest.sys") * 2);
- RtlZeroMemory((PVOID)((ULONG)ValuePartialInfo->Data + Length),
+ RtlZeroMemory((PVOID)((ULONG_PTR)ValuePartialInfo->Data + Length),
wcslen(L"drvtests.sys") * 2);
ZwClose(ServiceKey);
BOOL Test_Misc (INT* passed, INT* failed)
{
- LPDIRECTDRAWSURFACE7 Surface;
+ LPDIRECTDRAWSURFACE7 Surface;
if(!CreateSurface(&Surface))
return FALSE;
#include "ddrawtest.h"
-LONG WINAPI BasicWindowProc (HWND hwnd, UINT message, UINT wParam, LONG lParam)
+LRESULT WINAPI BasicWindowProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
printf(" pHalInfo4->vmiData->dwTextureAlign : 0x%08lx\n",(long)pHalInfo4->vmiData.dwTextureAlign);
printf(" pHalInfo4->vmiData->dwZBufferAlign : 0x%08lx\n",(long)pHalInfo4->vmiData.dwZBufferAlign);
printf(" pHalInfo4->vmiData->dwAlphaAlign : 0x%08lx\n",(long)pHalInfo4->vmiData.dwAlphaAlign);
- printf(" pHalInfo4->vmiData->pvPrimary : 0x%08lx\n",(long)pHalInfo4->vmiData.pvPrimary);
+ printf(" pHalInfo4->vmiData->pvPrimary : 0x%08lx\n",(LONG_PTR)pHalInfo4->vmiData.pvPrimary);
printf(" pHalInfo4->ddCaps.dwSize : 0x%08lx\n",pHalInfo4->ddCaps.dwSize);
printf(" pHalInfo4->ddCaps.dwCaps : 0x%08lx\n",pHalInfo4->ddCaps.dwCaps);
printf(" pHalInfo4->ddCaps.dwSVBCaps2 : 0x%08lx\n",pHalInfo4->ddCaps.dwSVBCaps2);
- printf(" pHalInfo4->GetDriverInfo : 0x%08lx\n",(long)pHalInfo4->GetDriverInfo);
+ printf(" pHalInfo4->GetDriverInfo : 0x%08lx\n",(LONG_PTR)pHalInfo4->GetDriverInfo);
printf(" pHalInfo4->dwFlags : 0x%08lx\n",(long)pHalInfo4->dwFlags);
}
printf(" pHalInfo->vmiData->dwTextureAlign : 0x%08lx\n",(long)pHalInfo->vmiData.dwTextureAlign);
printf(" pHalInfo->vmiData->dwZBufferAlign : 0x%08lx\n",(long)pHalInfo->vmiData.dwZBufferAlign);
printf(" pHalInfo->vmiData->dwAlphaAlign : 0x%08lx\n",(long)pHalInfo->vmiData.dwAlphaAlign);
- printf(" pHalInfo->vmiData->pvPrimary : 0x%08lx\n",(long)pHalInfo->vmiData.pvPrimary);
+ printf(" pHalInfo->vmiData->pvPrimary : 0x%08lx\n",(LONG_PTR)pHalInfo->vmiData.pvPrimary);
printf(" pHalInfo->ddCaps.dwSize : 0x%08lx\n",pHalInfo->ddCaps.dwSize);
printf(" pHalInfo->ddCaps.dwCaps : ");
printf(" pHalInfo->ddCaps.dwSSBRops[0x%04x] : 0x%08lx\n",t,pHalInfo->ddCaps.dwSSBRops[t]);
}
- printf(" pHalInfo->GetDriverInfo : 0x%08lx\n",(long)pHalInfo->GetDriverInfo);
+ printf(" pHalInfo->GetDriverInfo : 0x%08lx\n",(LONG_PTR)pHalInfo->GetDriverInfo);
printf(" pHalInfo->dwFlags : ");
flag = pHalInfo->dwFlags;
checkflag(flag,DDHALINFO_GETDRIVERINFO2,"DDHALINFO_GETDRIVERINFO2");
endcheckflag(flag,"pHalInfo->dwFlags");
- printf(" pHalInfo->lpD3DGlobalDriverData : 0x%08lx\n",(long)pHalInfo->lpD3DGlobalDriverData);
- printf(" pHalInfo->lpD3DHALCallbacks : 0x%08lx\n",(long)pHalInfo->lpD3DHALCallbacks);
- printf(" pHalInfo->lpD3DBufCallbacks : 0x%08lx\n",(long)pHalInfo->lpD3DBufCallbacks);
+ printf(" pHalInfo->lpD3DGlobalDriverData : 0x%08lx\n",(LONG_PTR)pHalInfo->lpD3DGlobalDriverData);
+ printf(" pHalInfo->lpD3DHALCallbacks : 0x%08lx\n",(LONG_PTR)pHalInfo->lpD3DHALCallbacks);
+ printf(" pHalInfo->lpD3DBufCallbacks : 0x%08lx\n",(LONG_PTR)pHalInfo->lpD3DBufCallbacks);
}
else
{
printf("dumping the D3DNTHAL_CALLBACKS from %s\n",text);
if (puD3dCallbacks->dwSize == sizeof(D3DNTHAL_CALLBACKS))
{
- printf(" puD3dCallbacks->dwSize : 0x%08lx\n",(long)puD3dCallbacks->dwSize);
- printf(" puD3dCallbacks->ContextCreate : 0x%08lx\n",(long)puD3dCallbacks->ContextCreate);
- printf(" puD3dCallbacks->ContextDestroy : 0x%08lx\n",(long)puD3dCallbacks->ContextDestroy);
- printf(" puD3dCallbacks->ContextDestroyAll : 0x%08lx\n",(long)puD3dCallbacks->ContextDestroyAll);
- printf(" puD3dCallbacks->SceneCapture : 0x%08lx\n",(long)puD3dCallbacks->SceneCapture);
- printf(" puD3dCallbacks->dwReserved10 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved10);
- printf(" puD3dCallbacks->dwReserved11 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved11);
- printf(" puD3dCallbacks->dwReserved22 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved22);
- printf(" puD3dCallbacks->dwReserved23 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved23);
- printf(" puD3dCallbacks->dwReserved : 0x%08lx\n",(long)puD3dCallbacks->dwReserved);
- printf(" puD3dCallbacks->TextureCreate : 0x%08lx\n",(long)puD3dCallbacks->TextureCreate);
- printf(" puD3dCallbacks->TextureDestroy : 0x%08lx\n",(long)puD3dCallbacks->TextureDestroy);
- printf(" puD3dCallbacks->TextureSwap : 0x%08lx\n",(long)puD3dCallbacks->TextureSwap);
- printf(" puD3dCallbacks->TextureGetSurf : 0x%08lx\n",(long)puD3dCallbacks->TextureGetSurf);
- printf(" puD3dCallbacks->dwReserved12 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved12);
- printf(" puD3dCallbacks->dwReserved13 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved13);
- printf(" puD3dCallbacks->dwReserved14 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved14);
- printf(" puD3dCallbacks->dwReserved15 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved15);
- printf(" puD3dCallbacks->dwReserved16 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved16);
- printf(" puD3dCallbacks->dwReserved17 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved17);
- printf(" puD3dCallbacks->dwReserved18 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved18);
- printf(" puD3dCallbacks->dwReserved19 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved19);
- printf(" puD3dCallbacks->dwReserved20 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved20);
- printf(" puD3dCallbacks->dwReserved21 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved21);
- printf(" puD3dCallbacks->dwReserved24 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved24);
+ printf(" puD3dCallbacks->dwSize : 0x%08lx\n",puD3dCallbacks->dwSize);
+ printf(" puD3dCallbacks->ContextCreate : 0x%08lx\n",puD3dCallbacks->ContextCreate);
+ printf(" puD3dCallbacks->ContextDestroy : 0x%08lx\n",puD3dCallbacks->ContextDestroy);
+ printf(" puD3dCallbacks->ContextDestroyAll : 0x%08lx\n",puD3dCallbacks->ContextDestroyAll);
+ printf(" puD3dCallbacks->SceneCapture : 0x%08lx\n",puD3dCallbacks->SceneCapture);
+ printf(" puD3dCallbacks->dwReserved10 : 0x%08lx\n",puD3dCallbacks->dwReserved10);
+ printf(" puD3dCallbacks->dwReserved11 : 0x%08lx\n",puD3dCallbacks->dwReserved11);
+ printf(" puD3dCallbacks->dwReserved22 : 0x%08lx\n",puD3dCallbacks->dwReserved22);
+ printf(" puD3dCallbacks->dwReserved23 : 0x%08lx\n",puD3dCallbacks->dwReserved23);
+ printf(" puD3dCallbacks->dwReserved : 0x%08lx\n",puD3dCallbacks->dwReserved);
+ printf(" puD3dCallbacks->TextureCreate : 0x%08lx\n",puD3dCallbacks->TextureCreate);
+ printf(" puD3dCallbacks->TextureDestroy : 0x%08lx\n",puD3dCallbacks->TextureDestroy);
+ printf(" puD3dCallbacks->TextureSwap : 0x%08lx\n",puD3dCallbacks->TextureSwap);
+ printf(" puD3dCallbacks->TextureGetSurf : 0x%08lx\n",puD3dCallbacks->TextureGetSurf);
+ printf(" puD3dCallbacks->dwReserved12 : 0x%08lx\n",puD3dCallbacks->dwReserved12);
+ printf(" puD3dCallbacks->dwReserved13 : 0x%08lx\n",puD3dCallbacks->dwReserved13);
+ printf(" puD3dCallbacks->dwReserved14 : 0x%08lx\n",puD3dCallbacks->dwReserved14);
+ printf(" puD3dCallbacks->dwReserved15 : 0x%08lx\n",puD3dCallbacks->dwReserved15);
+ printf(" puD3dCallbacks->dwReserved16 : 0x%08lx\n",puD3dCallbacks->dwReserved16);
+ printf(" puD3dCallbacks->dwReserved17 : 0x%08lx\n",puD3dCallbacks->dwReserved17);
+ printf(" puD3dCallbacks->dwReserved18 : 0x%08lx\n",puD3dCallbacks->dwReserved18);
+ printf(" puD3dCallbacks->dwReserved19 : 0x%08lx\n",puD3dCallbacks->dwReserved19);
+ printf(" puD3dCallbacks->dwReserved20 : 0x%08lx\n",puD3dCallbacks->dwReserved20);
+ printf(" puD3dCallbacks->dwReserved21 : 0x%08lx\n",puD3dCallbacks->dwReserved21);
+ printf(" puD3dCallbacks->dwReserved24 : 0x%08lx\n",puD3dCallbacks->dwReserved24);
printf(" puD3dCallbacks->dwReserved0 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved0);
printf(" puD3dCallbacks->dwReserved1 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved1);
printf(" puD3dCallbacks->dwReserved2 : 0x%08lx\n",(long)puD3dCallbacks->dwReserved2);
printf(" puD3dDriverData->dwNumVertices : 0x%08lx\n",(long)puD3dDriverData->dwNumVertices);
printf(" puD3dDriverData->dwNumClipVertices : 0x%08lx\n",(long)puD3dDriverData->dwNumClipVertices);
printf(" puD3dDriverData->dwNumTextureFormats : 0x%08lx\n",(long)puD3dDriverData->dwNumTextureFormats);
- printf(" puD3dDriverData->lpTextureFormats : 0x%08lx\n",(long)puD3dDriverData->lpTextureFormats);
- printf(" puD3dDriverData->lpTextureFormats : 0x%08lx\n",(long)puD3dDriverData->lpTextureFormats);
+ printf(" puD3dDriverData->lpTextureFormats : 0x%08lx\n",puD3dDriverData->lpTextureFormats);
+ printf(" puD3dDriverData->lpTextureFormats : 0x%08lx\n",puD3dDriverData->lpTextureFormats);
}
else
{
checkflag(flag,DDHAL_D3DBUFCB32_UNLOCKD3DBUF,"DDHAL_D3DBUFCB32_UNLOCKD3DBUF");
endcheckflag(flag,"puD3dBufferCallbacks->dwFlags");
- printf(" puD3dBufferCallbacks->CanCreateD3DBuffer : 0x%08lx\n",(long)puD3dBufferCallbacks->CanCreateD3DBuffer);
- printf(" puD3dBufferCallbacks->CreateD3DBuffer : 0x%08lx\n",(long)puD3dBufferCallbacks->CreateD3DBuffer);
- printf(" puD3dBufferCallbacks->DestroyD3DBuffer : 0x%08lx\n",(long)puD3dBufferCallbacks->DestroyD3DBuffer);
- printf(" puD3dBufferCallbacks->LockD3DBuffer : 0x%08lx\n",(long)puD3dBufferCallbacks->LockD3DBuffer);
- printf(" puD3dBufferCallbacks->UnlockD3DBuffer : 0x%08lx\n",(long)puD3dBufferCallbacks->UnlockD3DBuffer);
+ printf(" puD3dBufferCallbacks->CanCreateD3DBuffer : 0x%08lx\n",puD3dBufferCallbacks->CanCreateD3DBuffer);
+ printf(" puD3dBufferCallbacks->CreateD3DBuffer : 0x%08lx\n",puD3dBufferCallbacks->CreateD3DBuffer);
+ printf(" puD3dBufferCallbacks->DestroyD3DBuffer : 0x%08lx\n",puD3dBufferCallbacks->DestroyD3DBuffer);
+ printf(" puD3dBufferCallbacks->LockD3DBuffer : 0x%08lx\n",puD3dBufferCallbacks->LockD3DBuffer);
+ printf(" puD3dBufferCallbacks->UnlockD3DBuffer : 0x%08lx\n",puD3dBufferCallbacks->UnlockD3DBuffer);
}
else
{
printf(" puD3dTextureFormats->dwZBufferBitDepth : 0x%08lx\n",(long)myTextureFormats->dwZBufferBitDepth);
printf(" puD3dTextureFormats->dwAlphaBitDepth : 0x%08lx\n",(long)myTextureFormats->dwAlphaBitDepth);
printf(" puD3dTextureFormats->dwReserved : 0x%08lx\n",(long)myTextureFormats->dwReserved);
- printf(" puD3dTextureFormats->lpSurface : 0x%08lx\n",(long)myTextureFormats->lpSurface);
+ printf(" puD3dTextureFormats->lpSurface : 0x%08lx\n",myTextureFormats->lpSurface);
printf(" puD3dTextureFormats->ddckCKDestOverlay.dwColorSpaceLowValue : 0x%08lx\n",(long)myTextureFormats->ddckCKDestOverlay.dwColorSpaceLowValue);
printf(" puD3dTextureFormats->ddckCKDestOverlay.dwColorSpaceHighValue : 0x%08lx\n",(long)myTextureFormats->ddckCKDestOverlay.dwColorSpaceHighValue);
printf(" puD3dTextureFormats->ddckCKDestBlt.dwColorSpaceLowValue : 0x%08lx\n",(long)myTextureFormats->ddckCKDestBlt.dwColorSpaceLowValue);
endcheckflag(flag,"puD3dTextureFormats->ddsCaps.dwCaps");
- myTextureFormats = (DDSURFACEDESC *) (((DWORD) myTextureFormats) + sizeof(DDSURFACEDESC));
+ myTextureFormats = (DDSURFACEDESC *) (((DWORD_PTR) myTextureFormats) + sizeof(DDSURFACEDESC));
}
else
{
if (input == value) \
{ \
counter++; \
- printf("FAIL ret=%s, %d != %d )\n",text,(int)input,(int)value); \
+ printf("FAIL ret=%s, %x != %x )\n",text,input,value); \
}
if (input != value) \
{ \
counter++; \
- printf("FAIL ret=%s, %d == %d )\n",text,(int)input,(int)value); \
+ printf("FAIL ret=%s, %x == %x )\n",text,input,value); \
}
DWORD WINAPI
thread_main1(LPVOID param)
{
- printf("Thread 1 running (Counter %lu)\n", (DWORD)param);
+ printf("Thread 1 running (Counter %lu)\n", PtrToLong(param));
SleepEx(INFINITE, TRUE);
return 0;
}
DWORD WINAPI
thread_main2(LPVOID param)
{
- printf("Thread 2 running (Counter %lu)\n", (DWORD)param);
+ printf("Thread 2 running (Counter %lu)\n", PtrToLong(param));
Sleep(INFINITE);
return 0;
}
CreateThread(NULL,
0,
thread_main1,
- (LPVOID)i,
+ (LPVOID)(ULONG_PTR)i,
0,
&id);
hbtn[0] = CreateWindow(
"BUTTON","BS_DEFPUSHBUTTON",WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON,
- 10, 10, 200, 40, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
+ 10, 10, 200, 40, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[1] = CreateWindow(
"BUTTON","BS_3STATE",WS_VISIBLE | WS_CHILD | BS_3STATE,
- 10, 60, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
+ 10, 60, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[2] = CreateWindow(
"BUTTON","BS_AUTO3STATE",WS_VISIBLE | WS_CHILD | BS_AUTO3STATE,
- 10, 90, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
+ 10, 90, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[3] = CreateWindow(
"BUTTON","BS_AUTOCHECKBOX",WS_VISIBLE | WS_CHILD | BS_AUTOCHECKBOX,
- 10, 120, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
+ 10, 120, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[4] = CreateWindow(
"BUTTON","BS_AUTORADIOBUTTON",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON,
- 10, 150, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
+ 10, 150, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[5] = CreateWindow(
"BUTTON","BS_CHECKBOX",WS_VISIBLE | WS_CHILD | BS_CHECKBOX,
- 10, 180, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
+ 10, 180, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[6] = CreateWindow(
"BUTTON","BS_GROUPBOX",WS_VISIBLE | WS_CHILD | BS_GROUPBOX,
- 10, 210, 200, 80, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
+ 10, 210, 200, 80, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[7] = CreateWindow(
"BUTTON","BS_PUSHBUTTON",WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON,
- 20, 230, 180, 30, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
+ 20, 230, 180, 30, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[8] = CreateWindow(
"BUTTON","BS_RADIOBUTTON",WS_VISIBLE | WS_CHILD | BS_RADIOBUTTON,
- 10, 300, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
+ 10, 300, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[9] = CreateWindow(
"BUTTON","BS_AUTORADIOBUTTON",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON,
- 220, 160, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
+ 220, 160, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[10] = CreateWindow(
"BUTTON","BS_DEFPUSHBUTTON|BS_BOTTOM",WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON | BS_BOTTOM,
- 220, 10, 250, 40, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
+ 220, 10, 250, 40, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[11] = CreateWindow(
"BUTTON","BS_DEFPUSHBUTTON|BS_LEFT",WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON | BS_LEFT,
- 480, 10, 250, 40, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
+ 480, 10, 250, 40, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[12] = CreateWindow(
"BUTTON","BS_DEFPUSHBUTTON|BS_RIGHT|BS_MULTILINE",WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON | BS_RIGHT |BS_MULTILINE,
- 740, 10, 150, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
+ 740, 10, 150, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[13] = CreateWindow(
"BUTTON","BS_AUTORADIOBUTTON|BS_TOP",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_TOP,
- 220, 60, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
+ 220, 60, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
// Other Combinations
hbtn[14] = CreateWindow(
"BUTTON","BS_AUTORADIOBUTTON|BS_BOTTOM|BS_MULTILINE",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_BOTTOM | BS_MULTILINE,
- 480, 60, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
+ 480, 60, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[15] = CreateWindow(
"BUTTON","BS_AUTORADIOBUTTON|BS_LEFT",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_LEFT,
- 740, 80, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
+ 740, 80, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[16] = CreateWindow(
"BUTTON","BS_AUTORADIOBUTTON|BS_RIGHT|BS_TOP",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_RIGHT | BS_TOP,
- 220, 130, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
+ 220, 130, 200, 20, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[17] = CreateWindow(
"BUTTON","BS_AUTORADIOBUTTON|BS_TOP|BS_MULTILINE",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_TOP| BS_MULTILINE,
- 480, 130, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
+ 480, 130, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[18] = CreateWindow(
"BUTTON","BS_AUTOCHECKBOX|BS_BOTTOM|BS_MULTILINE",WS_VISIBLE | WS_CHILD | BS_AUTOCHECKBOX | BS_BOTTOM | BS_MULTILINE,
- 740, 130, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
+ 740, 130, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[19] = CreateWindow(
"BUTTON","BS_AUTOCHECKBOX|BS_TOP|BS_MULTILINE",WS_VISIBLE | WS_CHILD | BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE,
- 480, 190, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
+ 480, 190, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[20] = CreateWindow(
"BUTTON","BS_AUTOCHECKBOX|BS_LEFT|BS_MULTILINE",WS_VISIBLE | WS_CHILD | BS_AUTOCHECKBOX | BS_LEFT | BS_MULTILINE,
- 220, 230, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
+ 220, 230, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[21] = CreateWindow(
"BUTTON","BS_AUTOCHECKBOX|BS_RIGHT|BS_MULTILINE",WS_VISIBLE | WS_CHILD | BS_AUTOCHECKBOX | BS_RIGHT | BS_MULTILINE,
- 480, 240, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
+ 480, 240, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[22] = CreateWindow(
"BUTTON","BS_GROUPBOX|BS_TOP",WS_VISIBLE | WS_CHILD | BS_GROUPBOX | BS_TOP,
- 10, 340, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
+ 10, 340, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[23] = CreateWindow(
"BUTTON","BS_GROUPBOX|BS_BOTTOM",WS_VISIBLE | WS_CHILD | BS_GROUPBOX | BS_BOTTOM,
- 10, 410, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
+ 10, 410, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[24] = CreateWindow(
"BUTTON","BS_GROUPBOXBOX|BS_LEFT",WS_VISIBLE | WS_CHILD | BS_GROUPBOX | BS_LEFT,
- 520, 340, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
+ 520, 340, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
hbtn[25] = CreateWindow(
"BUTTON","BS_GROUPBOX|BS_RIGHT|BS_BOTTOM",WS_VISIBLE | WS_CHILD | BS_GROUPBOX | BS_BOTTOM | BS_RIGHT,
- 300, 340, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLong(hWnd, GWL_HINSTANCE),NULL);
+ 300, 340, 200, 60, hWnd, NULL, (HINSTANCE) GetWindowLongPtr(hWnd, GWL_HINSTANCE),NULL);
while(GetMessage(&msg, NULL, 0, 0))
{
UINT Timer = 1;
-static BOOL CALLBACK DialogFunc(HWND,UINT,WPARAM,LPARAM);
-static VOID CALLBACK TimerProc(HWND,UINT,UINT,DWORD);
+static INT_PTR CALLBACK DialogFunc(HWND,UINT,WPARAM,LPARAM);
+static VOID CALLBACK TimerProc(HWND,UINT,UINT_PTR,DWORD);
INT WINAPI WinMain (HINSTANCE hinst, HINSTANCE hinstPrev, LPSTR lpCmdLine, INT nCmdShow)
}
return FALSE;
}
-static VOID CALLBACK TimerProc (HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime)
+static VOID CALLBACK TimerProc (HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
{
CHAR text [20];
SYSTEMTIME lt;
xSize, /* nWidth */
20, /* nHeight */
g_hwnd,
- (HMENU) id,
+ LongToHandle(id),
g_hInst,
NULL
);
xSize, /* nWidth */
20, /* nHeight */
g_hwnd,
- (HMENU) id,
+ LongToHandle(id),
g_hInst,
NULL
);
<directory name="Imagelistviewer">
<xi:include href="Imagelistviewer/imagelistviewer.rbuild" />
</directory>
-
+
<!-- fixme: iptest -->
<directory name="isotest">
<directory name="mktime">
<xi:include href="mktime/mktime.rbuild" />
</directory>
- <directory name="mmixer_test">
- <xi:include href="mmixer_test/mmixer_test.rbuild" />
- </directory>
-
<directory name="moztest">
<xi:include href="moztest/moztest.rbuild" />
</directory>
xSize, /* nWidth */
20, /* nHeight */
g_hwnd,
- (HMENU) id,
+ (HMENU)(ULONG_PTR)id,
g_hInst,
NULL
);
xSize, // nWidth
20, // nHeight
g_hwnd,
- (HMENU) id,
+ (HMENU)(ULONG_PTR) id,
g_hInst,
NULL
);
/*---------------------------------------------------------------------------
**
*/
-void OUTPUT_HexDword(DWORD dw)
+void OUTPUT_HexDword(ULONG_PTR dw)
{
char buffer[32];
sprintf(buffer, "0x%lX",dw);
else
{
OUTPUT_Line("Alloced Handle: ");
- OUTPUT_HexDword((DWORD)hMem);
+ OUTPUT_HexDword((ULONG_PTR)hMem);
OUTPUT_Line("ReAlloced Handle: ");
- OUTPUT_HexDword((DWORD)hReAlloced);
+ OUTPUT_HexDword((ULONG_PTR)hReAlloced);
if (hMem == hReAlloced)
{
OUTPUT_Line("GlobalReAlloc returned the same pointer. The documentation states that this is wrong, but Windows NT works this way.");
else
{
OUTPUT_Line("Alloced Handle: ");
- OUTPUT_HexDword((DWORD)hMem);
+ OUTPUT_HexDword((ULONG_PTR)hMem);
OUTPUT_Line("ReAlloced Handle: ");
- OUTPUT_HexDword((DWORD)hReAlloced);
+ OUTPUT_HexDword((ULONG_PTR)hReAlloced);
if (hMem != hReAlloced)
{
OUTPUT_Line("GlobalReAlloc returned a different.");
else
{
OUTPUT_Line("Alloced Handle: ");
- OUTPUT_HexDword((DWORD)hMem);
+ OUTPUT_HexDword((ULONG_PTR)hMem);
OUTPUT_Line("ReAlloced Handle: ");
- OUTPUT_HexDword((DWORD)hReAlloced);
+ OUTPUT_HexDword((ULONG_PTR)hReAlloced);
pMem = GlobalLock(hReAlloced);
hMem = hReAlloced;
else
{
OUTPUT_Line("Alloced Handle: ");
- OUTPUT_HexDword((DWORD)hMem);
+ OUTPUT_HexDword((ULONG_PTR)hMem);
OUTPUT_Line("ReAlloced Handle: ");
- OUTPUT_HexDword((DWORD)hReAlloced);
+ OUTPUT_HexDword((ULONG_PTR)hReAlloced);
if (hMem != hReAlloced)
{
OUTPUT_Line("GlobalReAlloc returned a different block.");
OUTPUT_Result(result);
OUTPUT_Line("Pointer from handle: ");
- OUTPUT_HexDword((DWORD)GlobalLock(hMem));
+ OUTPUT_HexDword((ULONG_PTR)GlobalLock(hMem));
OUTPUT_Line("Testing after a lock");
OUTPUT_Line("Testing for a lock of 1");
if (0 != hMem)
{
OUTPUT_Line("Allocation handle: ");
- OUTPUT_HexDword((DWORD)hMem);
+ OUTPUT_HexDword((ULONG_PTR)hMem);
OUTPUT_Line("Testing for a discarded flag");
uFlags = GlobalFlags(hMem);
if (0 != (uFlags & GMEM_DISCARDED)) /*discarded*/
{
OUTPUT_Line("Allocation handle: ");
- OUTPUT_HexDword((DWORD)hMem);
+ OUTPUT_HexDword((ULONG_PTR)hMem);
OUTPUT_Line("Testing initial allocation");
OUTPUT_Line("Testing for non-discarded and lock of 0");
OUTPUT_Result(result);
OUTPUT_Line("Pointer from handle: ");
- OUTPUT_HexDword((DWORD)GlobalLock(hMem));
+ OUTPUT_HexDword((ULONG_PTR)GlobalLock(hMem));
OUTPUT_Line("Testing after a lock");
OUTPUT_Line("Testing for non-discarded and lock of 0");
uFlags = GlobalFlags(hMem);
{
OUTPUT_Line("Allocation handle: ");
- OUTPUT_HexDword((DWORD)hMem);
+ OUTPUT_HexDword((ULONG_PTR)hMem);
hTest = GlobalHandle(hMem);
if (hMem == hTest)
else
{
OUTPUT_Line("GlobalHandle returned:");
- OUTPUT_HexDword((DWORD)hTest);
+ OUTPUT_HexDword((ULONG_PTR)hTest);
subtest = TEST_CombineStatus(subtest, FAILED);
}
{
OUTPUT_Line("Allocation handle: ");
- OUTPUT_HexDword((DWORD)hMem);
+ OUTPUT_HexDword((ULONG_PTR)hMem);
pMem = GlobalLock(hMem);
hTest = GlobalHandle(pMem);
if (hMem == hTest)
else
{
OUTPUT_Line("GlobalHandle returned:");
- OUTPUT_HexDword((DWORD)hTest);
+ OUTPUT_HexDword((ULONG_PTR)hTest);
subtest = TEST_CombineStatus(subtest, FAILED);
}
if (0 != hMem)
{
OUTPUT_Line("Allocation handle: ");
- OUTPUT_HexDword((DWORD)hMem);
+ OUTPUT_HexDword((ULONG_PTR)hMem);
hTest = GlobalDiscard(hMem);
if (0 == hTest)
while (offset < (size & ~15))
{
- ptr = (unsigned char*)((ULONG)buffer + offset);
+ ptr = (unsigned char*)((ULONG_PTR)buffer + offset);
printf("%08lx %02hx %02hx %02hx %02hx %02hx %02hx %02hx %02hx-%02hx %02hx %02hx %02hx %02hx %02hx %02hx %02hx",
offset,
ptr[0],
offset += 16;
}
- ptr = (unsigned char*)((ULONG)buffer + offset);
+ ptr = (unsigned char*)((ULONG_PTR)buffer + offset);
if (offset < size)
{
printf("%08lx ", offset);
if( argc == 2 ) {
#ifdef WIN64
- file_map = (void *)atoi64(argv[1]);
+ file_map = (void *)_atoi64(argv[1]);
#else
file_map = (void *)UlongToPtr(atoi(argv[1]));
#endif
mcs.y = mcs.cy = CW_USEDEFAULT;
mcs.style = MDIS_ALLCHILDSTYLES;
- hChild = (HWND)SendMessage(hMDIClient, WM_MDICREATE, 0, (LONG)&mcs);
+ hChild = (HWND)SendMessage(hMDIClient, WM_MDICREATE, 0, (LPARAM)&mcs);
if(!hChild)
{
MessageBox(hMDIClient, "MDI Child creation failed.", "Oh Oh...",
printf("Opening MIDI output #0\n");
Result = midiOutOpen(&Handle, 0, 0, 0, CALLBACK_NULL);
- printf("Result == %d Handle == %d\n", Result, (int)Handle);
+ printf("Result == %d Handle == %x\n", Result, Handle);
// play something:
midiOutShortMsg(Handle, 0x007f3090);
+++ /dev/null
-<?xml version="1.0"?>
-<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
-<module name="mmixer_test" type="win32cui" baseaddress="${BASEADDRESS_CONTROL}" installbase="system32" installname="mmixer_test.exe">
- <include base="ReactOS">include/reactos/libs/sound</include>
- <include base="mmixer"></include>
- <library>advapi32</library>
- <library>setupapi</library>
- <library>kernel32</library>
- <library>winmm</library>
- <library>mmixer</library>
- <library>ksuser</library>
- <file>test.c</file>
-</module>
\ No newline at end of file
+++ /dev/null
-#include <windows.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <setupapi.h>
-#include <ksmedia.h>
-#include <mmsystem.h>
-#include <mmreg.h>
-#include "mmixer.h"
-
-MIXER_CONTEXT MixerContext;
-GUID CategoryGuid = {STATIC_KSCATEGORY_AUDIO};
-
-PVOID Alloc(ULONG NumBytes)
-{
- //printf("Alloc: %lu\n", NumBytes);
- return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, NumBytes);
-}
-
-MIXER_STATUS
-Close(HANDLE hDevice)
-{
- //printf("Close: Handle %p\n", hDevice);
- if (CloseHandle(hDevice))
- return MM_STATUS_SUCCESS;
- else
- return MM_STATUS_UNSUCCESSFUL;
-}
-
-VOID
-Free(PVOID Block)
-{
- //printf("Free: %p\n", Block);
- HeapFree(GetProcessHeap(), 0, Block);
-}
-
-VOID
-Copy(PVOID Src, PVOID Dst, ULONG NumBytes)
-{
- //printf("Copy: Src %p Dst %p NumBytes %lu\n", Src, Dst, NumBytes);
- CopyMemory(Src, Dst, NumBytes);
-}
-
-MIXER_STATUS
-Open(
- IN LPWSTR DevicePath,
- OUT PHANDLE hDevice)
-{
- DevicePath[1] = L'\\';
- *hDevice = CreateFileW(DevicePath,
- GENERIC_READ | GENERIC_WRITE,
- 0,
- NULL,
- OPEN_EXISTING,
- FILE_FLAG_OVERLAPPED,
- NULL);
- if (*hDevice == INVALID_HANDLE_VALUE)
- {
- //wprintf(L" Failed to open %s Error %lu\n", DevicePath, GetLastError());
- return MM_STATUS_UNSUCCESSFUL;
- }
- wprintf(L"Open: %s hDevice %p\n", DevicePath, *hDevice);
-
- return MM_STATUS_SUCCESS;
-}
-
-MIXER_STATUS
-Control(
- IN HANDLE hMixer,
- IN ULONG dwIoControlCode,
- IN PVOID lpInBuffer,
- IN ULONG nInBufferSize,
- OUT PVOID lpOutBuffer,
- ULONG nOutBufferSize,
- PULONG lpBytesReturned)
-{
- OVERLAPPED Overlapped;
- BOOLEAN IoResult;
- DWORD Transferred = 0;
-
- //printf("hMixer %p dwIoControlCode %lx lpInBuffer %p nInBufferSize %lu lpOutBuffer %p nOutBufferSize %lu lpBytesReturned %p\n",
- // hMixer, dwIoControlCode, lpInBuffer, nInBufferSize, lpOutBuffer, nOutBufferSize, lpBytesReturned);
-
- /* Overlapped I/O is done here - this is used for waiting for completion */
- ZeroMemory(&Overlapped, sizeof(OVERLAPPED));
- Overlapped.hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
-
- if ( ! Overlapped.hEvent )
- return MM_STATUS_NO_MEMORY;
-
- /* Talk to the device */
- IoResult = DeviceIoControl(hMixer,
- dwIoControlCode,
- lpInBuffer,
- nInBufferSize,
- lpOutBuffer,
- nOutBufferSize,
- &Transferred,
- &Overlapped);
-
- /* If failure occurs, make sure it's not just due to the overlapped I/O */
- if ( ! IoResult )
- {
- if ( GetLastError() != ERROR_IO_PENDING )
- {
- CloseHandle(Overlapped.hEvent);
-
- //printf("Control: Failed with %lu Transferred %lu\n", GetLastError(), Transferred);
-
- if (GetLastError() == ERROR_MORE_DATA || GetLastError() == ERROR_INSUFFICIENT_BUFFER)
- {
- if ( lpBytesReturned )
- *lpBytesReturned = Transferred;
- return MM_STATUS_MORE_ENTRIES;
- }
-
- return MM_STATUS_UNSUCCESSFUL;
- }
- }
-
- /* Wait for the I/O to complete */
- IoResult = GetOverlappedResult(hMixer,
- &Overlapped,
- &Transferred,
- TRUE);
-
- /* Don't need this any more */
- CloseHandle(Overlapped.hEvent);
-
- if ( ! IoResult )
- return MM_STATUS_UNSUCCESSFUL;
-
- //printf("Transferred %lu bytes in Sync overlapped I/O\n", Transferred);
-
- if ( lpBytesReturned )
- *lpBytesReturned = Transferred;
-
- return MM_STATUS_SUCCESS;
-}
-
-MIXER_STATUS
-Enum(
- IN PVOID EnumContext,
- IN ULONG DeviceIndex,
- OUT LPWSTR * DeviceName,
- OUT PHANDLE OutHandle,
- OUT PHANDLE OutKey)
-{
- SP_DEVICE_INTERFACE_DATA InterfaceData;
- SP_DEVINFO_DATA DeviceData;
- PSP_DEVICE_INTERFACE_DETAIL_DATA_W DetailData;
- BOOL Result;
- DWORD Length;
- MIXER_STATUS Status;
-
- //printf("Enum EnumContext %p DeviceIndex %lu OutHandle %p\n", EnumContext, DeviceIndex, OutHandle);
-
- InterfaceData.cbSize = sizeof(InterfaceData);
- InterfaceData.Reserved = 0;
-
- Result = SetupDiEnumDeviceInterfaces(EnumContext,
- NULL,
- &CategoryGuid,
- DeviceIndex,
- &InterfaceData);
-
- if (!Result)
- {
- if (GetLastError() == ERROR_NO_MORE_ITEMS)
- {
- printf("LastDevice\n");
- return MM_STATUS_NO_MORE_DEVICES;
- }
- printf("SetupDiEnumDeviceInterfaces failed with %lu\n", GetLastError());
- return MM_STATUS_UNSUCCESSFUL;
- }
-
- Length = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA_W) + MAX_PATH * sizeof(WCHAR);
- DetailData = (PSP_DEVICE_INTERFACE_DETAIL_DATA_W)HeapAlloc(GetProcessHeap(),
- 0,
- Length);
- DetailData->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA_W);
- DeviceData.cbSize = sizeof(DeviceData);
- DeviceData.Reserved = 0;
-
- Result = SetupDiGetDeviceInterfaceDetailW(EnumContext,
- &InterfaceData,
- DetailData,
- Length,
- NULL,
- &DeviceData);
-
- if (!Result)
- {
- printf("SetupDiGetDeviceInterfaceDetailW failed with %lu\n", GetLastError());
- return MM_STATUS_UNSUCCESSFUL;
- }
-
-
- *OutKey = SetupDiOpenDeviceInterfaceRegKey(EnumContext, &InterfaceData, 0, KEY_READ);
- if ((HKEY)*OutKey == INVALID_HANDLE_VALUE)
- {
- printf("SetupDiOpenDeviceInterfaceRegKey failed with %lx\n", GetLastError());
- HeapFree(GetProcessHeap(), 0, DetailData);
- return MM_STATUS_UNSUCCESSFUL;
- }
-
- Status = Open(DetailData->DevicePath, OutHandle);
-
- if (Status != MM_STATUS_SUCCESS)
- {
- RegCloseKey((HKEY)*OutKey);
- HeapFree(GetProcessHeap(), 0, DetailData);
- return Status;
- }
-
- *DeviceName = (LPWSTR)HeapAlloc(GetProcessHeap(), 0, (wcslen(DetailData->DevicePath)+1) * sizeof(WCHAR));
- if (*DeviceName == NULL)
- {
- CloseHandle(*OutHandle);
- RegCloseKey((HKEY)*OutKey);
- HeapFree(GetProcessHeap(), 0, DetailData);
- return MM_STATUS_NO_MEMORY;
- }
-
- wcscpy(*DeviceName, DetailData->DevicePath);
- HeapFree(GetProcessHeap(), 0, DetailData);
-
- return Status;
-}
-
-MIXER_STATUS
-QueryKeyValue(
- IN HANDLE hKey,
- IN LPWSTR KeyName,
- OUT PVOID * ResultBuffer,
- OUT PULONG ResultLength,
- OUT PULONG KeyType)
-{
- if (RegQueryValueExW((HKEY)hKey, KeyName, NULL, KeyType, NULL, ResultLength) == ERROR_FILE_NOT_FOUND)
- return MM_STATUS_UNSUCCESSFUL;
-
- *ResultBuffer = HeapAlloc(GetProcessHeap(), 0, *ResultLength);
- if (*ResultBuffer == NULL)
- return MM_STATUS_NO_MEMORY;
-
- if (RegQueryValueExW((HKEY)hKey, KeyName, NULL, KeyType, *ResultBuffer, ResultLength) != ERROR_SUCCESS)
- {
- HeapFree(GetProcessHeap(), 0, *ResultBuffer);
- return MM_STATUS_UNSUCCESSFUL;
- }
- return MM_STATUS_SUCCESS;
-}
-
-MIXER_STATUS
-OpenKey(
- IN HANDLE hKey,
- IN LPWSTR SubKey,
- IN ULONG DesiredAccess,
- OUT PHANDLE OutKey)
-{
- if (RegOpenKeyExW((HKEY)hKey, SubKey, 0, DesiredAccess, (PHKEY)OutKey) == ERROR_SUCCESS)
- return MM_STATUS_SUCCESS;
-
- return MM_STATUS_UNSUCCESSFUL;
-}
-
-MIXER_STATUS
-CloseKey(
- IN HANDLE hKey)
-{
- RegCloseKey((HKEY)hKey);
- return MM_STATUS_SUCCESS;
-}
-
-
-int main(int argc, char**argv)
-{
- MIXER_STATUS Status;
- HDEVINFO DeviceHandle;
- MIXERCAPSW MixCaps1, MixCaps2;
- ULONG Index, SubIndex;
- HANDLE hMixer2;
- HMIXER hMixer1;
- MIXERLINEW MixerLine1, MixerLine2;
- MIXERLINECONTROLSW Controls1, Controls2;
-
- ZeroMemory(&MixerContext, sizeof(MIXER_CONTEXT));
-
- DeviceHandle = SetupDiGetClassDevs(&CategoryGuid,
- NULL,
- NULL,
- DIGCF_DEVICEINTERFACE/*|DIGCF_PRESENT */);
- if (DeviceHandle == INVALID_HANDLE_VALUE)
- {
- printf("SetupDiGetClassDevs failed with %lx\n", GetLastError());
- return 0;
- }
-
- printf("DeviceHandle %p\n", DeviceHandle);
-
- MixerContext.SizeOfStruct = sizeof(MIXER_CONTEXT);
- MixerContext.Alloc = Alloc;
- MixerContext.Close = Close;
- MixerContext.Control = Control;
- MixerContext.Copy = Copy;
- MixerContext.Free = Free;
- MixerContext.Open = Open;
- MixerContext.OpenKey = OpenKey;
- MixerContext.CloseKey = CloseKey;
- MixerContext.QueryKeyValue = QueryKeyValue;
-
- Status = MMixerInitialize(&MixerContext, Enum, (PVOID)DeviceHandle);
-
- printf("Status %x\n", Status);
- printf("NumberOfMixers %lu mixerGetNumDevs %u\n", MMixerGetCount(&MixerContext), mixerGetNumDevs());
-
- for(Index = 0; Index < MMixerGetCount(&MixerContext); Index++)
- {
- mixerGetDevCapsW(Index, &MixCaps1, sizeof(MIXERCAPSW));
- wprintf(L"WINM: cDestination %u fdwSupport %lx szPname %s vDriverVersion %u wMid %x wPid %x\n", MixCaps1.cDestinations, MixCaps1.fdwSupport, MixCaps1.szPname, MixCaps1.vDriverVersion, MixCaps1.wMid, MixCaps1.wPid);
- MMixerGetCapabilities(&MixerContext, Index, &MixCaps2);
- wprintf(L"MMIX: cDestination %u fdwSupport %lx szPname %s vDriverVersion %u wMid %x wPid %x\n", MixCaps2.cDestinations, MixCaps2.fdwSupport, MixCaps2.szPname, MixCaps2.vDriverVersion, MixCaps2.wMid, MixCaps2.wPid);
-
- mixerOpen(&hMixer1, Index, 0, 0, MIXER_OBJECTF_HMIXER);
- MMixerOpen(&MixerContext, Index, NULL, NULL, &hMixer2);
-
- ZeroMemory(&MixerLine1, sizeof(MIXERLINEW));
- ZeroMemory(&MixerLine2, sizeof(MIXERLINEW));
- MixerLine1.cbStruct = sizeof(MIXERLINEW);
- MixerLine2.cbStruct = sizeof(MIXERLINEW);
- mixerGetLineInfoW((HMIXEROBJ)hMixer1, &MixerLine1, MIXER_GETLINEINFOF_DESTINATION);
- MMixerGetLineInfo(&MixerContext, hMixer2, MIXER_GETLINEINFOF_DESTINATION, &MixerLine2);
-
- wprintf(L"WINM: dwDestination %lx dwSource %lx dwLineID %lx dwUser %lx dwComponentType %lx cChannels %lx cConnections %lx cControls %lx szShortName %s szName %s\n\n",
- MixerLine1.dwDestination, MixerLine1.dwSource, MixerLine1.dwLineID, MixerLine1.dwUser, MixerLine1.dwComponentType, MixerLine1.cChannels, MixerLine1.cConnections, MixerLine1.cControls, MixerLine1.szShortName, MixerLine1.szName);
-
- wprintf(L"MMIX: dwDestination %lx dwSource %lx dwLineID %lx dwUser %lx dwComponentType %lx cChannels %lx cConnections %lx cControls %lx szShortName %s szName %s\n\n",
- MixerLine2.dwDestination, MixerLine2.dwSource, MixerLine2.dwLineID, MixerLine2.dwUser, MixerLine2.dwComponentType, MixerLine2.cChannels, MixerLine2.cConnections, MixerLine2.cControls, MixerLine2.szShortName, MixerLine2.szName);
-
- Controls1.cbStruct = sizeof(MIXERLINECONTROLSW);
- Controls2.cbStruct = sizeof(MIXERLINECONTROLSW);
-
- Controls1.cbmxctrl = sizeof(MIXERCONTROL);
- Controls2.cbmxctrl = sizeof(MIXERCONTROL);
-
- Controls1.cControls = MixerLine1.cControls;
- Controls2.cControls = MixerLine2.cControls;
-
- Controls1.dwLineID = MixerLine1.dwLineID;
- Controls2.dwLineID = MixerLine2.dwLineID;
-
-
-
- Controls1.pamxctrl = (LPMIXERCONTROLW)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(MIXERCONTROLW) * Controls1.cControls);
- Controls2.pamxctrl = (LPMIXERCONTROLW)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(MIXERCONTROLW) * Controls2.cControls);
-
- for(SubIndex = 0; SubIndex < Controls1.cControls; SubIndex++)
- Controls1.pamxctrl[SubIndex].cbStruct = sizeof(MIXERCONTROLW);
-
- for(SubIndex = 0; SubIndex < Controls2.cControls; SubIndex++)
- Controls2.pamxctrl[SubIndex].cbStruct = sizeof(MIXERCONTROLW);
-
- mixerGetLineControlsW((HMIXEROBJ)hMixer1, &Controls1, MIXER_GETLINECONTROLSF_ALL);
- MMixerGetLineControls(&MixerContext, hMixer2, MIXER_GETLINECONTROLSF_ALL, &Controls2);
-
- wprintf(L"----------------------------------------\n");
- for(SubIndex = 0; SubIndex < Controls1.cControls || SubIndex < Controls2.cControls; SubIndex++)
- {
- if (SubIndex < Controls1.cControls)
- {
- wprintf(L"WINM: Index %d dwControlID %lx dwControlType %lx fdwControl %lx cMultipleItems %lx szName %s szShortName %s \n", SubIndex, Controls1.pamxctrl[SubIndex].dwControlID, Controls1.pamxctrl[SubIndex].dwControlType, Controls1.pamxctrl[SubIndex].fdwControl, Controls1.pamxctrl[SubIndex].cMultipleItems, Controls1.pamxctrl[SubIndex].szName, Controls1.pamxctrl[SubIndex].szShortName);
- }
-
- if (SubIndex < Controls2.cControls)
- {
- wprintf(L"MMIX: Index %d dwControlID %lx dwControlType %lx fdwControl %lx cMultipleItems %lx szName %s szShortName %s \n", SubIndex, Controls2.pamxctrl[SubIndex].dwControlID, Controls2.pamxctrl[SubIndex].dwControlType, Controls2.pamxctrl[SubIndex].fdwControl, Controls2.pamxctrl[SubIndex].cMultipleItems, Controls2.pamxctrl[SubIndex].szName, Controls2.pamxctrl[SubIndex].szShortName);
- }
-
- }
- wprintf(L"----------------------------------------\n");
-
-
- wprintf(L"=======================\n");
- }
- return 0;
-}
HDC hDC;
RECT Client;
HBRUSH Brush;
- DWORD Ret;
+ DWORD_PTR Ret;
static COLORREF Colors[] =
{
fprintf( stderr, "%lu: Starting\n", GetCurrentProcessId() );
if( argc == 2 ) {
- h_process = (HANDLE)atoi(argv[1]);
+ h_process = (HANDLE)(ULONG_PTR)atoi(argv[1]);
} else {
if( !DuplicateHandle( GetCurrentProcess(),
GetCurrentProcess(),
memset( &si, 0, sizeof( si ) );
memset( &pi, 0, sizeof( pi ) );
- sprintf( cmdline, "%s %lu", argv[0], (DWORD)h_process );
+ sprintf( cmdline, "%s %x", argv[0], h_process );
if( !CreateProcess(NULL, cmdline, NULL, NULL, TRUE, 0, NULL, NULL,
&si, &pi ) ) {
fprintf( stderr, "%lu: Could not create child process.\n",
);
assert(hListBox != NULL);
- SetWindowLong(
- hListBox, GWL_ID, reinterpret_cast<LONG>(hListBox)
+ SetWindowLongPtr(
+ hListBox, GWL_ID, reinterpret_cast<LPARAM>(hListBox)
);
SNDMSG(hListBox, LB_ADDSTRING, 0,
reinterpret_cast<LPMEASUREITEMSTRUCT>(lParam);
assert(lpmis != NULL);
- if (lpmis->CtlID == reinterpret_cast<UINT>(hListBox))
+ if (lpmis->CtlID == reinterpret_cast<UINT_PTR>(hListBox))
{
lpmis->itemHeight = 150;
return TRUE;
reinterpret_cast<LPDRAWITEMSTRUCT>(lParam);
assert(lpdis != NULL);
- if (lpdis->CtlID == reinterpret_cast<UINT>(hListBox))
+ if (lpdis->CtlID == reinterpret_cast<UINT_PTR>(hListBox))
{
SaveDC(lpdis->hDC);
#if 0
printf("GetWindowTextA returned Ansi string \"%s\"\n", WindowTextA);
printf("\n");
- SavedWndProcW = (WNDPROC) GetWindowLongW(hWnd, GWL_WNDPROC);
+ SavedWndProcW = (WNDPROC) GetWindowLongPtrW(hWnd, GWL_WNDPROC);
printf("GetWindowLongW returned 0x%p\n", SavedWndProcW);
- SavedWndProcA = (WNDPROC) GetWindowLongA(hWnd, GWL_WNDPROC);
+ SavedWndProcA = (WNDPROC) GetWindowLongPtrA(hWnd, GWL_WNDPROC);
printf("GetWindowLongA returned 0x%p\n", SavedWndProcA);
printf("\n");
printf("Subclassing window using SetWindowLongW, new WndProc 0x%p\n", UnicodeSubclassProc);
- SetWindowLongW(hWnd, GWL_WNDPROC, (LONG) UnicodeSubclassProc);
+ SetWindowLongPtrW(hWnd, GWL_WNDPROC, (LPARAM) UnicodeSubclassProc);
printf("After subclass, IsWindowUnicode %s, WndProcA 0x%lx, WndProcW 0x%lx\n",
- IsWindowUnicode(hWnd) ? "TRUE" : "FALSE", GetWindowLongA(hWnd, GWL_WNDPROC),
- GetWindowLongW(hWnd, GWL_WNDPROC));
+ IsWindowUnicode(hWnd) ? "TRUE" : "FALSE", GetWindowLongPtrA(hWnd, GWL_WNDPROC),
+ GetWindowLongPtrW(hWnd, GWL_WNDPROC));
printf("Calling GetWindowTextW\n");
if (! GetWindowTextW(hWnd, WindowTextW, sizeof(WindowTextW) / sizeof(WindowTextW[0])))
printf("\n");
printf("Subclassing window using SetWindowLongA, new WndProc 0x%p\n", AnsiSubclassProc);
- SetWindowLongA(hWnd, GWL_WNDPROC, (LONG) AnsiSubclassProc);
+ SetWindowLongPtrA(hWnd, GWL_WNDPROC, (LPARAM) AnsiSubclassProc);
printf("After subclass, IsWindowUnicode %s, WndProcA 0x%lx, WndProcW 0x%lx\n",
- IsWindowUnicode(hWnd) ? "TRUE" : "FALSE", GetWindowLongA(hWnd, GWL_WNDPROC),
- GetWindowLongW(hWnd, GWL_WNDPROC));
+ IsWindowUnicode(hWnd) ? "TRUE" : "FALSE", GetWindowLongPtrA(hWnd, GWL_WNDPROC),
+ GetWindowLongPtrW(hWnd, GWL_WNDPROC));
printf("Calling GetWindowTextW\n");
if (! GetWindowTextW(hWnd, WindowTextW, sizeof(WindowTextW) / sizeof(WindowTextW[0])))
Sleep(100);x++;
if(x>100 && GetThreadContext(thread, &context))
{
+#ifdef _M_AMD64
+ printf("EIP: %lx\n", context.Rip);
+#else
printf("EIP: %lx\n", context.Eip);
+#endif
printf("Calling resumethread ... \n");
ResumeThread(thread);
}
{
ULONG s;
- printf("Thread %ld running\n", (DWORD)param);
+ printf("Thread %x running\n", param);
s = nr = ((nr * 1103515245) + 12345) & 0x7fffffff;
s = s % 10;
printf("s %ld\n", s);
Sleep(s);
- printf("Thread %ld finished\n", (DWORD)param);
+ printf("Thread %x finished\n", param);
return 0;
}
ThreadHandle[i] = CreateThread(NULL,
0,
thread_main1,
- (LPVOID)i,
+ (LPVOID)(ULONG_PTR)i,
CREATE_SUSPENDED,
&id);
{
PTESTINFO Info = (PTESTINFO)Param;
- _tprintf(_T("[%d]TimerCallback(0x%x, %d) called (%d)\n"), (int)Info->Test->id, (int)Info->hTimer, (int)Fired, --Info->secsleft);
+ _tprintf(_T("[%d]TimerCallback(0x%x, %d) called (%d)\n"), (int)Info->Test->id, Info->hTimer, (int)Fired, --Info->secsleft);
if(Info->secsleft == 0)
{
return;
}
- _tprintf(_T("[%d]CreateTimerQueueTimer() created timer 0x%x, countdown (%d sec)...\n"), (int)Info.Test->id, (int)Info.hTimer, (int)Info.secsleft);
+ _tprintf(_T("[%d]CreateTimerQueueTimer() created timer 0x%x, countdown (%d sec)...\n"), (int)Info.Test->id, Info.hTimer, (int)Info.secsleft);
}
/*******************************************************************************/
{
PTESTINFO Info = (PTESTINFO)Param;
- _tprintf(_T("[%d]TimerCallback(0x%x, %d) called (%d)\n"), (int)Info->Test->id, (int)Info->hTimer, (int)Fired, --Info->secsleft);
+ _tprintf(_T("[%d]TimerCallback(0x%x, %d) called (%d)\n"), (int)Info->Test->id, Info->hTimer, (int)Fired, --Info->secsleft);
if(Info->secsleft == 0)
{
return;
}
- _tprintf(_T("[%d]CreateTimerQueueTimer() created timer 0x%x, countdown (%d sec)...\n"), (int)Test->id, (int)Info.hTimer, (int)Info.secsleft);
+ _tprintf(_T("[%d]CreateTimerQueueTimer() created timer 0x%x, countdown (%d sec)...\n"), (int)Test->id, Info.hTimer, (int)Info.secsleft);
WaitForSingleObject(Info.Test2.hWaitEvent, INFINITE);
{
PTESTINFO Info = (PTESTINFO)Param;
- _tprintf(_T("[%d]TimerCallback(0x%x, %d) called (%d)\n"), (int)Info->Test->id, (int)Info->hTimer, (int)Fired, --Info->secsleft);
+ _tprintf(_T("[%d]TimerCallback(0x%x, %d) called (%d)\n"), (int)Info->Test->id, Info->hTimer, (int)Fired, --Info->secsleft);
if(Info->secsleft == 0)
{
return;
}
- _tprintf(_T("[%d]CreateTimerQueueTimer() created timer 0x%x, countdown (%d sec)...\n"), (int)Test->id, (int)Info.hTimer, (int)Info.secsleft);
+ _tprintf(_T("[%d]CreateTimerQueueTimer() created timer 0x%x, countdown (%d sec)...\n"), (int)Test->id, Info.hTimer, (int)Info.secsleft);
WaitForSingleObject(Info.Test3.hWaitEvent, INFINITE);
LRESULT CALLBACK WndSubclassProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
- WND_DATA *data = (WND_DATA*)GetWindowLong(hwnd, GWL_USERDATA);
+ WND_DATA *data = (WND_DATA*)GetWindowLongPtr(hwnd, GWL_USERDATA);
if(uMsg == WM_INPUTLANGCHANGE)
{
void SubclassWnd(HWND hWnd, WCHAR* Name)
{
WND_DATA *data = HeapAlloc(GetProcessHeap(), 0, sizeof(WND_DATA));
- data->OrigProc = (WNDPROC)SetWindowLong( hWnd, GWL_WNDPROC, (LONG)WndSubclassProc);
+ data->OrigProc = (WNDPROC)SetWindowLongPtr( hWnd, GWL_WNDPROC, (LONG_PTR)WndSubclassProc);
wcsncpy(data->WndName, Name, 25);
- SetWindowLong(hWnd, GWL_USERDATA, (LONG)data);
+ SetWindowLong(hWnd, GWL_USERDATA, (LONG_PTR)data);
return;
}
if (lpName)
{
wcsncpy(pItem->szName, lpName, MAX_PATH);
- }
+ }
if (lpRunCmd)
{
wcsncpy(pItem->szRunCmd, lpRunCmd, MAX_RUN_CMD);
(LPARAM)pTestItem,
IL_TEST,
HAS_CHILD);
- }
- }
- }
+ }
+ }
+ }
if (hRoot)
{
CAPTION "Test hierarchy"
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
- PUSHBUTTON "Select", IDOK, 202, 7, 50, 14
- PUSHBUTTON "Close", IDCANCEL, 202, 34, 50, 14
- CONTROL "", IDC_TREEVIEW, "SysTreeView32", WS_BORDER | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT, 7, 7, 189, 236
+ PUSHBUTTON "Select", IDOK, 202, 7, 50, 14
+ PUSHBUTTON "Close", IDCANCEL, 202, 34, 50, 14
+ CONTROL "", IDC_TREEVIEW, "SysTreeView32", WS_BORDER | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT, 7, 7, 189, 236
END
IDD_OPTIONS DIALOGEX 0, 0, 180, 100
(LPARAM)szTextCmd) != CB_ERR)
{
pInfo->lpCmdLine = (LPWSTR)SendMessage(hRunCmd,
- CB_GETITEMDATA,
- 0,
- 0);
+ CB_GETITEMDATA,
+ 0,
+ 0);
if (pInfo->lpCmdLine)
{
//
pInfo,
0,
NULL);
- }
- }
- }
-}
+ }
+ }
+ }
+ }
static VOID
AddTestToCombo(PMAIN_WND_INFO pInfo)
for (i = 0; i < cnt; i++)
{
lpExePath = (LPWSTR)SendMessage(hRunCmd,
- CB_GETITEMDATA,
- i,
- 0);
+ CB_GETITEMDATA,
+ i,
+ 0);
if (lpExePath)
{
HeapFree(GetProcessHeap(), 0, lpExePath);
for (i = StartResource; i <= EndResource; i++)
{
hIcon = (HICON)LoadImageW(hInstance,
- MAKEINTRESOURCEW(i),
- IMAGE_ICON,
- Width,
- Height,
- LR_DEFAULTCOLOR);
+ MAKEINTRESOURCEW(i),
+ IMAGE_ICON,
+ Width,
+ Height,
+ LR_DEFAULTCOLOR);
if (hIcon == NULL)
goto fail;
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
<module name="advapi32_winetest" type="win32cui" installbase="bin" installname="advapi32_winetest.exe" allowwarnings="true">
- <include base="advapi32_winetest">.</include>
+ <include base="advapi32_winetest">.</include>
<define name="__ROS_LONG64__" />
- <library>advapi32</library>
- <library>ntdll</library>
- <library>uuid</library>
- <library>ole32</library>
- <file>cred.c</file>
- <file>crypt.c</file>
- <file>crypt_lmhash.c</file>
- <file>crypt_md4.c</file>
- <file>crypt_md5.c</file>
- <file>crypt_sha.c</file>
- <file>eventlog.c</file>
- <file>lsa.c</file>
- <file>registry.c</file>
- <file>security.c</file>
- <file>service.c</file>
- <file>testlist.c</file>
+ <library>advapi32</library>
+ <library>ntdll</library>
+ <library>uuid</library>
+ <library>ole32</library>
+ <file>cred.c</file>
+ <file>crypt.c</file>
+ <file>crypt_lmhash.c</file>
+ <file>crypt_md4.c</file>
+ <file>crypt_md5.c</file>
+ <file>crypt_sha.c</file>
+ <file>lsa.c</file>
+ <file>registry.c</file>
+ <file>security.c</file>
+ <file>service.c</file>
+ <file>testlist.c</file>
</module>
result = pCryptCreateHash(hProv, CALG_SHA, 0, 0, &hHash);
ok (result, "%d\n", GetLastError());
if (!result) return;
- pCryptDestroyHash(hHash);
result = pCryptGenKey(hProv, CALG_RC4, 0, &hKey);
ok (result, "%d\n", GetLastError());
RegQueryInfoKey(hKey, NULL, NULL, NULL, pdwProvCount, pcbProvName,
NULL, NULL, NULL, NULL, NULL, NULL);
(*pcbProvName)++;
-
+
if (!(*pszProvName = LocalAlloc(LMEM_ZEROINIT, *pcbProvName)))
return FALSE;
ok(!strcmp(pszProvName, provider), "expected %s, got %s\n", pszProvName, provider);
ok(cbName==providerLen, "expected %d, got %d\n", cbName, providerLen);
- LocalFree(pszProvName);
LocalFree(provider);
}
LPSTR szName;
DWORD cbName;
BOOL ret = FALSE;
-
+
if (RegOpenKey(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Cryptography\\Defaults\\Provider Types", &hKey))
return FALSE;
-
+
if (RegQueryInfoKey(hKey, NULL, NULL, NULL, pdwTypeCount, &cbName, NULL,
NULL, NULL, NULL, NULL, NULL))
goto cleanup;
cbName++;
-
+
if (!(szName = LocalAlloc(LMEM_ZEROINIT, cbName)))
goto cleanup;
-
+
while (!RegEnumKeyEx(hKey, *pdwIndex, szName, &cbName, NULL, NULL, NULL, NULL))
{
cbName++;
ch = szName + strlen(szName);
- /* Convert "Type 000" to 0, etc/ */
- *pdwProvType = *(--ch) - '0';
- *pdwProvType += (*(--ch) - '0') * 10;
- *pdwProvType += (*(--ch) - '0') * 100;
-
+ /* Convert "Type 000" to 0, etc/ */
+ *pdwProvType = *(--ch) - '0';
+ *pdwProvType += (*(--ch) - '0') * 10;
+ *pdwProvType += (*(--ch) - '0') * 100;
+
if (RegOpenKey(hKey, szName, &hSubKey))
break;
-
+
if (!RegQueryValueEx(hSubKey, "TypeName", NULL, NULL, NULL, pcbTypeName))
{
if (!(*pszTypeName = LocalAlloc(LMEM_ZEROINIT, *pcbTypeName)))
ret = TRUE;
break;
}
-
+
LocalFree(*pszTypeName);
}
-
- RegCloseKey(hSubKey);
+
+ RegCloseKey(hSubKey);
(*pdwIndex)++;
}
cleanup:
RegCloseKey(hKey);
-
+
return ret;
}
LPSTR pszTypeName = NULL;
DWORD cbTypeName;
DWORD dwTypeCount;
-
+
/* actual values */
DWORD index = 0;
DWORD provType;
DWORD result;
DWORD notNull = 5;
DWORD notZeroFlags = 5;
-
+
if(!pCryptEnumProviderTypesA)
{
win_skip("CryptEnumProviderTypesA is not available\n");
- return;
+ return;
}
-
+
if (!FindProvTypesRegVals(&index, &dwProvType, &pszTypeName, &cbTypeName, &dwTypeCount))
{
- skip("Could not find provider types in registry\n");
- return;
+ skip("Could not find provider types in registry\n");
+ return;
}
-
+
/* check pdwReserved for NULL */
result = pCryptEnumProviderTypesA(index, ¬Null, 0, &provType, typeName, &typeNameSize);
ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
-
+
/* check dwFlags == zero */
result = pCryptEnumProviderTypesA(index, NULL, notZeroFlags, &provType, typeName, &typeNameSize);
ok(!result && GetLastError()==NTE_BAD_FLAGS, "expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
-
+
/* This test fails under Win2k SP4:
* result = TRUE, GetLastError() == 0xdeadbeef */
if (0)
{
- /* alloc provider type to half the size required
- * cbTypeName holds the size required */
- typeNameSize = cbTypeName / 2;
+ /* alloc provider type to half the size required
+ * cbTypeName holds the size required */
+ typeNameSize = cbTypeName / 2;
if (!(typeName = LocalAlloc(LMEM_ZEROINIT, typeNameSize)))
goto cleanup;
- SetLastError(0xdeadbeef);
- result = pCryptEnumProviderTypesA(index, NULL, 0, &provType, typeName, &typeNameSize);
+ SetLastError(0xdeadbeef);
+ result = pCryptEnumProviderTypesA(index, NULL, 0, &provType, typeName, &typeNameSize);
ok(!result && GetLastError()==ERROR_MORE_DATA, "expected 0/ERROR_MORE_DATA, got %d/%d\n",
- result, GetLastError());
-
- LocalFree(typeName);
+ result, GetLastError());
+
+ LocalFree(typeName);
}
-
+
/* loop through the provider types to get the number of provider types
* after loop ends, count should be dwTypeCount + 1 so subtract 1
* to get actual number of provider types */
;
typeCount--;
ok(typeCount==dwTypeCount, "expected %d, got %d\n", dwTypeCount, typeCount);
-
+
/* loop past the actual number of provider types to get the error
* ERROR_NO_MORE_ITEMS */
for (typeCount = 0; typeCount < dwTypeCount + 1; typeCount++)
result = pCryptEnumProviderTypesA(typeCount, NULL, 0, &provType, NULL, &typeNameSize);
ok(!result && GetLastError()==ERROR_NO_MORE_ITEMS, "expected ERROR_NO_MORE_ITEMS, got %d\n",
GetLastError());
-
+
/* check expected versus actual values returned */
result = pCryptEnumProviderTypesA(index, NULL, 0, &provType, NULL, &typeNameSize);
ok(result && typeNameSize==cbTypeName, "expected %d, got %d\n", cbTypeName, typeNameSize);
if (!(typeName = LocalAlloc(LMEM_ZEROINIT, typeNameSize)))
goto cleanup;
-
+
typeNameSize = 0xdeadbeef;
result = pCryptEnumProviderTypesA(index, NULL, 0, &provType, typeName, &typeNameSize);
ok(result, "expected TRUE, got %d\n", result);
ok(provType==dwProvType, "expected %d, got %d\n", dwProvType, provType);
if (pszTypeName)
- ok(!strcmp(pszTypeName, typeName), "expected %s, got %s\n", pszTypeName, typeName);
+ ok(!strcmp(pszTypeName, typeName), "expected %s, got %s\n", pszTypeName, typeName);
ok(typeNameSize==cbTypeName, "expected %d, got %d\n", cbTypeName, typeNameSize);
-
+
LocalFree(typeName);
cleanup:
LocalFree(pszTypeName);
ok(!strcmp(pszProvName, provName), "expected %s, got %s\n", pszProvName, provName);
ok(provNameSize==cbProvName, "expected %d, got %d\n", cbProvName, provNameSize);
- LocalFree(pszProvName);
LocalFree(provName);
}
RegCloseKey(key);
}
-#define key_length 16
-
-static const unsigned char key[key_length] =
- { 0xbf, 0xf6, 0x83, 0x4b, 0x3e, 0xa3, 0x23, 0xdd,
- 0x96, 0x78, 0x70, 0x8e, 0xa1, 0x9d, 0x3b, 0x40 };
-
-static void test_rc2_keylen(void)
-{
- struct KeyBlob
- {
- BLOBHEADER header;
- DWORD key_size;
- BYTE key_data[2048];
- } key_blob;
-
- HCRYPTPROV provider;
- HCRYPTKEY hkey = 0;
- BOOL ret;
-
- SetLastError(0xdeadbeef);
- ret = pCryptAcquireContextA(&provider, NULL, NULL,
- PROV_RSA_FULL, CRYPT_VERIFYCONTEXT);
- ok(ret, "CryptAcquireContext error %u\n", GetLastError());
- if (ret)
- {
- key_blob.header.bType = PLAINTEXTKEYBLOB;
- key_blob.header.bVersion = CUR_BLOB_VERSION;
- key_blob.header.reserved = 0;
- key_blob.header.aiKeyAlg = CALG_RC2;
- key_blob.key_size = sizeof(key);
- memcpy(key_blob.key_data, key, key_length);
-
- /* Importing a 16-byte key works with the default provider. */
- SetLastError(0xdeadbeef);
- ret = pCryptImportKey(provider, (BYTE*)&key_blob,
- sizeof(BLOBHEADER)+sizeof(DWORD)+key_blob.key_size,
- 0, CRYPT_IPSEC_HMAC_KEY, &hkey);
- /* CRYPT_IPSEC_HMAC_KEY is not supported on W2K and lower */
- todo_wine
- ok(ret ||
- broken(!ret && GetLastError() == NTE_BAD_FLAGS),
- "CryptImportKey error %08x\n", GetLastError());
-
- if (ret)
- pCryptDestroyKey(hkey);
- pCryptReleaseContext(provider, 0);
- }
-
- SetLastError(0xdeadbeef);
- ret = pCryptAcquireContextA(&provider, NULL, MS_DEF_PROV,
- PROV_RSA_FULL, CRYPT_VERIFYCONTEXT);
- ok(ret, "CryptAcquireContext error %08x\n", GetLastError());
-
- if (ret)
- {
- /* Importing a 16-byte key doesn't work with the base provider.. */
- SetLastError(0xdeadbeef);
- ret = pCryptImportKey(provider, (BYTE*)&key_blob,
- sizeof(BLOBHEADER)+sizeof(DWORD)+key_blob.key_size,
- 0, 0, &hkey);
- ok(!ret && (GetLastError() == NTE_BAD_DATA ||
- GetLastError() == NTE_BAD_LEN || /* Win7 */
- GetLastError() == NTE_BAD_TYPE || /* W2K */
- GetLastError() == NTE_PERM), /* Win9x, WinMe and NT4 */
- "unexpected error %08x\n", GetLastError());
- /* but importing an 56-bit (7-byte) key does.. */
- key_blob.key_size = 7;
- SetLastError(0xdeadbeef);
- ret = pCryptImportKey(provider, (BYTE*)&key_blob,
- sizeof(BLOBHEADER)+sizeof(DWORD)+key_blob.key_size,
- 0, 0, &hkey);
- ok(ret ||
- broken(!ret && GetLastError() == NTE_BAD_TYPE) || /* W2K */
- broken(!ret && GetLastError() == NTE_PERM), /* Win9x, WinMe and NT4 */
- "CryptAcquireContext error %08x\n", GetLastError());
- if (ret)
- pCryptDestroyKey(hkey);
- /* as does importing a 16-byte key with the base provider when
- * CRYPT_IPSEC_HMAC_KEY is specified.
- */
- key_blob.key_size = sizeof(key);
- SetLastError(0xdeadbeef);
- ret = pCryptImportKey(provider, (BYTE*)&key_blob,
- sizeof(BLOBHEADER)+sizeof(DWORD)+key_blob.key_size,
- 0, CRYPT_IPSEC_HMAC_KEY, &hkey);
- /* CRYPT_IPSEC_HMAC_KEY is not supported on W2K and lower */
- todo_wine
- ok(ret ||
- broken(!ret && GetLastError() == NTE_BAD_FLAGS),
- "CryptImportKey error %08x\n", GetLastError());
- if (ret)
- pCryptDestroyKey(hkey);
-
- pCryptReleaseContext(provider, 0);
- }
-
- key_blob.key_size = sizeof(key);
- SetLastError(0xdeadbeef);
- ret = pCryptAcquireContextA(&provider, NULL, NULL,
- PROV_RSA_FULL, CRYPT_VERIFYCONTEXT);
- ok(ret, "CryptAcquireContext error %08x\n", GetLastError());
-
- if (ret)
- {
- /* Importing a 16-byte key also works with the default provider when
- * CRYPT_IPSEC_HMAC_KEY is specified.
- */
- SetLastError(0xdeadbeef);
- ret = pCryptImportKey(provider, (BYTE*)&key_blob,
- sizeof(BLOBHEADER)+sizeof(DWORD)+key_blob.key_size,
- 0, CRYPT_IPSEC_HMAC_KEY, &hkey);
- todo_wine
- ok(ret ||
- broken(!ret && GetLastError() == NTE_BAD_FLAGS),
- "CryptImportKey error %08x\n", GetLastError());
- if (ret)
- pCryptDestroyKey(hkey);
-
- /* There is no apparent limit to the size of the input key when
- * CRYPT_IPSEC_HMAC_KEY is specified.
- */
- key_blob.key_size = sizeof(key_blob.key_data);
- SetLastError(0xdeadbeef);
- ret = pCryptImportKey(provider, (BYTE*)&key_blob,
- sizeof(BLOBHEADER)+sizeof(DWORD)+key_blob.key_size,
- 0, CRYPT_IPSEC_HMAC_KEY, &hkey);
- todo_wine
- ok(ret ||
- broken(!ret && GetLastError() == NTE_BAD_FLAGS),
- "CryptImportKey error %08x\n", GetLastError());
- if (ret)
- pCryptDestroyKey(hkey);
-
- pCryptReleaseContext(provider, 0);
- }
-}
-
START_TEST(crypt)
{
- init_function_pointers();
- if (pCryptAcquireContextA && pCryptReleaseContext)
- {
- test_rc2_keylen();
+ init_function_pointers();
+ if(pCryptAcquireContextA && pCryptReleaseContext) {
init_environment();
test_acquire_context();
test_incorrect_api_usage();
test_verify_sig();
test_machine_guid();
clean_up_environment();
- }
+ }
test_enum_providers();
test_enum_provider_types();
void (WINAPI *pA_SHAUpdate)(PSHA_CTX, const unsigned char *, UINT);
void (WINAPI *pA_SHAFinal)(PSHA_CTX, PULONG);
static const unsigned char test_buffer[] = "In our Life there's If"
- "In our beliefs there's Lie"
- "In our business there is Sin"
- "In our bodies, there is Die";
+ "In our beliefs there's Lie"
+ "In our business there is Sin"
+ "In our bodies, there is Die";
HMODULE hmod;
SHA_CTX ctx;
ULONG result[5];
+++ /dev/null
-/*
- * Unit tests for Event Logging functions
- *
- * Copyright (c) 2009 Paul Vriens
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#include <stdarg.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "winerror.h"
-#include "winnt.h"
-#include "winreg.h"
-#include "sddl.h"
-
-#include "wine/test.h"
-
-static BOOL (WINAPI *pCreateWellKnownSid)(WELL_KNOWN_SID_TYPE,PSID,PSID,DWORD*);
-static BOOL (WINAPI *pGetEventLogInformation)(HANDLE,DWORD,LPVOID,DWORD,LPDWORD);
-
-static BOOL (WINAPI *pGetComputerNameExA)(COMPUTER_NAME_FORMAT,LPSTR,LPDWORD);
-static BOOL (WINAPI *pWow64DisableWow64FsRedirection)(PVOID *);
-static BOOL (WINAPI *pWow64RevertWow64FsRedirection)(PVOID);
-
-static void init_function_pointers(void)
-{
- HMODULE hadvapi32 = GetModuleHandleA("advapi32.dll");
- HMODULE hkernel32 = GetModuleHandleA("kernel32.dll");
-
- pCreateWellKnownSid = (void*)GetProcAddress(hadvapi32, "CreateWellKnownSid");
- pGetEventLogInformation = (void*)GetProcAddress(hadvapi32, "GetEventLogInformation");
-
- pGetComputerNameExA = (void*)GetProcAddress(hkernel32, "GetComputerNameExA");
- pWow64DisableWow64FsRedirection = (void*)GetProcAddress(hkernel32, "Wow64DisableWow64FsRedirection");
- pWow64RevertWow64FsRedirection = (void*)GetProcAddress(hkernel32, "Wow64RevertWow64FsRedirection");
-}
-
-static void create_backup(const char *filename)
-{
- HANDLE handle;
-
- DeleteFileA(filename);
- handle = OpenEventLogA(NULL, "Application");
- BackupEventLogA(handle, filename);
- CloseEventLog(handle);
-
- todo_wine
- ok(GetFileAttributesA(filename) != INVALID_FILE_ATTRIBUTES, "Expected a backup file\n");
-}
-
-static void test_open_close(void)
-{
- HANDLE handle;
- BOOL ret;
-
- SetLastError(0xdeadbeef);
- ret = CloseEventLog(NULL);
- ok(!ret, "Expected failure\n");
- ok(GetLastError() == ERROR_INVALID_HANDLE ||
- GetLastError() == ERROR_NOACCESS, /* W2K */
- "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
-
- SetLastError(0xdeadbeef);
- handle = OpenEventLogA(NULL, NULL);
- ok(handle == NULL, "Didn't expect a handle\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
-
- SetLastError(0xdeadbeef);
- handle = OpenEventLogA("IDontExist", NULL);
- ok(handle == NULL, "Didn't expect a handle\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
-
- SetLastError(0xdeadbeef);
- handle = OpenEventLogA("IDontExist", "deadbeef");
- ok(handle == NULL, "Didn't expect a handle\n");
- ok(GetLastError() == RPC_S_SERVER_UNAVAILABLE ||
- GetLastError() == RPC_S_INVALID_NET_ADDR, /* Some Vista and Win7 */
- "Expected RPC_S_SERVER_UNAVAILABLE, got %d\n", GetLastError());
-
- /* This one opens the Application log */
- handle = OpenEventLogA(NULL, "deadbeef");
- ok(handle != NULL, "Expected a handle\n");
- ret = CloseEventLog(handle);
- ok(ret, "Expected success\n");
- /* Close a second time */
- SetLastError(0xdeadbeef);
- ret = CloseEventLog(handle);
- todo_wine
- {
- ok(!ret, "Expected failure\n");
- ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
- }
-
- /* Empty servername should be read as local server */
- handle = OpenEventLogA("", "Application");
- ok(handle != NULL, "Expected a handle\n");
- CloseEventLog(handle);
-
- handle = OpenEventLogA(NULL, "Application");
- ok(handle != NULL, "Expected a handle\n");
- CloseEventLog(handle);
-}
-
-static void test_info(void)
-{
- HANDLE handle;
- BOOL ret;
- DWORD needed;
- EVENTLOG_FULL_INFORMATION efi;
-
- if (!pGetEventLogInformation)
- {
- /* NT4 */
- win_skip("GetEventLogInformation is not available\n");
- return;
- }
- SetLastError(0xdeadbeef);
- ret = pGetEventLogInformation(NULL, 1, NULL, 0, NULL);
- ok(!ret, "Expected failure\n");
- ok(GetLastError() == ERROR_INVALID_LEVEL, "Expected ERROR_INVALID_LEVEL, got %d\n", GetLastError());
-
- SetLastError(0xdeadbeef);
- ret = pGetEventLogInformation(NULL, EVENTLOG_FULL_INFO, NULL, 0, NULL);
- ok(!ret, "Expected failure\n");
- ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
-
- handle = OpenEventLogA(NULL, "Application");
-
- SetLastError(0xdeadbeef);
- ret = pGetEventLogInformation(handle, EVENTLOG_FULL_INFO, NULL, 0, NULL);
- ok(!ret, "Expected failure\n");
- ok(GetLastError() == RPC_X_NULL_REF_POINTER, "Expected RPC_X_NULL_REF_POINTER, got %d\n", GetLastError());
-
- SetLastError(0xdeadbeef);
- ret = pGetEventLogInformation(handle, EVENTLOG_FULL_INFO, NULL, 0, &needed);
- ok(!ret, "Expected failure\n");
- ok(GetLastError() == RPC_X_NULL_REF_POINTER, "Expected RPC_X_NULL_REF_POINTER, got %d\n", GetLastError());
-
- SetLastError(0xdeadbeef);
- ret = pGetEventLogInformation(handle, EVENTLOG_FULL_INFO, (LPVOID)&efi, 0, NULL);
- ok(!ret, "Expected failure\n");
- ok(GetLastError() == RPC_X_NULL_REF_POINTER, "Expected RPC_X_NULL_REF_POINTER, got %d\n", GetLastError());
-
- SetLastError(0xdeadbeef);
- needed = 0xdeadbeef;
- efi.dwFull = 0xdeadbeef;
- ret = pGetEventLogInformation(handle, EVENTLOG_FULL_INFO, (LPVOID)&efi, 0, &needed);
- ok(!ret, "Expected failure\n");
- ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError());
- ok(needed == sizeof(EVENTLOG_FULL_INFORMATION), "Expected sizeof(EVENTLOG_FULL_INFORMATION), got %d\n", needed);
- ok(efi.dwFull == 0xdeadbeef, "Expected no change to the dwFull member\n");
-
- /* Not that we care, but on success last error is set to ERROR_IO_PENDING */
- efi.dwFull = 0xdeadbeef;
- needed *= 2;
- ret = pGetEventLogInformation(handle, EVENTLOG_FULL_INFO, (LPVOID)&efi, needed, &needed);
- ok(ret, "Expected success\n");
- ok(needed == sizeof(EVENTLOG_FULL_INFORMATION), "Expected sizeof(EVENTLOG_FULL_INFORMATION), got %d\n", needed);
- ok(efi.dwFull == 0 || efi.dwFull == 1, "Expected 0 (not full) or 1 (full), got %d\n", efi.dwFull);
-
- CloseEventLog(handle);
-}
-
-static void test_count(void)
-{
- HANDLE handle;
- BOOL ret;
- DWORD count;
- const char backup[] = "backup.evt";
-
- SetLastError(0xdeadbeef);
- ret = GetNumberOfEventLogRecords(NULL, NULL);
- ok(!ret, "Expected failure\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
-
- SetLastError(0xdeadbeef);
- count = 0xdeadbeef;
- ret = GetNumberOfEventLogRecords(NULL, &count);
- ok(!ret, "Expected failure\n");
- ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
- ok(count == 0xdeadbeef, "Expected count to stay unchanged\n");
-
- handle = OpenEventLogA(NULL, "Application");
-
- SetLastError(0xdeadbeef);
- ret = GetNumberOfEventLogRecords(handle, NULL);
- ok(!ret, "Expected failure\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
-
- count = 0xdeadbeef;
- ret = GetNumberOfEventLogRecords(handle, &count);
- ok(ret, "Expected success\n");
- ok(count != 0xdeadbeef, "Expected the number of records\n");
-
- CloseEventLog(handle);
-
- /* Make a backup eventlog to work with */
- create_backup(backup);
-
- handle = OpenBackupEventLogA(NULL, backup);
- todo_wine
- ok(handle != NULL, "Expected a handle\n");
-
- /* Does GetNumberOfEventLogRecords work with backup eventlogs? */
- count = 0xdeadbeef;
- ret = GetNumberOfEventLogRecords(handle, &count);
- todo_wine
- {
- ok(ret, "Expected success\n");
- ok(count != 0xdeadbeef, "Expected the number of records\n");
- }
-
- CloseEventLog(handle);
- DeleteFileA(backup);
-}
-
-static void test_oldest(void)
-{
- HANDLE handle;
- BOOL ret;
- DWORD oldest;
- const char backup[] = "backup.evt";
-
- SetLastError(0xdeadbeef);
- ret = GetOldestEventLogRecord(NULL, NULL);
- ok(!ret, "Expected failure\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
-
- SetLastError(0xdeadbeef);
- oldest = 0xdeadbeef;
- ret = GetOldestEventLogRecord(NULL, &oldest);
- ok(!ret, "Expected failure\n");
- ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
- ok(oldest == 0xdeadbeef, "Expected oldest to stay unchanged\n");
-
- handle = OpenEventLogA(NULL, "Application");
-
- SetLastError(0xdeadbeef);
- ret = GetOldestEventLogRecord(handle, NULL);
- ok(!ret, "Expected failure\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
-
- oldest = 0xdeadbeef;
- ret = GetOldestEventLogRecord(handle, &oldest);
- ok(ret, "Expected success\n");
- ok(oldest != 0xdeadbeef, "Expected the number of the oldest record\n");
-
- CloseEventLog(handle);
-
- /* Make a backup eventlog to work with */
- create_backup(backup);
-
- handle = OpenBackupEventLogA(NULL, backup);
- todo_wine
- ok(handle != NULL, "Expected a handle\n");
-
- /* Does GetOldestEventLogRecord work with backup eventlogs? */
- oldest = 0xdeadbeef;
- ret = GetOldestEventLogRecord(handle, &oldest);
- todo_wine
- {
- ok(ret, "Expected success\n");
- ok(oldest != 0xdeadbeef, "Expected the number of the oldest record\n");
- }
-
- CloseEventLog(handle);
- DeleteFileA(backup);
-}
-
-static void test_backup(void)
-{
- HANDLE handle;
- BOOL ret;
- const char backup[] = "backup.evt";
- const char backup2[] = "backup2.evt";
-
- SetLastError(0xdeadbeef);
- ret = BackupEventLogA(NULL, NULL);
- ok(!ret, "Expected failure\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
-
- SetLastError(0xdeadbeef);
- ret = BackupEventLogA(NULL, backup);
- ok(!ret, "Expected failure\n");
- ok(GetFileAttributesA(backup) == INVALID_FILE_ATTRIBUTES, "Expected no backup file\n");
-
- handle = OpenEventLogA(NULL, "Application");
-
- SetLastError(0xdeadbeef);
- ret = BackupEventLogA(handle, NULL);
- ok(!ret, "Expected failure\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
-
- ret = BackupEventLogA(handle, backup);
- ok(ret, "Expected success\n");
- todo_wine
- ok(GetFileAttributesA(backup) != INVALID_FILE_ATTRIBUTES, "Expected a backup file\n");
-
- /* Try to overwrite */
- SetLastError(0xdeadbeef);
- ret = BackupEventLogA(handle, backup);
- todo_wine
- {
- ok(!ret, "Expected failure\n");
- ok(GetLastError() == ERROR_ALREADY_EXISTS, "Expected ERROR_ALREADY_EXISTS, got %d\n", GetLastError());
- }
-
- CloseEventLog(handle);
-
- /* Can we make a backup of a backup? */
- handle = OpenBackupEventLogA(NULL, backup);
- todo_wine
- ok(handle != NULL, "Expected a handle\n");
-
- ret = BackupEventLogA(handle, backup2);
- todo_wine
- {
- ok(ret, "Expected success\n");
- ok(GetFileAttributesA(backup2) != INVALID_FILE_ATTRIBUTES, "Expected a backup file\n");
- }
-
- CloseEventLog(handle);
- DeleteFileA(backup);
- DeleteFileA(backup2);
-}
-
-static void test_read(void)
-{
- HANDLE handle;
- BOOL ret;
- DWORD count, toread, read, needed;
- void *buf;
-
- SetLastError(0xdeadbeef);
- ret = ReadEventLogA(NULL, 0, 0, NULL, 0, NULL, NULL);
- ok(!ret, "Expected failure\n");
- todo_wine
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
-
- read = 0xdeadbeef;
- SetLastError(0xdeadbeef);
- ret = ReadEventLogA(NULL, 0, 0, NULL, 0, &read, NULL);
- ok(!ret, "Expected failure\n");
- ok(read == 0xdeadbeef, "Expected 'read' parameter to remain unchanged\n");
- todo_wine
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
-
- needed = 0xdeadbeef;
- SetLastError(0xdeadbeef);
- ret = ReadEventLogA(NULL, 0, 0, NULL, 0, NULL, &needed);
- ok(!ret, "Expected failure\n");
- ok(needed == 0xdeadbeef, "Expected 'needed' parameter to remain unchanged\n");
- todo_wine
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
-
- /* 'read' and 'needed' are only filled when the needed buffer size is passed back or when the call succeeds */
- SetLastError(0xdeadbeef);
- ret = ReadEventLogA(NULL, 0, 0, NULL, 0, &read, &needed);
- ok(!ret, "Expected failure\n");
- todo_wine
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
-
- SetLastError(0xdeadbeef);
- ret = ReadEventLogA(NULL, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, 0, NULL, 0, NULL, NULL);
- ok(!ret, "Expected failure\n");
- todo_wine
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
-
- SetLastError(0xdeadbeef);
- ret = ReadEventLogA(NULL, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, 0, NULL, 0, &read, &needed);
- ok(!ret, "Expected failure\n");
- todo_wine
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
-
- buf = NULL;
- SetLastError(0xdeadbeef);
- ret = ReadEventLogA(NULL, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ,
- 0, buf, sizeof(EVENTLOGRECORD), &read, &needed);
- ok(!ret, "Expected failure\n");
- todo_wine
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
-
- buf = HeapAlloc(GetProcessHeap(), 0, sizeof(EVENTLOGRECORD));
- SetLastError(0xdeadbeef);
- ret = ReadEventLogA(NULL, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ,
- 0, buf, sizeof(EVENTLOGRECORD), &read, &needed);
- ok(!ret, "Expected failure\n");
- todo_wine
- ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
- HeapFree(GetProcessHeap(), 0, buf);
-
- handle = OpenEventLogA(NULL, "Application");
-
- /* Show that we need the proper dwFlags with a (for the rest) proper call */
- buf = HeapAlloc(GetProcessHeap(), 0, sizeof(EVENTLOGRECORD));
-
- SetLastError(0xdeadbeef);
- ret = ReadEventLogA(handle, 0, 0, buf, sizeof(EVENTLOGRECORD), &read, &needed);
- ok(!ret, "Expected failure\n");
- todo_wine
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
-
- SetLastError(0xdeadbeef);
- ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ, 0, buf, sizeof(EVENTLOGRECORD), &read, &needed);
- ok(!ret, "Expected failure\n");
- todo_wine
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
-
- SetLastError(0xdeadbeef);
- ret = ReadEventLogA(handle, EVENTLOG_SEEK_READ, 0, buf, sizeof(EVENTLOGRECORD), &read, &needed);
- ok(!ret, "Expected failure\n");
- todo_wine
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
-
- SetLastError(0xdeadbeef);
- ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ | EVENTLOG_BACKWARDS_READ,
- 0, buf, sizeof(EVENTLOGRECORD), &read, &needed);
- ok(!ret, "Expected failure\n");
- todo_wine
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
-
- SetLastError(0xdeadbeef);
- ret = ReadEventLogA(handle, EVENTLOG_SEEK_READ | EVENTLOG_FORWARDS_READ | EVENTLOG_BACKWARDS_READ,
- 0, buf, sizeof(EVENTLOGRECORD), &read, &needed);
- ok(!ret, "Expected failure\n");
- todo_wine
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
-
- SetLastError(0xdeadbeef);
- ret = ReadEventLogA(handle, EVENTLOG_SEEK_READ | EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ,
- 0, buf, sizeof(EVENTLOGRECORD), &read, &needed);
- ok(!ret, "Expected failure\n");
- todo_wine
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
-
- HeapFree(GetProcessHeap(), 0, buf);
-
- /* First check if there are any records (in practice only on Wine: FIXME) */
- count = 0;
- GetNumberOfEventLogRecords(handle, &count);
- if (!count)
- {
- skip("No records in the 'Application' log\n");
- CloseEventLog(handle);
- return;
- }
-
- /* Get the buffer size for the first record */
- buf = HeapAlloc(GetProcessHeap(), 0, sizeof(EVENTLOGRECORD));
- read = needed = 0xdeadbeef;
- SetLastError(0xdeadbeef);
- ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ,
- 0, buf, sizeof(EVENTLOGRECORD), &read, &needed);
- ok(!ret, "Expected failure\n");
- ok(read == 0, "Expected no bytes read\n");
- ok(needed > sizeof(EVENTLOGRECORD), "Expected the needed buffersize to be bigger than sizeof(EVENTLOGRECORD)\n");
- ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
-
- /* Read the first record */
- toread = needed;
- buf = HeapReAlloc(GetProcessHeap(), 0, buf, toread);
- read = needed = 0xdeadbeef;
- SetLastError(0xdeadbeef);
- ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, 0, buf, toread, &read, &needed);
- ok(ret, "Expected success\n");
- ok(read == toread ||
- broken(read < toread), /* NT4 wants a buffer size way bigger than just 1 record */
- "Expected the requested size to be read\n");
- ok(needed == 0, "Expected no extra bytes to be read\n");
- HeapFree(GetProcessHeap(), 0, buf);
-
- CloseEventLog(handle);
-}
-
-static void test_openbackup(void)
-{
- HANDLE handle, handle2, file;
- DWORD written;
- const char backup[] = "backup.evt";
- const char text[] = "Just some text";
-
- SetLastError(0xdeadbeef);
- handle = OpenBackupEventLogA(NULL, NULL);
- ok(handle == NULL, "Didn't expect a handle\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
-
- SetLastError(0xdeadbeef);
- handle = OpenBackupEventLogA(NULL, "idontexist.evt");
- ok(handle == NULL, "Didn't expect a handle\n");
- ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError());
-
- SetLastError(0xdeadbeef);
- handle = OpenBackupEventLogA("IDontExist", NULL);
- ok(handle == NULL, "Didn't expect a handle\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
-
- SetLastError(0xdeadbeef);
- handle = OpenBackupEventLogA("IDontExist", "idontexist.evt");
- ok(handle == NULL, "Didn't expect a handle\n");
- ok(GetLastError() == RPC_S_SERVER_UNAVAILABLE ||
- GetLastError() == RPC_S_INVALID_NET_ADDR, /* Some Vista and Win7 */
- "Expected RPC_S_SERVER_UNAVAILABLE, got %d\n", GetLastError());
-
- /* Make a backup eventlog to work with */
- create_backup(backup);
-
- /* FIXME: Wine stops here */
- if (GetFileAttributesA(backup) == INVALID_FILE_ATTRIBUTES)
- {
- skip("We don't have a backup eventlog to work with\n");
- return;
- }
-
- SetLastError(0xdeadbeef);
- handle = OpenBackupEventLogA("IDontExist", backup);
- ok(handle == NULL, "Didn't expect a handle\n");
- ok(GetLastError() == RPC_S_SERVER_UNAVAILABLE ||
- GetLastError() == RPC_S_INVALID_NET_ADDR, /* Some Vista and Win7 */
- "Expected RPC_S_SERVER_UNAVAILABLE, got %d\n", GetLastError());
-
- /* Empty servername should be read as local server */
- handle = OpenBackupEventLogA("", backup);
- ok(handle != NULL, "Expected a handle\n");
- CloseEventLog(handle);
-
- handle = OpenBackupEventLogA(NULL, backup);
- ok(handle != NULL, "Expected a handle\n");
-
- /* Can we open that same backup eventlog more than once? */
- handle2 = OpenBackupEventLogA(NULL, backup);
- ok(handle2 != NULL, "Expected a handle\n");
- ok(handle2 != handle, "Didn't expect the same handle\n");
- CloseEventLog(handle2);
-
- CloseEventLog(handle);
- DeleteFileA(backup);
-
- /* Is there any content checking done? */
- file = CreateFileA(backup, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, NULL);
- CloseHandle(file);
- SetLastError(0xdeadbeef);
- handle = OpenBackupEventLogA(NULL, backup);
- ok(handle == NULL, "Didn't expect a handle\n");
- ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY ||
- GetLastError() == ERROR_EVENTLOG_FILE_CORRUPT, /* Vista and Win7 */
- "Expected ERROR_NOT_ENOUGH_MEMORY, got %d\n", GetLastError());
- CloseEventLog(handle);
- DeleteFileA(backup);
-
- file = CreateFileA(backup, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, NULL);
- WriteFile(file, text, sizeof(text), &written, NULL);
- CloseHandle(file);
- SetLastError(0xdeadbeef);
- handle = OpenBackupEventLogA(NULL, backup);
- ok(handle == NULL, "Didn't expect a handle\n");
- ok(GetLastError() == ERROR_EVENTLOG_FILE_CORRUPT, "Expected ERROR_EVENTLOG_FILE_CORRUPT, got %d\n", GetLastError());
- CloseEventLog(handle);
- DeleteFileA(backup);
-}
-
-static void test_clear(void)
-{
- HANDLE handle;
- BOOL ret;
- const char backup[] = "backup.evt";
- const char backup2[] = "backup2.evt";
-
- SetLastError(0xdeadbeef);
- ret = ClearEventLogA(NULL, NULL);
- ok(!ret, "Expected failure\n");
- ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
-
- /* Make a backup eventlog to work with */
- create_backup(backup);
-
- SetLastError(0xdeadbeef);
- ret = ClearEventLogA(NULL, backup);
- ok(!ret, "Expected failure\n");
- ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
-
- handle = OpenBackupEventLogA(NULL, backup);
- todo_wine
- ok(handle != NULL, "Expected a handle\n");
-
- /* A real eventlog would fail with ERROR_ALREADY_EXISTS */
- SetLastError(0xdeadbeef);
- ret = ClearEventLogA(handle, backup);
- ok(!ret, "Expected failure\n");
- /* The eventlog service runs under an account that doesn't have the necessary
- * permissions on the users home directory on a default Vista+ system.
- */
- ok(GetLastError() == ERROR_INVALID_HANDLE ||
- GetLastError() == ERROR_ACCESS_DENIED, /* Vista+ */
- "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
-
- /* Show that ClearEventLog only works for real eventlogs. */
- SetLastError(0xdeadbeef);
- ret = ClearEventLogA(handle, backup2);
- ok(!ret, "Expected failure\n");
- ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
- ok(GetFileAttributesA(backup2) == INVALID_FILE_ATTRIBUTES, "Expected no backup file\n");
-
- SetLastError(0xdeadbeef);
- ret = ClearEventLogA(handle, NULL);
- ok(!ret, "Expected failure\n");
- ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
-
- CloseEventLog(handle);
- todo_wine
- ok(DeleteFileA(backup), "Could not delete the backup file\n");
-}
-
-static const char eventlogsvc[] = "SYSTEM\\CurrentControlSet\\Services\\Eventlog";
-static const char eventlogname[] = "Wine";
-static const char eventsources[][11] = { "WineSrc", "WineSrc1", "WineSrc20", "WineSrc300" };
-
-static BOOL create_new_eventlog(void)
-{
- HKEY key, eventkey;
- BOOL bret = FALSE;
- LONG lret;
- int i;
-
- /* First create our eventlog */
- lret = RegOpenKeyA(HKEY_LOCAL_MACHINE, eventlogsvc, &key);
- /* FIXME: Wine stops here */
- if (lret != ERROR_SUCCESS)
- {
- skip("Could not open the EventLog service registry key\n");
- return FALSE;
- }
- lret = RegCreateKeyA(key, eventlogname, &eventkey);
- if (lret != ERROR_SUCCESS)
- {
- skip("Could not create the eventlog '%s' registry key\n", eventlogname);
- goto cleanup;
- }
-
- /* Create some event sources, the registry value 'Sources' is updated automatically */
- for (i = 0; i < sizeof(eventsources)/sizeof(eventsources[0]); i++)
- {
- HKEY srckey;
-
- lret = RegCreateKeyA(eventkey, eventsources[i], &srckey);
- if (lret != ERROR_SUCCESS)
- {
- skip("Could not create the eventsource '%s' registry key\n", eventsources[i]);
- goto cleanup;
- }
- RegFlushKey(srckey);
- RegCloseKey(srckey);
- }
-
- bret = TRUE;
-
- /* The flushing of the registry (here and above) gives us some assurance
- * that we are not to quickly writing events as 'Sources' could still be
- * not updated.
- */
- RegFlushKey(eventkey);
-cleanup:
- RegCloseKey(eventkey);
- RegCloseKey(key);
-
- return bret;
-}
-
-static const char *one_string[] = { "First string" };
-static const char *two_strings[] = { "First string", "Second string" };
-static const struct
-{
- const char *evt_src;
- WORD evt_type;
- WORD evt_cat;
- DWORD evt_id;
- BOOL evt_sid;
- WORD evt_numstrings;
- const char **evt_strings;
-} read_write [] =
-{
- { eventlogname, EVENTLOG_INFORMATION_TYPE, 1, 1, FALSE, 1, one_string },
- { eventsources[0], EVENTLOG_WARNING_TYPE, 1, 2, FALSE, 0, NULL },
- { eventsources[1], EVENTLOG_AUDIT_FAILURE, 1, 3, FALSE, 2, two_strings },
- { eventsources[2], EVENTLOG_ERROR_TYPE, 1, 4, FALSE, 0, NULL },
- { eventsources[3], EVENTLOG_WARNING_TYPE, 1, 5, FALSE, 1, one_string },
- { eventlogname, EVENTLOG_SUCCESS, 2, 6, TRUE, 2, two_strings },
- { eventsources[0], EVENTLOG_AUDIT_FAILURE, 2, 7, TRUE, 0, NULL },
- { eventsources[1], EVENTLOG_AUDIT_SUCCESS, 2, 8, TRUE, 2, two_strings },
- { eventsources[2], EVENTLOG_WARNING_TYPE, 2, 9, TRUE, 0, NULL },
- { eventsources[3], EVENTLOG_ERROR_TYPE, 2, 10, TRUE, 1, one_string }
-};
-
-static void test_readwrite(void)
-{
- HANDLE handle;
- PSID user;
- DWORD sidsize, count;
- BOOL ret, sidavailable;
- BOOL on_vista = FALSE; /* Used to indicate Vista, W2K8 or Win7 */
- int i;
- char *localcomputer = NULL;
- DWORD size;
-
- if (pCreateWellKnownSid)
- {
- sidsize = SECURITY_MAX_SID_SIZE;
- user = HeapAlloc(GetProcessHeap(), 0, sidsize);
- SetLastError(0xdeadbeef);
- pCreateWellKnownSid(WinInteractiveSid, NULL, user, &sidsize);
- sidavailable = TRUE;
- }
- else
- {
- win_skip("Skipping some SID related tests\n");
- sidavailable = FALSE;
- user = NULL;
- }
-
- /* Write an event with an incorrect event type. This will fail on Windows 7
- * but succeed on all others, hence it's not part of the struct.
- */
- handle = OpenEventLogA(NULL, eventlogname);
- if (!handle)
- {
- /* Intermittently seen on NT4 when tests are run immediately after boot */
- win_skip("Could not get a handle to the eventlog\n");
- goto cleanup;
- }
-
- count = 0xdeadbeef;
- GetNumberOfEventLogRecords(handle, &count);
- if (count != 0)
- {
- /* Needed for W2K3 without a service pack */
- win_skip("We most likely opened the Application eventlog\n");
- CloseEventLog(handle);
- Sleep(2000);
-
- handle = OpenEventLogA(NULL, eventlogname);
- count = 0xdeadbeef;
- GetNumberOfEventLogRecords(handle, &count);
- if (count != 0)
- {
- win_skip("We didn't open our new eventlog\n");
- CloseEventLog(handle);
- goto cleanup;
- }
- }
-
- SetLastError(0xdeadbeef);
- ret = ReportEvent(handle, 0x20, 0, 0, NULL, 0, 0, NULL, NULL);
- if (!ret && GetLastError() == ERROR_CRC)
- {
- win_skip("Win7 fails when using incorrect event types\n");
- ret = ReportEvent(handle, 0, 0, 0, NULL, 0, 0, NULL, NULL);
- }
- else
- {
- void *buf;
- DWORD read, needed;
- EVENTLOGRECORD *record;
-
- /* Needed to catch earlier Vista (with no ServicePack for example) */
- buf = HeapAlloc(GetProcessHeap(), 0, sizeof(EVENTLOGRECORD));
- ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ,
- 0, buf, sizeof(EVENTLOGRECORD), &read, &needed);
-
- buf = HeapReAlloc(GetProcessHeap(), 0, buf, needed);
- ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ,
- 0, buf, needed, &read, &needed);
-
- record = (EVENTLOGRECORD *)buf;
-
- /* Vista and W2K8 return EVENTLOG_SUCCESS, Windows versions before return
- * the written eventtype (0x20 in this case).
- */
- if (record->EventType == EVENTLOG_SUCCESS)
- on_vista = TRUE;
-
- HeapFree(GetProcessHeap(), 0, buf);
- }
- ok(ret, "Expected success : %d\n", GetLastError());
-
- /* This will clear the eventlog. The record numbering for new
- * events however differs on Vista SP1+. Before Vista the first
- * event would be numbered 1, on Vista SP1+ it's higher as we already
- * had at least one event (more in case of multiple test runs without
- * a reboot).
- */
- ClearEventLogA(handle, NULL);
- CloseEventLog(handle);
-
- /* Write a bunch of events while using different event sources */
- for (i = 0; i < sizeof(read_write)/sizeof(read_write[0]); i++)
- {
- DWORD oldest;
- BOOL run_sidtests = read_write[i].evt_sid & sidavailable;
-
- /* We don't need to use RegisterEventSource to report events */
- if (i % 2)
- handle = OpenEventLogA(NULL, read_write[i].evt_src);
- else
- handle = RegisterEventSourceA(NULL, read_write[i].evt_src);
- ok(handle != NULL, "Expected a handle\n");
-
- SetLastError(0xdeadbeef);
- ret = ReportEvent(handle, read_write[i].evt_type, read_write[i].evt_cat,
- read_write[i].evt_id, run_sidtests ? user : NULL,
- read_write[i].evt_numstrings, 0, read_write[i].evt_strings, NULL);
-
- count = 0xdeadbeef;
- ret = GetNumberOfEventLogRecords(handle, &count);
- ok(ret, "Expected success\n");
- ok(count == (i + 1), "Expected %d records, got %d\n", i + 1, count);
-
- oldest = 0xdeadbeef;
- ret = GetOldestEventLogRecord(handle, &oldest);
- ok(ret, "Expected success\n");
- ok(oldest == 1 ||
- (oldest > 1 && oldest != 0xdeadbeef), /* Vista SP1+, W2K8 and Win7 */
- "Expected oldest to be 1 or higher, got %d\n", oldest);
- if (oldest > 1 && oldest != 0xdeadbeef)
- on_vista = TRUE;
-
- if (i % 2)
- ret = CloseEventLog(handle);
- else
- ret = DeregisterEventSource(handle);
- ok(ret, "Expected success : %d\n", GetLastError());
- }
-
- handle = OpenEventLogA(NULL, eventlogname);
- count = 0xdeadbeef;
- ret = GetNumberOfEventLogRecords(handle, &count);
- ok(ret, "Expected success\n");
- ok(count == i, "Expected %d records, got %d\n", i, count);
- CloseEventLog(handle);
-
- if (count == 0)
- {
- skip("No events were written to the eventlog\n");
- goto cleanup;
- }
-
- /* Report only once */
- if (on_vista)
- skip("There is no DWORD alignment enforced for UserSid on Vista, W2K8 or Win7\n");
-
- if (on_vista && pGetComputerNameExA)
- {
- /* New Vista+ behavior */
- size = 0;
- SetLastError(0xdeadbeef);
- pGetComputerNameExA(ComputerNameDnsFullyQualified, NULL, &size);
- localcomputer = HeapAlloc(GetProcessHeap(), 0, size);
- pGetComputerNameExA(ComputerNameDnsFullyQualified, localcomputer, &size);
- }
- else
- {
- size = MAX_COMPUTERNAME_LENGTH + 1;
- localcomputer = HeapAlloc(GetProcessHeap(), 0, size);
- GetComputerNameA(localcomputer, &size);
- }
-
- /* Read all events from our created eventlog, one by one */
- handle = OpenEventLogA(NULL, eventlogname);
- i = 0;
- for (;;)
- {
- void *buf;
- DWORD read, needed;
- EVENTLOGRECORD *record;
- char *sourcename, *computername;
- int k;
- char *ptr;
- BOOL run_sidtests = read_write[i].evt_sid & sidavailable;
-
- buf = HeapAlloc(GetProcessHeap(), 0, sizeof(EVENTLOGRECORD));
- SetLastError(0xdeadbeef);
- ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ,
- 0, buf, sizeof(EVENTLOGRECORD), &read, &needed);
- if (!ret && GetLastError() == ERROR_HANDLE_EOF)
- {
- HeapFree(GetProcessHeap(), 0, buf);
- break;
- }
- ok(!ret, "Expected failure\n");
- ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER,
- "Expected ERROR_INVALID_PARAMETER, got %d\n",GetLastError());
-
- buf = HeapReAlloc(GetProcessHeap(), 0, buf, needed);
- ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ,
- 0, buf, needed, &read, &needed);
- ok(ret, "Expected success: %d\n", GetLastError());
-
- record = (EVENTLOGRECORD *)buf;
-
- ok(record->Length == read,
- "Expected %d, got %d\n", read, record->Length);
- ok(record->Reserved == 0x654c664c,
- "Expected 0x654c664c, got %d\n", record->Reserved);
- ok(record->RecordNumber == i + 1 ||
- (on_vista && (record->RecordNumber > i + 1)),
- "Expected %d or higher, got %d\n", i + 1, record->RecordNumber);
- ok(record->EventID == read_write[i].evt_id,
- "Expected %d, got %d\n", read_write[i].evt_id, record->EventID);
- ok(record->EventType == read_write[i].evt_type,
- "Expected %d, got %d\n", read_write[i].evt_type, record->EventType);
- ok(record->NumStrings == read_write[i].evt_numstrings,
- "Expected %d, got %d\n", read_write[i].evt_numstrings, record->NumStrings);
- ok(record->EventCategory == read_write[i].evt_cat,
- "Expected %d, got %d\n", read_write[i].evt_cat, record->EventCategory);
-
- sourcename = (char *)((BYTE *)buf + sizeof(EVENTLOGRECORD));
- ok(!lstrcmpA(sourcename, read_write[i].evt_src), "Expected '%s', got '%s'\n",
- read_write[i].evt_src, sourcename);
-
- computername = (char *)((BYTE *)buf + sizeof(EVENTLOGRECORD) + lstrlenA(sourcename) + 1);
- ok(!lstrcmpiA(computername, localcomputer), "Expected '%s', got '%s'\n",
- localcomputer, computername);
-
- /* Before Vista, UserSid was aligned on a DWORD boundary. Next to that if
- * no padding was actually required a 0 DWORD was still used for padding. No
- * application should be relying on the padding as we are working with offsets
- * anyway.
- */
-
- if (!on_vista)
- {
- DWORD calculated_sidoffset = sizeof(EVENTLOGRECORD) + lstrlenA(sourcename) + 1 + lstrlenA(computername) + 1;
-
- /* We are already DWORD aligned, there should still be some padding */
- if ((((UINT_PTR)buf + calculated_sidoffset) % sizeof(DWORD)) == 0)
- ok(*(DWORD *)((BYTE *)buf + calculated_sidoffset) == 0, "Expected 0\n");
-
- ok((((UINT_PTR)buf + record->UserSidOffset) % sizeof(DWORD)) == 0, "Expected DWORD alignment\n");
- }
-
- if (run_sidtests)
- {
- ok(record->UserSidLength == sidsize, "Expected %d, got %d\n", sidsize, record->UserSidLength);
- }
- else
- {
- ok(record->StringOffset == record->UserSidOffset, "Expected offsets to be the same\n");
- ok(record->UserSidLength == 0, "Expected 0, got %d\n", record->UserSidLength);
- }
-
- ok(record->DataLength == 0, "Expected 0, got %d\n", record->DataLength);
-
- ptr = (char *)((BYTE *)buf + record->StringOffset);
- for (k = 0; k < record->NumStrings; k++)
- {
- ok(!lstrcmpA(ptr, two_strings[k]), "Expected '%s', got '%s'\n", two_strings[k], ptr);
- ptr += lstrlenA(ptr) + 1;
- }
-
- ok(record->Length == *(DWORD *)((BYTE *)buf + record->Length - sizeof(DWORD)),
- "Expected the closing DWORD to contain the length of the record\n");
-
- HeapFree(GetProcessHeap(), 0, buf);
- i++;
- }
- CloseEventLog(handle);
-
- /* Test clearing a real eventlog */
- handle = OpenEventLogA(NULL, eventlogname);
-
- SetLastError(0xdeadbeef);
- ret = ClearEventLogA(handle, NULL);
- ok(ret, "Expected success\n");
-
- count = 0xdeadbeef;
- ret = GetNumberOfEventLogRecords(handle, &count);
- ok(ret, "Expected success\n");
- ok(count == 0, "Expected an empty eventlog, got %d records\n", count);
-
- CloseEventLog(handle);
-
-cleanup:
- HeapFree(GetProcessHeap(), 0, localcomputer);
- HeapFree(GetProcessHeap(), 0, user);
-}
-
-/* Before Vista:
- *
- * Creating an eventlog on Windows (via the registry) automatically leads
- * to creation of a REG_MULTI_SZ named 'Sources'. This value lists all the
- * potential event sources for this eventlog. 'Sources' is automatically
- * updated when a new key (aka event source) is created.
- *
- * Although the updating of registry keys is almost instantaneously, we
- * check it after some other tests to assure we are not querying the
- * registry or file system to quickly.
- *
- * NT4 and higher:
- *
- * The eventlog file itself is also automatically created, even before we
- * start writing events.
- */
-static char eventlogfile[MAX_PATH];
-static void test_autocreation(void)
-{
- HKEY key, eventkey;
- DWORD type, size;
- LONG ret;
- int i;
- char *p;
- char sources[sizeof(eventsources)];
- char sysdir[MAX_PATH];
- void *redir = 0;
-
- RegOpenKeyA(HKEY_LOCAL_MACHINE, eventlogsvc, &key);
- RegOpenKeyA(key, eventlogname, &eventkey);
-
- size = sizeof(sources);
- sources[0] = 0;
- ret = RegQueryValueExA(eventkey, "Sources", NULL, &type, (LPBYTE)sources, &size);
- if (ret == ERROR_SUCCESS)
- {
- char sources_verify[sizeof(eventsources)];
-
- ok(type == REG_MULTI_SZ, "Expected a REG_MULTI_SZ, got %d\n", type);
-
- /* Build the expected string */
- memset(sources_verify, 0, sizeof(sources_verify));
- p = sources_verify;
- for (i = sizeof(eventsources)/sizeof(eventsources[0]); i > 0; i--)
- {
- lstrcpyA(p, eventsources[i - 1]);
- p += (lstrlenA(eventsources[i - 1]) + 1);
- }
- lstrcpyA(p, eventlogname);
-
- ok(!memcmp(sources, sources_verify, size),
- "Expected a correct 'Sources' value (size : %d)\n", size);
- }
-
- RegCloseKey(eventkey);
- RegCloseKey(key);
-
- /* The directory that holds the eventlog files could be redirected */
- if (pWow64DisableWow64FsRedirection)
- pWow64DisableWow64FsRedirection(&redir);
-
- /* On Windows we also automatically get an eventlog file */
- GetSystemDirectoryA(sysdir, sizeof(sysdir));
-
- /* NT4 - W2K3 */
- lstrcpyA(eventlogfile, sysdir);
- lstrcatA(eventlogfile, "\\config\\");
- lstrcatA(eventlogfile, eventlogname);
- lstrcatA(eventlogfile, ".evt");
-
- if (GetFileAttributesA(eventlogfile) == INVALID_FILE_ATTRIBUTES)
- {
- /* Vista+ */
- lstrcpyA(eventlogfile, sysdir);
- lstrcatA(eventlogfile, "\\winevt\\Logs\\");
- lstrcatA(eventlogfile, eventlogname);
- lstrcatA(eventlogfile, ".evtx");
- }
-
- ok(GetFileAttributesA(eventlogfile) != INVALID_FILE_ATTRIBUTES,
- "Expected an eventlog file\n");
-
- if (pWow64RevertWow64FsRedirection)
- pWow64RevertWow64FsRedirection(redir);
-}
-
-static void cleanup_eventlog(void)
-{
- BOOL bret;
- LONG lret;
- HKEY key;
- int i;
- char winesvc[MAX_PATH];
-
- /* Delete the registry tree */
- lstrcpyA(winesvc, eventlogsvc);
- lstrcatA(winesvc, "\\");
- lstrcatA(winesvc, eventlogname);
-
- RegOpenKeyA(HKEY_LOCAL_MACHINE, winesvc, &key);
- for (i = 0; i < sizeof(eventsources)/sizeof(eventsources[0]); i++)
- RegDeleteKeyA(key, eventsources[i]);
- RegDeleteValueA(key, "Sources");
- RegCloseKey(key);
- lret = RegDeleteKeyA(HKEY_LOCAL_MACHINE, winesvc);
- todo_wine
- ok(lret == ERROR_SUCCESS, "Could not delete the registry tree : %d\n", lret);
-
- /* A handle to the eventlog is locked by services.exe. We can only
- * delete the eventlog file after reboot.
- */
- bret = MoveFileExA(eventlogfile, NULL, MOVEFILE_DELAY_UNTIL_REBOOT);
- todo_wine
- ok(bret, "Expected MoveFileEx to succeed: %d\n", GetLastError());
-}
-
-START_TEST(eventlog)
-{
- SetLastError(0xdeadbeef);
- CloseEventLog(NULL);
- if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
- {
- win_skip("Event log functions are not implemented\n");
- return;
- }
-
- init_function_pointers();
-
- /* Parameters only */
- test_open_close();
- test_info();
- test_count();
- test_oldest();
- test_backup();
- test_openbackup();
- test_read();
- test_clear();
-
- /* Functional tests */
- if (create_new_eventlog())
- {
- test_readwrite();
- test_autocreation();
- }
- cleanup_eventlog();
-}
/* clean up */
RegDeleteKey(hkey2, "");
RegDeleteKey(hkey1, "");
- RegCloseKey(hkey2);
- RegCloseKey(hkey1);
-
- /* test creation of volatile keys */
- ret = RegCreateKeyExA(hkey_main, "Volatile", 0, NULL, REG_OPTION_VOLATILE, KEY_ALL_ACCESS, NULL, &hkey1, NULL);
- ok(!ret, "RegCreateKeyExA failed with error %d\n", ret);
- ret = RegCreateKeyExA(hkey1, "Subkey2", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hkey2, NULL);
- ok(ret == ERROR_CHILD_MUST_BE_VOLATILE || broken(!ret), /* win9x */
- "RegCreateKeyExA failed with error %d\n", ret);
- if (!ret) RegCloseKey( hkey2 );
- ret = RegCreateKeyExA(hkey1, "Subkey2", 0, NULL, REG_OPTION_VOLATILE, KEY_ALL_ACCESS, NULL, &hkey2, NULL);
- ok(!ret, "RegCreateKeyExA failed with error %d\n", ret);
- RegCloseKey(hkey2);
- /* should succeed if the key already exists */
- ret = RegCreateKeyExA(hkey1, "Subkey2", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hkey2, NULL);
- ok(!ret, "RegCreateKeyExA failed with error %d\n", ret);
-
- /* clean up */
- RegDeleteKey(hkey2, "");
- RegDeleteKey(hkey1, "");
- RegCloseKey(hkey2);
- RegCloseKey(hkey1);
/* beginning backslash character */
ret = RegCreateKeyExA(hkey_main, "\\Subkey3", 0, NULL, 0, KEY_NOTIFY, NULL, &hkey1, NULL);
else {
ok(!ret, "RegCreateKeyExA failed with error %d\n", ret);
RegDeleteKey(hkey1, NULL);
- RegCloseKey(hkey1);
}
/* WOW64 flags - open an existing key */
typedef BOOL (WINAPI *fnMakeSelfRelativeSD)( PSECURITY_DESCRIPTOR, PSECURITY_DESCRIPTOR, LPDWORD );
typedef BOOL (WINAPI *fnConvertSidToStringSidA)( PSID pSid, LPSTR *str );
typedef BOOL (WINAPI *fnConvertStringSidToSidA)( LPCSTR str, PSID pSid );
-static BOOL (WINAPI *pCheckTokenMembership)(HANDLE, PSID, PBOOL);
static BOOL (WINAPI *pConvertStringSecurityDescriptorToSecurityDescriptorA)(LPCSTR, DWORD,
PSECURITY_DESCRIPTOR*, PULONG );
static BOOL (WINAPI *pConvertStringSecurityDescriptorToSecurityDescriptorW)(LPCWSTR, DWORD,
pAddAccessAllowedAceEx = (void *)GetProcAddress(hmod, "AddAccessAllowedAceEx");
pAddAccessDeniedAceEx = (void *)GetProcAddress(hmod, "AddAccessDeniedAceEx");
pAddAuditAccessAceEx = (void *)GetProcAddress(hmod, "AddAuditAccessAceEx");
- pCheckTokenMembership = (void *)GetProcAddress(hmod, "CheckTokenMembership");
pConvertStringSecurityDescriptorToSecurityDescriptorA =
(void *)GetProcAddress(hmod, "ConvertStringSecurityDescriptorToSecurityDescriptorA" );
pConvertStringSecurityDescriptorToSecurityDescriptorW =
ok(pisid->SubAuthority[0] == 21, "Invalid subauthority 0 - expceted 21, got %d\n", pisid->SubAuthority[0]);
ok(pisid->SubAuthority[3] == 4576, "Invalid subauthority 0 - expceted 4576, got %d\n", pisid->SubAuthority[3]);
LocalFree(str);
- LocalFree(psid);
for( i = 0; i < sizeof(refs) / sizeof(refs[0]); i++ )
{
if (!rc && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) {
win_skip("GetFileSecurityA is not implemented\n");
goto cleanup;
- }
+}
ok (!rc, "GetFileSecurityA "
"was expected to fail for '%s'\n", file);
ok (GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetFileSecurityA "
ok(ret, "OpenProcessToken failed with error %d\n", GetLastError());
/* groups */
- SetLastError(0xdeadbeef);
ret = GetTokenInformation(Token, TokenGroups, NULL, 0, &Size);
- ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER,
- "GetTokenInformation(TokenGroups) %s with error %d\n",
- ret ? "succeeded" : "failed", GetLastError());
Groups = HeapAlloc(GetProcessHeap(), 0, Size);
- SetLastError(0xdeadbeef);
ret = GetTokenInformation(Token, TokenGroups, Groups, Size, &Size);
ok(ret, "GetTokenInformation(TokenGroups) failed with error %d\n", GetLastError());
- ok(GetLastError() == 0xdeadbeef,
- "GetTokenInformation shouldn't have set last error to %d\n",
- GetLastError());
trace("TokenGroups:\n");
for (i = 0; i < Groups->GroupCount; i++)
{
DWORD DomainLength = 255;
TCHAR Domain[255];
SID_NAME_USE SidNameUse;
+ pConvertSidToStringSidA(Groups->Groups[i].Sid, &SidString);
Name[0] = '\0';
Domain[0] = '\0';
ret = LookupAccountSid(NULL, Groups->Groups[i].Sid, Name, &NameLength, Domain, &DomainLength, &SidNameUse);
if (ret)
{
- pConvertSidToStringSidA(Groups->Groups[i].Sid, &SidString);
trace("%s, %s\\%s use: %d attr: 0x%08x\n", SidString, Domain, Name, SidNameUse, Groups->Groups[i].Attributes);
- LocalFree(SidString);
- }
+ LocalFree(SidString);
+ }
else trace("attr: 0x%08x LookupAccountSid failed with error %d\n", Groups->Groups[i].Attributes, GetLastError());
}
HeapFree(GetProcessHeap(), 0, Groups);
ok(memcmp(buf2, sid_buffer, cb) == 0, "SID create with domain is different than without (%d)\n", i);
}
}
-
- LocalFree(domainsid);
}
static void test_LookupAccountSid(void)
ok(!lstrcmp(account, user_name), "Expected %s, got %s\n", user_name, account);
ok(!lstrcmp(domain, sid_dom), "Expected %s, got %s\n", sid_dom, domain);
}
- ok(domain_size == domain_save - 1, "Expected %d, got %d\n", domain_save - 1, domain_size);
+ ok(domain_size == domain_save - 1, "Expected %d, got %d\n", domain_save - 1, domain_size);
ok(lstrlen(domain) == domain_size, "Expected %d, got %d\n", lstrlen(domain), domain_size);
ok(sid_use == SidTypeUser, "Expected SidTypeUser (%d), got %d\n", SidTypeUser, sid_use);
domain_size = domain_save;
win_skip("NULL account name doesn't work on NT4\n");
else
{
- ok(!ret, "Expected 0, got %d\n", ret);
- ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER,
- "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError());
- ok(sid_size != 0, "Expected non-zero sid size\n");
- ok(domain_size != 0, "Expected non-zero domain size\n");
- ok(sid_use == 0xcafebabe, "Expected 0xcafebabe, got %d\n", sid_use);
+ ok(!ret, "Expected 0, got %d\n", ret);
+ ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER,
+ "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError());
+ ok(sid_size != 0, "Expected non-zero sid size\n");
+ ok(domain_size != 0, "Expected non-zero domain size\n");
+ ok(sid_use == 0xcafebabe, "Expected 0xcafebabe, got %d\n", sid_use);
- psid = HeapAlloc(GetProcessHeap(), 0, sid_size);
- domain = HeapAlloc(GetProcessHeap(), 0, domain_size);
+ psid = HeapAlloc(GetProcessHeap(), 0, sid_size);
+ domain = HeapAlloc(GetProcessHeap(), 0, domain_size);
- /* try NULL account name */
- ret = LookupAccountNameA(NULL, NULL, psid, &sid_size, domain, &domain_size, &sid_use);
- get_sid_info(psid, &account, &sid_dom);
- ok(ret, "Failed to lookup account name\n");
+ /* try NULL account name */
+ ret = LookupAccountNameA(NULL, NULL, psid, &sid_size, domain, &domain_size, &sid_use);
+ get_sid_info(psid, &account, &sid_dom);
+ ok(ret, "Failed to lookup account name\n");
/* Using a fixed string will not work on different locales */
ok(!lstrcmp(account, domain),
"Got %s for account and %s for domain, these should be the same\n",
ok(!ret, "Expected 0, got %d\n", ret);
ok(GetLastError() == ERROR_NONE_MAPPED ||
broken(GetLastError() == ERROR_TRUSTED_RELATIONSHIP_FAILURE),
- "Expected ERROR_NONE_MAPPED, got %d\n", GetLastError());
- ok(sid_size == 0, "Expected 0, got %d\n", sid_size);
- ok(domain_size == 0, "Expected 0, got %d\n", domain_size);
+ "Expected ERROR_NONE_MAPPED, got %d\n", GetLastError());
+ ok(sid_size == 0, "Expected 0, got %d\n", sid_size);
+ ok(domain_size == 0, "Expected 0, got %d\n", domain_size);
/* try an invalid system name */
SetLastError(0xdeadbeef);
domain = HeapAlloc(GetProcessHeap(), 0, domain_size);
ret = LookupAccountNameA(NULL, computer_name, psid, &sid_size, domain, &domain_size, &sid_use);
ok(ret, "LookupAccountNameA failed: %d\n", GetLastError());
- ok(sid_use == SidTypeDomain ||
- (sid_use == SidTypeUser && ! strcmp(computer_name, user_name)), "expected SidTypeDomain for %s, got %d\n", computer_name, sid_use);
+ ok(sid_use == SidTypeDomain, "expected SidTypeDomain, got %d\n", sid_use);
HeapFree(GetProcessHeap(), 0, domain);
- HeapFree(GetProcessHeap(), 0, psid);
- }
+ HeapFree(GetProcessHeap(), 0, psid);
+}
/* Well Known names */
if (!pCreateWellKnownSid)
obj_info.GrantedAccess == alt, "Granted access should be 0x%08x "
"or 0x%08x, instead of 0x%08x\n", access, alt, obj_info.GrantedAccess);
else
- ok_(__FILE__, line)(obj_info.GrantedAccess == access, "Granted access should "
- "be 0x%08x, instead of 0x%08x\n", access, obj_info.GrantedAccess);
+ ok_(__FILE__, line)(obj_info.GrantedAccess == access, "Granted access should "
+ "be 0x%08x, instead of 0x%08x\n", access, obj_info.GrantedAccess);
}
#define CHECK_SET_SECURITY(o,i,e) \
ExplicitAccess.grfAccessPermissions = KEY_WRITE;
ExplicitAccess.grfAccessMode = GRANT_ACCESS;
ExplicitAccess.grfInheritance = NO_INHERITANCE;
- ExplicitAccess.Trustee.TrusteeType = TRUSTEE_IS_WELL_KNOWN_GROUP;
- ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_SID;
- ExplicitAccess.Trustee.ptstrName = EveryoneSid;
- ExplicitAccess.Trustee.MultipleTrusteeOperation = 0xDEADBEEF;
- ExplicitAccess.Trustee.pMultipleTrustee = (PVOID)0xDEADBEEF;
- res = pSetEntriesInAclW(1, &ExplicitAccess, OldAcl, &NewAcl);
- ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res);
- ok(NewAcl != NULL, "returned acl was NULL\n");
- LocalFree(NewAcl);
-
- ExplicitAccess.Trustee.TrusteeType = TRUSTEE_IS_UNKNOWN;
ExplicitAccess.Trustee.pMultipleTrustee = NULL;
ExplicitAccess.Trustee.MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE;
+ ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_SID;
+ ExplicitAccess.Trustee.TrusteeType = TRUSTEE_IS_UNKNOWN;
+ ExplicitAccess.Trustee.ptstrName = EveryoneSid;
res = pSetEntriesInAclW(1, &ExplicitAccess, OldAcl, &NewAcl);
ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res);
ok(NewAcl != NULL, "returned acl was NULL\n");
BOOL ret;
PSECURITY_DESCRIPTOR pSD;
static const WCHAR Blank[] = { 0 };
- int i;
- static const struct
- {
- const char *sidstring;
- DWORD revision;
- BOOL ret;
- DWORD GLE;
- DWORD altGLE;
- } cssd[] =
- {
- { "D:(A;;GA;;;WD)", 0xdeadbeef, FALSE, ERROR_UNKNOWN_REVISION },
- /* test ACE string type */
- { "D:(A;;GA;;;WD)", SDDL_REVISION_1, TRUE },
- { "D:(D;;GA;;;WD)", SDDL_REVISION_1, TRUE },
- { "ERROR:(D;;GA;;;WD)", SDDL_REVISION_1, FALSE, ERROR_INVALID_PARAMETER },
- /* test ACE string with spaces */
- { " D:(D;;GA;;;WD)", SDDL_REVISION_1, TRUE },
- { "D: (D;;GA;;;WD)", SDDL_REVISION_1, TRUE },
- { "D:( D;;GA;;;WD)", SDDL_REVISION_1, TRUE },
- { "D:(D ;;GA;;;WD)", SDDL_REVISION_1, FALSE, RPC_S_INVALID_STRING_UUID, ERROR_INVALID_ACL }, /* Vista+ */
- { "D:(D; ;GA;;;WD)", SDDL_REVISION_1, TRUE },
- { "D:(D;; GA;;;WD)", SDDL_REVISION_1, TRUE },
- { "D:(D;;GA ;;;WD)", SDDL_REVISION_1, FALSE, ERROR_INVALID_ACL },
- { "D:(D;;GA; ;;WD)", SDDL_REVISION_1, TRUE },
- { "D:(D;;GA;; ;WD)", SDDL_REVISION_1, TRUE },
- { "D:(D;;GA;;; WD)", SDDL_REVISION_1, TRUE },
- { "D:(D;;GA;;;WD )", SDDL_REVISION_1, TRUE },
- /* test ACE string access rights */
- { "D:(A;;GA;;;WD)", SDDL_REVISION_1, TRUE },
- { "D:(A;;GRGWGX;;;WD)", SDDL_REVISION_1, TRUE },
- { "D:(A;;RCSDWDWO;;;WD)", SDDL_REVISION_1, TRUE },
- { "D:(A;;RPWPCCDCLCSWLODTCR;;;WD)", SDDL_REVISION_1, TRUE },
- { "D:(A;;FAFRFWFX;;;WD)", SDDL_REVISION_1, TRUE },
- { "D:(A;;KAKRKWKX;;;WD)", SDDL_REVISION_1, TRUE },
- { "D:(A;;0xFFFFFFFF;;;WD)", SDDL_REVISION_1, TRUE },
- { "S:(AU;;0xFFFFFFFF;;;WD)", SDDL_REVISION_1, TRUE },
- /* test ACE string access right error case */
- { "D:(A;;ROB;;;WD)", SDDL_REVISION_1, FALSE, ERROR_INVALID_ACL },
- /* test behaviour with empty strings */
- { "", SDDL_REVISION_1, TRUE },
- /* test ACE string SID */
- { "D:(D;;GA;;;S-1-0-0)", SDDL_REVISION_1, TRUE },
- { "D:(D;;GA;;;Nonexistent account)", SDDL_REVISION_1, FALSE, ERROR_INVALID_ACL, ERROR_INVALID_SID } /* W2K */
- };
if (!pConvertStringSecurityDescriptorToSecurityDescriptorA)
{
return;
}
- for (i = 0; i < sizeof(cssd)/sizeof(cssd[0]); i++)
- {
- DWORD GLE;
+ SetLastError(0xdeadbeef);
+ ret = pConvertStringSecurityDescriptorToSecurityDescriptorA(
+ "D:(A;;GA;;;WD)", 0xdeadbeef, &pSD, NULL);
+ ok(!ret && GetLastError() == ERROR_UNKNOWN_REVISION,
+ "ConvertStringSecurityDescriptorToSecurityDescriptor should have failed with ERROR_UNKNOWN_REVISION instead of %d\n",
+ GetLastError());
- SetLastError(0xdeadbeef);
- ret = pConvertStringSecurityDescriptorToSecurityDescriptorA(
- cssd[i].sidstring, cssd[i].revision, &pSD, NULL);
- GLE = GetLastError();
- ok(ret == cssd[i].ret, "(%02d) Expected %s (%d)\n", i, cssd[i].ret ? "success" : "failure", GLE);
- if (!cssd[i].ret)
- ok(GLE == cssd[i].GLE ||
- (cssd[i].altGLE && GLE == cssd[i].altGLE),
- "(%02d) Unexpected last error %d\n", i, GLE);
- if (ret)
- LocalFree(pSD);
- }
+ /* test ACE string type */
+ SetLastError(0xdeadbeef);
+ ret = pConvertStringSecurityDescriptorToSecurityDescriptorA(
+ "D:(A;;GA;;;WD)", SDDL_REVISION_1, &pSD, NULL);
+ ok(ret, "ConvertStringSecurityDescriptorToSecurityDescriptor failed with error %d\n", GetLastError());
+ LocalFree(pSD);
+
+ SetLastError(0xdeadbeef);
+ ret = pConvertStringSecurityDescriptorToSecurityDescriptorA(
+ "D:(D;;GA;;;WD)", SDDL_REVISION_1, &pSD, NULL);
+ ok(ret, "ConvertStringSecurityDescriptorToSecurityDescriptor failed with error %d\n", GetLastError());
+ LocalFree(pSD);
+
+ SetLastError(0xdeadbeef);
+ ret = pConvertStringSecurityDescriptorToSecurityDescriptorA(
+ "ERROR:(D;;GA;;;WD)", SDDL_REVISION_1, &pSD, NULL);
+ ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
+ "ConvertStringSecurityDescriptorToSecurityDescriptor should have failed with ERROR_INVALID_PARAMETER instead of %d\n",
+ GetLastError());
+
+ /* test ACE string access rights */
+ SetLastError(0xdeadbeef);
+ ret = pConvertStringSecurityDescriptorToSecurityDescriptorA(
+ "D:(A;;GA;;;WD)", SDDL_REVISION_1, &pSD, NULL);
+ ok(ret, "ConvertStringSecurityDescriptorToSecurityDescriptor failed with error %d\n", GetLastError());
+ LocalFree(pSD);
+ SetLastError(0xdeadbeef);
+ ret = pConvertStringSecurityDescriptorToSecurityDescriptorA(
+ "D:(A;;GRGWGX;;;WD)", SDDL_REVISION_1, &pSD, NULL);
+ ok(ret, "ConvertStringSecurityDescriptorToSecurityDescriptor failed with error %d\n", GetLastError());
+ LocalFree(pSD);
+ SetLastError(0xdeadbeef);
+ ret = pConvertStringSecurityDescriptorToSecurityDescriptorA(
+ "D:(A;;RCSDWDWO;;;WD)", SDDL_REVISION_1, &pSD, NULL);
+ ok(ret, "ConvertStringSecurityDescriptorToSecurityDescriptor failed with error %d\n", GetLastError());
+ LocalFree(pSD);
+ SetLastError(0xdeadbeef);
+ ret = pConvertStringSecurityDescriptorToSecurityDescriptorA(
+ "D:(A;;RPWPCCDCLCSWLODTCR;;;WD)", SDDL_REVISION_1, &pSD, NULL);
+ ok(ret, "ConvertStringSecurityDescriptorToSecurityDescriptor failed with error %d\n", GetLastError());
+ LocalFree(pSD);
+ SetLastError(0xdeadbeef);
+ ret = pConvertStringSecurityDescriptorToSecurityDescriptorA(
+ "D:(A;;FAFRFWFX;;;WD)", SDDL_REVISION_1, &pSD, NULL);
+ ok(ret, "ConvertStringSecurityDescriptorToSecurityDescriptor failed with error %d\n", GetLastError());
+ LocalFree(pSD);
+ SetLastError(0xdeadbeef);
+ ret = pConvertStringSecurityDescriptorToSecurityDescriptorA(
+ "D:(A;;KAKRKWKX;;;WD)", SDDL_REVISION_1, &pSD, NULL);
+ ok(ret, "ConvertStringSecurityDescriptorToSecurityDescriptor failed with error %d\n", GetLastError());
+ LocalFree(pSD);
+ SetLastError(0xdeadbeef);
+ ret = pConvertStringSecurityDescriptorToSecurityDescriptorA(
+ "D:(A;;0xFFFFFFFF;;;WD)", SDDL_REVISION_1, &pSD, NULL);
+ ok(ret, "ConvertStringSecurityDescriptorToSecurityDescriptor failed with error %d\n", GetLastError());
+ LocalFree(pSD);
+ SetLastError(0xdeadbeef);
+ ret = pConvertStringSecurityDescriptorToSecurityDescriptorA(
+ "S:(AU;;0xFFFFFFFF;;;WD)", SDDL_REVISION_1, &pSD, NULL);
+ ok(ret, "ConvertStringSecurityDescriptorToSecurityDescriptor failed with error %d\n", GetLastError());
+ LocalFree(pSD);
+
+ /* test ACE string access right error case */
+ SetLastError(0xdeadbeef);
+ ret = pConvertStringSecurityDescriptorToSecurityDescriptorA(
+ "D:(A;;ROB;;;WD)", SDDL_REVISION_1, &pSD, NULL);
+ ok(!ret && GetLastError() == ERROR_INVALID_ACL,
+ "ConvertStringSecurityDescriptorToSecurityDescriptor should have failed with ERROR_INVALID_ACL instead of %d\n",
+ GetLastError());
/* test behaviour with NULL parameters */
SetLastError(0xdeadbeef);
GetLastError());
/* test behaviour with empty strings */
+ SetLastError(0xdeadbeef);
+ ret = pConvertStringSecurityDescriptorToSecurityDescriptorA(
+ "", SDDL_REVISION_1, &pSD, NULL);
+ ok(ret, "ConvertStringSecurityDescriptorToSecurityDescriptor failed with error %d\n", GetLastError());
+
SetLastError(0xdeadbeef);
ret = pConvertStringSecurityDescriptorToSecurityDescriptorW(
Blank, SDDL_REVISION_1, &pSD, NULL);
ok(ret, "ConvertStringSecurityDescriptorToSecurityDescriptor failed with error %d\n", GetLastError());
+
+ /* test ACE string SID */
+ SetLastError(0xdeadbeef);
+ ret = pConvertStringSecurityDescriptorToSecurityDescriptorA(
+ "D:(D;;GA;;;S-1-0-0)", SDDL_REVISION_1, &pSD, NULL);
+ ok(ret, "ConvertStringSecurityDescriptorToSecurityDescriptor failed with error %d\n", GetLastError());
LocalFree(pSD);
+
+ SetLastError(0xdeadbeef);
+ ret = pConvertStringSecurityDescriptorToSecurityDescriptorA(
+ "D:(D;;GA;;;Nonexistent account)", SDDL_REVISION_1, &pSD, NULL);
+ ok(!ret, "Expected failure, got %d\n", ret);
+ ok(GetLastError() == ERROR_INVALID_ACL || GetLastError() == ERROR_INVALID_SID,
+ "Expected ERROR_INVALID_ACL or ERROR_INVALID_SID, got %d\n", GetLastError());
}
static void test_ConvertSecurityDescriptorToString(void)
CHECK_ONE_OF_AND_FREE("O:SYG:S-1-5-21-93476-23408-4576D:S:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)(AU;NPSA;0x12019f;;;SU)", /* XP */
"O:SYG:S-1-5-21-93476-23408-4576D:NO_ACCESS_CONTROLS:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)(AU;NPSA;0x12019f;;;SU)" /* Vista */);
}
-
- LocalFree(psid2);
- LocalFree(psid);
}
static void test_SetSecurityDescriptorControl (PSECURITY_DESCRIPTOR sec)
ret = InitializeAcl(pAcl, sizeof(buffer), ACL_REVISION4);
if (GetLastError() != ERROR_INVALID_PARAMETER)
{
- ok(ret, "InitializeAcl(ACL_REVISION4) failed with error %d\n", GetLastError());
+ ok(ret, "InitializeAcl(ACL_REVISION4) failed with error %d\n", GetLastError());
- ret = IsValidAcl(pAcl);
- ok(ret, "IsValidAcl failed with error %d\n", GetLastError());
+ ret = IsValidAcl(pAcl);
+ ok(ret, "IsValidAcl failed with error %d\n", GetLastError());
}
else
win_skip("ACL_REVISION4 is not implemented on NT4\n");
ok(sd != NULL, "GetSecurityInfo\n");
ok(owner != NULL, "GetSecurityInfo\n");
ok(group != NULL, "GetSecurityInfo\n");
- if (dacl != NULL)
- ok(IsValidAcl(dacl), "GetSecurityInfo\n");
- else
- win_skip("No ACL information returned\n");
+ ok(dacl != NULL, "GetSecurityInfo\n");
+ ok(IsValidAcl(dacl), "GetSecurityInfo\n");
LocalFree(sd);
ok(ret == ERROR_SUCCESS, "GetSecurityInfo returned %d\n", ret);
ok(owner != NULL, "GetSecurityInfo\n");
ok(group != NULL, "GetSecurityInfo\n");
- if (dacl != NULL)
- ok(IsValidAcl(dacl), "GetSecurityInfo\n");
- else
- win_skip("No ACL information returned\n");
+ ok(dacl != NULL, "GetSecurityInfo\n");
+ ok(IsValidAcl(dacl), "GetSecurityInfo\n");
CloseHandle(obj);
}
ok(*pGetSidSubAuthority(psid,1) == 93476,"GetSidSubAuthority gave %d expected 93476\n",*pGetSidSubAuthority(psid,1));
ok(GetLastError() == 0,"GetLastError returned %d instead of 0\n",GetLastError());
SetLastError(0xbebecaca);
- ok(pGetSidSubAuthority(psid,4) != NULL,"Expected out of bounds GetSidSubAuthority to return a non-NULL pointer\n");
+ todo_wine ok(*pGetSidSubAuthority(psid,4) == 0,"GetSidSubAuthority gave %d,expected 0\n",*pGetSidSubAuthority(psid,4));
ok(GetLastError() == 0,"GetLastError returned %d instead of 0\n",GetLastError());
LocalFree(psid);
}
-static void test_CheckTokenMembership(void)
-{
- PTOKEN_GROUPS token_groups;
- DWORD size;
- HANDLE process_token, token;
- BOOL is_member;
- BOOL ret;
- DWORD i;
-
- if (!pCheckTokenMembership)
- {
- win_skip("CheckTokenMembership is not available\n");
- return;
- }
- ret = OpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE|TOKEN_QUERY, &process_token);
- ok(ret, "OpenProcessToken failed with error %d\n", GetLastError());
-
- ret = DuplicateToken(process_token, SecurityImpersonation, &token);
- ok(ret, "DuplicateToken failed with error %d\n", GetLastError());
-
- /* groups */
- ret = GetTokenInformation(token, TokenGroups, NULL, 0, &size);
- ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER,
- "GetTokenInformation(TokenGroups) %s with error %d\n",
- ret ? "succeeded" : "failed", GetLastError());
- token_groups = HeapAlloc(GetProcessHeap(), 0, size);
- ret = GetTokenInformation(token, TokenGroups, token_groups, size, &size);
- ok(ret, "GetTokenInformation(TokenGroups) failed with error %d\n", GetLastError());
-
- for (i = 0; i < token_groups->GroupCount; i++)
- {
- if (token_groups->Groups[i].Attributes & SE_GROUP_ENABLED)
- break;
- }
-
- if (i == token_groups->GroupCount)
- {
- HeapFree(GetProcessHeap(), 0, token_groups);
- CloseHandle(token);
- skip("user not a member of any group\n");
- return;
- }
-
- ret = pCheckTokenMembership(token, token_groups->Groups[i].Sid, &is_member);
- ok(ret, "CheckTokenMembership failed with error %d\n", GetLastError());
- ok(is_member, "CheckTokenMembership should have detected sid as member\n");
-
- ret = pCheckTokenMembership(NULL, token_groups->Groups[i].Sid, &is_member);
- ok(ret, "CheckTokenMembership failed with error %d\n", GetLastError());
- ok(is_member, "CheckTokenMembership should have detected sid as member\n");
-
- ret = pCheckTokenMembership(process_token, token_groups->Groups[i].Sid, &is_member);
-todo_wine {
- ok(!ret && GetLastError() == ERROR_NO_IMPERSONATION_TOKEN,
- "CheckTokenMembership with process token %s with error %d\n",
- ret ? "succeeded" : "failed", GetLastError());
- ok(!is_member, "CheckTokenMembership should have cleared is_member\n");
-}
-
- HeapFree(GetProcessHeap(), 0, token_groups);
- CloseHandle(token);
- CloseHandle(process_token);
-}
-
-static void test_EqualSid(void)
-{
- PSID sid1, sid2;
- BOOL ret;
- SID_IDENTIFIER_AUTHORITY SIDAuthWorld = { SECURITY_WORLD_SID_AUTHORITY };
- SID_IDENTIFIER_AUTHORITY SIDAuthNT = { SECURITY_NT_AUTHORITY };
-
- SetLastError(0xdeadbeef);
- ret = AllocateAndInitializeSid(&SIDAuthNT, 2, SECURITY_BUILTIN_DOMAIN_RID,
- DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &sid1);
- if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
- {
- win_skip("AllocateAndInitializeSid is not implemented\n");
- return;
- }
- ok(ret, "AllocateAndInitializeSid failed with error %d\n", GetLastError());
- ok(GetLastError() == 0xdeadbeef,
- "AllocateAndInitializeSid shouldn't have set last error to %d\n",
- GetLastError());
-
- ret = AllocateAndInitializeSid(&SIDAuthWorld, 1, SECURITY_WORLD_RID,
- 0, 0, 0, 0, 0, 0, 0, &sid2);
- ok(ret, "AllocateAndInitializeSid failed with error %d\n", GetLastError());
-
- SetLastError(0xdeadbeef);
- ret = EqualSid(sid1, sid2);
- ok(!ret, "World and domain admins sids shouldn't have been equal\n");
- ok(GetLastError() == ERROR_SUCCESS ||
- broken(GetLastError() == 0xdeadbeef), /* NT4 */
- "EqualSid should have set last error to ERROR_SUCCESS instead of %d\n",
- GetLastError());
-
- SetLastError(0xdeadbeef);
- sid2 = FreeSid(sid2);
- ok(!sid2, "FreeSid should have returned NULL instead of %p\n", sid2);
- ok(GetLastError() == 0xdeadbeef,
- "FreeSid shouldn't have set last error to %d\n",
- GetLastError());
-
- ret = AllocateAndInitializeSid(&SIDAuthNT, 2, SECURITY_BUILTIN_DOMAIN_RID,
- DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &sid2);
- ok(ret, "AllocateAndInitializeSid failed with error %d\n", GetLastError());
-
- SetLastError(0xdeadbeef);
- ret = EqualSid(sid1, sid2);
- ok(ret, "Same sids should have been equal\n");
- ok(GetLastError() == ERROR_SUCCESS ||
- broken(GetLastError() == 0xdeadbeef), /* NT4 */
- "EqualSid should have set last error to ERROR_SUCCESS instead of %d\n",
- GetLastError());
-
- ((SID *)sid2)->Revision = 2;
- SetLastError(0xdeadbeef);
- ret = EqualSid(sid1, sid2);
- ok(!ret, "EqualSid with invalid sid should have returned FALSE\n");
- ok(GetLastError() == ERROR_SUCCESS ||
- broken(GetLastError() == 0xdeadbeef), /* NT4 */
- "EqualSid should have set last error to ERROR_SUCCESS instead of %d\n",
- GetLastError());
- ((SID *)sid2)->Revision = SID_REVISION;
-
- FreeSid(sid1);
- FreeSid(sid2);
-}
-
START_TEST(security)
{
init();
test_acls();
test_GetSecurityInfo();
test_GetSidSubAuthority();
- test_CheckTokenMembership();
- test_EqualSid();
}
static BOOL (WINAPI *pEnumServicesStatusExA)(SC_HANDLE, SC_ENUM_TYPE, DWORD,
DWORD, LPBYTE, DWORD, LPDWORD,
LPDWORD, LPDWORD, LPCSTR);
-static BOOL (WINAPI *pEnumServicesStatusExW)(SC_HANDLE, SC_ENUM_TYPE, DWORD,
- DWORD, LPBYTE, DWORD, LPDWORD,
- LPDWORD, LPDWORD, LPCWSTR);
static DWORD (WINAPI *pGetSecurityInfo)(HANDLE, SE_OBJECT_TYPE, SECURITY_INFORMATION,
PSID*, PSID*, PACL*, PACL*, PSECURITY_DESCRIPTOR*);
static BOOL (WINAPI *pQueryServiceConfig2A)(SC_HANDLE,DWORD,LPBYTE,DWORD,LPDWORD);
pChangeServiceConfig2A = (void*)GetProcAddress(hadvapi32, "ChangeServiceConfig2A");
pEnumServicesStatusExA= (void*)GetProcAddress(hadvapi32, "EnumServicesStatusExA");
- pEnumServicesStatusExW= (void*)GetProcAddress(hadvapi32, "EnumServicesStatusExW");
pGetSecurityInfo = (void *)GetProcAddress(hadvapi32, "GetSecurityInfo");
pQueryServiceConfig2A= (void*)GetProcAddress(hadvapi32, "QueryServiceConfig2A");
pQueryServiceConfig2W= (void*)GetProcAddress(hadvapi32, "QueryServiceConfig2W");
SC_HANDLE scm_handle;
BOOL ret;
DWORD bufsize, needed, returned, resume;
- DWORD neededW, returnedW;
DWORD tempneeded, tempreturned, missing;
DWORD servicecountactive, servicecountinactive;
ENUM_SERVICE_STATUS *services;
"Expected ERROR_MORE_DATA, got %d\n", GetLastError());
}
- /* Test to show we get the same needed buffer size for the W-call */
- neededW = 0xdeadbeef;
- ret = EnumServicesStatusW(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, NULL, 0,
- &neededW, &returnedW, NULL);
- ok(neededW == needed, "Expected needed buffersize to be the same for A- and W-calls\n");
-
/* Store the needed bytes */
tempneeded = needed;
"Expected ERROR_MORE_DATA, got %d\n", GetLastError());
}
- /* Test to show we get the same needed buffer size for the W-call */
- neededW = 0xdeadbeef;
- ret = pEnumServicesStatusExW(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL,
- NULL, 0, &neededW, &returnedW, NULL, NULL);
- ok(neededW == needed, "Expected needed buffersize to be the same for A- and W-calls\n");
-
/* Store the needed bytes */
tempneeded = needed;
extern void func_crypt_md4(void);
extern void func_crypt_md5(void);
extern void func_crypt_sha(void);
-extern void func_eventlog(void);
extern void func_lsa(void);
extern void func_registry(void);
extern void func_security(void);
{ "crypt_md4", func_crypt_md4 },
{ "crypt_md5", func_crypt_md5 },
{ "crypt_sha", func_crypt_sha },
- { "eventlog", func_eventlog },
{ "lsa", func_lsa },
{ "registry", func_registry },
{ "security", func_security },
ok(res == S_OK, "Expected S_OK, got %d\n", res);
if (GetFileAttributes(path) != INVALID_FILE_ATTRIBUTES)
{
- ok(check_ini_file_attr(path), "Expected ini file to be hidden\n");
- ok(DeleteFileA(path), "Expected path to exist\n");
+ ok(check_ini_file_attr(path), "Expected ini file to be hidden\n");
+ ok(DeleteFileA(path), "Expected path to exist\n");
}
else
win_skip("Test file could not be created\n");
}
static int CDECL file_placed(PCCAB pccab, char *pszFile, LONG cbFile,
- BOOL fContinuation, void *pv)
+ BOOL fContinuation, void *pv)
{
return 0;
}
}
static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime,
- USHORT *pattribs, int *err, void *pv)
+ USHORT *pattribs, int *err, void *pv)
{
BY_HANDLE_FILE_INFORMATION finfo;
FILETIME filetime;
}
static int CDECL file_placed(PCCAB pccab, char *pszFile, LONG cbFile,
- BOOL fContinuation, void *pv)
+ BOOL fContinuation, void *pv)
{
return 0;
}
}
static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime,
- USHORT *pattribs, int *err, void *pv)
+ USHORT *pattribs, int *err, void *pv)
{
BY_HANDLE_FILE_INFORMATION finfo;
FILETIME filetime;
}
static int CDECL file_placed(PCCAB pccab, char *pszFile, LONG cbFile,
- BOOL fContinuation, void *pv)
+ BOOL fContinuation, void *pv)
{
return 0;
}
}
static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime,
- USHORT *pattribs, int *err, void *pv)
+ USHORT *pattribs, int *err, void *pv)
{
BY_HANDLE_FILE_INFORMATION finfo;
FILETIME filetime;
/* path doesn't have a trailing backslash */
if (lstrlenA(path) > 2)
{
- hfdi = FDICreate(fdi_alloc, fdi_free, fdi_open, fdi_read,
- fdi_write, fdi_close, fdi_seek,
- cpuUNKNOWN, &erf);
+ hfdi = FDICreate(fdi_alloc, fdi_free, fdi_open, fdi_read,
+ fdi_write, fdi_close, fdi_seek,
+ cpuUNKNOWN, &erf);
- SetLastError(0xdeadbeef);
- ret = FDICopy(hfdi, name, path, 0, CopyProgress, NULL, 0);
- ok(ret == FALSE, "Expected FALSE, got %d\n", ret);
- todo_wine
- {
- ok(GetLastError() == ERROR_INVALID_HANDLE,
- "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
- }
+ SetLastError(0xdeadbeef);
+ ret = FDICopy(hfdi, name, path, 0, CopyProgress, NULL, 0);
+ ok(ret == FALSE, "Expected FALSE, got %d\n", ret);
+ todo_wine
+ {
+ ok(GetLastError() == ERROR_INVALID_HANDLE,
+ "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
+ }
- FDIDestroy(hfdi);
+ FDIDestroy(hfdi);
}
else
skip("Running on a root drive directory.\n");
#include "wine/test.h"
-#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr)
+#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x \n", hr)
static BOOL register_testentry(void)
{
ret = RegCreateKeyA(HKEY_CLASSES_ROOT,"CLSID\\{deadcafe-beed-bead-dead-cafebeaddead}", &hkey);
if (!ret) ret = RegSetValueA(hkey,NULL,REG_SZ,"ComCat Test key",16);
if (!ret) ret = RegCreateKeyA(hkey,
- "Implemented Categories\\{deadcafe-0000-0000-0000-000000000000}",
- &hkey2);
+ "Implemented Categories\\{deadcafe-0000-0000-0000-000000000000}",
+ &hkey2);
RegCloseKey(hkey);
RegCloseKey(hkey2);
return !ret;
CLSIDFromString(szCatID,the_cat);
CLSIDFromString(szGuid,&wanted_guid);
-
+
OleInitialize(NULL);
hr = CoCreateInstance(rclsid,NULL,CLSCTX_INPROC_SERVER,
hr = IEnumGUID_Next(pIEnum,1,the_guid, &fetched);
ok (fetched == 0,"Fetched wrong number of guids %u\n",fetched);
IEnumGUID_Release(pIEnum);
-
+
if (register_testentry())
{
hr = ICatInformation_EnumClassesOfCategories(pICat, 1, the_cat, -1, NULL, &pIEnum);
- ok_ole_success(hr,"ICatInformation_EnumClassesOfCategories");
+ ok_ole_success(hr,"ICatInformation_EnumClassesOfCategories");
- hr = IEnumGUID_Next(pIEnum,1,the_guid, &fetched);
- ok (fetched == 1,"Fetched wrong number of guids %u\n",fetched);
- ok (IsEqualGUID(the_guid,&wanted_guid),"Guids do not match\n");
+ hr = IEnumGUID_Next(pIEnum,1,the_guid, &fetched);
+ ok (fetched == 1,"Fetched wrong number of guids %u\n",fetched);
+ ok (IsEqualGUID(the_guid,&wanted_guid),"Guids do not match\n");
- IEnumGUID_Release(pIEnum);
- unregister_testentry();
+ IEnumGUID_Release(pIEnum);
+ unregister_testentry();
}
else skip( "Could not register the test category\n" );
flush_sequences(sequences, NUM_MSG_SEQUENCES);
- /* msdn incorrectly states that return value
- * is the index of the filter control being
- * modified. The sendMessage here should
- * return previous filter timeout value
+ /* msdn incorrectly states that return value
+ * is the index of the filter control being
+ * modified. The sendMessage here should
+ * return previous filter timeout value
*/
- retVal = SendMessage(hChild, HDM_SETFILTERCHANGETIMEOUT, 1, 100);
+ retVal = SendMessage(hChild, HDM_SETFILTERCHANGETIMEOUT, 1, 100);
expect(timeout, retVal);
todo_wine
expect(1, retVal);
retVal = SendMessage(hChild, HDM_EDITFILTER, 1, 0);
expect(1, retVal);
- }
+ }
if (winetest_interactive)
ok_sequence(sequences, HEADER_SEQ_INDEX, filterMessages_seq_interactive,
"filterMessages sequence testing", TRUE);
#include "wine/test.h"
#include "msg.h"
-#define PARENT_SEQ_INDEX 0
+#define PARENT_SEQ_INDEX 0
#define PARENT_FULL_SEQ_INDEX 1
#define LISTVIEW_SEQ_INDEX 2
#define NUM_MSG_SEQUENCES 3
hwnd = create_listview_control(0);
for (i=0;i<items;i++) {
insert_item(hwnd, 0);
- }
+}
item_count = (int)SendMessage(hwnd, LVM_GETITEMCOUNT, 0, 0);
expect(items,item_count);
/* deselect all items */
if (sizeof(title_hits) / sizeof(title_hits[0]) <= title_index)
break;
todo_wine {expect(title_hits[title_index], res);}
- }
+}
}
todo_wine {ok(300 <= x && title_index + 1 == sizeof(title_hits) / sizeof(title_hits[0]),
"Wrong title layout\n");}
printf("%s{ {%3d, %3d, %3d, %3d}, 0x%02x, %d}, ", (i%2==0 ? "\n " : ""), r.left, r.top, r.right, r.bottom,
rbi.fStyle, rbi.cx);
}
- printf("\n }, },\n");
+ printf("\n }, }, \n");
}
#define check_sizes() dump_sizes(hRebar);
expect(16,LOWORD(r));
expect(0,HIWORD(r));
r = SendMessage(hWndStatus, SB_GETTEXT, 2, (LPARAM) charArray);
- ok(strcmp(charArray,"InvalidChars\\n ") == 0, "Expected InvalidChars\\n , got %s\n", charArray);
+ ok(strcmp(charArray,"InvalidChars\\n ") == 0, "Expected InvalidChars\\n , got %s\n", charArray);
expect(15,LOWORD(r));
expect(0,HIWORD(r));
/* Testing Flat Separators */
extendedStyle = SendMessage(hTab, TCM_GETEXTENDEDSTYLE, 0, 0);
prevExtendedStyle = SendMessage(hTab, TCM_SETEXTENDEDSTYLE, 0, TCS_EX_FLATSEPARATORS);
- expect(extendedStyle, prevExtendedStyle);
+ expect(extendedStyle, prevExtendedStyle);
extendedStyle = SendMessage(hTab, TCM_GETEXTENDEDSTYLE, 0, 0);
- expect(TCS_EX_FLATSEPARATORS, extendedStyle);
+ expect(TCS_EX_FLATSEPARATORS, extendedStyle);
/* Testing Register Drop */
prevExtendedStyle = SendMessage(hTab, TCM_SETEXTENDEDSTYLE, 0, TCS_EX_REGISTERDROP);
SendMessageA(hToolbar, TB_GETITEMRECT, i, &r);
printf("%s{%3d, %3d, %3d, %3d}, ", (i%3==0 ? "\n " : ""), r.left, r.top, r.right, r.bottom);
}
- printf("\n }, },\n");
+ printf("\n }, }, \n");
}
#define check_sizes() dump_sizes(hToolbar);
/* test TBM_GETPAGESIZE */
r = SendMessage(hWndTrackbar, TBM_GETPAGESIZE, 0,0);
- expect(20, r);
+ expect(20, r);
ok_sequence(sequences, TRACKBAR_SEQ_INDEX, page_size_test_seq, "page size test sequence", FALSE);
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_empty_test_seq, "parent page size test sequence", FALSE);
/* test TBM_GETTICPIC */
r = SendMessage(hWndTrackbar, TBM_GETTICPOS, 0, 0);
- ok(r > 0, "Expected r > 0, got %d\n", r);
+ ok(r > 0, "Expected r > 0, got %d\n", r);
r = SendMessage(hWndTrackbar, TBM_GETTICPOS, 2, 0);
- ok(r > 0, "Expected r > 0, got %d\n", r);
+ ok(r > 0, "Expected r > 0, got %d\n", r);
ok_sequence(sequences, TRACKBAR_SEQ_INDEX, tic_placement_test_seq, "get tic placement test sequence", FALSE);
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_empty_test_seq, "parent get tic placement test sequence", FALSE);
{
COLORREF crColor = RGB(0,0,0);
- /* If the value is -1, the control is using the system color for the background color. */
- crColor = (COLORREF)SendMessage( hTree, TVM_GETBKCOLOR, 0, 0 );
- ok(crColor == -1, "Default background color reported as 0x%.8x\n", crColor);
+ /* If the value is -1, the control is using the system color for the background color. */
+ crColor = (COLORREF)SendMessage( hTree, TVM_GETBKCOLOR, 0, 0 );
+ ok(crColor == -1, "Default background color reported as 0x%.8x\n", crColor);
/* Test for black background */
SendMessage( hTree, TVM_SETBKCOLOR, 0, (LPARAM)RGB(0,0,0) );
NMTVDISPINFOA *disp = (NMTVDISPINFOA *)lParam;
if (disp->item.mask & TVIF_TEXT) {
lstrcpyn(disp->item.pszText, TEST_CALLBACK_TEXT, disp->item.cchTextMax);
- }
+ }
return 0;
- }
+ }
}
}
return 0;
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
ok(asmenum == (IAssemblyEnum *)0xdeadbeef,
"Expected asmenum to be unchanged, got %p\n", asmenum);
-
- IAssemblyName_Release(asmname);
}
typedef struct _tagASMNAME
ok(name != NULL, "Expected non-NULL name\n");
size = MAX_PATH;
- str[0] = '\0';
hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_FULL);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
todo_wine
"Expected FUSION_E_INVALID_NAME, got %08x\n", hr);
ok(name == (IAssemblyName *)0xdeadbeef, "Expected 0xdeadbeef, got %p\n", name);
}
- if(SUCCEEDED(hr)) IAssemblyName_Release(name);
/* no '=' */
to_widechar(namestr, "wine, PublicKeyToken");
{
ret = GetObject(hbm, 0, NULL);
ok(ret == sizeof(bm), "wrong size %d\n", ret);
- }
+}
}
static void test_createdibitmap(void)
bmih.biPlanes = 1;
bmih.biBitCount = 32;
bmih.biCompression = BI_RGB;
-
+
hbm = CreateDIBitmap(hdc, NULL, CBM_INIT, NULL, NULL, 0);
ok(hbm == NULL, "CreateDIBitmap should fail\n");
hbm = CreateDIBitmap(hdc, NULL, 0, NULL, NULL, 0);
hbmp = CreateBitmap(0x7ffffff + 1, 1, 1, 1, NULL);
ok(!hbmp || broken(hbmp != NULL /* Win9x */), "CreateBitmap should fail\n");
if (!hbmp)
- ok(GetLastError() == ERROR_INVALID_PARAMETER,
- "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_PARAMETER,
+ "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
else
DeleteObject(hbmp);
break;
}
}
- ok(equalContents, "GetDIBits with %d bpp DIB selected in DC: Invalid DIB bits\n",bpp);
+ ok(equalContents, "GetDIBits with %d bpp DIB selected in DC: Invalid DIB bits\n",bpp);
HeapFree(GetProcessHeap(), 0, bits2);
DeleteDC(dc);
{
ok(ret == 1, "GetDIBits failed ret %u err %u\n",ret,GetLastError());
- ok( !bitmasks[0], "red mask is set\n" );
- ok( !bitmasks[1], "green mask is set\n" );
- ok( !bitmasks[2], "blue mask is set\n" );
- ok( dibinfo->bmiHeader.biSizeImage != 0xdeadbeef, "size image not set\n" );
+ ok( !bitmasks[0], "red mask is set\n" );
+ ok( !bitmasks[1], "green mask is set\n" );
+ ok( !bitmasks[2], "blue mask is set\n" );
+ ok( dibinfo->bmiHeader.biSizeImage != 0xdeadbeef, "size image not set\n" );
- memset(bitmasks, 0, 3*sizeof(DWORD));
- dibinfo->bmiHeader.biSizeImage = 0xdeadbeef;
- ret = GetDIBits(hdc, hbm, 0, 0, bits, dibinfo, DIB_RGB_COLORS);
- ok(ret == 1, "GetDIBits failed ret %u err %u\n",ret,GetLastError());
+ memset(bitmasks, 0, 3*sizeof(DWORD));
+ dibinfo->bmiHeader.biSizeImage = 0xdeadbeef;
+ ret = GetDIBits(hdc, hbm, 0, 0, bits, dibinfo, DIB_RGB_COLORS);
+ ok(ret == 1, "GetDIBits failed ret %u err %u\n",ret,GetLastError());
- ok( bitmasks[0] != 0, "red mask is not set\n" );
- ok( bitmasks[1] != 0, "green mask is not set\n" );
- ok( bitmasks[2] != 0, "blue mask is not set\n" );
- ok( dibinfo->bmiHeader.biSizeImage != 0xdeadbeef, "size image not set\n" );
- }
+ ok( bitmasks[0] != 0, "red mask is not set\n" );
+ ok( bitmasks[1] != 0, "green mask is not set\n" );
+ ok( bitmasks[2] != 0, "blue mask is not set\n" );
+ ok( dibinfo->bmiHeader.biSizeImage != 0xdeadbeef, "size image not set\n" );
+ }
}
else skip("not in 16 bpp BI_BITFIELDS mode, skipping that test\n");
HRGN hrgn;
XFORM xform;
- if (0) /* crashes under Win9x */
- {
- SetLastError(0xdeadbeef);
- hrgn = ExtCreateRegion(NULL, 0, NULL);
- ok(!hrgn, "ExtCreateRegion should fail\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
- }
+if (0) /* crashes under Win9x */
+{
+ SetLastError(0xdeadbeef);
+ hrgn = ExtCreateRegion(NULL, 0, NULL);
+ ok(!hrgn, "ExtCreateRegion should fail\n");
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "ERROR_INVALID_PARAMETER, got %u\n", GetLastError());
+}
rgn.data.rdh.dwSize = 0;
rgn.data.rdh.iType = 0;
"ExtCreateRegion error %u\n", GetLastError());
if(hrgn)
{
- verify_region(hrgn, &rc);
- DeleteObject(hrgn);
+ verify_region(hrgn, &rc);
+ DeleteObject(hrgn);
}
xform.eM11 = 0.5; /* 50% width */
old_hfont = SelectObject(hdc, hfont);
test_font_metrics(hdc, hfont, bitmap_lf.lfHeight, 0, test_str, sizeof(test_str), &tm_orig, &size_orig, width_orig, 1, scale);
SelectObject(hdc, old_hfont);
- DeleteObject(hfont);
+ DeleteObject(hfont);
}
/* test integer scaling 3x2 */
if(fd[i].dpi == tm.tmDigitizedAspectX)
{
trace("found font %s, height %d charset %x dpi %d\n", lf.lfFaceName, lf.lfHeight, lf.lfCharSet, fd[i].dpi);
- ok(tm.tmWeight == fd[i].weight, "%s(%d): tm.tmWeight %d != %d\n", fd[i].face_name, fd[i].height, tm.tmWeight, fd[i].weight);
- ok(tm.tmHeight == fd[i].height, "%s(%d): tm.tmHeight %d != %d\n", fd[i].face_name, fd[i].height, tm.tmHeight, fd[i].height);
- ok(tm.tmAscent == fd[i].ascent, "%s(%d): tm.tmAscent %d != %d\n", fd[i].face_name, fd[i].height, tm.tmAscent, fd[i].ascent);
- ok(tm.tmDescent == fd[i].descent, "%s(%d): tm.tmDescent %d != %d\n", fd[i].face_name, fd[i].height, tm.tmDescent, fd[i].descent);
- ok(tm.tmInternalLeading == fd[i].int_leading, "%s(%d): tm.tmInternalLeading %d != %d\n", fd[i].face_name, fd[i].height, tm.tmInternalLeading, fd[i].int_leading);
- ok(tm.tmExternalLeading == fd[i].ext_leading, "%s(%d): tm.tmExternalLeading %d != %d\n", fd[i].face_name, fd[i].height, tm.tmExternalLeading, fd[i].ext_leading);
- ok(tm.tmAveCharWidth == fd[i].ave_char_width, "%s(%d): tm.tmAveCharWidth %d != %d\n", fd[i].face_name, fd[i].height, tm.tmAveCharWidth, fd[i].ave_char_width);
-
- /* Don't run the max char width test on System/ANSI_CHARSET. We have extra characters in our font
- that make the max width bigger */
- if(strcmp(lf.lfFaceName, "System") || lf.lfCharSet != ANSI_CHARSET)
- ok(tm.tmMaxCharWidth == fd[i].max_char_width, "%s(%d): tm.tmMaxCharWidth %d != %d\n", fd[i].face_name, fd[i].height, tm.tmMaxCharWidth, fd[i].max_char_width);
+ ok(tm.tmWeight == fd[i].weight, "%s(%d): tm.tmWeight %d != %d\n", fd[i].face_name, fd[i].height, tm.tmWeight, fd[i].weight);
+ ok(tm.tmHeight == fd[i].height, "%s(%d): tm.tmHeight %d != %d\n", fd[i].face_name, fd[i].height, tm.tmHeight, fd[i].height);
+ ok(tm.tmAscent == fd[i].ascent, "%s(%d): tm.tmAscent %d != %d\n", fd[i].face_name, fd[i].height, tm.tmAscent, fd[i].ascent);
+ ok(tm.tmDescent == fd[i].descent, "%s(%d): tm.tmDescent %d != %d\n", fd[i].face_name, fd[i].height, tm.tmDescent, fd[i].descent);
+ ok(tm.tmInternalLeading == fd[i].int_leading, "%s(%d): tm.tmInternalLeading %d != %d\n", fd[i].face_name, fd[i].height, tm.tmInternalLeading, fd[i].int_leading);
+ ok(tm.tmExternalLeading == fd[i].ext_leading, "%s(%d): tm.tmExternalLeading %d != %d\n", fd[i].face_name, fd[i].height, tm.tmExternalLeading, fd[i].ext_leading);
+ ok(tm.tmAveCharWidth == fd[i].ave_char_width, "%s(%d): tm.tmAveCharWidth %d != %d\n", fd[i].face_name, fd[i].height, tm.tmAveCharWidth, fd[i].ave_char_width);
+
+ /* Don't run the max char width test on System/ANSI_CHARSET. We have extra characters in our font
+ that make the max width bigger */
+ if(strcmp(lf.lfFaceName, "System") || lf.lfCharSet != ANSI_CHARSET)
+ ok(tm.tmMaxCharWidth == fd[i].max_char_width, "%s(%d): tm.tmMaxCharWidth %d != %d\n", fd[i].face_name, fd[i].height, tm.tmMaxCharWidth, fd[i].max_char_width);
}
SelectObject(hdc, old_hfont);
DeleteObject(hfont);
if(ret)
{
get_charset_statsW(&efdw, &ansi_charset, &symbol_charset, &russian_charset);
- trace("enumerated ansi %d, symbol %d, russian %d fonts for NULL\n",
- ansi_charset, symbol_charset, russian_charset);
+ trace("enumerated ansi %d, symbol %d, russian %d fonts for NULL\n",
+ ansi_charset, symbol_charset, russian_charset);
ok(efdw.total > 0, "fonts enumerated: NULL\n");
- ok(ansi_charset > 0, "NULL family should enumerate ANSI_CHARSET\n");
- ok(symbol_charset > 0, "NULL family should enumerate SYMBOL_CHARSET\n");
+ ok(ansi_charset > 0, "NULL family should enumerate ANSI_CHARSET\n");
+ ok(symbol_charset > 0, "NULL family should enumerate SYMBOL_CHARSET\n");
ok(russian_charset > 0 ||
broken(russian_charset == 0), /* NT4 */
"NULL family should enumerate RUSSIAN_CHARSET\n");
if(ret)
{
get_charset_statsW(&efdw, &ansi_charset, &symbol_charset, &russian_charset);
- trace("enumerated ansi %d, symbol %d, russian %d fonts for NULL\n",
- ansi_charset, symbol_charset, russian_charset);
+ trace("enumerated ansi %d, symbol %d, russian %d fonts for NULL\n",
+ ansi_charset, symbol_charset, russian_charset);
ok(efdw.total > 0, "fonts enumerated: NULL\n");
- ok(ansi_charset > 0, "NULL family should enumerate ANSI_CHARSET\n");
- ok(symbol_charset > 0, "NULL family should enumerate SYMBOL_CHARSET\n");
- ok(russian_charset > 0, "NULL family should enumerate RUSSIAN_CHARSET\n");
- }
+ ok(ansi_charset > 0, "NULL family should enumerate ANSI_CHARSET\n");
+ ok(symbol_charset > 0, "NULL family should enumerate SYMBOL_CHARSET\n");
+ ok(russian_charset > 0, "NULL family should enumerate RUSSIAN_CHARSET\n");
+ }
}
efd.total = 0;
USHORT version;
TEXTMETRICW tmW;
- version = GET_BE_WORD(tt_os2.version);
+ version = GET_BE_WORD(tt_os2.version);
os2_first_char = GET_BE_WORD(tt_os2.usFirstCharIndex);
os2_last_char = GET_BE_WORD(tt_os2.usLastCharIndex);
- default_char = GET_BE_WORD(tt_os2.usDefaultChar);
- break_char = GET_BE_WORD(tt_os2.usBreakChar);
+ default_char = GET_BE_WORD(tt_os2.usDefaultChar);
+ break_char = GET_BE_WORD(tt_os2.usBreakChar);
trace("font %s charset %u: %x-%x (%x-%x) default %x break %x OS/2 version %u vendor %4.4s\n",
font_name, lf->lfCharSet, os2_first_char, os2_last_char, cmap_first, cmap_last,
default_char, break_char, version, (LPCSTR)&tt_os2.achVendID);
if (cmap_type == cmap_ms_symbol || (cmap_first >= 0xf000 && cmap_first < 0xf100))
- {
+ {
expect_first_W = 0;
switch(GetACP())
{
break;
default:
expect_last_W = 0xf0ff;
- }
+ }
expect_break_W = 0x20;
expect_default_W = expect_break_W - 1;
expect_first_A = 0x1e;
expect_last_A = min(os2_last_char - os2_first_char + 0x20, 0xff);
}
- else
- {
+ else
+ {
expect_first_W = cmap_first;
expect_last_W = min(cmap_last, os2_last_char);
if(os2_first_char <= 1)
expect_default_W = expect_break_W - 1;
expect_first_A = expect_default_W - 1;
expect_last_A = min(expect_last_W, 0xff);
- }
+ }
expect_break_A = expect_break_W;
expect_default_A = expect_default_W;
font_name, tmA.tmDefaultChar, expect_default_A);
- SetLastError(0xdeadbeef);
- ret = GetTextMetricsW(hdc, &tmW);
- ok(ret || GetLastError() == ERROR_CALL_NOT_IMPLEMENTED,
- "GetTextMetricsW error %u\n", GetLastError());
- if (ret)
- {
+ SetLastError(0xdeadbeef);
+ ret = GetTextMetricsW(hdc, &tmW);
+ ok(ret || GetLastError() == ERROR_CALL_NOT_IMPLEMENTED,
+ "GetTextMetricsW error %u\n", GetLastError());
+ if (ret)
+ {
/* Wine uses the os2 first char */
if(cmap_first != os2_first_char && cmap_type != cmap_ms_symbol)
todo_wine ok(tmW.tmFirstChar == expect_first_W, "W: tmFirstChar for %s got %02x expected %02x\n",
font_name, tmW.tmDefaultChar, expect_default_W);
/* Test the aspect ratio while we have tmW */
- ret = GetDeviceCaps(hdc, LOGPIXELSX);
- ok(tmW.tmDigitizedAspectX == ret, "W: tmDigitizedAspectX %u != %u\n",
- tmW.tmDigitizedAspectX, ret);
- ret = GetDeviceCaps(hdc, LOGPIXELSY);
- ok(tmW.tmDigitizedAspectX == ret, "W: tmDigitizedAspectY %u != %u\n",
- tmW.tmDigitizedAspectX, ret);
- }
+ ret = GetDeviceCaps(hdc, LOGPIXELSX);
+ ok(tmW.tmDigitizedAspectX == ret, "W: tmDigitizedAspectX %u != %u\n",
+ tmW.tmDigitizedAspectX, ret);
+ ret = GetDeviceCaps(hdc, LOGPIXELSY);
+ ok(tmW.tmDigitizedAspectX == ret, "W: tmDigitizedAspectY %u != %u\n",
+ tmW.tmDigitizedAspectX, ret);
+ }
}
/* test FF_ values */
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
<module name="gdi32_winetest" type="win32cui" installbase="bin" installname="gdi32_winetest.exe" allowwarnings="true">
- <include base="gdi32_winetest">.</include>
+ <include base="gdi32_winetest">.</include>
<define name="__ROS_LONG64__" />
- <library>ntdll</library>
- <library>gdi32</library>
- <library>user32</library>
- <library>advapi32</library>
- <file>bitmap.c</file>
- <file>brush.c</file>
- <file>clipping.c</file>
- <file>dc.c</file>
- <file>gdiobj.c</file>
- <file>generated.c</file>
- <file>icm.c</file>
- <file>font.c</file>
- <file>mapping.c</file>
- <file>metafile.c</file>
- <file>palette.c</file>
- <file>path.c</file>
- <file>pen.c</file>
- <file>testlist.c</file>
+ <library>ntdll</library>
+ <library>gdi32</library>
+ <library>user32</library>
+ <library>advapi32</library>
+ <file>bitmap.c</file>
+ <file>brush.c</file>
+ <file>clipping.c</file>
+ <file>dc.c</file>
+ <file>gdiobj.c</file>
+ <file>generated.c</file>
+ <file>icm.c</file>
+ <file>font.c</file>
+ <file>mapping.c</file>
+ <file>metafile.c</file>
+ <file>palette.c</file>
+ <file>path.c</file>
+ <file>pen.c</file>
+ <file>testlist.c</file>
</module>
# ifdef TYPE_ALIGNMENT
# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align);
-# else
+#else
# define TEST_TYPE_ALIGN(type, align)
-# endif
+#endif
# ifdef _TYPE_ALIGNMENT
# define TEST_TARGET_ALIGN(type, align) C_ASSERT(_TYPE_ALIGNMENT(*(type)0) == align);
# define TEST_FIELD_ALIGN(type, field, align) C_ASSERT(_TYPE_ALIGNMENT(((type*)0)->field) == align);
-# else
+#else
# define TEST_TARGET_ALIGN(type, align)
# define TEST_FIELD_ALIGN(type, field, align)
-# endif
+#endif
# define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset);
{
int diff;
- ok(emr1->iType == emr2->iType, "%s: emr->iType %u != %u\n",
- desc, emr1->iType, emr2->iType);
+ ok(emr1->iType == emr2->iType, "%s: emr->iType %u != %u\n",
+ desc, emr1->iType, emr2->iType);
- ok(emr1->nSize == emr2->nSize, "%s: emr->nSize %u != %u\n",
- desc, emr1->nSize, emr2->nSize);
+ ok(emr1->nSize == emr2->nSize, "%s: emr->nSize %u != %u\n",
+ desc, emr1->nSize, emr2->nSize);
/* iType and nSize mismatches are fatal */
if (emr1->iType != emr2->iType || emr1->nSize != emr2->nSize) return FALSE;
{
dump_EMREXTTEXTOUT(eto1);
dump_EMREXTTEXTOUT(eto2);
- }
+ }
HeapFree(GetProcessHeap(), 0, eto1);
HeapFree(GetProcessHeap(), 0, eto2);
}
else
diff = memcmp(emr1, emr2, emr1->nSize);
- ok(diff == 0, "%s: contents of record %u don't match\n", desc, emr1->iType);
+ ok(diff == 0, "%s: contents of record %u don't match\n", desc, emr1->iType);
if (diff)
{
broken(mfsize == bsize - diff_nt4) || /* NT4 */
broken(mfsize == bsize - diff_9x), /* Win9x/WinME */
"%s: mfsize=%d, bsize=%d\n", desc, mfsize, bsize);
- }
- else
+ }
+ else
ok(bsize >= MF_BUFSIZE, "%s: mfsize > bufsize (%d bytes), bsize=%d\n",
desc, mfsize, bsize);
WCHAR itsName[LF_FACESIZE];
GpStatus stat;
- /* FontFamily cannot be NULL */
+ /* FontFamily can not be NULL */
stat = GdipCreateFontFamilyFromName (arial , NULL, NULL);
expect (InvalidParameter, stat);
stat = GdipGetFamilyName (family, itsName, LANG_NEUTRAL);
expect (Ok, stat);
- expect (0, lstrcmpiW(itsName, arial));
+ expect (0, lstrcmpiW(itsName,arial));
if (0)
{
GdipCreateFromHDC(hdc, &graphics1);
GdipSetInterpolationMode(graphics1, InterpolationModeBilinear);
stat = GdipSaveGraphics(graphics1, &state_a);
- expect(Ok, stat);
+ expect(Ok, stat);
GdipSetInterpolationMode(graphics1, InterpolationModeBicubic);
stat = GdipRestoreGraphics(graphics1, state_a);
- expect(Ok, stat);
+ expect(Ok, stat);
GdipGetInterpolationMode(graphics1, &mode);
todo_wine
expect(InterpolationModeBilinear, mode);
GdipSaveGraphics(graphics1, &state_b);
GdipSetInterpolationMode(graphics1, InterpolationModeNearestNeighbor);
stat = GdipRestoreGraphics(graphics1, 0xdeadbeef);
- expect(Ok, stat);
+ expect(Ok, stat);
GdipRestoreGraphics(graphics1, state_b);
GdipGetInterpolationMode(graphics1, &mode);
todo_wine
DEFINE_EXPECT(BindToStorage);
DEFINE_EXPECT(GetDisplayName);
+static const char *debugstr_w(LPCWSTR str)
+{
+ static char buf[1024];
+ if(!str)
+ return "(null)";
+ WideCharToMultiByte(CP_ACP, 0, str, -1, buf, sizeof(buf), NULL, NULL);
+ return buf;
+}
+
static const char *debugstr_guid(REFIID riid)
{
static char buf[50];
static void test_HlinkIsShortcut(void)
{
- UINT i;
+ int i;
HRESULT hres;
static const WCHAR file0[] = {'f','i','l','e',0};
hres = IHttpNegotiate_BeginningTransaction(http_negotiate, (void*)0xdeadbeef, (void*)0xdeadbeef,
0, &headers);
ok(hres == S_OK, "BeginningTransaction failed: %08x\n", hres);
- ok(!lstrcmpW(headers, headersexW), "unexpected headers %s\n", wine_dbgstr_w(headers));
+ ok(!lstrcmpW(headers, headersexW), "unexpected headers \"%s\"\n", debugstr_w(headers));
CoTaskMemFree(headers);
headers = (void*)0xdeadbeef;
hres = IHttpNegotiate_OnResponse(http_negotiate, 200, (void*)0xdeadbeef, (void*)0xdeadbeef, &headers);
ok(hres == S_OK, "OnResponse failed: %08x\n", hres);
- ok(headers == NULL, "unexpected headers %s\n", wine_dbgstr_w(headers));
+ ok(headers == NULL, "unexpected headers \"%s\"\n", debugstr_w(headers));
IHttpNegotiate_Release(http_negotiate);
IAuthenticate_Release(authenticate);
hres = IMoniker_GetDisplayName(mon, bctx, 0, &name);
ok(hres == S_OK, "GetDiasplayName failed: %08x\n", hres);
- ok(!lstrcmpW(name, winehq_urlW), "wrong display name %s\n", wine_dbgstr_w(name));
+ ok(!lstrcmpW(name, winehq_urlW), "wrong display name %s\n", debugstr_w(name));
CoTaskMemFree(name);
hres = IMoniker_IsSystemMoniker(mon, &issys);
hres = IMoniker_GetDisplayName(mon, bctx, 0, &name);
ok(hres == S_OK, "GetDiasplayName failed: %08x\n", hres);
- ok(!lstrcmpW(name, invalid_urlW), "wrong display name %s\n", wine_dbgstr_w(name));
+ ok(!lstrcmpW(name, invalid_urlW), "wrong display name %s\n", debugstr_w(name));
CoTaskMemFree(name);
hres = IMoniker_IsSystemMoniker(mon, &issys);
ok(hres == S_OK, "IsSystemMoniker failed: %08x\n", hres);
ok(issys == MKSYS_FILEMONIKER, "issys=%x\n", issys);
- IMoniker_Release(mon);
IBindCtx_Release(bctx);
}
IBindCtx_Release(bctx);
}
-static void test_HlinkGetSetMonikerReference(void)
-{
- IMoniker *found_trgt, *dummy, *dummy2;
- IHlink *hlink;
- HRESULT hres;
- const WCHAR one[] = {'1',0};
- const WCHAR two[] = {'2',0};
- const WCHAR name[] = {'a',0};
- WCHAR *found_loc;
-
- /* create two dummy monikers to use as targets */
- hres = CreateItemMoniker(one, one, &dummy);
- ok(hres == S_OK, "CreateItemMoniker failed: 0x%08x\n", hres);
-
- hres = CreateItemMoniker(two, two, &dummy2);
- ok(hres == S_OK, "CreateItemMoniker failed: 0x%08x\n", hres);
-
- /* create a new hlink: target => dummy, location => one */
- hres = HlinkCreateFromMoniker(dummy, one, name, NULL, 0, NULL, &IID_IHlink, (void**)&hlink);
- ok(hres == S_OK, "HlinkCreateFromMoniker failed: 0x%08x\n", hres);
-
- /* validate the target and location */
- hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc);
- ok(hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08x\n", hres);
- ok(found_trgt == dummy, "Found target should've been %p, was: %p\n", dummy, found_trgt);
- ok(lstrcmpW(found_loc, one) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(found_loc));
- IMoniker_Release(found_trgt);
- CoTaskMemFree(found_loc);
-
- /* set location => two */
- hres = IHlink_SetMonikerReference(hlink, HLINKSETF_LOCATION, dummy2, two);
- ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08x\n", hres);
-
- hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc);
- ok(found_trgt == dummy, "Found target should've been %p, was: %p\n", dummy, found_trgt);
- ok(lstrcmpW(found_loc, two) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(two), wine_dbgstr_w(found_loc));
- IMoniker_Release(found_trgt);
- CoTaskMemFree(found_loc);
-
- /* set target => dummy2 */
- hres = IHlink_SetMonikerReference(hlink, HLINKSETF_TARGET, dummy2, one);
- ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08x\n", hres);
-
- hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc);
- ok(found_trgt == dummy2, "Found target should've been %p, was: %p\n", dummy2, found_trgt);
- ok(lstrcmpW(found_loc, two) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(two), wine_dbgstr_w(found_loc));
- IMoniker_Release(found_trgt);
- CoTaskMemFree(found_loc);
-
- /* set target => dummy, location => one */
- hres = IHlink_SetMonikerReference(hlink, HLINKSETF_TARGET | HLINKSETF_LOCATION, dummy, one);
- ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08x\n", hres);
-
- hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc);
- ok(found_trgt == dummy, "Found target should've been %p, was: %p\n", dummy, found_trgt);
- ok(lstrcmpW(found_loc, one) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(found_loc));
- IMoniker_Release(found_trgt);
- CoTaskMemFree(found_loc);
-
- /* no HLINKSETF flags */
- hres = IHlink_SetMonikerReference(hlink, 0, dummy2, two);
- ok(hres == E_INVALIDARG, "IHlink_SetMonikerReference should've failed with E_INVALIDARG (0x%08x), failed with 0x%08x\n", E_INVALIDARG, hres);
-
- hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc);
- ok(found_trgt == dummy, "Found target should've been %p, was: %p\n", dummy, found_trgt);
- ok(lstrcmpW(found_loc, one) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(found_loc));
- IMoniker_Release(found_trgt);
- CoTaskMemFree(found_loc);
-
- /* invalid HLINKSETF flags */
- hres = IHlink_SetMonikerReference(hlink, 12, dummy2, two);
- ok(hres == 12, "IHlink_SetMonikerReference should've failed with 0x%08x, failed with 0x%08x\n", 12, hres);
-
- hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc);
- ok(found_trgt == dummy, "Found target should've been %p, was: %p\n", dummy, found_trgt);
- ok(lstrcmpW(found_loc, one) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(found_loc));
- IMoniker_Release(found_trgt);
- CoTaskMemFree(found_loc);
-
- /* valid & invalid HLINKSETF flags */
- hres = IHlink_SetMonikerReference(hlink, 12 | HLINKSETF_TARGET, dummy2, two);
- ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08x\n", hres);
-
- hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc);
- ok(found_trgt == dummy2, "Found target should've been %p, was: %p\n", dummy2, found_trgt);
- ok(lstrcmpW(found_loc, one) == 0, "Found location should've been %s, was: %s\n", wine_dbgstr_w(one), wine_dbgstr_w(found_loc));
- IMoniker_Release(found_trgt);
- CoTaskMemFree(found_loc);
-
- /* NULL args */
- hres = IHlink_SetMonikerReference(hlink, HLINKSETF_TARGET | HLINKSETF_LOCATION, NULL, NULL);
- ok(hres == S_OK, "IHlink_SetMonikerReference failed: 0x%08x\n", hres);
-
- hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &found_trgt, &found_loc);
- ok(found_trgt == NULL, "Found target should've been %p, was: %p\n", NULL, found_trgt);
- ok(found_loc == NULL, "Found location should've been %s, was: %s\n", wine_dbgstr_w(NULL), wine_dbgstr_w(found_loc));
- if(found_trgt)
- IMoniker_Release(found_trgt);
-
- IHlink_Release(hlink);
- IMoniker_Release(dummy2);
- IMoniker_Release(dummy);
-}
-
START_TEST(hlink)
{
CoInitialize(NULL);
test_HlinkCreateExtensionServices();
test_HlinkParseDisplayName();
test_HlinkResolveMonikerForData();
- test_HlinkGetSetMonikerReference();
CoUninitialize();
}
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
<module name="icmp_winetest" type="win32cui" installbase="bin" installname="icmp_winetest.exe" allowwarnings="true">
- <include base="icmp_winetest">.</include>
+ <include base="icmp_winetest">.</include>
<define name="__ROS_LONG64__" />
- <library>ntdll</library>
- <library>icmp</library>
- <file>icmp.c</file>
- <file>testlist.c</file>
+ <library>ntdll</library>
+ <library>icmp</library>
+ <file>icmp.c</file>
+ <file>testlist.c</file>
</module>
ok(len*sizeof(WCHAR)==wlen,"GCS_COMPATTR(W) not returning correct count\n");
len = ImmGetCompositionStringA(imc, GCS_COMPATTR, NULL, 0);
ok(len==alen,"GCS_COMPATTR(A) not returning correct count\n");
- }
+}
ImmReleaseContext(hwnd, imc);
}
SIZE_T size;
BOOL b;
- b = pQueryActCtxW(QUERY_ACTCTX_FLAG_NO_ADDREF, handle, NULL,
+ b = pQueryActCtxW(0, handle, NULL,
ActivationContextBasicInformation, &basic,
sizeof(basic), &size);
ok (basic.dwFlags == 0, "unexpected flags %x\n",basic.dwFlags);
ok (basic.hActCtx == handle, "unexpected handle\n");
- b = pQueryActCtxW(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX |
- QUERY_ACTCTX_FLAG_NO_ADDREF, handle, NULL,
+ b = pQueryActCtxW(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX, handle, NULL,
ActivationContextBasicInformation, &basic,
sizeof(basic), &size);
if (handle)
pReleaseActCtx(handle);
}
- if(!create_manifest_file("test2-2.manifest", manifest2, -1, "testdep.manifest", testdep_manifest2)) {
+ if(!create_manifest_file("test3.manifest", manifest2, -1, "testdep.manifest", testdep_manifest2)) {
skip("Could not create manifest file\n");
return;
}
trace("manifest2 depmanifest2\n");
- handle = test_create("test2-2.manifest", manifest2);
- DeleteFileA("test2-2.manifest");
+ handle = test_create("test3.manifest", manifest2);
+ DeleteFileA("test3.manifest");
DeleteFileA("testdep.manifest");
if(handle != INVALID_HANDLE_VALUE) {
test_basic_info(handle);
if (!ret && (GetLastError() == ERROR_NOT_READY || GetLastError() == ERROR_INVALID_HANDLE))
{
if (GetLastError() == ERROR_NOT_READY)
- trace("%s doesn't respond, skipping the test\n", port_name);
+ trace("%s doesn't respond, skipping the test\n", port_name);
else
trace("%s is not a real serial port, skipping the test\n", port_name);
CloseHandle(hcom);
if (attr == TEST_ATTRIB)
win_skip("Win9x/WinMe changes attribs for '\\n' up to 'f'\n");
else
- okCHAR(hCon, c, ' ', DEFAULT_ATTRIB);
+ okCHAR(hCon, c, ' ', DEFAULT_ATTRIB);
c.X = 0; c.Y++;
okCHAR(hCon, c, mytest[5], TEST_ATTRIB);
for (c.X = 1; c.X < 8; c.X++)
if (attr == TEST_ATTRIB)
win_skip("Win9x/WinMe changes attribs for '\\n' up to 'f'\n");
else
- okCHAR(hCon, c, ' ', DEFAULT_ATTRIB);
+ okCHAR(hCon, c, ' ', DEFAULT_ATTRIB);
c.X = 0; c.Y++;
okCHAR(hCon, c, mytest[5], TEST_ATTRIB);
if (logfile)
{
- get_events(logfile, &start_event, &done_event);
+ get_events(logfile, &start_event, &done_event);
}
if (strstr(myARGV[2], "order"))
if (logfile)
{
- save_blackbox(logfile, &blackbox, sizeof(blackbox));
+ save_blackbox(logfile, &blackbox, sizeof(blackbox));
}
trace("debugger: done debugging...\n");
SetEvent(done_event);
save_value(hkey, "auto", &auto_value);
save_value(hkey, "debugger", &debugger_value);
trace("HKLM\\%s\\debugger is set to '%s'\n", AeDebug, debugger_value.data);
- }
+ }
else if (ret == ERROR_ACCESS_DENIED)
{
skip("not enough privileges to change the debugger\n");
reg_save_value crash_dlg_value;
save_value(hkeyWinedbg, "ShowCrashDialog", &crash_dlg_value);
RegSetValueExA(hkeyWinedbg, "ShowCrashDialog", 0, REG_DWORD, (BYTE *)&zero, sizeof(DWORD));
- crash_and_winedbg(hkey, test_exe);
+ crash_and_winedbg(hkey, test_exe);
restore_value(hkeyWinedbg, &crash_dlg_value);
RegCloseKey(hkeyWinedbg);
}
/* Since the debugging process never sets the debug event, it isn't recognized
as a valid debugger and, after the debugger exits, Windows will show a dialog box
asking the user what to do */
- crash_and_debug(hkey, test_exe, "dbg,none");
+ crash_and_debug(hkey, test_exe, "dbg,none");
else
skip("\"none\" debugger test needs user interaction\n");
crash_and_debug(hkey, test_exe, "dbg,event,order");
restore_value(hkey, &auto_value);
restore_value(hkey, &debugger_value);
RegCloseKey(hkey);
- }
+ }
}
static void test_RemoteDebugger(void)
-{
+ {
BOOL bret, present;
if(!pCheckRemoteDebuggerPresent)
{
win_skip("CheckRemoteDebuggerPresent is not available\n");
return;
- }
+ }
present = TRUE;
SetLastError(0xdeadbeef);
bret = pCheckRemoteDebuggerPresent(GetCurrentProcess(),&present);
ok(!bret , "expected CheckRemoteDebuggerPresent to fail\n");
ok(ERROR_INVALID_PARAMETER == GetLastError(),
"expected error ERROR_INVALID_PARAMETER, got %d/%x\n",GetLastError(), GetLastError());
-}
+ }
START_TEST(debugger)
{
static const WCHAR fooW[] = {'f','o','o',0};
len_with_null = GetWindowsDirectoryW(NULL, 0);
- if (len_with_null == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
+ if (len_with_null==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
{
win_skip("GetWindowsDirectoryW is not implemented\n");
return;
static const WCHAR fooW[] = {'f','o','o',0};
len_with_null = GetSystemDirectoryW(NULL, 0);
- if (len_with_null == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
+ if (len_with_null==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
{
win_skip("GetSystemDirectoryW is not available\n");
return;
static const WCHAR questionW[] = {'?',0};
ret = CreateDirectoryW(NULL, NULL);
- if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
+ if (!ret && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
{
win_skip("CreateDirectoryW is not available\n");
return;
lstrcatW(tmpdir, slashW);
lstrcatW(tmpdir, tmp_dir_name);
ret = CreateDirectoryW(tmpdir, NULL);
- ok(ret == FALSE && GetLastError() == ERROR_PATH_NOT_FOUND,
+ ok(ret == FALSE && GetLastError() == ERROR_PATH_NOT_FOUND,
"CreateDirectoryW with multiple nonexistent directories in path should fail ret %u err %u\n",
ret, GetLastError());
ret = RemoveDirectoryW(tmpdir);
GetTempPathW(MAX_PATH, tmpdir);
lstrcatW(tmpdir, tmp_dir_name);
ret = CreateDirectoryW(tmpdir, NULL);
- if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
+ if (!ret && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
{
win_skip("CreateDirectoryW is not available\n");
- return;
+ return;
}
ok(ret == TRUE, "CreateDirectoryW should always succeed\n");
for (drive[0] = 'A'; drive[0] <= 'Z'; drive[0]++)
{
type = GetDriveTypeW(drive);
- if (type == DRIVE_UNKNOWN && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
+ if (type == DRIVE_UNKNOWN && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
{
win_skip("GetDriveTypeW is not available on Win9x\n");
return;
static const WCHAR unix_style_root_pathW[] = { '/', 0 };
ret = GetDiskFreeSpaceW(NULL, §ors_per_cluster, &bytes_per_sector, &free_clusters, &total_clusters);
- if (ret == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
+ if (ret == 0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
{
win_skip("GetDiskFreeSpaceW is not available\n");
return;
ok(error == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", error);
/* size is not set in win2k */
- if (size == 0)
- {
- win_skip("Win2k doesn't set the size\n");
- size = MAX_COMP_NAME;
- }
+ size = MAX_COMP_NAME;
name = HeapAlloc(GetProcessHeap(), 0, size * sizeof(name[0]));
ok(name != NULL, "HeapAlloc failed with error %d\n", GetLastError());
ret = pGetComputerNameExA(ComputerNameDnsDomain, name, &size);
ok(error == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", error);
/* size is not set in win2k */
- if (size == 0)
- size = MAX_COMP_NAME;
+ size = MAX_COMP_NAME;
name = HeapAlloc(GetProcessHeap(), 0, size * sizeof(name[0]));
ok(name != NULL, "HeapAlloc failed with error %d\n", GetLastError());
ret = pGetComputerNameExA(ComputerNameDnsFullyQualified, name, &size);
ok(error == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", error);
/* size is not set in win2k */
- if (size == 0)
- size = MAX_COMP_NAME;
+ size = MAX_COMP_NAME;
name = HeapAlloc(GetProcessHeap(), 0, size * sizeof(name[0]));
ok(name != NULL, "HeapAlloc failed with error %d\n", GetLastError());
ret = pGetComputerNameExA(ComputerNameDnsHostname, name, &size);
ok(error == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", error);
/* size is not set in win2k */
- if (size == 0)
- size = MAX_COMP_NAME;
+ size = MAX_COMP_NAME;
name = HeapAlloc(GetProcessHeap(), 0, size * sizeof(name[0]));
ok(name != NULL, "HeapAlloc failed with error %d\n", GetLastError());
ret = pGetComputerNameExA(ComputerNameNetBIOS, name, &size);
ok(hmapfile != NULL, "CreateFileMapping: error %d\n", GetLastError());
ret = CopyFileA(source, dest, FALSE);
- ok(!ret, "CopyFileA: expected failure\n");
- ok(GetLastError() == ERROR_USER_MAPPED_FILE ||
- broken(GetLastError() == ERROR_SHARING_VIOLATION), /* Win9x */
- "CopyFileA with mapped dest file: expected ERROR_USER_MAPPED_FILE, got %d\n", GetLastError());
+ todo_wine {
+ ok(!ret, "CopyFileA: expected failure\n");
+ ok(GetLastError() == ERROR_USER_MAPPED_FILE ||
+ broken(GetLastError() == ERROR_SHARING_VIOLATION), /* Win9x and WinMe */
+ "CopyFileA with mapped dest file: expected ERROR_USER_MAPPED_FILE, got %d\n", GetLastError());
+ }
CloseHandle(hmapfile);
CloseHandle(hfile);
DWORD ret;
ret = GetTempPathW(MAX_PATH, temp_path);
- if (ret == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
+ if (ret==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
{
win_skip("GetTempPathW is not available\n");
return;
{
strcpy(filename, p[i].file);
filename[0] = windowsdir[0];
- }
+}
else if (p[i].file[0] == '\\' && p[i].file[5] == ':')
{
strcpy(filename, p[i].file);
DWORD ret;
ret = GetTempPathW(MAX_PATH, temp_path);
- if (ret == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
+ if (ret==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
{
win_skip("GetTempPathW is not available\n");
return;
static const WCHAR emptyW[]={'\0'};
ret = DeleteFileW(NULL);
- if (ret == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
+ if (ret==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
{
win_skip("DeleteFileW is not available\n");
return;
{
ok(0, "MAX_PATH exceeded in constructing paths\n");
return;
- }
+}
lstrcatW(pathW, dirW);
lstrcpyW(pathsubW, pathW);
lstrcatW(pathsubW, subdirW);
DWORD ret;
ret = GetTempPathW(MAX_PATH, temp_path);
- if (ret == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
+ if (ret==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
{
win_skip("GetTempPathW is not available\n");
return;
ret = LockFile( handle, 0, 0x10000000, 0, 0xf0000000 );
if (ret)
{
- ok( !LockFile( handle, ~0, ~0, 1, 0 ), "LockFile ~0,1 succeeded\n" );
- ok( !LockFile( handle, 0, 0x20000000, 20, 0 ), "LockFile 0x20000000,20 succeeded\n" );
- ok( UnlockFile( handle, 0, 0x10000000, 0, 0xf0000000 ), "UnlockFile failed\n" );
+ ok( !LockFile( handle, ~0, ~0, 1, 0 ), "LockFile ~0,1 succeeded\n" );
+ ok( !LockFile( handle, 0, 0x20000000, 20, 0 ), "LockFile 0x20000000,20 succeeded\n" );
+ ok( UnlockFile( handle, 0, 0x10000000, 0, 0xf0000000 ), "UnlockFile failed\n" );
}
else /* win9x */
ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong LockFile error %u\n", GetLastError() );
DeleteFileA( filename );
}
-static BOOL create_fake_dll( LPCSTR filename )
-{
- IMAGE_DOS_HEADER *dos;
- IMAGE_NT_HEADERS *nt;
- IMAGE_SECTION_HEADER *sec;
- BYTE *buffer;
- DWORD lfanew = sizeof(*dos);
- DWORD size = lfanew + sizeof(*nt) + sizeof(*sec);
- DWORD written;
- BOOL ret;
-
- HANDLE file = CreateFileA( filename, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0 );
- if (file == INVALID_HANDLE_VALUE) return FALSE;
-
- buffer = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, size );
-
- dos = (IMAGE_DOS_HEADER *)buffer;
- dos->e_magic = IMAGE_DOS_SIGNATURE;
- dos->e_cblp = sizeof(*dos);
- dos->e_cp = 1;
- dos->e_cparhdr = lfanew / 16;
- dos->e_minalloc = 0;
- dos->e_maxalloc = 0xffff;
- dos->e_ss = 0x0000;
- dos->e_sp = 0x00b8;
- dos->e_lfarlc = lfanew;
- dos->e_lfanew = lfanew;
-
- nt = (IMAGE_NT_HEADERS *)(buffer + lfanew);
- nt->Signature = IMAGE_NT_SIGNATURE;
-#if defined __i386__
- nt->FileHeader.Machine = IMAGE_FILE_MACHINE_I386;
-#elif defined __x86_64__
- nt->FileHeader.Machine = IMAGE_FILE_MACHINE_AMD64;
-#elif defined __powerpc__
- nt->FileHeader.Machine = IMAGE_FILE_MACHINE_POWERPC;
-#else
-# error You must specify the machine type
-#endif
- nt->FileHeader.NumberOfSections = 1;
- nt->FileHeader.SizeOfOptionalHeader = IMAGE_SIZEOF_NT_OPTIONAL_HEADER;
- nt->FileHeader.Characteristics = IMAGE_FILE_DLL | IMAGE_FILE_EXECUTABLE_IMAGE;
- nt->OptionalHeader.Magic = IMAGE_NT_OPTIONAL_HDR_MAGIC;
- nt->OptionalHeader.MajorLinkerVersion = 1;
- nt->OptionalHeader.MinorLinkerVersion = 0;
- nt->OptionalHeader.ImageBase = 0x10000000;
- nt->OptionalHeader.SectionAlignment = 0x1000;
- nt->OptionalHeader.FileAlignment = 0x1000;
- nt->OptionalHeader.MajorOperatingSystemVersion = 1;
- nt->OptionalHeader.MinorOperatingSystemVersion = 0;
- nt->OptionalHeader.MajorImageVersion = 1;
- nt->OptionalHeader.MinorImageVersion = 0;
- nt->OptionalHeader.MajorSubsystemVersion = 4;
- nt->OptionalHeader.MinorSubsystemVersion = 0;
- nt->OptionalHeader.SizeOfImage = 0x2000;
- nt->OptionalHeader.SizeOfHeaders = size;
- nt->OptionalHeader.Subsystem = IMAGE_SUBSYSTEM_WINDOWS_GUI;
- nt->OptionalHeader.NumberOfRvaAndSizes = IMAGE_NUMBEROF_DIRECTORY_ENTRIES;
-
- sec = (IMAGE_SECTION_HEADER *)(nt + 1);
- memcpy( sec->Name, ".rodata", sizeof(".rodata") );
- sec->Misc.VirtualSize = 0x1000;
- sec->VirtualAddress = 0x1000;
- sec->SizeOfRawData = 0;
- sec->PointerToRawData = 0;
- sec->Characteristics = IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE;
-
- ret = WriteFile( file, buffer, size, &written, NULL ) && written == size;
- HeapFree( GetProcessHeap(), 0, buffer );
- CloseHandle( file );
- return ret;
-}
-
-static int is_sharing_compatible( DWORD access1, DWORD sharing1, DWORD access2, DWORD sharing2, BOOL is_win9x )
+static inline int is_sharing_compatible( DWORD access1, DWORD sharing1, DWORD access2, DWORD sharing2, BOOL is_win9x )
{
if (!is_win9x)
{
return 1;
}
-static int is_sharing_map_compatible( DWORD map_access, DWORD access2, DWORD sharing2 )
-{
- if ((map_access == PAGE_READWRITE || map_access == PAGE_EXECUTE_READWRITE) &&
- !(sharing2 & FILE_SHARE_WRITE)) return 0;
- if ((map_access & SEC_IMAGE) && (access2 & GENERIC_WRITE)) return 0;
- return 1;
-}
-
static void test_file_sharing(void)
{
static const DWORD access_modes[] =
FILE_SHARE_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE,
FILE_SHARE_DELETE, FILE_SHARE_READ|FILE_SHARE_DELETE,
FILE_SHARE_WRITE|FILE_SHARE_DELETE, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE };
- static const DWORD mapping_modes[] =
- { PAGE_READONLY, PAGE_WRITECOPY, PAGE_READWRITE, SEC_IMAGE | PAGE_WRITECOPY };
int a1, s1, a2, s2;
int ret;
HANDLE h, h2;
BOOL is_win9x = FALSE;
/* make sure the file exists */
- if (!create_fake_dll( filename ))
+ h = CreateFileA( filename, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0 );
+ if (h == INVALID_HANDLE_VALUE)
{
ok(0, "couldn't create file \"%s\" (err=%d)\n", filename, GetLastError());
return;
}
is_win9x = GetFileAttributesW(filenameW) == INVALID_FILE_ATTRIBUTES;
+ CloseHandle( h );
for (a1 = 0; a1 < sizeof(access_modes)/sizeof(access_modes[0]); a1++)
{
SetLastError(0xdeadbeef);
h2 = CreateFileA( filename, access_modes[a2], sharing_modes[s2],
NULL, OPEN_EXISTING, 0, 0 );
- ret = GetLastError();
+
if (is_sharing_compatible( access_modes[a1], sharing_modes[s1],
access_modes[a2], sharing_modes[s2], is_win9x ))
{
+ ret = GetLastError();
+
ok( h2 != INVALID_HANDLE_VALUE,
"open failed for modes %x/%x/%x/%x\n",
access_modes[a1], sharing_modes[s1],
ok( ret == 0xdeadbeef /* Win9x */ ||
ret == 0, /* XP */
"wrong error code %d\n", ret );
+
+ CloseHandle( h2 );
}
else
{
+ ret = GetLastError();
+
ok( h2 == INVALID_HANDLE_VALUE,
"open succeeded for modes %x/%x/%x/%x\n",
access_modes[a1], sharing_modes[s1],
ok( ret == ERROR_SHARING_VIOLATION,
"wrong error code %d\n", ret );
}
- if (h2 != INVALID_HANDLE_VALUE) CloseHandle( h2 );
}
}
CloseHandle( h );
}
}
- for (a1 = 0; a1 < sizeof(mapping_modes)/sizeof(mapping_modes[0]); a1++)
- {
- HANDLE m;
-
- create_fake_dll( filename );
- SetLastError(0xdeadbeef);
- h = CreateFileA( filename, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0 );
- if (h == INVALID_HANDLE_VALUE)
- {
- ok(0,"couldn't create file \"%s\" (err=%d)\n",filename,GetLastError());
- return;
- }
- m = CreateFileMappingA( h, NULL, mapping_modes[a1], 0, 0, NULL );
- ok( m != 0, "failed to create mapping %x err %u\n", mapping_modes[a1], GetLastError() );
- CloseHandle( h );
- if (!m) continue;
-
- for (a2 = 0; a2 < sizeof(access_modes)/sizeof(access_modes[0]); a2++)
- {
- for (s2 = 0; s2 < sizeof(sharing_modes)/sizeof(sharing_modes[0]); s2++)
- {
- /* Win9x doesn't support FILE_SHARE_DELETE */
- if (is_win9x && (sharing_modes[s2] & FILE_SHARE_DELETE))
- continue;
-
- SetLastError(0xdeadbeef);
- h2 = CreateFileA( filename, access_modes[a2], sharing_modes[s2],
- NULL, OPEN_EXISTING, 0, 0 );
-
- ret = GetLastError();
- if (h2 == INVALID_HANDLE_VALUE)
- {
- if (is_sharing_map_compatible(mapping_modes[a1], access_modes[a2], sharing_modes[s2]))
- ok( is_win9x, /* there's no sharing at all with a mapping on win9x */
- "open failed for modes map %x/%x/%x\n",
- mapping_modes[a1], access_modes[a2], sharing_modes[s2] );
- ok( ret == ERROR_SHARING_VIOLATION,
- "wrong error code %d\n", ret );
- }
- else
- {
- if (!is_sharing_map_compatible(mapping_modes[a1], access_modes[a2], sharing_modes[s2]))
- ok( broken(1), /* no checking on nt4 */
- "open succeeded for modes map %x/%x/%x\n",
- mapping_modes[a1], access_modes[a2], sharing_modes[s2] );
- ok( ret == 0xdeadbeef /* Win9x */ ||
- ret == 0, /* XP */
- "wrong error code %d\n", ret );
- CloseHandle( h2 );
- }
- }
- }
-
- /* try CREATE_ALWAYS over an existing mapping */
- SetLastError(0xdeadbeef);
- h2 = CreateFileA( filename, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE,
- NULL, CREATE_ALWAYS, 0, 0 );
- ret = GetLastError();
- if ((mapping_modes[a1] & SEC_IMAGE) || is_win9x)
- {
- ok( h2 == INVALID_HANDLE_VALUE, "create succeeded for map %x\n", mapping_modes[a1] );
- ok( ret == ERROR_SHARING_VIOLATION, "wrong error code %d for %x\n", ret, mapping_modes[a1] );
- }
- else
- {
- ok( h2 == INVALID_HANDLE_VALUE, "create succeeded for map %x\n", mapping_modes[a1] );
- ok( ret == ERROR_USER_MAPPED_FILE, "wrong error code %d for %x\n", ret, mapping_modes[a1] );
- }
- if (h2 != INVALID_HANDLE_VALUE) CloseHandle( h2 );
-
- /* try DELETE_ON_CLOSE over an existing mapping */
- SetLastError(0xdeadbeef);
- h2 = CreateFileA( filename, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE,
- NULL, OPEN_EXISTING, FILE_FLAG_DELETE_ON_CLOSE, 0 );
- ret = GetLastError();
- if (is_win9x)
- {
- ok( h2 == INVALID_HANDLE_VALUE, "create succeeded for map %x\n", mapping_modes[a1] );
- ok( ret == ERROR_SHARING_VIOLATION, "wrong error code %d for %x\n", ret, mapping_modes[a1] );
- }
- else if (mapping_modes[a1] & SEC_IMAGE)
- {
- ok( h2 == INVALID_HANDLE_VALUE, "create succeeded for map %x\n", mapping_modes[a1] );
- ok( ret == ERROR_ACCESS_DENIED, "wrong error code %d for %x\n", ret, mapping_modes[a1] );
- }
- else
- {
- ok( h2 != INVALID_HANDLE_VALUE, "open failed for map %x err %u\n", mapping_modes[a1], ret );
- }
- if (h2 != INVALID_HANDLE_VALUE) CloseHandle( h2 );
-
- CloseHandle( m );
- }
-
SetLastError(0xdeadbeef);
h = CreateFileA( filename, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_ALWAYS, 0, 0 );
ok( h != INVALID_HANDLE_VALUE, "CreateFileA error %d\n", GetLastError() );
"wrong attributes %x\n", data.dwFileAttributes );
if (data.dwFileAttributes == FILE_ATTRIBUTE_ARCHIVE)
{
- ok( 0 == data.nFileSizeHigh, "wrong size %d\n", data.nFileSizeHigh );
- ok( 0 == data.nFileSizeLow, "wrong size %d\n", data.nFileSizeLow );
+ ok( 0 == data.nFileSizeHigh, "wrong size %d\n", data.nFileSizeHigh );
+ ok( 0 == data.nFileSizeLow, "wrong size %d\n", data.nFileSizeLow );
}
SetLastError( 0xdeadbeaf );
ok( !FindNextFileA( handle, &data ), "FindNextFileA succeeded\n" );
"wrong attributes %x\n", data.dwFileAttributes );
if (data.dwFileAttributes == FILE_ATTRIBUTE_ARCHIVE)
{
- ok( 0 == data.nFileSizeHigh, "wrong size %d\n", data.nFileSizeHigh );
- ok( 0 == data.nFileSizeLow, "wrong size %d\n", data.nFileSizeLow );
+ ok( 0 == data.nFileSizeHigh, "wrong size %d\n", data.nFileSizeHigh );
+ ok( 0 == data.nFileSizeLow, "wrong size %d\n", data.nFileSizeLow );
}
SetLastError( 0xdeadbeaf );
ok( !FindNextFileA( handle, &data ), "FindNextFileA succeeded\n" );
result = 1;
r = GetOverlappedResult(0, &ov, &result, 0);
if (r)
- ok( result == 0, "wrong result %u\n", result );
+ ok( result == 0, "wrong result %u\n", result );
else /* win9x */
ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %u\n", GetLastError() );
ov.InternalHigh = 0xabcd;
r = GetOverlappedResult(0, &ov, &result, 0);
if (r)
- ok( result == 0xabcd, "wrong result %u\n", result );
+ ok( result == 0xabcd, "wrong result %u\n", result );
else /* win9x */
ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %u\n", GetLastError() );
rc = RemoveDirectory(".");
if (!rc)
{
- rc = SetCurrentDirectory("..");
- ok( rc, "SetCurrentDirectory failed, gle=%d\n", GetLastError() );
+ rc = SetCurrentDirectory("..");
+ ok( rc, "SetCurrentDirectory failed, gle=%d\n", GetLastError() );
- rc = RemoveDirectory(directory);
- ok( rc, "RemoveDirectory failed, gle=%d\n", GetLastError() );
+ rc = RemoveDirectory(directory);
+ ok( rc, "RemoveDirectory failed, gle=%d\n", GetLastError() );
}
}
"failed to open replaced file: %d\n", GetLastError());
if (hReplacedFile != INVALID_HANDLE_VALUE)
{
- ret = GetFileSize(hReplacedFile, NULL);
- ok(ret == sizeof(replacementData),
- "replaced file has wrong size %d\n", ret);
- /* make sure that the replacement file no-longer exists */
- hReplacementFile = CreateFileA(replacement, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0);
- ok(hReplacementFile == INVALID_HANDLE_VALUE,
- "unexpected error, replacement file should not exist %d\n", GetLastError());
- /* make sure that the backup has the old "replaced" filetime */
- ret = GetFileTime(hBackupFile, NULL, NULL, &ftBackup);
- ok( ret, "GetFileTime error (backup %d\n", GetLastError());
+ ret = GetFileSize(hReplacedFile, NULL);
+ ok(ret == sizeof(replacementData),
+ "replaced file has wrong size %d\n", ret);
+ /* make sure that the replacement file no-longer exists */
+ hReplacementFile = CreateFileA(replacement, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0);
+ ok(hReplacementFile == INVALID_HANDLE_VALUE,
+ "unexpected error, replacement file should not exist %d\n", GetLastError());
+ /* make sure that the backup has the old "replaced" filetime */
+ ret = GetFileTime(hBackupFile, NULL, NULL, &ftBackup);
+ ok( ret, "GetFileTime error (backup %d\n", GetLastError());
ok(check_file_time(&ftBackup, &ftReplaced, 20000000), "backup file has wrong filetime\n");
- CloseHandle(hBackupFile);
- /* make sure that the "replaced" has the old replacement filetime */
- ret = GetFileTime(hReplacedFile, NULL, NULL, &ftReplaced);
- ok( ret, "GetFileTime error (backup %d\n", GetLastError());
+ CloseHandle(hBackupFile);
+ /* make sure that the "replaced" has the old replacement filetime */
+ ret = GetFileTime(hReplacedFile, NULL, NULL, &ftReplaced);
+ ok( ret, "GetFileTime error (backup %d\n", GetLastError());
ok(check_file_time(&ftReplaced, &ftReplacement, 20000000),
"replaced file has wrong filetime %x%08x / %x%08x\n",
ftReplaced.dwHighDateTime, ftReplaced.dwLowDateTime,
ftReplacement.dwHighDateTime, ftReplacement.dwLowDateTime );
- CloseHandle(hReplacedFile);
+ CloseHandle(hReplacedFile);
}
else
skip("couldn't open replacement file, skipping tests\n");
ret = pReplaceFileA(replaced, replacement, backup, 0, 0, 0);
ok(!ret && (GetLastError() == ERROR_FILE_NOT_FOUND ||
GetLastError() == ERROR_ACCESS_DENIED),
- "ReplaceFileA: unexpected error %d\n", GetLastError());
+ "ReplaceFileA: unexpected error %d\n", GetLastError());
/* perform replacement w/o existing "replacement" file
* TODO: flags are not implemented
/* delete temporary files, replacement and replaced are already deleted */
if (removeBackup)
{
- ret = DeleteFileA(backup);
+ ret = DeleteFileA(backup);
ok(ret ||
broken(GetLastError() == ERROR_ACCESS_DENIED), /* win2k */
"DeleteFileA: error (backup) %d\n", GetLastError());
- }
+}
}
/*
}
ret = GetTempPathW(MAX_PATH, temp_path);
- if (ret == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
+ if (ret==0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{
win_skip("GetTempPathW is not available\n");
return;
if (removeBackup)
{
- ret = DeleteFileW(backup);
+ ret = DeleteFileW(backup);
ok(ret ||
broken(GetLastError() == ERROR_ACCESS_DENIED), /* win2k */
"DeleteFileW: error (backup) %d\n", GetLastError());
- }
+}
}
START_TEST(file)
/* #define ok(cond,failstr) if(!(cond)) {printf("line %d : %s\n",__LINE__,failstr);exit(1);} */
static DWORD __cdecl doit(DWORD flags, LPCVOID src, DWORD msg_id, DWORD lang_id,
- LPSTR out, DWORD outsize, ... )
+ LPSTR out, DWORD outsize, ... )
{
__ms_va_list list;
DWORD r;
/* invalid free */
if (sizeof(void *) != 8) /* crashes on 64-bit Vista */
{
- SetLastError(MAGIC_DEAD);
- mem = GlobalFree(gbl);
+ SetLastError(MAGIC_DEAD);
+ mem = GlobalFree(gbl);
ok(mem == gbl || broken(mem == NULL) /* nt4 */, "Expected gbl, got %p\n", mem);
if (mem == gbl)
ok(GetLastError() == ERROR_INVALID_HANDLE ||
/* GlobalSize on an invalid handle */
if (sizeof(void *) != 8) /* crashes on 64-bit Vista */
{
- SetLastError(MAGIC_DEAD);
- size = GlobalSize((HGLOBAL)0xc042);
- ok(size == 0, "Expected 0, got %ld\n", size);
+ SetLastError(MAGIC_DEAD);
+ size = GlobalSize((HGLOBAL)0xc042);
+ ok(size == 0, "Expected 0, got %ld\n", size);
ok(GetLastError() == ERROR_INVALID_HANDLE ||
GetLastError() == ERROR_INVALID_PARAMETER, /* win9x */
"Expected ERROR_INVALID_HANDLE or ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
<module name="kernel32_winetest" type="win32cui" installbase="bin" installname="kernel32_winetest.exe" allowwarnings="true">
- <include base="kernel32_winetest">.</include>
+ <include base="kernel32_winetest">.</include>
<define name="__ROS_LONG64__" />
- <library>ntdll</library>
+ <library>ntdll</library>
<library>user32</library>
- <library>advapi32</library>
- <file>actctx.c</file>
- <file>alloc.c</file>
- <file>atom.c</file>
- <file>change.c</file>
- <file>codepage.c</file>
- <file>comm.c</file>
- <file>console.c</file>
- <file>debugger.c</file>
- <file>directory.c</file>
- <file>drive.c</file>
- <file>environ.c</file>
- <file>file.c</file>
- <file>format_msg.c</file>
- <!-- <file>generated.c</file> -->
- <file>heap.c</file>
- <file>interlck.c</file>
- <file>loader.c</file>
- <file>locale.c</file>
- <file>mailslot.c</file>
- <file>module.c</file>
- <file>path.c</file>
- <file>pipe.c</file>
- <file>process.c</file>
- <file>profile.c</file>
- <file>resource.c</file>
- <file>sync.c</file>
- <file>thread.c</file>
- <file>time.c</file>
- <file>timer.c</file>
- <file>toolhelp.c</file>
- <file>version.c</file>
- <file>virtual.c</file>
- <file>volume.c</file>
- <file>testlist.c</file>
+ <library>advapi32</library>
+ <file>actctx.c</file>
+ <file>alloc.c</file>
+ <file>atom.c</file>
+ <file>change.c</file>
+ <file>codepage.c</file>
+ <file>comm.c</file>
+ <file>console.c</file>
+ <file>debugger.c</file>
+ <file>directory.c</file>
+ <file>drive.c</file>
+ <file>environ.c</file>
+ <file>file.c</file>
+ <file>format_msg.c</file>
+ <!-- <file>generated.c</file> -->
+ <file>heap.c</file>
+ <file>interlck.c</file>
+ <file>loader.c</file>
+ <file>locale.c</file>
+ <file>mailslot.c</file>
+ <file>module.c</file>
+ <file>path.c</file>
+ <file>pipe.c</file>
+ <file>process.c</file>
+ <file>profile.c</file>
+ <file>resource.c</file>
+ <file>sync.c</file>
+ <file>thread.c</file>
+ <file>time.c</file>
+ <file>timer.c</file>
+ <file>toolhelp.c</file>
+ <file>version.c</file>
+ <file>virtual.c</file>
+ <file>volume.c</file>
+ <file>testlist.c</file>
</module>
#include <assert.h>
#include <stdlib.h>
#include <stdarg.h>
-#include <stdio.h>
#include "wine/test.h"
#include "windef.h"
int ret;
SYSTEMTIME curtime;
LCID lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT);
- LCID lcid_ru = MAKELCID(MAKELANGID(LANG_RUSSIAN, SUBLANG_NEUTRAL), SORT_DEFAULT);
char buffer[BUFFER_SIZE], input[BUFFER_SIZE], Expected[BUFFER_SIZE];
- char Broken[BUFFER_SIZE];
- char short_day[10], month[10], genitive_month[10];
memset(&curtime, 2, sizeof(SYSTEMTIME)); /* Invalid time */
STRINGSA("ddd',' MMM dd yy","");
&curtime, input, buffer, COUNTOF(buffer));
ok(!ret && GetLastError() == ERROR_INVALID_FLAGS,
"Expected ERROR_INVALID_FLAGS, got %d\n", GetLastError());
-
- ret = GetDateFormat(lcid_ru, 0, &curtime, "ddMMMM", buffer, COUNTOF(buffer));
- if (!ret)
- {
- win_skip("LANG_RUSSIAN locale data unavailable\n");
- return;
- }
-
- /* month part should be in genitive form */
- strcpy(genitive_month, buffer + 2);
- ret = GetDateFormat(lcid_ru, 0, &curtime, "MMMM", buffer, COUNTOF(buffer));
- ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError());
- strcpy(month, buffer);
- ok(strcmp(genitive_month, month) != 0, "Expected different month forms\n");
-
- ret = GetDateFormat(lcid_ru, 0, &curtime, "ddd", buffer, COUNTOF(buffer));
- ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError());
- strcpy(short_day, buffer);
-
- STRINGSA("dd MMMMddd dd", "");
- sprintf(Expected, "04 %s%s 04", genitive_month, short_day);
- ret = GetDateFormat(lcid_ru, 0, &curtime, input, buffer, COUNTOF(buffer));
- ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError());
EXPECT_EQA;
-
- STRINGSA("MMMMddd dd", "");
- sprintf(Expected, "%s%s 04", month, short_day);
- ret = GetDateFormat(lcid_ru, 0, &curtime, input, buffer, COUNTOF(buffer));
- ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError());
- EXPECT_EQA;
-
- STRINGSA("MMMMddd", "");
- sprintf(Expected, "%s%s", month, short_day);
- ret = GetDateFormat(lcid_ru, 0, &curtime, input, buffer, COUNTOF(buffer));
- ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError());
- EXPECT_EQA;
-
- STRINGSA("MMMMdd", "");
- sprintf(Expected, "%s04", genitive_month);
- sprintf(Broken, "%s04", month);
- ret = GetDateFormat(lcid_ru, 0, &curtime, input, buffer, COUNTOF(buffer));
- ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError());
- ok(strncmp(buffer, Expected, strlen(Expected)) == 0 ||
- broken(strncmp(buffer, Broken, strlen(Broken)) == 0) /* nt4 */,
- "Expected '%s', got '%s'\n", Expected, buffer);
-
- STRINGSA("MMMMdd ddd", "");
- sprintf(Expected, "%s04 %s", genitive_month, short_day);
- sprintf(Broken, "%s04 %s", month, short_day);
- ret = GetDateFormat(lcid_ru, 0, &curtime, input, buffer, COUNTOF(buffer));
- ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError());
- ok(strncmp(buffer, Expected, strlen(Expected)) == 0 ||
- broken(strncmp(buffer, Broken, strlen(Broken)) == 0) /* nt4 */,
- "Expected '%s', got '%s'\n", Expected, buffer);
-
- STRINGSA("dd dddMMMM", "");
- sprintf(Expected, "04 %s%s", short_day, month);
- ret = GetDateFormat(lcid_ru, 0, &curtime, input, buffer, COUNTOF(buffer));
- ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError());
- EXPECT_EQA;
-
- STRINGSA("dd dddMMMM ddd MMMMdd", "");
- sprintf(Expected, "04 %s%s %s %s04", short_day, month, short_day, genitive_month);
- sprintf(Broken, "04 %s%s %s %s04", short_day, month, short_day, month);
- ret = GetDateFormat(lcid_ru, 0, &curtime, input, buffer, COUNTOF(buffer));
- ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError());
- ok(strncmp(buffer, Expected, strlen(Expected)) == 0 ||
- broken(strncmp(buffer, Broken, strlen(Broken)) == 0) /* nt4 */,
- "Expected '%s', got '%s'\n", Expected, buffer);
-
- /* with literal part */
- STRINGSA("ddd',' MMMM dd", "");
- sprintf(Expected, "%s, %s 04", short_day, genitive_month);
- sprintf(Broken, "%s, %s 04", short_day, month);
- ret = GetDateFormat(lcid_ru, 0, &curtime, input, buffer, COUNTOF(buffer));
- ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError());
- ok(strncmp(buffer, Expected, strlen(Expected)) == 0 ||
- broken(strncmp(buffer, Broken, strlen(Broken)) == 0) /* nt4 */,
- "Expected '%s', got '%s'\n", Expected, buffer);
}
static void test_GetDateFormatW(void)
if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{
win_skip("GetDateFormatW is not implemented\n");
- return;
+ return;
}
ok(!ret && GetLastError() == ERROR_INVALID_FLAGS,
"Expected ERROR_INVALID_FLAGS, got %d\n", GetLastError());
ret = lstrcmpA(NULL, "");
ok (ret == -1 || broken(ret == -2) /* win9x */, "lstrcmpA(NULL, \"\") should return -1, got %d\n", ret);
-
+
ret = CompareStringA(LOCALE_SYSTEM_DEFAULT,0,"EndDialog",-1,"_Property",-1);
ok( ret == 3, "EndDialog vs _Property ... expected 3, got %d\n", ret);
ok(lstrcmpW(buf, upper_case) == 0, "Expected upper case string\n");
else
{
- ok(!ret, "LCMAP_LOWERCASE and LCMAP_UPPERCASE are mutually exclusive\n");
- ok(GetLastError() == ERROR_INVALID_FLAGS,
- "unexpected error code %d\n", GetLastError());
+ ok(!ret, "LCMAP_LOWERCASE and LCMAP_UPPERCASE are mutually exclusive\n");
+ ok(GetLastError() == ERROR_INVALID_FLAGS,
+ "unexpected error code %d\n", GetLastError());
}
ret = LCMapStringW(LOCALE_USER_DEFAULT, LCMAP_HIRAGANA | LCMAP_KATAKANA,
/* MAP_FOLDDIGITS */
SetLastError(0);
ret = pFoldStringA(MAP_FOLDDIGITS, digits_src, -1, dst, 256);
- if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
+ if (GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
{
win_skip("FoldStringA is not implemented\n");
return;
else
{
ok(ret == 2, "Expected ret == 2, got %d, error %d\n", ret, GetLastError());
- ok(dst[0] == src[0],
- "MAP_EXPAND_LIGATURES: Expected '%s', got '%s'\n", src, dst);
- }
+ ok(dst[0] == src[0],
+ "MAP_EXPAND_LIGATURES: Expected '%s', got '%s'\n", src, dst);
}
}
}
+ }
/* MAP_COMPOSITE */
SetLastError(0);
if (! is_special)
{
ok(ret == 2, "Expected ret == 2, got %d, error %d\n", ret, GetLastError());
- ok(src[0] == dst[0],
- "MAP_FOLDCZONE: Expected 0x%02x, got 0x%02x\n",
- (unsigned char)src[0], (unsigned char)dst[0]);
- }
+ ok(src[0] == dst[0],
+ "MAP_FOLDCZONE: Expected 0x%02x, got 0x%02x\n",
+ (unsigned char)src[0], (unsigned char)dst[0]);
+ }
}
/* MAP_PRECOMPOSED */
}
/* MAP_FOLDCZONE */
- SetLastError(0);
+ SetLastError(0);
ret = pFoldStringW(MAP_FOLDCZONE, foldczone_src, -1, dst, 256);
ok(ret == sizeof(foldczone_dst)/sizeof(foldczone_dst[0]),
"Got %d, error %d\n", ret, GetLastError());
"Got %d, error %d\n", ret, GetLastError());
ok(!memcmp(dst, ligatures_dst, sizeof(ligatures_dst)),
"MAP_EXPAND_LIGATURES: Expanded incorrectly\n");
- }
+ }
/* FIXME: MAP_PRECOMPOSED : MAP_COMPOSITE */
}
}
else
{
- ok(ret, "EnumDateFormatsA(0) error %d\n", GetLastError());
- trace("%s\n", date_fmt_buf);
- /* test the 1st enumerated format */
- if ((p = strchr(date_fmt_buf, '\n'))) *p = 0;
- ret = GetLocaleInfoA(lcid, LOCALE_SSHORTDATE, buf, sizeof(buf));
- ok(ret, "GetLocaleInfoA(LOCALE_SSHORTDATE) error %d\n", GetLastError());
- ok(!lstrcmpA(date_fmt_buf, buf), "expected \"%s\" got \"%s\"\n", date_fmt_buf, buf);
+ ok(ret, "EnumDateFormatsA(0) error %d\n", GetLastError());
+ trace("%s\n", date_fmt_buf);
+ /* test the 1st enumerated format */
+ if ((p = strchr(date_fmt_buf, '\n'))) *p = 0;
+ ret = GetLocaleInfoA(lcid, LOCALE_SSHORTDATE, buf, sizeof(buf));
+ ok(ret, "GetLocaleInfoA(LOCALE_SSHORTDATE) error %d\n", GetLastError());
+ ok(!lstrcmpA(date_fmt_buf, buf), "expected \"%s\" got \"%s\"\n", date_fmt_buf, buf);
}
trace("EnumDateFormatsA LOCALE_USE_CP_ACP\n");
}
else
{
- ok(ret, "EnumDateFormatsA(LOCALE_USE_CP_ACP) error %d\n", GetLastError());
- trace("%s\n", date_fmt_buf);
- /* test the 1st enumerated format */
- if ((p = strchr(date_fmt_buf, '\n'))) *p = 0;
- ret = GetLocaleInfoA(lcid, LOCALE_SSHORTDATE, buf, sizeof(buf));
- ok(ret, "GetLocaleInfoA(LOCALE_SSHORTDATE) error %d\n", GetLastError());
- ok(!lstrcmpA(date_fmt_buf, buf), "expected \"%s\" got \"%s\"\n", date_fmt_buf, buf);
+ ok(ret, "EnumDateFormatsA(LOCALE_USE_CP_ACP) error %d\n", GetLastError());
+ trace("%s\n", date_fmt_buf);
+ /* test the 1st enumerated format */
+ if ((p = strchr(date_fmt_buf, '\n'))) *p = 0;
+ ret = GetLocaleInfoA(lcid, LOCALE_SSHORTDATE, buf, sizeof(buf));
+ ok(ret, "GetLocaleInfoA(LOCALE_SSHORTDATE) error %d\n", GetLastError());
+ ok(!lstrcmpA(date_fmt_buf, buf), "expected \"%s\" got \"%s\"\n", date_fmt_buf, buf);
}
trace("EnumDateFormatsA DATE_SHORTDATE\n");
}
else
{
- ok(ret, "GetCPInfo(CP_UTF7) error %u\n", GetLastError());
- ok(cpinfo.DefaultChar[0] == 0x3f, "expected 0x3f, got 0x%x\n", cpinfo.DefaultChar[0]);
- ok(cpinfo.DefaultChar[1] == 0, "expected 0, got 0x%x\n", cpinfo.DefaultChar[1]);
- ok(cpinfo.LeadByte[0] == 0, "expected 0, got 0x%x\n", cpinfo.LeadByte[0]);
- ok(cpinfo.LeadByte[1] == 0, "expected 0, got 0x%x\n", cpinfo.LeadByte[1]);
- ok(cpinfo.MaxCharSize == 5, "expected 5, got 0x%x\n", cpinfo.MaxCharSize);
+ ok(ret, "GetCPInfo(CP_UTF7) error %u\n", GetLastError());
+ ok(cpinfo.DefaultChar[0] == 0x3f, "expected 0x3f, got 0x%x\n", cpinfo.DefaultChar[0]);
+ ok(cpinfo.DefaultChar[1] == 0, "expected 0, got 0x%x\n", cpinfo.DefaultChar[1]);
+ ok(cpinfo.LeadByte[0] == 0, "expected 0, got 0x%x\n", cpinfo.LeadByte[0]);
+ ok(cpinfo.LeadByte[1] == 0, "expected 0, got 0x%x\n", cpinfo.LeadByte[1]);
+ ok(cpinfo.MaxCharSize == 5, "expected 5, got 0x%x\n", cpinfo.MaxCharSize);
}
SetLastError(0xdeadbeef);
}
else
{
- ok(ret, "GetCPInfo(CP_UTF8) error %u\n", GetLastError());
- ok(cpinfo.DefaultChar[0] == 0x3f, "expected 0x3f, got 0x%x\n", cpinfo.DefaultChar[0]);
- ok(cpinfo.DefaultChar[1] == 0, "expected 0, got 0x%x\n", cpinfo.DefaultChar[1]);
- ok(cpinfo.LeadByte[0] == 0, "expected 0, got 0x%x\n", cpinfo.LeadByte[0]);
- ok(cpinfo.LeadByte[1] == 0, "expected 0, got 0x%x\n", cpinfo.LeadByte[1]);
+ ok(ret, "GetCPInfo(CP_UTF8) error %u\n", GetLastError());
+ ok(cpinfo.DefaultChar[0] == 0x3f, "expected 0x3f, got 0x%x\n", cpinfo.DefaultChar[0]);
+ ok(cpinfo.DefaultChar[1] == 0, "expected 0, got 0x%x\n", cpinfo.DefaultChar[1]);
+ ok(cpinfo.LeadByte[0] == 0, "expected 0, got 0x%x\n", cpinfo.LeadByte[0]);
+ ok(cpinfo.LeadByte[1] == 0, "expected 0, got 0x%x\n", cpinfo.LeadByte[1]);
ok(cpinfo.MaxCharSize == 4 || broken(cpinfo.MaxCharSize == 3) /* win9x */,
"expected 4, got %u\n", cpinfo.MaxCharSize);
- }
+}
}
START_TEST(locale)
/* open a mailslot with a null name */
hSlot = CreateMailslot( NULL, 0, 0, NULL );
ok( hSlot == INVALID_HANDLE_VALUE || broken(hSlot != INVALID_HANDLE_VALUE), /* win9x */
- "Created mailslot with invalid name\n");
+ "Created mailslot with invalid name\n");
if (hSlot == INVALID_HANDLE_VALUE)
- ok( GetLastError() == ERROR_PATH_NOT_FOUND,
+ ok( GetLastError() == ERROR_PATH_NOT_FOUND,
"error should be ERROR_PATH_NOT_FOUND\n");
else /* succeeds on win9x */
CloseHandle( hSlot );
"slot write\n");
ok( GetLastError() == ERROR_ACCESS_DENIED, "wrong error %u\n", GetLastError() );
- /* now try and open the client, but with the wrong sharing mode */
+ /* now try and openthe client, but with the wrong sharing mode */
hWriter = CreateFile(szmspath, GENERIC_WRITE,
0, NULL, OPEN_EXISTING, 0, NULL);
ok( hWriter != INVALID_HANDLE_VALUE /* vista */ || GetLastError() == ERROR_SHARING_VIOLATION,
ok(CreateDirectoryA(tmpstr,NULL),"CreateDirectoryA failed\n");
sprintf(tmpstr,"%c:", *curDrive);
bRes = CreateDirectoryA(tmpstr,NULL);
- ok(!bRes && (GetLastError() == ERROR_ACCESS_DENIED ||
+ ok(!bRes && (GetLastError() == ERROR_ACCESS_DENIED ||
GetLastError() == ERROR_ALREADY_EXISTS),
"CreateDirectoryA(\"%s\" should have failed (%d)\n", tmpstr, GetLastError());
sprintf(tmpstr,"%c:\\", *curDrive);
lstrcpyW(buf, fooW);
len = GetTempPathW(MAX_PATH, buf);
- if (len == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
+ if (len==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
{
win_skip("GetTempPathW is not available\n");
return;
trace("TMP=%s\n", save_TMP);
if (save_TMP[0])
{
- strcpy(buf,save_TMP);
- if (buf[strlen(buf)-1]!='\\')
- strcat(buf,"\\");
- test_GetTempPathA(buf);
- test_GetTempPathW(buf);
+ strcpy(buf,save_TMP);
+ if (buf[strlen(buf)-1]!='\\')
+ strcat(buf,"\\");
+ test_GetTempPathA(buf);
+ test_GetTempPathW(buf);
}
/* TMP=C:\WINDOWS */
SetEnvironmentVariableA("TMP", save_TMP);
}
-static void test_GetLongPathNameA(void)
-{
- DWORD length, explength, hostsize;
- char tempfile[MAX_PATH];
- char longpath[MAX_PATH];
- char unc_prefix[MAX_PATH];
- char unc_short[MAX_PATH], unc_long[MAX_PATH];
- char temppath[MAX_PATH], temppath2[MAX_PATH];
- HANDLE file;
-
- if (!pGetLongPathNameA)
- return;
-
- GetTempPathA(MAX_PATH, tempfile);
- lstrcatA(tempfile, "longfilename.longext");
-
- file = CreateFileA(tempfile, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
- CloseHandle(file);
-
- /* Test a normal path with a small buffer size */
- memset(temppath, 0, MAX_PATH);
- length = pGetLongPathNameA(tempfile, temppath, 4);
- /* We have a failure so length should be the minumum plus the terminating '0' */
- ok(length >= lstrlen(tempfile) + 1, "Wrong length\n");
- ok(temppath[0] == 0, "Buffer should not have been touched\n");
-
- /* Some UNC syntax tests */
-
- memset(temppath, 0, MAX_PATH);
- memset(temppath2, 0, MAX_PATH);
- lstrcpyA(temppath2, "\\\\?\\");
- lstrcatA(temppath2, tempfile);
- explength = length + 4;
-
- SetLastError(0xdeadbeef);
- length = pGetLongPathNameA(temppath2, NULL, 0);
- if (length == 0 && GetLastError() == ERROR_BAD_NET_NAME)
- {
- win_skip("UNC syntax tests don't work on Win98/WinMe\n");
- DeleteFileA(tempfile);
- return;
- }
- ok(length == explength, "Wrong length %d, expected %d\n", length, explength);
-
- length = pGetLongPathNameA(temppath2, NULL, MAX_PATH);
- ok(length == explength, "Wrong length %d, expected %d\n", length, explength);
-
- length = pGetLongPathNameA(temppath2, temppath, 4);
- ok(length == explength, "Wrong length %d, expected %d\n", length, explength);
- ok(temppath[0] == 0, "Buffer should not have been touched\n");
-
- /* Now an UNC path with the computername */
- lstrcpyA(unc_prefix, "\\\\");
- hostsize = sizeof(unc_prefix) - 2;
- GetComputerName(unc_prefix + 2, &hostsize);
- lstrcatA(unc_prefix, "\\");
-
- /* Create a short syntax for the whole unc path */
- memset(unc_short, 0, MAX_PATH);
- GetShortPathNameA(tempfile, temppath, MAX_PATH);
- lstrcpyA(unc_short, unc_prefix);
- unc_short[lstrlenA(unc_short)] = temppath[0];
- lstrcatA(unc_short, "$\\");
- lstrcatA(unc_short, strchr(temppath, '\\') + 1);
-
- /* Create a long syntax for reference */
- memset(longpath, 0, MAX_PATH);
- pGetLongPathNameA(tempfile, temppath, MAX_PATH);
- lstrcpyA(longpath, unc_prefix);
- longpath[lstrlenA(longpath)] = temppath[0];
- lstrcatA(longpath, "$\\");
- lstrcatA(longpath, strchr(temppath, '\\') + 1);
-
- /* NULL test */
- SetLastError(0xdeadbeef);
- length = pGetLongPathNameA(unc_short, NULL, 0);
- if (length == 0 && GetLastError() == ERROR_BAD_NETPATH)
- {
- /* Seen on Window XP Home */
- win_skip("UNC with computername is not supported\n");
- DeleteFileA(tempfile);
- return;
- }
- explength = lstrlenA(longpath) + 1;
- todo_wine
- ok(length == explength, "Wrong length %d, expected %d\n", length, explength);
-
- length = pGetLongPathNameA(unc_short, NULL, MAX_PATH);
- todo_wine
- ok(length == explength, "Wrong length %d, expected %d\n", length, explength);
-
- memset(unc_long, 0, MAX_PATH);
- length = pGetLongPathNameA(unc_short, unc_long, lstrlenA(unc_short));
- /* length will include terminating '0' on failure */
- todo_wine
- ok(length == explength, "Wrong length %d, expected %d\n", length, explength);
- ok(unc_long[0] == 0, "Buffer should not have been touched\n");
-
- memset(unc_long, 0, MAX_PATH);
- length = pGetLongPathNameA(unc_short, unc_long, length);
- /* length doesn't include terminating '0' on success */
- explength--;
- todo_wine
- {
- ok(length == explength, "Wrong length %d, expected %d\n", length, explength);
- ok(!lstrcmpiA(unc_long, longpath), "Expected (%s), got (%s)\n", longpath, unc_long);
- }
-
- DeleteFileA(tempfile);
-}
-
static void test_GetLongPathNameW(void)
{
- DWORD length, expanded;
- BOOL ret;
- HANDLE file;
+ DWORD length;
WCHAR empty[MAX_PATH];
- WCHAR tempdir[MAX_PATH], name[200];
- WCHAR dirpath[4 + MAX_PATH + 200]; /* To ease removal */
- WCHAR shortpath[4 + MAX_PATH + 200 + 1 + 200];
- static const WCHAR prefix[] = { '\\','\\','?','\\', 0};
- static const WCHAR backslash[] = { '\\', 0};
- static const WCHAR letterX[] = { 'X', 0};
-
- if (!pGetLongPathNameW)
- return;
+ /* Not present in all windows versions */
+ if(pGetLongPathNameW)
+ {
SetLastError(0xdeadbeef);
length = pGetLongPathNameW(NULL,NULL,0);
if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
length = pGetLongPathNameW(empty,NULL,0);
ok(0==length,"GetLongPathNameW returned %d but expected 0\n",length);
ok(GetLastError()==ERROR_PATH_NOT_FOUND,"GetLastError returned %d but expected ERROR_PATH_NOT_FOUND\n",GetLastError());
-
- /* Create a long path name. The path needs to exist for these tests to
- * succeed so we need the "\\?\" prefix when creating directories and
- * files.
- */
- name[0] = 0;
- while (lstrlenW(name) < (sizeof(name)/sizeof(WCHAR) - 1))
- lstrcatW(name, letterX);
-
- GetTempPathW(MAX_PATH, tempdir);
-
- lstrcpyW(shortpath, prefix);
- lstrcatW(shortpath, tempdir);
- lstrcatW(shortpath, name);
- lstrcpyW(dirpath, shortpath);
- ret = CreateDirectoryW(shortpath, NULL);
- ok(ret, "Could not create the temporary directory : %d\n", GetLastError());
- lstrcatW(shortpath, backslash);
- lstrcatW(shortpath, name);
-
- /* Path does not exist yet and we know it overruns MAX_PATH */
-
- /* No prefix */
- SetLastError(0xdeadbeef);
- length = pGetLongPathNameW(shortpath + 4, NULL, 0);
- ok(length == 0, "Expected 0, got %d\n", length);
- todo_wine
- ok(GetLastError() == ERROR_PATH_NOT_FOUND,
- "Expected ERROR_PATH_NOT_FOUND, got %d\n", GetLastError());
- /* With prefix */
- SetLastError(0xdeadbeef);
- length = pGetLongPathNameW(shortpath, NULL, 0);
- todo_wine
- {
- ok(length == 0, "Expected 0, got %d\n", length);
- ok(GetLastError() == ERROR_FILE_NOT_FOUND,
- "Expected ERROR_PATH_NOT_FOUND, got %d\n", GetLastError());
- }
-
- file = CreateFileW(shortpath, GENERIC_READ|GENERIC_WRITE, 0, NULL,
- CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
- ok(file != INVALID_HANDLE_VALUE,
- "Could not create the temporary file : %d.\n", GetLastError());
- CloseHandle(file);
-
- /* Path exists */
-
- /* No prefix */
- SetLastError(0xdeadbeef);
- length = pGetLongPathNameW(shortpath + 4, NULL, 0);
- todo_wine
- {
- ok(length == 0, "Expected 0, got %d\n", length);
- ok(GetLastError() == ERROR_PATH_NOT_FOUND, "Expected ERROR_PATH_NOT_FOUND, got %d\n", GetLastError());
}
- /* With prefix */
- expanded = 4 + (pGetLongPathNameW(tempdir, NULL, 0) - 1) + lstrlenW(name) + 1 + lstrlenW(name) + 1;
- SetLastError(0xdeadbeef);
- length = pGetLongPathNameW(shortpath, NULL, 0);
- ok(length == expanded, "Expected %d, got %d\n", expanded, length);
-
- /* NULL buffer with length crashes on Windows */
- if (0)
- length = pGetLongPathNameW(shortpath, NULL, 20);
-
- ok(DeleteFileW(shortpath), "Could not delete temporary file\n");
- ok(RemoveDirectoryW(dirpath), "Could not delete temporary directory\n");
}
static void test_GetShortPathNameW(void)
ok(ret < sizeof(buf), "buffer should be %u bytes\n", ret);
if (buf[0])
{
- ok(buf[1] == ':', "expected buf[1] == ':' got %c\n", buf[1]);
- ok(buf[strlen(buf)-1] == '\\', "Temporary path (%s) doesn't end in a slash\n", buf);
+ ok(buf[1] == ':', "expected buf[1] == ':' got %c\n", buf[1]);
+ ok(buf[strlen(buf)-1] == '\\', "Temporary path (%s) doesn't end in a slash\n", buf);
}
memset(buf, 0, sizeof(buf));
(void*)GetProcAddress( GetModuleHandleA("kernel32.dll"),
"NeedCurrentDirectoryForExePathW" );
- /* Report only once */
- if (!pGetLongPathNameA)
- win_skip("GetLongPathNameA is not available\n");
- if (!pGetLongPathNameW)
- win_skip("GetLongPathNameW is not available\n");
-
test_InitPathA(curdir, &curDrive, &otherDrive);
test_CurrentDirectoryA(origdir,curdir);
test_PathNameA(curdir, curDrive, otherDrive);
test_CleanupPathA(origdir,curdir);
test_GetTempPath();
- test_GetLongPathNameA();
test_GetLongPathNameW();
test_GetShortPathNameW();
test_GetSystemDirectory();
OVERLAPPED oOverlap;
int letWFSOEwait = (i & 2);
int letGORwait = (i & 1);
- DWORD err;
+ DWORD err;
memset(&oOverlap, 0, sizeof(oOverlap));
oOverlap.hEvent = hEvent;
} while (ret == WAIT_IO_COMPLETION);
ok(ret == 0, "wait ConnectNamedPipe returned %x\n", ret);
}
- success = GetOverlappedResult(hnp, &oOverlap, &dummy, letGORwait);
- if (!letGORwait && !letWFSOEwait && !success) {
- ok(GetLastError() == ERROR_IO_INCOMPLETE, "GetOverlappedResult\n");
- success = GetOverlappedResult(hnp, &oOverlap, &dummy, TRUE);
- }
+ success = GetOverlappedResult(hnp, &oOverlap, &dummy, letGORwait);
+ if (!letGORwait && !letWFSOEwait && !success) {
+ ok(GetLastError() == ERROR_IO_INCOMPLETE, "GetOverlappedResult\n");
+ success = GetOverlappedResult(hnp, &oOverlap, &dummy, TRUE);
+ }
}
ok(success || (err == ERROR_PIPE_CONNECTED), "GetOverlappedResult ConnectNamedPipe\n");
trace("overlapped ConnectNamedPipe operation complete.\n");
} while (ret == WAIT_IO_COMPLETION);
ok(ret == 0, "wait ReadFile returned %x\n", ret);
}
- success = GetOverlappedResult(hnp, &oOverlap, &readden, letGORwait);
- if (!letGORwait && !letWFSOEwait && !success) {
- ok(GetLastError() == ERROR_IO_INCOMPLETE, "GetOverlappedResult\n");
- success = GetOverlappedResult(hnp, &oOverlap, &readden, TRUE);
- }
+ success = GetOverlappedResult(hnp, &oOverlap, &readden, letGORwait);
+ if (!letGORwait && !letWFSOEwait && !success) {
+ ok(GetLastError() == ERROR_IO_INCOMPLETE, "GetOverlappedResult\n");
+ success = GetOverlappedResult(hnp, &oOverlap, &readden, TRUE);
+ }
}
trace("Server done reading.\n");
ok(success, "overlapped ReadFile\n");
} while (ret == WAIT_IO_COMPLETION);
ok(ret == 0, "wait WriteFile returned %x\n", ret);
}
- success = GetOverlappedResult(hnp, &oOverlap, &written, letGORwait);
- if (!letGORwait && !letWFSOEwait && !success) {
- ok(GetLastError() == ERROR_IO_INCOMPLETE, "GetOverlappedResult\n");
- success = GetOverlappedResult(hnp, &oOverlap, &written, TRUE);
- }
+ success = GetOverlappedResult(hnp, &oOverlap, &written, letGORwait);
+ if (!letGORwait && !letWFSOEwait && !success) {
+ ok(GetLastError() == ERROR_IO_INCOMPLETE, "GetOverlappedResult\n");
+ success = GetOverlappedResult(hnp, &oOverlap, &written, TRUE);
+ }
}
trace("Server done writing.\n");
ok(success, "overlapped WriteFile\n");
else
{
ok(ret, "Setting CP\n");
- ok(SetConsoleOutputCP(1252), "Setting SB CP\n");
+ ok(SetConsoleOutputCP(1252), "Setting SB CP\n");
}
ret = SetConsoleMode(hConIn, modeIn ^ 1);
okChildString("Arguments", "argvA0", buffer);
release_memory();
assert(DeleteFileA(resfile) != 0);
-
+
/* Using AppName */
get_file_name(resfile);
len = GetFullPathNameA(selfname, MAX_PATH, fullpath, &lpFilePart);
ok(!ret, "CreateProcessA unexpectedly succeeded\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
- }
+}
buffer[0] = '\0';
if (run_tests)
{
- ok(cpInC == 1252, "Wrong console CP (expected 1252 got %d/%d)\n", cpInC, cpIn);
- ok(cpOutC == 1252, "Wrong console-SB CP (expected 1252 got %d/%d)\n", cpOutC, cpOut);
+ ok(cpInC == 1252, "Wrong console CP (expected 1252 got %d/%d)\n", cpInC, cpIn);
+ ok(cpOutC == 1252, "Wrong console-SB CP (expected 1252 got %d/%d)\n", cpOutC, cpOut);
}
else
win_skip("Setting the codepage is not implemented\n");
ok( (buf[ret-1] == 0 && buf[ret] == 0) ||
broken(buf[ret-1] == 0 && buf[ret-2] == 0), /* Win9x, WinME */
"returned buffer not terminated with double-null\n" );
-
+
/* Test with exactly fitting buffer */
memset(buf, 0xc, sizeof(buf));
ret = GetPrivateProfileSectionNamesA( buf, 28, testfile3 );
broken(buf[ret+1] == 0xc && buf[ret] == 0) || /* NT4, W2K, WinXP */
broken(buf[ret-1] == 0 && buf[ret-2] == 0), /* Win9x, WinME */
"returned buffer not terminated with double-null\n" );
-
+
/* Test with a buffer too small */
memset(buf, 0xc, sizeof(buf));
ret = GetPrivateProfileSectionNamesA( buf, 27, testfile3 );
ok( (buf[ret+1] == 0 && buf[ret] == 0) ||
broken(buf[count] == 0 && buf[count+1] == 0), /* Win9x, WinME */
"returned buffer not terminated with double-null\n" );
-
+
/* Tests on nonexistent file */
memset(buf, 0xc, sizeof(buf));
ret = GetPrivateProfileSectionNamesA( buf, 10, ".\\not_here.ini" );
ok( (bufW[ret+1] == 0 && bufW[ret] == 0) || /* W2K3 and higher */
broken(bufW[ret+1] == 0xcccc && bufW[ret] == 0), /* NT4, W2K, WinXP */
"returned buffer not terminated with double-null\n" );
-
+
/* Test with a buffer too small */
memset(bufW, 0xcc, sizeof(bufW));
ret = GetPrivateProfileSectionNamesW( bufW, 27, testfile3W );
res = BeginUpdateResource( filename, TRUE );
if ( res != NULL || GetLastError() != ERROR_FILE_INVALID )
{
- ok( res != NULL, "BeginUpdateResource failed\n");
+ ok( res != NULL, "BeginUpdateResource failed\n");
- /* check if it's possible to open the file now */
- test = CreateFile(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0);
- ok (test != INVALID_HANDLE_VALUE, "failed to create file\n");
+ /* check if it's possible to open the file now */
+ test = CreateFile(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0);
+ ok (test != INVALID_HANDLE_VALUE, "failed to create file\n");
- CloseHandle( test );
+ CloseHandle( test );
- r = EndUpdateResource( res, FALSE );
- ok( r == FALSE, "EndUpdateResource failed\n");
+ r = EndUpdateResource( res, FALSE );
+ ok( r == FALSE, "EndUpdateResource failed\n");
}
else
skip( "Can't update resource in empty file\n" );
if (0) /* this causes subsequent tests to fail on Vista */
{
- r = UpdateResource( res,
- MAKEINTRESOURCE(0x1230),
- MAKEINTRESOURCE(0x4567),
- 0xabcd,
- NULL, 0 );
- ok( r == FALSE, "UpdateResource failed\n");
+ r = UpdateResource( res,
+ MAKEINTRESOURCE(0x1230),
+ MAKEINTRESOURCE(0x4567),
+ 0xabcd,
+ NULL, 0 );
+ ok( r == FALSE, "UpdateResource failed\n");
}
r = UpdateResource( res,
return;
}
- ok(rc!=0,"error=%d\n",GetLastError());
+ ok(rc!=0,"error=%d\n",GetLastError());
if (pOpenThread) {
/* check that access control is obeyed */
rc = pSetThreadPriorityBoost(curthread,0);
ok( rc != 0, "error=%d\n",GetLastError());
}
- rc=pGetThreadPriorityBoost(curthread,&disabled);
- ok(rc!=0 && disabled==0,
- "rc=%d error=%d disabled=%d\n",rc,GetLastError(),disabled);
-}
+ rc=pGetThreadPriorityBoost(curthread,&disabled);
+ ok(rc!=0 && disabled==0,
+ "rc=%d error=%d disabled=%d\n",rc,GetLastError(),disabled);
+ }
/* check the GetThreadTimes function */
static VOID test_GetThreadTimes(void)
/* NOTE: This only works on WinNT/2000/XP) */
if (pSetThreadIdealProcessor) {
SetLastError(0xdeadbeef);
- error=pSetThreadIdealProcessor(curthread,0);
+ error=pSetThreadIdealProcessor(curthread,0);
if (GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
{
win_skip("SetThreadIdealProcessor is not implemented\n");
return;
}
- ok(error!=-1, "SetThreadIdealProcessor failed\n");
+ ok(error!=-1, "SetThreadIdealProcessor failed\n");
SetLastError(0xdeadbeef);
- error=pSetThreadIdealProcessor(curthread,MAXIMUM_PROCESSORS+1);
- ok(error==-1,
- "SetThreadIdealProcessor succeeded with an illegal processor #\n");
+ error=pSetThreadIdealProcessor(curthread,MAXIMUM_PROCESSORS+1);
+ ok(error==-1,
+ "SetThreadIdealProcessor succeeded with an illegal processor #\n");
ok(GetLastError()==ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
- error=pSetThreadIdealProcessor(curthread,MAXIMUM_PROCESSORS);
- ok(error==0, "SetThreadIdealProcessor returned an incorrect value\n");
- }
-}
+ error=pSetThreadIdealProcessor(curthread,MAXIMUM_PROCESSORS);
+ ok(error==0, "SetThreadIdealProcessor returned an incorrect value\n");
+ }
+ }
static VOID test_GetThreadExitCode(void)
{
if (te.th32OwnerProcessID == curr_pid) curr_found++;
if (te.th32OwnerProcessID == sub_pcs_pid) sub_found++;
if (winetest_debug > 1)
- trace("PID=%x TID=%x %d\n", te.th32OwnerProcessID, te.th32ThreadID, te.tpBasePri);
+ trace("PID=%x TID=%x %d\n", te.th32OwnerProcessID, te.th32ThreadID, te.tpBasePri);
num++;
} while (pThread32Next( hSnapshot, &te ));
}
if (te.th32OwnerProcessID == curr_pid) curr_found++;
if (te.th32OwnerProcessID == sub_pcs_pid) sub_found++;
if (winetest_debug > 1)
- trace("PID=%x TID=%x %d\n", te.th32OwnerProcessID, te.th32ThreadID, te.tpBasePri);
+ trace("PID=%x TID=%x %d\n", te.th32OwnerProcessID, te.th32ThreadID, te.tpBasePri);
num--;
} while (pThread32Next( hSnapshot, &te ));
}
if (!ptr)
{
ok( GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %d\n", GetLastError() );
- SetLastError(0xdeadbeef);
- ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 0 );
- ok( ptr != NULL, "MapViewOfFile FILE_MAP_READ error %u\n", GetLastError() );
- SetLastError(0xdeadbeef);
- ok( VirtualQuery( ptr, &info, sizeof(info) ) == sizeof(info),
- "VirtualQuery error %u\n", GetLastError() );
- ok( info.BaseAddress == ptr, "%p != %p\n", info.BaseAddress, ptr );
- ok( info.AllocationBase == ptr, "%p != %p\n", info.AllocationBase, ptr );
+ SetLastError(0xdeadbeef);
+ ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 0 );
+ ok( ptr != NULL, "MapViewOfFile FILE_MAP_READ error %u\n", GetLastError() );
+ SetLastError(0xdeadbeef);
+ ok( VirtualQuery( ptr, &info, sizeof(info) ) == sizeof(info),
+ "VirtualQuery error %u\n", GetLastError() );
+ ok( info.BaseAddress == ptr, "%p != %p\n", info.BaseAddress, ptr );
+ ok( info.AllocationBase == ptr, "%p != %p\n", info.AllocationBase, ptr );
ok( info.AllocationProtect == PAGE_READONLY, "%x != PAGE_READONLY\n", info.AllocationProtect );
- ok( info.RegionSize == 4096, "%lx != 4096\n", info.RegionSize );
- ok( info.State == MEM_COMMIT, "%x != MEM_COMMIT\n", info.State );
+ ok( info.RegionSize == 4096, "%lx != 4096\n", info.RegionSize );
+ ok( info.State == MEM_COMMIT, "%x != MEM_COMMIT\n", info.State );
ok( info.Protect == PAGE_READONLY, "%x != PAGE_READONLY\n", info.Protect );
}
else win_skip( "no access checks on win9x\n" );
if (!ptr)
{
ok( GetLastError() == ERROR_ACCESS_DENIED, "Wrong error %d\n", GetLastError() );
- SetLastError(0xdeadbeef);
- ptr = MapViewOfFile( mapping, FILE_MAP_WRITE, 0, 0, 0 );
- ok( ptr != NULL, "MapViewOfFile FILE_MAP_WRITE error %u\n", GetLastError() );
- SetLastError(0xdeadbeef);
- ok( VirtualQuery( ptr, &info, sizeof(info) ) == sizeof(info),
- "VirtualQuery error %u\n", GetLastError() );
- ok( info.BaseAddress == ptr, "%p != %p\n", info.BaseAddress, ptr );
- ok( info.AllocationBase == ptr, "%p != %p\n", info.AllocationBase, ptr );
- ok( info.AllocationProtect == PAGE_READWRITE, "%x != PAGE_READWRITE\n", info.AllocationProtect );
- ok( info.RegionSize == 4096, "%lx != 4096\n", info.RegionSize );
- ok( info.State == MEM_COMMIT, "%x != MEM_COMMIT\n", info.State );
- ok( info.Protect == PAGE_READWRITE, "%x != PAGE_READWRITE\n", info.Protect );
+ SetLastError(0xdeadbeef);
+ ptr = MapViewOfFile( mapping, FILE_MAP_WRITE, 0, 0, 0 );
+ ok( ptr != NULL, "MapViewOfFile FILE_MAP_WRITE error %u\n", GetLastError() );
+ SetLastError(0xdeadbeef);
+ ok( VirtualQuery( ptr, &info, sizeof(info) ) == sizeof(info),
+ "VirtualQuery error %u\n", GetLastError() );
+ ok( info.BaseAddress == ptr, "%p != %p\n", info.BaseAddress, ptr );
+ ok( info.AllocationBase == ptr, "%p != %p\n", info.AllocationBase, ptr );
+ ok( info.AllocationProtect == PAGE_READWRITE, "%x != PAGE_READWRITE\n", info.AllocationProtect );
+ ok( info.RegionSize == 4096, "%lx != 4096\n", info.RegionSize );
+ ok( info.State == MEM_COMMIT, "%x != MEM_COMMIT\n", info.State );
+ ok( info.Protect == PAGE_READWRITE, "%x != PAGE_READWRITE\n", info.Protect );
}
else win_skip( "no access checks on win9x\n" );
UnmapViewOfFile( ptr );
{
ok(info.AllocationProtect == PAGE_READWRITE,
"AllocationProtect should have been PAGE_READWRITE but was 0x%x\n", info.AllocationProtect);
- ok(info.Protect == 0, "Protect should have been 0 instead of 0x%x\n", info.Protect);
- ok(info.Type == MEM_MAPPED, "Type should have been MEM_MAPPED instead of 0x%x\n", info.Type);
+ ok(info.Protect == 0, "Protect should have been 0 instead of 0x%x\n", info.Protect);
+ ok(info.Type == MEM_MAPPED, "Type should have been MEM_MAPPED instead of 0x%x\n", info.Type);
}
if (ptr != ptr2)
{
ok(info.AllocationProtect == PAGE_READWRITE,
"AllocationProtect should have been PAGE_READWRITE but was 0x%x\n", info.AllocationProtect);
- ok(info.Type == MEM_MAPPED, "Type should have been MEM_MAPPED instead of 0x%x\n", info.Type);
+ ok(info.Type == MEM_MAPPED, "Type should have been MEM_MAPPED instead of 0x%x\n", info.Type);
}
/* shows that the VirtualAlloc above affects the mapping, not just the
* with a view of the mapping, but that isn't tested here */
if (ptr != ptr2)
{
- ret = VirtualQuery(ptr2, &info, sizeof(info));
- ok(ret, "VirtualQuery failed with error %d\n", GetLastError());
+ ret = VirtualQuery(ptr2, &info, sizeof(info));
+ ok(ret, "VirtualQuery failed with error %d\n", GetLastError());
ok(info.BaseAddress == ptr2,
"BaseAddress should have been %p but was %p instead\n", ptr2, info.BaseAddress);
ok(info.AllocationBase == ptr2,
"State should have been MEM_RESERVE instead of 0x%x\n", info.State);
ok(info.Protect == PAGE_READWRITE,
"Protect should have been 0 instead of 0x%x\n", info.Protect);
- ok(info.Type == MEM_MAPPED, "Type should have been MEM_MAPPED instead of 0x%x\n", info.Type);
+ ok(info.Type == MEM_MAPPED, "Type should have been MEM_MAPPED instead of 0x%x\n", info.Type);
}
addr = VirtualAlloc( ptr, MAPPING_SIZE, MEM_RESET, PAGE_READONLY );
GetLastError());
/* Try on a arbitrary directory */
- /* On FAT filesystems it seems that GetLastError() is set to
- ERROR_INVALID_FUNCTION. */
ret = pGetVolumeNameForVolumeMountPointA(temp_path, volume, len);
- ok(ret == FALSE && (GetLastError() == ERROR_NOT_A_REPARSE_POINT ||
- GetLastError() == ERROR_INVALID_FUNCTION),
+ ok(ret == FALSE && GetLastError() == ERROR_NOT_A_REPARSE_POINT,
"GetVolumeNameForVolumeMountPointA failed on %s, last=%d\n",
temp_path, GetLastError());
for (;path[0] <= 'z'; path[0]++) {
ret = QueryDosDeviceA( path, volume, len);
if(!ret) break;
- }
+}
if (path[0] <= 'z')
{
path[2] = '\\';
START_TEST(lzexpand_main)
{
- buf = HeapAlloc(GetProcessHeap(), 0, uncompressed_data_size * 2);
+ buf = malloc(uncompressed_data_size * 2);
test_LZOpenFileA();
test_LZOpenFileW();
test_LZRead();
test_LZCopy();
- HeapFree(GetProcessHeap(), 0, buf);
+ free(buf);
}
n = 65536;
ret = IEnumCodePage_Next(iEnumCP, 0, NULL, &n);
if (ret == S_FALSE)
- ok(n == 0 && ret == S_FALSE, "IEnumCodePage_Next: expected 0/S_FALSE, got %u/%08x\n", n, ret);
+ ok(n == 0 && ret == S_FALSE, "IEnumCodePage_Next: expected 0/S_FALSE, got %u/%08x\n", n, ret);
else if (ret == E_FAIL)
ok(n == 65536 && ret == E_FAIL, "IEnumCodePage_Next: expected 65536/E_FAIL, got %u/%08x\n", n, ret);
ret = IEnumCodePage_Next(iEnumCP, 0, NULL, NULL);
if (ret == S_FALSE)
- ok(ret == S_FALSE, "IEnumCodePage_Next: expected S_FALSE, got %08x\n", ret);
+ ok(ret == S_FALSE, "IEnumCodePage_Next: expected S_FALSE, got %08x\n", ret);
else if (ret == E_FAIL)
ok(n == 65536 && ret == E_FAIL, "IEnumCodePage_Next: expected 65536/E_FAIL, got %u/%08x\n", n, ret);
ok(cpinfo[i].bGDICharset == csi.ciCharset, "%d != %d\n", cpinfo[i].bGDICharset, csi.ciCharset);
else
if (winetest_debug > 1)
- trace("TranslateCharsetInfo failed for cp %u\n", cpinfo[i].uiFamilyCodePage);
+ trace("TranslateCharsetInfo failed for cp %u\n", cpinfo[i].uiFamilyCodePage);
#ifdef DUMP_CP_INFO
trace("%u: codepage %u family %u\n", i, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage);
convertible = check_convertible(iML2, cpinfo[i].uiCodePage, CP_UTF8);
if (convertible != E_FAIL)
{
- ret = IMultiLanguage2_IsConvertible(iML2, cpinfo[i].uiCodePage, CP_UTF8);
+ ret = IMultiLanguage2_IsConvertible(iML2, cpinfo[i].uiCodePage, CP_UTF8);
ok(ret == convertible, "IMultiLanguage2_IsConvertible(%u -> CP_UTF8) = %08x\n", cpinfo[i].uiCodePage, ret);
- ret = IMultiLanguage2_IsConvertible(iML2, CP_UTF8, cpinfo[i].uiCodePage);
+ ret = IMultiLanguage2_IsConvertible(iML2, CP_UTF8, cpinfo[i].uiCodePage);
ok(ret == convertible, "IMultiLanguage2_IsConvertible(CP_UTF8 -> %u) = %08x\n", cpinfo[i].uiCodePage, ret);
- }
+ }
}
else
if (winetest_debug > 1)
- trace("IsValidCodePage failed for cp %u\n", cpinfo[i].uiCodePage);
+ trace("IsValidCodePage failed for cp %u\n", cpinfo[i].uiCodePage);
if (memcmp(cpinfo[i].wszWebCharset,feffW,sizeof(WCHAR)*11)==0)
skip("Legacy windows bug returning invalid charset of unicodeFEFF\n");
else
{
- ret = IMultiLanguage2_GetCharsetInfo(iML2, cpinfo[i].wszWebCharset, &mcsi);
- /* _autoxxx charsets are a fake and GetCharsetInfo fails for them */
- if (memcmp(cpinfo[i].wszWebCharset, autoW, 5 * sizeof(WCHAR)))
- {
- ok (ret == S_OK, "IMultiLanguage2_GetCharsetInfo failed: %08x\n", ret);
+ ret = IMultiLanguage2_GetCharsetInfo(iML2, cpinfo[i].wszWebCharset, &mcsi);
+ /* _autoxxx charsets are a fake and GetCharsetInfo fails for them */
+ if (memcmp(cpinfo[i].wszWebCharset, autoW, 5 * sizeof(WCHAR)))
+ {
+ ok (ret == S_OK, "IMultiLanguage2_GetCharsetInfo failed: %08x\n", ret);
#ifdef DUMP_CP_INFO
- trace("%s: %u %u %s\n", wine_dbgstr_w(cpinfo[i].wszWebCharset), mcsi.uiCodePage, mcsi.uiInternetEncoding, wine_dbgstr_w(mcsi.wszCharset));
+ trace("%s: %u %u %s\n", wine_dbgstr_w(cpinfo[i].wszWebCharset), mcsi.uiCodePage, mcsi.uiInternetEncoding, wine_dbgstr_w(mcsi.wszCharset));
#endif
- ok(!lstrcmpiW(cpinfo[i].wszWebCharset, mcsi.wszCharset),
+ ok(!lstrcmpiW(cpinfo[i].wszWebCharset, mcsi.wszCharset),
#ifdef DUMP_CP_INFO
- "%s != %s\n",
- wine_dbgstr_w(cpinfo[i].wszWebCharset), wine_dbgstr_w(mcsi.wszCharset));
+ "%s != %s\n",
+ wine_dbgstr_w(cpinfo[i].wszWebCharset), wine_dbgstr_w(mcsi.wszCharset));
#else
- "wszWebCharset mismatch\n");
+ "wszWebCharset mismatch\n");
#endif
- if (0)
- {
- /* native mlang returns completely messed up encodings in some cases */
- ok(mcsi.uiInternetEncoding == cpinfo[i].uiCodePage || mcsi.uiInternetEncoding == cpinfo[i].uiFamilyCodePage,
- "%u != %u || %u\n", mcsi.uiInternetEncoding, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage);
- ok(mcsi.uiCodePage == cpinfo[i].uiCodePage || mcsi.uiCodePage == cpinfo[i].uiFamilyCodePage,
- "%u != %u || %u\n", mcsi.uiCodePage, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage);
- }
+ if (0)
+ {
+ /* native mlang returns completely messed up encodings in some cases */
+ ok(mcsi.uiInternetEncoding == cpinfo[i].uiCodePage || mcsi.uiInternetEncoding == cpinfo[i].uiFamilyCodePage,
+ "%u != %u || %u\n", mcsi.uiInternetEncoding, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage);
+ ok(mcsi.uiCodePage == cpinfo[i].uiCodePage || mcsi.uiCodePage == cpinfo[i].uiFamilyCodePage,
+ "%u != %u || %u\n", mcsi.uiCodePage, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage);
}
+ }
}
if (memcmp(cpinfo[i].wszHeaderCharset,feffW,sizeof(WCHAR)*11)==0)
skip("Legacy windows bug returning invalid charset of unicodeFEFF\n");
else
{
- ret = IMultiLanguage2_GetCharsetInfo(iML2, cpinfo[i].wszHeaderCharset, &mcsi);
- /* _autoxxx charsets are a fake and GetCharsetInfo fails for them */
- if (memcmp(cpinfo[i].wszHeaderCharset, autoW, 5 * sizeof(WCHAR)))
- {
- ok (ret == S_OK, "IMultiLanguage2_GetCharsetInfo failed: %08x\n", ret);
+ ret = IMultiLanguage2_GetCharsetInfo(iML2, cpinfo[i].wszHeaderCharset, &mcsi);
+ /* _autoxxx charsets are a fake and GetCharsetInfo fails for them */
+ if (memcmp(cpinfo[i].wszHeaderCharset, autoW, 5 * sizeof(WCHAR)))
+ {
+ ok (ret == S_OK, "IMultiLanguage2_GetCharsetInfo failed: %08x\n", ret);
#ifdef DUMP_CP_INFO
- trace("%s: %u %u %s\n", wine_dbgstr_w(cpinfo[i].wszHeaderCharset), mcsi.uiCodePage, mcsi.uiInternetEncoding, wine_dbgstr_w(mcsi.wszCharset));
+ trace("%s: %u %u %s\n", wine_dbgstr_w(cpinfo[i].wszHeaderCharset), mcsi.uiCodePage, mcsi.uiInternetEncoding, wine_dbgstr_w(mcsi.wszCharset));
#endif
- ok(!lstrcmpiW(cpinfo[i].wszHeaderCharset, mcsi.wszCharset),
+ ok(!lstrcmpiW(cpinfo[i].wszHeaderCharset, mcsi.wszCharset),
#ifdef DUMP_CP_INFO
- "%s != %s\n",
- wine_dbgstr_w(cpinfo[i].wszHeaderCharset), wine_dbgstr_w(mcsi.wszCharset));
+ "%s != %s\n",
+ wine_dbgstr_w(cpinfo[i].wszHeaderCharset), wine_dbgstr_w(mcsi.wszCharset));
#else
- "wszHeaderCharset mismatch\n");
+ "wszHeaderCharset mismatch\n");
#endif
- if (0)
- {
- /* native mlang returns completely messed up encodings in some cases */
- ok(mcsi.uiInternetEncoding == cpinfo[i].uiCodePage || mcsi.uiInternetEncoding == cpinfo[i].uiFamilyCodePage,
- "%u != %u || %u\n", mcsi.uiInternetEncoding, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage);
- ok(mcsi.uiCodePage == cpinfo[i].uiCodePage || mcsi.uiCodePage == cpinfo[i].uiFamilyCodePage,
- "%u != %u || %u\n", mcsi.uiCodePage, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage);
- }
- }
+ if (0)
+ {
+ /* native mlang returns completely messed up encodings in some cases */
+ ok(mcsi.uiInternetEncoding == cpinfo[i].uiCodePage || mcsi.uiInternetEncoding == cpinfo[i].uiFamilyCodePage,
+ "%u != %u || %u\n", mcsi.uiInternetEncoding, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage);
+ ok(mcsi.uiCodePage == cpinfo[i].uiCodePage || mcsi.uiCodePage == cpinfo[i].uiFamilyCodePage,
+ "%u != %u || %u\n", mcsi.uiCodePage, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage);
+ }
+ }
}
if (memcmp(cpinfo[i].wszBodyCharset,feffW,sizeof(WCHAR)*11)==0)
skip("Legacy windows bug returning invalid charset of unicodeFEFF\n");
else
{
- ret = IMultiLanguage2_GetCharsetInfo(iML2, cpinfo[i].wszBodyCharset, &mcsi);
- /* _autoxxx charsets are a fake and GetCharsetInfo fails for them */
- if (memcmp(cpinfo[i].wszBodyCharset, autoW, 5 * sizeof(WCHAR)))
- {
- ok (ret == S_OK, "IMultiLanguage2_GetCharsetInfo failed: %08x\n", ret);
+ ret = IMultiLanguage2_GetCharsetInfo(iML2, cpinfo[i].wszBodyCharset, &mcsi);
+ /* _autoxxx charsets are a fake and GetCharsetInfo fails for them */
+ if (memcmp(cpinfo[i].wszBodyCharset, autoW, 5 * sizeof(WCHAR)))
+ {
+ ok (ret == S_OK, "IMultiLanguage2_GetCharsetInfo failed: %08x\n", ret);
#ifdef DUMP_CP_INFO
- trace("%s: %u %u %s\n", wine_dbgstr_w(cpinfo[i].wszBodyCharset), mcsi.uiCodePage, mcsi.uiInternetEncoding, wine_dbgstr_w(mcsi.wszCharset));
+ trace("%s: %u %u %s\n", wine_dbgstr_w(cpinfo[i].wszBodyCharset), mcsi.uiCodePage, mcsi.uiInternetEncoding, wine_dbgstr_w(mcsi.wszCharset));
#endif
- ok(!lstrcmpiW(cpinfo[i].wszBodyCharset, mcsi.wszCharset),
+ ok(!lstrcmpiW(cpinfo[i].wszBodyCharset, mcsi.wszCharset),
#ifdef DUMP_CP_INFO
- "%s != %s\n",
- wine_dbgstr_w(cpinfo[i].wszBodyCharset), wine_dbgstr_w(mcsi.wszCharset));
+ "%s != %s\n",
+ wine_dbgstr_w(cpinfo[i].wszBodyCharset), wine_dbgstr_w(mcsi.wszCharset));
#else
- "wszBodyCharset mismatch\n");
+ "wszBodyCharset mismatch\n");
#endif
- if (0)
- {
- /* native mlang returns completely messed up encodings in some cases */
- ok(mcsi.uiInternetEncoding == cpinfo[i].uiCodePage || mcsi.uiInternetEncoding == cpinfo[i].uiFamilyCodePage,
- "%u != %u || %u\n", mcsi.uiInternetEncoding, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage);
- ok(mcsi.uiCodePage == cpinfo[i].uiCodePage || mcsi.uiCodePage == cpinfo[i].uiFamilyCodePage,
- "%u != %u || %u\n", mcsi.uiCodePage, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage);
- }
- }
+ if (0)
+ {
+ /* native mlang returns completely messed up encodings in some cases */
+ ok(mcsi.uiInternetEncoding == cpinfo[i].uiCodePage || mcsi.uiInternetEncoding == cpinfo[i].uiFamilyCodePage,
+ "%u != %u || %u\n", mcsi.uiInternetEncoding, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage);
+ ok(mcsi.uiCodePage == cpinfo[i].uiCodePage || mcsi.uiCodePage == cpinfo[i].uiFamilyCodePage,
+ "%u != %u || %u\n", mcsi.uiCodePage, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage);
+ }
+ }
}
}
IMLangFontLink_Test(iMLFL);
IMLangFontLink_Release(iMLFL);
-
+
/* IMLangFontLink2 */
ret = CoCreateInstance(&CLSID_CMultiLanguage, NULL, CLSCTX_INPROC_SERVER,
&IID_IMLangFontLink2, (void **)&iMLFL2);
MMRESULT rc;
ACMDRIVERDETAILS dd;
HACMDRIVER had;
-
+
DWORD dwDriverPriority;
DWORD dwDriverSupport;
/* MSDN says this should fail but it doesn't in practice */
dd.cbStruct = 4;
rc = acmDriverDetails(hadid, &dd, 0);
- ok(rc == MMSYSERR_NOERROR || rc == MMSYSERR_NOTSUPPORTED,
+ ok(rc == MMSYSERR_NOERROR,
"acmDriverDetails(): rc = %08x, should be %08x\n",
rc, MMSYSERR_NOERROR);
/* try valid parameters */
rc = acmDriverDetails(hadid, &dd, 0);
- ok(rc == MMSYSERR_NOERROR || rc == MMSYSERR_NOTSUPPORTED,
+ ok(rc == MMSYSERR_NOERROR,
"acmDriverDetails(): rc = %08x, should be %08x\n",
rc, MMSYSERR_NOERROR);
/* cbStruct should contain size of returned data (at most sizeof(dd))
TODO: should it be *exactly* sizeof(dd), as tested here?
*/
- if (rc == MMSYSERR_NOERROR) {
+ if (rc == MMSYSERR_NOERROR) {
ok(dd.cbStruct == sizeof(dd),
- "acmDriverDetails(): cbStruct = %08x\n", dd.cbStruct);
+ "acmDriverDetails(): cbStruct = %08x, should be %08lx\n",
+ dd.cbStruct, (unsigned long)sizeof(dd));
}
if (rc == MMSYSERR_NOERROR && winetest_interactive) {
/* try valid parameters */
rc = acmDriverOpen(&had, hadid, 0);
- ok(rc == MMSYSERR_NOERROR || rc == MMSYSERR_NODRIVER,
+ ok(rc == MMSYSERR_NOERROR,
"acmDriverOpen(): rc = %08x, should be %08x\n",
rc, MMSYSERR_NOERROR);
if(SUCCEEDED(hres)) {
test_style2(style2);
IHTMLStyle2_Release(style2);
- }
+}
hres = IHTMLStyle_QueryInterface(style, &IID_IHTMLStyle3, (void**)&style3);
ok(hres == S_OK, "Could not get IHTMLStyle3 iface: %08x\n", hres);
ok(node != NULL, "node == NULL\n");
if (node)
{
- test_node_name((IUnknown*)node, "#document");
- type = get_node_type((IUnknown*)node);
+ test_node_name((IUnknown*)node, "#document");
+ type = get_node_type((IUnknown*)node);
ok(type == 9, "type=%d, expected 9\n", type);
- node2 = test_node_get_parent((IUnknown*)node);
- IHTMLDOMNode_Release(node);
- ok(node2 == NULL, "node != NULL\n");
+ node2 = test_node_get_parent((IUnknown*)node);
+ IHTMLDOMNode_Release(node);
+ ok(node2 == NULL, "node != NULL\n");
}
elem2 = test_elem_get_parent((IUnknown*)elem);
{
VARIANT_BOOL vb;
- hres = IHTMLScriptElement_get_type(script, &type);
- ok(hres == S_OK, "get_type failed: %08x\n", hres);
+ hres = IHTMLScriptElement_get_type(script, &type);
+ ok(hres == S_OK, "get_type failed: %08x\n", hres);
ok(!strcmp_wa(type, "text/javascript"), "Unexpected type %s\n", wine_dbgstr_w(type));
- SysFreeString(type);
+ SysFreeString(type);
/* test defer */
hres = IHTMLScriptElement_put_defer(script, VARIANT_TRUE);
ok(pid != -1, "pid == -1\n");
SysFreeString(str);
IDispatchEx_Release(dispex);
- }
+}
}
IDispatch_Release(disp);
test_node_get_value_str((IUnknown*)comment, "testing");
IHTMLDOMNode_Release(comment);
- }
+}
IHTMLDocument5_Release(doc5);
}
run_domtest(range_test_str, test_txtrange);
run_domtest(range_test2_str, test_txtrange2);
if (winetest_interactive || ! is_ie_hardened()) {
- run_domtest(elem_test_str, test_elems);
+ run_domtest(elem_test_str, test_elems);
}else {
skip("IE running in Enhanced Security Configuration\n");
}
load_state = LD_INTERACTIVE;
}
else
- test_MSHTML_QueryStatus(NULL, OLECMDF_SUPPORTED
- | (editmode && (load_state == LD_INTERACTIVE || load_state == LD_COMPLETE)
- ? OLECMDF_ENABLED : 0));
+ test_MSHTML_QueryStatus(NULL, OLECMDF_SUPPORTED
+ | (editmode && (load_state == LD_INTERACTIVE || load_state == LD_COMPLETE)
+ ? OLECMDF_ENABLED : 0));
if(readystate_set_loading) {
readystate_set_loading = FALSE;
load_state = LD_LOADING;
}
if(!editmode || load_state != LD_LOADING || !called_Exec_Explorer_69)
- test_readyState(NULL);
+ test_readyState(NULL);
return S_OK;
case 1005:
CHECK_EXPECT(OnChanged_1005);
if(!editmode)
- test_readyState(NULL);
+ test_readyState(NULL);
readystate_set_interactive = (load_state != LD_INTERACTIVE);
return S_OK;
case 1012:
(IUnknown*)&ClientSite);
if(mon == &Moniker)
- SET_EXPECT(GetDisplayName);
+ SET_EXPECT(GetDisplayName);
if(!set_clientsite) {
SET_EXPECT(Invoke_AMBIENT_USERMODE);
SET_EXPECT(GetHostInfo);
SET_EXPECT(Exec_ShellDocView_84);
SET_EXPECT(IsSystemMoniker);
if(mon == &Moniker)
- SET_EXPECT(BindToStorage);
+ SET_EXPECT(BindToStorage);
SET_EXPECT(SetActiveObject);
if(set_clientsite) {
SET_EXPECT(Invoke_AMBIENT_SILENT);
ok(hres == S_OK, "Load failed: %08x\n", hres);
if(mon == &Moniker)
- CHECK_CALLED(GetDisplayName);
+ CHECK_CALLED(GetDisplayName);
if(!set_clientsite) {
CHECK_CALLED(Invoke_AMBIENT_USERMODE);
CHECK_CALLED(GetHostInfo);
SET_CALLED(IsSystemMoniker); /* IE7 */
SET_CALLED(Exec_ShellDocView_84);
if(mon == &Moniker)
- CHECK_CALLED(BindToStorage);
+ CHECK_CALLED(BindToStorage);
SET_CALLED(SetActiveObject); /* FIXME */
if(set_clientsite) {
CHECK_CALLED(Invoke_AMBIENT_SILENT);
if(flags & (DWL_VERBDONE|DWL_HTTP))
SET_EXPECT(Exec_SETPROGRESSMAX);
if((flags & DWL_VERBDONE) && !load_from_stream)
- SET_EXPECT(GetHostInfo);
+ SET_EXPECT(GetHostInfo);
SET_EXPECT(SetStatusText);
SET_EXPECT(Exec_SETDOWNLOADSTATE_1);
SET_EXPECT(GetDropTarget);
if(flags & DWL_HTTP)
SET_CALLED(Exec_SETPROGRESSMAX);
if((flags & DWL_VERBDONE) && !load_from_stream)
- CHECK_CALLED(GetHostInfo);
+ CHECK_CALLED(GetHostInfo);
CHECK_CALLED(SetStatusText);
CHECK_CALLED(Exec_SETDOWNLOADSTATE_1);
CHECK_CALLED(GetDropTarget);
&IID_IUnknown, (void**)unk);
ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres);
if(FAILED(hres))
- return hres;
+ return hres;
hres = IUnknown_QueryInterface(*unk, &IID_IHTMLDocument5, (void**)&doc5);
if(SUCCEEDED(hres)) {
}else {
win_skip("Could not get IHTMLDocument5, probably too old IE\n");
IUnknown_Release(*unk);
- }
+}
return hres;
}
test_HTMLDocument_hlink();
if(!show_failed) {
- test_HTMLDocument(FALSE);
- test_HTMLDocument(TRUE);
- test_HTMLDocument_StreamLoad();
- test_editing_mode(FALSE);
- test_editing_mode(TRUE);
+ test_HTMLDocument(FALSE);
+ test_HTMLDocument(TRUE);
+ test_HTMLDocument_StreamLoad();
+ test_editing_mode(FALSE);
+ test_editing_mode(TRUE);
test_HTMLDocument_http();
}
test_HTMLDoc_ISupportErrorInfo();
if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
win_skip("SearchPathW is not implemented\n");
else
- ok(0, "SearchPath failed: %u\n", GetLastError());
+ ok(0, "SearchPath failed: %u\n", GetLastError());
return;
}
ok(!strcmp_wa(pstrItemName, "window"), "pstrItemName = %s\n", wine_dbgstr_w(pstrItemName));
if(!script_disp)
- return E_NOTIMPL;
+ return E_NOTIMPL;
*ppdisp = script_disp;
return S_OK;
CoInitialize(NULL);
if(winetest_interactive || ! is_ie_hardened()) {
- if(register_script_engine()) {
- test_simple_script();
- init_registry(FALSE);
- }else {
- skip("Could not register TestScript engine\n");
- }
+ if(register_script_engine()) {
+ test_simple_script();
+ init_registry(FALSE);
+ }else {
+ skip("Could not register TestScript engine\n");
+ }
}else {
skip("IE running in Enhanced Security Configuration\n");
}
{
{ "dom", func_dom },
{ "events", func_events },
- { "htmldoc", func_htmldoc },
+ { "htmldoc", func_htmldoc },
{ "misc", func_misc },
{ "protocol", func_protocol },
{ "script", func_script },
DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
-static const char *msifile = "winetest-automation.msi";
-static const WCHAR szMsifile[] = {'w','i','n','e','t','e','s','t','-','a','u','t','o','m','a','t','i','o','n','.','m','s','i',0};
+static const char *msifile = "winetest.msi";
+static const WCHAR szMsifile[] = {'w','i','n','e','t','e','s','t','.','m','s','i',0};
static const WCHAR szMSITEST[] = { 'M','S','I','T','E','S','T',0 };
static const WCHAR szProductCode[] = { '{','F','1','C','3','A','F','5','0','-','8','B','5','6','-','4','A','6','9','-','A','0','0','C','-','0','0','7','7','3','F','E','4','2','F','3','0','}',0 };
static const WCHAR szUpgradeCode[] = { '{','C','E','0','6','7','E','8','D','-','2','E','1','A','-','4','3','6','7','-','B','7','3','4','-','4','E','B','2','B','D','A','D','6','5','6','5','}',0 };
MsiCloseHandle(db);
}
-static BOOL create_package(LPWSTR path)
-{
- DWORD len;
-
- /* Prepare package */
- create_database(msifile, tables,
- sizeof(tables) / sizeof(msi_table), summary_info,
- sizeof(summary_info) / sizeof(msi_summary_info));
-
- len = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED,
- CURR_DIR, -1, path, MAX_PATH);
- ok(len, "MultiByteToWideChar returned error %d\n", GetLastError());
- if (!len)
- return FALSE;
-
- /* lstrcatW does not work on win95 */
- path[len - 1] = '\\';
- memcpy(&path[len], szMsifile, sizeof(szMsifile));
- return TRUE;
-}
-
/*
* Installation helpers
*/
ok(dispid == 1, "Expected 1, got %d\n", dispid);
dispid = get_dispid(pInstaller, "OpenPackage");
ok(dispid == 2, "Expected 2, got %d\n", dispid);
- dispid = get_dispid(pInstaller, "OpenProduct");
- ok(dispid == 3, "Expected 3, got %d\n", dispid);
dispid = get_dispid(pInstaller, "OpenDatabase");
ok(dispid == 4, "Expected 4, got %d\n", dispid);
- dispid = get_dispid(pInstaller, "SummaryInformation");
- ok(dispid == 5, "Expected 5, got %d\n", dispid);
dispid = get_dispid( pInstaller, "UILevel" );
ok(dispid == 6, "Expected 6, got %d\n", dispid);
- dispid = get_dispid(pInstaller, "EnableLog");
- ok(dispid == 7, "Expected 7, got %d\n", dispid);
dispid = get_dispid(pInstaller, "InstallProduct");
ok(dispid == 8, "Expected 8, got %d\n", dispid);
dispid = get_dispid(pInstaller, "Version");
ok(dispid == 9, "Expected 9, got %d\n", dispid);
- dispid = get_dispid(pInstaller, "LastErrorRecord");
- ok(dispid == 10, "Expected 10, got %d\n", dispid);
dispid = get_dispid(pInstaller, "RegistryValue");
ok(dispid == 11, "Expected 11, got %d\n", dispid);
- dispid = get_dispid(pInstaller, "Environment");
- ok(dispid == 12, "Expected 12, got %d\n", dispid);
- dispid = get_dispid(pInstaller, "FileAttributes");
- ok(dispid == 13, "Expected 13, got %d\n", dispid);
- dispid = get_dispid(pInstaller, "FileSize");
- ok(dispid == 15, "Expected 15, got %d\n", dispid);
- dispid = get_dispid(pInstaller, "FileVersion");
- ok(dispid == 16, "Expected 16, got %d\n", dispid);
+ todo_wine
+ {
+ dispid = get_dispid(pInstaller, "OpenProduct");
+ ok(dispid == 3, "Expected 3, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "SummaryInformation");
+ ok(dispid == 5, "Expected 5, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "EnableLog");
+ ok(dispid == 7, "Expected 7, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "LastErrorRecord");
+ ok(dispid == 10, "Expected 10, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "Environment");
+ ok(dispid == 12, "Expected 12, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "FileAttributes");
+ ok(dispid == 13, "Expected 13, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "FileSize");
+ ok(dispid == 15, "Expected 15, got %d\n", dispid);
+ dispid = get_dispid(pInstaller, "FileVersion");
+ ok(dispid == 16, "Expected 16, got %d\n", dispid);
+ }
dispid = get_dispid(pInstaller, "ProductState");
ok(dispid == 17, "Expected 17, got %d\n", dispid);
dispid = get_dispid(pInstaller, "ProductInfo");
DISPID dispid;
OLECHAR *name;
VARIANT varresult;
- VARIANTARG vararg[3];
- WCHAR path[MAX_PATH];
+ VARIANTARG vararg[2];
DISPPARAMS dispparams = {NULL, NULL, 0, 0};
/* Test getting ID of a function name that does not exist */
/* Try with NULL params */
hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
- ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned 0x%08x\n", hr);
+ todo_wine ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned 0x%08x\n", hr);
/* Try one empty parameter */
dispparams.rgvarg = vararg;
dispparams.cArgs = 1;
VariantInit(&vararg[0]);
hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
- ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned 0x%08x\n", hr);
+ todo_wine ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned 0x%08x\n", hr);
- /* Try two empty parameters */
- dispparams.cArgs = 2;
- VariantInit(&vararg[0]);
- VariantInit(&vararg[1]);
- hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
- ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned 0x%08x\n", hr);
-
- /* Try one parameter, the required BSTR. Second parameter is optional.
- * NOTE: The specified package does not exist, which is why the call fails.
- */
- dispparams.cArgs = 1;
+ /* Try one parameter, function requires two */
VariantInit(&vararg[0]);
V_VT(&vararg[0]) = VT_BSTR;
V_BSTR(&vararg[0]) = SysAllocString(szMsifile);
hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
- ok(hr == DISP_E_EXCEPTION, "IDispatch::Invoke returned 0x%08x\n", hr);
- ok_exception(hr, szOpenPackageException);
VariantClear(&vararg[0]);
- /* Provide the required BSTR and an empty second parameter.
- * NOTE: The specified package does not exist, which is why the call fails.
- */
- dispparams.cArgs = 2;
- VariantInit(&vararg[1]);
- V_VT(&vararg[1]) = VT_BSTR;
- V_BSTR(&vararg[1]) = SysAllocString(szMsifile);
- VariantInit(&vararg[0]);
- hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
- ok(hr == DISP_E_EXCEPTION, "IDispatch::Invoke returned 0x%08x\n", hr);
- ok_exception(hr, szOpenPackageException);
- VariantClear(&vararg[1]);
-
- /* Provide the required BSTR and two empty parameters.
- * NOTE: The specified package does not exist, which is why the call fails.
- */
- dispparams.cArgs = 3;
- VariantInit(&vararg[2]);
- V_VT(&vararg[2]) = VT_BSTR;
- V_BSTR(&vararg[2]) = SysAllocString(szMsifile);
- VariantInit(&vararg[1]);
- VariantInit(&vararg[0]);
- hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
ok(hr == DISP_E_EXCEPTION, "IDispatch::Invoke returned 0x%08x\n", hr);
ok_exception(hr, szOpenPackageException);
- VariantClear(&vararg[2]);
-
- /* Provide the required BSTR and a second parameter with the wrong type. */
- dispparams.cArgs = 2;
- VariantInit(&vararg[1]);
- V_VT(&vararg[1]) = VT_BSTR;
- V_BSTR(&vararg[1]) = SysAllocString(szMsifile);
- VariantInit(&vararg[0]);
- V_VT(&vararg[0]) = VT_BSTR;
- V_BSTR(&vararg[0]) = SysAllocString(szMsifile);
- hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
- ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned 0x%08x\n", hr);
- VariantClear(&vararg[0]);
- VariantClear(&vararg[1]);
-
- /* Create a proper installer package. */
- create_package(path);
-
- /* Try one parameter, the required BSTR. Second parameter is optional.
- * Proper installer package exists. Path to the package is relative.
- */
- dispparams.cArgs = 1;
- VariantInit(&vararg[0]);
- V_VT(&vararg[0]) = VT_BSTR;
- V_BSTR(&vararg[0]) = SysAllocString(szMsifile);
- hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
- todo_wine ok(hr == DISP_E_EXCEPTION, "IDispatch::Invoke returned 0x%08x\n", hr);
- ok_exception(hr, szOpenPackageException);
- VariantClear(&vararg[0]);
- if (hr != DISP_E_EXCEPTION)
- VariantClear(&varresult);
-
- /* Try one parameter, the required BSTR. Second parameter is optional.
- * Proper installer package exists. Path to the package is absolute.
- */
- dispparams.cArgs = 1;
- VariantInit(&vararg[0]);
- V_VT(&vararg[0]) = VT_BSTR;
- V_BSTR(&vararg[0]) = SysAllocString(path);
- hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
- ok(hr == S_OK, "IDispatch::Invoke returned 0x%08x\n", hr);
- VariantClear(&vararg[0]);
- VariantClear(&varresult);
-
- /* Provide the required BSTR and an empty second parameter. Proper
- * installation package exists.
- */
- dispparams.cArgs = 2;
- VariantInit(&vararg[1]);
- V_VT(&vararg[1]) = VT_BSTR;
- V_BSTR(&vararg[1]) = SysAllocString(path);
- VariantInit(&vararg[0]);
- hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
- ok(hr == S_OK, "IDispatch::Invoke returned 0x%08x\n", hr);
- VariantClear(&vararg[1]);
- VariantClear(&varresult);
-
- /* Provide the required BSTR and two empty parameters. Proper
- * installation package exists.
- */
- dispparams.cArgs = 3;
- VariantInit(&vararg[2]);
- V_VT(&vararg[2]) = VT_BSTR;
- V_BSTR(&vararg[2]) = SysAllocString(path);
- VariantInit(&vararg[1]);
- VariantInit(&vararg[0]);
- hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
- ok(hr == S_OK, "IDispatch::Invoke returned 0x%08x\n", hr);
- VariantClear(&vararg[2]);
- VariantClear(&varresult);
-
- /* Provide the required BSTR and a second parameter with the wrong type. */
- dispparams.cArgs = 2;
- VariantInit(&vararg[1]);
- V_VT(&vararg[1]) = VT_BSTR;
- V_BSTR(&vararg[1]) = SysAllocString(path);
- VariantInit(&vararg[0]);
- V_VT(&vararg[0]) = VT_BSTR;
- V_BSTR(&vararg[0]) = SysAllocString(path);
- hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
- ok(hr == DISP_E_TYPEMISMATCH, "IDispatch::Invoke returned 0x%08x\n", hr);
- VariantClear(&vararg[0]);
- VariantClear(&vararg[1]);
-
- /* Provide the required BSTR and a second parameter that can be coerced to
- * VT_I4.
- */
- dispparams.cArgs = 2;
- VariantInit(&vararg[1]);
- V_VT(&vararg[1]) = VT_BSTR;
- V_BSTR(&vararg[1]) = SysAllocString(path);
- VariantInit(&vararg[0]);
- V_VT(&vararg[0]) = VT_I2;
- V_BSTR(&vararg[0]) = 0;
- hr = IDispatch_Invoke(pInstaller, dispid, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
- ok(hr == S_OK, "IDispatch::Invoke returned 0x%08x\n", hr);
- VariantClear(&vararg[1]);
- VariantClear(&varresult);
-
- DeleteFileW(path);
/* Test invoking a method as a DISPATCH_PROPERTYGET or DISPATCH_PROPERTYPUT */
VariantInit(&vararg[0]);
static WCHAR szIntegerDataException[] = { 'I','n','t','e','g','e','r','D','a','t','a',',','F','i','e','l','d',0 };
WCHAR szPath[MAX_PATH];
HRESULT hr;
+ UINT len;
IDispatch *pSession = NULL, *pDatabase = NULL, *pRecord = NULL, *pStringList = NULL;
int iValue, iCount;
IDispatch_Release(pRecord);
}
- create_package(szPath);
+ /* Prepare package */
+ create_database(msifile, tables, sizeof(tables) / sizeof(msi_table),
+ summary_info, sizeof(summary_info) / sizeof(msi_summary_info));
+
+ len = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, CURR_DIR, -1, szPath, MAX_PATH);
+ ok(len, "MultiByteToWideChar returned error %d\n", GetLastError());
+ if (!len) return;
+
+ /* lstrcatW does not work on win95 */
+ szPath[len - 1] = '\\';
+ memcpy(&szPath[len], szMsifile, sizeof(szMsifile));
/* Installer::OpenPackage */
hr = Installer_OpenPackage(szPath, 0, &pSession);
#include "wine/test.h"
-static const char *msifile = "winetest-db.msi";
-static const char *msifile2 = "winetst2-db.msi";
-static const char *mstfile = "winetst-db.mst";
-static const WCHAR msifileW[] = {'w','i','n','e','t','e','s','t','-','d','b','.','m','s','i',0};
+static const char *msifile = "winetest.msi";
+static const char *msifile2 = "winetst2.msi";
+static const char *mstfile = "winetst.mst";
static void test_msidatabase(void)
{
r = run_query( hdb, 0, query ); \
HeapFree(GetProcessHeap(), 0, query); \
return r; \
- }
+}
make_add_entry(component,
"INSERT INTO `Component` "
ok(r == ERROR_SUCCESS, "failed to set string\n");
r = MsiViewModify(hview, MSIMODIFY_UPDATE, hrec);
- ok(r == ERROR_FUNCTION_FAILED, "MsiViewModify failed\n");
+ ok(r == ERROR_FUNCTION_FAILED, "MsiViewModify failed\n");
r = MsiCloseHandle(hrec);
ok(r == ERROR_SUCCESS, "failed to close record\n");
r = MsiViewModify(hview, MSIMODIFY_INSERT_TEMPORARY, hrec );
ok(r == ERROR_SUCCESS, "MsiViewModify failed\n");
- r = MsiCloseHandle(hrec);
- ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n");
r = MsiViewClose(hview);
ok(r == ERROR_SUCCESS, "MsiViewClose failed\n");
r = MsiCloseHandle(hview);
{
MsiViewGetColumnInfo( hview, type, &rec );
}
- MsiViewClose(hview);
+ MsiViewClose(hview);
MsiCloseHandle(hview);
return rec;
}
MsiCloseHandle( rec );
}
}
- MsiViewClose(hview);
+ MsiViewClose(hview);
MsiCloseHandle(hview);
return type;
}
CloseHandle(file);
}
-
+
#define create_file(name) create_file_data(name, name, 0)
static void test_streamtable(void)
ok( r == ERROR_SUCCESS, "query failed: %d\n", r );
MsiCloseHandle( rec );
- rec = 0;
- query = "SELECT * FROM `Media` WHERE `DiskPrompt` < 'Cabinet'";
- r = do_query(hdb, query, &rec);
- ok( r == ERROR_BAD_QUERY_SYNTAX, "query failed: %d\n", r );
- MsiCloseHandle( rec );
-
- rec = 0;
- query = "SELECT * FROM `Media` WHERE `DiskPrompt` > 'Cabinet'";
- r = do_query(hdb, query, &rec);
- ok( r == ERROR_BAD_QUERY_SYNTAX, "query failed: %d\n", r );
- MsiCloseHandle( rec );
-
- rec = 0;
- query = "SELECT * FROM `Media` WHERE `DiskPrompt` <> 'Cabinet'";
- r = do_query(hdb, query, &rec);
- todo_wine ok( r == ERROR_SUCCESS, "query failed: %d\n", r );
- MsiCloseHandle( rec );
-
- rec = 0;
- query = "SELECT * FROM `Media` WHERE `DiskPrompt` = 'Cabinet'";
- r = do_query(hdb, query, &rec);
- ok( r == ERROR_NO_MORE_ITEMS, "query failed: %d\n", r );
- MsiCloseHandle( rec );
-
rec = MsiCreateRecord(1);
MsiRecordSetString(rec, 1, "");
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
ok(stm != NULL, "Expected non-NULL stream\n");
- CoTaskMemFree(stat.pwcsName);
-
sz = MAX_PATH;
memset(data, 'a', MAX_PATH);
hr = IStream_Read(stm, data, sz, &count);
MSIHANDLE hdb;
IStorage *stg = NULL;
+ static const WCHAR msifileW[] = {'w','i','n','e','t','e','s','t','.','m','s','i',0};
+
DeleteFile(msifile);
r = MsiOpenDatabase(msifile, MSIDBOPEN_CREATE, &hdb);
query = "INSERT INTO `Table` ( `A` ) VALUES ( 'This is a ''string'' ok' )";
r = run_query(hdb, 0, query);
- ok(r == ERROR_BAD_QUERY_SYNTAX, "Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r);
+ ok(r == ERROR_BAD_QUERY_SYNTAX, "Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r);
query = "INSERT INTO `Table` ( `A` ) VALUES ( 'This is a '''string''' ok' )";
r = run_query(hdb, 0, query);
size = MAX_PATH;
r = MsiRecordGetString(hrec, 1, buf, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(!lstrcmp(buf, "This is a \"string\" ok"),
- "Expected \"This is a \"string\" ok\", got %s\n", buf);
+ ok(!lstrcmp(buf, "This is a \"string\" ok"),
+ "Expected \"This is a \"string\" ok\", got %s\n", buf);
MsiCloseHandle(hrec);
r = MsiViewFetch(hview, &hrec);
- ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
+ ok(r == ERROR_NO_MORE_ITEMS, "Expected ERROR_NO_MORE_ITEMS, got %d\n", r);
MsiViewClose(hview);
MsiCloseHandle(hview);
query = "CREATE TABLE `Table`\r ( `A` CHAR(72) NOT NULL PRIMARY KEY `A` )";
r = run_query(hdb, 0, query);
- ok(r == ERROR_BAD_QUERY_SYNTAX,
- "Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r);
+ ok(r == ERROR_BAD_QUERY_SYNTAX,
+ "Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r);
query = "CREATE TABLE `Table` \r( `A` CHAR(72) NOT NULL PRIMARY KEY `A` )";
r = run_query(hdb, 0, query);
query = "CREATE TABLE `Four` ( `A` CHAR(72\r) NOT NULL PRIMARY KEY `A` )";
r = run_query(hdb, 0, query);
- ok(r == ERROR_BAD_QUERY_SYNTAX,
- "Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r);
+ ok(r == ERROR_BAD_QUERY_SYNTAX,
+ "Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r);
query = "CREATE TABLE `Four` ( `A` CHAR(\r72) NOT NULL PRIMARY KEY `A` )";
r = run_query(hdb, 0, query);
size = MAX_PATH;
r = MsiRecordGetStringA(hrec, 1, buf, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(!lstrcmpA(buf, "\rOne"), "Expected \"\\rOne\", got \"%s\"\n", buf);
+ ok(!lstrcmpA(buf, "\rOne"), "Expected \"\\rOne\", got \"%s\"\n", buf);
MsiCloseHandle(hrec);
size = MAX_PATH;
r = MsiRecordGetStringA(hrec, 1, buf, &size);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(!lstrcmpA(buf, "Tw\ro"), "Expected \"Tw\\ro\", got \"%s\"\n", buf);
+ ok(!lstrcmpA(buf, "Tw\ro"), "Expected \"Tw\\ro\", got \"%s\"\n", buf);
MsiCloseHandle(hrec);
/* check the column types */
hrec = get_column_info(hdb, "SELECT * FROM `_Storages`", MSICOLINFO_TYPES);
ok(hrec, "failed to get column info hrecord\n");
- ok(check_record(hrec, 1, "s62"), "wrong hrecord type\n");
- ok(check_record(hrec, 2, "V0"), "wrong hrecord type\n");
+ ok(check_record(hrec, 1, "s62"), "wrong hrecord type\n");
+ ok(check_record(hrec, 2, "V0"), "wrong hrecord type\n");
MsiCloseHandle(hrec);
/* now try the names */
hrec = get_column_info(hdb, "SELECT * FROM `_Storages`", MSICOLINFO_NAMES);
ok(hrec, "failed to get column info hrecord\n");
- ok(check_record(hrec, 1, "Name"), "wrong hrecord type\n");
- ok(check_record(hrec, 2, "Data"), "wrong hrecord type\n");
+ ok(check_record(hrec, 1, "Name"), "wrong hrecord type\n");
+ ok(check_record(hrec, 2, "Data"), "wrong hrecord type\n");
MsiCloseHandle(hrec);
query = "INSERT INTO `_Storages` (`Name`, `Data`) VALUES (?, ?)";
r = MsiDatabaseOpenView(hdb, query, &hview);
- ok(r == ERROR_SUCCESS, "Failed to open database hview: %d\n", r);
+ ok(r == ERROR_SUCCESS, "Failed to open database hview: %d\n", r);
r = MsiViewExecute(hview, hrec);
- ok(r == ERROR_SUCCESS, "Failed to execute hview: %d\n", r);
+ ok(r == ERROR_SUCCESS, "Failed to execute hview: %d\n", r);
MsiCloseHandle(hrec);
MsiViewClose(hview);
query = "SELECT `Name`, `Data` FROM `_Storages`";
r = MsiDatabaseOpenView(hdb, query, &hview);
- ok(r == ERROR_SUCCESS, "Failed to open database hview: %d\n", r);
+ ok(r == ERROR_SUCCESS, "Failed to open database hview: %d\n", r);
r = MsiViewExecute(hview, 0);
- ok(r == ERROR_SUCCESS, "Failed to execute hview: %d\n", r);
+ ok(r == ERROR_SUCCESS, "Failed to execute hview: %d\n", r);
r = MsiViewFetch(hview, &hrec);
- ok(r == ERROR_SUCCESS, "Failed to fetch hrecord: %d\n", r);
+ ok(r == ERROR_SUCCESS, "Failed to fetch hrecord: %d\n", r);
size = MAX_PATH;
r = MsiRecordGetString(hrec, 1, file, &size);
- ok(r == ERROR_SUCCESS, "Failed to get string: %d\n", r);
+ ok(r == ERROR_SUCCESS, "Failed to get string: %d\n", r);
ok(!lstrcmp(file, "stgname"), "Expected \"stgname\", got \"%s\"\n", file);
size = MAX_PATH;
#include "wine/test.h"
-static const char msifile[] = "winetest-format.msi";
+static const char msifile[] = "winetest.msi";
static UINT run_query( MSIHANDLE hdb, const char *query )
{
r = run_query( hdb, query ); \
HeapFree(GetProcessHeap(), 0, query); \
return r; \
- }
+}
make_add_entry(feature,
"INSERT INTO `Feature` "
static void test_createpackage(void)
{
+ static const CHAR filename[] = "winetest.msi";
MSIHANDLE hPackage = 0;
UINT res;
- hPackage = helper_createpackage( msifile );
+ hPackage = helper_createpackage( filename );
ok ( hPackage != 0, " Failed to create package\n");
res = MsiCloseHandle( hPackage);
ok( res == ERROR_SUCCESS , "Failed to close package\n" );
- DeleteFile( msifile );
+ DeleteFile( filename );
}
static void test_formatrecord(void)
static void test_formatrecord_package(void)
{
+ static const CHAR filename[] = "winetest.msi";
char buffer[100];
MSIHANDLE hrec;
MSIHANDLE package;
UINT r;
DWORD sz=100;
- package = helper_createpackage( msifile );
+ package = helper_createpackage( filename );
ok(package!=0, "Unable to create package\n");
hrec = MsiCreateRecord(12);
r = MsiCloseHandle(package);
ok(r==ERROR_SUCCESS, "Unable to close package\n");
- DeleteFile( msifile );
+ DeleteFile( filename );
}
static void test_formatrecord_tables(void)
lstrcpy( expected, "1: " );
lstrcat( expected, curr_dir );
if (strlen(curr_dir) > 3)
- lstrcat( expected, "\\" );
+ lstrcat( expected, "\\ " );
lstrcat( expected, " " );
size = MAX_PATH;
MsiRecordSetString( hrec, 1, "[$parietal]" );
static void test_processmessage(void)
{
+ static const CHAR filename[] = "winetest.msi";
MSIHANDLE hrec;
MSIHANDLE package;
int r;
- package = helper_createpackage( msifile );
+ package = helper_createpackage( filename );
ok(package!=0, "Unable to create package\n");
hrec = MsiCreateRecord(3);
MsiCloseHandle(hrec);
MsiCloseHandle(package);
- DeleteFile(msifile);
+ DeleteFile(filename);
}
START_TEST(format)
"SERVNAME\tTestService\n"
"SERVDISP\tTestServiceDisp\n";
-static const CHAR aup_property_dat[] = "Property\tValue\n"
- "s72\tl0\n"
- "Property\tProperty\n"
- "DefaultUIFont\tDlgFont8\n"
- "HASUIRUN\t0\n"
- "ALLUSERS\t1\n"
- "INSTALLLEVEL\t3\n"
- "InstallMode\tTypical\n"
- "Manufacturer\tWine\n"
- "PIDTemplate\t12345<###-%%%%%%%>@@@@@\n"
- "ProductCode\t{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}\n"
- "ProductID\tnone\n"
- "ProductLanguage\t1033\n"
- "ProductName\tMSITEST\n"
- "ProductVersion\t1.1.1\n"
- "PROMPTROLLBACKCOST\tP\n"
- "Setup\tSetup\n"
- "UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
- "AdminProperties\tPOSTADMIN\n"
- "ROOTDRIVE\tC:\\\n"
- "SERVNAME\tTestService\n"
- "SERVDISP\tTestServiceDisp\n";
-
-static const CHAR aup2_property_dat[] = "Property\tValue\n"
- "s72\tl0\n"
- "Property\tProperty\n"
- "DefaultUIFont\tDlgFont8\n"
- "HASUIRUN\t0\n"
- "ALLUSERS\t2\n"
- "INSTALLLEVEL\t3\n"
- "InstallMode\tTypical\n"
- "Manufacturer\tWine\n"
- "PIDTemplate\t12345<###-%%%%%%%>@@@@@\n"
- "ProductCode\t{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}\n"
- "ProductID\tnone\n"
- "ProductLanguage\t1033\n"
- "ProductName\tMSITEST\n"
- "ProductVersion\t1.1.1\n"
- "PROMPTROLLBACKCOST\tP\n"
- "Setup\tSetup\n"
- "UpgradeCode\t{4C0EAA15-0264-4E5A-8758-609EF142B92D}\n"
- "AdminProperties\tPOSTADMIN\n"
- "ROOTDRIVE\tC:\\\n"
- "SERVNAME\tTestService\n"
- "SERVDISP\tTestServiceDisp\n";
-
static const CHAR shortcut_dat[] = "Shortcut\tDirectory_\tName\tComponent_\tTarget\tArguments\tDescription\tHotkey\tIcon_\tIconIndex\tShowCmd\tWkDir\n"
"s72\ts72\tl128\ts72\ts72\tS255\tL255\tI2\tS72\tI2\tI2\tS72\n"
"Shortcut\tShortcut\n"
"LaunchConditions\t\t100\n"
"TestAllUsersProp\tALLUSERS AND NOT REMOVE\t50\n";
-static const CHAR aup2_install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
- "s72\tS255\tI2\n"
- "InstallExecuteSequence\tAction\n"
- "CostFinalize\t\t1000\n"
- "ValidateProductID\t\t700\n"
- "CostInitialize\t\t800\n"
- "FileCost\t\t900\n"
- "RemoveFiles\t\t3500\n"
- "InstallFiles\t\t4000\n"
- "RegisterUser\t\t6000\n"
- "RegisterProduct\t\t6100\n"
- "PublishFeatures\t\t6300\n"
- "PublishProduct\t\t6400\n"
- "InstallFinalize\t\t6600\n"
- "InstallInitialize\t\t1500\n"
- "ProcessComponents\t\t1600\n"
- "UnpublishFeatures\t\t1800\n"
- "InstallValidate\t\t1400\n"
- "LaunchConditions\t\t100\n"
- "TestAllUsersProp\tALLUSERS=2 AND NOT REMOVE\t50\n";
-
-static const CHAR aup3_install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
- "s72\tS255\tI2\n"
- "InstallExecuteSequence\tAction\n"
- "CostFinalize\t\t1000\n"
- "ValidateProductID\t\t700\n"
- "CostInitialize\t\t800\n"
- "FileCost\t\t900\n"
- "RemoveFiles\t\t3500\n"
- "InstallFiles\t\t4000\n"
- "RegisterUser\t\t6000\n"
- "RegisterProduct\t\t6100\n"
- "PublishFeatures\t\t6300\n"
- "PublishProduct\t\t6400\n"
- "InstallFinalize\t\t6600\n"
- "InstallInitialize\t\t1500\n"
- "ProcessComponents\t\t1600\n"
- "UnpublishFeatures\t\t1800\n"
- "InstallValidate\t\t1400\n"
- "LaunchConditions\t\t100\n"
- "TestAllUsersProp\tALLUSERS=1 AND NOT REMOVE\t50\n";
-
static const CHAR aup_custom_action_dat[] = "Action\tType\tSource\tTarget\tISComments\n"
"s72\ti2\tS64\tS0\tS255\n"
"CustomAction\tAction\n"
ADD_TABLE(property)
};
-static const msi_table aup2_tables[] =
-{
- ADD_TABLE(component),
- ADD_TABLE(directory),
- ADD_TABLE(feature),
- ADD_TABLE(feature_comp),
- ADD_TABLE(file),
- ADD_TABLE(aup2_install_exec_seq),
- ADD_TABLE(aup_custom_action),
- ADD_TABLE(media),
- ADD_TABLE(aup_property)
-};
-
-static const msi_table aup3_tables[] =
-{
- ADD_TABLE(component),
- ADD_TABLE(directory),
- ADD_TABLE(feature),
- ADD_TABLE(feature_comp),
- ADD_TABLE(file),
- ADD_TABLE(aup2_install_exec_seq),
- ADD_TABLE(aup_custom_action),
- ADD_TABLE(media),
- ADD_TABLE(aup2_property)
-};
-
-static const msi_table aup4_tables[] =
-{
- ADD_TABLE(component),
- ADD_TABLE(directory),
- ADD_TABLE(feature),
- ADD_TABLE(feature_comp),
- ADD_TABLE(file),
- ADD_TABLE(aup3_install_exec_seq),
- ADD_TABLE(aup_custom_action),
- ADD_TABLE(media),
- ADD_TABLE(aup2_property)
-};
-
static const msi_table fiu_tables[] =
{
ADD_TABLE(rof_component),
}
static int CDECL file_placed(PCCAB pccab, char *pszFile, LONG cbFile,
- BOOL fContinuation, void *pv)
+ BOOL fContinuation, void *pv)
{
return 0;
}
}
static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime,
- USHORT *pattribs, int *err, void *pv)
+ USHORT *pattribs, int *err, void *pv)
{
BY_HANDLE_FILE_INFORMATION finfo;
FILETIME filetime;
/* build summary info */
r = MsiGetSummaryInformation(0, mstfile, 3, &suminfo);
- ok(r == ERROR_SUCCESS , "Failed to open summaryinfo\n");
+ ok(r == ERROR_SUCCESS , "Failed to open summaryinfo\n");
r = MsiSummaryInfoSetProperty(suminfo, PID_TITLE, VT_LPSTR, 0, NULL, "MSITEST");
- ok(r == ERROR_SUCCESS, "Failed to set summary info\n");
+ ok(r == ERROR_SUCCESS, "Failed to set summary info\n");
r = MsiSummaryInfoSetProperty(suminfo, PID_REVNUMBER, VT_LPSTR, 0, NULL,
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}1.1.1;"
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}1.1.1;"
"{4C0EAA15-0264-4E5A-8758-609EF142B92D}");
- ok(r == ERROR_SUCCESS , "Failed to set summary info\n");
+ ok(r == ERROR_SUCCESS , "Failed to set summary info\n");
r = MsiSummaryInfoSetProperty(suminfo, PID_PAGECOUNT, VT_I4, 100, NULL, NULL);
- ok(r == ERROR_SUCCESS, "Failed to set summary info\n");
+ ok(r == ERROR_SUCCESS, "Failed to set summary info\n");
r = MsiSummaryInfoPersist(suminfo);
- ok(r == ERROR_SUCCESS , "Failed to make summary info persist\n");
+ ok(r == ERROR_SUCCESS , "Failed to make summary info persist\n");
r = MsiCloseHandle(suminfo);
ok(r == ERROR_SUCCESS , "Failed to close suminfo\n");
ok(!pf_exists("msitest\\hydrogen"), "File not deleted\n");
ok(!pf_exists("msitest\\helium"), "File not deleted\n");
ok(delete_pf("msitest\\lithium", TRUE), "File deleted\n");
- ok(delete_pf("msitest", FALSE), "File deleted\n");
+ ok(delete_pf("msitest", FALSE), "File deleted\n");
create_pf("msitest", FALSE);
create_pf("msitest\\hydrogen", TRUE);
ok(!pf_exists("msitest\\hydrogen"), "File not deleted\n");
ok(delete_pf("msitest\\helium", TRUE), "File deleted\n");
ok(delete_pf("msitest\\lithium", TRUE), "File deleted\n");
- ok(delete_pf("msitest", FALSE), "File deleted\n");
+ ok(delete_pf("msitest", FALSE), "File deleted\n");
create_pf("msitest", FALSE);
create_pf("msitest\\furlong", TRUE);
ok(pf_exists("msitest\\becquerel"), "File not installed\n");
ok(pf_exists("msitest\\dioptre"), "File not installed\n");
ok(pf_exists("msitest\\attoparsec"), "File not installed\n");
- ok(!pf_exists("msitest\\storeys"), "File not deleted\n");
- ok(!pf_exists("msitest\\block"), "File not deleted\n");
- ok(!pf_exists("msitest\\siriometer"), "File not deleted\n");
+ ok(!pf_exists("msitest\\storeys"), "File not deleted\n");
+ ok(!pf_exists("msitest\\block"), "File not deleted\n");
+ ok(!pf_exists("msitest\\siriometer"), "File not deleted\n");
ok(pf_exists("msitest\\cabout"), "Directory removed\n");
ok(pf_exists("msitest"), "File not installed\n");
ok(delete_pf("msitest\\furlong", TRUE), "File deleted\n");
ok(delete_pf("msitest\\firkin", TRUE), "File deleted\n");
ok(delete_pf("msitest\\fortnight", TRUE), "File deleted\n");
- ok(!delete_pf("msitest\\becquerel", TRUE), "File not deleted\n");
- ok(!delete_pf("msitest\\dioptre", TRUE), "File not deleted\n");
+ ok(!delete_pf("msitest\\becquerel", TRUE), "File not deleted\n");
+ ok(!delete_pf("msitest\\dioptre", TRUE), "File not deleted\n");
ok(delete_pf("msitest\\attoparsec", TRUE), "File deleted\n");
- ok(!delete_pf("msitest\\storeys", TRUE), "File not deleted\n");
- ok(!delete_pf("msitest\\block", TRUE), "File not deleted\n");
+ ok(!delete_pf("msitest\\storeys", TRUE), "File not deleted\n");
+ ok(!delete_pf("msitest\\block", TRUE), "File not deleted\n");
ok(delete_pf("msitest\\siriometer", TRUE), "File deleted\n");
ok(pf_exists("msitest\\cabout"), "Directory deleted\n");
ok(pf_exists("msitest"), "Directory deleted\n");
"Expected ERROR_SUCCESS, got %u\n", r);
if (r == ERROR_SUCCESS)
{
- ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n");
+ ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n");
ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
}
ok(delete_pf("msitest\\caesar", TRUE), "File not installed\n");
RemoveDirectoryA("msitest");
r = MsiInstallProductA(msifile, NULL);
- ok(r == ERROR_INSTALL_FAILURE,
- "Expected ERROR_INSTALL_FAILURE, got %u\n", r);
- ok(!delete_pf("msitest\\augustus", TRUE), "File installed\n");
+ ok(r == ERROR_INSTALL_FAILURE,
+ "Expected ERROR_INSTALL_FAILURE, got %u\n", r);
+ ok(!delete_pf("msitest\\augustus", TRUE), "File installed\n");
todo_wine
{
ok(!delete_pf("msitest", FALSE), "File installed\n");
MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
- /* ALLUSERS property unset */
- r = MsiInstallProductA(msifile, "FULL=1");
- ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
-
- ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout\\new", FALSE), "File not installed\n");
- ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout", FALSE), "File not installed\n");
- ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\changed", FALSE), "File not installed\n");
- ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\first", FALSE), "File not installed\n");
- ok(delete_pf("msitest\\filename", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\one.txt", TRUE), "File installed\n");
- ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n");
- ok(delete_pf("msitest", FALSE), "File not installed\n");
-
- r = MsiInstallProductA(msifile, "REMOVE=ALL");
- ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
-
- delete_test_files();
-
- create_test_files();
- create_database(msifile, aup2_tables, sizeof(aup2_tables) / sizeof(msi_table));
-
- MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
-
- /* ALLUSERS property set to 1 */
r = MsiInstallProductA(msifile, "FULL=1");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
delete_test_files();
-
- create_test_files();
- create_database(msifile, aup3_tables, sizeof(aup3_tables) / sizeof(msi_table));
-
- MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
-
- /* ALLUSERS property set to 2 */
- r = MsiInstallProductA(msifile, "FULL=1");
- ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
-
- ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout\\new", FALSE), "File not installed\n");
- ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout", FALSE), "File not installed\n");
- ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\changed", FALSE), "File not installed\n");
- ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\first", FALSE), "File not installed\n");
- ok(delete_pf("msitest\\filename", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\one.txt", TRUE), "File installed\n");
- ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n");
- ok(delete_pf("msitest", FALSE), "File not installed\n");
-
- r = MsiInstallProductA(msifile, "REMOVE=ALL");
- ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
-
- delete_test_files();
-
- create_test_files();
- create_database(msifile, aup4_tables, sizeof(aup4_tables) / sizeof(msi_table));
-
- MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
-
- /* ALLUSERS property set to 2, conditioned on ALLUSERS = 1 */
- r = MsiInstallProductA(msifile, "FULL=1");
- ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r);
}
static char session_manager[] = "System\\CurrentControlSet\\Control\\Session Manager";
static UINT (WINAPI *pMsiQueryComponentStateA)
(LPCSTR, LPCSTR, MSIINSTALLCONTEXT, LPCSTR, INSTALLSTATE*);
static INSTALLSTATE (WINAPI *pMsiUseFeatureExA)
- (LPCSTR, LPCSTR ,DWORD, DWORD);
+ (LPCSTR, LPCSTR ,DWORD, DWORD );
static UINT (WINAPI *pMsiGetPatchInfoExA)
(LPCSTR, LPCSTR, LPCSTR, MSIINSTALLCONTEXT, LPCSTR, LPSTR, DWORD *);
r = MsiGetFileVersionA(path, version, &versz, lang, &langsz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(versz == verchecksz, "Expected %d, got %d\n", verchecksz, versz);
- ok(strstr(lang, langcheck) != NULL, "Expected %s in %s\n", langcheck, lang);
+ ok(!lstrcmpA(lang, langcheck), "Expected %s, got %s\n", langcheck, lang);
+ ok(langsz == langchecksz, "Expected %d, got %d\n", langchecksz, langsz);
ok(!lstrcmpA(version, vercheck),
"Expected %s, got %s\n", vercheck, version);
lstrcpyA(lang, "lang");
r = MsiGetFileVersionA(path, NULL, NULL, lang, &langsz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(strstr(lang, langcheck) != NULL, "Expected %s in %s\n", langcheck, lang);
+ ok(!lstrcmpA(lang, langcheck), "Expected %s, got %s\n", langcheck, lang);
+ ok(langsz == langchecksz, "Expected %d, got %d\n", langchecksz, langsz);
/* check neither version nor language */
r = MsiGetFileVersionA(path, NULL, NULL, NULL, NULL);
langsz = MAX_PATH;
r = MsiGetFileVersionA(path, NULL, NULL, NULL, &langsz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(langsz >= langchecksz, "Expected %d >= %d\n", langsz, langchecksz);
+ ok(langsz == langchecksz, "Expected %d, got %d\n", langchecksz, langsz);
/* pcchVersionBuf not big enough */
versz = 5;
ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r);
ok(!strncmp(lang, langcheck, 2),
"Expected first character of %s, got %s\n", langcheck, lang);
- ok(langsz >= langchecksz, "Expected %d >= %d\n", langsz, langchecksz);
+ ok(langsz == langchecksz, "Expected %d, got %d\n", langchecksz, langsz);
HeapFree(GetProcessHeap(), 0, vercheck);
HeapFree(GetProcessHeap(), 0, langcheck);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(sz == 4, "Expected 4, got %d\n", sz);
- /* lpValueBuf is non-NULL, pcchValueBuf is too small */
+ /* lpValueBuf is NULL, pcchValueBuf is too small */
sz = 2;
lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz);
ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r);
ok(sz == 4, "Expected 4, got %d\n", sz);
- /* lpValueBuf is non-NULL, pcchValueBuf is exactly 4 */
+ /* lpValueBuf is NULL, pcchValueBuf is exactly 4 */
sz = 4;
lstrcpyA(buf, "apple");
r = MsiGetProductInfoA(prodcode, INSTALLPROPERTY_HELPLINK, buf, &sz);
#include "wine/test.h"
-static const char msifile[] = "winetest-package.msi";
+static const char msifile[] = "winetest.msi";
char CURR_DIR[MAX_PATH];
static UINT (WINAPI *pMsiApplyMultiplePatchesA)(LPCSTR, LPCSTR, LPCSTR);
r = run_query( hdb, query ); \
HeapFree(GetProcessHeap(), 0, query); \
return r; \
- }
+}
make_add_entry(component,
"INSERT INTO `Component` "
make_add_entry(signature,
"INSERT INTO `Signature` "
- "(`Signature`, `FileName`, `MinVersion`, `MaxVersion`,"
- " `MinSize`, `MaxSize`, `MinDate`, `MaxDate`, `Languages`) "
+ "(`Signature`, `FileName`, `MinVersion`, `MaxVersion`,"
+ " `MinSize`, `MaxSize`, `MinDate`, `MaxDate`, `Languages`) "
"VALUES( %s )")
make_add_entry(launchcondition,
MSIHANDLE hdb;
INSTALLSTATE state, action;
- static const CHAR msifile2[] = "winetest2-package.msi";
- static const CHAR msifile3[] = "winetest3-package.msi";
- static const CHAR msifile4[] = "winetest4-package.msi";
+ static const CHAR msifile2[] = "winetest2.msi";
+ static const CHAR msifile3[] = "winetest3.msi";
+ static const CHAR msifile4[] = "winetest4.msi";
hdb = create_package_db();
ok ( hdb, "failed to create package database\n" );
r = MsiGetFeatureState(hpkg, "six", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
- ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
+ ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetFeatureState(hpkg, "seven", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
- ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
+ ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "lambda", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
- ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
+ ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "mu", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
- ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
+ ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "nu", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
- ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
+ ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "xi", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
- ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
+ ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "omicron", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
- ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
+ ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "pi", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
- ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
+ ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "rho", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
- ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
+ ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "sigma", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
- ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
+ ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetFeatureState(hpkg, "one", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
- ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state);
+ ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state);
ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetFeatureState(hpkg, "two", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
- ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state);
+ ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state);
ok( action == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetFeatureState(hpkg, "three", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
- ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
+ ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetFeatureState(hpkg, "four", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
- ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
+ ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action);
state = 0xdeadbee;
r = MsiGetFeatureState(hpkg, "six", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
- ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
+ ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetFeatureState(hpkg, "seven", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
- ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
+ ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "alpha", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
- ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
+ ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "beta", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
- ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state);
+ ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state);
ok( action == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "gamma", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
- ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
+ ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "theta", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
- ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
+ ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "delta", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
- ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
+ ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "epsilon", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
- ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state);
- ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
+ ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state);
+ ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "zeta", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
- ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state);
- ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
+ ok( state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state);
+ ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "iota", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
- ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
+ ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "eta", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
- ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
+ ok( state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state);
ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action);
state = 0xdeadbee;
r = MsiGetComponentState(hpkg, "lambda", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
- ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
+ ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "mu", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
- ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
+ ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "nu", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
- ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
+ ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "xi", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
- ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
+ ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "omicron", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
- ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
+ ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "pi", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
- ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
+ ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "rho", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
- ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
+ ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "sigma", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
- ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
+ ok( action == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", action);
state = 0xdeadbee;
action = 0xdeadbee;
ok( r == ERROR_SUCCESS, "get property failed: %d\n", r);
todo_wine
{
- ok( lstrlenA(prop) != 0, "Expected non-zero length\n");
+ ok( lstrlenA(prop) != 0, "Expected non-zero length\n");
}
MsiCloseHandle( hpkg );
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
lstrcpyA(val, path);
- lstrcatA(val, "\\");
- lstrcatA(val, msifile);
+ lstrcatA(val, "\\winetest.msi");
res = RegSetValueExA(props, "LocalPackage", 0, REG_SZ,
(const BYTE *)val, lstrlenA(val) + 1);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
ret = notify_system_change(END_NESTED_SYSTEM_CHANGE, &status);
if (ret)
remove_restore_point(status.llSequenceNumber);
- }
+}
}
#include "wine/test.h"
-static const char *msifile = "winetest-record.msi";
+static const char *msifile = "winetest.msi";
static BOOL create_temp_file(char *name)
{
r = MsiRecordIsNull(rec, 0);
ok(r == FALSE, "Expected FALSE, got %d\n", r);
- r = MsiCloseHandle(hview);
- ok(r == ERROR_SUCCESS, "MsiCloseHandle failed\n");
- MsiCloseHandle(rec);
MsiCloseHandle(hdb);
DeleteFileA(msifile);
}
"Expected ERROR_SUCCESS or ERROR_INVALID_PARAMETER, got %d\n", r);
if (r == ERROR_SUCCESS)
{
- ok(id == 2, "Expected 2, got %d\n", id);
- ok(labelsz == 3, "Expected 3, got %d\n", labelsz);
- ok(promptsz == 3, "Expected 3, got %d\n", promptsz);
+ ok(id == 2, "Expected 2, got %d\n", id);
+ ok(labelsz == 3, "Expected 3, got %d\n", labelsz);
+ ok(promptsz == 3, "Expected 3, got %d\n", promptsz);
}
/* now fill in the values */
}
else if (r == ERROR_INVALID_PARAMETER)
{
- ok(id == 0xbeef, "Expected 0xbeef, got %d\n", id);
- ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label);
- ok(labelsz == MAX_PATH, "Expected MAX_PATH, got %d\n", labelsz);
- ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt);
- ok(promptsz == MAX_PATH, "Expected MAX_PATH, got %d\n", promptsz);
+ ok(id == 0xbeef, "Expected 0xbeef, got %d\n", id);
+ ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label);
+ ok(labelsz == MAX_PATH, "Expected MAX_PATH, got %d\n", labelsz);
+ ok(!lstrcmpA(prompt, "bbb"), "Expected \"bbb\", got \"%s\"\n", prompt);
+ ok(promptsz == MAX_PATH, "Expected MAX_PATH, got %d\n", promptsz);
}
res = RegSetValueExA(media, "4", 0, REG_SZ, (LPBYTE)"three;four", 11);
"Expected ERROR_SUCCESS or ERROR_INVALID_PARAMETER, got %d\n", r);
if (r == ERROR_SUCCESS)
{
- ok(id == 1, "Expected 1, got %d\n", id);
- ok(labelsz == 5, "Expected 5, got %d\n", labelsz);
- ok(!lstrcmpA(prompt, "prompt"), "Expected \"prompt\", got \"%s\"\n", prompt);
- ok(promptsz == 6, "Expected 6, got %d\n", promptsz);
+ ok(id == 1, "Expected 1, got %d\n", id);
+ ok(labelsz == 5, "Expected 5, got %d\n", labelsz);
+ ok(!lstrcmpA(prompt, "prompt"), "Expected \"prompt\", got \"%s\"\n", prompt);
+ ok(promptsz == 6, "Expected 6, got %d\n", promptsz);
}
/* szVolumeLabel and pcchVolumeLabel are NULL */
"Expected ERROR_SUCCESS or ERROR_INVALID_PARAMETER, got %d\n", r);
if (r == ERROR_SUCCESS)
{
- ok(id == 1, "Expected 1, got %d\n", id);
- ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label);
- ok(!lstrcmpA(prompt, "prompt"), "Expected \"prompt\", got \"%s\"\n", prompt);
- ok(promptsz == 6, "Expected 6, got %d\n", promptsz);
+ ok(id == 1, "Expected 1, got %d\n", id);
+ ok(!lstrcmpA(label, "aaa"), "Expected \"aaa\", got \"%s\"\n", label);
+ ok(!lstrcmpA(prompt, "prompt"), "Expected \"prompt\", got \"%s\"\n", prompt);
+ ok(promptsz == 6, "Expected 6, got %d\n", promptsz);
}
/* szDiskPrompt is NULL */
ok(r == ERROR_SUCCESS || r == ERROR_INVALID_PARAMETER, "Expected ERROR_SUCCESS, got %d\n", r);
if (r == ERROR_SUCCESS)
{
- ok(id == 1, "Expected 1, got %d\n", id);
- ok(!lstrcmpA(label, "label"), "Expected \"label\", got \"%s\"\n", label);
- ok(labelsz == 5, "Expected 5, got %d\n", labelsz);
- ok(promptsz == 6, "Expected 6, got %d\n", promptsz);
+ ok(id == 1, "Expected 1, got %d\n", id);
+ ok(!lstrcmpA(label, "label"), "Expected \"label\", got \"%s\"\n", label);
+ ok(labelsz == 5, "Expected 5, got %d\n", labelsz);
+ ok(promptsz == 6, "Expected 6, got %d\n", promptsz);
}
/* szDiskPrompt and pcchDiskPrompt are NULL */
prompt, &promptsz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(id == 1, "Expected 1, got %d\n", id);
- ok(!lstrcmpA(label, "#42"), "Expected \"#42\", got \"%s\"\n", label);
- ok(labelsz == 3, "Expected 3, got %d\n", labelsz);
- ok(!lstrcmpA(prompt, "#42"), "Expected \"#42\", got \"%s\"\n", prompt);
- ok(promptsz == 3, "Expected 3, got %d\n", promptsz);
+ ok(!lstrcmpA(label, "#42"), "Expected \"#42\", got \"%s\"\n", label);
+ ok(labelsz == 3, "Expected 3, got %d\n", labelsz);
+ ok(!lstrcmpA(prompt, "#42"), "Expected \"#42\", got \"%s\"\n", prompt);
+ ok(promptsz == 3, "Expected 3, got %d\n", promptsz);
RegDeleteValueA(media, "1");
RegDeleteValueA(media, "2");
pGetUserNameExA(NameSamCompatible, username, &size);
else
{
- GetComputerNameA(username, &size);
- lstrcatA(username, "\\");
- ptr = username + lstrlenA(username);
+ GetComputerNameA(username, &size);
+ lstrcatA(username, "\\");
+ ptr = username + lstrlenA(username);
size = MAX_PATH - (ptr - username);
- GetUserNameA(ptr, &size);
+ GetUserNameA(ptr, &size);
}
trace("username: %s\n", username);
#define PID_MSISOURCE PID_WORDCOUNT
#define PID_MSIRESTRICT PID_CHARCOUNT
-const char *msifile = "winetest-suminfo.msi";
-static const WCHAR msifileW[] = {
- 'w','i','n','e','t','e','s','t','-','s','u','m','i','n','f','o','.','m','s','i',0 };
-
static void test_suminfo(void)
{
+ const char *msifile = "winetest.msi";
MSIHANDLE hdb = 0, hsuminfo;
UINT r, count, type;
DWORD sz;
static const CLSID FMTID_SummaryInformation =
{ 0xf29f85e0, 0x4ff9, 0x1068, {0xab, 0x91, 0x08, 0x00, 0x2b, 0x27, 0xb3, 0xd9}};
DWORD mode = STGM_CREATE | STGM_READWRITE | STGM_DIRECT | STGM_SHARE_EXCLUSIVE;
+ static const WCHAR msifile[] = {
+ 'w','i','n','e','t','e','s','t','.','m','s','i',0 };
IPropertySetStorage *pss = NULL;
IPropertyStorage *ps = NULL;
IStorage *stg = NULL;
PROPVARIANT propvar[10];
USHORT data[2] = { 0, 0 };
- r = StgCreateDocfile( msifileW, mode, 0, &stg );
+ r = StgCreateDocfile( msifile, mode, 0, &stg );
ok( r == S_OK, "failed to create database\n");
r = IStorage_SetClass( stg, &CLSID_MsiDatabase );
static void test_summary_binary(void)
{
+ const char *msifile = "winetest.msi";
MSIHANDLE hdb = 0, hsuminfo = 0;
UINT r, type, count;
INT ival;
static ITask *test_task;
static const WCHAR empty[] = {0};
+/* allocate some tmp string space */
+/* FIXME: this is not 100% thread-safe */
+static char *get_tmp_space(int size)
+{
+ static char *list[16];
+ static long pos;
+ char *ret;
+ int idx;
+
+ idx = ++pos % (sizeof(list)/sizeof(list[0]));
+ if ((ret = realloc(list[idx], size)))
+ list[idx] = ret;
+ return ret;
+}
+
+static const char *dbgstr_w(LPCWSTR str)
+{
+ char *buf;
+ int len;
+ if(!str)
+ return "(null)";
+ len = lstrlenW(str) + 1;
+ buf = get_tmp_space(len);
+ WideCharToMultiByte(CP_ACP, 0, str, -1, buf, len, NULL, NULL);
+ return buf;
+}
+
static BOOL setup_task(void)
{
HRESULT hres;
if (hres == S_OK)
{
ok(!lstrcmpiW(stored_name, empty),
- "Got %s, expected empty string\n", wine_dbgstr_w(stored_name));
+ "Got %s, expected empty string\n", dbgstr_w(stored_name));
CoTaskMemFree(stored_name);
}
* the application name that is actually stored */
hres = ITask_SetApplicationName(test_task, non_application_name);
ok(hres == S_OK, "Failed setting name %s: %08x\n",
- wine_dbgstr_w(non_application_name), hres);
+ dbgstr_w(non_application_name), hres);
hres = ITask_GetApplicationName(test_task, &stored_name);
ok(hres == S_OK, "GetApplicationName failed: %08x\n", hres);
if (hres == S_OK)
{
full_name = path_resolve_name(non_application_name);
ok(!lstrcmpiW(stored_name, full_name), "Got %s, expected %s\n",
- wine_dbgstr_w(stored_name), wine_dbgstr_w(full_name));
+ dbgstr_w(stored_name), dbgstr_w(full_name));
CoTaskMemFree(stored_name);
}
* get the stored name */
hres = ITask_SetApplicationName(test_task, notepad_exe);
ok(hres == S_OK, "Failed setting name %s: %08x\n",
- wine_dbgstr_w(notepad_exe), hres);
+ dbgstr_w(notepad_exe), hres);
hres = ITask_GetApplicationName(test_task, &stored_name);
ok(hres == S_OK, "GetApplicationName failed: %08x\n", hres);
if (hres == S_OK)
{
full_name = path_resolve_name(notepad_exe);
ok(!lstrcmpiW(stored_name, full_name), "Got %s, expected %s\n",
- wine_dbgstr_w(stored_name), wine_dbgstr_w(full_name));
+ dbgstr_w(stored_name), dbgstr_w(full_name));
CoTaskMemFree(stored_name);
}
/* Set a valid application name without program type extension and
* then get the stored name */
hres = ITask_SetApplicationName(test_task, notepad);
- ok(hres == S_OK, "Failed setting name %s: %08x\n", wine_dbgstr_w(notepad), hres);
+ ok(hres == S_OK, "Failed setting name %s: %08x\n", dbgstr_w(notepad), hres);
hres = ITask_GetApplicationName(test_task, &stored_name);
ok(hres == S_OK, "GetApplicationName failed: %08x\n", hres);
if (hres == S_OK)
{
full_name = path_resolve_name(notepad);
ok(!lstrcmpiW(stored_name, full_name), "Got %s, expected %s\n",
- wine_dbgstr_w(stored_name), wine_dbgstr_w(full_name));
+ dbgstr_w(stored_name), dbgstr_w(full_name));
}
CoTaskMemFree(stored_name);
}
* actually stored */
hres = ITask_SetApplicationName(test_task, non_application_name);
ok(hres == S_OK, "Failed setting name %s: %08x\n",
- wine_dbgstr_w(non_application_name), hres);
+ dbgstr_w(non_application_name), hres);
hres = ITask_GetApplicationName(test_task, &stored_name);
ok(hres == S_OK, "GetApplicationName failed: %08x\n", hres);
if (hres == S_OK)
{
full_name = path_resolve_name(non_application_name);
ok(!lstrcmpiW(stored_name, full_name), "Got %s, expected %s\n",
- wine_dbgstr_w(stored_name), wine_dbgstr_w(full_name));
+ dbgstr_w(stored_name), dbgstr_w(full_name));
CoTaskMemFree(stored_name);
}
/* Clear application name */
hres = ITask_SetApplicationName(test_task, empty);
- ok(hres == S_OK, "Failed setting name %s: %08x\n", wine_dbgstr_w(empty), hres);
+ ok(hres == S_OK, "Failed setting name %s: %08x\n", dbgstr_w(empty), hres);
hres = ITask_GetApplicationName(test_task, &stored_name);
ok(hres == S_OK, "GetApplicationName failed: %08x\n", hres);
if (hres == S_OK)
{
ok(!lstrcmpiW(stored_name, empty),
- "Got %s, expected empty string\n", wine_dbgstr_w(stored_name));
+ "Got %s, expected empty string\n", dbgstr_w(stored_name));
CoTaskMemFree(stored_name);
}
if (hres == S_OK)
{
ok(!lstrcmpW(parameters, empty),
- "Got %s, expected empty string\n", wine_dbgstr_w(parameters));
+ "Got %s, expected empty string\n", dbgstr_w(parameters));
CoTaskMemFree(parameters);
}
/* Set parameters to a simple string */
hres = ITask_SetParameters(test_task, parameters_a);
ok(hres == S_OK, "Failed setting parameters %s: %08x\n",
- wine_dbgstr_w(parameters_a), hres);
+ dbgstr_w(parameters_a), hres);
hres = ITask_GetParameters(test_task, ¶meters);
ok(hres == S_OK, "GetParameters failed: %08x\n", hres);
if (hres == S_OK)
{
ok(!lstrcmpW(parameters, parameters_a), "Got %s, expected %s\n",
- wine_dbgstr_w(parameters), wine_dbgstr_w(parameters_a));
+ dbgstr_w(parameters), dbgstr_w(parameters_a));
CoTaskMemFree(parameters);
}
/* Update parameters to a different simple string */
hres = ITask_SetParameters(test_task, parameters_b);
ok(hres == S_OK, "Failed setting parameters %s: %08x\n",
- wine_dbgstr_w(parameters_b), hres);
+ dbgstr_w(parameters_b), hres);
hres = ITask_GetParameters(test_task, ¶meters);
ok(hres == S_OK, "GetParameters failed: %08x\n", hres);
if (hres == S_OK)
{
ok(!lstrcmpW(parameters, parameters_b), "Got %s, expected %s\n",
- wine_dbgstr_w(parameters), wine_dbgstr_w(parameters_b));
+ dbgstr_w(parameters), dbgstr_w(parameters_b));
CoTaskMemFree(parameters);
}
/* Clear parameters */
hres = ITask_SetParameters(test_task, empty);
ok(hres == S_OK, "Failed setting parameters %s: %08x\n",
- wine_dbgstr_w(empty), hres);
+ dbgstr_w(empty), hres);
hres = ITask_GetParameters(test_task, ¶meters);
ok(hres == S_OK, "GetParameters failed: %08x\n", hres);
if (hres == S_OK)
{
ok(!lstrcmpW(parameters, empty),
- "Got %s, expected empty string\n", wine_dbgstr_w(parameters));
+ "Got %s, expected empty string\n", dbgstr_w(parameters));
CoTaskMemFree(parameters);
}
if (hres == S_OK)
{
ok(!lstrcmpW(comment, empty),
- "Got %s, expected empty string\n", wine_dbgstr_w(comment));
+ "Got %s, expected empty string\n", dbgstr_w(comment));
CoTaskMemFree(comment);
}
/* Set comment to a simple string */
hres = ITask_SetComment(test_task, comment_a);
ok(hres == S_OK, "Failed setting comment %s: %08x\n",
- wine_dbgstr_w(comment_a), hres);
+ dbgstr_w(comment_a), hres);
hres = ITask_GetComment(test_task, &comment);
ok(hres == S_OK, "GetComment failed: %08x\n", hres);
if (hres == S_OK)
{
ok(!lstrcmpW(comment, comment_a), "Got %s, expected %s\n",
- wine_dbgstr_w(comment), wine_dbgstr_w(comment_a));
+ dbgstr_w(comment), dbgstr_w(comment_a));
CoTaskMemFree(comment);
}
/* Update comment to a different simple string */
hres = ITask_SetComment(test_task, comment_b);
ok(hres == S_OK, "Failed setting comment %s: %08x\n",
- wine_dbgstr_w(comment_b), hres);
+ dbgstr_w(comment_b), hres);
hres = ITask_GetComment(test_task, &comment);
ok(hres == S_OK, "GetComment failed: %08x\n", hres);
if (hres == S_OK)
{
ok(!lstrcmpW(comment, comment_b), "Got %s, expected %s\n",
- wine_dbgstr_w(comment), wine_dbgstr_w(comment_b));
+ dbgstr_w(comment), dbgstr_w(comment_b));
CoTaskMemFree(comment);
}
/* Clear comment */
hres = ITask_SetComment(test_task, empty);
ok(hres == S_OK, "Failed setting comment %s: %08x\n",
- wine_dbgstr_w(empty), hres);
+ dbgstr_w(empty), hres);
hres = ITask_GetComment(test_task, &comment);
ok(hres == S_OK, "GetComment failed: %08x\n", hres);
if (hres == S_OK)
{
ok(!lstrcmpW(comment, empty),
- "Got %s, expected empty string\n", wine_dbgstr_w(comment));
+ "Got %s, expected empty string\n", dbgstr_w(comment));
CoTaskMemFree(comment);
}
if (hres == S_OK)
{
ok(!lstrcmpW(account_name, dummy_account_name),
- "Got %s, expected %s\n", wine_dbgstr_w(account_name),
- wine_dbgstr_w(dummy_account_name));
+ "Got %s, expected %s\n", dbgstr_w(account_name),
+ dbgstr_w(dummy_account_name));
CoTaskMemFree(account_name);
}
if (hres == S_OK)
{
ok(!lstrcmpW(account_name, dummy_account_name_b),
- "Got %s, expected %s\n", wine_dbgstr_w(account_name),
- wine_dbgstr_w(dummy_account_name_b));
+ "Got %s, expected %s\n", dbgstr_w(account_name),
+ dbgstr_w(dummy_account_name_b));
CoTaskMemFree(account_name);
}
if (hres == S_OK)
{
ok(!lstrcmpW(account_name, empty),
- "Got %s, expected empty string\n", wine_dbgstr_w(account_name));
+ "Got %s, expected empty string\n", dbgstr_w(account_name));
CoTaskMemFree(account_name);
}
/* 111 */ {"?f@T@@QAEHQCY1BE@BO@D@Z", "public: int __thiscall T::f(char (volatile * const)[20][30])"},
/* 112 */ {"?f@T@@QAEHQAY2BE@BO@CI@D@Z", "public: int __thiscall T::f(char (* const)[20][30][40])"},
/* 113 */ {"?f@T@@QAEHQAY1BE@BO@$$CBD@Z", "public: int __thiscall T::f(char const (* const)[20][30])"},
-/* 114 */ {"??0?$Foo@U?$vector_c@H$00$01$0?1$0A@$0A@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@$0HPPPPPPP@@mpl@boost@@@@QAE@XZ",
- "public: __thiscall Foo<struct boost::mpl::vector_c<int,1,2,-2,0,0,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647> >::Foo<struct boost::mpl::vector_c<int,1,2,-2,0,0,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647> >(void)"},
};
int i, num_test = (sizeof(test)/sizeof(test[0]));
bufferW[MAX_PATH - 1] = '\0';
WideCharToMultiByte(CP_ACP, 0, bufferW, -1, buffer, MAX_PATH, NULL, NULL);
ok(!strcmp(p->expected, buffer), "got '%s' for unicode case %d\n", buffer, i);
- }
+}
}
static void test_fullpath(void)
ok(ich == ret, "Second fgetc expected %x got %x\n", ich, ret);
fclose(tempfh);
unlink(tempf);
- free(tempf);
}
static void test_fputc( void )
fclose(tempfh);
unlink(tempf);
- free(tempf);
}
static void test_flsbuf( void )
fclose(tempfh);
unlink(tempf);
- free(tempf);
}
static void test_fgetwc( void )
free(mytextW);
fclose(tempfh);
unlink(tempf);
- free(tempf);
}
static void test_ctrlz( void )
ok(feof(tempfh), "did not get EOF\n");
fclose(tempfh);
unlink(tempf);
- free(tempf);
}
static void test_file_put_get( void )
free(mytextW);
fclose(tempfh);
unlink(tempf);
- free(tempf);
}
static void test_file_write_read( void )
ret = unlink(tempf);
ok( ret == 0 ,"Can't unlink '%s': %d\n", tempf, errno);
- free(tempf);
tempf=_tempnam(".","wne");
tempfd = _open(tempf,_O_CREAT|_O_TRUNC|_O_BINARY|_O_RDWR,0);
"Can't chmod '%s' to read-write: %d\n", tempf, errno);
ret = unlink(tempf);
ok( ret == 0 ,"Can't unlink '%s': %d\n", tempf, errno);
- free(tempf);
}
static void test_file_inherit_child(const char* fd_s)
ok( ret == -1 && errno == EBADF,
"Wrong write result in child process on %d (%s)\n", fd, strerror(errno));
}
-
+
static void create_io_inherit_block( STARTUPINFO *startup, unsigned int count, const HANDLE *handles )
{
static BYTE block[1024];
_close( fd );
_unlink( tempfile );
- free( tempfile );
}
static void test_fopen_fclose_fcloseall( void )
ok(fstat(fd, &buf) == 0, "fstat failed: errno=%d\n", errno);
ok((buf.st_mode & _S_IFMT) == _S_IFREG, "bad format = %06o\n", buf.st_mode);
ok((buf.st_mode & 0777) == 0666, "bad st_mode = %06o\n", buf.st_mode);
- ok(buf.st_dev == 0, "st_dev is %d, expected 0\n", buf.st_dev);
+ ok(buf.st_dev == 0, "st_dev is %d, expected 0\n", buf.st_dev);
ok(buf.st_dev == buf.st_rdev, "st_dev (%d) and st_rdev (%d) differ\n", buf.st_dev, buf.st_rdev);
ok(buf.st_nlink == 1, "st_nlink is %d, expected 1\n", buf.st_nlink);
ok(buf.st_size == 0, "st_size is %d, expected 0\n", buf.st_size);
if ((buf.st_mode & _S_IFMT) == _S_IFCHR)
{
ok(buf.st_mode == _S_IFCHR, "bad st_mode=%06o\n", buf.st_mode);
- ok(buf.st_dev == 10, "st_dev is %d, expected 10\n", buf.st_dev);
- ok(buf.st_rdev == 10, "st_rdev is %d, expected 10\n", buf.st_rdev);
- ok(buf.st_nlink == 1, "st_nlink is %d, expected 1\n", buf.st_nlink);
- }
- else
+ ok(buf.st_dev == 10, "st_dev is %d, expected 10\n", buf.st_dev);
+ ok(buf.st_rdev == 10, "st_rdev is %d, expected 10\n", buf.st_rdev);
+ ok(buf.st_nlink == 1, "st_nlink is %d, expected 1\n", buf.st_nlink);
+ }
+ else
skip("stdin is not a char device? st_mode=%06o\n", buf.st_mode);
close(10);
}
<file>heap.c</file>
<file>printf.c</file>
<file>scanf.c</file>
- <file>signal.c</file>
<file>string.c</file>
<file>testlist.c</file>
<file>time.c</file>
/* With Visual Studio >= 2005, swprintf() takes an extra parameter unless
* the following macro is defined.
*/
+#ifdef _MSC_VER
#define _CRT_NON_CONFORMING_SWPRINTFS
-
+#endif
+
#include <stdio.h>
#include "windef.h"
if (sizeof(void *) == 8)
{
- format = "%p";
- r = sprintf(buffer,format,(void *)57);
+ format = "%p";
+ r = sprintf(buffer,format,(void *)57);
ok(!strcmp(buffer,"0000000000000039"),"Pointer formatted incorrectly \"%s\"\n",buffer);
ok( r==16, "return count wrong\n");
{
format = "%p";
r = sprintf(buffer,format,(void *)57);
- ok(!strcmp(buffer,"00000039"),"Pointer formatted incorrectly \"%s\"\n",buffer);
- ok( r==8, "return count wrong\n");
+ ok(!strcmp(buffer,"00000039"),"Pointer formatted incorrectly \"%s\"\n",buffer);
+ ok( r==8, "return count wrong\n");
- format = "%#012p";
- r = sprintf(buffer,format,(void *)57);
- ok(!strcmp(buffer," 0X00000039"),"Pointer formatted incorrectly\n");
- ok( r==12, "return count wrong\n");
+ format = "%#012p";
+ r = sprintf(buffer,format,(void *)57);
+ ok(!strcmp(buffer," 0X00000039"),"Pointer formatted incorrectly\n");
+ ok( r==12, "return count wrong\n");
- format = "%Fp";
- r = sprintf(buffer,format,(void *)57);
- ok(!strcmp(buffer,"00000039"),"Pointer formatted incorrectly \"%s\"\n",buffer);
- ok( r==8, "return count wrong\n");
+ format = "%Fp";
+ r = sprintf(buffer,format,(void *)57);
+ ok(!strcmp(buffer,"00000039"),"Pointer formatted incorrectly \"%s\"\n",buffer);
+ ok( r==8, "return count wrong\n");
format = "%#-012p";
r = sprintf(buffer,format,(void *)57);
else
{
ok(x == 4, "should write to x: %d\n", x);
- ok(!strcmp(buffer,"asdf"), "failed\n");
+ ok(!strcmp(buffer,"asdf"), "failed\n");
ok( r==4, "return count wrong: %d\n", r);
}
}
else
{
- ok(!strcmp(buffer,"00000000"), "failed\n");
- ok( r==8, "return count wrong\n");
+ ok(!strcmp(buffer,"00000000"), "failed\n");
+ ok( r==8, "return count wrong\n");
}
format = "%s";
const wchar_t hs[] = {'%', 'h', 's', 0};
swprintf(buffer,TwentyThreePoint15e,pnumber);
- ok(wcsstr(buffer,e008) != 0,"Sprintf different\n");
+ ok(wcsstr(buffer,e008) != 0,"Sprintf different\n");
swprintf(buffer,I64d,((ULONGLONG)0xffffffff)*0xffffffff);
ok(wcslen(buffer) == 11,"Problem with long long\n");
swprintf(buffer,S,string);
+++ /dev/null
-/*
- * Unit test suite for signal function.
- *
- * Copyright 2009 Peter Rosin
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#include "wine/test.h"
-#include <winbase.h>
-#include <signal.h>
-
-static int test_value = 0;
-
-static void __cdecl sighandler(int signum)
-{
- ++test_value;
-}
-
-static void test_signal(void)
-{
- void (__cdecl *old)(int);
- int res;
-
- old = signal(SIGBREAK, sighandler);
- ok(old != SIG_ERR, "Failed to install signal handler for SIGBREAK\n");
- test_value = 0;
- res = raise(SIGBREAK);
- ok(res == 0, "Failed to raise SIGBREAK\n");
- ok(test_value == 1, "SIGBREAK handler not invoked\n");
-}
-
-START_TEST(signal)
-{
- test_signal();
-}
static int (__cdecl *pstrcat_s)(char *dst, size_t len, const char *src);
static int (__cdecl *p_mbsnbcpy_s)(unsigned char * dst, size_t size, const unsigned char * src, size_t count);
static int (__cdecl *p_wcscpy_s)(wchar_t *wcDest, size_t size, const wchar_t *wcSrc);
-static int (__cdecl *p_wcsupr_s)(wchar_t *str, size_t size);
static int *p__mb_cur_max;
static unsigned char *p_mbctype;
char expected1[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ@#";
char expected2[] = "ABCDEFGHIJKLMNOPQRSTUVWX$";
char expected3[] = "$";
-
+
char from[30];
char to[30];
-
+
int testsize;
-
- /* Test 1 - normal even case */
+
+ /* Test 1 - normal even case */
memset(to,'$', sizeof(to));
memset(from,'@', sizeof(from));
testsize = 26;
_swab( from, to, testsize );
ok(memcmp(to,expected1,testsize) == 0, "Testing even size %d returned '%*.*s'\n", testsize, testsize, testsize, to);
- /* Test 2 - uneven case */
+ /* Test 2 - uneven case */
memset(to,'$', sizeof(to));
memset(from,'@', sizeof(from));
testsize = 25;
_swab( from, to, testsize );
ok(memcmp(to,expected2,testsize) == 0, "Testing odd size %d returned '%*.*s'\n", testsize, testsize, testsize, to);
- /* Test 3 - from = to */
+ /* Test 3 - from = to */
memset(to,'$', sizeof(to));
memset(from,'@', sizeof(from));
testsize = 26;
_swab( to, to, testsize );
ok(memcmp(to,expected1,testsize) == 0, "Testing overlapped size %d returned '%*.*s'\n", testsize, testsize, testsize, to);
- /* Test 4 - 1 bytes */
+ /* Test 4 - 1 bytes */
memset(to,'$', sizeof(to));
memset(from,'@', sizeof(from));
testsize = 1;
ok(szDestShort[0] == 0, "szDestShort[0] not 0\n");
}
-static void test__wcsupr_s(void)
-{
- static const WCHAR mixedString[] = {'M', 'i', 'X', 'e', 'D', 'l', 'o', 'w',
- 'e', 'r', 'U', 'P', 'P', 'E', 'R', 0};
- static const WCHAR expectedString[] = {'M', 'I', 'X', 'E', 'D', 'L', 'O',
- 'W', 'E', 'R', 'U', 'P', 'P', 'E',
- 'R', 0};
- WCHAR testBuffer[2*sizeof(mixedString)/sizeof(WCHAR)];
- int ret;
-
- if (!p_wcsupr_s)
- {
- win_skip("_wcsupr_s not found\n");
- return;
- }
-
- /* Test NULL input string and invalid size. */
- errno = EBADF;
- ret = p_wcsupr_s(NULL, 0);
- ok(ret == EINVAL, "Expected _wcsupr_s to fail with EINVAL, got %d\n", ret);
- ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno);
-
- /* Test NULL input string and valid size. */
- errno = EBADF;
- ret = p_wcsupr_s(NULL, sizeof(testBuffer)/sizeof(WCHAR));
- ok(ret == EINVAL, "Expected _wcsupr_s to fail with EINVAL, got %d\n", ret);
- ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno);
-
- /* Test empty string with zero size. */
- errno = EBADF;
- testBuffer[0] = '\0';
- ret = p_wcsupr_s(testBuffer, 0);
- ok(ret == EINVAL, "Expected _wcsupr_s to fail with EINVAL, got %d\n", ret);
- ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno);
- ok(testBuffer[0] == '\0', "Expected the buffer to be unchanged\n");
-
- /* Test empty string with size of one. */
- testBuffer[0] = '\0';
- ret = p_wcsupr_s(testBuffer, 1);
- ok(ret == 0, "Expected _wcsupr_s to succeed, got %d\n", ret);
- ok(testBuffer[0] == '\0', "Expected the buffer to be unchanged\n");
-
- /* Test one-byte buffer with zero size. */
- errno = EBADF;
- testBuffer[0] = 'x';
- ret = p_wcsupr_s(testBuffer, 0);
- ok(ret == EINVAL, "Expected _wcsupr_s to fail with EINVAL, got %d\n", ret);
- ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno);
- ok(testBuffer[0] == '\0', "Expected the first buffer character to be null\n");
-
- /* Test one-byte buffer with size of one. */
- errno = EBADF;
- testBuffer[0] = 'x';
- ret = p_wcsupr_s(testBuffer, 1);
- ok(ret == EINVAL, "Expected _wcsupr_s to fail with EINVAL, got %d\n", ret);
- ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno);
- ok(testBuffer[0] == '\0', "Expected the first buffer character to be null\n");
-
- /* Test invalid size. */
- wcscpy(testBuffer, mixedString);
- errno = EBADF;
- ret = p_wcsupr_s(testBuffer, 0);
- ok(ret == EINVAL, "Expected _wcsupr_s to fail with EINVAL, got %d\n", ret);
- ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno);
- ok(testBuffer[0] == '\0', "Expected the first buffer character to be null\n");
-
- /* Test normal string uppercasing. */
- wcscpy(testBuffer, mixedString);
- ret = p_wcsupr_s(testBuffer, sizeof(mixedString)/sizeof(WCHAR));
- ok(ret == 0, "Expected _wcsupr_s to succeed, got %d\n", ret);
- ok(!wcscmp(testBuffer, expectedString), "Expected the string to be fully upper-case\n");
-
- /* Test uppercasing with a shorter buffer size count. */
- wcscpy(testBuffer, mixedString);
- errno = EBADF;
- ret = p_wcsupr_s(testBuffer, sizeof(mixedString)/sizeof(WCHAR) - 1);
- ok(ret == EINVAL, "Expected _wcsupr_s to fail with EINVAL, got %d\n", ret);
- ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno);
- ok(testBuffer[0] == '\0', "Expected the first buffer character to be null\n");
-
- /* Test uppercasing with a longer buffer size count. */
- wcscpy(testBuffer, mixedString);
- ret = p_wcsupr_s(testBuffer, sizeof(testBuffer)/sizeof(WCHAR));
- ok(ret == 0, "Expected _wcsupr_s to succeed, got %d\n", ret);
- ok(!wcscmp(testBuffer, expectedString), "Expected the string to be fully upper-case\n");
-}
-
static void test_mbcjisjms(void)
{
/* List of value-pairs to test. The test assumes the last pair to be {0, ..} */
pstrcat_s = (void *)GetProcAddress( hMsvcrt,"strcat_s" );
p_mbsnbcpy_s = (void *)GetProcAddress( hMsvcrt,"_mbsnbcpy_s" );
p_wcscpy_s = (void *)GetProcAddress( hMsvcrt,"wcscpy_s" );
- p_wcsupr_s = (void *)GetProcAddress( hMsvcrt,"_wcsupr_s" );
/* MSVCRT memcpy behaves like memmove for overlapping moves,
MFC42 CString::Insert seems to rely on that behaviour */
test_mbcjisjms();
test_strtok();
test_wcscpy_s();
- test__wcsupr_s();
test_strtol();
}
extern void func_heap(void);
extern void func_printf(void);
extern void func_scanf(void);
-extern void func_signal(void);
extern void func_string(void);
extern void func_time(void);
{ "heap", func_heap },
{ "printf", func_printf },
{ "scanf", func_scanf },
- { "signal", func_signal },
{ "string", func_string },
{ "time", func_time },
{ 0, 0 }
tzinfo.Bias, tzinfo.StandardBias, tzinfo.DaylightBias, buffer );
/* Bias may be positive or negative, to use offset of one day */
my_tm = *localtime(&ref); /* retrieve current dst flag */
- secs = SECSPERDAY - tzinfo.Bias * SECSPERMIN;
+ secs= SECSPERDAY - tzinfo.Bias * SECSPERMIN;
secs -= (my_tm.tm_isdst ? tzinfo.DaylightBias : tzinfo.StandardBias) * SECSPERMIN;
my_tm.tm_mday = 1 + secs/SECSPERDAY;
secs = secs % SECSPERDAY;
my_tm.tm_mon = 0;
sav_tm = my_tm;
-
+
local_time = mktime(&my_tm);
ok(local_time == ref, "mktime returned %u, expected %u\n",
(DWORD)local_time, (DWORD)ref);
struct tm* lt;
int year = get_test_year( &ref );
int is_leap = !(year % 4) && ((year % 100) || !((year + 300) % 400));
-
+
gmt = ref + SECSPERDAY + tzinfo.Bias * SECSPERMIN;
ok (res != TIME_ZONE_ID_INVALID, "GetTimeZoneInformation failed\n");
lt = localtime(&gmt);
/**********************************************************************/
-static void * (__cdecl *pMSVCRTD_operator_new_dbg)(size_t, int, const char *, int) = NULL;
+static void * (*pMSVCRTD_operator_new_dbg)(unsigned long, int, const char *, int) = NULL;
/* Some exports are only available in later versions */
#define SETNOFAIL(x,y) x = (void*)GetProcAddress(hModule,y)
IXMLDOMNode *pNextChild = (IXMLDOMNode *)0x1;
VARIANT var;
- VariantInit(&var);
-
hr = IXMLDOMCDATASection_QueryInterface(pCDataSec, &IID_IXMLDOMElement, (LPVOID*)&pElement);
ok(hr == E_NOINTERFACE, "ret %08x\n", hr);
/* test get nodeValue */
hr = IXMLDOMCDATASection_get_nodeValue(pCDataSec, &var);
ok(hr == S_OK, "ret %08x\n", hr );
- ok(V_VT(&var) == VT_BSTR, "got vt %04x\n", V_VT(&var));
- ok( !lstrcmpW( V_BSTR(&var), _bstr_("This &is a ; test <>\\") ), "incorrect text string\n");
+ ok( !lstrcmpW( str, _bstr_("This &is a ; test <>\\") ), "incorrect text string\n");
VariantClear(&var);
/* test get data */
/* border reallocate cases */
ok(pNetApiBufferReallocate(0, 1500, &p) == NERR_Success, "Reallocate with OldBuffer = NULL failed\n");
ok(p != NULL, "No memory got allocated\n");
- ok(pNetApiBufferFree(p) == NERR_Success, "NetApiBufferFree failed\n");
-
ok(pNetApiBufferAllocate(1024, &p) == NERR_Success, "Memory not reserved\n");
ok(pNetApiBufferReallocate(p, 0, &p) == NERR_Success, "Not freed\n");
ok(p == NULL, "Pointer not cleared\n");
-
+
/* 0-length buffer */
ok(pNetApiBufferAllocate(0, &p) == NERR_Success,
"Reserved memory\n");
if (init_wksta_tests()) {
if (pNetpGetComputerName)
- run_get_comp_name_tests();
+ run_get_comp_name_tests();
else
win_skip("Function NetpGetComputerName not available\n");
run_wkstausergetinfo_tests();
if (pNtAddAtomNT4)
res = pNtAddAtomNT4(testAtom1, &atom);
else
- res = pNtAddAtom(testAtom1, lstrlenW(testAtom1) * sizeof(WCHAR), &atom);
+ res = pNtAddAtom(testAtom1, lstrlenW(testAtom1) * sizeof(WCHAR), &atom);
ok(!res, "Added atom (%x)\n", res);
}
else
{
- ok( status == STATUS_END_OF_FILE, "wrong status %x\n", status );
- ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status );
- ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information );
- ok( !is_signaled( event ), "event is signaled\n" );
- ok( !apc_count, "apc was called\n" );
- SleepEx( 1, TRUE ); /* alertable sleep */
- ok( !apc_count, "apc was called\n" );
+ ok( status == STATUS_END_OF_FILE, "wrong status %x\n", status );
+ ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status );
+ ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information );
+ ok( !is_signaled( event ), "event is signaled\n" );
+ ok( !apc_count, "apc was called\n" );
+ SleepEx( 1, TRUE ); /* alertable sleep */
+ ok( !apc_count, "apc was called\n" );
}
CloseHandle( handle );
# ifdef TYPE_ALIGNMENT
# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align);
-# else
+#else
# define TEST_TYPE_ALIGN(type, align)
-# endif
+#endif
# ifdef _TYPE_ALIGNMENT
# define TEST_TARGET_ALIGN(type, align) C_ASSERT(_TYPE_ALIGNMENT(*(type)0) == align);
# define TEST_FIELD_ALIGN(type, field, align) C_ASSERT(_TYPE_ALIGNMENT(((type*)0)->field) == align);
-# else
+#else
# define TEST_TARGET_ALIGN(type, align)
# define TEST_FIELD_ALIGN(type, field, align)
-# endif
+#endif
# define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset);
ok (sppi->KernelTime.QuadPart != 0xdeaddead, "KernelTime unchanged\n");
ok (sppi->UserTime.QuadPart != 0xdeaddead, "UserTime unchanged\n");
ok (sppi->IdleTime.QuadPart != 0xdeaddead, "IdleTime unchanged\n");
-
+
/* Try it for all processors */
sppi->KernelTime.QuadPart = 0xdeaddead;
sppi->UserTime.QuadPart = 0xdeaddead;
ok( status == STATUS_SUCCESS,
"Expected STATUS_SUCCESS, got %08x\n", status);
- /* Check if we have some return values */
- trace("Number of Handles : %d\n", shi->Count);
- todo_wine
- {
- /* our implementation is a stub for now */
- ok( shi->Count > 1, "Expected more than 1 handles, got (%d)\n", shi->Count);
- }
+ /* Check if we have some return values */
+ trace("Number of Handles : %d\n", shi->Count);
+ todo_wine
+ {
+ /* our implementation is a stub for now */
+ ok( shi->Count > 1, "Expected more than 1 handles, got (%d)\n", shi->Count);
+ }
}
HeapFree( GetProcessHeap(), 0, shi);
}
status = pNtReadVirtualMemory(process, (void *) 0x1234, buffer, 12, &readcount);
ok( status == STATUS_PARTIAL_COPY || broken(status == STATUS_ACCESS_VIOLATION), "Expected STATUS_PARTIAL_COPY, got %08x\n", status);
if (status == STATUS_PARTIAL_COPY)
- ok( readcount == 0, "Expected to read 0 bytes, got %ld\n",readcount);
+ ok( readcount == 0, "Expected to read 0 bytes, got %ld\n",readcount);
}
/* 0 handle */
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
<module name="ntdll_winetest" type="win32cui" installbase="bin" installname="ntdll_winetest.exe" allowwarnings="true">
- <include base="ntdll_winetest">.</include>
+ <include base="ntdll_winetest">.</include>
<define name="__ROS_LONG64__" />
- <library>ntdll</library>
- <file>atom.c</file>
- <file>change.c</file>
- <file>env.c</file>
- <file>error.c</file>
- <file>exception.c</file>
- <file>file.c</file>
- <file>info.c</file>
- <file>large_int.c</file>
- <file>om.c</file>
- <file>path.c</file>
- <file>port.c</file>
- <file>reg.c</file>
- <file>rtlbitmap.c</file>
- <file>rtl.c</file>
- <file>rtlstr.c</file>
- <file>string.c</file>
- <file>time.c</file>
- <file>testlist.c</file>
+ <library>ntdll</library>
+ <file>atom.c</file>
+ <file>change.c</file>
+ <file>env.c</file>
+ <file>error.c</file>
+ <file>exception.c</file>
+ <file>file.c</file>
+ <file>info.c</file>
+ <file>large_int.c</file>
+ <file>om.c</file>
+ <file>path.c</file>
+ <file>port.c</file>
+ <file>reg.c</file>
+ <file>rtlbitmap.c</file>
+ <file>rtl.c</file>
+ <file>rtlstr.c</file>
+ <file>string.c</file>
+ <file>time.c</file>
+ <file>testlist.c</file>
</module>
ok(status == STATUS_SUCCESS, "Failed to create Mutant(%08x)\n", status);
status = pNtCreateEvent(&Event, GENERIC_ALL, &attr, FALSE, FALSE);
- ok(status == STATUS_OBJECT_NAME_COLLISION || status == STATUS_OBJECT_TYPE_MISMATCH,
- "NtCreateEvent should have failed with STATUS_OBJECT_NAME_COLLISION or STATUS_OBJECT_TYPE_MISMATCH got (%08x)\n", status);
+ ok(status == STATUS_OBJECT_NAME_COLLISION,
+ "NtCreateEvent should have failed with STATUS_OBJECT_NAME_COLLISION got(%08x)\n", status);
pRtlInitUnicodeString(&str, buffer2);
InitializeObjectAttributes(&attr, &str, 0, 0, NULL);
pRtlInitUnicodeString(&str, buffer4);
InitializeObjectAttributes(&attr, &str, OBJ_CASE_INSENSITIVE, 0, NULL);
status = pNtCreateMutant(&Mutant, GENERIC_ALL, &attr, FALSE);
- ok(status == STATUS_OBJECT_NAME_COLLISION || status == STATUS_OBJECT_TYPE_MISMATCH,
- "NtCreateMutant should have failed with STATUS_OBJECT_NAME_COLLISION or STATUS_OBJECT_TYPE_MISMATCH got (%08x)\n", status);
+ ok(status == STATUS_OBJECT_NAME_COLLISION,
+ "NtCreateMutant should have failed with STATUS_OBJECT_NAME_COLLISION got(%08x)\n", status);
status = pNtCreateEvent(&h, GENERIC_ALL, &attr, FALSE, FALSE);
ok(status == STATUS_OBJECT_NAME_COLLISION,
is_nt4 = (status == STATUS_OBJECT_NAME_NOT_FOUND); /* nt4 doesn't have Local\\ symlink */
if (!is_nt4)
{
- ok(status == STATUS_SUCCESS, "Failed to open SymbolicLink(%08x)\n", status);
- pRtlFreeUnicodeString(&str);
- InitializeObjectAttributes(&attr, &str, 0, dir, NULL);
- pRtlCreateUnicodeStringFromAsciiz(&str, "one more level");
- DIR_TEST_CREATE_FAILURE(&h, STATUS_OBJECT_TYPE_MISMATCH)
- pRtlFreeUnicodeString(&str);
- pNtClose(h);
- pNtClose(dir);
+ ok(status == STATUS_SUCCESS, "Failed to open SymbolicLink(%08x)\n", status);
+ pRtlFreeUnicodeString(&str);
+ InitializeObjectAttributes(&attr, &str, 0, dir, NULL);
+ pRtlCreateUnicodeStringFromAsciiz(&str, "one more level");
+ DIR_TEST_CREATE_FAILURE(&h, STATUS_OBJECT_TYPE_MISMATCH)
+ pRtlFreeUnicodeString(&str);
+ pNtClose(h);
+ pNtClose(dir);
}
pRtlCreateUnicodeStringFromAsciiz(&str, "\\BaseNamedObjects");
if (!is_nt4)
{
- InitializeObjectAttributes(&attr, &str, 0, 0, NULL);
- pRtlCreateUnicodeStringFromAsciiz(&str, "\\BaseNamedObjects\\Global\\om.c-test");
- DIR_TEST_CREATE_SUCCESS(&dir)
- pRtlFreeUnicodeString(&str);
- pRtlCreateUnicodeStringFromAsciiz(&str, "\\BaseNamedObjects\\Local\\om.c-test\\one more level");
- DIR_TEST_CREATE_SUCCESS(&h)
- pRtlFreeUnicodeString(&str);
- pNtClose(h);
- InitializeObjectAttributes(&attr, &str, 0, dir, NULL);
- pRtlCreateUnicodeStringFromAsciiz(&str, "one more level");
- DIR_TEST_CREATE_SUCCESS(&dir)
- pRtlFreeUnicodeString(&str);
- pNtClose(h);
- pNtClose(dir);
+ InitializeObjectAttributes(&attr, &str, 0, 0, NULL);
+ pRtlCreateUnicodeStringFromAsciiz(&str, "\\BaseNamedObjects\\Global\\om.c-test");
+ DIR_TEST_CREATE_SUCCESS(&dir)
+ pRtlFreeUnicodeString(&str);
+ pRtlCreateUnicodeStringFromAsciiz(&str, "\\BaseNamedObjects\\Local\\om.c-test\\one more level");
+ DIR_TEST_CREATE_SUCCESS(&h)
+ pRtlFreeUnicodeString(&str);
+ pNtClose(h);
+ InitializeObjectAttributes(&attr, &str, 0, dir, NULL);
+ pRtlCreateUnicodeStringFromAsciiz(&str, "one more level");
+ DIR_TEST_CREATE_SUCCESS(&dir)
+ pRtlFreeUnicodeString(&str);
+ pNtClose(h);
+ pNtClose(dir);
}
/* Create other objects using RootDirectory */
if (!hntdll)
return FALSE;
- pNtCompleteConnectPort = (void *)GetProcAddress(hntdll, "NtCompleteConnectPort");
- pNtAcceptConnectPort = (void *)GetProcAddress(hntdll, "NtAcceptConnectPort");
- pNtReplyPort = (void *)GetProcAddress(hntdll, "NtReplyPort");
- pNtReplyWaitReceivePort = (void *)GetProcAddress(hntdll, "NtReplyWaitReceivePort");
- pNtCreatePort = (void *)GetProcAddress(hntdll, "NtCreatePort");
- pNtRequestWaitReplyPort = (void *)GetProcAddress(hntdll, "NtRequestWaitReplyPort");
- pNtRequestPort = (void *)GetProcAddress(hntdll, "NtRequestPort");
- pNtRegisterThreadTerminatePort = (void *)GetProcAddress(hntdll, "NtRegisterThreadTerminatePort");
- pNtConnectPort = (void *)GetProcAddress(hntdll, "NtConnectPort");
- pRtlInitUnicodeString = (void *)GetProcAddress(hntdll, "RtlInitUnicodeString");
- pNtWaitForSingleObject = (void *)GetProcAddress(hntdll, "NtWaitForSingleObject");
+ pNtCompleteConnectPort = (void *)GetProcAddress(hntdll, "NtCompleteConnectPort");
+ pNtAcceptConnectPort = (void *)GetProcAddress(hntdll, "NtAcceptConnectPort");
+ pNtReplyPort = (void *)GetProcAddress(hntdll, "NtReplyPort");
+ pNtReplyWaitReceivePort = (void *)GetProcAddress(hntdll, "NtReplyWaitReceivePort");
+ pNtCreatePort = (void *)GetProcAddress(hntdll, "NtCreatePort");
+ pNtRequestWaitReplyPort = (void *)GetProcAddress(hntdll, "NtRequestWaitReplyPort");
+ pNtRequestPort = (void *)GetProcAddress(hntdll, "NtRequestPort");
+ pNtRegisterThreadTerminatePort = (void *)GetProcAddress(hntdll, "NtRegisterThreadTerminatePort");
+ pNtConnectPort = (void *)GetProcAddress(hntdll, "NtConnectPort");
+ pRtlInitUnicodeString = (void *)GetProcAddress(hntdll, "RtlInitUnicodeString");
+ pNtWaitForSingleObject = (void *)GetProcAddress(hntdll, "NtWaitForSingleObject");
if (!pNtCompleteConnectPort || !pNtAcceptConnectPort ||
!pNtReplyWaitReceivePort || !pNtCreatePort || !pNtRequestWaitReplyPort ||
{
DWORD id;
HANDLE thread = CreateThread(NULL, 0, test_ports_client, NULL, 0, &id);
- ok(thread != NULL, "Expected non-NULL thread handle!\n");
+ ok(thread != NULL, "Expected non-NULL thread handle!\n");
test_ports_server( port_handle );
ok( WaitForSingleObject( thread, 10000 ) == 0, "thread didn't exit\n" );
- CloseHandle(thread);
- }
+ CloseHandle(thread);
+}
FreeLibrary(hntdll);
}
trace("Could not load ntdll.dll\n");
return FALSE;
}
- NTDLL_GET_PROC(RtlCreateUnicodeStringFromAsciiz)
- NTDLL_GET_PROC(RtlCreateUnicodeString)
- NTDLL_GET_PROC(RtlFreeUnicodeString)
- NTDLL_GET_PROC(NtDeleteValueKey)
- NTDLL_GET_PROC(RtlQueryRegistryValues)
- NTDLL_GET_PROC(RtlCheckRegistryKey)
- NTDLL_GET_PROC(RtlOpenCurrentUser)
- NTDLL_GET_PROC(NtClose)
- NTDLL_GET_PROC(NtDeleteValueKey)
- NTDLL_GET_PROC(NtCreateKey)
- NTDLL_GET_PROC(NtFlushKey)
- NTDLL_GET_PROC(NtDeleteKey)
- NTDLL_GET_PROC(NtQueryValueKey)
- NTDLL_GET_PROC(NtSetValueKey)
- NTDLL_GET_PROC(NtOpenKey)
- NTDLL_GET_PROC(RtlFormatCurrentUserKeyPath)
- NTDLL_GET_PROC(RtlReAllocateHeap)
- NTDLL_GET_PROC(RtlAppendUnicodeToString)
- NTDLL_GET_PROC(RtlUnicodeStringToAnsiString)
- NTDLL_GET_PROC(RtlFreeHeap)
- NTDLL_GET_PROC(RtlAllocateHeap)
- NTDLL_GET_PROC(RtlZeroMemory)
- NTDLL_GET_PROC(RtlpNtQueryValueKey)
+ NTDLL_GET_PROC(RtlCreateUnicodeStringFromAsciiz)
+ NTDLL_GET_PROC(RtlCreateUnicodeString)
+ NTDLL_GET_PROC(RtlFreeUnicodeString)
+ NTDLL_GET_PROC(NtDeleteValueKey)
+ NTDLL_GET_PROC(RtlQueryRegistryValues)
+ NTDLL_GET_PROC(RtlCheckRegistryKey)
+ NTDLL_GET_PROC(RtlOpenCurrentUser)
+ NTDLL_GET_PROC(NtClose)
+ NTDLL_GET_PROC(NtDeleteValueKey)
+ NTDLL_GET_PROC(NtCreateKey)
+ NTDLL_GET_PROC(NtFlushKey)
+ NTDLL_GET_PROC(NtDeleteKey)
+ NTDLL_GET_PROC(NtQueryValueKey)
+ NTDLL_GET_PROC(NtSetValueKey)
+ NTDLL_GET_PROC(NtOpenKey)
+ NTDLL_GET_PROC(RtlFormatCurrentUserKeyPath)
+ NTDLL_GET_PROC(RtlReAllocateHeap)
+ NTDLL_GET_PROC(RtlAppendUnicodeToString)
+ NTDLL_GET_PROC(RtlUnicodeStringToAnsiString)
+ NTDLL_GET_PROC(RtlFreeHeap)
+ NTDLL_GET_PROC(RtlAllocateHeap)
+ NTDLL_GET_PROC(RtlZeroMemory)
+ NTDLL_GET_PROC(RtlpNtQueryValueKey)
return TRUE;
}
#undef NTDLL_GET_PROC
static void test_RtlFindMostSignificantBit(void)
{
int i;
- signed char cPos;
+ CCHAR cPos;
ULONGLONG ulLong;
if (!pRtlFindMostSignificantBit)
static void test_RtlFindLeastSignificantBit(void)
{
int i;
- signed char cPos;
+ CCHAR cPos;
ULONGLONG ulLong;
if (!pRtlFindLeastSignificantBit)
static BOOLEAN (WINAPI *pRtlEqualUnicodeString)(const UNICODE_STRING *, const UNICODE_STRING *, BOOLEAN);
static NTSTATUS (WINAPI *pRtlFindCharInUnicodeString)(int, const UNICODE_STRING *, const UNICODE_STRING *, USHORT *);
static VOID (WINAPI *pRtlFreeAnsiString)(PSTRING);
-static VOID (WINAPI *pRtlFreeUnicodeString)(PUNICODE_STRING);
static VOID (WINAPI *pRtlInitAnsiString)(PSTRING, LPCSTR);
static VOID (WINAPI *pRtlInitString)(PSTRING, LPCSTR);
static VOID (WINAPI *pRtlInitUnicodeString)(PUNICODE_STRING, LPCWSTR);
static BOOLEAN (WINAPI *pRtlIsTextUnicode)(LPVOID, INT, INT *);
/*static VOID (WINAPI *pRtlFreeOemString)(PSTRING);*/
+/*static VOID (WINAPI *pRtlFreeUnicodeString)(PUNICODE_STRING);*/
/*static VOID (WINAPI *pRtlCopyUnicodeString)(UNICODE_STRING *, const UNICODE_STRING *);*/
/*static VOID (WINAPI *pRtlEraseUnicodeString)(UNICODE_STRING *);*/
/*static LONG (WINAPI *pRtlCompareString)(const STRING *,const STRING *,BOOLEAN);*/
pRtlEqualUnicodeString = (void *)GetProcAddress(hntdll, "RtlEqualUnicodeString");
pRtlFindCharInUnicodeString = (void *)GetProcAddress(hntdll, "RtlFindCharInUnicodeString");
pRtlFreeAnsiString = (void *)GetProcAddress(hntdll, "RtlFreeAnsiString");
- pRtlFreeUnicodeString = (void *)GetProcAddress(hntdll, "RtlFreeUnicodeString");
pRtlInitAnsiString = (void *)GetProcAddress(hntdll, "RtlInitAnsiString");
pRtlInitString = (void *)GetProcAddress(hntdll, "RtlInitString");
pRtlInitUnicodeString = (void *)GetProcAddress(hntdll, "RtlInitUnicodeString");
ok(memcmp(dest_str.Buffer, res_str.Buffer, dupl_ustr[test_num].res_buf_size) == 0,
"(test %d): RtlDuplicateUnicodeString(%d, source, dest) has destination \"%s\" expected \"%s\"\n",
test_num, dupl_ustr[test_num].add_nul, dest_ansi_str.Buffer, dupl_ustr[test_num].res_buf);
- if(result == STATUS_SUCCESS) pRtlFreeUnicodeString(&dest_str);
} else {
ok(dest_str.Buffer == NULL && dupl_ustr[test_num].res_buf == NULL,
"(test %d): RtlDuplicateUnicodeString(%d, source, dest) has destination %p expected %p\n",
ok(memcmp(ansi_str.Buffer, ustr2astr[test_num].res_buf, ustr2astr[test_num].res_buf_size) == 0,
"(test %d): RtlUnicodeStringToAnsiString(ansi, uni, %d) has ansi \"%s\" expected \"%s\"\n",
test_num, ustr2astr[test_num].doalloc, ansi_str.Buffer, ustr2astr[test_num].res_buf);
- if(result == STATUS_SUCCESS && ustr2astr[test_num].doalloc)
- pRtlFreeAnsiString(&ansi_str);
}
}
if (result == STATUS_SUCCESS)
ok(value == str2int[test_num].value ||
broken(str2int[test_num].str[0] == '\0' && str2int[test_num].base == 16), /* nt4 */
- "(test %d): RtlUnicodeStringToInteger(\"%s\", %d, [out]) assigns value %d, expected: %d\n",
- test_num, str2int[test_num].str, str2int[test_num].base, value, str2int[test_num].value);
+ "(test %d): RtlUnicodeStringToInteger(\"%s\", %d, [out]) assigns value %d, expected: %d\n",
+ test_num, str2int[test_num].str, str2int[test_num].base, value, str2int[test_num].value);
else
ok(value == 0xdeadbeef || value == 0 /* vista */,
"(test %d): RtlUnicodeStringToInteger(\"%s\", %d, [out]) assigns value %d, expected 0 or deadbeef\n",
test_num, str2int[test_num].str, str2int[test_num].base, result,
str2int[test_num].result, str2int[test_num].alternative);
if (result == STATUS_SUCCESS)
- ok(value == str2int[test_num].value,
- "(test %d): call failed: RtlCharToInteger(\"%s\", %d, [out]) assigns value %d, expected: %d\n",
- test_num, str2int[test_num].str, str2int[test_num].base, value, str2int[test_num].value);
+ ok(value == str2int[test_num].value,
+ "(test %d): call failed: RtlCharToInteger(\"%s\", %d, [out]) assigns value %d, expected: %d\n",
+ test_num, str2int[test_num].str, str2int[test_num].base, value, str2int[test_num].value);
else
ok(value == 0 || value == 0xdeadbeef,
"(test %d): call failed: RtlCharToInteger(\"%s\", %d, [out]) assigns value %d, expected 0 or deadbeef\n",
ret = pRtlStringFromGUID(&IID_Endianess, &str);
ok(ret == 0, "expected ret=0, got 0x%0x\n", ret);
ok(str.Buffer && !lstrcmpiW(str.Buffer, szGuid), "Endianess broken\n");
- pRtlFreeUnicodeString(&str);
}
START_TEST(rtlstr)
test_num, str2longlong[test_num].str, (DWORD)(result >> 32), (DWORD)result,
(DWORD)(str2longlong[test_num].value >> 32), (DWORD)str2longlong[test_num].value);
else
- ok(result == str2longlong[test_num].value,
- "(test %d): call failed: _atoi64(\"%s\") has result 0x%x%08x, expected: 0x%x%08x\n",
- test_num, str2longlong[test_num].str, (DWORD)(result >> 32), (DWORD)result,
- (DWORD)(str2longlong[test_num].value >> 32), (DWORD)str2longlong[test_num].value);
- }
+ ok(result == str2longlong[test_num].value,
+ "(test %d): call failed: _atoi64(\"%s\") has result 0x%x%08x, expected: 0x%x%08x\n",
+ test_num, str2longlong[test_num].str, (DWORD)(result >> 32), (DWORD)result,
+ (DWORD)(str2longlong[test_num].value >> 32), (DWORD)str2longlong[test_num].value);
+}
}
test_num, str2longlong[test_num].str, (DWORD)(result >> 32), (DWORD)result,
(DWORD)(str2longlong[test_num].value >> 32), (DWORD)str2longlong[test_num].value);
else
- ok(result == str2longlong[test_num].value,
+ ok(result == str2longlong[test_num].value,
"(test %d): call failed: _atoi64(\"%s\") has result 0x%x%08x, expected: 0x%x%08x\n",
- test_num, str2longlong[test_num].str, (DWORD)(result >> 32), (DWORD)result,
- (DWORD)(str2longlong[test_num].value >> 32), (DWORD)str2longlong[test_num].value);
+ test_num, str2longlong[test_num].str, (DWORD)(result >> 32), (DWORD)result,
+ (DWORD)(str2longlong[test_num].value >> 32), (DWORD)str2longlong[test_num].value);
pRtlFreeUnicodeString(&uni);
- }
+}
}
static void test_wcsfuncs(void)
ok(bool_ret, "SQLInstallDriverManager unexpectedly failed: %d\n",
error_code);
if (bool_ret)
- ok(sql_ret == SQL_NO_DATA, "Expected SQL_NO_DATA, got %d\n", sql_ret);
+ ok(sql_ret == SQL_NO_DATA, "Expected SQL_NO_DATA, got %d\n", sql_ret);
else
ok(sql_ret == SQL_SUCCESS_WITH_INFO,
"Expected SQL_SUCCESS_WITH_INFO, got %d\n", sql_ret);
ok(bool_ret, "SQLInstallDriverManager unexpectedly failed: %d\n",
error_code);
if (bool_ret)
- ok(sql_ret == SQL_NO_DATA, "Expected SQL_NO_DATA, got %d\n", sql_ret);
+ ok(sql_ret == SQL_NO_DATA, "Expected SQL_NO_DATA, got %d\n", sql_ret);
else
ok(sql_ret == SQL_SUCCESS_WITH_INFO,
"Expected SQL_SUCCESS_WITH_INFO, got %d\n", sql_ret);
if(!rgelt)
return E_INVALIDARG;
- count = min(celt, This->fmtetc_cnt - This->cur);
+ count = min(celt, This->fmtetc_cnt-This->cur);
for(i = 0; i < count; i++, This->cur++, rgelt++)
{
*rgelt = This->fmtetc[This->cur];
DWORD size = This->fmtetc[This->cur].ptd->tdSize;
rgelt->ptd = CoTaskMemAlloc(size);
memcpy(rgelt->ptd, This->fmtetc[This->cur].ptd, size);
- }
+ }
}
if(pceltFetched)
*pceltFetched = count;
foundFormat = TRUE;
if(This->fmtetc[i].tymed & pformatetc->tymed)
{
- pmedium->pUnkForRelease = (LPUNKNOWN)iface;
- IUnknown_AddRef(pmedium->pUnkForRelease);
+ pmedium->pUnkForRelease = (LPUNKNOWN)iface;
+ IUnknown_AddRef(pmedium->pUnkForRelease);
if(pformatetc->cfFormat == CF_TEXT || pformatetc->cfFormat == cf_global)
{
IStorage_AddRef(This->stg);
U(*pmedium).pstg = This->stg;
}
- return S_OK;
- }
+ return S_OK;
+}
}
}
marshal_data += sizeof(void *);
if (sizeof(void*) == 4 && size >= 3*sizeof(DWORD))
{
- ok(*(DWORD *)marshal_data == 0, "expected 0x0, but got 0x%x\n", *(DWORD *)marshal_data);
- marshal_data += sizeof(DWORD);
+ ok(*(DWORD *)marshal_data == 0, "expected 0x0, but got 0x%x\n", *(DWORD *)marshal_data);
+ marshal_data += sizeof(DWORD);
}
if (size >= 3*sizeof(DWORD) + sizeof(GUID))
{
- trace("got guid data: {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
- ((GUID *)marshal_data)->Data1, ((GUID *)marshal_data)->Data2, ((GUID *)marshal_data)->Data3,
- ((GUID *)marshal_data)->Data4[0], ((GUID *)marshal_data)->Data4[1], ((GUID *)marshal_data)->Data4[2], ((GUID *)marshal_data)->Data4[3],
- ((GUID *)marshal_data)->Data4[4], ((GUID *)marshal_data)->Data4[5], ((GUID *)marshal_data)->Data4[6], ((GUID *)marshal_data)->Data4[7]);
- }
+ trace("got guid data: {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
+ ((GUID *)marshal_data)->Data1, ((GUID *)marshal_data)->Data2, ((GUID *)marshal_data)->Data3,
+ ((GUID *)marshal_data)->Data4[0], ((GUID *)marshal_data)->Data4[1], ((GUID *)marshal_data)->Data4[2], ((GUID *)marshal_data)->Data4[3],
+ ((GUID *)marshal_data)->Data4[4], ((GUID *)marshal_data)->Data4[5], ((GUID *)marshal_data)->Data4[6], ((GUID *)marshal_data)->Data4[7]);
+ }
}
else
{
strcat(buffer, "\\InprocHandler32");
if (Register)
{
- error = RegCreateKeyEx(HKEY_CLASSES_ROOT, buffer, 0, NULL, 0, KEY_SET_VALUE, NULL, &hkey, &dwDisposition);
- ok(error == ERROR_SUCCESS, "RegCreateKeyEx failed with error %d\n", error);
- error = RegSetValueEx(hkey, NULL, 0, REG_SZ, (const unsigned char *)"ole32.dll", strlen("ole32.dll") + 1);
- ok(error == ERROR_SUCCESS, "RegSetValueEx failed with error %d\n", error);
- RegCloseKey(hkey);
+ error = RegCreateKeyEx(HKEY_CLASSES_ROOT, buffer, 0, NULL, 0, KEY_SET_VALUE, NULL, &hkey, &dwDisposition);
+ ok(error == ERROR_SUCCESS, "RegCreateKeyEx failed with error %d\n", error);
+ error = RegSetValueEx(hkey, NULL, 0, REG_SZ, (const unsigned char *)"ole32.dll", strlen("ole32.dll") + 1);
+ ok(error == ERROR_SUCCESS, "RegSetValueEx failed with error %d\n", error);
+ RegCloseKey(hkey);
}
else
{
if(hr == S_OK)
{
- ok_more_than_one_lock();
+ ok_more_than_one_lock();
- hr = IUnknown_QueryInterface(pProxy, &IID_IWineTest, (void **)&pObject);
- ok(hr == E_NOINTERFACE, "IUnknown_QueryInterface with unknown IID should have returned E_NOINTERFACE instead of 0x%08x\n", hr);
+ hr = IUnknown_QueryInterface(pProxy, &IID_IWineTest, (void **)&pObject);
+ ok(hr == E_NOINTERFACE, "IUnknown_QueryInterface with unknown IID should have returned E_NOINTERFACE instead of 0x%08x\n", hr);
- /* it's a handler as it supports IOleObject */
- hr = IUnknown_QueryInterface(pProxy, &IID_IOleObject, (void **)&pObject);
- todo_wine
- ok_ole_success(hr, "IUnknown_QueryInterface(&IID_IOleObject)");
- if (SUCCEEDED(hr)) IUnknown_Release(pObject);
+ /* it's a handler as it supports IOleObject */
+ hr = IUnknown_QueryInterface(pProxy, &IID_IOleObject, (void **)&pObject);
+ todo_wine
+ ok_ole_success(hr, "IUnknown_QueryInterface(&IID_IOleObject)");
+ if (SUCCEEDED(hr)) IUnknown_Release(pObject);
- IUnknown_Release(pProxy);
+ IUnknown_Release(pProxy);
- ok_no_locks();
+ ok_no_locks();
}
end_host_object(tid, thread);
ok_ole_success(hr, IMoniker_BindToObject);
if (SUCCEEDED(hr))
- IUnknown_Release(object);
+ IUnknown_Release(object);
IMoniker_Release(pmk);
}
IBindCtx_Release(pbc);
{ \
while (expected_method_list->flags & TEST_OPTIONAL && \
strcmp(expected_method_list->method, method_name) != 0) \
- expected_method_list++; \
+ expected_method_list++; \
ok(!strcmp(expected_method_list->method, method_name), "Expected %s to be called instead of %s\n", \
expected_method_list->method, method_name); \
expected_method_list++; \
{
IOleObject_Release(pObject);
CHECK_NO_EXTRA_METHODS();
- }
+}
}
static BOOL STDMETHODCALLTYPE draw_continue(ULONG_PTR param)
modifier = "byref";
}
else if(vt & VT_ARRAY)
- {
+ {
flags = valid_types[idx].with_array;
modifier = "array";
- }
+ }
else if(vt & VT_VECTOR)
{
flags = valid_types[idx].with_vector;
modifier = "vector";
}
- else
- {
+ else
+ {
flags = valid_types[idx].simple;
modifier = "simple";
- }
+ }
if(flags == PROP_INV)
ok(hr == STG_E_INVALIDPARAMETER, "%s (%s): got %08x\n", wine_vtypes[idx], modifier, hr);
if(hr != S_OK)
win_skip("%s (%s): unsupported\n", wine_vtypes[idx], modifier);
else ok(hr == S_OK, "%s (%s): got %08x\n", wine_vtypes[idx], modifier, hr);
- }
+ }
}
else
{
/* Add more as needed. */
if (0) /* FIXME: failing tests */
{
- test_ifont_sizes(180000, 0, 72, 2540, -18, "default");
- test_ifont_sizes(180000, 0, 144, 2540, -36, "ratio1"); /* change ratio */
- test_ifont_sizes(180000, 0, 72, 1270, -36, "ratio2"); /* 2nd part of ratio */
+ test_ifont_sizes(180000, 0, 72, 2540, -18, "default");
+ test_ifont_sizes(180000, 0, 144, 2540, -36, "ratio1"); /* change ratio */
+ test_ifont_sizes(180000, 0, 72, 1270, -36, "ratio2"); /* 2nd part of ratio */
- /* These depend on details of how IFont rounds sizes internally. */
- test_ifont_sizes(0, 0, 72, 2540, 0, "zero size"); /* zero size */
- test_ifont_sizes(186000, 0, 72, 2540, -19, "rounding"); /* test rounding */
+ /* These depend on details of how IFont rounds sizes internally. */
+ test_ifont_sizes(0, 0, 72, 2540, 0, "zero size"); /* zero size */
+ test_ifont_sizes(186000, 0, 72, 2540, -19, "rounding"); /* test rounding */
}
test_font_events_disp();
ok(hres == S_OK, "SAGVT of arra y with vt %d failed with %x\n", vttypes[i].vt, hres);
/* Windows prior to Vista returns VT_UNKNOWN instead of VT_DISPATCH */
ok(broken(vt == VT_UNKNOWN) || vt == vttypes[i].vt, "SAGVT of array with vt %d returned %d\n", vttypes[i].vt, vt);
- }
+ }
hres = SafeArrayCopy(a, &c);
ok(hres == S_OK, "failed to copy safearray of vt %d with hres %x\n", vttypes[i].vt, hres);
ok(hres == S_OK, "SAGVT of array with vt %d failed with %x\n", vttypes[i].vt, hres);
/* Windows prior to Vista returns VT_UNKNOWN instead of VT_DISPATCH */
ok(broken(vt == VT_UNKNOWN) || vt == vttypes[i].vt, "SAGVT of array with vt %d returned %d\n", vttypes[i].vt, vt);
- }
+ }
if (pSafeArrayCopyData) {
hres = pSafeArrayCopyData(a, c);
}
static IWidget *Widget_Create(void)
-{
+ {
Widget *This;
- ITypeInfo *pTypeInfo;
+ ITypeInfo *pTypeInfo;
HRESULT hr = E_FAIL;
pTypeInfo = get_type_info(&IID_IWidget);
This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
This->lpVtbl = &Widget_VTable;
This->refs = 1;
- This->pDispatchUnknown = NULL;
+ This->pDispatchUnknown = NULL;
- hr = CreateStdDispatch((IUnknown *)&This->lpVtbl, This, pTypeInfo, &This->pDispatchUnknown);
- ok_ole_success(hr, CreateStdDispatch);
- ITypeInfo_Release(pTypeInfo);
+ hr = CreateStdDispatch((IUnknown *)&This->lpVtbl, This, pTypeInfo, &This->pDispatchUnknown);
+ ok_ole_success(hr, CreateStdDispatch);
+ ITypeInfo_Release(pTypeInfo);
if (SUCCEEDED(hr))
return (IWidget *)&This->lpVtbl;
ok(hr == S_OK, "hr %08x\n", hr);
if (hr == S_OK)
{
- ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind);
+ ok(pTA->typekind == TKIND_DISPATCH, "kind %04x\n", pTA->typekind);
ok(pTA->cbSizeVft == 7 * sizeof(void *), "sizevft %d\n", pTA->cbSizeVft);
- if(use_midl_tlb) {
- ok(pTA->wTypeFlags == TYPEFLAG_FDUAL, "typeflags %x\n", pTA->wTypeFlags);
- }
- ok(pTA->cFuncs == 8, "cfuncs %d\n", pTA->cFuncs);
- ok(pTA->cImplTypes == 1, "cimpltypes %d\n", pTA->cImplTypes);
- ITypeInfo_ReleaseTypeAttr(pTI, pTA);
+if(use_midl_tlb) {
+ ok(pTA->wTypeFlags == TYPEFLAG_FDUAL, "typeflags %x\n", pTA->wTypeFlags);
+ }
+ ok(pTA->cFuncs == 8, "cfuncs %d\n", pTA->cFuncs);
+ ok(pTA->cImplTypes == 1, "cimpltypes %d\n", pTA->cImplTypes);
+ ITypeInfo_ReleaseTypeAttr(pTI, pTA);
}
hr = ITypeInfo_GetRefTypeOfImplType(pTI, 0, &href);
ok(hr == S_OK, "hr %08x\n", hr);
{
test_dump_typelib( filename );
DeleteFile( filename );
- }
+}
test_create_typelibs();
next = VARIANT_UserMarshal(&umcb.Flags, buffer, &v);
ok(next == buffer + expected, "got %p expect %p\n", next, buffer + expected);
wirev = (DWORD*)buffer;
-
+
check_variant_header(wirev, &v, expected);
wirev += 5;
ok(*wirev == 4, "wv[5] %08x\n", *wirev);
if (bstr) memcpy(&sz12_false[2], bstr, SysStringByteLen(bstr) + sizeof(WCHAR));
SysFreeString(bstr);
- hOleaut32 = GetModuleHandle("oleaut32.dll");
+ hOleaut32 = GetModuleHandle("oleaut32.dll");
/* Is a given function exported from oleaut32? */
#define HAVE_FUNC(func) ((void*)GetProcAddress(hOleaut32, #func) != NULL)
"Copy(bad src): expected vt = %d, got %d\n",
vt | ExtraFlags[i], V_VT(&vDst));
VariantClear(&vDst);
- }
}
}
+ }
/* Test that copying a NULL BSTR results in an empty BSTR */
memset(&vDst, 0, sizeof(vDst));
if (leftvt == VT_RECORD && rightvt == VT_I8)
{
if (HAVE_OLEAUT32_I8)
- expectedhres = DISP_E_TYPEMISMATCH;
+ expectedhres = DISP_E_TYPEMISMATCH;
else
expectedhres = DISP_E_BADVARTYPE;
}
hres = pVarPow(&cy, &right, &result);
if (hres == S_OK)
{
- ok(hres == S_OK && V_VT(&result) == VT_R8,
- "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n",
- S_OK, hres, vtstr(V_VT(&result)));
- ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 4.0),
- "VARPOW: CY value %f, expected %f\n", V_R8(&result), 4.0);
+ ok(hres == S_OK && V_VT(&result) == VT_R8,
+ "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n",
+ S_OK, hres, vtstr(V_VT(&result)));
+ ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 4.0),
+ "VARPOW: CY value %f, expected %f\n", V_R8(&result), 4.0);
}
else
{
hres = pVarPow(&dec, &right, &result);
if (hres == S_OK)
{
- ok(hres == S_OK && V_VT(&result) == VT_R8,
- "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n",
- S_OK, hres, vtstr(V_VT(&result)));
- ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 4.0),
- "VARPOW: DECIMAL value %f, expected %f\n", V_R8(&result), 4.0);
+ ok(hres == S_OK && V_VT(&result) == VT_R8,
+ "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n",
+ S_OK, hres, vtstr(V_VT(&result)));
+ ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 4.0),
+ "VARPOW: DECIMAL value %f, expected %f\n", V_R8(&result), 4.0);
}
else
{
<module name="powrprof_winetest" type="win32cui" installbase="bin" installname="powrprof_winetest.exe" allowwarnings="true">
<include base="powrprof_winetest">.</include>
<define name="__ROS_LONG64__" />
- <define name="UNICODE" />
- <define name="_UNICODE" />
+ <define name="UNICODE" />
+ <define name="_UNICODE" />
<library>powrprof</library>
<library>ntdll</library>
<library>advapi32</library>
-#include <stdarg.h>
+#include<stdarg.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
#define STANDALONE
if (Err != STATUS_SUCCESS)
printf("#1 failed to query subkey %i (testentry)\n", g_TempPwrScheme);
RegCloseKey(hSubKey);
- }
+}
}
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
<module name="psapi_winetest" type="win32cui" installbase="bin" installname="psapi_winetest.exe" allowwarnings="true">
- <include base="psapi_winetest">.</include>
+ <include base="psapi_winetest">.</include>
<define name="__ROS_LONG64__" />
- <library>ntdll</library>
- <library>psapi</library>
- <file>testlist.c</file>
- <file>psapi_main.c</file>
+ <library>ntdll</library>
+ <library>psapi</library>
+ <file>testlist.c</file>
+ <file>psapi_main.c</file>
</module>
{
if(GetLastError() == ERROR_INVALID_FUNCTION) {
win_skip("GetProcessImageFileName not implemented\n");
- return;
- }
-
+ return;
+ }
+
if(GetLastError() == 0xdeadbeef)
todo_wine ok(0, "failed without error code\n");
else
todo_wine
if(w32_suc(ret = pGetProcessImageFileNameA(hpQI, szImgPath, sizeof(szImgPath))) &&
w32_suc(pGetMappedFileNameA(hpQV, hMod, szMapPath, sizeof(szMapPath)))) {
- /* Windows returns 2*strlen-1 */
- ok(ret >= strlen(szImgPath), "szImgPath=\"%s\" ret=%d\n", szImgPath, ret);
- ok(!strcmp(szImgPath, szMapPath),
- "szImgPath=\"%s\" szMapPath=\"%s\"\n", szImgPath, szMapPath);
- }
+ /* Windows returns 2*strlen-1 */
+ ok(ret >= strlen(szImgPath), "szImgPath=\"%s\" ret=%d\n", szImgPath, ret);
+ ok(!strcmp(szImgPath, szMapPath),
+ "szImgPath=\"%s\" szMapPath=\"%s\"\n", szImgPath, szMapPath);
+}
w32_err(pGetProcessImageFileNameW(NULL, szImgPathW, sizeof(szImgPathW)), ERROR_INVALID_HANDLE);
/* no information about correct buffer size returned: */
int i;
for (i = 0; i < num_tests; i++) {
- check_EM_FINDTEXT(hwnd, name, &find[i], i);
- check_EM_FINDTEXTEX(hwnd, name, &find[i], i);
- }
-}
+ check_EM_FINDTEXT(hwnd, name, &find[i], i);
+ check_EM_FINDTEXTEX(hwnd, name, &find[i], i);
+ }
+ }
static void test_EM_FINDTEXT(void)
{
memset(buf, 0, sizeof(buf));
SendMessage(hwndRichEdit, EM_STREAMOUT,
(WPARAM)(SF_RTF), (LPARAM)&es);
- trace("EM_STREAMOUT produced:\n%s\n", buf);
+ trace("EM_STREAMOUT produced: \n%s\n", buf);
TEST_SETTEXT(buf, TestItem1)
#undef TEST_SETTEXT
memset(buf, 0, sizeof(buf));
SendMessage(hwndRichEdit, EM_STREAMOUT,
(WPARAM)(SF_RTF), (LPARAM)&es);
- trace("EM_STREAMOUT produced:\n%s\n", (char *)buf);
+ trace("EM_STREAMOUT produced: \n%s\n", (char *)buf);
/* !ST_SELECTION && !Unicode && \rtf */
setText.codepage = CP_ACP;/* EM_STREAMOUT saved as ANSI string */
cr.cpMax = setsel->max;
result = SendMessage(hwnd, EM_EXSETSEL, 0, (LPARAM) &cr);
- ok(result == setsel->expected_retval, "EM_EXSETSEL(%d): expected: %ld actual: %ld\n", id, setsel->expected_retval, result);
+ ok(result == setsel->expected_retval, "EM_EXSETSEL(%d): expected: %ld actual: %ld\n", id, setsel->expected_retval, result);
SendMessage(hwnd, EM_GETSEL, (WPARAM) &start, (LPARAM) &end);
* Changes to the width means we have at least 2 pages. Changes to the height
* is done so we can check the changing of fr.rc.bottom.
*/
- fr.hdc = fr.hdcTarget = hdc;
- fr.rc.top = fr.rcPage.top = fr.rc.left = fr.rcPage.left = 0;
+ fr.hdc = fr.hdcTarget = hdc;
+ fr.rc.top = fr.rcPage.top = fr.rc.left = fr.rcPage.left = 0;
fr.rc.right = fr.rcPage.right = (stringsize.cx / 2) * tpp_x;
fr.rc.bottom = fr.rcPage.bottom = (stringsize.cy + 10) * tpp_y;
r = SendMessage(hwndRichEdit, EM_FORMATRANGE, TRUE, 0);
- todo_wine {
+ todo_wine {
ok(r == len, "Expected %d, got %d\n", len, r);
- }
+ }
/* We know that the page can't hold the full string. See how many characters
* are on the first one
*/
fr.chrg.cpMin = 0;
fr.chrg.cpMax = -1;
- r = SendMessage(hwndRichEdit, EM_FORMATRANGE, TRUE, (LPARAM) &fr);
- todo_wine {
+ r = SendMessage(hwndRichEdit, EM_FORMATRANGE, TRUE, (LPARAM) &fr);
+ todo_wine {
ok(fr.rc.bottom == (stringsize.cy * tpp_y), "Expected bottom to be %d, got %d\n", (stringsize.cy * tpp_y), fr.rc.bottom);
- }
+ }
if (fmtstrings[i].first)
todo_wine {
ok(r == fmtstrings[i].first, "Expected %d, got %d\n", fmtstrings[i].first, r);
/* Do another page */
fr.chrg.cpMin = r;
- r = SendMessage(hwndRichEdit, EM_FORMATRANGE, TRUE, (LPARAM) &fr);
+ r = SendMessage(hwndRichEdit, EM_FORMATRANGE, TRUE, (LPARAM) &fr);
if (fmtstrings[i].second)
- todo_wine {
+ todo_wine {
ok(r == fmtstrings[i].second, "Expected %d, got %d\n", fmtstrings[i].second, r);
- }
+ }
else
ok (r < len, "Expected < %d, got %d\n", len, r);
/* There is at least on more page, but we don't care */
r = SendMessage(hwndRichEdit, EM_FORMATRANGE, TRUE, 0);
- todo_wine {
+ todo_wine {
ok(r == len, "Expected %d, got %d\n", len, r);
- }
+ }
}
ReleaseDC(NULL, hdc);
/* single line */
if (!is_win9x)
- hwnd = CreateWindowExA(0, "RichEdit20W", NULL, WS_POPUP,
- 0, 0, 200, 60, 0, 0, 0, 0);
+ hwnd = CreateWindowExA(0, "RichEdit20W", NULL, WS_POPUP,
+ 0, 0, 200, 60, 0, 0, 0, 0);
else
hwnd = CreateWindowExA(0, "RichEdit20A", NULL, WS_POPUP,
0, 0, 200, 60, 0, 0, 0, 0);
/* multi line */
if (!is_win9x)
- hwnd = CreateWindowExA(0, "RichEdit20W", NULL, WS_POPUP | ES_MULTILINE,
- 0, 0, 200, 60, 0, 0, 0, 0);
+ hwnd = CreateWindowExA(0, "RichEdit20W", NULL, WS_POPUP | ES_MULTILINE,
+ 0, 0, 200, 60, 0, 0, 0, 0);
else
hwnd = CreateWindowExA(0, "RichEdit20A", NULL, WS_POPUP | ES_MULTILINE,
0, 0, 200, 60, 0, 0, 0, 0);
/* multi-line control inserts CR normally */
if (!is_win9x)
- hwnd = CreateWindowExA(0, "RichEdit20W", NULL, WS_POPUP|ES_MULTILINE,
- 0, 0, 200, 60, 0, 0, 0, 0);
+ hwnd = CreateWindowExA(0, "RichEdit20W", NULL, WS_POPUP|ES_MULTILINE,
+ 0, 0, 200, 60, 0, 0, 0, 0);
else
hwnd = CreateWindowExA(0, "RichEdit20A", NULL, WS_POPUP|ES_MULTILINE,
0, 0, 200, 60, 0, 0, 0, 0);
{
skip("Cannot test with unicode richedit window\n");
return;
- }
+}
hwnd = CreateWindowW(RICHEDIT_CLASS20W, NULL,
ES_MULTILINE|WS_POPUP|WS_HSCROLL|WS_VSCROLL|WS_VISIBLE,
{
HWND hwnd;
UINT res, expected;
- MSG msg;
+ MSG msg;
expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL|DLGC_WANTMESSAGE;
*/
if (getenv( "WINETEST_RICHED20" )) {
keep_responsive(30);
- }
+ }
OleFlushClipboard();
ok(FreeLibrary(hmoduleRichEdit) != 0, "error: %d\n", (int) GetLastError());
const struct test winetest_testlist[] =
{
- { "editor", func_editor },
+ { "editor", func_editor },
{ "txtsrv", func_txtsrv },
{ 0, 0 }
};
ok(!strncmp(dest + expected_bytes_written, origdest
+ expected_bytes_written, nBuf - expected_bytes_written),
"%d: expected_bytes_written=%d\n", i, expected_bytes_written);
- }
- }
+ }
+ }
DestroyWindow(hwndRichEdit);
}
for (i = 0; i < sizeof(offset_test)/sizeof(offset_test[0]); i++) {
result = SendMessage(hwndRichEdit, EM_LINELENGTH, offset_test[i][0], 0);
ok(result == offset_test[i][1], "Length of line at offset %d is %ld, expected %d\n",
- offset_test[i][0], result, offset_test[i][1]);
+ offset_test[i][0], result, offset_test[i][1]);
}
DestroyWindow(hwndRichEdit);
int i;
for (i = 0; i < num_tests; i++) {
- check_EM_FINDTEXT(hwnd, name, &find[i], i);
- check_EM_FINDTEXTEX(hwnd, name, &find[i], i);
- }
-}
+ check_EM_FINDTEXT(hwnd, name, &find[i], i);
+ check_EM_FINDTEXTEX(hwnd, name, &find[i], i);
+ }
+ }
static void test_EM_FINDTEXT(void)
{
# ifdef TYPE_ALIGNMENT
# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align);
-# else
+#else
# define TEST_TYPE_ALIGN(type, align)
-# endif
+#endif
# ifdef _TYPE_ALIGNMENT
# define TEST_TARGET_ALIGN(type, align) C_ASSERT(_TYPE_ALIGNMENT(*(type)0) == align);
# define TEST_FIELD_ALIGN(type, field, align) C_ASSERT(_TYPE_ALIGNMENT(((type*)0)->field) == align);
-# else
+#else
# define TEST_TARGET_ALIGN(type, align)
# define TEST_FIELD_ALIGN(type, field, align)
-# endif
+#endif
# define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset);
}
else
{
- ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %d\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen);
- ok(!memcmp(StubMsg.BufferStart, wiredata, wiredatalen), "%s: incorrectly marshaled\n", msgpfx);
+ ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %d\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen);
+ ok(!memcmp(StubMsg.BufferStart, wiredata, wiredatalen), "%s: incorrectly marshaled\n", msgpfx);
}
StubMsg.Buffer = StubMsg.BufferStart;
/* again pass address of NULL ptr, but pretend we're a server */
if (0) /* crashes on Win9x and NT4 */
{
- mem = NULL;
- StubMsg.Buffer = StubMsg.BufferStart;
- StubMsg.IsClient = 0;
- ptr = NdrPointerUnmarshall( &StubMsg, &mem, formattypes, 0 );
- ok(ptr == NULL, "%s: ret %p\n", msgpfx, ptr);
- if (formattypes[2] == 0xd /* FC_ENUM16 */)
- ok(mem != StubMsg.BufferStart + wiredatalen - srcsize, "%s: mem points to buffer %p %p\n", msgpfx, mem, StubMsg.BufferStart);
- else
- ok(mem == StubMsg.BufferStart + wiredatalen - srcsize, "%s: mem doesn't point to buffer %p %p\n", msgpfx, mem, StubMsg.BufferStart);
- ok(!cmp(mem, memsrc, size), "%s: incorrectly unmarshaled\n", msgpfx);
- ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %d\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen);
- ok(StubMsg.MemorySize == 0, "%s: memorysize %d\n", msgpfx, StubMsg.MemorySize);
- if (formattypes[2] != 0xd /* FC_ENUM16 */) {
- ok(my_alloc_called == num_additional_allocs, "%s: my_alloc got called %d times\n", msgpfx, my_alloc_called);
- my_alloc_called = 0;
- }
+ mem = NULL;
+ StubMsg.Buffer = StubMsg.BufferStart;
+ StubMsg.IsClient = 0;
+ ptr = NdrPointerUnmarshall( &StubMsg, &mem, formattypes, 0 );
+ ok(ptr == NULL, "%s: ret %p\n", msgpfx, ptr);
+ if (formattypes[2] == 0xd /* FC_ENUM16 */)
+ ok(mem != StubMsg.BufferStart + wiredatalen - srcsize, "%s: mem points to buffer %p %p\n", msgpfx, mem, StubMsg.BufferStart);
+ else
+ ok(mem == StubMsg.BufferStart + wiredatalen - srcsize, "%s: mem doesn't point to buffer %p %p\n", msgpfx, mem, StubMsg.BufferStart);
+ ok(!cmp(mem, memsrc, size), "%s: incorrectly unmarshaled\n", msgpfx);
+ ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %d\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen);
+ ok(StubMsg.MemorySize == 0, "%s: memorysize %d\n", msgpfx, StubMsg.MemorySize);
+ if (formattypes[2] != 0xd /* FC_ENUM16 */) {
+ ok(my_alloc_called == num_additional_allocs, "%s: my_alloc got called %d times\n", msgpfx, my_alloc_called);
+ my_alloc_called = 0;
}
}
+ }
HeapFree(GetProcessHeap(), 0, mem_orig);
HeapFree(GetProcessHeap(), 0, StubMsg.BufferStart);
}
if (0) /* crashes on Win9x and NT4 */
{
- mem = NULL;
- StubMsg.IsClient = 0;
- StubMsg.Buffer = StubMsg.BufferStart;
+ mem = NULL;
+ StubMsg.IsClient = 0;
+ StubMsg.Buffer = StubMsg.BufferStart;
ptr = NdrSimpleStructUnmarshall( &StubMsg, &mem, formattypes, FALSE );
- ok(ptr == NULL, "%s: ret %p\n", msgpfx, ptr);
- ok(mem == StubMsg.BufferStart, "%s: mem not equal buffer\n", msgpfx);
- ok(!cmp(mem, memsrc, srcsize), "%s: incorrectly unmarshaled\n", msgpfx);
- ok(my_alloc_called == num_additional_allocs, "%s: my_alloc got called %d times\n", msgpfx, my_alloc_called);
- my_alloc_called = 0;
- ok(StubMsg.MemorySize == 0, "%s: memorysize touched in unmarshal\n", msgpfx);
+ ok(ptr == NULL, "%s: ret %p\n", msgpfx, ptr);
+ ok(mem == StubMsg.BufferStart, "%s: mem not equal buffer\n", msgpfx);
+ ok(!cmp(mem, memsrc, srcsize), "%s: incorrectly unmarshaled\n", msgpfx);
+ ok(my_alloc_called == num_additional_allocs, "%s: my_alloc got called %d times\n", msgpfx, my_alloc_called);
+ my_alloc_called = 0;
+ ok(StubMsg.MemorySize == 0, "%s: memorysize touched in unmarshal\n", msgpfx);
}
/*** now must_alloc is true ***/
else
*(unsigned int *)wiredata = (UINT_PTR)&ps1;
test_pointer_marshal(fmtstr_pointer_struct, &ps1, 17, wiredata, 21, ps1_cmp, 2, "pointer_struct");
-}
+ }
static void test_fullpointer_xlat(void)
{
}
}
else win_skip("v1 mem list format\n");
- }
+ }
/* NdrFree isn't exported so we can't test free'ing */
}
if (!old_windows_version)
{
- name.size = 10;
- name.name = buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, name.size);
- get_name(&name);
- ok(name.name == buffer, "[in,out] pointer should have stayed as %p but instead changed to %p\n", name.name, buffer);
- ok(!strcmp(name.name, "Jeremy Wh"), "name didn't unmarshall properly, expected \"Jeremy Wh\", but got \"%s\"\n", name.name);
- HeapFree(GetProcessHeap(), 0, name.name);
+ name.size = 10;
+ name.name = buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, name.size);
+ get_name(&name);
+ ok(name.name == buffer, "[in,out] pointer should have stayed as %p but instead changed to %p\n", name.name, buffer);
+ ok(!strcmp(name.name, "Jeremy Wh"), "name didn't unmarshall properly, expected \"Jeremy Wh\", but got \"%s\"\n", name.name);
+ HeapFree(GetProcessHeap(), 0, name.name);
}
pa2 = a;
if (!old_windows_version)
{
const char str1[25] = "Hello";
- ok(cstr_length(str1, sizeof str1) == strlen(str1), "RPC cstr_length\n");
+ ok(cstr_length(str1, sizeof str1) == strlen(str1), "RPC cstr_length\n");
}
ok(sum_fixed_int_3d(m) == 4116, "RPC sum_fixed_int_3d\n");
* forever, so don't bother calling it in this case */
if (ret == WAIT_OBJECT_0)
{
- status = RpcMgmtWaitServerListen();
- todo_wine {
+ status = RpcMgmtWaitServerListen();
+ todo_wine {
ok(status == RPC_S_OK, "RpcMgmtWaitServerListening failed with status %d\n", status);
- }
}
}
+}
START_TEST(server)
{
if (ret == ERROR_ACCESS_DENIED)
{
/* Windows 2000 can't handle KEY_WOW64_64KEY */
- RegOpenKeyA(HKEY_LOCAL_MACHINE, szCryptography, &hkey);
+ RegOpenKeyA(HKEY_LOCAL_MACHINE, szCryptography, &hkey);
}
RegQueryValueExA(hkey, szMachineGuid, NULL, NULL, (LPBYTE)guid, &size);
RegCloseKey(hkey);
trace(szTemp);
}
for (j=0; i<dwLen; j++,i++) {
- sprintf(szTemp+6*j, "0x%02x,\n", pbData[i]);
+ sprintf(szTemp+6*j, "0x%02x, \n", pbData[i]);
}
trace(szTemp);
}
dwLen = 13;
result = CryptEncrypt(hKey, 0, TRUE, 0, pbData, &dwLen, 16);
ok(result, "%08x\n", GetLastError());
-
+
ok(!memcmp(pbData, des3, sizeof(des3)), "3DES encryption failed!\n");
-
+
result = CryptDecrypt(hKey, 0, TRUE, 0, pbData, &dwLen);
ok(result, "%08x\n", GetLastError());
ok(dataLen == sizeof(test_string), "unexpected size %d\n", dataLen);
ok(!memcmp(data, test_string, sizeof(test_string)), "unexpected value\n");
}
- CryptDestroyKey(keyExchangeKey);
CryptReleaseContext(prov, 0);
CryptAcquireContext(&prov, szContainer, NULL, PROV_RSA_FULL,
ok(result, "CryptAcquireContext failed: %08x\n", GetLastError());
result = CryptGenKey(prov, CALG_RSA_SIGN, 0, &key);
ok(result, "CryptGenKey with CALG_RSA_SIGN failed with error %08x\n", GetLastError());
- CryptDestroyKey(key);
result = CryptGetUserKey(prov, AT_KEYEXCHANGE, &key);
ok(!result, "expected CryptGetUserKey to fail\n");
result = CryptGetUserKey(prov, AT_SIGNATURE, &key);
ok(result, "CryptAcquireContext failed: %08x\n", GetLastError());
result = CryptGenKey(prov, CALG_RSA_KEYX, 0, &key);
ok(result, "CryptGenKey with CALG_RSA_KEYX failed with error %08x\n", GetLastError());
- CryptDestroyKey(key);
result = CryptGetUserKey(prov, AT_KEYEXCHANGE, &key);
ok(result, "CryptGetUserKey with AT_KEYEXCHANGE failed: %08x\n", GetLastError());
- CryptDestroyKey(key);
result = CryptGetUserKey(prov, AT_SIGNATURE, &key);
ok(!result, "expected CryptGetUserKey to fail\n");
+ CryptDestroyKey(key);
CryptReleaseContext(prov, 0);
CryptAcquireContext(&prov, szContainer, NULL, PROV_RSA_FULL,
ret = pSetupDiInstallClassA(NULL, tmpfile, 0, NULL);
ok(ret, "SetupDiInstallClassA failed: %08x\n", GetLastError());
- ok(!RegDeleteKeyW(HKEY_LOCAL_MACHINE, classKey),
+ ok(!RegDeleteKeyW(HKEY_LOCAL_MACHINE, classKey),
"Couldn't delete classkey\n");
DeleteFile(tmpfile);
ret = remove_device();
ok(ret, "Expected a device to be removed\n");
- }
+}
}
else
{
trace("We are most likely on Wine\n");
devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, bogus);
devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, devclass);
- }
+ }
else
{
clean_devclass_key();
- }
+}
}
}
GetLastError());
ok(!lstrcmpiA(path, detail->DevicePath) ||
!lstrcmpiA(path_w2k, detail->DevicePath), "Unexpected path %s\n",
- detail->DevicePath);
+ detail->DevicePath);
/* Check SetupDiGetDeviceInterfaceDetailW */
- ret = pSetupDiGetDeviceInterfaceDetailW(set, &interfaceData, NULL, 0, &size, NULL);
+ ret = pSetupDiGetDeviceInterfaceDetailW(set, &interfaceData, NULL, 0, &size, NULL);
ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER,
"Expected ERROR_INSUFFICIENT_BUFFER, got error code: %d\n", GetLastError());
ok(expectedsize == size ||
trace("We are most likely on Wine\n");
devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, bogus);
devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, devclass);
- }
+ }
else
{
clean_devclass_key();
- }
+}
}
}
if (key != INVALID_HANDLE_VALUE)
{
classKeyCreated = TRUE;
- RegCloseKey(key);
+ RegCloseKey(key);
/* The class key should have been created */
ok(!RegOpenKeyW(HKEY_LOCAL_MACHINE, classKey, &key),
"Expected registry key to exist\n");
RegCloseKey(key);
- SetLastError(0xdeadbeef);
- key = pSetupDiOpenDevRegKey(set, &devInfo, DICS_FLAG_GLOBAL, 0,
- DIREG_DRV, 0);
- todo_wine
- ok(key == INVALID_HANDLE_VALUE &&
+ SetLastError(0xdeadbeef);
+ key = pSetupDiOpenDevRegKey(set, &devInfo, DICS_FLAG_GLOBAL, 0,
+ DIREG_DRV, 0);
+ todo_wine
+ ok(key == INVALID_HANDLE_VALUE &&
(GetLastError() == ERROR_INVALID_DATA ||
GetLastError() == ERROR_ACCESS_DENIED), /* win2k3 */
"Expected ERROR_INVALID_DATA or ERROR_ACCESS_DENIED, got %08x\n", GetLastError());
- key = pSetupDiOpenDevRegKey(set, &devInfo, DICS_FLAG_GLOBAL, 0,
- DIREG_DRV, KEY_READ);
- ok(key != INVALID_HANDLE_VALUE, "SetupDiOpenDevRegKey failed: %08x\n",
- GetLastError());
- pSetupDiDestroyDeviceInfoList(set);
- }
+ key = pSetupDiOpenDevRegKey(set, &devInfo, DICS_FLAG_GLOBAL, 0,
+ DIREG_DRV, KEY_READ);
+ ok(key != INVALID_HANDLE_VALUE, "SetupDiOpenDevRegKey failed: %08x\n",
+ GetLastError());
+ pSetupDiDestroyDeviceInfoList(set);
+ }
else
classKeyCreated = FALSE;
/* Wine doesn't delete the information currently */
trace("We are most likely on Wine\n");
devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, bogus);
- devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, classKey);
- }
+ devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, classKey);
+}
else if (classKeyCreated)
{
/* There should only be a class key entry, so a simple
todo_wine
ok(!lstrcmpiA(path, detail->DevicePath) ||
!lstrcmpiA(path_w2k, detail->DevicePath), "Unexpected path %s\n",
- detail->DevicePath);
+ detail->DevicePath);
HeapFree(GetProcessHeap(), 0, detail);
}
}
trace("We are most likely on Wine\n");
devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, bogus);
devinst_RegDeleteTreeW(HKEY_LOCAL_MACHINE, devclass);
- }
+}
else
{
clean_devclass_key();
/* Wine doesn't delete the information currently */
trace("We are most likely on Wine\n");
RegDeleteKeyA(HKEY_LOCAL_MACHINE, bogus);
- }
+}
}
static void testDeviceRegistryPropertyW(void)
/* Wine doesn't delete the information currently */
trace("We are most likely on Wine\n");
RegDeleteKeyW(HKEY_LOCAL_MACHINE, bogus);
- }
+}
}
START_TEST(devinst)
{
HDEVINFO set;
- init_function_pointers();
+ init_function_pointers();
/* Win9x/WinMe does things totally different so we skip all the tests
*
#include "wine/test.h"
static const char inffile[] = "test.inf";
-static const WCHAR inffileW[] = {'t','e','s','t','.','i','n','f',0};
static char CURR_DIR[MAX_PATH];
/* Notes on InstallHinfSectionA/W:
static void (WINAPI *pInstallHinfSectionA)(HWND, HINSTANCE, LPCSTR, INT);
static void (WINAPI *pInstallHinfSectionW)(HWND, HINSTANCE, LPCWSTR, INT);
-static BOOL (WINAPI *pSetupGetInfFileListW)(PCWSTR, DWORD, PWSTR, DWORD, PDWORD);
/*
* Helpers
DeleteFile(inffile);
}
-static void test_inffilelist(void)
-{
- static const char inffile2[] = "test2.inf";
- static const WCHAR inffile2W[] = {'t','e','s','t','2','.','i','n','f',0};
- static const char invalid_inf[] = "invalid.inf";
- static const WCHAR invalid_infW[] = {'i','n','v','a','l','i','d','.','i','n','f',0};
- static const char *inf =
- "[Version]\n"
- "Signature=\"$Chicago$\"";
- static const char *inf2 =
- "[Version]\n"
- "Signature=\"$CHICAGO$\"";
- static const char *infNT =
- "[Version]\n"
- "Signature=\"$WINDOWS NT$\"";
-
- WCHAR *p, *ptr;
- char dirA[MAX_PATH];
- WCHAR dir[MAX_PATH] = { 0 };
- WCHAR buffer[MAX_PATH] = { 0 };
- DWORD expected, outsize;
- BOOL ret;
-
- if(!pSetupGetInfFileListW)
- {
- win_skip("SetupGetInfFileListW not present\n");
- return;
- }
-
- /* NULL means %windir%\\inf
- * get the value as reference
- */
- expected = 0;
- SetLastError(0xdeadbeef);
- ret = pSetupGetInfFileListW(NULL, INF_STYLE_WIN4, NULL, 0, &expected);
- if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
- {
- win_skip("SetupGetInfFileListW not implemented\n");
- return;
- }
- ok(ret, "expected SetupGetInfFileListW to succeed! Error: %d\n", GetLastError());
- ok(expected > 0, "expected required buffersize to be at least 1\n");
-
- /* check if an empty string doesn't behaves like NULL */
- outsize = 0;
- SetLastError(0xdeadbeef);
- ret = pSetupGetInfFileListW(dir, INF_STYLE_WIN4, NULL, 0, &outsize);
- ok(!ret, "expected SetupGetInfFileListW to fail!\n");
-
- /* create a private directory, the temp directory may contain some
- * inf files left over from old installations
- */
- if (!GetTempFileNameA(CURR_DIR, "inftest", 1, dirA))
- {
- win_skip("GetTempFileNameA failed with error %d\n", GetLastError());
- return;
- }
- if (!CreateDirectoryA(dirA, NULL ))
- {
- win_skip("CreateDirectoryA(%s) failed with error %d\n", dirA, GetLastError());
- return;
- }
- if (!SetCurrentDirectoryA(dirA))
- {
- win_skip("SetCurrentDirectoryA failed with error %d\n", GetLastError());
- RemoveDirectoryA(dirA);
- return;
- }
-
- MultiByteToWideChar(CP_ACP, 0, dirA, -1, dir, MAX_PATH);
- /* check a not existing directory
- */
- ptr = dir + lstrlenW(dir);
- MultiByteToWideChar(CP_ACP, 0, "\\not_existent", -1, ptr, MAX_PATH - lstrlenW(dir));
- outsize = 0xffffffff;
- SetLastError(0xdeadbeef);
- ret = pSetupGetInfFileListW(dir, INF_STYLE_WIN4, NULL, 0, &outsize);
- ok(ret, "expected SetupGetInfFileListW to succeed!\n");
- ok(outsize == 1, "expected required buffersize to be 1, got %d\n", outsize);
- ok(ERROR_PATH_NOT_FOUND == GetLastError(),
- "expected error ERROR_PATH_NOT_FOUND, got %d\n", GetLastError());
-
- create_inf_file(inffile, inf);
- create_inf_file(inffile2, inf);
- create_inf_file(invalid_inf, "This content does not match the inf file format");
-
- /* pass a filename instead of a directory
- */
- *ptr = '\\';
- MultiByteToWideChar(CP_ACP, 0, invalid_inf, -1, ptr+1, MAX_PATH - lstrlenW(dir));
- outsize = 0xffffffff;
- SetLastError(0xdeadbeef);
- ret = pSetupGetInfFileListW(dir, INF_STYLE_WIN4, NULL, 0, &outsize);
- ok(!ret, "expected SetupGetInfFileListW to fail!\n");
- ok(ERROR_DIRECTORY == GetLastError(),
- "expected error ERROR_DIRECTORY, got %d\n", GetLastError());
-
- /* make the filename look like directory
- */
- dir[1 + lstrlenW(dir)] = 0;
- dir[lstrlenW(dir)] = '\\';
- SetLastError(0xdeadbeef);
- ret = pSetupGetInfFileListW(dir, INF_STYLE_WIN4, NULL, 0, &outsize);
- ok(!ret, "expected SetupGetInfFileListW to fail!\n");
- ok(ERROR_DIRECTORY == GetLastError(),
- "expected error ERROR_DIRECTORY, got %d\n", GetLastError());
-
- /* now check the buffer content of a vaild call
- */
- *ptr = 0;
- expected = 3 + strlen(inffile) + strlen(inffile2);
- ret = pSetupGetInfFileListW(dir, INF_STYLE_WIN4, buffer, MAX_PATH, &outsize);
- ok(ret, "expected SetupGetInfFileListW to succeed!\n");
- ok(expected == outsize, "expected required buffersize to be %d, got %d\n",
- expected, outsize);
- for(p = buffer; lstrlenW(p) && (outsize > (p - buffer)); p+=lstrlenW(p) + 1)
- ok(!lstrcmpW(p,inffile2W) || !lstrcmpW(p,inffileW),
- "unexpected filename %s\n",wine_dbgstr_w(p));
-
- /* upper case value
- */
- create_inf_file(inffile2, inf2);
- ret = pSetupGetInfFileListW(dir, INF_STYLE_WIN4, buffer, MAX_PATH, &outsize);
- ok(ret, "expected SetupGetInfFileListW to succeed!\n");
- ok(expected == outsize, "expected required buffersize to be %d, got %d\n",
- expected, outsize);
- for(p = buffer; lstrlenW(p) && (outsize > (p - buffer)); p+=lstrlenW(p) + 1)
- ok(!lstrcmpW(p,inffile2W) || !lstrcmpW(p,inffileW),
- "unexpected filename %s\n",wine_dbgstr_w(p));
-
- /* signature Windows NT is also inf style win4
- */
- create_inf_file(inffile2, infNT);
- expected = 3 + strlen(inffile) + strlen(inffile2);
- ret = pSetupGetInfFileListW(dir, INF_STYLE_WIN4, buffer, MAX_PATH, &outsize);
- ok(ret, "expected SetupGetInfFileListW to succeed!\n");
- ok(expected == outsize, "expected required buffersize to be %d, got %d\n",
- expected, outsize);
- for(p = buffer; lstrlenW(p) && (outsize > (p - buffer)); p+=lstrlenW(p) + 1)
- ok(!lstrcmpW(p,inffile2W) || !lstrcmpW(p,inffileW),
- "unexpected filename %s\n",wine_dbgstr_w(p));
-
- /* old style
- */
- expected = 2 + strlen(invalid_inf);
- ret = pSetupGetInfFileListW(dir, INF_STYLE_OLDNT, buffer, MAX_PATH, &outsize);
- ok(ret, "expected SetupGetInfFileListW to succeed!\n");
- ok(expected == outsize, "expected required buffersize to be %d, got %d\n",
- expected, outsize);
- for(p = buffer; lstrlenW(p) && (outsize > (p - buffer)); p+=lstrlenW(p) + 1)
- ok(!lstrcmpW(p,invalid_infW), "unexpected filename %s\n",wine_dbgstr_w(p));
-
- /* mixed style
- */
- expected = 4 + strlen(inffile) + strlen(inffile2) + strlen(invalid_inf);
- ret = pSetupGetInfFileListW(dir, INF_STYLE_OLDNT | INF_STYLE_WIN4, buffer,
- MAX_PATH, &outsize);
- ok(ret, "expected SetupGetInfFileListW to succeed!\n");
- ok(expected == outsize, "expected required buffersize to be %d, got %d\n",
- expected, outsize);
- for(p = buffer; lstrlenW(p) && (outsize > (p - buffer)); p+=lstrlenW(p) + 1)
- ok(!lstrcmpW(p,inffile2W) || !lstrcmpW(p,inffileW) || !lstrcmpW(p,invalid_infW),
- "unexpected filename %s\n",wine_dbgstr_w(p));
-
- DeleteFile(inffile);
- DeleteFile(inffile2);
- DeleteFile(invalid_inf);
- SetCurrentDirectoryA(CURR_DIR);
- RemoveDirectoryA(dirA);
-}
-
START_TEST(install)
{
HMODULE hsetupapi = GetModuleHandle("setupapi.dll");
pInstallHinfSectionA = (void *)GetProcAddress(hsetupapi, "InstallHinfSectionA");
pInstallHinfSectionW = (void *)GetProcAddress(hsetupapi, "InstallHinfSectionW");
- pSetupGetInfFileListW = (void *)GetProcAddress(hsetupapi, "SetupGetInfFileListW");
-
if (pInstallHinfSectionA)
{
/* Check if pInstallHinfSectionA sets last error or is a stub (as on WinXP) */
test_profile_items();
}
- test_inffilelist();
-
SetCurrentDirectory(prev_path);
}
static BOOL (WINAPI *pSetupGetFileCompressionInfoExA)(PCSTR, PSTR, DWORD, PDWORD, PDWORD, PDWORD, PUINT);
static BOOL (WINAPI *pSetupCopyOEMInfA)(PCSTR, PCSTR, DWORD, DWORD, PSTR, DWORD, PDWORD, PSTR *);
static BOOL (WINAPI *pSetupQueryInfOriginalFileInformationA)(PSP_INF_INFORMATION, UINT, PSP_ALTPLATFORM_INFO, PSP_ORIGINAL_FILE_INFO_A);
-static BOOL (WINAPI *pSetupUninstallOEMInfA)(PCSTR, DWORD, PVOID);
static void create_inf_file(LPCSTR filename)
{
/* try a relative SourceInfFileName */
SetLastError(0xdeadbeef);
res = pSetupCopyOEMInfA(tmpfile, NULL, 0, SP_COPY_NOOVERWRITE, NULL, 0, NULL, NULL);
- ok(res == FALSE ||
- broken(res == TRUE), /* Win98 */
- "Expected FALSE, got %d\n", res);
- if (GetLastError() == ERROR_WRONG_INF_TYPE || GetLastError() == ERROR_UNSUPPORTED_TYPE /* Win7 */)
+ ok(res == FALSE, "Expected FALSE, got %d\n", res);
+ if (GetLastError() == ERROR_WRONG_INF_TYPE)
{
/* FIXME:
* Vista needs a [Manufacturer] entry in the inf file. Doing this will give some
* popups during the installation though as it also needs a catalog file (signed?).
*/
- win_skip("Needs a different inf file on Vista+\n");
+ win_skip("Needs a different inf file on Vista/W2K8\n");
DeleteFile(tmpfile);
return;
}
ok(GetLastError() == ERROR_FILE_NOT_FOUND ||
- broken(GetLastError() == ERROR_SUCCESS), /* Win98 */
- "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError());
+ GetLastError() == ERROR_FILE_EXISTS, /* Win98 */
+ "Expected ERROR_FILE_NOT_FOUND or ERROR_FILE_EXISTS, got %d\n", GetLastError());
ok(file_exists(tmpfile), "Expected tmpfile to exist\n");
/* try SP_COPY_REPLACEONLY, dest does not exist */
ok(res == TRUE, "Expected TRUE, got %d\n", res);
ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError());
ok(!file_exists(path), "Expected source inf to not exist\n");
-
- if (pSetupUninstallOEMInfA)
- {
- char *destfile = strrchr(dest, '\\') + 1;
-
- SetLastError(0xdeadbeef);
- ok(pSetupUninstallOEMInfA(destfile, 0, NULL), "Failed to uninstall '%s' : %d\n", destfile, GetLastError());
- }
- else
- {
- /* Win9x/WinMe */
- SetLastError(0xdeadbeef);
- ok(DeleteFileA(dest), "Failed to delete file '%s' : %d\n", dest, GetLastError());
-
- /* On WinMe we also need to remove the .pnf file */
- *(strrchr(dest, '.') + 1) = 'p';
- DeleteFileA(dest);
- }
}
static void create_source_file(LPSTR filename, const BYTE *data, DWORD size)
DeleteFileA(source);
}
-static void test_SetupUninstallOEMInf(void)
-{
- BOOL ret;
-
- SetLastError(0xdeadbeef);
- ret = pSetupUninstallOEMInfA(NULL, 0, NULL);
- ok(!ret, "Expected failure\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError());
-
- SetLastError(0xdeadbeef);
- ret = pSetupUninstallOEMInfA("", 0, NULL);
- todo_wine
- {
- ok(!ret, "Expected failure\n");
- ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError());
- }
-
- SetLastError(0xdeadbeef);
- ret = pSetupUninstallOEMInfA("nonexistent.inf", 0, NULL);
- todo_wine
- {
- ok(!ret, "Expected failure\n");
- ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError());
- }
-}
-
START_TEST(misc)
{
HMODULE hsetupapi = GetModuleHandle("setupapi.dll");
pSetupGetFileCompressionInfoExA = (void*)GetProcAddress(hsetupapi, "SetupGetFileCompressionInfoExA");
pSetupCopyOEMInfA = (void*)GetProcAddress(hsetupapi, "SetupCopyOEMInfA");
pSetupQueryInfOriginalFileInformationA = (void*)GetProcAddress(hsetupapi, "SetupQueryInfOriginalFileInformationA");
- pSetupUninstallOEMInfA = (void*)GetProcAddress(hsetupapi, "SetupUninstallOEMInfA");
GetCurrentDirectoryA(MAX_PATH, CURR_DIR);
win_skip("SetupGetFileCompressionInfoExA is not available\n");
test_SetupDecompressOrCopyFile();
-
- if (pSetupUninstallOEMInfA)
- test_SetupUninstallOEMInf();
- else
- win_skip("SetupUninstallOEMInfA is not available\n");
}
/* function pointers */
static HMODULE hSetupAPI;
-static LPCSTR (WINAPI *pSetupGetFieldA)(PINFCONTEXT,DWORD);
-static LPCWSTR (WINAPI *pSetupGetFieldW)(PINFCONTEXT,DWORD);
+static LPCWSTR (WINAPI *pSetupGetField)(PINFCONTEXT,DWORD);
static BOOL (WINAPI *pSetupEnumInfSectionsA)( HINF hinf, UINT index, PSTR buffer, DWORD size, UINT *need );
static void init_function_pointers(void)
{
hSetupAPI = GetModuleHandleA("setupapi.dll");
- /* Nice, pSetupGetField is either A or W depending on the Windows version! The actual test
- * takes care of this difference */
- pSetupGetFieldA = (void *)GetProcAddress(hSetupAPI, "pSetupGetField");
- pSetupGetFieldW = (void *)GetProcAddress(hSetupAPI, "pSetupGetField");
+ pSetupGetField = (void *)GetProcAddress(hSetupAPI, "pSetupGetField");
pSetupEnumInfSectionsA = (void *)GetProcAddress(hSetupAPI, "SetupEnumInfSectionsA" );
}
{ ";\n;\nabc\r\n" STD_HEADER, ERROR_EXPECTED_SECTION_NAME, 3, 0 },
{ ";\n;\nab\nab\n" STD_HEADER, ERROR_EXPECTED_SECTION_NAME, 3, 0 },
{ ";aa\n;bb\n" STD_HEADER, 0, 0, 0 },
- { STD_HEADER " [TestSection\x00]\n", ERROR_BAD_SECTION_NAME_LINE, 3, 0 },
- { STD_HEADER " [Test\x00Section]\n", ERROR_BAD_SECTION_NAME_LINE, 3, 0 },
- { STD_HEADER " [TestSection\x00]\n", ERROR_BAD_SECTION_NAME_LINE, 3, 0 },
- { STD_HEADER " [Test\x00Section]\n", ERROR_BAD_SECTION_NAME_LINE, 3, 0 },
+ { STD_HEADER " [TestSection\x00] \n", ERROR_BAD_SECTION_NAME_LINE, 3, 0 },
+ { STD_HEADER " [Test\x00Section] \n", ERROR_BAD_SECTION_NAME_LINE, 3, 0 },
+ { STD_HEADER " [TestSection\x00] \n", ERROR_BAD_SECTION_NAME_LINE, 3, 0 },
+ { STD_HEADER " [Test\x00Section] \n", ERROR_BAD_SECTION_NAME_LINE, 3, 0 },
};
static void test_invalid_files(void)
"line %u: bad field %s/%s\n",
i, field, key_names[i].fields[index] );
else
- ok( !strcmp( field, key_names[i].fields[index] ), "line %u: bad field %s/%s\n",
- i, field, key_names[i].fields[index] );
+ ok( !strcmp( field, key_names[i].fields[index] ), "line %u: bad field %s/%s\n",
+ i, field, key_names[i].fields[index] );
}
else
ok( 0, "line %u: got extra field %s\n", i, field );
"[Strings]\n"
"RTMQFE_NAME = \"RTMQFE\"\n";
-static const CHAR getfield_resA[][20] =
-{
- "RTMQFE",
- "%RTMGFE_NAME%",
- "SP1RTM",
-};
-
-static const WCHAR getfield_resW[][20] =
+static const WCHAR getfield_res[][20] =
{
{'R','T','M','Q','F','E',0},
{'%','R','T','M','G','F','E','_','N','A','M','E','%',0},
UINT err;
BOOL ret;
HINF hinf;
- LPCSTR fieldA;
- LPCWSTR fieldW;
+ LPCWSTR field;
INFCONTEXT context;
int i;
int len;
- BOOL unicode = TRUE;
-
- SetLastError(0xdeadbeef);
- lstrcmpW(NULL, NULL);
- if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
- {
- win_skip("Using A-functions instead of W\n");
- unicode = FALSE;
- }
hinf = test_file_contents( contents, &err );
ok( hinf != NULL, "Expected valid INF file\n" );
for ( i = 0; i < 3; i++ )
{
- if (unicode)
- {
- fieldW = pSetupGetFieldW( &context, i );
- ok( fieldW != NULL, "Failed to get field %i\n", i );
- ok( !lstrcmpW( getfield_resW[i], fieldW ), "Wrong string returned\n" );
- }
- else
- {
- fieldA = pSetupGetFieldA( &context, i );
- ok( fieldA != NULL, "Failed to get field %i\n", i );
- ok( !lstrcmpA( getfield_resA[i], fieldA ), "Wrong string returned\n" );
- }
+ field = pSetupGetField( &context, i );
+ ok( field != NULL, "Failed to get field %i\n", i );
+ ok( !lstrcmpW( getfield_res[i], field ), "Wrong string returned\n" );
}
- if (unicode)
- {
- fieldW = pSetupGetFieldW( &context, 3 );
- ok( fieldW != NULL, "Failed to get field 3\n" );
- len = lstrlenW( fieldW );
- ok( len == 511 || /* NT4, W2K, XP and W2K3 */
- len == 4096, /* Vista */
- "Unexpected length, got %d\n", len );
-
- fieldW = pSetupGetFieldW( &context, 4 );
- ok( fieldW == NULL, "Expected NULL, got %p\n", fieldW );
- ok( GetLastError() == ERROR_INVALID_PARAMETER,
- "Expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError() );
- }
- else
- {
- fieldA = pSetupGetFieldA( &context, 3 );
- ok( fieldA != NULL, "Failed to get field 3\n" );
- len = lstrlenA( fieldA );
- ok( len == 511, /* Win9x, WinME */
- "Unexpected length, got %d\n", len );
-
- fieldA = pSetupGetFieldA( &context, 4 );
- ok( fieldA == NULL, "Expected NULL, got %p\n", fieldA );
- ok( GetLastError() == ERROR_INVALID_PARAMETER,
- "Expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError() );
- }
+ field = pSetupGetField( &context, 3 );
+ ok( field != NULL, "Failed to get field 3\n" );
+ len = lstrlenW( field );
+ ok( len == 511 /* NT4, W2K, XP and W2K3 */ ||
+ len == 4096 /* Vista */ ||
+ len == 256 /* Win9x and WinME */,
+ "Unexpected length, got %d\n", len );
+
+ field = pSetupGetField( &context, 4 );
+ ok( field == NULL, "Expected NULL, got %p\n", field );
+ ok( GetLastError() == ERROR_INVALID_PARAMETER,
+ "Expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError() );
SetupCloseInfFile( hinf );
}
} keys[] =
{
/* key fields index expected int errorcode */
- { "Key", "48", 1, 48, ERROR_SUCCESS },
- { "Key", "48", 0, -1, ERROR_INVALID_DATA },
- { "123", "48", 0, 123, ERROR_SUCCESS },
- { "Key", "0x4", 1, 4, ERROR_SUCCESS },
- { "Key", "Field1", 1, -1, ERROR_INVALID_DATA },
- { "Key", "Field1,34", 2, 34, ERROR_SUCCESS },
- { "Key", "Field1,,Field3", 2, 0, ERROR_SUCCESS },
- { "Key", "Field1,", 2, 0, ERROR_SUCCESS }
+ { "Key=", "48", 1, 48, ERROR_SUCCESS },
+ { "Key=", "48", 0, -1, ERROR_INVALID_DATA },
+ { "123=", "48", 0, 123, ERROR_SUCCESS },
+ { "Key=", "0x4", 1, 4, ERROR_SUCCESS },
+ { "Key=", "Field1", 1, -1, ERROR_INVALID_DATA },
+ { "Key=", "Field1,34", 2, 34, ERROR_SUCCESS },
+ { "Key=", "Field1,,Field3", 2, 0, ERROR_SUCCESS },
+ { "Key=", "Field1,", 2, 0, ERROR_SUCCESS }
};
unsigned int i;
strcpy( buffer, STD_HEADER "[TestSection]\n" );
strcat( buffer, keys[i].key );
- strcat( buffer, "=" );
strcat( buffer, keys[i].fields );
hinf = test_file_contents( buffer, &err);
ok( hinf != NULL, "Expected valid INF file\n" );
- SetupFindFirstLineA( hinf, "TestSection", keys[i].key, &context );
+ SetupFindFirstLineA( hinf, "TestSection", "Key", &context );
SetLastError( 0xdeadbeef );
intfield = -1;
retb = SetupGetIntField( &context, keys[i].index, &intfield );
broken(GetLastError() == ERROR_FILE_NOT_FOUND) || /* win98 */
broken(GetLastError() == ERROR_PATH_NOT_FOUND) || /* NT4 */
broken(GetLastError() == ERROR_INVALID_NAME) || /* win2k */
- broken(GetLastError() == ERROR_GENERAL_SYNTAX), /* another win2k / winMe */
+ broken(GetLastError() == ERROR_GENERAL_SYNTAX), /* another win2k */
"Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
ok(size == 0xdeadbeef, "Expected size to remain unchanged\n");
/* try an invalid inf filename */
- /* do not use NULL as absolute inf filename on win9x/winMe (crash) */
+ /* do not use NULL as absolute inf filename on win9x (crash) */
if ((GetLastError() != ERROR_BAD_PATHNAME) && /* win95 */
- (GetLastError() != ERROR_FILE_NOT_FOUND) && /* win98 */
- (GetLastError() != ERROR_GENERAL_SYNTAX)) /* winMe */
+ (GetLastError() != ERROR_FILE_NOT_FOUND)) /* win98 */
{
- size = 0xdeadbeef;
- SetLastError(0xbeefcafe);
- ret = SetupGetInfInformationA(NULL, INFINFO_INF_NAME_IS_ABSOLUTE, NULL, 0, &size);
- ok(ret == FALSE, "Expected SetupGetInfInformation to fail\n");
- ok(GetLastError() == ERROR_INVALID_PARAMETER,
- "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
- ok(size == 0xdeadbeef, "Expected size to remain unchanged\n");
+ size = 0xdeadbeef;
+ SetLastError(0xbeefcafe);
+ ret = SetupGetInfInformationA(NULL, INFINFO_INF_NAME_IS_ABSOLUTE, NULL, 0, &size);
+ ok(ret == FALSE, "Expected SetupGetInfInformation to fail\n");
+ ok(GetLastError() == ERROR_INVALID_PARAMETER,
+ "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
+ ok(size == 0xdeadbeef, "Expected size to remain unchanged\n");
}
create_inf_file(inf_filename, inf_data1, sizeof(inf_data1) - 1);
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
<module name="setupapi_winetest" type="win32cui" installbase="bin" installname="setupapi_winetest.exe" allowwarnings="true">
- <include base="setupapi_winetest">.</include>
+ <include base="setupapi_winetest">.</include>
<define name="__ROS_LONG64__" />
- <library>ntdll</library>
- <library>advapi32</library>
- <library>setupapi</library>
- <library>user32</library>
- <file>devclass.c</file>
- <file>devinst.c</file>
- <file>install.c</file>
- <file>misc.c</file>
- <file>parser.c</file>
- <file>query.c</file>
- <file>stringtable.c</file>
- <file>testlist.c</file>
+ <library>ntdll</library>
+ <library>advapi32</library>
+ <library>setupapi</library>
+ <library>user32</library>
+ <file>devclass.c</file>
+ <file>devinst.c</file>
+ <file>install.c</file>
+ <file>misc.c</file>
+ <file>parser.c</file>
+ <file>query.c</file>
+ <file>stringtable.c</file>
+ <file>testlist.c</file>
</module>
DWORD retval, hstring, hString, hfoo;
HANDLE table;
- table = pStringTableInitialize();
+ table=pStringTableInitialize();
ok(table != NULL, "failed to initialize string table\n");
/* case insensitive */
{
DWORD retval, retval2, hstring, hString, hfoo;
HANDLE table, table2;
-
+
table = pStringTableInitialize();
ok(table != NULL,"failed to initialize string table\n");
ok(retval!=retval2,"Lookup of string equals String in Table 1\n");
ok(retval==hString,
"Lookup for String (%x) does not match previous handle (%x) in String Table 1\n",
- retval, hString);
+ retval, hString);
pStringTableDestroy(table);
pStringTableDestroy(table2);
ok(!memcmp(buffer, &data, 4), "unexpected data\n");
pStringTableDestroy(table);
- pStringTableDestroy(table2);
}
static void test_StringTableStringFromId(void)
# ifdef TYPE_ALIGNMENT
# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align);
-# else
+#else
# define TEST_TYPE_ALIGN(type, align)
-# endif
+#endif
# ifdef _TYPE_ALIGNMENT
# define TEST_TARGET_ALIGN(type, align) C_ASSERT(_TYPE_ALIGNMENT(*(type)0) == align);
# define TEST_FIELD_ALIGN(type, field, align) C_ASSERT(_TYPE_ALIGNMENT(((type*)0)->field) == align);
-# else
+#else
# define TEST_TARGET_ALIGN(type, align)
# define TEST_FIELD_ALIGN(type, field, align)
-# endif
+#endif
# define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset);
+++ /dev/null
-/*
- * Unit test of the Program Manager DDE Interfaces
- *
- * Copyright 2009 Mikey Alexander
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-/* DDE Program Manager Tests
- * - Covers basic CreateGroup, ShowGroup, DeleteGroup, AddItem, and DeleteItem
- * functionality
- * - Todo: Handle CommonGroupFlag
- * Better AddItem Tests (Lots of parameters to test)
- * Tests for Invalid Characters in Names / Invalid Parameters
- */
-
-#include <stdio.h>
-#include <wine/test.h>
-#include <winbase.h>
-#include "dde.h"
-#include "ddeml.h"
-#include "winuser.h"
-#include "shlobj.h"
-
-/* Timeout on DdeClientTransaction Call */
-#define MS_TIMEOUT_VAL 1000
-/* # of times to poll for window creation */
-#define PDDE_POLL_NUM 150
-/* time to sleep between polls */
-#define PDDE_POLL_TIME 300
-
-/* Call Info */
-#define DDE_TEST_MISC 0x00010000
-#define DDE_TEST_CREATEGROUP 0x00020000
-#define DDE_TEST_DELETEGROUP 0x00030000
-#define DDE_TEST_SHOWGROUP 0x00040000
-#define DDE_TEST_ADDITEM 0x00050000
-#define DDE_TEST_DELETEITEM 0x00060000
-#define DDE_TEST_COMPOUND 0x00070000
-#define DDE_TEST_CALLMASK 0x00ff0000
-
-#define DDE_TEST_NUMMASK 0x0000ffff
-
-static HRESULT (WINAPI *pSHGetLocalizedName)(LPCWSTR, LPWSTR, UINT, int *);
-static BOOL (WINAPI *pSHGetSpecialFolderPathA)(HWND, LPSTR, int, BOOL);
-static BOOL (WINAPI *pReadCabinetState)(CABINETSTATE *, int);
-
-static void init_function_pointers(void)
-{
- HMODULE hmod;
-
- hmod = GetModuleHandleA("shell32.dll");
- pSHGetLocalizedName = (void*)GetProcAddress(hmod, "SHGetLocalizedName");
- pSHGetSpecialFolderPathA = (void*)GetProcAddress(hmod, "SHGetSpecialFolderPathA");
- pReadCabinetState = (void*)GetProcAddress(hmod, "ReadCabinetState");
- if (!pReadCabinetState)
- pReadCabinetState = (void*)GetProcAddress(hmod, (LPSTR)651);
-}
-
-static BOOL use_common(void)
-{
- HMODULE hmod;
- static BOOL (WINAPI *pIsNTAdmin)(DWORD, LPDWORD);
-
- /* IsNTAdmin() is available on all platforms. */
- hmod = LoadLibraryA("advpack.dll");
- pIsNTAdmin = (void*)GetProcAddress(hmod, "IsNTAdmin");
-
- if (!pIsNTAdmin(0, NULL))
- {
- /* We are definitely not an administrator */
- FreeLibrary(hmod);
- return FALSE;
- }
- FreeLibrary(hmod);
-
- /* If we end up here we are on NT4+ as Win9x and WinMe don't have the
- * notion of administrators (as we need it).
- */
-
- /* As of Vista we should always use the users directory. Tests with the
- * real Administrator account on Windows 7 proved this.
- *
- * FIXME: We need a better way of identifying Vista+ as currently this check
- * also covers Wine and we don't know yet which behavior we want to follow.
- */
- if (pSHGetLocalizedName)
- return FALSE;
-
- return TRUE;
-}
-
-static char ProgramsDir[MAX_PATH];
-
-static char Group1Title[MAX_PATH] = "Group1";
-static char Group2Title[MAX_PATH] = "Group2";
-static char Group3Title[MAX_PATH] = "Group3";
-static char StartupTitle[MAX_PATH] = "Startup";
-
-static void init_strings(void)
-{
- char startup[MAX_PATH];
- char commonprograms[MAX_PATH];
- char programs[MAX_PATH];
-
- CABINETSTATE cs;
-
- if (pSHGetSpecialFolderPathA)
- {
- pSHGetSpecialFolderPathA(NULL, programs, CSIDL_PROGRAMS, FALSE);
- pSHGetSpecialFolderPathA(NULL, commonprograms, CSIDL_COMMON_PROGRAMS, FALSE);
- pSHGetSpecialFolderPathA(NULL, startup, CSIDL_STARTUP, FALSE);
- }
- else
- {
- HKEY key;
- DWORD size;
- LONG res;
-
- /* Older Win9x and NT4 */
-
- RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", &key);
- size = sizeof(programs);
- RegQueryValueExA(key, "Programs", NULL, NULL, (LPBYTE)&programs, &size);
- size = sizeof(startup);
- RegQueryValueExA(key, "Startup", NULL, NULL, (LPBYTE)&startup, &size);
- RegCloseKey(key);
-
- RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", &key);
- size = sizeof(commonprograms);
- res = RegQueryValueExA(key, "Common Programs", NULL, NULL, (LPBYTE)&commonprograms, &size);
- RegCloseKey(key);
- }
-
- /* ProgramsDir on Vista+ is always the users one (CSIDL_PROGRAMS). Before Vista
- * it depends on whether the user is an administrator (CSIDL_COMMON_PROGRAMS) or
- * not (CSIDL_PROGRAMS).
- */
- if (use_common())
- lstrcpyA(ProgramsDir, commonprograms);
- else
- lstrcpyA(ProgramsDir, programs);
-
- memset(&cs, 0, sizeof(cs));
- pReadCabinetState(&cs, sizeof(cs));
- if (cs.fFullPathTitle == -1)
- {
- lstrcpyA(Group1Title, ProgramsDir);
- lstrcatA(Group1Title, "\\Group1");
- lstrcpyA(Group2Title, ProgramsDir);
- lstrcatA(Group2Title, "\\Group2");
- lstrcpyA(Group3Title, ProgramsDir);
- lstrcatA(Group3Title, "\\Group3");
-
- lstrcpyA(StartupTitle, startup);
- }
- else
- {
- /* Vista has the nice habit of displaying the full path in English
- * and the short one localized. CSIDL_STARTUP on Vista gives us the
- * English version so we have to 'translate' this one.
- *
- * MSDN claims it should be used for files not folders but this one
- * suits our purposes just fine.
- */
- if (pSHGetLocalizedName)
- {
- WCHAR startupW[MAX_PATH];
- WCHAR module[MAX_PATH];
- WCHAR module_expanded[MAX_PATH];
- WCHAR localized[MAX_PATH];
- int id;
-
- MultiByteToWideChar(CP_ACP, 0, startup, -1, startupW, sizeof(startupW)/sizeof(WCHAR));
- pSHGetLocalizedName(startupW, module, MAX_PATH, &id);
- ExpandEnvironmentStringsW(module, module_expanded, MAX_PATH);
- LoadStringW(GetModuleHandleW(module_expanded), id, localized, MAX_PATH);
-
- WideCharToMultiByte(CP_ACP, 0, localized, -1, StartupTitle, sizeof(StartupTitle), NULL, NULL);
- }
- else
- {
- lstrcpyA(StartupTitle, (strrchr(startup, '\\') + 1));
- }
- }
-}
-
-static HDDEDATA CALLBACK DdeCallback(UINT type, UINT format, HCONV hConv, HSZ hsz1, HSZ hsz2,
- HDDEDATA hDDEData, ULONG_PTR data1, ULONG_PTR data2)
-{
- trace("Callback: type=%i, format=%i\n", type, format);
- return NULL;
-}
-
-/*
- * Encoded String for Error Messages so that inner failures can determine
- * what test is failing. Format is: [Code:TestNum]
- */
-static const char * GetStringFromTestParams(int testParams)
-{
- int testNum;
- static char testParamString[64];
- const char *callId;
-
- testNum = testParams & DDE_TEST_NUMMASK;
- switch (testParams & DDE_TEST_CALLMASK)
- {
- default:
- case DDE_TEST_MISC:
- callId = "MISC";
- break;
- case DDE_TEST_CREATEGROUP:
- callId = "C_G";
- break;
- case DDE_TEST_DELETEGROUP:
- callId = "D_G";
- break;
- case DDE_TEST_SHOWGROUP:
- callId = "S_G";
- break;
- case DDE_TEST_ADDITEM:
- callId = "A_I";
- break;
- case DDE_TEST_DELETEITEM:
- callId = "D_I";
- break;
- case DDE_TEST_COMPOUND:
- callId = "CPD";
- break;
- }
-
- sprintf(testParamString, " [%s:%i]", callId, testNum);
- return testParamString;
-}
-
-/* Transfer DMLERR's into text readable strings for Error Messages */
-#define DMLERR_TO_STR(x) case x: return#x;
-static const char * GetStringFromError(UINT err)
-{
- switch (err)
- {
- DMLERR_TO_STR(DMLERR_NO_ERROR);
- DMLERR_TO_STR(DMLERR_ADVACKTIMEOUT);
- DMLERR_TO_STR(DMLERR_BUSY);
- DMLERR_TO_STR(DMLERR_DATAACKTIMEOUT);
- DMLERR_TO_STR(DMLERR_DLL_NOT_INITIALIZED);
- DMLERR_TO_STR(DMLERR_DLL_USAGE);
- DMLERR_TO_STR(DMLERR_EXECACKTIMEOUT);
- DMLERR_TO_STR(DMLERR_INVALIDPARAMETER);
- DMLERR_TO_STR(DMLERR_LOW_MEMORY);
- DMLERR_TO_STR(DMLERR_MEMORY_ERROR);
- DMLERR_TO_STR(DMLERR_NOTPROCESSED);
- DMLERR_TO_STR(DMLERR_NO_CONV_ESTABLISHED);
- DMLERR_TO_STR(DMLERR_POKEACKTIMEOUT);
- DMLERR_TO_STR(DMLERR_POSTMSG_FAILED);
- DMLERR_TO_STR(DMLERR_REENTRANCY);
- DMLERR_TO_STR(DMLERR_SERVER_DIED);
- DMLERR_TO_STR(DMLERR_SYS_ERROR);
- DMLERR_TO_STR(DMLERR_UNADVACKTIMEOUT);
- DMLERR_TO_STR(DMLERR_UNFOUND_QUEUE_ID);
- default:
- return "Unknown DML Error";
- }
-}
-
-/* Helper Function to Transfer DdeGetLastError into a String */
-static const char * GetDdeLastErrorStr(DWORD instance)
-{
- UINT err = DdeGetLastError(instance);
-
- return GetStringFromError(err);
-}
-
-/* Execute a Dde Command and return the error & result */
-/* Note: Progman DDE always returns a pointer to 0x00000001 on a successful result */
-static void DdeExecuteCommand(DWORD instance, HCONV hConv, const char *strCmd, HDDEDATA *hData, UINT *err, int testParams)
-{
- HDDEDATA command;
-
- command = DdeCreateDataHandle(instance, (LPBYTE) strCmd, strlen(strCmd)+1, 0, 0L, 0, 0);
- ok (command != NULL, "DdeCreateDataHandle Error %s.%s\n",
- GetDdeLastErrorStr(instance), GetStringFromTestParams(testParams));
- *hData = DdeClientTransaction((void *) command,
- -1,
- hConv,
- 0,
- 0,
- XTYP_EXECUTE,
- MS_TIMEOUT_VAL,
- NULL);
-
- /* hData is technically a pointer, but for Program Manager,
- * it is NULL (error) or 1 (success)
- * TODO: Check other versions of Windows to verify 1 is returned.
- * While it is unlikely that anyone is actually testing that the result is 1
- * if all versions of windows return 1, Wine should also.
- */
- if (*hData == NULL)
- {
- *err = DdeGetLastError(instance);
- }
- else
- {
- *err = DMLERR_NO_ERROR;
- todo_wine
- {
- ok(*hData == (HDDEDATA) 1, "Expected HDDEDATA Handle == 1, actually %p.%s\n",
- *hData, GetStringFromTestParams(testParams));
- }
- }
- DdeFreeDataHandle(command);
-}
-
-/*
- * Check if Window is onscreen with the appropriate name.
- *
- * Windows are not created synchronously. So we do not know
- * when and if the window will be created/shown on screen.
- * This function implements a polling mechanism to determine
- * creation.
- * A more complicated method would be to use SetWindowsHookEx.
- * Since polling worked fine in my testing, no reason to implement
- * the other. Comments about other methods of determining when
- * window creation happened were not encouraging (not including
- * SetWindowsHookEx).
- */
-static void CheckWindowCreated(const char *winName, int closeWindow, int testParams)
-{
- HWND window = NULL;
- int i;
-
- /* Poll for Window Creation */
- for (i = 0; window == NULL && i < PDDE_POLL_NUM; i++)
- {
- Sleep(PDDE_POLL_TIME);
- window = FindWindowA(NULL, winName);
- }
- ok (window != NULL, "Window \"%s\" was not created in %i seconds - assumed failure.%s\n",
- winName, PDDE_POLL_NUM*PDDE_POLL_TIME/1000, GetStringFromTestParams(testParams));
-
- /* Close Window as desired. */
- if (window != NULL && closeWindow)
- {
- SendMessageA(window, WM_SYSCOMMAND, SC_CLOSE, 0);
- }
-}
-
-/* Check for Existence (or non-existence) of a file or group
- * When testing for existence of a group, groupName is not needed
- */
-static void CheckFileExistsInProgramGroups(const char *nameToCheck, int shouldExist, int isGroup,
- const char *groupName, int testParams)
-{
- char path[MAX_PATH];
- DWORD attributes;
- int len;
-
- lstrcpyA(path, ProgramsDir);
-
- len = strlen(path) + strlen(nameToCheck)+1;
- if (groupName != NULL)
- {
- len += strlen(groupName)+1;
- }
- ok (len <= MAX_PATH, "Path Too Long.%s\n", GetStringFromTestParams(testParams));
- if (len <= MAX_PATH)
- {
- if (groupName != NULL)
- {
- strcat(path, "\\");
- strcat(path, groupName);
- }
- strcat(path, "\\");
- strcat(path, nameToCheck);
- attributes = GetFileAttributes(path);
- if (!shouldExist)
- {
- ok (attributes == INVALID_FILE_ATTRIBUTES , "File exists and shouldn't %s.%s\n",
- path, GetStringFromTestParams(testParams));
- } else {
- if (attributes == INVALID_FILE_ATTRIBUTES)
- {
- ok (FALSE, "Created File %s doesn't exist.%s\n", path, GetStringFromTestParams(testParams));
- } else if (isGroup) {
- ok (attributes & FILE_ATTRIBUTE_DIRECTORY, "%s is not a folder (attr=%x).%s\n",
- path, attributes, GetStringFromTestParams(testParams));
- } else {
- ok (attributes & FILE_ATTRIBUTE_ARCHIVE, "Created File %s has wrong attributes (%x).%s\n",
- path, attributes, GetStringFromTestParams(testParams));
- }
- }
- }
-}
-
-/* Create Group Test.
- * command and expected_result.
- * if expected_result is DMLERR_NO_ERROR, test
- * 1. group was created
- * 2. window is open
- */
-static void CreateGroupTest(DWORD instance, HCONV hConv, const char *command, UINT expected_result,
- const char *groupName, const char *windowTitle, int testParams)
-{
- HDDEDATA hData;
- UINT error;
-
- /* Execute Command & Check Result */
- DdeExecuteCommand(instance, hConv, command, &hData, &error, testParams);
- todo_wine
- {
- ok (expected_result == error, "CreateGroup %s: Expected Error %s, received %s.%s\n",
- groupName, GetStringFromError(expected_result), GetStringFromError(error),
- GetStringFromTestParams(testParams));
- }
-
- /* No Error */
- if (error == DMLERR_NO_ERROR)
- {
-
- /* Check if Group Now Exists */
- CheckFileExistsInProgramGroups(groupName, TRUE, TRUE, NULL, testParams);
- /* Check if Window is Open (polling) */
- CheckWindowCreated(windowTitle, TRUE, testParams);
- }
-}
-
-/* Show Group Test.
- * DDE command, expected_result, and the group name to check for existence
- * if expected_result is DMLERR_NO_ERROR, test
- * 1. window is open
- */
-static void ShowGroupTest(DWORD instance, HCONV hConv, const char *command, UINT expected_result,
- const char *groupName, const char *windowTitle, int closeAfterShowing, int testParams)
-{
- HDDEDATA hData;
- UINT error;
-
- DdeExecuteCommand(instance, hConv, command, &hData, &error, testParams);
-/* todo_wine... Is expected to fail, wine stubbed functions DO fail */
-/* TODO REMOVE THIS CODE!!! */
- if (expected_result == DMLERR_NOTPROCESSED)
- {
- ok (expected_result == error, "ShowGroup %s: Expected Error %s, received %s.%s\n",
- groupName, GetStringFromError(expected_result), GetStringFromError(error),
- GetStringFromTestParams(testParams));
- } else {
- todo_wine
- {
- ok (expected_result == error, "ShowGroup %s: Expected Error %s, received %s.%s\n",
- groupName, GetStringFromError(expected_result), GetStringFromError(error),
- GetStringFromTestParams(testParams));
- }
- }
-
- if (error == DMLERR_NO_ERROR)
- {
- /* Check if Window is Open (polling) */
- CheckWindowCreated(windowTitle, closeAfterShowing, testParams);
- }
-}
-
-/* Delete Group Test.
- * DDE command, expected_result, and the group name to check for existence
- * if expected_result is DMLERR_NO_ERROR, test
- * 1. group does not exist
- */
-static void DeleteGroupTest(DWORD instance, HCONV hConv, const char *command, UINT expected_result,
- const char *groupName, int testParams)
-{
- HDDEDATA hData;
- UINT error;
-
- DdeExecuteCommand(instance, hConv, command, &hData, &error, testParams);
- todo_wine
- {
- ok (expected_result == error, "DeleteGroup %s: Expected Error %s, received %s.%s\n",
- groupName, GetStringFromError(expected_result), GetStringFromError(error),
- GetStringFromTestParams(testParams));
- }
-
- if (error == DMLERR_NO_ERROR)
- {
- /* Check that Group does not exist */
- CheckFileExistsInProgramGroups(groupName, FALSE, TRUE, NULL, testParams);
- }
-}
-
-/* Add Item Test
- * DDE command, expected result, and group and file name where it should exist.
- * checks to make sure error code matches expected error code
- * checks to make sure item exists if successful
- */
-static void AddItemTest(DWORD instance, HCONV hConv, const char *command, UINT expected_result,
- const char *fileName, const char *groupName, int testParams)
-{
- HDDEDATA hData;
- UINT error;
-
- DdeExecuteCommand(instance, hConv, command, &hData, &error, testParams);
- todo_wine
- {
- ok (expected_result == error, "AddItem %s: Expected Error %s, received %s.%s\n",
- fileName, GetStringFromError(expected_result), GetStringFromError(error),
- GetStringFromTestParams(testParams));
- }
-
- if (error == DMLERR_NO_ERROR)
- {
- /* Check that File exists */
- CheckFileExistsInProgramGroups(fileName, TRUE, FALSE, groupName, testParams);
- }
-}
-
-/* Delete Item Test.
- * DDE command, expected result, and group and file name where it should exist.
- * checks to make sure error code matches expected error code
- * checks to make sure item does not exist if successful
- */
-static void DeleteItemTest(DWORD instance, HCONV hConv, const char *command, UINT expected_result,
- const char *fileName, const char *groupName, int testParams)
-{
- HDDEDATA hData;
- UINT error;
-
- DdeExecuteCommand(instance, hConv, command, &hData, &error, testParams);
- todo_wine
- {
- ok (expected_result == error, "DeleteItem %s: Expected Error %s, received %s.%s\n",
- fileName, GetStringFromError(expected_result), GetStringFromError(error),
- GetStringFromTestParams(testParams));
- }
-
- if (error == DMLERR_NO_ERROR)
- {
- /* Check that File does not exist */
- CheckFileExistsInProgramGroups(fileName, FALSE, FALSE, groupName, testParams);
- }
-}
-
-/* Compound Command Test.
- * not really generic, assumes command of the form:
- * [CreateGroup ...][AddItem ...][AddItem ...]
- * All samples I've seen using Compound were of this form (CreateGroup,
- * AddItems) so this covers minimum expected functionality.
- */
-static void CompoundCommandTest(DWORD instance, HCONV hConv, const char *command, UINT expected_result,
- const char *groupName, const char *windowTitle, const char *fileName1,
- const char *fileName2, int testParams)
-{
- HDDEDATA hData;
- UINT error;
-
- DdeExecuteCommand(instance, hConv, command, &hData, &error, testParams);
- todo_wine
- {
- ok (expected_result == error, "Compound String %s: Expected Error %s, received %s.%s\n",
- command, GetStringFromError(expected_result), GetStringFromError(error),
- GetStringFromTestParams(testParams));
- }
-
- if (error == DMLERR_NO_ERROR)
- {
- /* Check that File exists */
- CheckFileExistsInProgramGroups(groupName, TRUE, TRUE, NULL, testParams);
- CheckWindowCreated(windowTitle, FALSE, testParams);
- CheckFileExistsInProgramGroups(fileName1, TRUE, FALSE, groupName, testParams);
- CheckFileExistsInProgramGroups(fileName2, TRUE, FALSE, groupName, testParams);
- }
-}
-
-static void CreateAddItemText(char *itemtext, const char *cmdline, const char *name)
-{
- lstrcpyA(itemtext, "[AddItem(");
- lstrcatA(itemtext, cmdline);
- lstrcatA(itemtext, ",");
- lstrcatA(itemtext, name);
- lstrcatA(itemtext, ")]");
-}
-
-/* 1st set of tests */
-static int DdeTestProgman(DWORD instance, HCONV hConv)
-{
- HDDEDATA hData;
- UINT error;
- int testnum;
- char temppath[MAX_PATH];
- char f1g1[MAX_PATH], f2g1[MAX_PATH], f3g1[MAX_PATH], f1g3[MAX_PATH], f2g3[MAX_PATH];
- char itemtext[MAX_PATH + 20];
- char comptext[2 * (MAX_PATH + 20) + 21];
-
- testnum = 1;
- /* Invalid Command */
- DdeExecuteCommand(instance, hConv, "[InvalidCommand()]", &hData, &error, DDE_TEST_MISC|testnum++);
- ok (error == DMLERR_NOTPROCESSED, "InvalidCommand(), expected error %s, received %s.\n",
- GetStringFromError(DMLERR_NOTPROCESSED), GetStringFromError(error));
-
- /* On Vista+ the files have to exist when adding a link */
- GetTempPathA(MAX_PATH, temppath);
- GetTempFileNameA(temppath, "dde", 0, f1g1);
- GetTempFileNameA(temppath, "dde", 0, f2g1);
- GetTempFileNameA(temppath, "dde", 0, f3g1);
- GetTempFileNameA(temppath, "dde", 0, f1g3);
- GetTempFileNameA(temppath, "dde", 0, f2g3);
-
- /* CreateGroup Tests (including AddItem, DeleteItem) */
- CreateGroupTest(instance, hConv, "[CreateGroup(Group1)]", DMLERR_NO_ERROR, "Group1", Group1Title, DDE_TEST_CREATEGROUP|testnum++);
- CreateAddItemText(itemtext, f1g1, "f1g1Name");
- AddItemTest(instance, hConv, itemtext, DMLERR_NO_ERROR, "f1g1Name.lnk", "Group1", DDE_TEST_ADDITEM|testnum++);
- CreateAddItemText(itemtext, f2g1, "f2g1Name");
- AddItemTest(instance, hConv, itemtext, DMLERR_NO_ERROR, "f2g1Name.lnk", "Group1", DDE_TEST_ADDITEM|testnum++);
- DeleteItemTest(instance, hConv, "[DeleteItem(f2g1Name)]", DMLERR_NO_ERROR, "f2g1Name.lnk", "Group1", DDE_TEST_DELETEITEM|testnum++);
- CreateAddItemText(itemtext, f3g1, "f3g1Name");
- AddItemTest(instance, hConv, itemtext, DMLERR_NO_ERROR, "f3g1Name.lnk", "Group1", DDE_TEST_ADDITEM|testnum++);
- CreateGroupTest(instance, hConv, "[CreateGroup(Group2)]", DMLERR_NO_ERROR, "Group2", Group2Title, DDE_TEST_CREATEGROUP|testnum++);
- /* Create Group that already exists - same instance */
- CreateGroupTest(instance, hConv, "[CreateGroup(Group1)]", DMLERR_NO_ERROR, "Group1", Group1Title, DDE_TEST_CREATEGROUP|testnum++);
-
- /* ShowGroup Tests */
- ShowGroupTest(instance, hConv, "[ShowGroup(Group1)]", DMLERR_NOTPROCESSED, "Group1", Group1Title, TRUE, DDE_TEST_SHOWGROUP|testnum++);
- DeleteItemTest(instance, hConv, "[DeleteItem(f3g1Name)]", DMLERR_NO_ERROR, "f3g1Name.lnk", "Group1", DDE_TEST_DELETEITEM|testnum++);
- ShowGroupTest(instance, hConv, "[ShowGroup(Startup,0)]", DMLERR_NO_ERROR, "Startup", StartupTitle, TRUE, DDE_TEST_SHOWGROUP|testnum++);
- ShowGroupTest(instance, hConv, "[ShowGroup(Group1,0)]", DMLERR_NO_ERROR, "Group1", Group1Title, FALSE, DDE_TEST_SHOWGROUP|testnum++);
-
- /* DeleteGroup Test - Note that Window is Open for this test */
- DeleteGroupTest(instance, hConv, "[DeleteGroup(Group1)]", DMLERR_NO_ERROR, "Group1", DDE_TEST_DELETEGROUP|testnum++);
-
- /* Compound Execute String Command */
- lstrcpyA(comptext, "[CreateGroup(Group3)]");
- CreateAddItemText(itemtext, f1g3, "f1g3Name");
- lstrcatA(comptext, itemtext);
- CreateAddItemText(itemtext, f2g3, "f2g3Name");
- lstrcatA(comptext, itemtext);
- CompoundCommandTest(instance, hConv, comptext, DMLERR_NO_ERROR, "Group3", Group3Title, "f1g3Name.lnk", "f2g3Name.lnk", DDE_TEST_COMPOUND|testnum++);
-
- DeleteGroupTest(instance, hConv, "[DeleteGroup(Group3)]", DMLERR_NO_ERROR, "Group3", DDE_TEST_DELETEGROUP|testnum++);
-
- /* Full Parameters of Add Item */
- /* AddItem(CmdLine[,Name[,IconPath[,IconIndex[,xPos,yPos[,DefDir[,HotKey[,fMinimize[fSeparateSpace]]]]]]]) */
-
- DeleteFileA(f1g1);
- DeleteFileA(f2g1);
- DeleteFileA(f3g1);
- DeleteFileA(f1g3);
- DeleteFileA(f2g3);
-
- return testnum;
-}
-
-/* 2nd set of tests - 2nd connection */
-static void DdeTestProgman2(DWORD instance, HCONV hConv, int testnum)
-{
- /* Create Group that already exists on a separate connection */
- CreateGroupTest(instance, hConv, "[CreateGroup(Group2)]", DMLERR_NO_ERROR, "Group2", Group2Title, DDE_TEST_CREATEGROUP|testnum++);
- DeleteGroupTest(instance, hConv, "[DeleteGroup(Group2)]", DMLERR_NO_ERROR, "Group2", DDE_TEST_DELETEGROUP|testnum++);
-}
-
-START_TEST(progman_dde)
-{
- DWORD instance = 0;
- UINT err;
- HSZ hszProgman;
- HCONV hConv;
- int testnum;
-
- init_function_pointers();
- init_strings();
-
- /* Initialize DDE Instance */
- err = DdeInitialize(&instance, DdeCallback, APPCMD_CLIENTONLY, 0);
- ok (err == DMLERR_NO_ERROR, "DdeInitialize Error %s\n", GetStringFromError(err));
-
- /* Create Connection */
- hszProgman = DdeCreateStringHandle(instance, "PROGMAN", CP_WINANSI);
- ok (hszProgman != NULL, "DdeCreateStringHandle Error %s\n", GetDdeLastErrorStr(instance));
- hConv = DdeConnect(instance, hszProgman, hszProgman, NULL);
- ok (DdeFreeStringHandle(instance, hszProgman), "DdeFreeStringHandle failure\n");
- /* Seeing failures on early versions of Windows Connecting to progman, exit if connection fails */
- if (hConv == NULL)
- {
- ok (DdeUninitialize(instance), "DdeUninitialize failed\n");
- return;
- }
-
- /* Run Tests */
- testnum = DdeTestProgman(instance, hConv);
-
- /* Cleanup & Exit */
- ok (DdeDisconnect(hConv), "DdeDisonnect Error %s\n", GetDdeLastErrorStr(instance));
- ok (DdeUninitialize(instance), "DdeUninitialize failed\n");
-
- /* 2nd Instance (Followup Tests) */
- /* Initialize DDE Instance */
- instance = 0;
- err = DdeInitialize(&instance, DdeCallback, APPCMD_CLIENTONLY, 0);
- ok (err == DMLERR_NO_ERROR, "DdeInitialize Error %s\n", GetStringFromError(err));
-
- /* Create Connection */
- hszProgman = DdeCreateStringHandle(instance, "PROGMAN", CP_WINANSI);
- ok (hszProgman != NULL, "DdeCreateStringHandle Error %s\n", GetDdeLastErrorStr(instance));
- hConv = DdeConnect(instance, hszProgman, hszProgman, NULL);
- ok (hConv != NULL, "DdeConnect Error %s\n", GetDdeLastErrorStr(instance));
- ok (DdeFreeStringHandle(instance, hszProgman), "DdeFreeStringHandle failure\n");
-
- /* Run Tests */
- DdeTestProgman2(instance, hConv, testnum);
-
- /* Cleanup & Exit */
- ok (DdeDisconnect(hConv), "DdeDisonnect Error %s\n", GetDdeLastErrorStr(instance));
- ok (DdeUninitialize(instance), "DdeUninitialize failed\n");
-}
<file>appbar.c</file>
<file>autocomplete.c</file>
<file>generated.c</file>
- <file>progman_dde.c</file>
<file>shelllink.c</file>
<file>shellpath.c</file>
<file>shlexec.c</file>
ok(SUCCEEDED(r), "GetArguments failed (0x%08x)\n", r);
ok(lstrcmp(buffer,str)==0, "GetArguments returned '%s'\n", buffer);
- strcpy(buffer,"garbage");
- r = IShellLinkA_SetArguments(sl, NULL);
- ok(SUCCEEDED(r), "SetArguments failed (0x%08x)\n", r);
- r = IShellLinkA_GetArguments(sl, buffer, sizeof(buffer));
- ok(SUCCEEDED(r), "GetArguments failed (0x%08x)\n", r);
- ok(!buffer[0] || lstrcmp(buffer,str)==0, "GetArguments returned '%s'\n", buffer);
-
- strcpy(buffer,"garbage");
- r = IShellLinkA_SetArguments(sl, "");
- ok(SUCCEEDED(r), "SetArguments failed (0x%08x)\n", r);
- r = IShellLinkA_GetArguments(sl, buffer, sizeof(buffer));
- ok(SUCCEEDED(r), "GetArguments failed (0x%08x)\n", r);
- ok(!buffer[0], "GetArguments returned '%s'\n", buffer);
-
/* Test Getting / Setting showcmd */
i=0xdeadbeef;
r = IShellLinkA_GetShowCmd(sl, &i);
static GUID CLSID_CommonDocuments = { 0x0000000c, 0x0000, 0x0000, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x1a } };
struct shellExpectedValues {
- int folder;
+ int folder;
int numTypes;
const BYTE *types;
};
shellVersion.cbSize = sizeof(shellVersion);
pDllGetVersion(&shellVersion);
trace("shell32 version is %d.%d\n",
- shellVersion.dwMajorVersion, shellVersion.dwMinorVersion);
+ shellVersion.dwMajorVersion, shellVersion.dwMinorVersion);
}
#undef GET_PROC
}
char shellGuidStr[39], guidStr[39], guid_altStr[39];
if (!guid_alt)
- ok(IsEqualIID(shellGuid, guid),
- "%s: got GUID %s, expected %s\n", getFolderName(folder),
+ ok(IsEqualIID(shellGuid, guid),
+ "%s: got GUID %s, expected %s\n", getFolderName(folder),
printGUID(shellGuid, shellGuidStr), printGUID(guid, guidStr));
else
ok(IsEqualIID(shellGuid, guid) ||
win_skip("Skipping shellexecute of file with unassociated extension\n");
skip_noassoc_tests = TRUE;
rc = SE_ERR_NOASSOC;
- }
+ }
}
ok(wait_rc==WAIT_OBJECT_0 || rc <= 32, "WaitForSingleObject returned %d\n", wait_rc);
}
* like '.mpeg', etc.
* Also it means we cannot do any other test.
*/
- win_skip("FindExecutable() is broken -> not running 4+ character extension tests\n");
+ trace("FindExecutable() is broken -> skipping 4+ character extension tests\n");
return;
}
{
okChildInt("argcA", 5);
}
- else
+ else
{
okChildInt("argcA", 5);
}
if (! skip_noassoc_tests)
{
- sprintf(filename, "%s\\test file.noassoc", tmpdir);
- if (CopyFile(argv0, filename, FALSE))
- {
- rc=shell_execute(NULL, filename, params, NULL);
- todo_wine {
- ok(rc==SE_ERR_NOASSOC, "%s succeeded: rc=%d\n", shell_call, rc);
- }
+ sprintf(filename, "%s\\test file.noassoc", tmpdir);
+ if (CopyFile(argv0, filename, FALSE))
+ {
+ rc=shell_execute(NULL, filename, params, NULL);
+ todo_wine {
+ ok(rc==SE_ERR_NOASSOC, "%s succeeded: rc=%d\n", shell_call, rc);
}
}
+}
else
{
win_skip("Skipping shellexecute of file with unassociated extension\n");
if (! skip_noassoc_tests)
{
- sprintf(filename, "%s\\test file.noassoc", tmpdir);
- if (CopyFile(argv0, filename, FALSE))
- {
- rc=shell_execute(NULL, filename, params, NULL);
- todo_wine {
- ok(rc==SE_ERR_NOASSOC, "%s succeeded: rc=%d\n", shell_call, rc);
- }
+ sprintf(filename, "%s\\test file.noassoc", tmpdir);
+ if (CopyFile(argv0, filename, FALSE))
+ {
+ rc=shell_execute(NULL, filename, params, NULL);
+ todo_wine {
+ ok(rc==SE_ERR_NOASSOC, "%s succeeded: rc=%d\n", shell_call, rc);
}
}
+}
else
{
win_skip("Skipping shellexecute of file with unassociated extension\n");
import_module_name = base + import_descriptor->Name;
if (lstrcmpiA(import_module_name, "user32.dll") == 0 ||
lstrcmpiA(import_module_name, "user32") == 0)
- {
+ {
PIMAGE_THUNK_DATA int_entry;
PIMAGE_THUNK_DATA iat_entry;
int_entry = (PIMAGE_THUNK_DATA)(base + U(*import_descriptor).OriginalFirstThunk);
iat_entry = (PIMAGE_THUNK_DATA)(base + import_descriptor->FirstThunk);
while (int_entry->u1.Ordinal != 0)
- {
+ {
if (! IMAGE_SNAP_BY_ORDINAL(int_entry->u1.Ordinal))
{
PIMAGE_IMPORT_BY_NAME import_by_name;
iat_entry->u1.Function = (ULONG_PTR) new_func;
VirtualProtect(&iat_entry->u1.Function, sizeof(ULONG_PTR), old_prot, &old_prot);
break;
- }
}
+ }
int_entry++;
iat_entry++;
- }
+ }
break;
- }
+}
import_descriptor++;
- }
+}
}
static void test_dde(void)
/* try to delete an invalid filename */
if (0) {
/* this crashes on win9x */
- init_shfo_tests();
- shfo.pFrom = "\0";
- shfo.fFlags &= ~FOF_FILESONLY;
- shfo.fAnyOperationsAborted = FALSE;
- ret = SHFileOperation(&shfo);
- ok(ret == ERROR_ACCESS_DENIED, "Expected ERROR_ACCESS_DENIED, got %d\n", ret);
- ok(!shfo.fAnyOperationsAborted, "Expected no aborted operations\n");
- ok(file_exists("test1.txt"), "Expected test1.txt to exist\n");
+ init_shfo_tests();
+ shfo.pFrom = "\0";
+ shfo.fFlags &= ~FOF_FILESONLY;
+ shfo.fAnyOperationsAborted = FALSE;
+ ret = SHFileOperation(&shfo);
+ ok(ret == ERROR_ACCESS_DENIED, "Expected ERROR_ACCESS_DENIED, got %d\n", ret);
+ ok(!shfo.fAnyOperationsAborted, "Expected no aborted operations\n");
+ ok(file_exists("test1.txt"), "Expected test1.txt to exist\n");
}
/* try an invalid function */
/* try an invalid list, only one null terminator */
if (0) {
/* this crashes on win9x */
- init_shfo_tests();
- shfo.pFrom = "";
- shfo.wFunc = FO_DELETE;
- ret = SHFileOperation(&shfo);
- ok(ret == ERROR_ACCESS_DENIED, "Expected ERROR_ACCESS_DENIED, got %d\n", ret);
- ok(file_exists("test1.txt"), "Expected test1.txt to exist\n");
+ init_shfo_tests();
+ shfo.pFrom = "";
+ shfo.wFunc = FO_DELETE;
+ ret = SHFileOperation(&shfo);
+ ok(ret == ERROR_ACCESS_DENIED, "Expected ERROR_ACCESS_DENIED, got %d\n", ret);
+ ok(file_exists("test1.txt"), "Expected test1.txt to exist\n");
}
/* delete a nonexistent file */
if (ret != ERROR_FILE_NOT_FOUND)
{
/* Vista would throw up a dialog box that we can't suppress */
- init_shfo_tests();
- shfo.pFrom = "testdir2\0testdir2\\one.txt\0";
- ret = SHFileOperation(&shfo);
+ init_shfo_tests();
+ shfo.pFrom = "testdir2\0testdir2\\one.txt\0";
+ ret = SHFileOperation(&shfo);
ok(ret == ERROR_PATH_NOT_FOUND ||
broken(ret == ERROR_SUCCESS), /* NT4 */
"Expected ERROR_PATH_NOT_FOUND, got %d\n", ret);
ok(!dir_exists("testdir2"), "Expected testdir2 to not exist\n");
- ok(!file_exists("testdir2\\one.txt"), "Expected testdir2\\one.txt to not exist\n");
+ ok(!file_exists("testdir2\\one.txt"), "Expected testdir2\\one.txt to not exist\n");
}
else
skip("Test would show a dialog box\n");
else
{
ok(retval == ERROR_SUCCESS, "File is renamed moving to other directory\n");
- ok(file_exists("test4.txt\\test1.txt"), "The file is not renamed\n");
+ ok(file_exists("test4.txt\\test1.txt"), "The file is not renamed\n");
}
set_curr_dir_path(from, "test1.txt\0test2.txt\0test4.txt\0");
/* pFrom is NULL, commented out because it crashes on nt 4.0 */
if (0)
{
- shfo.pFrom = NULL;
- retval = SHFileOperationA(&shfo);
- ok(retval == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", retval);
- }
+ shfo.pFrom = NULL;
+ retval = SHFileOperationA(&shfo);
+ ok(retval == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", retval);
+}
}
/* tests the FO_COPY action */
{
expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */);
ok(!file_exists("test6.txt"), "The file is copied - many files are "
- "specified as a target\n");
+ "specified as a target\n");
}
memcpy(&shfo2, &shfo, sizeof(SHFILEOPSTRUCTA));
{
expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */);
ok(!file_exists("test6.txt"), "The file is copied - many files are "
- "specified as a target\n");
+ "specified as a target\n");
}
set_curr_dir_path(from, "test1.txt\0");
set_curr_dir_path(from, "test1.txt\0");
set_curr_dir_path(to, "nonexistent\\notreal\\test2.txt\0");
retval= SHFileOperation(&shfo);
- ok(!retval, "Error copying into nonexistent directory\n");
- ok(file_exists("nonexistent"), "nonexistent not created\n");
- ok(file_exists("nonexistent\\notreal"), "nonexistent\\notreal not created\n");
- ok(file_exists("nonexistent\\notreal\\test2.txt"), "Directory not created\n");
+ ok(!retval, "Error copying into nonexistent directory\n");
+ ok(file_exists("nonexistent"), "nonexistent not created\n");
+ ok(file_exists("nonexistent\\notreal"), "nonexistent\\notreal not created\n");
+ ok(file_exists("nonexistent\\notreal\\test2.txt"), "Directory not created\n");
ok(!file_exists("nonexistent\\notreal\\test1.txt"), "test1.txt should not exist\n");
/* a relative dest directory is OK */
set_curr_dir_path(from, "test1.txt\0test2.txt\0");
set_curr_dir_path(to, "test3.txt\0");
retval = SHFileOperation(&shfo);
- if (retval == DE_FLDDESTISFILE || /* Vista and W2K8 */
- retval == DE_INVALIDFILES) /* Win7 */
+ if (retval == DE_FLDDESTISFILE)
{
- /* Most likely new behavior */
+ /* Vista and W2K8 (broken or new behavior ?) */
ok(!shfo.fAnyOperationsAborted, "Didn't expect aborted operations\n");
}
else
{
expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */);
- ok(shfo.fAnyOperationsAborted, "Expected aborted operations\n");
+ ok(shfo.fAnyOperationsAborted, "Expected aborted operations\n");
}
ok(!file_exists("test3.txt\\test2.txt"), "Expected test3.txt\\test2.txt to not exist\n");
shfo.fFlags &= ~FOF_NOERRORUI;
shfo.fAnyOperationsAborted = FALSE;
retval = SHFileOperation(&shfo);
- ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval);
- ok(DeleteFile("test3.txt\\test1.txt"), "Expected test3.txt\\test1.txt to exist\n");
- ok(DeleteFile("test3.txt\\test2.txt"), "Expected test3.txt\\test1.txt to exist\n");
- ok(RemoveDirectory(to), "Expected test3.txt to exist\n");
+ ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval);
+ ok(DeleteFile("test3.txt\\test1.txt"), "Expected test3.txt\\test1.txt to exist\n");
+ ok(DeleteFile("test3.txt\\test2.txt"), "Expected test3.txt\\test1.txt to exist\n");
+ ok(RemoveDirectory(to), "Expected test3.txt to exist\n");
/* send in FOF_MULTIDESTFILES with too many destination files */
init_shfo_tests();
ok(shfo.fAnyOperationsAborted ||
broken(!shfo.fAnyOperationsAborted), /* NT4 */
"Expected aborted operations\n");
- ok(!file_exists("testdir2\\a.txt"), "Expected testdir2\\a.txt to not exist\n");
+ ok(!file_exists("testdir2\\a.txt"), "Expected testdir2\\a.txt to not exist\n");
}
/* send in FOF_MULTIDESTFILES with too many destination files */
ok(shfo.fAnyOperationsAborted ||
broken(!shfo.fAnyOperationsAborted), /* NT4 */
"Expected aborted operations\n");
- ok(!file_exists("e.txt"), "Expected e.txt to not exist\n");
+ ok(!file_exists("e.txt"), "Expected e.txt to not exist\n");
}
/* use FOF_MULTIDESTFILES with files and a source directory */
ok(DeleteFile("testdir2\\a.txt"), "Expected testdir2\\a.txt to exist\n");
ok(DeleteFile("testdir2\\b.txt"), "Expected testdir2\\b.txt to exist\n");
if (retval == ERROR_SUCCESS)
- ok(RemoveDirectory("testdir2\\c.txt"), "Expected testdir2\\c.txt to exist\n");
+ ok(RemoveDirectory("testdir2\\c.txt"), "Expected testdir2\\c.txt to exist\n");
/* try many dest files without FOF_MULTIDESTFILES flag */
shfo.pFrom = "test1.txt\0test2.txt\0test3.txt\0";
else
{
expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */);
- ok(!file_exists("a.txt"), "Expected a.txt to not exist\n");
+ ok(!file_exists("a.txt"), "Expected a.txt to not exist\n");
}
/* try a glob */
ok(retval == ERROR_SUCCESS ||
broken(retval == 0x100a1), /* WinMe */
"Expected ERROR_SUCCESS, got %d\n", retval);
- ok(file_exists("testdir2\\test1.txt"), "Expected testdir2\\test1.txt to exist\n");
+ ok(file_exists("testdir2\\test1.txt"), "Expected testdir2\\test1.txt to exist\n");
/* try a glob with FOF_FILESONLY */
clean_after_shfo_tests();
shfo.pFrom = "test?.txt\0";
shfo.fFlags |= FOF_FILESONLY;
retval = SHFileOperation(&shfo);
- ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval);
- ok(file_exists("testdir2\\test1.txt"), "Expected testdir2\\test1.txt to exist\n");
+ ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval);
+ ok(file_exists("testdir2\\test1.txt"), "Expected testdir2\\test1.txt to exist\n");
ok(!dir_exists("testdir2\\test4.txt"), "Expected testdir2\\test4.txt to not exist\n");
/* try a glob with FOF_MULTIDESTFILES and the same number
ok(shfo.fAnyOperationsAborted ||
broken(!shfo.fAnyOperationsAborted), /* NT4 */
"Expected aborted operations\n");
- ok(!file_exists("testdir2\\a.txt"), "Expected testdir2\\test1.txt to not exist\n");
+ ok(!file_exists("testdir2\\a.txt"), "Expected testdir2\\test1.txt to not exist\n");
}
ok(!RemoveDirectory("b.txt"), "b.txt should not exist\n");
ok(shfo.fAnyOperationsAborted ||
broken(!shfo.fAnyOperationsAborted), /* NT4 */
"Expected aborted operations\n");
- ok(!DeleteFile("b.txt"), "Expected b.txt to not exist\n");
+ ok(!DeleteFile("b.txt"), "Expected b.txt to not exist\n");
}
/* copy one file and one directory to three others */
ok(shfo.fAnyOperationsAborted ||
broken(!shfo.fAnyOperationsAborted), /* NT4 */
"Expected aborted operations\n");
- ok(!DeleteFile("b.txt"), "Expected b.txt to not exist\n");
- ok(!DeleteFile("c.txt"), "Expected c.txt to not exist\n");
+ ok(!DeleteFile("b.txt"), "Expected b.txt to not exist\n");
+ ok(!DeleteFile("c.txt"), "Expected c.txt to not exist\n");
}
/* copy a directory with a file beneath it, plus some files */
if (retval == ERROR_SUCCESS)
{
ok(DeleteFile("testdir2\\test1.txt"), "Expected testdir2\\test1.txt to exist\n");
- ok(DeleteFile("testdir2\\test4.txt\\a.txt"), "Expected a.txt to exist\n");
- ok(RemoveDirectory("testdir2\\test4.txt"), "Expected testdir2\\test4.txt to exist\n");
+ ok(DeleteFile("testdir2\\test4.txt\\a.txt"), "Expected a.txt to exist\n");
+ ok(RemoveDirectory("testdir2\\test4.txt"), "Expected testdir2\\test4.txt to exist\n");
}
/* copy one directory and a file in that dir to another dir */
"Expected ERROR_SUCCESS, got %d\n", retval);
if (retval == ERROR_SUCCESS)
{
- ok(DeleteFile("testdir2\\test4.txt\\a.txt"), "Expected a.txt to exist\n");
- ok(DeleteFile("testdir2\\a.txt"), "Expected testdir2\\a.txt to exist\n");
+ ok(DeleteFile("testdir2\\test4.txt\\a.txt"), "Expected a.txt to exist\n");
+ ok(DeleteFile("testdir2\\a.txt"), "Expected testdir2\\a.txt to exist\n");
}
/* copy a file in a directory first, and then the directory to a nonexistent dir */
ok(shfo.fAnyOperationsAborted ||
broken(!shfo.fAnyOperationsAborted), /* NT4 */
"Expected aborted operations\n");
- ok(!file_exists("nonexistent\\test4.txt"), "Expected nonexistent\\test4.txt to not exist\n");
+ ok(!file_exists("nonexistent\\test4.txt"), "Expected nonexistent\\test4.txt to not exist\n");
}
DeleteFile("test4.txt\\a.txt");
ok(retval == DE_SAMEFILE, "Expected DE_SAMEFILE, got %d\n", retval);
ok(DeleteFile("b.txt"), "Expected b.txt to exist\n");
}
- ok(!shfo.fAnyOperationsAborted, "Expected no operations to be aborted\n");
+ ok(!shfo.fAnyOperationsAborted, "Expected no operations to be aborted\n");
ok(!file_exists("c.txt"), "Expected c.txt to not exist\n");
/* destination is same as source directory */
else
{
expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */);
- ok(!file_exists("test4.txt\\a.txt"), "Expected test4.txt\\a.txt to not exist\n");
+ ok(!file_exists("test4.txt\\a.txt"), "Expected test4.txt\\a.txt to not exist\n");
}
/* copy a nonexistent file to a nonexistent directory */
/* NT4 would throw up some dialog boxes and doesn't copy files that are needed
* in subsequent tests.
*/
- shfo.fFlags = FOF_NOCONFIRMATION;
- shfo.pFrom = "test1.txt\0";
- shfo.pTo = "test2.txt\0";
- shfo.fAnyOperationsAborted = FALSE;
- /* without FOF_NOCONFIRMATION the confirmation is Yes/No */
- retval = SHFileOperation(&shfo);
+ shfo.fFlags = FOF_NOCONFIRMATION;
+ shfo.pFrom = "test1.txt\0";
+ shfo.pTo = "test2.txt\0";
+ shfo.fAnyOperationsAborted = FALSE;
+ /* without FOF_NOCONFIRMATION the confirmation is Yes/No */
+ retval = SHFileOperation(&shfo);
ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval);
- ok(file_has_content("test2.txt", "test1.txt\n"), "The file was not copied\n");
+ ok(file_has_content("test2.txt", "test1.txt\n"), "The file was not copied\n");
- shfo.pFrom = "test3.txt\0test1.txt\0";
- shfo.pTo = "test2.txt\0one.txt\0";
- shfo.fFlags = FOF_NOCONFIRMATION | FOF_MULTIDESTFILES;
- /* without FOF_NOCONFIRMATION the confirmation is Yes/Yes to All/No/Cancel */
- retval = SHFileOperation(&shfo);
+ shfo.pFrom = "test3.txt\0test1.txt\0";
+ shfo.pTo = "test2.txt\0one.txt\0";
+ shfo.fFlags = FOF_NOCONFIRMATION | FOF_MULTIDESTFILES;
+ /* without FOF_NOCONFIRMATION the confirmation is Yes/Yes to All/No/Cancel */
+ retval = SHFileOperation(&shfo);
ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval);
- ok(file_has_content("test2.txt", "test3.txt\n"), "The file was not copied\n");
+ ok(file_has_content("test2.txt", "test3.txt\n"), "The file was not copied\n");
- shfo.pFrom = "one.txt\0";
- shfo.pTo = "testdir2\0";
- shfo.fFlags = FOF_NOCONFIRMATION;
- /* without FOF_NOCONFIRMATION the confirmation is Yes/No */
- retval = SHFileOperation(&shfo);
- ok(retval == 0, "Expected 0, got %d\n", retval);
- ok(file_has_content("testdir2\\one.txt", "test1.txt\n"), "The file was not copied\n");
+ shfo.pFrom = "one.txt\0";
+ shfo.pTo = "testdir2\0";
+ shfo.fFlags = FOF_NOCONFIRMATION;
+ /* without FOF_NOCONFIRMATION the confirmation is Yes/No */
+ retval = SHFileOperation(&shfo);
+ ok(retval == 0, "Expected 0, got %d\n", retval);
+ ok(file_has_content("testdir2\\one.txt", "test1.txt\n"), "The file was not copied\n");
}
createTestFile("test4.txt\\test1.txt");
shfo.fFlags = FOF_NOCONFIRMATION;
if (ERROR_SUCCESS)
{
- createTestFile("test4.txt\\.\\test1.txt"); /* modify the content of the file */
- /* without FOF_NOCONFIRMATION the confirmation is "This folder already contains a folder named ..." */
- retval = SHFileOperation(&shfo);
- ok(retval == 0, "Expected 0, got %d\n", retval);
- ok(file_has_content("testdir2\\test4.txt\\test1.txt", "test4.txt\\.\\test1.txt\n"), "The file was not copied\n");
+ createTestFile("test4.txt\\.\\test1.txt"); /* modify the content of the file */
+ /* without FOF_NOCONFIRMATION the confirmation is "This folder already contains a folder named ..." */
+ retval = SHFileOperation(&shfo);
+ ok(retval == 0, "Expected 0, got %d\n", retval);
+ ok(file_has_content("testdir2\\test4.txt\\test1.txt", "test4.txt\\.\\test1.txt\n"), "The file was not copied\n");
}
createTestFile("one.txt");
/* Vista and W2K8 (broken or new behavior ?) */
ok(RemoveDirectory("two.txt"), "Expected two.txt to exist\n");
else
- ok(!DeleteFileA("two.txt"), "Expected file to not exist\n");
+ ok(!DeleteFileA("two.txt"), "Expected file to not exist\n");
createTestFile("one.txt");
}
else
{
- ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval);
+ ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval);
ok(DeleteFileA("two.txt"), "Expected file to exist\n");
}
ok(DeleteFileA("one.txt"), "Expected file to exist\n");
}
else
{
- ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval);
+ ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval);
ok(DeleteFileA("two.txt"), "Expected file to exist\n");
}
ok(DeleteFileA("one.txt"), "Expected file to exist\n");
/* Vista and W2K8 (broken or new behavior ?) */
ok(RemoveDirectory("two.txt"), "Expected two.txt to exist\n");
else
- ok(!DeleteFileA("two.txt"), "Expected file to not exist\n");
+ ok(!DeleteFileA("two.txt"), "Expected file to not exist\n");
createTestFile("one.txt");
}
else
{
- ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval);
+ ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval);
ok(DeleteFileA("two.txt"), "Expected file to exist\n");
}
ok(DeleteFileA("one.txt"), "Expected file to exist\n");
else
{
expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */);
- ok(!DeleteFileA("threedir\\one.txt"), "Expected file to not exist\n");
- ok(!DeleteFileA("threedir\\two.txt"), "Expected file to not exist\n");
+ ok(!DeleteFileA("threedir\\one.txt"), "Expected file to not exist\n");
+ ok(!DeleteFileA("threedir\\two.txt"), "Expected file to not exist\n");
ok(!DeleteFileA("threedir"), "Expected file to not exist\n");
ok(!RemoveDirectoryA("threedir"), "Expected dir to not exist\n");
}
if (0) {
/* this crashes on win9x */
- createTestFile("one.txt");
- createTestFile("two.txt");
+ createTestFile("one.txt");
+ createTestFile("two.txt");
/* pTo contains bogus 2nd name longer than MAX_PATH,
- * multiple source files, FOF_MULTIDESTFILES
- * dest dir does not exist
- */
+ * multiple source files, FOF_MULTIDESTFILES
+ * dest dir does not exist
+ */
- memset(to, 'a', 2 * MAX_PATH);
+ memset(to, 'a', 2 * MAX_PATH);
memset(to+MAX_PATH*2, 0, 2);
- lstrcpyA(to, "threedir");
- shfo.pFrom = "one.txt\0two.txt\0";
- shfo.pTo = to;
- shfo.fFlags = FOF_MULTIDESTFILES | FOF_NOCONFIRMATION |
- FOF_SILENT | FOF_NOERRORUI;
- retval = SHFileOperation(&shfo);
- ok(retval == ERROR_CANCELLED ||
- retval == ERROR_SUCCESS, /* win2k3 */
- "Expected ERROR_CANCELLED or ERROR_SUCCESS, got %d\n", retval);
- ok(!DeleteFileA("threedir\\one.txt"), "Expected file to not exist\n");
- ok(!DeleteFileA("threedir\\two.txt"), "Expected file to not exist\n");
- ok(DeleteFileA("one.txt"), "Expected file to exist\n");
- ok(DeleteFileA("two.txt"), "Expected file to exist\n");
- ok(!RemoveDirectoryA("threedir"), "Expected dir to not exist\n");
+ lstrcpyA(to, "threedir");
+ shfo.pFrom = "one.txt\0two.txt\0";
+ shfo.pTo = to;
+ shfo.fFlags = FOF_MULTIDESTFILES | FOF_NOCONFIRMATION |
+ FOF_SILENT | FOF_NOERRORUI;
+ retval = SHFileOperation(&shfo);
+ ok(retval == ERROR_CANCELLED ||
+ retval == ERROR_SUCCESS, /* win2k3 */
+ "Expected ERROR_CANCELLED or ERROR_SUCCESS, got %d\n", retval);
+ ok(!DeleteFileA("threedir\\one.txt"), "Expected file to not exist\n");
+ ok(!DeleteFileA("threedir\\two.txt"), "Expected file to not exist\n");
+ ok(DeleteFileA("one.txt"), "Expected file to exist\n");
+ ok(DeleteFileA("two.txt"), "Expected file to exist\n");
+ ok(!RemoveDirectoryA("threedir"), "Expected dir to not exist\n");
- /* file exists in win2k */
- DeleteFileA("threedir");
+ /* file exists in win2k */
+ DeleteFileA("threedir");
}
}
else
{
- ok(DeleteFileA("threedir\\two.txt"), "Expected file to exist\n");
- ok(!DeleteFileA("fourdir"), "Expected file to not exist\n");
- ok(!RemoveDirectoryA("fourdir"), "Expected dir to not exist\n");
+ ok(DeleteFileA("threedir\\two.txt"), "Expected file to exist\n");
+ ok(!DeleteFileA("fourdir"), "Expected file to not exist\n");
+ ok(!RemoveDirectoryA("fourdir"), "Expected dir to not exist\n");
}
ok(RemoveDirectoryA("threedir"), "Expected dir to exist\n");
}
else
{
- ok(DeleteFileA("threedir\\two.txt"), "Expected file to exist\n");
- ok(!DeleteFileA("fourdir"), "Expected file to not exist\n");
- ok(!RemoveDirectoryA("fourdir"), "Expected dit to not exist\n");
+ ok(DeleteFileA("threedir\\two.txt"), "Expected file to exist\n");
+ ok(!DeleteFileA("fourdir"), "Expected file to not exist\n");
+ ok(!RemoveDirectoryA("fourdir"), "Expected dit to not exist\n");
}
ok(RemoveDirectoryA("threedir"), "Expected dir to exist\n");
ok(!DeleteFileA("five"), "Expected file to not exist\n");
else
{
expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */);
- ok(!file_exists("test6.txt"), "The file is not moved - many files are "
- "specified as a target\n");
+ ok(!file_exists("test6.txt"), "The file is not moved - many files are "
+ "specified as a target\n");
}
init_shfo_tests();
{
expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */);
ok(!file_exists("test1.txt"), "Expected test1.txt to not exist\n");
- ok(file_exists("test2.txt"), "Expected test2.txt to exist\n");
- ok(file_exists("test3.txt"), "Expected test3.txt to exist\n");
+ ok(file_exists("test2.txt"), "Expected test2.txt to exist\n");
+ ok(file_exists("test3.txt"), "Expected test3.txt to exist\n");
}
/* move a directory into itself */
else
{
expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */);
- ok(!DeleteFile("d.txt"), "Expected d.txt to not exist\n");
- ok(!DeleteFile("e.txt"), "Expected e.txt to not exist\n");
+ ok(!DeleteFile("d.txt"), "Expected d.txt to not exist\n");
+ ok(!DeleteFile("e.txt"), "Expected e.txt to not exist\n");
}
/* number of sources != number of targets */
else
{
expect_retval(ERROR_CANCELLED, DE_OPCANCELLED /* Win9x, NT4 */);
- ok(!DeleteFile("d.txt"), "Expected d.txt to not exist\n");
+ ok(!DeleteFile("d.txt"), "Expected d.txt to not exist\n");
}
/* FO_MOVE does not create dest directories */
{
ok(retval == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", retval);
ok(!file_exists("test2.txt"), "Expected test2.txt to not exist\n");
- ok(file_exists("test3.txt"), "Expected test3.txt to exist\n");
- }
+ ok(file_exists("test3.txt"), "Expected test3.txt to exist\n");
+}
}
static void test_sh_create_dir(void)
if(!pSHCreateDirectoryExA)
{
win_skip("skipping SHCreateDirectoryExA tests\n");
- return;
+ return;
}
set_curr_dir_path(path, "testdir2\\test4.txt\0");
if(!pSHPathPrepareForWriteA)
{
win_skip("skipping SHPathPrepareForWriteA tests\n");
- return;
+ return;
}
/* directory exists, SHPPFW_NONE */
/* WinXP and up store the filenames as both ANSI and UNICODE in the pidls */
if (pidlLast->mkid.cb >= 76) {
ok(!lstrcmpW((WCHAR*)&pidlLast->mkid.abID[46], wszFileName) ||
- (pidlLast->mkid.cb >= 94 && !lstrcmpW((WCHAR*)&pidlLast->mkid.abID[64], wszFileName)) || /* Vista */
- (pidlLast->mkid.cb >= 98 && !lstrcmpW((WCHAR*)&pidlLast->mkid.abID[68], wszFileName)), /* Win7 */
+ (pidlLast->mkid.cb >= 94 && !lstrcmpW((WCHAR*)&pidlLast->mkid.abID[64], wszFileName)), /* Vista */
"Filename should be stored as wchar-string at this position!\n");
}
if (SUCCEEDED(hr)) {
IShellFolder_Release(psfFile);
}
-
+
if (!pSHBindToParent)
{
win_skip("SHBindToParent is missing\n");
/* Some tests for IShellFolder::SetNameOf */
if (pSHGetFolderPathAndSubDirA)
{
- hr = pSHBindToParent(pidlTestFile, &IID_IShellFolder, (VOID**)&psfPersonal, &pidlLast);
- ok(SUCCEEDED(hr), "SHBindToParent failed! hr = %08x\n", hr);
- if (SUCCEEDED(hr)) {
- /* It's ok to use this fixed path. Call will fail anyway. */
- WCHAR wszAbsoluteFilename[] = { 'C',':','\\','w','i','n','e','t','e','s','t', 0 };
- LPITEMIDLIST pidlNew;
-
- /* The pidl returned through the last parameter of SetNameOf is a simple one. */
- hr = IShellFolder_SetNameOf(psfPersonal, NULL, pidlLast, wszDirName, SHGDN_NORMAL, &pidlNew);
- ok (SUCCEEDED(hr), "SetNameOf failed! hr = %08x\n", hr);
+ hr = pSHBindToParent(pidlTestFile, &IID_IShellFolder, (VOID**)&psfPersonal, &pidlLast);
+ ok(SUCCEEDED(hr), "SHBindToParent failed! hr = %08x\n", hr);
+ if (SUCCEEDED(hr)) {
+ /* It's ok to use this fixed path. Call will fail anyway. */
+ WCHAR wszAbsoluteFilename[] = { 'C',':','\\','w','i','n','e','t','e','s','t', 0 };
+ LPITEMIDLIST pidlNew;
+
+ /* The pidl returned through the last parameter of SetNameOf is a simple one. */
+ hr = IShellFolder_SetNameOf(psfPersonal, NULL, pidlLast, wszDirName, SHGDN_NORMAL, &pidlNew);
+ ok (SUCCEEDED(hr), "SetNameOf failed! hr = %08x\n", hr);
if (hr == S_OK)
{
- ok (((LPITEMIDLIST)((LPBYTE)pidlNew+pidlNew->mkid.cb))->mkid.cb == 0,
- "pidl returned from SetNameOf should be simple!\n");
+ ok (((LPITEMIDLIST)((LPBYTE)pidlNew+pidlNew->mkid.cb))->mkid.cb == 0,
+ "pidl returned from SetNameOf should be simple!\n");
- /* Passing an absolute path to SetNameOf fails. The HRESULT code indicates that SetNameOf
- * is implemented on top of SHFileOperation in WinXP. */
- hr = IShellFolder_SetNameOf(psfPersonal, NULL, pidlNew, wszAbsoluteFilename,
- SHGDN_FORPARSING, NULL);
- ok (hr == HRESULT_FROM_WIN32(ERROR_CANCELLED), "SetNameOf succeeded! hr = %08x\n", hr);
+ /* Passing an absolute path to SetNameOf fails. The HRESULT code indicates that SetNameOf
+ * is implemented on top of SHFileOperation in WinXP. */
+ hr = IShellFolder_SetNameOf(psfPersonal, NULL, pidlNew, wszAbsoluteFilename,
+ SHGDN_FORPARSING, NULL);
+ ok (hr == HRESULT_FROM_WIN32(ERROR_CANCELLED), "SetNameOf succeeded! hr = %08x\n", hr);
- /* Rename the file back to its original name. SetNameOf ignores the fact, that the
- * SHGDN flags specify an absolute path. */
- hr = IShellFolder_SetNameOf(psfPersonal, NULL, pidlNew, wszFileName, SHGDN_FORPARSING, NULL);
- ok (SUCCEEDED(hr), "SetNameOf failed! hr = %08x\n", hr);
+ /* Rename the file back to its original name. SetNameOf ignores the fact, that the
+ * SHGDN flags specify an absolute path. */
+ hr = IShellFolder_SetNameOf(psfPersonal, NULL, pidlNew, wszFileName, SHGDN_FORPARSING, NULL);
+ ok (SUCCEEDED(hr), "SetNameOf failed! hr = %08x\n", hr);
- pILFree(pidlNew);
+ pILFree(pidlNew);
}
- IShellFolder_Release(psfPersonal);
- }
+ IShellFolder_Release(psfPersonal);
+ }
}
else
win_skip("Avoid needs of interaction on Win2k\n");
ok (!lstrcmpiW(wszTestFile, wszTestFile2), "GetDisplayNameOf returns incorrect path!\n");
}
- ILFree(pidlTestFile);
IShellFolder_Release(psfDesktop);
IShellFolder_Release(psfPersonal);
}
* key. So the test will return at this point, if run on wine.
*/
lResult = RegOpenKeyExW(HKEY_CLASSES_ROOT, wszMyDocumentsKey, 0, KEY_WRITE|KEY_READ, &hKey);
- ok (lResult == ERROR_SUCCESS ||
- lResult == ERROR_ACCESS_DENIED,
- "RegOpenKeyEx failed! result: %08x\n", lResult);
+ ok (lResult == ERROR_SUCCESS, "RegOpenKeyEx failed! result: %08x\n", lResult);
if (lResult != ERROR_SUCCESS) {
- if (lResult == ERROR_ACCESS_DENIED)
- skip("Not enough rights to open the registry key\n");
IMalloc_Free(ppM, pidlMyDocuments);
IShellFolder_Release(psfDesktop);
return;
if (len == 0) {
win_skip("GetCurrentDirectoryA returned empty string. Skipping test_GetAttributesOf\n");
- return;
+ return;
}
if (len > 3 && cCurrDirA[len-1] == '\\')
- cCurrDirA[len-1] = 0;
+ cCurrDirA[len-1] = 0;
/* create test directory */
CreateFilesFolders();
hr = IShellFolder_GetAttributesOf(IDesktopFolder, 1, (LPCITEMIDLIST*)&newPIDL, &dwFlags);
ok (SUCCEEDED(hr), "Desktop->GetAttributesOf() failed! hr = %08x\n", hr);
ok ((dwFlags&SFGAO_FOLDER), "Wrong directory attribute for absolute PIDL: %08x\n", dwFlags);
-
+
/* free memory */
IMalloc_Free(ppM, newPIDL);
Cleanup();
IShellFolder_Release(IDesktopFolder);
-}
+}
static void test_SHGetPathFromIDList(void)
{
result = pSHGetSpecialFolderPathW(NULL, wszDesktop, CSIDL_DESKTOP, FALSE);
ok(result, "SHGetSpecialFolderPathW(CSIDL_DESKTOP) failed! Last error: %u\n", GetLastError());
if (!result) return;
-
+
/* Check if we are on Win9x */
SetLastError(0xdeadbeef);
lstrcmpiW(wszDesktop, wszDesktop);
if (!lstrcmpW(pszPropName, wszTargetKnownFolder)) {
ok(V_VT(pVar) == VT_BSTR, "Wrong variant type for 'TargetKnownFolder' property!\n");
/* TODO */
- return E_INVALIDARG;
- }
+ return E_INVALIDARG;
+}
if (!lstrcmpW(pszPropName, wszCLSID)) {
ok(V_VT(pVar) == VT_EMPTY, "Wrong variant type for 'CLSID' property!\n");
win_skip("SHGetSpecialFolderPathW and/or StrRetToBufW are not available\n");
return;
}
-
+
if (!pSHGetFolderPathAndSubDirA)
{
win_skip("FolderShortcut test doesn't work on Win2k\n");
IPersistPropertyBag_Release(pPersistPropertyBag);
return;
}
-
+
hr = IPersistPropertyBag_QueryInterface(pPersistPropertyBag, &IID_IShellFolder,
(LPVOID*)&pShellFolder);
IPersistPropertyBag_Release(pPersistPropertyBag);
HANDLE hFile;
HRESULT hr;
BOOL bResult;
- WCHAR wszFile[3][17] = { { 'e','v','e','n','_',0 }, { 'o','d','d','_',0 },
+ WCHAR wszFile[3][17] = { { 'e','v','e','n','_',0 }, { 'o','d','d','_',0 },
{ 'l','o','n','g','e','r','_','t','h','a','n','.','8','_','3',0 } };
int i;
-
- if (!pSHGetSpecialFolderPathW) return;
+
+ if(!pSHGetSpecialFolderPathW) return;
bResult = pSHGetSpecialFolderPathW(NULL, wszPersonal, CSIDL_PERSONAL, FALSE);
ok(bResult, "SHGetSpecialFolderPathW failed! Last error: %u\n", GetLastError());
CHAR szFile[MAX_PATH];
struct FileStructA *pFileStructA;
WORD cbOffset;
-
+
WideCharToMultiByte(CP_ACP, 0, wszFile[i], -1, szFile, MAX_PATH, NULL, NULL);
-
+
hFile = CreateFileW(wszFile[i], GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_FLAG_WRITE_THROUGH, NULL);
ok(hFile != INVALID_HANDLE_VALUE, "CreateFile failed! (%u)\n", GetLastError());
if (hFile == INVALID_HANDLE_VALUE) {
pFileStructA = (struct FileStructA *)pidlFile->mkid.abID;
ok(pFileStructA->type == 0x32, "PIDLTYPE should be 0x32!\n");
ok(pFileStructA->dummy == 0x00, "Dummy Byte should be 0x00!\n");
- ok(pFileStructA->dwFileSize == 0, "Filesize should be zero!\n");
+ ok(pFileStructA->dwFileSize == 0, "Filesize should be zero!\n");
- if (i < 2) /* First two file names are already in valid 8.3 format */
+ if (i < 2) /* First two file names are already in valid 8.3 format */
ok(!strcmp(szFile, (CHAR*)&pidlFile->mkid.abID[12]), "Wrong file name!\n");
- else
+ else
/* WinXP stores a derived 8.3 dos name (LONGER~1.8_3) here. We probably
* can't implement this correctly, since unix filesystems don't support
* this nasty short/long filename stuff. So we'll probably stay with our
if (i == 0) /* First file name has an even number of chars. No need for alignment. */
ok(pidlFile->mkid.abID[12 + strlen(szFile) + 1] != '\0' ||
broken(pidlFile->mkid.cb == 2 + 12 + strlen(szFile) + 1 + 1), /* Win2k */
- "Alignment byte, where there shouldn't be!\n");
-
+ "Alignment byte, where there shouldn't be!\n");
+
if (i == 1) /* Second file name has an uneven number of chars => alignment byte */
- ok(pidlFile->mkid.abID[12 + strlen(szFile) + 1] == '\0',
+ ok(pidlFile->mkid.abID[12 + strlen(szFile) + 1] == '\0',
"There should be an alignment byte, but isn't!\n");
/* The offset of the FileStructW member is stored as a WORD at the end of the pidl. */
"Wrong offset value (%d) stored at the end of the PIDL\n", cbOffset);
if (cbOffset >= sizeof(struct FileStructA) &&
- cbOffset <= pidlFile->mkid.cb - sizeof(struct FileStructW))
+ cbOffset <= pidlFile->mkid.cb - sizeof(struct FileStructW))
{
struct FileStructW *pFileStructW = (struct FileStructW *)(((LPBYTE)pidlFile)+cbOffset);
- ok(pidlFile->mkid.cb == cbOffset + pFileStructW->cbLen,
+ ok(pidlFile->mkid.cb == cbOffset + pFileStructW->cbLen,
"FileStructW's offset and length should add up to the PIDL's length!\n");
if (pidlFile->mkid.cb == cbOffset + pFileStructW->cbLen) {
/* Since we just created the file, time of creation,
- * time of last access and time of last write access just be the same.
- * These tests seem to fail sometimes (on WinXP), if the test is run again shortly
+ * time of last access and time of last write access just be the same.
+ * These tests seem to fail sometimes (on WinXP), if the test is run again shortly
* after the first run. I do remember something with NTFS keeping the creation time
* if a file is deleted and then created again within a couple of seconds or so.
* Might be the reason. */
ok (pFileStructA->uFileDate == pFileStructW->uDate &&
pFileStructA->uFileTime == pFileStructW->uTime,
"Last write time should match creation time!\n");
-
- /* On FAT filesystems the last access time is midnight
- local time, so the values of uDate2 and uTime2 will
- depend on the local timezone. If the times are exactly
- equal then the dates should be identical for both FAT
- and NTFS as no timezone is more than 1 day away from UTC.
- */
- if (pFileStructA->uFileTime == pFileStructW->uTime2)
- {
- ok (pFileStructA->uFileDate == pFileStructW->uDate2,
- "Last write date and time should match last access date and time!\n");
- }
- else
- {
- /* Filesystem may be FAT. Check date within 1 day
- and seconds are zero. */
- trace ("Filesystem may be FAT. Performing less strict atime test.\n");
- ok ((pFileStructW->uTime2 & 0x1F) == 0,
- "Last access time on FAT filesystems should have zero seconds.\n");
- /* TODO: Perform check for date being within one day.*/
- }
+
+ ok (pFileStructA->uFileDate == pFileStructW->uDate2 &&
+ pFileStructA->uFileTime == pFileStructW->uTime2,
+ "Last write time should match last access time!\n");
ok (!lstrcmpW(wszFile[i], pFileStructW->wszName) ||
- !lstrcmpW(wszFile[i], (WCHAR *)(pFileStructW->abFooBar2 + 22)) || /* Vista */
- !lstrcmpW(wszFile[i], (WCHAR *)(pFileStructW->abFooBar2 + 26)), /* Win7 */
+ !lstrcmpW(wszFile[i], (WCHAR *)(pFileStructW->abFooBar2 + 22)), /* Vista */
"The filename should be stored in unicode at this position!\n");
}
}
pILFree(pidlFile);
}
-
- IShellFolder_Release(psfPersonal);
}
static void testSHGetFolderPathAndSubDirA(void)
ret = pShell_NotifyIconW(NIM_ADD, &nidW);
if (ret)
{
- /* using an invalid cbSize does work */
- nidW.cbSize = 3;
- nidW.hWnd = hMainWnd;
- nidW.uID = 1;
+ /* using an invalid cbSize does work */
+ nidW.cbSize = 3;
+ nidW.hWnd = hMainWnd;
+ nidW.uID = 1;
ret = pShell_NotifyIconW(NIM_DELETE, &nidW);
ok( ret || broken(!ret), /* nt4 */ "NIM_DELETE failed!\n");
- /* as icon doesn't exist anymore - now there will be an error */
- nidW.cbSize = sizeof(nidW);
+ /* as icon doesn't exist anymore - now there will be an error */
+ nidW.cbSize = sizeof(nidW);
ok(!pShell_NotifyIconW(NIM_DELETE, &nidW) != !ret, "The icon was not deleted\n");
- }
+ }
else win_skip( "Shell_NotifyIconW not working\n" ); /* win9x */
}
extern void func_appbar(void);
extern void func_autocomplete(void);
extern void func_generated(void);
-extern void func_progman_dde(void);
extern void func_shelllink(void);
extern void func_shellpath(void);
extern void func_shfldr_netplaces(void);
{
{ "appbar", func_appbar },
{ "autocomplete", func_autocomplete },
- { "generated", func_generated },
- { "progman_dde", func_progman_dde },
+ { "generated", func_generated },
{ "shelllink", func_shelllink },
{ "shellpath", func_shellpath },
{ "shfldr_netplaces", func_shfldr_netplaces },
# ifdef TYPE_ALIGNMENT
# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align);
-# else
+#else
# define TEST_TYPE_ALIGN(type, align)
-# endif
+#endif
# ifdef _TYPE_ALIGNMENT
# define TEST_TARGET_ALIGN(type, align) C_ASSERT(_TYPE_ALIGNMENT(*(type)0) == align);
# define TEST_FIELD_ALIGN(type, field, align) C_ASSERT(_TYPE_ALIGNMENT(((type*)0)->field) == align);
-# else
+#else
# define TEST_TARGET_ALIGN(type, align)
# define TEST_FIELD_ALIGN(type, field, align)
-# endif
+#endif
# define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset);
if (0)
{
/* Crashes on NT4 */
- stream = NULL;
- ret = (*pSHCreateStreamOnFileW)(NULL, mode | stgm, &stream);
- ok(ret == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) || /* XP */
- ret == E_INVALIDARG /* Vista */,
- "SHCreateStreamOnFileW: expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) or E_INVALIDARG, got 0x%08x\n", ret);
- ok(stream == NULL, "SHCreateStreamOnFileW: expected a NULL IStream object, got %p\n", stream);
+ stream = NULL;
+ ret = (*pSHCreateStreamOnFileW)(NULL, mode | stgm, &stream);
+ ok(ret == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) || /* XP */
+ ret == E_INVALIDARG /* Vista */,
+ "SHCreateStreamOnFileW: expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) or E_INVALIDARG, got 0x%08x\n", ret);
+ ok(stream == NULL, "SHCreateStreamOnFileW: expected a NULL IStream object, got %p\n", stream);
}
if (0)
{
/* This test crashes on WinXP SP2 */
- ret = (*pSHCreateStreamOnFileW)(test_file, mode | stgm, NULL);
- ok(ret == E_INVALIDARG, "SHCreateStreamOnFileW: expected E_INVALIDARG, got 0x%08x\n", ret);
+ ret = (*pSHCreateStreamOnFileW)(test_file, mode | stgm, NULL);
+ ok(ret == E_INVALIDARG, "SHCreateStreamOnFileW: expected E_INVALIDARG, got 0x%08x\n", ret);
}
stream = NULL;
if (0)
{
/* Crashes on NT4 */
- stream = NULL;
- ret = (*pSHCreateStreamOnFileEx)(NULL, mode, 0, FALSE, NULL, &stream);
- ok(ret == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) || /* XP */
- ret == E_INVALIDARG /* Vista */,
- "SHCreateStreamOnFileEx: expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) or E_INVALIDARG, got 0x%08x\n", ret);
- ok(stream == NULL, "SHCreateStreamOnFileEx: expected a NULL IStream object, got %p\n", stream);
+ stream = NULL;
+ ret = (*pSHCreateStreamOnFileEx)(NULL, mode, 0, FALSE, NULL, &stream);
+ ok(ret == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) || /* XP */
+ ret == E_INVALIDARG /* Vista */,
+ "SHCreateStreamOnFileEx: expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) or E_INVALIDARG, got 0x%08x\n", ret);
+ ok(stream == NULL, "SHCreateStreamOnFileEx: expected a NULL IStream object, got %p\n", stream);
}
stream = NULL;
if (0)
{
/* This test crashes on WinXP SP2 */
- ret = (*pSHCreateStreamOnFileEx)(test_file, mode, 0, FALSE, NULL, NULL);
- ok(ret == E_INVALIDARG, "SHCreateStreamOnFileEx: expected E_INVALIDARG, got 0x%08x\n", ret);
+ ret = (*pSHCreateStreamOnFileEx)(test_file, mode, 0, FALSE, NULL, NULL);
+ ok(ret == E_INVALIDARG, "SHCreateStreamOnFileEx: expected E_INVALIDARG, got 0x%08x\n", ret);
}
/* file does not exist */
{
ret = pPathIsValidCharW( c, ~0U );
ok ( ret, "PathIsValidCharW failed: 0x%02x got 0x%08x\n", c, ret );
- }
-}
+ }
+ }
static void test_PathMakePretty(void)
{
{
ok( (0 == strcmp("", buf)) || (0 == strcmp(sEnvvar2, buf)) ||
broken(0 == strcmp(sTestpath2, buf)), /* IE 5.5 */
- "Expected empty or first part of the string \"%s\", got \"%s\"\n", sEnvvar2, buf);
+ "Expected empty or first part of the string \"%s\", got \"%s\"\n", sEnvvar2, buf);
}
ok( dwSize >= nUsedBuffer2 ||
return;
}
- dwRet = (*pSHCopyKeyA)(hKeySrc, NULL, hKeyDst, 0);
- ok ( ERROR_SUCCESS == dwRet, "Copy failed, ret=(%u)\n", dwRet);
+ dwRet = (*pSHCopyKeyA)(hKeySrc, NULL, hKeyDst, 0);
+ ok ( ERROR_SUCCESS == dwRet, "Copy failed, ret=(%u)\n", dwRet);
RegCloseKey(hKeySrc);
RegCloseKey(hKeyDst);
ret = pStrRetToBSTR(&strret, NULL, &bstr);
ok(ret == S_OK && bstr && !strcmpW(bstr, szTestW),
"STRRET_WSTR: dup failed, ret=0x%08x, bstr %p\n", ret, bstr);
- SysFreeString(bstr);
+ SysFreeString(bstr);
strret.uType = STRRET_CSTR;
lstrcpyA(U(strret).cStr, "Test");
ret = pStrRetToBSTR(&strret, NULL, &bstr);
ok(ret == S_OK && bstr && !strcmpW(bstr, szTestW),
"STRRET_CSTR: dup failed, ret=0x%08x, bstr %p\n", ret, bstr);
- SysFreeString(bstr);
+ SysFreeString(bstr);
strret.uType = STRRET_OFFSET;
U(strret).uOffset = 1;
ret = pStrRetToBSTR(&strret, iidl, &bstr);
ok(ret == S_OK && bstr && !strcmpW(bstr, szTestW),
"STRRET_OFFSET: dup failed, ret=0x%08x, bstr %p\n", ret, bstr);
- SysFreeString(bstr);
+ SysFreeString(bstr);
/* Native crashes if str is NULL */
}
# ifdef TYPE_ALIGNMENT
# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align);
-# else
+#else
# define TEST_TYPE_ALIGN(type, align)
-# endif
+#endif
# ifdef _TYPE_ALIGNMENT
# define TEST_TARGET_ALIGN(type, align) C_ASSERT(_TYPE_ALIGNMENT(*(type)0) == align);
# define TEST_FIELD_ALIGN(type, field, align) C_ASSERT(_TYPE_ALIGNMENT(((type*)0)->field) == align);
-# else
+#else
# define TEST_TARGET_ALIGN(type, align)
# define TEST_FIELD_ALIGN(type, field, align)
-# endif
+#endif
# define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset);
ok(size > 0, "size=%d, expected non-zero\n", size);
str2 = HeapAlloc(GetProcessHeap(), 0, (size+20)*sizeof(CHAR));
- saved = size;
- hres = ObtainUserAgentString(0, str2, &size);
- ok(hres == S_OK, "ObtainUserAgentString failed: %08x\n", hres);
- ok(size == saved, "size=%d, expected %d\n", size, saved);
- ok(strlen(expected) <= strlen(str2) &&
- !memcmp(expected, str2, strlen(expected)*sizeof(CHAR)),
- "user agent was \"%s\", expected to start with \"%s\"\n",
- str2, expected);
-
- size = saved+10;
- hres = ObtainUserAgentString(0, str2, &size);
- ok(hres == S_OK, "ObtainUserAgentString failed: %08x\n", hres);
- ok(size == saved, "size=%d, expected %d\n", size, saved);
+ saved = size;
+ hres = ObtainUserAgentString(0, str2, &size);
+ ok(hres == S_OK, "ObtainUserAgentString failed: %08x\n", hres);
+ ok(size == saved, "size=%d, expected %d\n", size, saved);
+ ok(strlen(expected) <= strlen(str2) &&
+ !memcmp(expected, str2, strlen(expected)*sizeof(CHAR)),
+ "user agent was \"%s\", expected to start with \"%s\"\n",
+ str2, expected);
+
+ size = saved+10;
+ hres = ObtainUserAgentString(0, str2, &size);
+ ok(hres == S_OK, "ObtainUserAgentString failed: %08x\n", hres);
+ ok(size == saved, "size=%d, expected %d\n", size, saved);
size = 0;
hres = UrlMkGetSessionOption(URLMON_OPTION_USERAGENT, NULL, 0, &size, 0);
{
HRESULT hres;
- if(!state) {
+ if (!state) {
if(tested_protocol == HTTP_TEST || tested_protocol == HTTPS_TEST)
CLEAR_CALLED(ReportProgress_COOKIE_SENT);
if(tested_protocol == HTTP_TEST || tested_protocol == HTTPS_TEST || tested_protocol == FTP_TEST) {
- if (http_is_first) {
+ if (http_is_first) {
CLEAR_CALLED(ReportProgress_FINDINGRESOURCE);
CLEAR_CALLED(ReportProgress_CONNECTING);
CLEAR_CALLED(ReportProgress_PROXYDETECTING);
- } else todo_wine {
- CHECK_NOT_CALLED(ReportProgress_FINDINGRESOURCE);
+ } else todo_wine {
+ CHECK_NOT_CALLED(ReportProgress_FINDINGRESOURCE);
/* IE7 does call this */
CLEAR_CALLED(ReportProgress_CONNECTING);
- }
+ }
}
if(tested_protocol == FTP_TEST)
todo_wine CHECK_CALLED(ReportProgress_SENDINGREQUEST);
else if (tested_protocol != HTTPS_TEST)
- CHECK_CALLED(ReportProgress_SENDINGREQUEST);
+ CHECK_CALLED(ReportProgress_SENDINGREQUEST);
if(tested_protocol == HTTP_TEST || tested_protocol == HTTPS_TEST) {
- SET_EXPECT(OnResponse);
+ SET_EXPECT(OnResponse);
if(tested_protocol == HTTPS_TEST)
SET_EXPECT(ReportProgress_ACCEPTRANGES);
- SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE);
- if(bindf & BINDF_NEEDFILE)
- SET_EXPECT(ReportProgress_CACHEFILENAMEAVAILABLE);
- }
+ SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE);
+ if(bindf & BINDF_NEEDFILE)
+ SET_EXPECT(ReportProgress_CACHEFILENAMEAVAILABLE);
+ }
}
SET_EXPECT(ReportData);
if(tested_protocol == FTP_TEST)
CLEAR_CALLED(ReportData);
else if (! security_problem)
- CHECK_CALLED(ReportData);
+ CHECK_CALLED(ReportData);
if (!state) {
if (! security_problem)
{
- state = 1;
+ state = 1;
if(tested_protocol == HTTP_TEST || tested_protocol == HTTPS_TEST) {
- CHECK_CALLED(OnResponse);
+ CHECK_CALLED(OnResponse);
if(tested_protocol == HTTPS_TEST)
CHECK_CALLED(ReportProgress_ACCEPTRANGES);
- CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE);
- if(bindf & BINDF_NEEDFILE)
- CHECK_CALLED(ReportProgress_CACHEFILENAMEAVAILABLE);
- }
+ CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE);
+ if(bindf & BINDF_NEEDFILE)
+ CHECK_CALLED(ReportProgress_CACHEFILENAMEAVAILABLE);
+ }
}
else
{
pdata = pProtocolData;
if(binding_test) {
- SetEvent(event_complete);
+ SetEvent(event_complete);
WaitForSingleObject(event_complete2, INFINITE);
return S_OK;
}if(direct_read) {
CHECK_EXPECT(ReportData);
if(tested_protocol != BIND_TEST) {
- do {
+ do {
if(mimefilter_test)
SET_EXPECT(MimeFilter_Read);
else if(rec_depth > 1)
SET_EXPECT(Read2);
else
- SET_EXPECT(Read);
- hres = IInternetProtocol_Read(binding_protocol, expect_pv=buf, sizeof(buf), &read);
+ SET_EXPECT(Read);
+ hres = IInternetProtocol_Read(binding_protocol, expect_pv=buf, sizeof(buf), &read);
if(mimefilter_test)
CHECK_CALLED(MimeFilter_Read);
else if(rec_depth > 1)
CHECK_CALLED(Read2);
else
- CHECK_CALLED(Read);
- }while(hres == S_OK);
- }
+ CHECK_CALLED(Read);
+ }while(hres == S_OK);
+ }
}
rec_depth--;
if(tested_protocol == FTP_TEST)
ok(hrResult == E_PENDING || hrResult == S_OK, "hrResult = %08x, expected E_PENDING or S_OK\n", hrResult);
else
- ok(hrResult == expect_hrResult, "hrResult = %08x, expected: %08x\n",
- hrResult, expect_hrResult);
+ ok(hrResult == expect_hrResult, "hrResult = %08x, expected: %08x\n",
+ hrResult, expect_hrResult);
if(SUCCEEDED(hrResult) || tested_protocol == FTP_TEST)
ok(dwError == ERROR_SUCCESS, "dwError = %d, expected ERROR_SUCCESS\n", dwError);
else
if(IsEqualGUID(&IID_IWinInetInfo, riid)) {
CHECK_EXPECT(QueryInterface_IWinInetInfo);
- *ppv = NULL;
- return E_NOINTERFACE;
- }
+ *ppv = NULL;
+ return E_NOINTERFACE;
+}
if(IsEqualGUID(&IID_IWinInetHttpInfo, riid)) {
CHECK_EXPECT(QueryInterface_IWinInetHttpInfo);
*ppv = NULL;
return E_NOINTERFACE;
- }
+}
ok(0, "unexpected riid %s\n", debugstr_guid(riid));
*ppv = NULL;
ok(hres == S_OK, "Switch failed: %08x\n", hres);
if(!short_read) {
- prot_state = 2;
+ prot_state = 2;
if(mimefilter_test)
SET_EXPECT(MimeFilter_Switch);
else
- SET_EXPECT(Switch);
- hres = IInternetProtocolSink_Switch(binding_sink, &protocoldata);
+ SET_EXPECT(Switch);
+ hres = IInternetProtocolSink_Switch(binding_sink, &protocoldata);
ok(hres == S_OK, "Switch failed: %08x\n", hres);
if(mimefilter_test)
CHECK_CALLED(MimeFilter_Switch);
else
- CHECK_CALLED(Switch);
+ CHECK_CALLED(Switch);
- prot_state = 2;
+ prot_state = 2;
if(mimefilter_test)
SET_EXPECT(MimeFilter_Switch);
else
- SET_EXPECT(Switch);
- hres = IInternetProtocolSink_Switch(binding_sink, &protocoldata);
+ SET_EXPECT(Switch);
+ hres = IInternetProtocolSink_Switch(binding_sink, &protocoldata);
ok(hres == S_OK, "Switch failed: %08x\n", hres);
if(mimefilter_test)
CHECK_CALLED(MimeFilter_Switch);
else
- CHECK_CALLED(Switch);
+ CHECK_CALLED(Switch);
- prot_state = 3;
+ prot_state = 3;
if(mimefilter_test)
SET_EXPECT(MimeFilter_Switch);
else
- SET_EXPECT(Switch);
- hres = IInternetProtocolSink_Switch(binding_sink, &protocoldata);
+ SET_EXPECT(Switch);
+ hres = IInternetProtocolSink_Switch(binding_sink, &protocoldata);
ok(hres == S_OK, "Switch failed: %08x\n", hres);
if(mimefilter_test)
CHECK_CALLED(MimeFilter_Switch);
else
- CHECK_CALLED(Switch);
+ CHECK_CALLED(Switch);
}
SetEvent(event_complete);
CHECK_CALLED(ReportProgress_LOADINGMIMEHANDLER);
todo_wine CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE);
}else {
- CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE);
+ CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE);
}
if(mimefilter_test)
SET_EXPECT(MimeFilter_ReportData);
else
- SET_EXPECT(ReportData);
+ SET_EXPECT(ReportData);
hres = IInternetProtocolSink_ReportData(pOIProtSink,
BSCF_FIRSTDATANOTIFICATION | BSCF_LASTDATANOTIFICATION, 13, 13);
ok(hres == S_OK, "ReportData failed: %08x\n", hres);
if(mimefilter_test)
CHECK_CALLED(MimeFilter_ReportData);
else
- CHECK_CALLED(ReportData);
+ CHECK_CALLED(ReportData);
if(tested_protocol == BIND_TEST) {
hres = IInternetProtocol_Terminate(binding_protocol, 0);
if(mimefilter_test)
SET_EXPECT(MimeFilter_ReportResult);
else
- SET_EXPECT(ReportResult);
+ SET_EXPECT(ReportResult);
hres = IInternetProtocolSink_ReportResult(pOIProtSink, S_OK, 0, NULL);
ok(hres == S_OK, "ReportResult failed: %08x\n", hres);
if(mimefilter_test)
CHECK_CALLED(MimeFilter_ReportResult);
else
- CHECK_CALLED(ReportResult);
+ CHECK_CALLED(ReportResult);
return S_OK;
}
SET_EXPECT(MimeFilter_Start);
SET_EXPECT(ReportProgress_LOADINGMIMEHANDLER);
}else if(!(pi & PI_MIMEVERIFICATION)) {
- SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE);
+ SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE);
}
hres = IInternetProtocolSink_ReportProgress(binding_sink,
BINDSTATUS_MIMETYPEAVAILABLE, mimefilter_test ? gzipW : text_htmlW);
CHECK_CALLED(MimeFilter_Start);
CHECK_CALLED(ReportProgress_LOADINGMIMEHANDLER);
}else if(!(pi & PI_MIMEVERIFICATION)) {
- CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE);
+ CHECK_CALLED(ReportProgress_MIMETYPEAVAILABLE);
}
ok(hres == S_OK,
"ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE) failed: %08x\n", hres);
SET_EXPECT(ReportProgress_MIMETYPEAVAILABLE);
}
if(pr >= 200)
- SET_EXPECT(ReportData);
+ SET_EXPECT(ReportData);
}else {
SET_EXPECT(ReportData);
}
ok(cb == 700, "cb=%d\n", cb);
}else {
ok(expect_pv <= pv && (BYTE*)pv < (BYTE*)expect_pv + cb, "pv != expect_pv\n");
- }
+}
}else {
if(!read_report_data)
- CHECK_EXPECT(Read);
+ CHECK_EXPECT(Read);
- ok(pv == expect_pv, "pv != expect_pv\n");
- ok(cb == 1000, "cb=%d\n", cb);
+ ok(pv == expect_pv, "pv != expect_pv\n");
+ ok(cb == 1000, "cb=%d\n", cb);
ok(!*pcbRead, "*pcbRead = %d\n", *pcbRead);
}
ok(pcbRead != NULL, "pcbRead == NULL\n");
if(mimefilter_test)
SET_EXPECT(MimeFilter_ReportResult);
else
- SET_EXPECT(ReportResult);
+ SET_EXPECT(ReportResult);
hres = IInternetProtocolSink_ReportResult(binding_sink, S_OK, ERROR_SUCCESS, NULL);
ok(hres == S_OK, "ReportResult failed: %08x\n", hres);
if(mimefilter_test)
CHECK_CALLED(MimeFilter_ReportResult);
else
- CHECK_CALLED(ReportResult);
+ CHECK_CALLED(ReportResult);
memset(pv, 'x', 100);
prot_read += *pcbRead = 100;
if(SUCCEEDED(hres)) {
if(file_protocol_start(protocol, url, TRUE)) {
- hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
- ok(hres == S_OK, "Read failed: %08x\n", hres);
- ok(cb == 2, "cb=%u expected 2\n", cb);
- hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
- ok(hres == S_FALSE, "Read failed: %08x\n", hres);
- hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
- ok(hres == S_FALSE, "Read failed: %08x expected S_FALSE\n", hres);
- ok(cb == 0, "cb=%u expected 0\n", cb);
- hres = IInternetProtocol_UnlockRequest(protocol);
- ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres);
+ hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
+ ok(hres == S_OK, "Read failed: %08x\n", hres);
+ ok(cb == 2, "cb=%u expected 2\n", cb);
+ hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
+ ok(hres == S_FALSE, "Read failed: %08x\n", hres);
+ hres = IInternetProtocol_Read(protocol, buf, sizeof(buf), &cb);
+ ok(hres == S_FALSE, "Read failed: %08x expected S_FALSE\n", hres);
+ ok(cb == 0, "cb=%u expected 0\n", cb);
+ hres = IInternetProtocol_UnlockRequest(protocol);
+ ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres);
}
if(file_protocol_start(protocol, url, FALSE)) {
- hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
- ok(hres == S_FALSE, "Read failed: %08x\n", hres);
- hres = IInternetProtocol_LockRequest(protocol, 0);
- ok(hres == S_OK, "LockRequest failed: %08x\n", hres);
- hres = IInternetProtocol_UnlockRequest(protocol);
- ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres);
+ hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
+ ok(hres == S_FALSE, "Read failed: %08x\n", hres);
+ hres = IInternetProtocol_LockRequest(protocol, 0);
+ ok(hres == S_OK, "LockRequest failed: %08x\n", hres);
+ hres = IInternetProtocol_UnlockRequest(protocol);
+ ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres);
}
IInternetProtocol_Release(protocol);
if(SUCCEEDED(hres)) {
if(file_protocol_start(protocol, url, TRUE)) {
- hres = IInternetProtocol_LockRequest(protocol, 0);
- ok(hres == S_OK, "LockRequest failed: %08x\n", hres);
- hres = IInternetProtocol_Terminate(protocol, 0);
- ok(hres == S_OK, "Terminate failed: %08x\n", hres);
- hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
- ok(hres == S_OK, "Read failed: %08x\n\n", hres);
- hres = IInternetProtocol_UnlockRequest(protocol);
- ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres);
- hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
- ok(hres == S_OK, "Read failed: %08x\n", hres);
- hres = IInternetProtocol_Terminate(protocol, 0);
- ok(hres == S_OK, "Terminate failed: %08x\n", hres);
+ hres = IInternetProtocol_LockRequest(protocol, 0);
+ ok(hres == S_OK, "LockRequest failed: %08x\n", hres);
+ hres = IInternetProtocol_Terminate(protocol, 0);
+ ok(hres == S_OK, "Terminate failed: %08x\n", hres);
+ hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
+ ok(hres == S_OK, "Read failed: %08x\n\n", hres);
+ hres = IInternetProtocol_UnlockRequest(protocol);
+ ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres);
+ hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
+ ok(hres == S_OK, "Read failed: %08x\n", hres);
+ hres = IInternetProtocol_Terminate(protocol, 0);
+ ok(hres == S_OK, "Terminate failed: %08x\n", hres);
}
IInternetProtocol_Release(protocol);
if(SUCCEEDED(hres)) {
if(file_protocol_start(protocol, url, TRUE)) {
- hres = IInternetProtocol_Terminate(protocol, 0);
- ok(hres == S_OK, "Terminate failed: %08x\n", hres);
- hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
- ok(hres == S_OK, "Read failed: %08x\n", hres);
- ok(cb == 2, "cb=%u expected 2\n", cb);
+ hres = IInternetProtocol_Terminate(protocol, 0);
+ ok(hres == S_OK, "Terminate failed: %08x\n", hres);
+ hres = IInternetProtocol_Read(protocol, buf, 2, &cb);
+ ok(hres == S_OK, "Read failed: %08x\n", hres);
+ ok(cb == 2, "cb=%u expected 2\n", cb);
}
IInternetProtocol_Release(protocol);
if (!(bindf & BINDF_FROMURLMON))
SET_EXPECT(ReportProgress_DIRECTBIND);
if(!got_user_agent)
- SET_EXPECT(GetBindString_USER_AGENT);
+ SET_EXPECT(GetBindString_USER_AGENT);
SET_EXPECT(GetBindString_ACCEPT_MIMES);
SET_EXPECT(QueryService_HttpNegotiate);
SET_EXPECT(BeginningTransaction);
return;
if(!direct_read)
- SET_EXPECT(ReportResult);
+ SET_EXPECT(ReportResult);
expect_hrResult = S_OK;
if(direct_read) {
ok((hres == E_PENDING && cb==0) ||
(hres == S_OK && cb==1), "Read failed: %08x (%d bytes)\n", hres, cb);
- WaitForSingleObject(event_complete, INFINITE);
- if(bindf & BINDF_FROMURLMON)
- CHECK_CALLED(Switch);
- else
- CHECK_CALLED(ReportData);
+ WaitForSingleObject(event_complete, INFINITE);
+ if(bindf & BINDF_FROMURLMON)
+ CHECK_CALLED(Switch);
+ else
+ CHECK_CALLED(ReportData);
if(prot == HTTPS_TEST)
CLEAR_CALLED(QueryService_HttpSecurity);
- while(1) {
- if(bindf & BINDF_FROMURLMON)
- SET_EXPECT(Switch);
- else
- SET_EXPECT(ReportData);
+ while(1) {
+ if(bindf & BINDF_FROMURLMON)
+ SET_EXPECT(Switch);
+ else
+ SET_EXPECT(ReportData);
hres = IInternetProtocol_Read(async_protocol, buf, sizeof(buf), &cb);
- if(hres == E_PENDING) {
+ if(hres == E_PENDING) {
hres = IInternetProtocol_Read(async_protocol, buf, 1, &cb);
ok((hres == E_PENDING && cb==0) ||
(hres == S_OK && cb==1), "Read failed: %08x (%d bytes)\n", hres, cb);
- WaitForSingleObject(event_complete, INFINITE);
- if(bindf & BINDF_FROMURLMON)
- CHECK_CALLED(Switch);
- else
- CHECK_CALLED(ReportData);
- }else {
- if(bindf & BINDF_FROMURLMON)
- CHECK_NOT_CALLED(Switch);
- else
- CHECK_NOT_CALLED(ReportData);
- if(cb == 0) break;
- }
+ WaitForSingleObject(event_complete, INFINITE);
+ if(bindf & BINDF_FROMURLMON)
+ CHECK_CALLED(Switch);
+ else
+ CHECK_CALLED(ReportData);
+ } else {
+ if(bindf & BINDF_FROMURLMON)
+ CHECK_NOT_CALLED(Switch);
+ else
+ CHECK_NOT_CALLED(ReportData);
+ if(cb == 0) break;
}
- ok(hres == S_FALSE, "Read failed: %08x\n", hres);
- CHECK_CALLED(ReportResult);
+ }
+ ok(hres == S_FALSE, "Read failed: %08x\n", hres);
+ CHECK_CALLED(ReportResult);
}
if(prot == HTTPS_TEST)
CLEAR_CALLED(ReportProgress_SENDINGREQUEST);
ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres);
if(test_flags & TEST_EMULATEPROT) {
- hres = IInternetSession_RegisterNameSpace(session, &ClassFactory, &IID_NULL, protocol_names[prot], 0, NULL, 0);
- ok(hres == S_OK, "RegisterNameSpace failed: %08x\n", hres);
+ hres = IInternetSession_RegisterNameSpace(session, &ClassFactory, &IID_NULL, protocol_names[prot], 0, NULL, 0);
+ ok(hres == S_OK, "RegisterNameSpace failed: %08x\n", hres);
}
hres = IInternetSession_CreateBinding(session, NULL, binding_urls[prot], NULL, NULL, &protocol, 0);
while(prot_state < 4) {
WaitForSingleObject(event_complete, INFINITE);
if(mimefilter_test && filtered_protocol) {
- SET_EXPECT(Continue);
+ SET_EXPECT(Continue);
IInternetProtocol_Continue(filtered_protocol, pdata);
CHECK_CALLED(Continue);
}else {
SET_EXPECT(Continue);
- IInternetProtocol_Continue(protocol, pdata);
- CHECK_CALLED(Continue);
+ IInternetProtocol_Continue(protocol, pdata);
+ CHECK_CALLED(Continue);
}
SetEvent(event_complete2);
}
if(mimefilter_test)
SET_EXPECT(MimeFilter_LockRequest);
else
- SET_EXPECT(LockRequest);
+ SET_EXPECT(LockRequest);
hres = IInternetProtocol_LockRequest(protocol, 0);
ok(hres == S_OK, "LockRequest failed: %08x\n", hres);
if(mimefilter_test)
CHECK_CALLED(MimeFilter_LockRequest);
else
- CHECK_CALLED(LockRequest);
+ CHECK_CALLED(LockRequest);
if(mimefilter_test)
SET_EXPECT(MimeFilter_UnlockRequest);
else
- SET_EXPECT(UnlockRequest);
+ SET_EXPECT(UnlockRequest);
hres = IInternetProtocol_UnlockRequest(protocol);
ok(hres == S_OK, "UnlockRequest failed: %08x\n", hres);
if(mimefilter_test)
CHECK_CALLED(MimeFilter_UnlockRequest);
else
- CHECK_CALLED(UnlockRequest);
+ CHECK_CALLED(UnlockRequest);
}
if(mimefilter_test)
SET_EXPECT(MimeFilter_Terminate);
else
- SET_EXPECT(Terminate);
+ SET_EXPECT(Terminate);
hres = IInternetProtocol_Terminate(protocol, 0);
ok(hres == S_OK, "Terminate failed: %08x\n", hres);
if(mimefilter_test)
CLEAR_CALLED(MimeFilter_Terminate);
else
- CHECK_CALLED(Terminate);
+ CHECK_CALLED(Terminate);
if(filtered_protocol)
IInternetProtocol_Release(filtered_protocol);
if(test_flags & TEST_EMULATEPROT) {
hres = IInternetSession_UnregisterNameSpace(session, &ClassFactory, protocol_names[prot]);
ok(hres == S_OK, "UnregisterNameSpace failed: %08x\n", hres);
- }
+}
IInternetSession_Release(session);
}
const struct test winetest_testlist[] =
{
- { "generated", func_generated },
- { "misc", func_misc },
- { "protocol", func_protocol },
+ { "generated", func_generated },
+ { "misc", func_misc },
+ { "protocol", func_protocol },
{ "sec_mgr", func_sec_mgr },
- { "stream", func_stream },
- { "url", func_url },
+ { "stream", func_stream },
+ { "url", func_url },
{ 0, 0 }
};
if(IsEqualGUID(&IID_IInternetPriority, riid)) {
if(!is_urlmon_protocol(test_protocol))
- return E_NOINTERFACE;
+ return E_NOINTERFACE;
*ppv = &InternetPriority;
return S_OK;
- }
+}
if(IsEqualGUID(&IID_IInternetProtocolEx, riid))
return E_NOINTERFACE; /* TODO */
CHECK_CALLED(BeginningTransaction);
if (have_IHttpNegotiate2)
{
- CHECK_CALLED(QueryInterface_IHttpNegotiate2);
- CHECK_CALLED(GetRootSecurityId);
- }
+ CHECK_CALLED(QueryInterface_IHttpNegotiate2);
+ CHECK_CALLED(GetRootSecurityId);
+ }
CLEAR_CALLED(QueryInterface_IWindowForBindingUI);
}
if(test_protocol == FILE_TEST)
trace("test RegisterBindStatusCallback...\n");
if(test_RegisterBindStatusCallback()) {
trace("test BindToStorage failures...\n");
- test_BindToStorage_fail();
+ test_BindToStorage_fail();
- trace("synchronous http test (COM not initialised)...\n");
- test_BindToStorage(HTTP_TEST, FALSE, TYMED_ISTREAM);
+ trace("synchronous http test (COM not initialised)...\n");
+ test_BindToStorage(HTTP_TEST, FALSE, TYMED_ISTREAM);
- CoInitialize(NULL);
+ CoInitialize(NULL);
trace("test StdURLMoniker...\n");
test_StdURLMoniker();
- trace("synchronous http test...\n");
- test_BindToStorage(HTTP_TEST, FALSE, TYMED_ISTREAM);
+ trace("synchronous http test...\n");
+ test_BindToStorage(HTTP_TEST, FALSE, TYMED_ISTREAM);
- trace("synchronous http test (to object)...\n");
- test_BindToObject(HTTP_TEST, FALSE);
+ trace("synchronous http test (to object)...\n");
+ test_BindToObject(HTTP_TEST, FALSE);
- trace("synchronous file test...\n");
- test_BindToStorage(FILE_TEST, FALSE, TYMED_ISTREAM);
+ trace("synchronous file test...\n");
+ test_BindToStorage(FILE_TEST, FALSE, TYMED_ISTREAM);
- trace("synchronous file test (to object)...\n");
- test_BindToObject(FILE_TEST, FALSE);
+ trace("synchronous file test (to object)...\n");
+ test_BindToObject(FILE_TEST, FALSE);
- bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA;
+ bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA;
- trace("http test...\n");
- test_BindToStorage(HTTP_TEST, FALSE, TYMED_ISTREAM);
+ trace("http test...\n");
+ test_BindToStorage(HTTP_TEST, FALSE, TYMED_ISTREAM);
- trace("http test (to file)...\n");
- test_BindToStorage(HTTP_TEST, FALSE, TYMED_FILE);
+ trace("http test (to file)...\n");
+ test_BindToStorage(HTTP_TEST, FALSE, TYMED_FILE);
- trace("http test (to object)...\n");
- test_BindToObject(HTTP_TEST, FALSE);
+ trace("http test (to object)...\n");
+ test_BindToObject(HTTP_TEST, FALSE);
- trace("http test (short response)...\n");
- http_is_first = TRUE;
- urls[HTTP_TEST] = SHORT_RESPONSE_URL;
- test_BindToStorage(HTTP_TEST, FALSE, TYMED_ISTREAM);
+ trace("http test (short response)...\n");
+ http_is_first = TRUE;
+ urls[HTTP_TEST] = SHORT_RESPONSE_URL;
+ test_BindToStorage(HTTP_TEST, FALSE, TYMED_ISTREAM);
- trace("http test (short response, to object)...\n");
- test_BindToObject(HTTP_TEST, FALSE);
+ trace("http test (short response, to object)...\n");
+ test_BindToObject(HTTP_TEST, FALSE);
- trace("emulated http test...\n");
- test_BindToStorage(HTTP_TEST, TRUE, TYMED_ISTREAM);
+ trace("emulated http test...\n");
+ test_BindToStorage(HTTP_TEST, TRUE, TYMED_ISTREAM);
- trace("emulated http test (to object)...\n");
- test_BindToObject(HTTP_TEST, TRUE);
+ trace("emulated http test (to object)...\n");
+ test_BindToObject(HTTP_TEST, TRUE);
- trace("emulated http test (to file)...\n");
- test_BindToStorage(HTTP_TEST, TRUE, TYMED_FILE);
+ trace("emulated http test (to file)...\n");
+ test_BindToStorage(HTTP_TEST, TRUE, TYMED_FILE);
trace("asynchronous https test...\n");
test_BindToStorage(HTTPS_TEST, FALSE, TYMED_ISTREAM);
trace("emulated https test...\n");
test_BindToStorage(HTTPS_TEST, TRUE, TYMED_ISTREAM);
- trace("about test...\n");
- test_BindToStorage(ABOUT_TEST, FALSE, TYMED_ISTREAM);
+ trace("about test...\n");
+ test_BindToStorage(ABOUT_TEST, FALSE, TYMED_ISTREAM);
- trace("about test (to file)...\n");
- test_BindToStorage(ABOUT_TEST, FALSE, TYMED_FILE);
+ trace("about test (to file)...\n");
+ test_BindToStorage(ABOUT_TEST, FALSE, TYMED_FILE);
- trace("about test (to object)...\n");
- test_BindToObject(ABOUT_TEST, FALSE);
+ trace("about test (to object)...\n");
+ test_BindToObject(ABOUT_TEST, FALSE);
- trace("emulated about test...\n");
- test_BindToStorage(ABOUT_TEST, TRUE, TYMED_ISTREAM);
+ trace("emulated about test...\n");
+ test_BindToStorage(ABOUT_TEST, TRUE, TYMED_ISTREAM);
- trace("emulated about test (to file)...\n");
- test_BindToStorage(ABOUT_TEST, TRUE, TYMED_FILE);
+ trace("emulated about test (to file)...\n");
+ test_BindToStorage(ABOUT_TEST, TRUE, TYMED_FILE);
- trace("emulated about test (to object)...\n");
- test_BindToObject(ABOUT_TEST, TRUE);
+ trace("emulated about test (to object)...\n");
+ test_BindToObject(ABOUT_TEST, TRUE);
- trace("file test...\n");
- test_BindToStorage(FILE_TEST, FALSE, TYMED_ISTREAM);
+ trace("file test...\n");
+ test_BindToStorage(FILE_TEST, FALSE, TYMED_ISTREAM);
- trace("file test (to file)...\n");
- test_BindToStorage(FILE_TEST, FALSE, TYMED_FILE);
+ trace("file test (to file)...\n");
+ test_BindToStorage(FILE_TEST, FALSE, TYMED_FILE);
- trace("file test (to object)...\n");
- test_BindToObject(FILE_TEST, FALSE);
+ trace("file test (to object)...\n");
+ test_BindToObject(FILE_TEST, FALSE);
- trace("emulated file test...\n");
- test_BindToStorage(FILE_TEST, TRUE, TYMED_ISTREAM);
+ trace("emulated file test...\n");
+ test_BindToStorage(FILE_TEST, TRUE, TYMED_ISTREAM);
- trace("emulated file test (to file)...\n");
- test_BindToStorage(FILE_TEST, TRUE, TYMED_FILE);
+ trace("emulated file test (to file)...\n");
+ test_BindToStorage(FILE_TEST, TRUE, TYMED_FILE);
- trace("emulated file test (to object)...\n");
- test_BindToObject(FILE_TEST, TRUE);
+ trace("emulated file test (to object)...\n");
+ test_BindToObject(FILE_TEST, TRUE);
- trace("emulated its test...\n");
- test_BindToStorage(ITS_TEST, TRUE, TYMED_ISTREAM);
+ trace("emulated its test...\n");
+ test_BindToStorage(ITS_TEST, TRUE, TYMED_ISTREAM);
- trace("emulated its test (to file)...\n");
- test_BindToStorage(ITS_TEST, TRUE, TYMED_FILE);
+ trace("emulated its test (to file)...\n");
+ test_BindToStorage(ITS_TEST, TRUE, TYMED_FILE);
- trace("emulated mk test...\n");
- test_BindToStorage(MK_TEST, TRUE, TYMED_ISTREAM);
+ trace("emulated mk test...\n");
+ test_BindToStorage(MK_TEST, TRUE, TYMED_ISTREAM);
- trace("test URLDownloadToFile for file protocol...\n");
- test_URLDownloadToFile(FILE_TEST, FALSE);
+ trace("test URLDownloadToFile for file protocol...\n");
+ test_URLDownloadToFile(FILE_TEST, FALSE);
- trace("test URLDownloadToFile for emulated file protocol...\n");
- test_URLDownloadToFile(FILE_TEST, TRUE);
+ trace("test URLDownloadToFile for emulated file protocol...\n");
+ test_URLDownloadToFile(FILE_TEST, TRUE);
- trace("test URLDownloadToFile for http protocol...\n");
- test_URLDownloadToFile(HTTP_TEST, FALSE);
+ trace("test URLDownloadToFile for http protocol...\n");
+ test_URLDownloadToFile(HTTP_TEST, FALSE);
bindf |= BINDF_NOWRITECACHE;
trace("ftp test...\n");
test_BindToStorage(FTP_TEST, FALSE, TYMED_ISTREAM);
- trace("test failures...\n");
- test_BindToStorage_fail();
+ trace("test failures...\n");
+ test_BindToStorage_fail();
}
DeleteFileA(wszIndexHtmlA);
ret = broadcast( BSF_POSTMESSAGE|BSF_SENDNOTIFYMESSAGE, &recips, WM_NULL, 100, 0 );
if (ret)
{
- ok(ret==1, "Returned: %d\n", ret);
- ok(WaitForSingleObject(hevent, 0) != WAIT_OBJECT_0, "Synchronous message sent instead\n");
- PulseEvent(hevent);
-
- recips = BSM_APPLICATIONS;
- ret = broadcast( BSF_SENDNOTIFYMESSAGE, &recips, WM_NULL, 100, BROADCAST_QUERY_DENY );
- ok(ret==1, "Returned: %d\n", ret);
- ok(WaitForSingleObject(hevent, 0) != WAIT_TIMEOUT, "Asynchronous message sent instead\n");
- PulseEvent(hevent);
-
- recips = BSM_APPLICATIONS;
- ret = broadcast( BSF_SENDNOTIFYMESSAGE|BSF_QUERY, &recips, WM_NULL, 100, BROADCAST_QUERY_DENY );
- ok(!ret, "Returned: %d\n", ret);
- ok(WaitForSingleObject(hevent, 0) != WAIT_TIMEOUT, "Asynchronous message sent instead\n");
- PulseEvent(hevent);
+ ok(ret==1, "Returned: %d\n", ret);
+ ok(WaitForSingleObject(hevent, 0) != WAIT_OBJECT_0, "Synchronous message sent instead\n");
+ PulseEvent(hevent);
+
+ recips = BSM_APPLICATIONS;
+ ret = broadcast( BSF_SENDNOTIFYMESSAGE, &recips, WM_NULL, 100, BROADCAST_QUERY_DENY );
+ ok(ret==1, "Returned: %d\n", ret);
+ ok(WaitForSingleObject(hevent, 0) != WAIT_TIMEOUT, "Asynchronous message sent instead\n");
+ PulseEvent(hevent);
+
+ recips = BSM_APPLICATIONS;
+ ret = broadcast( BSF_SENDNOTIFYMESSAGE|BSF_QUERY, &recips, WM_NULL, 100, BROADCAST_QUERY_DENY );
+ ok(!ret, "Returned: %d\n", ret);
+ ok(WaitForSingleObject(hevent, 0) != WAIT_TIMEOUT, "Asynchronous message sent instead\n");
+ PulseEvent(hevent);
}
else /* BSF_SENDNOTIFYMESSAGE not supported on NT4 */
ok( GetLastError() == ERROR_INVALID_PARAMETER, "failed with err %u\n", GetLastError() );
if (wc.lpszMenuName && menu_name)
ok_(__FILE__,line)( !strcmp( menu_name, wc.lpszMenuName ),
"Wrong name %s/%s for class %s %p\n",
- wc.lpszMenuName, menu_name, name, inst );
+ wc.lpszMenuName, menu_name, name, inst );
else
ok_(__FILE__,line)( !menu_name == !wc.lpszMenuName, "Wrong name %p/%p for class %s %p\n",
- wc.lpszMenuName, menu_name, name, inst );
+ wc.lpszMenuName, menu_name, name, inst );
}
}
#define check_class(inst,name,menu) check_class_(__LINE__,inst,name,menu)
ok_(__FILE__,line)( GetClassInfo( inst, name, &wc ), "Couldn't find class %s inst %p\n", name, inst );
ok_(__FILE__,line)( wc.hInstance == info_inst, "Wrong info instance %p/%p for class %s\n",
- wc.hInstance, info_inst, name );
+ wc.hInstance, info_inst, name );
hwnd = CreateWindowExA( 0, name, "test_window", 0, 0, 0, 0, 0, 0, 0, inst, 0 );
ok_(__FILE__,line)( hwnd != NULL, "Couldn't create window for class %s inst %p\n", name, inst );
ok_(__FILE__,line)( (HINSTANCE)GetClassLongPtrA( hwnd, GCLP_HMODULE ) == gcl_inst,
- "Wrong GCL instance %p/%p for class %s\n",
+ "Wrong GCL instance %p/%p for class %s\n",
(HINSTANCE)GetClassLongPtrA( hwnd, GCLP_HMODULE ), gcl_inst, name );
ok_(__FILE__,line)( (HINSTANCE)GetWindowLongPtrA( hwnd, GWLP_HINSTANCE ) == inst,
- "Wrong GWL instance %p/%p for window %s\n",
+ "Wrong GWL instance %p/%p for window %s\n",
(HINSTANCE)GetWindowLongPtrA( hwnd, GWLP_HINSTANCE ), inst, name );
ok_(__FILE__,line)(!UnregisterClassA(name, inst),
"UnregisterClassA should fail while exists a class window\n");
ok(error == 0xdeadbeef, "Last error: %u\n", error);
if (!ret)
{
- cursor2 = GetCursor();
- ok(cursor2 == cursor, "Active was set to %p when trying to destroy it\n", cursor2);
- SetCursor(NULL);
-
- /* Trying to destroy the cursor properly fails now with
- * ERROR_INVALID_CURSOR_HANDLE. This happens because we called
- * DestroyCursor() 2+ times after calling SetCursor(). The calls to
- * GetCursor() and SetCursor(NULL) in between make no difference. */
- ret = DestroyCursor(cursor);
- todo_wine {
- ok(!ret, "DestroyCursor succeeded.\n");
- error = GetLastError();
+ cursor2 = GetCursor();
+ ok(cursor2 == cursor, "Active was set to %p when trying to destroy it\n", cursor2);
+ SetCursor(NULL);
+
+ /* Trying to destroy the cursor properly fails now with
+ * ERROR_INVALID_CURSOR_HANDLE. This happens because we called
+ * DestroyCursor() 2+ times after calling SetCursor(). The calls to
+ * GetCursor() and SetCursor(NULL) in between make no difference. */
+ ret = DestroyCursor(cursor);
+ todo_wine {
+ ok(!ret, "DestroyCursor succeeded.\n");
+ error = GetLastError();
ok(error == ERROR_INVALID_CURSOR_HANDLE || error == 0xdeadbeef, /* vista */
"Last error: 0x%08x\n", error);
- }
+ }
}
DeleteObject(cursorInfo.hbmMask);
hdata = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_REQUEST, default_timeout, &res);
ret = DdeGetLastError(client_pid);
ok(res == DDE_FNOTPROCESSED, "Expected DDE_FNOTPROCESSED, got %d\n", res);
-todo_wine
- ok(ret == DMLERR_MEMORY_ERROR, "Expected DMLERR_MEMORY_ERROR, got %d\n", ret);
+ todo_wine
+ ok(ret == DMLERR_MEMORY_ERROR, "Expected DMLERR_MEMORY_ERROR, got %d\n", ret);
if (hdata == NULL)
ok(FALSE, "hdata is NULL\n");
else
hdata = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_REQUEST, default_timeout, &res);
ret = DdeGetLastError(client_pid);
ok(ret == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", ret);
- ok(res == DDE_FNOTPROCESSED, "Expected DDE_FNOTPROCESSED, got %d\n", res);
+ ok(res == DDE_FNOTPROCESSED, "Expected DDE_FNOTPROCESSED, got %d\n", res);
if (hdata == NULL)
ok(FALSE, "hdata is NULL\n");
else
ret = DdeGetLastError(client_pid);
ok(op == NULL, "Expected NULL, got %p\n", op);
ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res);
- ok(ret == DMLERR_MEMORY_ERROR, "Expected DMLERR_MEMORY_ERROR, got %d\n", ret);
+ ok(ret == DMLERR_MEMORY_ERROR, "Expected DMLERR_MEMORY_ERROR, got %d\n", ret);
/* XTYP_EXECUTE, no data, -1 size */
res = 0xdeadbeef;
ret = DdeGetLastError(client_pid);
ok(op == NULL, "Expected NULL, got %p\n", op);
ok(res == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", res);
- ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret);
+ ok(ret == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", ret);
DdeFreeStringHandle(client_pid, topic);
DdeFreeDataHandle(hdata);
hdata = DdeClientTransaction(NULL, 0, conversation, item, CF_TEXT, XTYP_REQUEST, default_timeout, &res);
ret = DdeGetLastError(client_pid);
ok(ret == DMLERR_NO_ERROR, "Expected DMLERR_NO_ERROR, got %d\n", ret);
- ok(res == DDE_FNOTPROCESSED, "Expected DDE_FNOTPROCESSED, got %d\n", res);
+ ok(res == DDE_FNOTPROCESSED, "Expected DDE_FNOTPROCESSED, got %d\n", res);
if (hdata == NULL)
ok(FALSE, "hdata is NULL\n");
else
if (msg_index == 9 || msg_index == 11)
{
- ptr = (LPSTR)DdeAccessData(hdata, &size);
+ ptr = (LPSTR)DdeAccessData(hdata, &size);
- if (msg_index == 9)
- {
- ok(!lstrcmpA(ptr, "[Command(Var)]"), "Expected '[Command(Var)]', got %s\n", ptr);
- ok(size == 15, "Expected 15, got %d\n", size);
- ret = (HDDEDATA)DDE_FACK;
- }
- else
- {
- ok(!lstrcmpA(ptr, "[BadCommand(Var)]"), "Expected '[BadCommand(Var)]', got %s\n", ptr);
- ok(size == 18, "Expected 18, got %d\n", size);
+ if (msg_index == 9)
+ {
+ ok(!lstrcmpA(ptr, "[Command(Var)]"), "Expected '[Command(Var)]', got %s\n", ptr);
+ ok(size == 15, "Expected 15, got %d\n", size);
+ ret = (HDDEDATA)DDE_FACK;
+ }
+ else
+ {
+ ok(!lstrcmpA(ptr, "[BadCommand(Var)]"), "Expected '[BadCommand(Var)]', got %s\n", ptr);
+ ok(size == 18, "Expected 18, got %d\n", size);
ret = DDE_FNOTPROCESSED;
- }
+ }
- DdeUnaccessData(hdata);
+ DdeUnaccessData(hdata);
}
else if (msg_index == 10)
{
lparam = PackDDElParam(WM_DDE_POKE, 0, item);
/* win9x returns 0 here and crashes in PostMessageA */
if (lparam) {
- PostMessageA(server_hwnd, WM_DDE_POKE, (WPARAM)client_hwnd, lparam);
- flush_events();
+ PostMessageA(server_hwnd, WM_DDE_POKE, (WPARAM)client_hwnd, lparam);
+ flush_events();
}
else
win_skip("no lparam for WM_DDE_POKE\n");
if (0) {
/* do not test with an invalid instance id: that crashes on win9x */
- hdata = DdeCreateDataHandle(0xdeadbeef, (LPBYTE)"data", MAX_PATH, 0, item, CF_TEXT, 0);
+ hdata = DdeCreateDataHandle(0xdeadbeef, (LPBYTE)"data", MAX_PATH, 0, item, CF_TEXT, 0);
}
/* 0 instance id
DdeGetLastError(dde_inst2);
hdata = DdeCreateDataHandle(0, (LPBYTE)"data", MAX_PATH, 0, item, CF_TEXT, 0);
err = DdeGetLastError(dde_inst);
- ok(hdata == NULL, "Expected NULL, got %p\n", hdata);
+ ok(hdata == NULL, "Expected NULL, got %p\n", hdata);
ok(err == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", err);
err = DdeGetLastError(dde_inst2);
ok(err == DMLERR_INVALIDPARAMETER, "Expected DMLERR_INVALIDPARAMETER, got %d\n", err);
lparam = PackDDElParam(WM_DDE_ADVISE, 0xcafe, 0xbeef);
/* win9x returns 0 here */
if (lparam) {
- ptr = GlobalLock((HGLOBAL)lparam);
- ok(ptr != NULL, "Expected non-NULL ptr\n");
- ok(ptr[0] == 0xcafe, "Expected 0xcafe, got %08lx\n", ptr[0]);
- ok(ptr[1] == 0xbeef, "Expected 0xbeef, got %08lx\n", ptr[1]);
+ ptr = GlobalLock((HGLOBAL)lparam);
+ ok(ptr != NULL, "Expected non-NULL ptr\n");
+ ok(ptr[0] == 0xcafe, "Expected 0xcafe, got %08lx\n", ptr[0]);
+ ok(ptr[1] == 0xbeef, "Expected 0xbeef, got %08lx\n", ptr[1]);
- ret = GlobalUnlock((HGLOBAL)lparam);
- ok(ret == 1, "Expected 1, got %d\n", ret);
+ ret = GlobalUnlock((HGLOBAL)lparam);
+ ok(ret == 1, "Expected 1, got %d\n", ret);
- lo = hi = 0;
- ret = UnpackDDElParam(WM_DDE_ADVISE, lparam, &lo, &hi);
- ok(ret == TRUE, "Expected TRUE, got %d\n", ret);
- ok(lo == 0xcafe, "Expected 0xcafe, got %08lx\n", lo);
- ok(hi == 0xbeef, "Expected 0xbeef, got %08lx\n", hi);
+ lo = hi = 0;
+ ret = UnpackDDElParam(WM_DDE_ADVISE, lparam, &lo, &hi);
+ ok(ret == TRUE, "Expected TRUE, got %d\n", ret);
+ ok(lo == 0xcafe, "Expected 0xcafe, got %08lx\n", lo);
+ ok(hi == 0xbeef, "Expected 0xbeef, got %08lx\n", hi);
}
else
win_skip("no lparam for WM_DDE_ADVISE\n");
lparam = PackDDElParam(WM_DDE_ACK, 0xcafe, 0xbeef);
/* win9x returns the input (0xbeef<<16 | 0xcafe) here */
if (lparam != (int)0xbeefcafe) {
- ptr = GlobalLock((HGLOBAL)lparam);
- ok(ptr != NULL, "Expected non-NULL ptr\n");
- ok(ptr[0] == 0xcafe, "Expected 0xcafe, got %08lx\n", ptr[0]);
- ok(ptr[1] == 0xbeef, "Expected 0xbeef, got %08lx\n", ptr[1]);
+ ptr = GlobalLock((HGLOBAL)lparam);
+ ok(ptr != NULL, "Expected non-NULL ptr\n");
+ ok(ptr[0] == 0xcafe, "Expected 0xcafe, got %08lx\n", ptr[0]);
+ ok(ptr[1] == 0xbeef, "Expected 0xbeef, got %08lx\n", ptr[1]);
- ret = GlobalUnlock((HGLOBAL)lparam);
- ok(ret == 1, "Expected 1, got %d\n", ret);
+ ret = GlobalUnlock((HGLOBAL)lparam);
+ ok(ret == 1, "Expected 1, got %d\n", ret);
- lo = hi = 0;
- ret = UnpackDDElParam(WM_DDE_ACK, lparam, &lo, &hi);
- ok(ret == TRUE, "Expected TRUE, got %d\n", ret);
- ok(lo == 0xcafe, "Expected 0xcafe, got %08lx\n", lo);
- ok(hi == 0xbeef, "Expected 0xbeef, got %08lx\n", hi);
+ lo = hi = 0;
+ ret = UnpackDDElParam(WM_DDE_ACK, lparam, &lo, &hi);
+ ok(ret == TRUE, "Expected TRUE, got %d\n", ret);
+ ok(lo == 0xcafe, "Expected 0xcafe, got %08lx\n", lo);
+ ok(hi == 0xbeef, "Expected 0xbeef, got %08lx\n", hi);
- ret = FreeDDElParam(WM_DDE_ACK, lparam);
- ok(ret == TRUE, "Expected TRUE, got %d\n", ret);
+ ret = FreeDDElParam(WM_DDE_ACK, lparam);
+ ok(ret == TRUE, "Expected TRUE, got %d\n", ret);
}
else
win_skip("got lparam 0x%lx for WM_DDE_ACK\n", lparam);
lparam = PackDDElParam(WM_DDE_DATA, 0xcafe, 0xbeef);
/* win9x returns 0 here */
if (lparam) {
- ptr = GlobalLock((HGLOBAL)lparam);
- ok(ptr != NULL, "Expected non-NULL ptr\n");
- ok(ptr[0] == 0xcafe, "Expected 0xcafe, got %08lx\n", ptr[0]);
- ok(ptr[1] == 0xbeef, "Expected 0xbeef, got %08lx\n", ptr[1]);
+ ptr = GlobalLock((HGLOBAL)lparam);
+ ok(ptr != NULL, "Expected non-NULL ptr\n");
+ ok(ptr[0] == 0xcafe, "Expected 0xcafe, got %08lx\n", ptr[0]);
+ ok(ptr[1] == 0xbeef, "Expected 0xbeef, got %08lx\n", ptr[1]);
- ret = GlobalUnlock((HGLOBAL)lparam);
- ok(ret == 1, "Expected 1, got %d\n", ret);
+ ret = GlobalUnlock((HGLOBAL)lparam);
+ ok(ret == 1, "Expected 1, got %d\n", ret);
- lo = hi = 0;
- ret = UnpackDDElParam(WM_DDE_DATA, lparam, &lo, &hi);
- ok(ret == TRUE, "Expected TRUE, got %d\n", ret);
- ok(lo == 0xcafe, "Expected 0xcafe, got %08lx\n", lo);
- ok(hi == 0xbeef, "Expected 0xbeef, got %08lx\n", hi);
+ lo = hi = 0;
+ ret = UnpackDDElParam(WM_DDE_DATA, lparam, &lo, &hi);
+ ok(ret == TRUE, "Expected TRUE, got %d\n", ret);
+ ok(lo == 0xcafe, "Expected 0xcafe, got %08lx\n", lo);
+ ok(hi == 0xbeef, "Expected 0xbeef, got %08lx\n", hi);
}
else
win_skip("no lparam for WM_DDE_DATA\n");
lparam = PackDDElParam(WM_DDE_POKE, 0xcafe, 0xbeef);
/* win9x returns 0 here */
if (lparam) {
- ptr = GlobalLock((HGLOBAL)lparam);
- ok(ptr != NULL, "Expected non-NULL ptr\n");
- ok(ptr[0] == 0xcafe, "Expected 0xcafe, got %08lx\n", ptr[0]);
- ok(ptr[1] == 0xbeef, "Expected 0xbeef, got %08lx\n", ptr[1]);
+ ptr = GlobalLock((HGLOBAL)lparam);
+ ok(ptr != NULL, "Expected non-NULL ptr\n");
+ ok(ptr[0] == 0xcafe, "Expected 0xcafe, got %08lx\n", ptr[0]);
+ ok(ptr[1] == 0xbeef, "Expected 0xbeef, got %08lx\n", ptr[1]);
- ret = GlobalUnlock((HGLOBAL)lparam);
- ok(ret == 1, "Expected 1, got %d\n", ret);
+ ret = GlobalUnlock((HGLOBAL)lparam);
+ ok(ret == 1, "Expected 1, got %d\n", ret);
- lo = hi = 0;
- ret = UnpackDDElParam(WM_DDE_POKE, lparam, &lo, &hi);
- ok(ret == TRUE, "Expected TRUE, got %d\n", ret);
- ok(lo == 0xcafe, "Expected 0xcafe, got %08lx\n", lo);
- ok(hi == 0xbeef, "Expected 0xbeef, got %08lx\n", hi);
+ lo = hi = 0;
+ ret = UnpackDDElParam(WM_DDE_POKE, lparam, &lo, &hi);
+ ok(ret == TRUE, "Expected TRUE, got %d\n", ret);
+ ok(lo == 0xcafe, "Expected 0xcafe, got %08lx\n", lo);
+ ok(hi == 0xbeef, "Expected 0xbeef, got %08lx\n", hi);
}
else
win_skip("no lparam for WM_DDE_POKE\n");
"got %d\n", LOWORD(margins));
ok(HIWORD(margins) == 0 || broken(HIWORD(margins) == HIWORD(font_margins)), /* win95 */
"got %d\n", HIWORD(margins));
-
+
SendMessageA(hwEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(1,0));
SendMessageA(hwEdit, WM_SETFONT, (WPARAM)hfont, 0);
margins = SendMessage(hwEdit, EM_GETMARGINS, 0, 0);
"got %d\n", LOWORD(margins));
ok(HIWORD(margins) == 1 || broken(HIWORD(margins) != 1 && HIWORD(margins) != HIWORD(font_margins)), /* win95 */
"got %d\n", HIWORD(margins));
-
+
/* Above a certain size threshold then the margin is updated */
SetWindowPos(hwEdit, NULL, 10, 10, 1000, 100, SWP_NOZORDER | SWP_NOACTIVATE);
SendMessageA(hwEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(1,0));
# ifdef TYPE_ALIGNMENT
# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align);
-# else
+#else
# define TEST_TYPE_ALIGN(type, align)
-# endif
+#endif
# ifdef _TYPE_ALIGNMENT
# define TEST_TARGET_ALIGN(type, align) C_ASSERT(_TYPE_ALIGNMENT(*(type)0) == align);
# define TEST_FIELD_ALIGN(type, field, align) C_ASSERT(_TYPE_ALIGNMENT(((type*)0)->field) == align);
-# else
+#else
# define TEST_TARGET_ALIGN(type, align)
# define TEST_FIELD_ALIGN(type, field, align)
-# endif
+#endif
# define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset);
MSGNAME[msg.message - WM_KEYFIRST], msg.wParam, msg.lParam, msg.time);
if( i < kmctr ) {
ok( msg.message == expmsg[i].message &&
- msg.wParam == expmsg[i].wParam &&
- msg.lParam == expmsg[i].lParam,
+ msg.wParam == expmsg[i].wParam &&
+ msg.lParam == expmsg[i].lParam,
"%u/%u: wrong message %x/%08lx/%08lx expected %s/%08lx/%08lx\n",
seqnr, i, msg.message, msg.wParam, msg.lParam,
MSGNAME[(expmsg[i]).message - WM_KEYFIRST], expmsg[i].wParam, expmsg[i].lParam );
LPARAM lParam )
{
return DefWindowProcA( hWnd, msg, wParam, lParam );
-}
+ }
static void test_Input_whitebox(void)
{
wclass.lpfnWndProc = WndProc;
wclass.hInstance = hInstance;
wclass.hIcon = LoadIconA( 0, IDI_APPLICATION );
- wclass.hCursor = LoadCursorA( NULL, IDC_ARROW );
- wclass.hbrBackground = (HBRUSH)( COLOR_WINDOW + 1 );
+ wclass.hCursor = LoadCursorA( NULL, IDC_ARROW);
+ wclass.hbrBackground = (HBRUSH)( COLOR_WINDOW + 1);
wclass.lpszMenuName = 0;
wclass.cbClsExtra = 0;
wclass.cbWndExtra = 0;
RegisterClassA( &wclass );
/* create the test window that will receive the keystrokes */
hWndTest = CreateWindowA( wclass.lpszClassName, "InputSysKeyTest",
- WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, 100, 100,
+ WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, 100, 100,
NULL, NULL, hInstance, NULL);
assert( hWndTest );
ShowWindow( hWndTest, SW_SHOW);
if (MsgWaitForMultipleObjects(0, NULL, FALSE, min_timeout, QS_ALLINPUT) == WAIT_TIMEOUT) break;
while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE))
{
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
- diff = time - GetTickCount();
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
}
+ diff = time - GetTickCount();
+}
}
struct transition_s {
ok(sent_messages_cnt < MAXKEYMESSAGES, "Too many messages\n");
if (sent_messages_cnt < MAXKEYMESSAGES)
{
- sent_messages[sent_messages_cnt].message = Msg;
- sent_messages[sent_messages_cnt].flags = 0;
- sent_messages[sent_messages_cnt].wParam = wParam;
- sent_messages[sent_messages_cnt++].lParam = HIWORD(lParam) & (KF_UP|KF_EXTENDED);
- }
+ sent_messages[sent_messages_cnt].message = Msg;
+ sent_messages[sent_messages_cnt].flags = 0;
+ sent_messages[sent_messages_cnt].wParam = wParam;
+ sent_messages[sent_messages_cnt++].lParam = HIWORD(lParam) & (KF_UP|KF_EXTENDED);
+ }
}
return DefWindowProc(hWnd, Msg, wParam, lParam);
}
ok(sent_messages_cnt < MAXKEYMESSAGES, "Too many messages\n");
if (sent_messages_cnt < MAXKEYMESSAGES)
{
- sent_messages[sent_messages_cnt].message = wparam;
- sent_messages[sent_messages_cnt].flags = hook;
- sent_messages[sent_messages_cnt].wParam = hook_info->vkCode;
- sent_messages[sent_messages_cnt++].lParam = hook_info->flags & (LLKHF_UP|LLKHF_EXTENDED);
+ sent_messages[sent_messages_cnt].message = wparam;
+ sent_messages[sent_messages_cnt].flags = hook;
+ sent_messages[sent_messages_cnt].wParam = hook_info->vkCode;
+ sent_messages[sent_messages_cnt++].lParam = hook_info->flags & (LLKHF_UP|LLKHF_EXTENDED);
}
if(0) /* For some reason not stable on Wine */
if (retval == -1)
ok(GetLastError() == ERROR_POINT_NOT_FOUND, "unexpected error %u\n", GetLastError());
else
- ok(retval == count, "expected GetMouseMovePointsEx to succeed, got %d\n", retval);
+ ok(retval == count, "expected GetMouseMovePointsEx to succeed, got %d\n", retval);
/* test fourth parameter
* a value higher than 64 is expected to fail with ERROR_INVALID_PARAMETER
if (retval == -1)
ok(GetLastError() == ERROR_POINT_NOT_FOUND, "unexpected error %u\n", GetLastError());
else
- ok(retval == count, "expected GetMouseMovePointsEx to succeed, got %d\n", retval);
+ ok(retval == count, "expected GetMouseMovePointsEx to succeed, got %d\n", retval);
SetLastError(MYERROR);
count = BUFLIM;
if (retval == -1)
ok(GetLastError() == ERROR_POINT_NOT_FOUND, "unexpected error %u\n", GetLastError());
else
- ok((0 <= retval) && (retval <= count), "expected GetMouseMovePointsEx to succeed, got %d\n", retval);
+ ok((0 <= retval) && (retval <= count), "expected GetMouseMovePointsEx to succeed, got %d\n", retval);
SetLastError(MYERROR);
retval = pGetMouseMovePointsEx(sizeof(MOUSEMOVEPOINT), &in, out, BUFLIM+1, GMMP_USE_DISPLAY_POINTS);
ok(vkey != numpad_collisions[i][0],
"Got numpad vKey %x for scan code %x when there was another choice\n",
vkey, numpad_scan);
- }
+}
}
}
if (itemCount && GetCurrentDirectoryA( MAX_PATH, pathBuffer ) > 3) /* there's no [..] in drive root */
{
- memset(pathBuffer, 0, MAX_PATH);
- SendMessage(hList, LB_GETTEXT, 0, (LPARAM)pathBuffer);
+ memset(pathBuffer, 0, MAX_PATH);
+ SendMessage(hList, LB_GETTEXT, 0, (LPARAM)pathBuffer);
ok( !strcmp(pathBuffer, "[..]"), "First element is not [..]\n");
}
if (itemCount && GetCurrentDirectoryA( MAX_PATH, pathBuffer ) > 3) /* there's no [..] in drive root */
{
- memset(pathBuffer, 0, MAX_PATH);
- SendMessage(g_listBox, LB_GETTEXT, 0, (LPARAM)pathBuffer);
- ok( !strcmp(pathBuffer, "[..]"), "First (and only) element is not [..]\n");
+ memset(pathBuffer, 0, MAX_PATH);
+ SendMessage(g_listBox, LB_GETTEXT, 0, (LPARAM)pathBuffer);
+ ok( !strcmp(pathBuffer, "[..]"), "First (and only) element is not [..]\n");
}
/* Test behavior when no files match the wildcard */
/* the tests should however succeed on win2000, XP and Wine (at least up to 1.1.15) */
/* with a variety of dpis and desktop font sizes */
{
- /* check menu width */
- if( ispop)
- expect = ( text || hbmp ?
- 4 + (mnuopt != 1 ? GetSystemMetrics(SM_CXMENUCHECK) : 0)
- : 0) +
+ /* check menu width */
+ if( ispop)
+ expect = ( text || hbmp ?
+ 4 + (mnuopt != 1 ? GetSystemMetrics(SM_CXMENUCHECK) : 0)
+ : 0) +
arrowwidth + MOD_avec + (hbmp ?
((INT_PTR)hbmp<0||(INT_PTR)hbmp>12 ? bmpsize.cx + 2 : GetSystemMetrics( SM_CXMENUSIZE) + 2)
: 0) +
- (text && hastab ? /* TAB space */
- MOD_avec + ( hastab==2 ? sc_size.cx : 0) : 0) +
- (text ? 2 + (text[0] ? size.cx :0): 0) ;
- else
- expect = !(text || hbmp) ? 0 :
- ( hbmp ? (text ? 2:0) + bmpsize.cx : 0 ) +
- (text ? 2 * MOD_avec + (text[0] ? size.cx :0): 0) ;
- ok( rc.right - rc.left == expect,
+ (text && hastab ? /* TAB space */
+ MOD_avec + ( hastab==2 ? sc_size.cx : 0) : 0) +
+ (text ? 2 + (text[0] ? size.cx :0): 0) ;
+ else
+ expect = !(text || hbmp) ? 0 :
+ ( hbmp ? (text ? 2:0) + bmpsize.cx : 0 ) +
+ (text ? 2 * MOD_avec + (text[0] ? size.cx :0): 0) ;
+ ok( rc.right - rc.left == expect,
"menu width wrong, got %d expected %d\n", rc.right - rc.left, expect);
- failed = failed || !(rc.right - rc.left == expect);
- /* check menu height */
- if( ispop)
- expect = max( ( !(text || hbmp) ? GetSystemMetrics( SM_CYMENUSIZE)/2 : 0),
- max( (text ? max( 2 + size.cy, MOD_hic + 4) : 0),
+ failed = failed || !(rc.right - rc.left == expect);
+ /* check menu height */
+ if( ispop)
+ expect = max( ( !(text || hbmp) ? GetSystemMetrics( SM_CYMENUSIZE)/2 : 0),
+ max( (text ? max( 2 + size.cy, MOD_hic + 4) : 0),
(hbmp ?
((INT_PTR)hbmp<0||(INT_PTR)hbmp>12 ?
bmpsize.cy + 2
: GetSystemMetrics( SM_CYMENUSIZE) + 2)
: 0)));
- else
- expect = ( !(text || hbmp) ? GetSystemMetrics( SM_CYMENUSIZE)/2 :
- max( GetSystemMetrics( SM_CYMENU) - 1, (hbmp ? bmpsize.cy : 0)));
- ok( rc.bottom - rc.top == expect,
+ else
+ expect = ( !(text || hbmp) ? GetSystemMetrics( SM_CYMENUSIZE)/2 :
+ max( GetSystemMetrics( SM_CYMENU) - 1, (hbmp ? bmpsize.cy : 0)));
+ ok( rc.bottom - rc.top == expect,
"menu height wrong, got %d expected %d (%d)\n",
rc.bottom - rc.top, expect, GetSystemMetrics( SM_CYMENU));
- failed = failed || !(rc.bottom - rc.top == expect);
- if( hbmp == HBMMENU_CALLBACK && MOD_GotDrawItemMsg) {
- /* check the position of the bitmap */
- /* horizontal */
+ failed = failed || !(rc.bottom - rc.top == expect);
+ if( hbmp == HBMMENU_CALLBACK && MOD_GotDrawItemMsg) {
+ /* check the position of the bitmap */
+ /* horizontal */
if (!ispop)
expect = 3;
else if (mnuopt == 0)
expect = 4;
else /* mnuopt == 2 */
expect = 2;
- ok( expect == MOD_rc[0].left,
+ ok( expect == MOD_rc[0].left,
"bitmap left is %d expected %d\n", MOD_rc[0].left, expect);
- failed = failed || !(expect == MOD_rc[0].left);
- /* vertical */
- expect = (rc.bottom - rc.top - MOD_rc[0].bottom + MOD_rc[0].top) / 2;
- ok( expect == MOD_rc[0].top,
+ failed = failed || !(expect == MOD_rc[0].left);
+ /* vertical */
+ expect = (rc.bottom - rc.top - MOD_rc[0].bottom + MOD_rc[0].top) / 2;
+ ok( expect == MOD_rc[0].top,
"bitmap top is %d expected %d\n", MOD_rc[0].top, expect);
- failed = failed || !(expect == MOD_rc[0].top);
- }
+ failed = failed || !(expect == MOD_rc[0].top);
+ }
}
/* if there was a failure, report details */
if( failed) {
{
ok_(__FILE__, line)( !ret, "GetMenuItemInfo should have failed.\n" );
return;
- }
+}
ok_(__FILE__, line)( ret, "GetMenuItemInfo failed, err %u\n", GetLastError());
if (mask & MIIM_TYPE)
ok_(__FILE__, line)( info.fType == type || info.fType == LOWORD(type),
#define TMII_INSMI( c1,d1,e1,f1,g1,h1,i1,j1,k1,l1,m1,eret1 )\
hmenu = CreateMenu();\
submenu = CreateMenu();\
- if(ansi)strcpy( string, init );\
+ if(ansi)strcpy( string, init);\
else strcpyW( string, init );\
insert_menu_item( __LINE__, hmenu, ansi, c1, d1, e1, f1, g1, h1, i1, j1, k1, l1, m1, eret1 )
0, 0, 0, 0, 0, 0, 0, string, 80, 0,
init, OK, OK );
TMII_DONE
- /* some tests with small cbSize: the hbmpItem is to be ignored */
+ /* some tests with small cbSize: the hbmpItem is to be ignored */
TMII_INSMI( MIIM_BITMAP, -1, -1, -1, 0, 0, 0, -1, 0, -1, dummy_hbm, OK );
TMII_GMII ( MIIM_TYPE, 80,
MFT_SEPARATOR, 0, 0, 0, 0, 0, 0, NULL, 0, NULL,
wclass.hInstance = hInstance;
wclass.hIcon = LoadIconA( 0, IDI_APPLICATION );
wclass.hCursor = LoadCursorA( NULL, IDC_ARROW );
- wclass.hbrBackground = (HBRUSH)( COLOR_WINDOW + 1 );
+ wclass.hbrBackground = (HBRUSH)( COLOR_WINDOW + 1);
wclass.lpszMenuName = 0;
wclass.cbClsExtra = 0;
wclass.cbWndExtra = 0;
wclass.hInstance = GetModuleHandleA( NULL );
wclass.hIcon = LoadIconA( 0, IDI_APPLICATION );
wclass.hCursor = LoadCursorA( NULL, IDC_ARROW );
- wclass.hbrBackground = (HBRUSH)( COLOR_WINDOW + 1 );
+ wclass.hbrBackground = (HBRUSH)( COLOR_WINDOW + 1);
wclass.lpszMenuName = 0;
wclass.cbClsExtra = 0;
wclass.cbWndExtra = 0;
primary_monitor_device_name[0] = 0;
ret = pEnumDisplayMonitors(NULL, NULL, monitor_enum_proc, (LPARAM)primary_monitor_device_name);
ok(ret, "EnumDisplayMonitors failed\n");
- ok(!strcmp(primary_monitor_device_name, primary_device_name),
- "monitor device name %s, device name %s\n", primary_monitor_device_name,
- primary_device_name);
-}
+ ok(!strcmp(primary_monitor_device_name, primary_device_name),
+ "monitor device name %s, device name %s\n", primary_monitor_device_name,
+ primary_device_name);
+ }
struct vid_mode
{
{
init_function_pointers();
test_enumdisplaydevices();
- test_ChangeDisplaySettingsEx();
- test_monitors();
+ test_ChangeDisplaySettingsEx();
+ test_monitors();
test_work_area();
}
static void ok_sequence_(const struct message *expected_list, const char *context, int todo,
- const char *file, int line)
+ const char *file, int line)
{
static const struct recvd_message end_of_sequence;
const struct message *expected = expected_list;
const struct recvd_message *actual;
int failcount = 0, dump = 0;
unsigned int count = 0;
-
+
add_message(&end_of_sequence);
actual = sequence;
"%s: %u: in msg 0x%04x expecting wParam 0x%lx got 0x%lx\n",
context, count, expected->message, expected->wParam, actual->wParam);
if ((expected->wParam ^ actual->wParam) & ~expected->wp_mask) dump++;
- }
+ }
}
if (expected->flags & lparam)
"%s: %u: in msg 0x%04x expecting lParam 0x%lx got 0x%lx\n",
context, count, expected->message, expected->lParam, actual->lParam);
if ((expected->lParam ^ actual->lParam) & ~expected->lp_mask) dump++;
- }
+ }
}
if ((expected->flags & optional) &&
((expected->flags ^ actual->flags) & (defwinproc|parent)))
/* skip all optional trailing messages */
while (expected->message && ((expected->flags & optional) ||
((expected->flags & hook) && !hCBT_hook) ||
- ((expected->flags & winevent_hook) && !hEvent_hook)))
+ ((expected->flags & winevent_hook) && !hEvent_hook)))
expected++;
if (todo)
dump++;
ok_( file, line) (FALSE, "%s: %u: the msg sequence is not complete: expected %04x - actual %04x\n",
context, count, expected->message, actual->message);
- }
+ }
}
if( todo && !failcount) /* succeeded yet marked todo */
todo_wine {
return 0;
case WM_NCHITTEST:
return HTCLIENT;
- }
+ }
msg.hwnd = hwnd;
msg.message = message;
if (GetWindowLongW( hwnd, GWL_STYLE ) & WS_MAXIMIZE)
{
- ShowWindow(hwnd, SW_RESTORE);
+ ShowWindow(hwnd, SW_RESTORE);
flush_events();
ok_sequence(WmShowRestoreMaxOverlappedSeq, "ShowWindow(SW_RESTORE):overlapped", TRUE);
- flush_sequence();
+ flush_sequence();
}
ShowWindow(hwnd, SW_MINIMIZE);
if (GetWindowLongW( hwnd, GWL_STYLE ) & WS_MINIMIZE)
{
- ShowWindow(hwnd, SW_RESTORE);
+ ShowWindow(hwnd, SW_RESTORE);
flush_events();
ok_sequence(WmShowRestoreMinOverlappedSeq, "ShowWindow(SW_RESTORE):overlapped", TRUE);
- flush_sequence();
+ flush_sequence();
}
ShowWindow(hwnd, SW_SHOW);
/* fall through */
default:
msg.hwnd = hwnd;
- msg.message = message;
- msg.flags = sent|wparam|lparam;
- if (defwndproc_counter) msg.flags |= defwinproc;
- msg.wParam = wParam;
- msg.lParam = lParam;
+ msg.message = message;
+ msg.flags = sent|wparam|lparam;
+ if (defwndproc_counter) msg.flags |= defwinproc;
+ msg.wParam = wParam;
+ msg.lParam = lParam;
msg.descr = "button";
- add_message(&msg);
+ add_message(&msg);
}
defwndproc_counter++;
SetRectEmpty( &rect );
if (ValidateRect(0, &rect)) /* not supported on Win9x */
{
- check_update_rgn( hwnd, hrgn );
- ok_sequence( WmInvalidateErase, "InvalidateErase", FALSE );
- flush_events();
- ok_sequence( WmPaint, "Paint", FALSE );
- RedrawWindow( hwnd, NULL, NULL, RDW_VALIDATE );
- check_update_rgn( hwnd, 0 );
+ check_update_rgn( hwnd, hrgn );
+ ok_sequence( WmInvalidateErase, "InvalidateErase", FALSE );
+ flush_events();
+ ok_sequence( WmPaint, "Paint", FALSE );
+ RedrawWindow( hwnd, NULL, NULL, RDW_VALIDATE );
+ check_update_rgn( hwnd, 0 );
}
trace("testing InvalidateRgn(0, NULL, FALSE)\n");
ret = MsgWaitForMultipleObjects(1, &wnd_event.start_event, FALSE, 1000, QS_SENDMESSAGE);
if (ret != 1) break;
while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessage(&msg);
- }
+}
ok( !ret, "MsgWaitForMultipleObjects failed %x\n", ret );
/* now wait for the thread without processing messages; this shouldn't deadlock */
SetEvent( wnd_event.stop_event );
{
int i;
keybd_event(VK_SHIFT, 0, 0, 0);
- mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
- mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
+ mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
+ mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
keybd_event(VK_SHIFT, 0, KEYEVENTF_KEYUP, 0);
- pump_msg_loop(hwnd, 0);
+ pump_msg_loop(hwnd, 0);
for (i = 0; i < sequence_cnt; i++) if (sequence[i].message == WM_LBUTTONDOWN) break;
if (i < sequence_cnt)
ok_sequence(WmShiftMouseButton, "Shift+MouseButton press/release", FALSE);
/* test_accelerators() depends on this */
case WM_NCHITTEST:
return HTCLIENT;
-
+
/* ignore */
case WM_MOUSEMOVE:
case WM_MOUSEACTIVATE:
case WM_SETCURSOR:
case WM_IME_SELECT:
return 0;
- }
+ }
msg.hwnd = hwnd;
msg.message = message;
GetClientRect(parent, &rc);
trace("parent %p client size = (%d x %d)\n", parent, rc.right, rc.bottom);
trace("Reserved=%d,%d MaxSize=%d,%d MaxPos=%d,%d MinTrack=%d,%d MaxTrack=%d,%d\n",
- minmax->ptReserved.x, minmax->ptReserved.y,
- minmax->ptMaxSize.x, minmax->ptMaxSize.y,
- minmax->ptMaxPosition.x, minmax->ptMaxPosition.y,
- minmax->ptMinTrackSize.x, minmax->ptMinTrackSize.y,
- minmax->ptMaxTrackSize.x, minmax->ptMaxTrackSize.y);
+ minmax->ptReserved.x, minmax->ptReserved.y,
+ minmax->ptMaxSize.x, minmax->ptMaxSize.y,
+ minmax->ptMaxPosition.x, minmax->ptMaxPosition.y,
+ minmax->ptMinTrackSize.x, minmax->ptMinTrackSize.y,
+ minmax->ptMaxTrackSize.x, minmax->ptMaxTrackSize.y);
ok(minmax->ptMaxSize.x == rc.right, "default width of maximized child %d != %d\n",
minmax->ptMaxSize.x, rc.right);
ret, rc.left, rc.top, rc.right, rc.bottom);
break;
}
- }
+ }
msg.hwnd = hwnd;
msg.message = message;
struct recvd_message msg;
msg.hwnd = hwnd;
- msg.message = nCode;
- msg.flags = hook|wparam|lparam;
- msg.wParam = wParam;
- msg.lParam = lParam;
+ msg.message = nCode;
+ msg.flags = hook|wparam|lparam;
+ msg.wParam = wParam;
+ msg.lParam = lParam;
msg.descr = "CBT";
- add_message(&msg);
- }
+ add_message(&msg);
+ }
return CallNextHookEx(hCBT_hook, nCode, wParam, lParam);
}
struct recvd_message msg;
msg.hwnd = hwnd;
- msg.message = event;
- msg.flags = winevent_hook|wparam|lparam;
- msg.wParam = object_id;
- msg.lParam = child_id;
+ msg.message = event;
+ msg.flags = winevent_hook|wparam|lparam;
+ msg.wParam = object_id;
+ msg.lParam = child_id;
msg.descr = "WEH";
- add_message(&msg);
+ add_message(&msg);
+ }
}
-}
static const WCHAR wszUnicode[] = {'U','n','i','c','o','d','e',0};
static const WCHAR wszAnsi[] = {'U',0};
win_skip("Test would crash on Win9x/WinMe/NT4\n");
DestroyWindow(info.hWnd);
return;
- }
+}
info.id = SetTimer(info.hWnd, TIMER_ID, 0, tfunc_crash);
ok(info.id, "SetTimer failed\n");
Sleep(150);
ScrollWindowEx( hwnd, 10, 10, &rect, NULL, NULL, NULL,
SW_SCROLLCHILDREN|SW_ERASE|SW_INVALIDATE);
/* wine sends WM_POSCHANGING, WM_POSCHANGED messages */
- /* windows sometimes a WM_MOVE */
+ /* windows sometimes a WM_MOVE */
ok_sequence(WmEmptySeq, "ScrollWindowEx", TRUE);
trace("end scroll\n");
flush_sequence();
}
else
{
- ok( info.ret == 0, "SendMessageTimeout succeeded\n" );
- ok_sequence( WmEmptySeq, "WmEmptySeq", FALSE );
+ ok( info.ret == 0, "SendMessageTimeout succeeded\n" );
+ ok_sequence( WmEmptySeq, "WmEmptySeq", FALSE );
}
/* now check for timeout during message processing */
ok(qstatus == 0 || broken(qstatus) /* win9x */, "GetQueueStatus should fail: %08x\n", qstatus);
if (!qstatus)
{
- ok(GetLastError() == ERROR_INVALID_FLAGS, "wrong error %d\n", GetLastError());
- qstatus = GetQueueStatus(qs_all_input);
+ ok(GetLastError() == ERROR_INVALID_FLAGS, "wrong error %d\n", GetLastError());
+ qstatus = GetQueueStatus(qs_all_input);
}
qstatus &= ~MAKELONG( 0x4000, 0x4000 ); /* sometimes set on Win95 */
ok(qstatus == MAKELONG(QS_SENDMESSAGE, QS_SENDMESSAGE),
"wrong qstatus %08x\n", qstatus);
msg.message = 0;
- ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE | PM_QS_POSTMESSAGE );
+ ret = PeekMessageA(&msg, 0, 0, 0, PM_REMOVE | PM_QS_POSTMESSAGE);
ok(!ret,
"PeekMessageA should have returned FALSE instead of msg %04x\n",
msg.message);
hEvent_hook = pSetWinEventHook(EVENT_MIN, EVENT_MAX,
GetModuleHandleA(0), win_event_proc,
0, GetCurrentThreadId(),
- WINEVENT_INCONTEXT);
+ WINEVENT_INCONTEXT);
if (pIsWinEventHookInstalled && hEvent_hook)
{
UINT event;
ok( out[0].key == ac[0].key, "key modified\n");
if (res == 2)
{
- ok( out[1].cmd == ac[1].cmd, "cmd modified\n");
- ok( out[1].fVirt == (ac[1].fVirt&0x7f), "fVirt not modified\n");
- ok( out[1].key == ac[1].key, "key modified\n");
+ ok( out[1].cmd == ac[1].cmd, "cmd modified\n");
+ ok( out[1].fVirt == (ac[1].fVirt&0x7f), "fVirt not modified\n");
+ ok( out[1].key == ac[1].key, "key modified\n");
}
ok( DestroyAcceleratorTable( hac ), "destroy failed\n");
}
/* count must be a multiple of two when getting two sizes */
cIcons = pPrivateExtractIconsA(szShell32Dll, 0, MAKELONG(16,32), MAKELONG(16,32),
- ahIcon, aIconId, 3, 0);
+ ahIcon, aIconId, 3, 0);
ok(cIcons == 0 /* vista */ || cIcons == 4, "Three icons requested got cIcons=%d\n", cIcons);
cIcons = pPrivateExtractIconsA(szShell32Dll, 0, MAKELONG(16,32), MAKELONG(16,32),
ahIcon, aIconId, 4, 0);
ret = EnableScrollBar( hScroll, SB_CTL, ESB_DISABLE_BOTH );
ok( ret, "The scrollbar should be disabled.\n" );
- ok( !IsWindowEnabled( hScroll ), "The scrollbar window should be disabled.\n" );
+ ok( !IsWindowEnabled( hScroll ), "The scrollbar window should be disabled.\n" );
ret = EnableScrollBar( hScroll, SB_CTL, ESB_ENABLE_BOTH );
ok( ret, "The scrollbar should be enabled.\n" );
else if( wParam == SPI_ICONVERTICALSPACING)
change_iconverticalspacing_param = 1;
else
- change_last_param = wParam;
+ change_last_param = wParam;
break;
case WM_DESTROY:
rc=SystemParametersInfo( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0);
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
if( usesetborder) {
- rc=SystemParametersInfoA( SPI_SETBORDER, curr_val, 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
+ rc=SystemParametersInfoA( SPI_SETBORDER, curr_val, 0, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
if (!test_error_msg(rc,"SPI_SETBORDER")) return FALSE;
ok(rc!=0,"SystemParametersInfoA: rc=%d err=%d\n",rc,GetLastError());
test_change_message( SPI_SETBORDER, 1 );
rc=SystemParametersInfoA( SPI_SETMOUSEBUTTONSWAP, vals[i], 0,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
if (!test_error_msg(rc,"SPI_SETMOUSEBUTTONSWAP")) return;
-
+
test_change_message( SPI_SETMOUSEBUTTONSWAP, 0 );
test_reg_key( SPI_SETMOUSEBUTTONSWAP_REGKEY,
SPI_SETMOUSEBUTTONSWAP_VALNAME,
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
test_change_message( SPI_SETSCREENREADER, 1 );
test_reg_key_ex2_optional( SPI_SETSCREENREADER_REGKEY, SPI_SETSCREENREADER_REGKEY_LEGACY,
- SPI_SETSCREENREADER_VALNAME, SPI_SETSCREENREADER_VALNAME_LEGACY,
- vals[i] ? "1" : "0" );
+ SPI_SETSCREENREADER_VALNAME, SPI_SETSCREENREADER_VALNAME_LEGACY,
+ vals[i] ? "1" : "0" );
rc=SystemParametersInfoA( SPI_GETSCREENREADER, 0, &v, 0 );
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
test_change_message( SPI_SETLOWPOWERACTIVE, 1 );
test_reg_key_optional( SPI_SETLOWPOWERACTIVE_REGKEY,
- SPI_SETLOWPOWERACTIVE_VALNAME,
- vals[i] ? "1" : "0" );
+ SPI_SETLOWPOWERACTIVE_VALNAME,
+ vals[i] ? "1" : "0" );
/* SPI_SETLOWPOWERACTIVE is not persistent in win2k3 and above */
v = 0xdeadbeef;
ok(rc!=0,"%d: rc=%d err=%d\n",i,rc,GetLastError());
test_change_message( SPI_SETPOWEROFFACTIVE, 1 );
test_reg_key_optional( SPI_SETPOWEROFFACTIVE_REGKEY,
- SPI_SETPOWEROFFACTIVE_VALNAME,
- vals[i] ? "1" : "0" );
+ SPI_SETPOWEROFFACTIVE_VALNAME,
+ vals[i] ? "1" : "0" );
/* SPI_SETPOWEROFFACTIVE is not persistent in win2k3 and above */
v = 0xdeadbeef;
wc.hInstance = hInstance;
wc.hIcon = LoadIconA( 0, IDI_APPLICATION );
wc.hCursor = LoadCursorA( 0, IDC_ARROW );
- wc.hbrBackground = (HBRUSH)( COLOR_WINDOW + 1 );
+ wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1 );
wc.lpszMenuName = 0;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
{ "dde", func_dde },
{ "dialog", func_dialog },
{ "edit", func_edit },
-// { "generated", func_generated },
+ { "generated", func_generated },
{ "input", func_input },
{ "listbox", func_listbox },
{ "menu", func_menu },
if (conform_xp)
win_skip("XP conformity failed, skipping XP tests. Probably win 2000\n");
conform_xp = FALSE;
- }
+ }
else
ok(textheight==0,"Got textheight from DrawTextExW\n");
else
{
ok(textheight, "DrawTextW error %u\n", GetLastError());
- ok(0 == rect.left, "expected 0, got %d\n", rect.left);
- ok(0 == rect.right, "expected 0, got %d\n", rect.right);
- ok(0 == rect.top, "expected 0, got %d\n", rect.top);
+ ok(0 == rect.left, "expected 0, got %d\n", rect.left);
+ ok(0 == rect.right, "expected 0, got %d\n", rect.right);
+ ok(0 == rect.top, "expected 0, got %d\n", rect.top);
ok(rect.bottom, "rect.bottom should not be 0\n");
}
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
<module name="user32_winetest" type="win32cui" installbase="bin" installname="user32_winetest.exe" allowwarnings="true">
- <include base="user32_winetest">.</include>
+ <include base="user32_winetest">.</include>
<include base="ReactOS">include/reactos/wine</include>
<define name="__ROS_LONG64__" />
- <library>ntdll</library>
- <library>user32</library>
- <library>gdi32</library>
- <library>advapi32</library>
- <file>broadcast.c</file>
- <file>class.c</file>
- <file>clipboard.c</file>
- <file>combo.c</file>
- <file>cursoricon.c</file>
- <file>dce.c</file>
- <file>dde.c</file>
- <file>dialog.c</file>
- <file>edit.c</file>
- <!-- <file>generated.c</file> -->
- <file>input.c</file>
- <file>listbox.c</file>
- <file>menu.c</file>
- <file>monitor.c</file>
- <file>msg.c</file>
- <file>resource.c</file>
- <file>scroll.c</file>
- <file>static.c</file>
- <file>sysparams.c</file>
- <file>text.c</file>
- <file>win.c</file>
- <file>winstation.c</file>
- <file>wsprintf.c</file>
- <file>testlist.c</file>
- <file>resource.rc</file>
+ <library>ntdll</library>
+ <library>user32</library>
+ <library>gdi32</library>
+ <library>advapi32</library>
+ <file>broadcast.c</file>
+ <file>class.c</file>
+ <file>clipboard.c</file>
+ <file>combo.c</file>
+ <file>cursoricon.c</file>
+ <file>dce.c</file>
+ <file>dde.c</file>
+ <file>dialog.c</file>
+ <file>edit.c</file>
+ <file>generated.c</file>
+ <file>input.c</file>
+ <file>listbox.c</file>
+ <file>menu.c</file>
+ <file>monitor.c</file>
+ <file>msg.c</file>
+ <file>resource.c</file>
+ <file>scroll.c</file>
+ <file>static.c</file>
+ <file>sysparams.c</file>
+ <file>text.c</file>
+ <file>win.c</file>
+ <file>winstation.c</file>
+ <file>wsprintf.c</file>
+ <file>testlist.c</file>
+ <file>resource.rc</file>
</module>
switch (nCode)
{
- case HCBT_CREATEWND:
+ case HCBT_CREATEWND:
{
static const RECT rc_null;
RECT rc;
info.cbSize = sizeof(WINDOWINFO);
ok(pGetWindowInfo(hwnd, &info), "GetWindowInfo should not fail\n");
verify_window_info(code_name, hwnd, &info);
- }
+ }
break;
/* on HCBT_DESTROYWND window state is undefined */
case HCBT_DESTROYWND:
ok(hwnd2 == hwnd, "SetActiveWindow returned %p instead of %p\n", hwnd2, hwnd);
if (!GetActiveWindow()) /* doesn't always work on vista */
{
- check_wnd_state(0, 0, 0, 0);
- hwnd2 = SetActiveWindow(hwnd);
- ok(hwnd2 == 0, "SetActiveWindow returned %p instead of 0\n", hwnd2);
+ check_wnd_state(0, 0, 0, 0);
+ hwnd2 = SetActiveWindow(hwnd);
+ ok(hwnd2 == 0, "SetActiveWindow returned %p instead of 0\n", hwnd2);
}
check_wnd_state(hwnd, hwnd, hwnd, 0);
if (GetActiveWindow() == hwnd) /* doesn't always work on vista */
check_wnd_state(hwnd, hwnd, hwnd, 0);
else
- check_wnd_state(0, 0, 0, 0);
+ check_wnd_state(0, 0, 0, 0);
ret = SetForegroundWindow(hwnd);
if (!ret)
ret = SetForegroundWindow(hwnd);
ok(ret || broken(!ret), /* win98 */ "SetForegroundWindow returned FALSE instead of TRUE\n");
check_wnd_state(hwnd, hwnd, hwnd, 0);
-
+
ShowWindow(hwnd, SW_SHOW);
check_wnd_state(hwnd, hwnd, hwnd, 0);
ShowWindow(popup, SW_HIDE);
ret = wait_for_message( &msg );
if (ret)
- ok(msg.hwnd == hwnd && msg.message == WM_MOUSEMOVE, "hwnd %p message %04x\n", msg.hwnd, msg.message);
+ ok(msg.hwnd == hwnd && msg.message == WM_MOUSEMOVE, "hwnd %p message %04x\n", msg.hwnd, msg.message);
flush_events( TRUE );
mouse_event(MOUSEEVENTF_MOVE, 1, 1, 0, 0);
/* Just a param check */
if (pGetMonitorInfoA)
{
- SetLastError(0xdeadbeef);
- rc = GetWindowText(hwndMain2, NULL, 1024);
- ok( rc==0, "GetWindowText: rc=%d err=%d\n",rc,GetLastError());
+ SetLastError(0xdeadbeef);
+ rc = GetWindowText(hwndMain2, NULL, 1024);
+ ok( rc==0, "GetWindowText: rc=%d err=%d\n",rc,GetLastError());
}
else
{
ok(!hwnd || broken(hwnd != NULL), /* w2k3 sp2 */
"CreateWindow with invalid menu handle should fail\n");
if (!hwnd)
- ok(GetLastError() == ERROR_INVALID_MENU_HANDLE || /* NT */
- GetLastError() == 0xdeadbeef, /* Win9x */
- "wrong last error value %d\n", GetLastError());
+ ok(GetLastError() == ERROR_INVALID_MENU_HANDLE || /* NT */
+ GetLastError() == 0xdeadbeef, /* Win9x */
+ "wrong last error value %d\n", GetLastError());
}
static void test_AWRwindow(LPCSTR class, LONG style, LONG exStyle, BOOL menu)
{
GetUpdateRect(hwnd, &updateRect, FALSE);
ok(IsRectEmpty(&updateRect), "Exposed rect should be empty\n");
- }
+}
return 1;
}
}
ok( !GetParent(hwnd), "GetParent should return 0 for message only windows\n" );
- if (pGetAncestor)
- {
+ if (pGetAncestor)
+ {
char buffer[100];
HWND root, desktop = GetDesktopWindow();
GetWindowRect( parent, &rect );
ok( rect.left == 0 && rect.right == 100 && rect.top == 0 && rect.bottom == 100,
"wrong parent rect %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
- }
+ }
GetWindowRect( hwnd, &rect );
ok( rect.left == 100 && rect.right == 300 && rect.top == 100 && rect.bottom == 300,
"wrong window rect %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
ok(rc.left <= mi.rcMonitor.left && rc.top <= mi.rcMonitor.top &&
rc.right >= mi.rcMonitor.right && rc.bottom >= mi.rcMonitor.bottom,
"%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom);
- else
+ else
ok(rc.left >= mi.rcWork.left && rc.top <= mi.rcWork.top &&
rc.right <= mi.rcWork.right && rc.bottom <= mi.rcWork.bottom,
"%#x/%#x: window rect %d,%d-%d,%d\n", ex_style, style, rc.left, rc.top, rc.right, rc.bottom);
#include <stdio.h>
#include <wine/test.h>
-#include <windows.h>
+#include <winbase.h>
+#include <wingdi.h>
+#include <winuser.h>
+#include <winerror.h>
+#include <winnls.h>
#include <usp10.h>
static void test_ScriptShape(HDC hdc)
ok(hr == E_PENDING, "ScriptShape should return E_PENDING not %08x\n", hr);
hr = ScriptShape(hdc, &sc, test1, 4, 4, &items[0].a, glyphs, NULL, attrs, &nb);
- ok(broken(hr == S_OK) ||
- hr == E_INVALIDARG || /* Vista, W2K8 */
- hr == E_FAIL, /* WIN7 */
- "ScriptShape should return E_FAIL or E_INVALIDARG, not %08x\n", hr);
+ ok(!hr ||
+ hr == E_INVALIDARG, /* Vista, W2K8 */
+ "ScriptShape should return S_OK or E_INVALIDARG, not %08x\n", hr);
ok(items[0].a.fNoGlyphIndex == FALSE, "fNoGlyphIndex TRUE\n");
hr = ScriptShape(hdc, &sc, test1, 4, 4, &items[0].a, glyphs, logclust, attrs, &nb);
ok(hr == E_INVALIDARG, "ScriptPlace should return E_INVALIDARG not %08x\n", hr);
hr = ScriptPlace(NULL, &sc, glyphs, 4, attrs, &items[0].a, widths, NULL, NULL);
- ok(broken(hr == E_PENDING) ||
- hr == E_INVALIDARG || /* Vista, W2K8 */
- hr == E_FAIL, /* WIN7 */
- "ScriptPlace should return E_FAIL or E_INVALIDARG, not %08x\n", hr);
+ ok(hr == E_PENDING ||
+ hr == E_INVALIDARG, /* Vista, W2K8 */
+ "ScriptPlace should return E_PENDING or E_INVALIDARG, not %08x\n", hr);
hr = ScriptPlace(NULL, &sc, glyphs, 4, attrs, &items[0].a, widths, offset, NULL);
ok(hr == E_PENDING, "ScriptPlace should return E_PENDING not %08x\n", hr);
hr = ScriptPlace(NULL, &sc, glyphs, 4, attrs, &items[0].a, widths, NULL, abc);
- ok(broken(hr == E_PENDING) ||
- hr == E_INVALIDARG || /* Vista, W2K8 */
- hr == E_FAIL, /* WIN7 */
- "ScriptPlace should return E_FAIL or E_INVALIDARG, not %08x\n", hr);
+ ok(hr == E_PENDING ||
+ hr == E_INVALIDARG, /* Vista, W2K8 */
+ "ScriptPlace should return E_PENDING or E_INVALIDARG, not %08x\n", hr);
hr = ScriptPlace(hdc, &sc, glyphs, 4, attrs, &items[0].a, widths, offset, NULL);
ok(!hr, "ScriptPlace should return S_OK not %08x\n", hr);
/* Set psc to NULL, to be able to check if a pointer is returned in psc */
psc = NULL;
- hr = ScriptGetCMap(NULL, &psc, TestItem1, cInChars, 0, pwOutGlyphs3);
- ok( hr == E_PENDING, "(NULL,&psc,NULL,0,0,NULL), expected E_PENDING, "
+ hr = ScriptGetCMap(NULL, &psc, NULL, 0, 0, NULL);
+ ok( hr == E_PENDING, "(NULL,&psc,NULL,0,0NULL), expected E_PENDING, "
"got %08x\n", hr);
ok( psc == NULL, "Expected psc to be NULL, got %p\n", psc);
/* Set psc to NULL but add hdc, to be able to check if a pointer is returned in psc */
psc = NULL;
- hr = ScriptGetCMap(hdc, &psc, TestItem1, cInChars, 0, pwOutGlyphs3);
+ hr = ScriptGetCMap(hdc, &psc, NULL, 0, 0, NULL);
ok( hr == S_OK, "ScriptGetCMap(NULL,&psc,NULL,0,0,NULL), expected S_OK, "
"got %08x\n", hr);
ok( psc != NULL, "ScritpGetCMap expected psc to be not NULL\n");
ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08x\n", hr);
hr = ScriptGetGlyphABCWidth(NULL, &sc, 'a', NULL);
- ok(broken(hr == E_PENDING) ||
- hr == E_INVALIDARG, /* WIN7 */
- "expected E_INVALIDARG, got 0x%08x\n", hr);
-
- hr = ScriptGetGlyphABCWidth(NULL, &sc, 'a', &abc);
ok(hr == E_PENDING, "expected E_PENDING, got 0x%08x\n", hr);
if (0) { /* crashes on WinXP */
LGRPID_ARMENIAN
};
HMODULE hKernel32;
- static BOOL (WINAPI * pEnumLanguageGroupLocalesA)(LANGGROUPLOCALE_ENUMPROCA,LGRPID,DWORD,LONG_PTR);
+ static BOOL (WINAPI * pEnumLanguageGroupLocalesA)(LANGGROUPLOCALE_ENUMPROC,LGRPID,DWORD,LONG_PTR);
hKernel32 = GetModuleHandleA("kernel32.dll");
pEnumLanguageGroupLocalesA = (void*)GetProcAddress(hKernel32, "EnumLanguageGroupLocalesA");
/* Although Wine currently returns FALSE, the logic behind it is wrong. It is not a todo_wine though in the testing sense */
ok( bAppThemed == FALSE, "Expected FALSE as this test executable is not (yet) themed.\n");
- ok( GetLastError() == ERROR_SUCCESS,
- "Expected ERROR_SUCCESS, got 0x%08x\n",
- GetLastError());
+ ok( GetLastError() == ERROR_SUCCESS,
+ "Expected ERROR_SUCCESS, got 0x%08x\n",
+ GetLastError());
SetLastError(0xdeadbeef);
bTPDefined = pIsThemePartDefined(NULL, 0 , 0);
{
ok(GetLastError() == ERROR_INTERNET_LOGIN_FAILURE,
"Expected ERROR_INTERNET_LOGIN_FAILURE, got %d\n", GetLastError());
- }
+}
else
{
ok(GetLastError() == ERROR_SUCCESS,
# ifdef TYPE_ALIGNMENT
# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align);
-# else
+#else
# define TEST_TYPE_ALIGN(type, align)
-# endif
+#endif
# ifdef _TYPE_ALIGNMENT
# define TEST_TARGET_ALIGN(type, align) C_ASSERT(_TYPE_ALIGNMENT(*(type)0) == align);
# define TEST_FIELD_ALIGN(type, field, align) C_ASSERT(_TYPE_ALIGNMENT(((type*)0)->field) == align);
-# else
+#else
# define TEST_TARGET_ALIGN(type, align)
# define TEST_FIELD_ALIGN(type, field, align)
-# endif
+#endif
# define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset);
ok(!strcmp(buffer, ""), "HTTP_QUERY_RAW_HEADERS: expected string \"\", but got \"%s\"\n", buffer);
CHECK_NOTIFIED(INTERNET_STATUS_HANDLE_CREATED);
- CHECK_NOT_NOTIFIED(INTERNET_STATUS_RESOLVING_NAME);
- CHECK_NOT_NOTIFIED(INTERNET_STATUS_NAME_RESOLVED);
+ CHECK_NOT_NOTIFIED(INTERNET_STATUS_RESOLVING_NAME);
+ CHECK_NOT_NOTIFIED(INTERNET_STATUS_NAME_RESOLVED);
if (first_connection_to_test_url)
{
SET_EXPECT(INTERNET_STATUS_RESOLVING_NAME);
if (hor == 0x0) goto abort;
CHECK_NOTIFIED(INTERNET_STATUS_HANDLE_CREATED);
- CHECK_NOT_NOTIFIED(INTERNET_STATUS_RESOLVING_NAME);
- CHECK_NOT_NOTIFIED(INTERNET_STATUS_NAME_RESOLVED);
+ CHECK_NOT_NOTIFIED(INTERNET_STATUS_RESOLVING_NAME);
+ CHECK_NOT_NOTIFIED(INTERNET_STATUS_NAME_RESOLVED);
if (first_connection_to_test_url)
{
SET_EXPECT(INTERNET_STATUS_RESOLVING_NAME);
todo_wine {
CHECK_NOT_NOTIFIED(INTERNET_STATUS_RECEIVING_RESPONSE);
CHECK_NOT_NOTIFIED(INTERNET_STATUS_RESPONSE_RECEIVED);
- }
+ }
}
else
{
CHECK_NOTIFIED2(INTERNET_STATUS_HANDLE_CLOSING, (hor != 0x0) + (hic != 0x0));
}
/* to enable once Wine is fixed to never send it
- CHECK_NOT_NOTIFIED(INTERNET_STATUS_CLOSING_CONNECTION);
- CHECK_NOT_NOTIFIED(INTERNET_STATUS_CONNECTION_CLOSED);
+ CHECK_NOT_NOTIFIED(INTERNET_STATUS_CLOSING_CONNECTION);
+ CHECK_NOT_NOTIFIED(INTERNET_STATUS_CONNECTION_CLOSED);
*/
CLEAR_NOTIFIED(INTERNET_STATUS_CLOSING_CONNECTION);
CLEAR_NOTIFIED(INTERNET_STATUS_CONNECTION_CLOSED);
char buffer[0x400];
DWORD size, readbytes, totalbytes=0;
BOOL ret;
-
+
myhinternet = InternetOpen("Winetest",0,NULL,NULL,INTERNET_FLAG_NO_CACHE_WRITE);
ok((myhinternet != 0), "InternetOpen failed, error %u\n",GetLastError());
size = 0x400;
strcpy(buffer,"Warning");
ok(HttpQueryInfo(hRequest,HTTP_QUERY_CUSTOM|HTTP_QUERY_FLAG_REQUEST_HEADERS,
buffer,&len,&index)==0,"Warning hearder reported as Existing\n");
-
+
ok(HttpAddRequestHeaders(hRequest,"Warning:test1",-1,HTTP_ADDREQ_FLAG_ADD),
"Failed to add new header\n");
strcpy(buffer,"Warning");
ok(HttpQueryInfo(hRequest,HTTP_QUERY_CUSTOM|HTTP_QUERY_FLAG_REQUEST_HEADERS,
buffer,&len,&index)==0,"Third Header Should Not Exist\n");
-
+
ok(HttpAddRequestHeaders(hRequest,"Warning:test4",-1,HTTP_ADDREQ_FLAG_ADD_IF_NEW)==0, "HTTP_ADDREQ_FLAG_ADD_IF_NEW replaced existing header\n");
index = 0;
/* Ensure that blank headers are ignored and don't cause a failure */
ok(HttpAddRequestHeaders(hRequest,"\r\nBlankTest:value\r\n\r\n",-1, HTTP_ADDREQ_FLAG_ADD_IF_NEW), "Failed to add header with blank entries in list\n");
-
+
index = 0;
len = sizeof(buffer);
strcpy(buffer,"BlankTest");
pInternetTimeToSystemTimeW = (void*)GetProcAddress(hdll, "InternetTimeToSystemTimeW");
pIsDomainLegalCookieDomainW = (void*)GetProcAddress(hdll, (LPCSTR)117);
- test_InternetCanonicalizeUrlA();
- test_InternetQueryOptionA();
- test_get_cookie();
+ test_InternetCanonicalizeUrlA();
+ test_InternetQueryOptionA();
+ test_get_cookie();
test_complicated_cookie();
- test_version();
- test_null();
+ test_version();
+ test_null();
if (!pInternetTimeFromSystemTimeA)
win_skip("skipping the InternetTime tests\n");
InternetTimeFromSystemTimeW_test();
InternetTimeToSystemTimeA_test();
InternetTimeToSystemTimeW_test();
- }
+}
if (pIsDomainLegalCookieDomainW &&
((void*)pIsDomainLegalCookieDomainW == (void*)pCreateUrlCacheContainerA ||
(void*)pIsDomainLegalCookieDomainW == (void*)pCreateUrlCacheContainerW))
if (error == ERROR_INVALID_PARAMETER)
{
/* Crashes on IE5 */
- SetLastError(0xdeadbeef);
- r = InternetCrackUrlW(url, 0, 0, NULL );
- error = GetLastError();
- ok( !r, "InternetCrackUrlW succeeded unexpectedly\n");
- ok( error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %u\n", error);
+ SetLastError(0xdeadbeef);
+ r = InternetCrackUrlW(url, 0, 0, NULL );
+ error = GetLastError();
+ ok( !r, "InternetCrackUrlW succeeded unexpectedly\n");
+ ok( error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %u\n", error);
}
r = InternetCrackUrlW(url, 0, 0, &comp );
* Test winmm mci
*
* Copyright 2006 Jan Zerebecki
- * 2009 Jörg Höhle
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include <stdio.h>
-#include "windows.h"
-#include "mmsystem.h"
-#include "mmreg.h"
#include "wine/test.h"
+#include "winuser.h"
+#include "mmsystem.h"
-/* The tests use the MCI's own save capability to create the tempfile.wav to play.
- * To use a pre-existing file, write-protect it. */
-static MCIERROR ok_saved = MCIERR_FILE_NOT_FOUND;
-
-typedef union {
- MCI_STATUS_PARMS status;
- MCI_WAVE_SET_PARMS set;
- MCI_WAVE_OPEN_PARMS open;
- MCI_SEEK_PARMS seek;
- } MCI_PARMS_UNION;
-
-static const char* dbg_mcierr(MCIERROR err)
-{
- switch (err) {
- case 0: return "0=NOERROR";
-#define X(label) case label: return #label ;
- X(MCIERR_INVALID_DEVICE_ID)
- X(MCIERR_UNRECOGNIZED_KEYWORD)
- X(MCIERR_UNRECOGNIZED_COMMAND)
- X(MCIERR_HARDWARE)
- X(MCIERR_INVALID_DEVICE_NAME)
- X(MCIERR_OUT_OF_MEMORY)
- X(MCIERR_DEVICE_OPEN)
- X(MCIERR_CANNOT_LOAD_DRIVER)
- X(MCIERR_MISSING_COMMAND_STRING)
- X(MCIERR_PARAM_OVERFLOW)
- X(MCIERR_MISSING_STRING_ARGUMENT)
- X(MCIERR_BAD_INTEGER)
- X(MCIERR_PARSER_INTERNAL)
- X(MCIERR_DRIVER_INTERNAL)
- X(MCIERR_MISSING_PARAMETER)
- X(MCIERR_UNSUPPORTED_FUNCTION)
- X(MCIERR_FILE_NOT_FOUND)
- X(MCIERR_DEVICE_NOT_READY)
- X(MCIERR_INTERNAL)
- X(MCIERR_DRIVER)
- X(MCIERR_CANNOT_USE_ALL)
- X(MCIERR_MULTIPLE)
- X(MCIERR_EXTENSION_NOT_FOUND)
- X(MCIERR_OUTOFRANGE)
- X(MCIERR_FLAGS_NOT_COMPATIBLE)
- X(MCIERR_FILE_NOT_SAVED)
- X(MCIERR_DEVICE_TYPE_REQUIRED)
- X(MCIERR_DEVICE_LOCKED)
- X(MCIERR_DUPLICATE_ALIAS)
- X(MCIERR_BAD_CONSTANT)
- X(MCIERR_MUST_USE_SHAREABLE)
- X(MCIERR_MISSING_DEVICE_NAME)
- X(MCIERR_BAD_TIME_FORMAT)
- X(MCIERR_NO_CLOSING_QUOTE)
- X(MCIERR_DUPLICATE_FLAGS)
- X(MCIERR_INVALID_FILE)
- X(MCIERR_NULL_PARAMETER_BLOCK)
- X(MCIERR_UNNAMED_RESOURCE)
- X(MCIERR_NEW_REQUIRES_ALIAS)
- X(MCIERR_NOTIFY_ON_AUTO_OPEN)
- X(MCIERR_NO_ELEMENT_ALLOWED)
- X(MCIERR_NONAPPLICABLE_FUNCTION)
- X(MCIERR_ILLEGAL_FOR_AUTO_OPEN)
- X(MCIERR_FILENAME_REQUIRED)
- X(MCIERR_EXTRA_CHARACTERS)
- X(MCIERR_DEVICE_NOT_INSTALLED)
- X(MCIERR_GET_CD)
- X(MCIERR_SET_CD)
- X(MCIERR_SET_DRIVE)
- X(MCIERR_DEVICE_LENGTH)
- X(MCIERR_DEVICE_ORD_LENGTH)
- X(MCIERR_NO_INTEGER)
- X(MCIERR_WAVE_OUTPUTSINUSE)
- X(MCIERR_WAVE_SETOUTPUTINUSE)
- X(MCIERR_WAVE_INPUTSINUSE)
- X(MCIERR_WAVE_SETINPUTINUSE)
- X(MCIERR_WAVE_OUTPUTUNSPECIFIED)
- X(MCIERR_WAVE_INPUTUNSPECIFIED)
- X(MCIERR_WAVE_OUTPUTSUNSUITABLE)
- X(MCIERR_WAVE_SETOUTPUTUNSUITABLE)
- X(MCIERR_WAVE_INPUTSUNSUITABLE)
- X(MCIERR_WAVE_SETINPUTUNSUITABLE)
- X(MCIERR_SEQ_DIV_INCOMPATIBLE)
- X(MCIERR_SEQ_PORT_INUSE)
- X(MCIERR_SEQ_PORT_NONEXISTENT)
- X(MCIERR_SEQ_PORT_MAPNODEVICE)
- X(MCIERR_SEQ_PORT_MISCERROR)
- X(MCIERR_SEQ_TIMER)
- X(MCIERR_SEQ_PORTUNSPECIFIED)
- X(MCIERR_SEQ_NOMIDIPRESENT)
- X(MCIERR_NO_WINDOW)
- X(MCIERR_CREATEWINDOW)
- X(MCIERR_FILE_READ)
- X(MCIERR_FILE_WRITE)
- X(MCIERR_NO_IDENTITY)
-#undef X
- default: {
- static char name[20]; /* Not to be called twice in a parameter list! */
- sprintf(name, "MMSYSERR %u", err);
- return name;
- }
- }
-}
-
-static BOOL spurious_message(LPMSG msg)
-{
- /* WM_DEVICECHANGE 0x0219 appears randomly */
- if(msg->message != MM_MCINOTIFY) {
- trace("skipping spurious message %04x\n",msg->message);
- return TRUE;
- }
- return FALSE;
-}
-
-static void test_notification(HWND hwnd, const char* command, WPARAM type)
-{ /* Use type 0 as meaning no message */
- MSG msg;
- BOOL seen;
- do { seen = PeekMessageA(&msg, hwnd, 0, 0, PM_REMOVE); }
- while(seen && spurious_message(&msg));
- if(type==0)
- ok(!seen, "Expect no message from command %s\n", command);
- else
- ok(seen, "PeekMessage should succeed for command %s\n", command);
- if(seen) {
- ok(msg.hwnd == hwnd, "Didn't get the handle to our test window\n");
- ok(msg.message == MM_MCINOTIFY, "got %04x instead of MM_MCINOTIFY from command %s\n", msg.message, command);
- ok(msg.wParam == type, "got %04lx instead of MCI_NOTIFY_xyz %04lx from command %s\n", msg.wParam, type, command);
- }
-}
-static void test_notification1(HWND hwnd, const char* command, WPARAM type)
-{ /* This version works with todo_wine prefix. */
- MSG msg;
- BOOL seen;
- do { seen = PeekMessageA(&msg, hwnd, 0, 0, PM_REMOVE); }
- while(seen && spurious_message(&msg));
- if(type==0)
- ok(!seen, "Expect no message from command %s\n", command);
- else if(seen)
- ok(msg.message == MM_MCINOTIFY && msg.wParam == type,"got %04lx instead of MCI_NOTIFY_xyz %04lx from command %s\n", msg.wParam, type, command);
- else ok(seen, "PeekMessage should succeed for command %s\n", command);
-}
-
-static void test_openCloseWAVE(HWND hwnd)
+START_TEST(mci)
{
- MCIERROR err;
- MCI_GENERIC_PARMS parm;
- const char command_open[] = "open new type waveaudio alias mysound notify";
+ int err;
+ const char command_open[] = "open new type waveaudio alias mysound";
const char command_close_my[] = "close mysound notify";
const char command_close_all[] = "close all notify";
const char command_sysinfo[] = "sysinfo waveaudio quantity open";
+ MSG msg;
char buf[1024];
- memset(buf, 0, sizeof(buf));
- test_notification(hwnd, "-prior to any command-", 0);
-
- err = mciSendString("sysinfo all quantity", buf, sizeof(buf), hwnd);
- todo_wine ok(!err,"mci %s returned %s\n", command_open, dbg_mcierr(err));
- if(!err) trace("[MCI] with %s drivers\n", buf);
-
- err = mciSendString("open new type waveaudio alias r shareable", buf, sizeof(buf), NULL);
- ok(err==MCIERR_UNSUPPORTED_FUNCTION,"mci open new shareable returned %s\n", dbg_mcierr(err));
- if(!err) {
- err = mciSendString("close r", NULL, 0, NULL);
- ok(!err,"mci close shareable returned %s\n", dbg_mcierr(err));
- }
+ HWND hwnd;
- err = mciSendString(command_open, buf, sizeof(buf), hwnd);
- ok(!err,"mci %s returned %s\n", command_open, dbg_mcierr(err));
- ok(!strcmp(buf,"1"), "mci open deviceId: %s, expected 1\n", buf);
- /* Wine<=1.1.33 used to ignore anything past alias XY */
- test_notification(hwnd,"open new alias notify",MCI_NOTIFY_SUCCESSFUL);
+ hwnd = CreateWindowExA(0, "static", "winmm test", WS_POPUP, 0,0,100,100,
+ 0, 0, 0, NULL);
- err = mciSendString("status mysound time format", buf, sizeof(buf), hwnd);
- ok(!err,"mci status time format returned %s\n", dbg_mcierr(err));
- if(!err) {
- if (PRIMARYLANGID(LANGIDFROMLCID(GetThreadLocale())) == LANG_ENGLISH)
- ok(!strcmp(buf,"milliseconds"), "mci status time format: %s\n", buf);
- else trace("locale-dependent time format: %s (ms)\n", buf);
- }
+ err = mciSendString(command_open, NULL, 0, NULL);
+ ok(!err,"mciSendString(%s, NULL, 0 , NULL) returned error: %d\n", command_open, err);
err = mciSendString(command_close_my, NULL, 0, hwnd);
- ok(!err,"mci %s returned %s\n", command_close_my, dbg_mcierr(err));
- test_notification(hwnd, command_close_my, MCI_NOTIFY_SUCCESSFUL);
- Sleep(5);
- test_notification(hwnd, command_close_my, 0);
-
- err = mciSendString("open no-such-file-exists.wav alias y", buf, sizeof(buf), NULL);
- ok(err==MCIERR_FILE_NOT_FOUND,"open no-such-file.wav returned %s\n", dbg_mcierr(err));
- if(!err) {
- err = mciSendString("close y", NULL, 0, NULL);
- ok(!err,"close y returned %s\n", dbg_mcierr(err));
- }
+ ok(!err,"mciSendString(%s, NULL, 0 , NULL) returned error: %d\n", command_close_my, err);
- err = mciSendString("open no-such-dir\\file.wav alias y type waveaudio", buf, sizeof(buf), NULL);
- ok(err==MCIERR_FILE_NOT_FOUND || broken(err==MCIERR_INVALID_FILE /* Win9X */),"open no-such-dir/file.wav returned %s\n", dbg_mcierr(err));
- if(!err) {
- err = mciSendString("close y", NULL, 0, NULL);
- ok(!err,"close y returned %s\n", dbg_mcierr(err));
- }
+ ok(PeekMessageA( &msg, hwnd, 0, 0, PM_REMOVE ), "PeekMessage should succeed\n");
+ ok(msg.hwnd == hwnd, "Didn't get the handle to our test window\n");
+ ok(msg.message == MM_MCINOTIFY, "got %04x instead of MM_MCINOTIFY\n", msg.message);
+ ok(msg.wParam == MCI_NOTIFY_SUCCESSFUL, "got %08lx instead of MCI_NOTIFY_SUCCESSFUL\n", msg.wParam);
err = mciSendString(command_close_all, NULL, 0, NULL);
- todo_wine ok(!err,"mci %s (without buffer) returned %s\n", command_close_all, dbg_mcierr(err));
+ todo_wine ok(!err,"mciSendString(%s, NULL, 0 , NULL) returned error: %d\n", command_close_all, err);
memset(buf, 0, sizeof(buf));
err = mciSendString(command_close_all, buf, sizeof(buf), hwnd);
- todo_wine ok(!err,"mci %s (with output buffer) returned %s\n", command_close_all, dbg_mcierr(err));
- ok(buf[0] == 0, "mci %s changed output buffer: %s\n", command_close_all, buf);
- /* No notification left, everything closed already */
- test_notification(hwnd, command_close_all, 0);
- /* TODO test close all sends one notification per open device */
+ todo_wine ok(!err,"mciSendString(%s, buf, sizeof(buf) , NULL) returned error: %d\n", command_close_all, err);
+ ok(buf[0] == 0, "mciSendString(%s, buf, sizeof(buf) , NULL) changed output buffer: %s\n", command_close_all, buf);
memset(buf, 0, sizeof(buf));
err = mciSendString(command_sysinfo, buf, sizeof(buf), NULL);
- ok(!err,"mci %s returned %s\n", command_sysinfo, dbg_mcierr(err));
- todo_wine ok(buf[0] == '0' && buf[1] == 0, "mci %s, expected output buffer '0', got: '%s'\n", command_sysinfo, buf);
-
- err = mciSendString("open new type waveaudio", buf, sizeof(buf), NULL);
- ok(err==MCIERR_NEW_REQUIRES_ALIAS,"mci open new without alias returned %s\n", dbg_mcierr(err));
-
- err = mciSendCommand(MCI_ALL_DEVICE_ID, MCI_CLOSE, MCI_WAIT, 0); /* from MSDN */
- ok(!err,"mciSendCommand(MCI_ALL_DEVICE_ID, MCI_CLOSE, MCI_NOTIFY, 0) returned %s\n", dbg_mcierr(err));
+ ok(!err,"mciSendString(%s, buf, sizeof(buf) , NULL) returned error: %d\n", command_sysinfo, err);
+ todo_wine ok(buf[0] == '0' && buf[1] == 0, "mciSendString(%s, buf, sizeof(buf) , NULL), expected output buffer '0', got: '%s'\n", command_sysinfo, buf);
err = mciSendCommand(MCI_ALL_DEVICE_ID, MCI_CLOSE, MCI_NOTIFY, 0);
- ok(!err,"mciSendCommand(MCI_ALL_DEVICE_ID, MCI_CLOSE, MCI_NOTIFY, 0) returned %s\n", dbg_mcierr(err));
-
- parm.dwCallback = (DWORD_PTR)hwnd;
- err = mciSendCommand(MCI_ALL_DEVICE_ID, MCI_CLOSE, MCI_NOTIFY, (DWORD_PTR)&parm);
- ok(!err,"mciSendCommand(MCI_ALL_DEVICE_ID, MCI_CLOSE, MCI_NOTIFY, hwnd) returned %s\n", dbg_mcierr(err));
- test_notification(hwnd, command_close_all, 0); /* None left */
-}
-
-static void test_recordWAVE(HWND hwnd)
-{
- WORD nch = 1;
- WORD nbits = 16;
- DWORD nsamp = 16000, expect;
- MCIERROR err, ok_pcm;
- MCIDEVICEID wDeviceID;
- MCI_PARMS_UNION parm;
- char buf[1024];
- memset(buf, 0, sizeof(buf));
- test_notification(hwnd, "-prior to recording-", 0);
-
- parm.open.lpstrDeviceType = "waveaudio";
- parm.open.lpstrElementName = ""; /* "new" at the command level */
- parm.open.lpstrAlias = "x"; /* to enable mciSendString */
- parm.open.dwCallback = (DWORD_PTR)hwnd;
- err = mciSendCommand(0, MCI_OPEN,
- MCI_OPEN_ELEMENT | MCI_OPEN_TYPE | MCI_OPEN_ALIAS | MCI_NOTIFY,
- (DWORD_PTR)&parm);
- ok(!err,"mciCommand open new type waveaudio alias x notify: %s\n", dbg_mcierr(err));
- wDeviceID = parm.open.wDeviceID;
-
- /* In Wine, both MCI_Open and the individual drivers send notifications. */
- test_notification(hwnd, "open new", MCI_NOTIFY_SUCCESSFUL);
- todo_wine test_notification1(hwnd, "open new no #2", 0);
-
- /* Do not query time format as string because result depends on locale! */
- parm.status.dwItem = MCI_STATUS_TIME_FORMAT;
- err = mciSendCommand(wDeviceID, MCI_STATUS, MCI_STATUS_ITEM, (DWORD_PTR)&parm);
- ok(!err,"mciCommand status time format: %s\n", dbg_mcierr(err));
- ok(parm.status.dwReturn==MCI_FORMAT_MILLISECONDS,"status time format: %ld\n",parm.status.dwReturn);
-
- /* Info file fails until named in Open or Save. */
- err = mciSendString("info x file", buf, sizeof(buf), NULL);
- todo_wine ok(err==MCIERR_NONAPPLICABLE_FUNCTION,"mci info new file returned %s\n", dbg_mcierr(err));
-
- /* Check the default recording: 8-bits per sample, mono, 11kHz */
- err = mciSendString("status x samplespersec", buf, sizeof(buf), NULL);
- ok(!err,"mci status samplespersec returned %s\n", dbg_mcierr(err));
- if(!err) ok(!strcmp(buf,"11025"), "mci status samplespersec expected 11025, got: %s\n", buf);
-
- /* MCI seems to solely support PCM, no need for ACM conversion. */
- err = mciSendString("set x format tag 2", NULL, 0, NULL);
- ok(err==MCIERR_OUTOFRANGE,"mci set format tag 2 returned %s\n", dbg_mcierr(err));
-
- /* MCI appears to scan the available devices for support of this format,
- * returning MCIERR_OUTOFRANGE on machines with no sound.
- * Don't skip here, record will fail below. */
- err = mciSendString("set x format tag pcm", NULL, 0, NULL);
- ok(!err || err==MCIERR_OUTOFRANGE,"mci set format tag pcm returned %s\n", dbg_mcierr(err));
- ok_pcm = err;
-
- err = mciSendString("set x samplespersec 41000 alignment 4 channels 2", NULL, 0, NULL);
- ok(err==ok_pcm,"mci set samples+align+channels returned %s\n", dbg_mcierr(err));
-
- /* Investigate: on w2k, set samplespersec 22050 sets nChannels to 2!
- * err = mciSendString("set x samplespersec 22050", NULL, 0, NULL);
- * ok(!err,"mci set samplespersec returned %s\n", dbg_mcierr(err));
- */
-
- parm.set.wFormatTag = WAVE_FORMAT_PCM;
- parm.set.nSamplesPerSec = nsamp;
- parm.set.wBitsPerSample = nbits;
- parm.set.nChannels = nch;
- parm.set.nBlockAlign = parm.set.nChannels * parm.set.wBitsPerSample /8;
- parm.set.nAvgBytesPerSec= parm.set.nSamplesPerSec * parm.set.nBlockAlign;
- err = mciSendCommand(wDeviceID, MCI_SET,
- MCI_WAVE_SET_SAMPLESPERSEC | MCI_WAVE_SET_CHANNELS |
- MCI_WAVE_SET_BITSPERSAMPLE | MCI_WAVE_SET_BLOCKALIGN |
- MCI_WAVE_SET_AVGBYTESPERSEC| MCI_WAVE_SET_FORMATTAG, (DWORD_PTR)&parm);
- ok(err==ok_pcm,"mciCommand set wave format: %s\n", dbg_mcierr(err));
-
- /* A few ME machines pass all tests except set format tag pcm! */
- err = mciSendString("record x to 2000 wait", NULL, 0, hwnd);
- ok(err || !ok_pcm,"can record yet set wave format pcm returned %s\n", dbg_mcierr(ok_pcm));
- ok(!err || err==(ok_pcm==MCIERR_OUTOFRANGE ? MCIERR_WAVE_INPUTSUNSUITABLE : 0),"mci record to 2000 returned %s\n", dbg_mcierr(err));
- if(err) {
- if (err==MCIERR_WAVE_INPUTSUNSUITABLE)
- skip("Please install audio driver. Everything is skipped.\n");
- else skip("Cannot record cause %s. Everything is skipped.\n", dbg_mcierr(err));
-
- err = mciSendString("close x", NULL, 0, NULL);
- ok(!err,"mci close returned %s\n", dbg_mcierr(err));
- test_notification(hwnd,"record skipped",0);
- return;
- }
-
- /* Query some wave format parameters depending on the time format. */
- err = mciSendString("status x position", buf, sizeof(buf), NULL);
- ok(!err,"mci status position returned %s\n", dbg_mcierr(err));
- if(!err) todo_wine ok(!strcmp(buf,"2000"), "mci status position gave %s, expected 2000, some tests will fail\n", buf);
-
- err = mciSendString("set x time format 8", NULL, 0, NULL); /* bytes */
- ok(!err,"mci returned %s\n", dbg_mcierr(err));
-
- parm.status.dwItem = MCI_STATUS_POSITION;
- err = mciSendCommand(wDeviceID, MCI_STATUS, MCI_STATUS_ITEM, (DWORD_PTR)&parm);
- ok(!err,"mciCommand status position: %s\n", dbg_mcierr(err));
- expect = 2 * nsamp * nch * nbits/8;
- if(!err) todo_wine ok(parm.status.dwReturn==expect,"recorded %lu bytes, expected %u\n",parm.status.dwReturn,expect);
-
- parm.set.dwTimeFormat = MCI_FORMAT_SAMPLES;
- err = mciSendCommand(wDeviceID, MCI_SET, MCI_SET_TIME_FORMAT, (DWORD_PTR)&parm);
- ok(!err,"mciCommand set time format samples: %s\n", dbg_mcierr(err));
-
- parm.status.dwItem = MCI_STATUS_POSITION;
- err = mciSendCommand(wDeviceID, MCI_STATUS, MCI_STATUS_ITEM, (DWORD_PTR)&parm);
- ok(!err,"mciCommand status position: %s\n", dbg_mcierr(err));
- expect = 2 * nsamp;
- if(!err) todo_wine ok(parm.status.dwReturn==expect,"recorded %lu samples, expected %u\n",parm.status.dwReturn,expect);
-
- err = mciSendString("set x time format milliseconds", NULL, 0, NULL);
- ok(!err,"mci set time format milliseconds returned %s\n", dbg_mcierr(err));
-
- err = mciSendString("save x tempfile1.wav", NULL, 0, NULL);
- ok(!err,"mci save returned %s\n", dbg_mcierr(err));
-
- err = mciSendString("save x tempfile.wav", NULL, 0, NULL);
- ok(!err,"mci save returned %s\n", dbg_mcierr(err));
- if(!err) ok_saved = 0;
-
- /* Save must not rename the original file. */
- if (!DeleteFile("tempfile1.wav"))
- todo_wine ok(FALSE, "Save must not rename the original file; DeleteFile returned %d\n", GetLastError());
-
- err = mciSendString("set x channels 2", NULL, 0, NULL);
- ok(err==MCIERR_NONAPPLICABLE_FUNCTION,"mci set channels after saving returned %s\n", dbg_mcierr(err));
-
- parm.seek.dwTo = 600;
- err = mciSendCommand(wDeviceID, MCI_SEEK, MCI_TO | MCI_WAIT, (DWORD_PTR)&parm);
- ok(!err,"mciCommand seek to 600: %s\n", dbg_mcierr(err));
-
- /* Truncate to current position */
- err = mciSendString("delete x", NULL, 0, NULL);
- todo_wine ok(!err,"mci delete returned %s\n", dbg_mcierr(err));
-
- buf[0]='\0';
- err = mciSendString("status x length", buf, sizeof(buf), NULL);
- ok(!err,"mci status length returned %s\n", dbg_mcierr(err));
- todo_wine ok(!strcmp(buf,"600"), "mci status length after delete gave %s, expected 600\n", buf);
-
- err = mciSendString("close x", NULL, 0, NULL);
- ok(!err,"mci close returned %s\n", dbg_mcierr(err));
- test_notification(hwnd,"record complete",0);
-}
-
-static void test_playWAVE(HWND hwnd)
-{
- MCIERROR err;
- char buf[1024];
- memset(buf, 0, sizeof(buf));
-
- err = mciSendString("open waveaudio!tempfile.wav alias mysound", NULL, 0, NULL);
- ok(err==ok_saved,"mci open waveaudio!tempfile.wav returned %s\n", dbg_mcierr(err));
- if(err) {
- skip("Cannot open waveaudio!tempfile.wav for playing (%s), skipping\n", dbg_mcierr(err));
- return;
- }
-
- err = mciSendString("status mysound length", buf, sizeof(buf), NULL);
- ok(!err,"mci status length returned %s\n", dbg_mcierr(err));
- todo_wine ok(!strcmp(buf,"2000"), "mci status length gave %s, expected 2000, some tests will fail.\n", buf);
-
- err = mciSendString("cue output", NULL, 0, NULL);
- todo_wine ok(err==MCIERR_UNRECOGNIZED_COMMAND,"mci incorrect cue output returned %s\n", dbg_mcierr(err));
-
- /* Test MCI to the bones -- Some todo_wine from Cue and
- * from Play from 0 to 0 are not worth fixing. */
- err = mciSendString("cue mysound output notify", NULL, 0, hwnd);
- ok(!err,"mci cue output after open file returned %s\n", dbg_mcierr(err));
- /* Notification is delayed as a play thread is started. */
- todo_wine test_notification1(hwnd, "cue immediate", 0);
-
- /* Cue pretends to put the MCI into paused state. */
- err = mciSendString("status mysound mode", buf, sizeof(buf), hwnd);
- ok(!err,"mci status mode returned %s\n", dbg_mcierr(err));
- todo_wine ok(!strcmp(buf,"paused"), "mci status mode: %s, expected (pseudo)paused\n", buf);
-
- /* Strange pause where Pause is rejected, unlike Play; Pause; Pause tested below */
- err = mciSendString("pause mysound", NULL, 0, hwnd);
- ok(err==MCIERR_NONAPPLICABLE_FUNCTION,"mci pause after cue returned %s\n", dbg_mcierr(err));
-
- /* MCI appears to start the play thread in this border case.
- * Guessed that from (flaky) status mode and late notification arrival. */
- err = mciSendString("play mysound from 0 to 0 notify", NULL, 0, hwnd);
- ok(!err,"mci play from 0 to 0 returned %s\n", dbg_mcierr(err));
- todo_wine test_notification1(hwnd, "cue aborted by play", MCI_NOTIFY_ABORTED);
- /* play's own notification follows below */
-
- err = mciSendString("play mysound from 250 to 0", NULL, 0, NULL);
- ok(err==MCIERR_OUTOFRANGE,"mci play from 250 to 0 returned %s\n", dbg_mcierr(err));
-
- Sleep(50); /* Give play from 0 to 0 time to finish. */
- todo_wine test_notification1(hwnd, "play from 0 to 0", MCI_NOTIFY_SUCCESSFUL);
-
- err = mciSendString("status mysound mode", buf, sizeof(buf), hwnd);
- ok(!err,"mci status mode returned %s\n", dbg_mcierr(err));
- ok(!strcmp(buf,"stopped"), "mci status mode: %s after play from 0 to 0\n", buf);
-
- err = mciSendString("play MYSOUND from 250 to 0 notify", NULL, 0, hwnd);
- ok(err==MCIERR_OUTOFRANGE,"mci play from 250 to 0 notify returned %s\n", dbg_mcierr(err));
- /* No notification (checked below) sent if error */
-
- /* A second play caused Wine<1.1.33 to hang */
- err = mciSendString("play mysound from 500 to 1500 wait", NULL, 0, NULL);
- ok(!err,"mci play from 500 to 1500 returned %s\n", dbg_mcierr(err));
-
- memset(buf, 0, sizeof(buf));
- err = mciSendString("status mysound position", buf, sizeof(buf), hwnd);
- ok(!err,"mci status position returned %s\n", dbg_mcierr(err));
- if(!err) ok(!strcmp(buf,"1500"), "mci status position: %s\n", buf);
-
- /* mci will not play position < current */
- err = mciSendString("play mysound to 1000", NULL, 0, NULL);
- ok(err==MCIERR_OUTOFRANGE,"mci play to 1000 returned %s\n", dbg_mcierr(err));
-
- /* mci will not play to > end */
- err = mciSendString("play mysound TO 3000 notify", NULL, 0, hwnd);
- ok(err==MCIERR_OUTOFRANGE,"mci play to 3000 notify returned %s\n", dbg_mcierr(err));
-
- err = mciSendString("play mysound to 2000", NULL, 0, NULL);
- ok(!err,"mci play to 2000 returned %s\n", dbg_mcierr(err));
-
- /* Rejected while playing */
- err = mciSendString("cue mysound output", NULL, 0, NULL);
- ok(err==MCIERR_NONAPPLICABLE_FUNCTION,"mci cue output while playing returned %s\n", dbg_mcierr(err));
-
- err = mciSendString("play mysound to 3000", NULL, 0, NULL);
- ok(err==MCIERR_OUTOFRANGE,"mci play to 3000 returned %s\n", dbg_mcierr(err));
-
- err = mciSendString("stop mysound Wait", NULL, 0, NULL);
- ok(!err,"mci stop wait returned %s\n", dbg_mcierr(err));
- test_notification(hwnd, "play/cue/pause/stop", 0);
+ todo_wine ok(err == MCIERR_INVALID_DEVICE_ID ||
+ broken(!err), /* Win9x and WinMe */
+ "mciSendCommand(MCI_ALL_DEVICE_ID, MCI_CLOSE, MCI_NOTIFY, NULL) returned %d instead of %d\n",
+ err, MCIERR_INVALID_DEVICE_ID);
- err = mciSendString("Seek Mysound to 250 wait Notify", NULL, 0, hwnd);
- ok(!err,"mci seek to 250 wait notify returned %s\n", dbg_mcierr(err));
- test_notification(hwnd,"seek wait notify",MCI_NOTIFY_SUCCESSFUL);
-
- memset(buf, 0, sizeof(buf));
- err = mciSendString("status mysound position notify", buf, sizeof(buf), hwnd);
- ok(!err,"mci status position notify returned %s\n", dbg_mcierr(err));
- if(!err) ok(!strcmp(buf,"250"), "mci status position: %s\n", buf);
- /* Immediate commands like status also send notifications. */
- test_notification(hwnd,"status position",MCI_NOTIFY_SUCCESSFUL);
-
- memset(buf, 0, sizeof(buf));
- err = mciSendString("status mysound mode", buf, sizeof(buf), hwnd);
- ok(!err,"mci status mode returned %s\n", dbg_mcierr(err));
- ok(!strcmp(buf,"stopped"), "mci status mode: %s\n", buf);
-
- /* Another play from == to testcase */
- err = mciSendString("play mysound to 250 wait notify", NULL, 0, hwnd);
- ok(!err,"mci play (from 250) to 250 returned %s\n", dbg_mcierr(err));
- todo_wine test_notification1(hwnd,"play to 250 wait notify",MCI_NOTIFY_SUCCESSFUL);
-
- err = mciSendString("cue mysound output", NULL, 0, NULL);
- ok(!err,"mci cue output after play returned %s\n", dbg_mcierr(err));
-
- err = mciSendString("close mysound", NULL, 0, NULL);
- ok(!err,"mci close returned %s\n", dbg_mcierr(err));
- test_notification(hwnd,"after close",0);
-}
-
-static void test_asyncWAVE(HWND hwnd)
-{
- MCIDEVICEID wDeviceID;
- MCI_PARMS_UNION parm;
- int err, p1, p2;
- char buf[1024];
- memset(buf, 0, sizeof(buf));
-
- err = mciSendString("open tempfile.wav alias mysound notify", buf, sizeof(buf), hwnd);
- ok(err==ok_saved,"mci open tempfile.wav returned %s\n", dbg_mcierr(err));
- if(err) {
- skip("Cannot open tempfile.wav for playing (%s), skipping\n", dbg_mcierr(err));
- return;
- }
- ok(!strcmp(buf,"1"), "mci open deviceId: %s, expected 1\n", buf);
- wDeviceID = atoi(buf);
- ok(wDeviceID,"mci open DeviceID: %d\n", wDeviceID);
- test_notification(hwnd,"open alias notify",MCI_NOTIFY_SUCCESSFUL);
-
- err = mciSendString("status mysound mode", buf, sizeof(buf), hwnd);
- ok(!err,"mci status mode returned %s\n", dbg_mcierr(err));
- ok(!strcmp(buf,"stopped"), "mci status mode: %s\n", buf);
-
- err = mciSendString("play mysound notify", NULL, 0, hwnd);
- ok(!err,"mci play returned %s\n", dbg_mcierr(err));
-
- /* Give Wine's asynchronous thread time to start up. Furthermore,
- * it uses 3 buffers per second, so that the positions reported
- * will be 333ms, 667ms etc. at best. */
- Sleep(100); /* milliseconds */
-
- /* Do not query time format as string because result depends on locale! */
- parm.status.dwItem = MCI_STATUS_TIME_FORMAT;
- err = mciSendCommand(wDeviceID, MCI_STATUS, MCI_STATUS_ITEM, (DWORD_PTR)&parm);
- ok(!err,"mciCommand status time format: %s\n", dbg_mcierr(err));
- if(!err) ok(parm.status.dwReturn==MCI_FORMAT_MILLISECONDS,"status time format: %ld\n",parm.status.dwReturn);
-
- parm.set.dwTimeFormat = MCI_FORMAT_MILLISECONDS;
- err = mciSendCommand(wDeviceID, MCI_SET, MCI_SET_TIME_FORMAT, (DWORD_PTR)&parm);
- ok(!err,"mciCommand set time format ms: %s\n", dbg_mcierr(err));
-
- buf[0]=0;
- err = mciSendString("status mysound position", buf, sizeof(buf), hwnd);
- ok(!err,"mci status position returned %s\n", dbg_mcierr(err));
- ok(strcmp(buf,"2000"), "mci status position: %s, expected 2000\n", buf);
- trace("position after Sleep: %sms\n",buf);
- p2 = atoi(buf);
- /* Some machines reach 79ms only during the 100ms sleep. */
- ok(p2>=67,"not enough time elapsed %ums\n",p2);
- test_notification(hwnd,"play (nowait)",0);
-
- err = mciSendString("pause mysound wait", NULL, 0, hwnd);
- ok(!err,"mci pause wait returned %s\n", dbg_mcierr(err));
-
- buf[0]=0;
- err = mciSendString("status mysound mode notify", buf, sizeof(buf), hwnd);
- ok(!err,"mci status mode returned %s\n", dbg_mcierr(err));
- if(!err) ok(!strcmp(buf,"paused"), "mci status mode: %s\n", buf);
- test_notification(hwnd,"play",MCI_NOTIFY_SUPERSEDED);
- test_notification(hwnd,"status",MCI_NOTIFY_SUCCESSFUL);
-
- buf[0]=0;
- err = mciSendString("status mysound position", buf, sizeof(buf), hwnd);
- ok(!err,"mci status position returned %s\n", dbg_mcierr(err));
- trace("position while paused: %sms\n",buf);
- p1 = atoi(buf);
- ok(p1>=p2, "position not increasing: %u > %u\n", p2, p1);
-
- err = mciSendString("stop mysound wait", NULL, 0, NULL);
- ok(!err,"mci stop returned %s\n", dbg_mcierr(err));
-
- buf[0]=0;
- err = mciSendString("info mysound file notify", buf, sizeof(buf), hwnd);
- ok(!err,"mci info file returned %s\n", dbg_mcierr(err));
- if(!err) { /* fully qualified name */
- int len = strlen(buf);
- todo_wine ok(len>2 && buf[1]==':',"Expected full pathname from info file: %s\n", buf);
- ok(len>=12 && !strcmp(&buf[len-12],"tempfile.wav"), "info file returned: %s\n", buf);
- }
- test_notification(hwnd,"info file",MCI_NOTIFY_SUCCESSFUL);
-
- buf[0]=0;
- err = mciSendString("status mysound mode", buf, sizeof(buf), hwnd);
- ok(!err,"mci status mode returned %s\n", dbg_mcierr(err));
- ok(!strcmp(buf,"stopped"), "mci status mode: %s\n", buf);
-
- buf[0]=0;
- err = mciSendString("status mysound position", buf, sizeof(buf), hwnd);
- ok(!err,"mci status position returned %s\n", dbg_mcierr(err));
- trace("position once stopped: %sms\n",buf);
- p2 = atoi(buf);
- /* An XP machine let the position increase slightly after pause. */
- ok(p2>=p1 && p2<=p1+16,"position changed from %ums to %ums\n",p1,p2);
-
- /* No Resume once stopped (waveaudio, sequencer and cdaudio differ). */
- err = mciSendString("resume mysound wait", NULL, 0, NULL);
- ok(err==MCIERR_NONAPPLICABLE_FUNCTION,"mci resume wait returned %s\n", dbg_mcierr(err));
-
- err = mciSendString("play mysound wait", NULL, 0, NULL);
- ok(!err,"mci play wait returned %s\n", dbg_mcierr(err));
-
- buf[0]=0;
- err = mciSendString("status mysound position", buf, sizeof(buf), hwnd);
- ok(!err,"mci status position returned %s\n", dbg_mcierr(err));
- todo_wine ok(!strcmp(buf,"2000"), "mci status position: %s\n", buf);
-
- err = mciSendString("seek mysound to start wait", NULL, 0, NULL);
- ok(!err,"mci seek to start wait returned %s\n", dbg_mcierr(err));
-
- err = mciSendString("play mysound to 1000 notify", NULL, 0, hwnd);
- ok(!err,"mci play returned %s\n", dbg_mcierr(err));
-
- /* Sleep(200); not needed with Wine any more. */
-
- err = mciSendString("pause mysound notify", NULL, 0, NULL); /* notify no callback */
- ok(!err,"mci pause notify returned %s\n", dbg_mcierr(err));
- /* Supersede even though pause cannot notify given no callback */
- test_notification(hwnd,"pause aborted play #1 notification",MCI_NOTIFY_SUPERSEDED);
- test_notification(hwnd,"impossible pause notification",0);
-
- err = mciSendString("cue mysound output notify", NULL, 0, hwnd);
- ok(err==MCIERR_NONAPPLICABLE_FUNCTION,"mci cue output while paused returned %s\n", dbg_mcierr(err));
- test_notification(hwnd,"cue output notify #2",0);
-
- err = mciSendString("resume mysound notify", NULL, 0, hwnd);
- ok(!err,"mci resume notify returned %s\n", dbg_mcierr(err));
- test_notification(hwnd, "resume notify", MCI_NOTIFY_SUCCESSFUL);
-
- /* Seek or even Stop used to hang Wine<1.1.32 on MacOS. */
- err = mciSendString("seek mysound to 0 wait", NULL, 0, NULL);
- ok(!err,"mci seek to start returned %s\n", dbg_mcierr(err));
-
- /* Seek stops. */
- err = mciSendString("status mysound mode", buf, sizeof(buf), NULL);
- ok(!err,"mci status mode returned %s\n", dbg_mcierr(err));
- if(!err) ok(!strcmp(buf,"stopped"), "mci status mode: %s\n", buf);
-
- err = mciSendString("seek mysound wait", NULL, 0, NULL);
- ok(err==MCIERR_MISSING_PARAMETER,"mci seek to nowhere returned %s\n", dbg_mcierr(err));
-
- /* cdaudio does not detect to start to end as error */
- err = mciSendString("seek mysound to start to 0", NULL, 0, NULL);
- ok(err==MCIERR_FLAGS_NOT_COMPATIBLE,"mci seek to start to 0 returned %s\n", dbg_mcierr(err));
-
- err = mciSendString("PLAY mysound to 1000 notify", NULL, 0, hwnd);
- ok(!err,"mci play to 1000 notify returned %s\n", dbg_mcierr(err));
-
- /* Sleep(200); not needed with Wine any more. */
- /* Give it 400ms and resume will appear to complete below. */
-
- err = mciSendString("pause mysound wait", NULL, 0, NULL);
- ok(!err,"mci pause wait returned %s\n", dbg_mcierr(err));
- /* Unlike sequencer and cdaudio, waveaudio's pause does not abort. */
- test_notification(hwnd,"pause aborted play #2 notification",0);
-
- err = mciSendString("resume mysound wait", NULL, 0, NULL);
- ok(!err,"mci resume wait returned %s\n", dbg_mcierr(err));
- /* Resume is a short asynchronous call, something else is playing. */
-
- err = mciSendString("status mysound mode", buf, sizeof(buf), NULL);
- ok(!err,"mci status mode returned %s\n", dbg_mcierr(err));
- if(!err) ok(!strcmp(buf,"playing"), "mci status mode: %s\n", buf);
-
- /* Note extra space before alias */
- err = mciSendString("pause mysound wait", NULL, 0, NULL);
- todo_wine ok(!err,"mci pause (space) wait returned %s\n", dbg_mcierr(err));
-
- err = mciSendString("pause mysound wait", NULL, 0, NULL);
- ok(!err,"mci pause wait returned %s\n", dbg_mcierr(err));
-
- /* Better ask position only when paused, is it updated while playing? */
- buf[0]='\0';
- err = mciSendString("status mysound position", buf, sizeof(buf), NULL);
- ok(!err,"mci status position returned %s\n", dbg_mcierr(err));
- /* TODO compare position < 900 */
- ok(strcmp(buf,"1000"), "mci resume waited\n");
- ok(strcmp(buf,"2000"), "mci resume played to end\n");
- trace("position after resume: %sms\n",buf);
- test_notification(hwnd,"play (aborted by pause/resume/pause)",0);
-
- err = mciSendString("close mysound wait", NULL, 0, NULL);
- ok(!err,"mci close wait returned %s\n", dbg_mcierr(err));
- test_notification(hwnd,"play (aborted by close)",MCI_NOTIFY_ABORTED);
-}
-
-static void test_AutoOpenWAVE(HWND hwnd)
-{
- /* This test used(?) to cause intermittent crashes when Wine exits, after
- * fixme:winmm:MMDRV_Exit Closing while ll-driver open
- */
- MCIERROR err, ok_snd;
- char buf[512], path[300], command[330];
- memset(buf, 0, sizeof(buf)); memset(path, 0, sizeof(path));
-
- /* Do not crash on NULL buffer pointer */
- err = mciSendString("sysinfo waveaudio quantity open", NULL, 0, NULL);
- ok(err==MCIERR_PARAM_OVERFLOW,"mci sysinfo without buffer returned %s\n", dbg_mcierr(err));
-
- err = mciSendString("sysinfo waveaudio quantity open", buf, sizeof(buf), NULL);
- ok(!err,"mci sysinfo waveaudio quantity open returned %s\n", dbg_mcierr(err));
- if(!err) todo_wine ok(!strcmp(buf,"0"), "sysinfo quantity open expected 0, got: %s, some more tests will fail.\n", buf);
-
- ok_snd = waveOutGetNumDevs() ? 0 : MCIERR_HARDWARE;
- err = mciSendString("sound NoSuchSoundDefined wait", NULL, 0, NULL);
- todo_wine ok(err==ok_snd,"mci sound NoSuchSoundDefined returned %s\n", dbg_mcierr(err));
-
- err = mciSendString("sound SystemExclamation notify wait", NULL, 0, hwnd);
- todo_wine ok(err==ok_snd,"mci sound SystemExclamation returned %s\n", dbg_mcierr(err));
- test_notification(hwnd, "sound notify", err ? 0 : MCI_NOTIFY_SUCCESSFUL);
-
- buf[0]=0;
- err = mciSendString("sysinfo waveaudio name 1 open", buf, sizeof(buf), NULL);
- todo_wine ok(err==MCIERR_OUTOFRANGE,"sysinfo waveaudio name 1 returned %s\n", dbg_mcierr(err));
- if(!err) trace("sysinfo dangling open alias: %s\n", buf);
-
- err = mciSendString("play no-such-file-exists.wav notify", buf, sizeof(buf), NULL);
- if(err==MCIERR_FILE_NOT_FOUND) { /* a Wine detector */
- /* Unsupported auto-open leaves the file open, preventing clean-up */
- skip("Skipping auto-open tests in Wine\n");
- return;
- }
-
- err = mciSendString("play tempfile.wav notify", buf, sizeof(buf), hwnd);
- todo_wine ok(err==MCIERR_NOTIFY_ON_AUTO_OPEN,"mci auto-open play notify returned %s\n", dbg_mcierr(err));
-
- if(err) /* FIXME: don't open twice yet, it confuses Wine. */
- err = mciSendString("play tempfile.wav", buf, sizeof(buf), hwnd);
- ok(err==ok_saved,"mci auto-open play returned %s\n", dbg_mcierr(err));
-
- if(err==MCIERR_FILE_NOT_FOUND) {
- skip("Cannot open tempfile.wav for auto-play, skipping\n");
- return;
- }
-
- buf[0]=0;
- err = mciSendString("sysinfo waveaudio quantity open", buf, sizeof(buf), NULL);
- ok(!err,"mci sysinfo waveaudio quantity after auto-open returned %s\n", dbg_mcierr(err));
- if(!err) todo_wine ok(!strcmp(buf,"1"), "sysinfo quantity open expected 1, got: %s\n", buf);
-
- buf[0]=0;
- err = mciSendString("sysinfo waveaudio name 1 open", buf, sizeof(buf), NULL);
- todo_wine ok(!err,"mci sysinfo waveaudio name after auto-open returned %s\n", dbg_mcierr(err));
- /* This is the alias, not necessarily a file name. */
- if(!err) ok(!strcmp(buf,"tempfile.wav"), "sysinfo name 1 open: %s\n", buf);
-
- /* Save the full pathname to the file. */
- err = mciSendString("info tempfile.wav file", path, sizeof(path), NULL);
- ok(!err,"mci info tempfile.wav file returned %s\n", dbg_mcierr(err));
- if(err) strcpy(path,"tempfile.wav");
-
- err = mciSendString("status tempfile.wav mode", NULL, 0, hwnd);
- ok(!err,"mci status tempfile.wav mode without buffer returned %s\n", dbg_mcierr(err));
-
- sprintf(command,"status \"%s\" mode",path);
- err = mciSendString(command, buf, sizeof(buf), hwnd);
- ok(!err,"mci status \"%s\" mode returned %s\n", path, dbg_mcierr(err));
-
- buf[0]=0;
- err = mciSendString("status tempfile.wav mode", buf, sizeof(buf), hwnd);
- ok(!err,"mci status tempfile.wav mode returned %s\n", dbg_mcierr(err));
- if(!err) ok(!strcmp(buf,"playing"), "mci auto-open status mode, got: %s\n", buf);
-
- err = mciSendString("open tempfile.wav", buf, sizeof(buf), NULL);
- todo_wine ok(err==MCIERR_DEVICE_OPEN, "mci open from auto-open returned %s\n", dbg_mcierr(err));
-
- /* w2k/xp and Wine differ. While the device is busy playing, it is
- * regularly open and accessible via the filename: subsequent
- * commands must not cause auto-open each. In Wine, a subsequent
- * command with notify request may cause the initial play
- * notification to be superseded, in turn causing MCI to close the
- * device. I.e. MCI uses the auto-open notification for itself,
- * that's why it's not available to the app. On w2k/xp,
- * subsequent commands with notify requests are returned with
- * MCIERR_NOTIFY_ON_AUTO_OPEN and thus don't abort the original
- * command.
- */
- err = mciSendString("status tempfile.wav mode notify", buf, sizeof(buf), hwnd);
- todo_wine ok(err==MCIERR_NOTIFY_ON_AUTO_OPEN, "mci status auto-open notify returned %s\n", dbg_mcierr(err));
- if(!err) {
- trace("Wine style MCI auto-close upon notification\n");
-
- /* "playing" because auto-close comes after the status call. */
- todo_wine ok(!strcmp(buf,"playing"), "mci auto-open status mode notify, got: %s\n", buf);
- /* fixme:winmm:MMDRV_Exit Closing while ll-driver open
- * is explained by failure to auto-close a device. */
- test_notification(hwnd,"status notify",MCI_NOTIFY_SUCCESSFUL);
- /* MCI received NOTIFY_SUPERSEDED and auto-closed the device. */
- Sleep(16);
- test_notification(hwnd,"auto-open",0);
- } else if(err==MCIERR_NOTIFY_ON_AUTO_OPEN) { /* MS style */
- trace("MS style MCI auto-open forbids notification\n");
-
- err = mciSendString("pause tempfile.wav", NULL, 0, hwnd);
- ok(!err,"mci auto-still-open pause returned %s\n", dbg_mcierr(err));
-
- err = mciSendString("status tempfile.wav mode", buf, sizeof(buf), hwnd);
- ok(!err,"mci status mode returned %s\n", dbg_mcierr(err));
- if(!err) ok(!strcmp(buf,"paused"), "mci auto-open status mode, got: %s\n", buf);
-
- /* Auto-close */
- err = mciSendString("stop tempfile.wav", NULL, 0, hwnd);
- ok(!err,"mci auto-still-open stop returned %s\n", dbg_mcierr(err));
- Sleep(16); /* makes sysinfo quantity open below succeed */
- }
-
- err = mciSendString("sysinfo waveaudio quantity open", buf, sizeof(buf), NULL);
- ok(!err,"mci sysinfo waveaudio quantity open after close returned %s\n", dbg_mcierr(err));
- if(!err) todo_wine ok(!strcmp(buf,"0"), "sysinfo quantity open expected 0 after auto-close, got: %s\n", buf);
-
- /* w95-WinME (not w2k/XP) switch to C:\ after auto-playing once. Prevent
- * MCIERR_FILE_NOT_FOUND by using the full path name from the Info file command.
- */
- sprintf(command,"status \"%s\" mode wait",path);
- err = mciSendString(command, buf, sizeof(buf), hwnd);
- ok(!err,"mci re-auto-open status mode returned %s\n", dbg_mcierr(err));
- if(!err) ok(!strcmp(buf,"stopped"), "mci re-auto-open status mode, got: %s\n", buf);
-
- err = mciSendString("capability waveaudio device type", buf, sizeof(buf), hwnd);
- ok(!err,"mci capability device type returned %s\n", dbg_mcierr(err));
- if(!err) ok(!strcmp(buf,"waveaudio"), "mci capability device type response: %s\n", buf);
-
- /* waveaudio forbids Pause without Play. */
- sprintf(command,"pause \"%s\"",path);
- err = mciSendString(command, NULL, 0, hwnd);
- ok(err==MCIERR_NONAPPLICABLE_FUNCTION,"mci auto-open pause returned %s\n", dbg_mcierr(err));
-}
-
-START_TEST(mci)
-{
- MCIERROR err;
- HWND hwnd;
- hwnd = CreateWindowExA(0, "static", "winmm test", WS_POPUP, 0,0,100,100,
- 0, 0, 0, NULL);
- test_openCloseWAVE(hwnd);
- test_recordWAVE(hwnd);
- test_playWAVE(hwnd);
- test_asyncWAVE(hwnd);
- test_AutoOpenWAVE(hwnd);
- /* Win9X hangs when exiting with something still open. */
- err = mciSendString("close all", NULL, 0, hwnd);
- todo_wine ok(!err,"final close all returned %s\n", dbg_mcierr(err));
- ok(DeleteFile("tempfile.wav")||ok_saved,"Delete tempfile.wav (cause auto-open?)\n");
DestroyWindow(hwnd);
}
ok( !ret, "ldap_search_ext_sA failed 0x%x\n", ret );
ok( res != NULL, "expected res != NULL\n" );
- if (GetProcAddress(GetModuleHandle("wldap32.dll"), "ber_init"))
- {
- ret = ldap_parse_resultA( NULL, res, &result, NULL, NULL, NULL, &server_ctrls, 1 );
- ok( ret == LDAP_PARAM_ERROR, "ldap_parse_resultA failed 0x%x\n", ret );
- }
- else
- win_skip("Test would crash on older wldap32 versions\n");
+ ret = ldap_parse_resultA( NULL, res, &result, NULL, NULL, NULL, &server_ctrls, 1 );
+ ok( ret == LDAP_PARAM_ERROR, "ldap_parse_resultA failed 0x%x\n", ret );
result = ~0u;
ret = ldap_parse_resultA( ld, res, &result, NULL, NULL, NULL, &server_ctrls, 1 );
-Wallpapers
-===========
-
-File Name | Author | Origin
---------------------------------------------------------------------------------------------------------------------------------------------------
-Angelus_02_ROSWP_4-3_1440x1080.jpg | Forum User "Angelus" (jedi.knight@wanadoo.es) | http://www.reactos.org/forum/viewtopic.php?p=50543#p50543
-clouds.jpg | Andreas Bjerkeholt (harteex@gmail.com) | http://www.reactos.org/forum/viewtopic.php?p=17732#p17732
-lake.jpg | Andreas Bjerkeholt (harteex@gmail.com) | http://www.reactos.org/forum/viewtopic.php?p=17732#p17732
+wallpaper
+
+posten in ReactOS Forum May 17, 2006 7:31 pm
+cluds.jpg
+Copyright by Andreas Bjerkeholt (harteex at gmail dot com)
+
+lake.jpg
+Copyright by Andreas Bjerkeholt (harteex at gmail dot com)
+
+
<group>
- <installfile>Angelus_02_ROSWP.bmp</installfile>
+ <installfile>lake.bmp</installfile>
</group>
\ No newline at end of file