summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-17 04:41:54 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-17 04:41:54 +0000
commit2d650398a9afa1fc3c168aed736daa13901809a8 (patch)
tree6dc4a48b54cdca7f0946ac097353b5c1ca733b40 /base
parentdf0ca6c858762b101bf424ff6c0522409fa195fc (diff)
downloadchromium_src-2d650398a9afa1fc3c168aed736daa13901809a8.zip
chromium_src-2d650398a9afa1fc3c168aed736daa13901809a8.tar.gz
chromium_src-2d650398a9afa1fc3c168aed736daa13901809a8.tar.bz2
Move pe_image and registry from base to base/win and use the namespace. It removes windows_message_list which isn't used.
This keeps a stub for registry in the old location until we can update that. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3836005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62888 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/base.gyp9
-rw-r--r--base/base.gypi8
-rw-r--r--base/file_util_win.cc4
-rw-r--r--base/registry.h166
-rw-r--r--base/win/pe_image.cc (renamed from base/pe_image.cc)10
-rw-r--r--base/win/pe_image.h (renamed from base/pe_image.h)14
-rw-r--r--base/win/pe_image_unittest.cc (renamed from base/pe_image_unittest.cc)8
-rw-r--r--base/win/registry.cc (renamed from base/registry.cc)8
-rw-r--r--base/win/registry.h171
-rw-r--r--base/win/registry_unittest.cc (renamed from base/registry_unittest.cc)8
-rw-r--r--base/win_util.cc8
-rw-r--r--base/windows_message_list.h249
12 files changed, 242 insertions, 421 deletions
diff --git a/base/base.gyp b/base/base.gyp
index e432815..5145404 100644
--- a/base/base.gyp
+++ b/base/base.gyp
@@ -113,7 +113,6 @@
'object_watcher_unittest.cc',
'observer_list_unittest.cc',
'path_service_unittest.cc',
- 'pe_image_unittest.cc',
'pickle_unittest.cc',
'platform_file_unittest.cc',
'platform_thread_unittest.cc',
@@ -123,7 +122,6 @@
'process_util_unittest_mac.mm',
'rand_util_unittest.cc',
'ref_counted_unittest.cc',
- 'registry_unittest.cc',
'scoped_native_library_unittest.cc',
'scoped_ptr_unittest.cc',
'scoped_temp_dir_unittest.cc',
@@ -165,6 +163,8 @@
'watchdog_unittest.cc',
'weak_ptr_unittest.cc',
'win_util_unittest.cc',
+ 'win/pe_image_unittest.cc',
+ 'win/registry_unittest.cc',
'win/scoped_bstr_unittest.cc',
'win/scoped_comptr_unittest.cc',
'win/scoped_variant_unittest.cc',
@@ -221,11 +221,6 @@
'event_trace_controller_win_unittest.cc',
'event_trace_provider_win_unittest.cc',
'object_watcher_unittest.cc',
- 'pe_image_unittest.cc',
- 'registry_unittest.cc',
- 'scoped_bstr_win_unittest.cc',
- 'scoped_comptr_win_unittest.cc',
- 'scoped_variant_win_unittest.cc',
'system_monitor_unittest.cc',
'time_win_unittest.cc',
'trace_event_win_unittest.cc',
diff --git a/base/base.gypi b/base/base.gypi
index b608e82..b449a89 100644
--- a/base/base.gypi
+++ b/base/base.gypi
@@ -156,8 +156,6 @@
'observer_list_threadsafe.h',
'path_service.cc',
'path_service.h',
- 'pe_image.cc',
- 'pe_image.h',
'pickle.cc',
'pickle.h',
'platform_file.h',
@@ -189,8 +187,6 @@
'ref_counted.h',
'ref_counted_memory.cc',
'ref_counted_memory.h',
- 'registry.cc',
- 'registry.h',
'resource_util.cc',
'resource_util.h',
'safe_strerror_posix.cc',
@@ -295,6 +291,10 @@
'watchdog.h',
'weak_ptr.cc',
'weak_ptr.h',
+ 'win/pe_image.cc',
+ 'win/pe_image.h',
+ 'win/registry.cc',
+ 'win/registry.h',
'win/scoped_bstr.cc',
'win/scoped_bstr.h',
'win/scoped_comptr.h',
diff --git a/base/file_util_win.cc b/base/file_util_win.cc
index 213833b..d9f8404 100644
--- a/base/file_util_win.cc
+++ b/base/file_util_win.cc
@@ -15,7 +15,7 @@
#include "base/file_path.h"
#include "base/logging.h"
#include "base/metrics/histogram.h"
-#include "base/pe_image.h"
+#include "base/win/pe_image.h"
#include "base/win/scoped_handle.h"
#include "base/string_number_conversions.h"
#include "base/string_util.h"
@@ -1051,7 +1051,7 @@ bool PreReadImage(const wchar_t* file_path, size_t size_to_read,
if (!dll_module)
return false;
- PEImage pe_image(dll_module);
+ base::win::PEImage pe_image(dll_module);
PIMAGE_NT_HEADERS nt_headers = pe_image.GetNTHeaders();
size_t actual_size_to_read = size_to_read ? size_to_read :
nt_headers->OptionalHeader.SizeOfImage;
diff --git a/base/registry.h b/base/registry.h
index 7584de019..5ef45f2 100644
--- a/base/registry.h
+++ b/base/registry.h
@@ -6,160 +6,34 @@
#define BASE_REGISTRY_H_
#pragma once
-#include <windows.h>
-#include <string>
+// TODO(brettw) remove this file when all callers are converted to using the
+// new location & namespace.
+#include "base/win/registry.h"
-#include "base/basictypes.h"
-
-// Utility class to read, write and manipulate the Windows Registry.
-// Registry vocabulary primer: a "key" is like a folder, in which there
-// are "values", which are <name, data> pairs, with an associated data type.
-class RegKey {
+class RegKey : public base::win::RegKey {
public:
- RegKey();
- RegKey(HKEY rootkey, const wchar_t* subkey, REGSAM access);
- ~RegKey();
-
- bool Create(HKEY rootkey, const wchar_t* subkey, REGSAM access);
-
- bool CreateWithDisposition(HKEY rootkey, const wchar_t* subkey,
- DWORD* disposition, REGSAM access);
-
- bool Open(HKEY rootkey, const wchar_t* subkey, REGSAM access);
-
- // Creates a subkey or open it if it already exists.
- bool CreateKey(const wchar_t* name, REGSAM access);
-
- // Opens a subkey
- bool OpenKey(const wchar_t* name, REGSAM access);
-
- void Close();
-
- DWORD ValueCount();
-
- // Determine the nth value's name.
- bool ReadName(int index, std::wstring* name);
-
- // True while the key is valid.
- bool Valid() const { return key_ != NULL; }
-
- // Kill a key and everything that live below it; please be careful when using
- // it.
- bool DeleteKey(const wchar_t* name);
-
- // Deletes a single value within the key.
- bool DeleteValue(const wchar_t* name);
-
- bool ValueExists(const wchar_t* name);
-
- bool ReadValue(const wchar_t* name, void* data, DWORD* dsize, DWORD* dtype);
- bool ReadValue(const wchar_t* name, std::wstring* value);
- bool ReadValueDW(const wchar_t* name, DWORD* value);
-
- bool WriteValue(const wchar_t* name, const void* data, DWORD dsize,
- DWORD dtype);
- bool WriteValue(const wchar_t* name, const wchar_t* value);
- bool WriteValue(const wchar_t* name, DWORD value);
-
- // Starts watching the key to see if any of its values have changed.
- // The key must have been opened with the KEY_NOTIFY access privelege.
- bool StartWatching();
-
- // If StartWatching hasn't been called, always returns false.
- // Otherwise, returns true if anything under the key has changed.
- // This can't be const because the |watch_event_| may be refreshed.
- bool HasChanged();
-
- // Will automatically be called by destructor if not manually called
- // beforehand. Returns true if it was watching, false otherwise.
- bool StopWatching();
-
- inline bool IsWatching() const { return watch_event_ != 0; }
- HANDLE watch_event() const { return watch_event_; }
- HKEY Handle() const { return key_; }
-
- private:
- HKEY key_; // The registry key being iterated.
- HANDLE watch_event_;
-
- DISALLOW_COPY_AND_ASSIGN(RegKey);
+ RegKey() {}
+ RegKey(HKEY rootkey, const wchar_t* subkey, REGSAM access)
+ : base::win::RegKey(rootkey, subkey, access) {}
+ ~RegKey() { base::win::RegKey::~RegKey(); }
};
-// Iterates the entries found in a particular folder on the registry.
-// For this application I happen to know I wont need data size larger
-// than MAX_PATH, but in real life this wouldn't neccessarily be
-// adequate.
-class RegistryValueIterator {
+class RegistryValueIterator : public base::win::RegistryValueIterator {
public:
- RegistryValueIterator(HKEY root_key, const wchar_t* folder_key);
-
- ~RegistryValueIterator();
-
- DWORD ValueCount() const;
-
- // True while the iterator is valid.
- bool Valid() const;
-
- // Advances to the next registry entry.
- void operator++();
-
- const wchar_t* Name() const { return name_; }
- const wchar_t* Value() const { return value_; }
- DWORD ValueSize() const { return value_size_; }
- DWORD Type() const { return type_; }
-
- int Index() const { return index_; }
-
- private:
- // Read in the current values.
- bool Read();
-
- // The registry key being iterated.
- HKEY key_;
-
- // Current index of the iteration.
- int index_;
-
- // Current values.
- wchar_t name_[MAX_PATH];
- wchar_t value_[MAX_PATH];
- DWORD value_size_;
- DWORD type_;
-
- DISALLOW_COPY_AND_ASSIGN(RegistryValueIterator);
+ RegistryValueIterator(HKEY root_key, const wchar_t* folder_key)
+ : base::win::RegistryValueIterator(root_key, folder_key) {}
+ ~RegistryValueIterator() {
+ base::win::RegistryValueIterator::~RegistryValueIterator();
+ }
};
-class RegistryKeyIterator {
+class RegistryKeyIterator : public base::win::RegistryKeyIterator {
public:
- RegistryKeyIterator(HKEY root_key, const wchar_t* folder_key);
-
- ~RegistryKeyIterator();
-
- DWORD SubkeyCount() const;
-
- // True while the iterator is valid.
- bool Valid() const;
-
- // Advances to the next entry in the folder.
- void operator++();
-
- const wchar_t* Name() const { return name_; }
-
- int Index() const { return index_; }
-
- private:
- // Read in the current values.
- bool Read();
-
- // The registry key being iterated.
- HKEY key_;
-
- // Current index of the iteration.
- int index_;
-
- wchar_t name_[MAX_PATH];
-
- DISALLOW_COPY_AND_ASSIGN(RegistryKeyIterator);
+ RegistryKeyIterator(HKEY root_key, const wchar_t* folder_key)
+ : base::win::RegistryKeyIterator(root_key, folder_key) {}
+ ~RegistryKeyIterator() {
+ base::win::RegistryKeyIterator::~RegistryKeyIterator();
+ }
};
#endif // BASE_REGISTRY_H_
diff --git a/base/pe_image.cc b/base/win/pe_image.cc
index 36eb0e4..76fdbcd 100644
--- a/base/pe_image.cc
+++ b/base/win/pe_image.cc
@@ -1,11 +1,14 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This file implements PEImage, a generic class to manipulate PE files.
// This file was adapted from GreenBorder's Code.
-#include "base/pe_image.h"
+#include "base/win/pe_image.h"
+
+namespace base {
+namespace win {
#if defined(_WIN64) && !defined(NACL_WIN64)
// TODO(rvargas): Bug 27218. Make sure this is ok.
@@ -562,3 +565,6 @@ PVOID PEImageAsData::RVAToAddr(DWORD rva) const {
return in_memory;
}
+
+} // namespace win
+} // namespace base
diff --git a/base/pe_image.h b/base/win/pe_image.h
index 968d056..e1205e0 100644
--- a/base/pe_image.h
+++ b/base/win/pe_image.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -8,13 +8,16 @@
// Win32 Portable Executable File Format" by Matt Pietrek:
// http://msdn.microsoft.com/msdnmag/issues/02/02/PE/default.aspx
-#ifndef BASE_PE_IMAGE_H_
-#define BASE_PE_IMAGE_H_
+#ifndef BASE_WIN_PE_IMAGE_H_
+#define BASE_WIN_PE_IMAGE_H_
#pragma once
#include <windows.h>
#include <DelayIMP.h>
+namespace base {
+namespace win {
+
// This class is a wrapper for the Portable Executable File Format (PE).
// It's main purpose is to provide an easy way to work with imports and exports
// from a file, mapped in memory as image.
@@ -255,4 +258,7 @@ inline PIMAGE_EXPORT_DIRECTORY PEImage::GetExportDirectory() const {
GetImageDirectoryEntryAddr(IMAGE_DIRECTORY_ENTRY_EXPORT));
}
-#endif // BASE_PE_IMAGE_H_
+} // namespace win
+} // namespace base
+
+#endif // BASE_WIN_PE_IMAGE_H_
diff --git a/base/pe_image_unittest.cc b/base/win/pe_image_unittest.cc
index 6d8875e..899ce94 100644
--- a/base/pe_image_unittest.cc
+++ b/base/win/pe_image_unittest.cc
@@ -5,9 +5,12 @@
// This file contains unit tests for PEImage.
#include "testing/gtest/include/gtest/gtest.h"
-#include "base/pe_image.h"
+#include "base/win/pe_image.h"
#include "base/win/windows_version.h"
+namespace base {
+namespace win {
+
// Just counts the number of invocations.
bool ExportsCallback(const PEImage &image,
DWORD ordinal,
@@ -211,3 +214,6 @@ TEST(PEImageTest, RetrievesExports) {
FreeLibrary(module);
}
+
+} // namespace win
+} // namespace base
diff --git a/base/registry.cc b/base/win/registry.cc
index f8e58b9..545c337 100644
--- a/base/registry.cc
+++ b/base/win/registry.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/registry.h"
+#include "base/win/registry.h"
#include <shlwapi.h>
@@ -10,6 +10,9 @@
#pragma comment(lib, "shlwapi.lib") // for SHDeleteKey
+namespace base {
+namespace win {
+
RegistryValueIterator::RegistryValueIterator(HKEY root_key,
const wchar_t* folder_key) {
LONG result = RegOpenKeyEx(root_key, folder_key, 0, KEY_READ, &key_);
@@ -379,3 +382,6 @@ bool RegKey::HasChanged() {
}
return false;
}
+
+} // namespace win
+} // namespace base
diff --git a/base/win/registry.h b/base/win/registry.h
new file mode 100644
index 0000000..d1ef25b
--- /dev/null
+++ b/base/win/registry.h
@@ -0,0 +1,171 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_WIN_REGISTRY_H_
+#define BASE_WIN_REGISTRY_H_
+#pragma once
+
+#include <windows.h>
+#include <string>
+
+#include "base/basictypes.h"
+
+namespace base {
+namespace win {
+
+// Utility class to read, write and manipulate the Windows Registry.
+// Registry vocabulary primer: a "key" is like a folder, in which there
+// are "values", which are <name, data> pairs, with an associated data type.
+class RegKey {
+ public:
+ RegKey();
+ RegKey(HKEY rootkey, const wchar_t* subkey, REGSAM access);
+ ~RegKey();
+
+ bool Create(HKEY rootkey, const wchar_t* subkey, REGSAM access);
+
+ bool CreateWithDisposition(HKEY rootkey, const wchar_t* subkey,
+ DWORD* disposition, REGSAM access);
+
+ bool Open(HKEY rootkey, const wchar_t* subkey, REGSAM access);
+
+ // Creates a subkey or open it if it already exists.
+ bool CreateKey(const wchar_t* name, REGSAM access);
+
+ // Opens a subkey
+ bool OpenKey(const wchar_t* name, REGSAM access);
+
+ void Close();
+
+ DWORD ValueCount();
+
+ // Determine the nth value's name.
+ bool ReadName(int index, std::wstring* name);
+
+ // True while the key is valid.
+ bool Valid() const { return key_ != NULL; }
+
+ // Kill a key and everything that live below it; please be careful when using
+ // it.
+ bool DeleteKey(const wchar_t* name);
+
+ // Deletes a single value within the key.
+ bool DeleteValue(const wchar_t* name);
+
+ bool ValueExists(const wchar_t* name);
+
+ bool ReadValue(const wchar_t* name, void* data, DWORD* dsize, DWORD* dtype);
+ bool ReadValue(const wchar_t* name, std::wstring* value);
+ bool ReadValueDW(const wchar_t* name, DWORD* value);
+
+ bool WriteValue(const wchar_t* name, const void* data, DWORD dsize,
+ DWORD dtype);
+ bool WriteValue(const wchar_t* name, const wchar_t* value);
+ bool WriteValue(const wchar_t* name, DWORD value);
+
+ // Starts watching the key to see if any of its values have changed.
+ // The key must have been opened with the KEY_NOTIFY access privelege.
+ bool StartWatching();
+
+ // If StartWatching hasn't been called, always returns false.
+ // Otherwise, returns true if anything under the key has changed.
+ // This can't be const because the |watch_event_| may be refreshed.
+ bool HasChanged();
+
+ // Will automatically be called by destructor if not manually called
+ // beforehand. Returns true if it was watching, false otherwise.
+ bool StopWatching();
+
+ inline bool IsWatching() const { return watch_event_ != 0; }
+ HANDLE watch_event() const { return watch_event_; }
+ HKEY Handle() const { return key_; }
+
+ private:
+ HKEY key_; // The registry key being iterated.
+ HANDLE watch_event_;
+
+ DISALLOW_COPY_AND_ASSIGN(RegKey);
+};
+
+// Iterates the entries found in a particular folder on the registry.
+// For this application I happen to know I wont need data size larger
+// than MAX_PATH, but in real life this wouldn't neccessarily be
+// adequate.
+class RegistryValueIterator {
+ public:
+ RegistryValueIterator(HKEY root_key, const wchar_t* folder_key);
+
+ ~RegistryValueIterator();
+
+ DWORD ValueCount() const;
+
+ // True while the iterator is valid.
+ bool Valid() const;
+
+ // Advances to the next registry entry.
+ void operator++();
+
+ const wchar_t* Name() const { return name_; }
+ const wchar_t* Value() const { return value_; }
+ DWORD ValueSize() const { return value_size_; }
+ DWORD Type() const { return type_; }
+
+ int Index() const { return index_; }
+
+ private:
+ // Read in the current values.
+ bool Read();
+
+ // The registry key being iterated.
+ HKEY key_;
+
+ // Current index of the iteration.
+ int index_;
+
+ // Current values.
+ wchar_t name_[MAX_PATH];
+ wchar_t value_[MAX_PATH];
+ DWORD value_size_;
+ DWORD type_;
+
+ DISALLOW_COPY_AND_ASSIGN(RegistryValueIterator);
+};
+
+class RegistryKeyIterator {
+ public:
+ RegistryKeyIterator(HKEY root_key, const wchar_t* folder_key);
+
+ ~RegistryKeyIterator();
+
+ DWORD SubkeyCount() const;
+
+ // True while the iterator is valid.
+ bool Valid() const;
+
+ // Advances to the next entry in the folder.
+ void operator++();
+
+ const wchar_t* Name() const { return name_; }
+
+ int Index() const { return index_; }
+
+ private:
+ // Read in the current values.
+ bool Read();
+
+ // The registry key being iterated.
+ HKEY key_;
+
+ // Current index of the iteration.
+ int index_;
+
+ wchar_t name_[MAX_PATH];
+
+ DISALLOW_COPY_AND_ASSIGN(RegistryKeyIterator);
+};
+
+} // namespace win
+} // namespace base
+
+#endif // BASE_WIN_REGISTRY_H_
diff --git a/base/registry_unittest.cc b/base/win/registry_unittest.cc
index 2618a75..524612a 100644
--- a/base/registry_unittest.cc
+++ b/base/win/registry_unittest.cc
@@ -2,9 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/registry.h"
+#include "base/win/registry.h"
#include "testing/gtest/include/gtest/gtest.h"
+namespace base {
+namespace win {
+
namespace {
const wchar_t kRootKey[] = L"Base_Registry_Unittest";
@@ -57,3 +60,6 @@ TEST_F(RegistryTest, ValueTest) {
}
} // namespace
+
+} // namespace win
+} // namespace base
diff --git a/base/win_util.cc b/base/win_util.cc
index 70d2829..a576122 100644
--- a/base/win_util.cc
+++ b/base/win_util.cc
@@ -12,7 +12,7 @@
#include <shlobj.h>
#include "base/logging.h"
-#include "base/registry.h"
+#include "base/win/registry.h"
#include "base/scoped_handle.h"
#include "base/scoped_ptr.h"
#include "base/string_util.h"
@@ -127,7 +127,7 @@ std::wstring GetClassName(HWND window) {
}
bool UserAccountControlIsEnabled() {
- RegKey key(HKEY_LOCAL_MACHINE,
+ base::win::RegKey key(HKEY_LOCAL_MACHINE,
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System",
KEY_READ);
DWORD uac_enabled;
@@ -187,12 +187,12 @@ static const char16 kAutoRunKeyPath[] =
bool AddCommandToAutoRun(HKEY root_key, const string16& name,
const string16& command) {
- RegKey autorun_key(root_key, kAutoRunKeyPath, KEY_SET_VALUE);
+ base::win::RegKey autorun_key(root_key, kAutoRunKeyPath, KEY_SET_VALUE);
return autorun_key.WriteValue(name.c_str(), command.c_str());
}
bool RemoveCommandFromAutoRun(HKEY root_key, const string16& name) {
- RegKey autorun_key(root_key, kAutoRunKeyPath, KEY_SET_VALUE);
+ base::win::RegKey autorun_key(root_key, kAutoRunKeyPath, KEY_SET_VALUE);
return autorun_key.DeleteValue(name.c_str());
}
diff --git a/base/windows_message_list.h b/base/windows_message_list.h
deleted file mode 100644
index 3452bab..0000000
--- a/base/windows_message_list.h
+++ /dev/null
@@ -1,249 +0,0 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// WARNING: DO NOT USE standard header file protection.
-// This file may be include several times in its entirety.
-
-// This file contains a list of all messages supported by Windows as would be
-// handled in a message loop. We only list the messages provided in
-// <winuser.h>, and do not currently include (the otherwise undefined)
-// #define WM_SYSTIMER 0x118
-
-// By using various macro tricks, this list can be used to create pretty print
-// functions for the messages. See message_loop.cc for an example.
-
-// Start list of Windows Messages given in <winuser.h>
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_NULL)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_CREATE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_DESTROY)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MOVE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_SIZE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_ACTIVATE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_SETFOCUS)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_KILLFOCUS)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_ENABLE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_SETREDRAW)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_SETTEXT)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_GETTEXT)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_GETTEXTLENGTH)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_PAINT)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_CLOSE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_QUERYENDSESSION)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_QUERYOPEN)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_ENDSESSION)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_QUIT)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_ERASEBKGND)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_SYSCOLORCHANGE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_SHOWWINDOW)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_WININICHANGE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_SETTINGCHANGE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_DEVMODECHANGE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_ACTIVATEAPP)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_FONTCHANGE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_TIMECHANGE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_CANCELMODE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_SETCURSOR)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MOUSEACTIVATE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_CHILDACTIVATE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_QUEUESYNC)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_GETMINMAXINFO)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_PAINTICON)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_ICONERASEBKGND)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_NEXTDLGCTL)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_SPOOLERSTATUS)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_DRAWITEM)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MEASUREITEM)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_DELETEITEM)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_VKEYTOITEM)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_CHARTOITEM)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_SETFONT)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_GETFONT)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_SETHOTKEY)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_GETHOTKEY)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_QUERYDRAGICON)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_COMPAREITEM)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_GETOBJECT)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_COMPACTING)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_COMMNOTIFY)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_WINDOWPOSCHANGING)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_WINDOWPOSCHANGED)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_POWER)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_COPYDATA)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_CANCELJOURNAL)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_NOTIFY)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_INPUTLANGCHANGEREQUEST)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_INPUTLANGCHANGE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_TCARD)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_HELP)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_USERCHANGED)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_NOTIFYFORMAT)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_CONTEXTMENU)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_STYLECHANGING)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_STYLECHANGED)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_DISPLAYCHANGE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_GETICON)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_SETICON)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_NCCREATE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_NCDESTROY)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_NCCALCSIZE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_NCHITTEST)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_NCPAINT)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_NCACTIVATE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_GETDLGCODE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_SYNCPAINT)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_NCMOUSEMOVE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_NCLBUTTONDOWN)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_NCLBUTTONUP)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_NCLBUTTONDBLCLK)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_NCRBUTTONDOWN)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_NCRBUTTONUP)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_NCRBUTTONDBLCLK)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_NCMBUTTONDOWN)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_NCMBUTTONUP)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_NCMBUTTONDBLCLK)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_NCXBUTTONDOWN)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_NCXBUTTONUP)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_NCXBUTTONDBLCLK)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_INPUT_DEVICE_CHANGE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_INPUT)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_KEYFIRST)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_KEYDOWN)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_KEYUP)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_CHAR)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_DEADCHAR)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_SYSKEYDOWN)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_SYSKEYUP)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_SYSCHAR)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_SYSDEADCHAR)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_UNICHAR)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_KEYLAST)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_KEYLAST)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_IME_STARTCOMPOSITION)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_IME_ENDCOMPOSITION)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_IME_COMPOSITION)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_IME_KEYLAST)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_INITDIALOG)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_COMMAND)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_SYSCOMMAND)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_TIMER)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_HSCROLL)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_VSCROLL)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_INITMENU)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_INITMENUPOPUP)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MENUSELECT)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MENUCHAR)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_ENTERIDLE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MENURBUTTONUP)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MENUDRAG)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MENUGETOBJECT)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_UNINITMENUPOPUP)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MENUCOMMAND)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_CHANGEUISTATE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_UPDATEUISTATE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_QUERYUISTATE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_CTLCOLORMSGBOX)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_CTLCOLOREDIT)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_CTLCOLORLISTBOX)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_CTLCOLORBTN)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_CTLCOLORDLG)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_CTLCOLORSCROLLBAR)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_CTLCOLORSTATIC)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MOUSEFIRST)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MOUSEMOVE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_LBUTTONDOWN)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_LBUTTONUP)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_LBUTTONDBLCLK)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_RBUTTONDOWN)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_RBUTTONUP)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_RBUTTONDBLCLK)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MBUTTONDOWN)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MBUTTONUP)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MBUTTONDBLCLK)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MOUSEWHEEL)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_XBUTTONDOWN)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_XBUTTONUP)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_XBUTTONDBLCLK)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MOUSEHWHEEL)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MOUSELAST)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MOUSELAST)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MOUSELAST)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MOUSELAST)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_PARENTNOTIFY)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_ENTERMENULOOP)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_EXITMENULOOP)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_NEXTMENU)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_SIZING)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_CAPTURECHANGED)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MOVING)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_POWERBROADCAST)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_DEVICECHANGE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MDICREATE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MDIDESTROY)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MDIACTIVATE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MDIRESTORE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MDINEXT)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MDIMAXIMIZE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MDITILE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MDICASCADE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MDIICONARRANGE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MDIGETACTIVE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MDISETMENU)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_ENTERSIZEMOVE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_EXITSIZEMOVE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_DROPFILES)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MDIREFRESHMENU)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_IME_SETCONTEXT)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_IME_NOTIFY)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_IME_CONTROL)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_IME_COMPOSITIONFULL)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_IME_SELECT)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_IME_CHAR)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_IME_REQUEST)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_IME_KEYDOWN)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_IME_KEYUP)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MOUSEHOVER)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_MOUSELEAVE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_NCMOUSEHOVER)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_NCMOUSELEAVE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_WTSSESSION_CHANGE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_TABLET_FIRST)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_TABLET_LAST)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_CUT)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_COPY)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_PASTE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_CLEAR)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_UNDO)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_RENDERFORMAT)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_RENDERALLFORMATS)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_DESTROYCLIPBOARD)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_DRAWCLIPBOARD)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_PAINTCLIPBOARD)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_VSCROLLCLIPBOARD)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_SIZECLIPBOARD)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_ASKCBFORMATNAME)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_CHANGECBCHAIN)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_HSCROLLCLIPBOARD)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_QUERYNEWPALETTE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_PALETTEISCHANGING)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_PALETTECHANGED)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_HOTKEY)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_PRINT)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_PRINTCLIENT)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_APPCOMMAND)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_THEMECHANGED)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_CLIPBOARDUPDATE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_DWMCOMPOSITIONCHANGED)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_DWMNCRENDERINGCHANGED)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_DWMCOLORIZATIONCOLORCHANGED)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_DWMWINDOWMAXIMIZEDCHANGE)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_GETTITLEBARINFOEX)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_HANDHELDFIRST)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_HANDHELDLAST)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_AFXFIRST)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_AFXLAST)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_PENWINFIRST)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_PENWINLAST)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_APP)
-A_NAMED_MESSAGE_FROM_WINUSER_H(WM_USER)
-// End list of Windows Messages given in <winuser.h>