| Index: base/win_util.h
|
| ===================================================================
|
| --- base/win_util.h (revision 62510)
|
| +++ base/win_util.h (working copy)
|
| @@ -18,9 +18,14 @@
|
|
|
| namespace win_util {
|
|
|
| -// NOTE: Keep these in order so callers can do things like
|
| -// "if (GetWinVersion() > WINVERSION_2000) ...". It's OK to change the values,
|
| -// though.
|
| +void GetNonClientMetrics(NONCLIENTMETRICS* metrics);
|
| +
|
| +// TODO(brettw) remove this once RLZ is updated to use the new version in
|
| +// base/win/windows_version.h.
|
| +#if defined(RLZ_WIN_LIB_LIB_MUTEX_H_) || defined(RLZ_WIN_LIB_USER_KEY_H_) \
|
| + || defined(RLZ_WIN_LIB_PROCESS_INFO_H_)
|
| +#include "base/win/windows_version.h"
|
| +// These must match the values in base::win!
|
| enum WinVersion {
|
| WINVERSION_PRE_2000 = 0, // Not supported
|
| WINVERSION_2000 = 1, // Not supported
|
| @@ -30,58 +35,17 @@
|
| WINVERSION_2008 = 5,
|
| WINVERSION_WIN7 = 6,
|
| };
|
| +inline WinVersion GetWinVersion() {
|
| + return static_cast<WinVersion>(base::win::GetVersion());
|
| +}
|
| +#endif // RLZ_*
|
|
|
| -// Property key for System.AppUserModel.ID.
|
| -// <http://msdn.microsoft.com/en-us/library/dd391569(VS.85).aspx>
|
| -// TODO(xiyuan): Remove this once we compile with Win7 SDK.
|
| -extern const PROPERTYKEY kPKEYAppUserModelID;
|
| -
|
| -void GetNonClientMetrics(NONCLIENTMETRICS* metrics);
|
| -
|
| -// Returns the running version of Windows.
|
| -WinVersion GetWinVersion();
|
| -
|
| -// Returns the major and minor version of the service pack installed.
|
| -void GetServicePackLevel(int* major, int* minor);
|
| -
|
| -// Adds an ACE in the DACL of the object referenced by handle. The ACE is
|
| -// granting |access| to the user |known_sid|.
|
| -// If |known_sid| is WinSelfSid, the sid of the current user will be added to
|
| -// the DACL.
|
| -bool AddAccessToKernelObject(HANDLE handle, WELL_KNOWN_SID_TYPE known_sid,
|
| - ACCESS_MASK access);
|
| -
|
| // Returns the string representing the current user sid.
|
| bool GetUserSidString(std::wstring* user_sid);
|
|
|
| -// Creates a security descriptor with a DACL that has one ace giving full
|
| -// access to the current logon session.
|
| -// The security descriptor returned must be freed using LocalFree.
|
| -// The function returns true if it succeeds, false otherwise.
|
| -bool GetLogonSessionOnlyDACL(SECURITY_DESCRIPTOR** security_descriptor);
|
| -
|
| // Useful for subclassing a HWND. Returns the previous window procedure.
|
| WNDPROC SetWindowProc(HWND hwnd, WNDPROC wndproc);
|
|
|
| -// Returns true if the existing window procedure is the same as |subclass_proc|.
|
| -bool IsSubclassed(HWND window, WNDPROC subclass_proc);
|
| -
|
| -// Subclasses a window, replacing its existing window procedure with the
|
| -// specified one. Returns true if the current window procedure was replaced,
|
| -// false if the window has already been subclassed with the specified
|
| -// subclass procedure.
|
| -bool Subclass(HWND window, WNDPROC subclass_proc);
|
| -
|
| -// Unsubclasses a window subclassed using Subclass. Returns true if
|
| -// the window was subclassed with the specified |subclass_proc| and the window
|
| -// was successfully unsubclassed, false if the window's window procedure is not
|
| -// |subclass_proc|.
|
| -bool Unsubclass(HWND window, WNDPROC subclass_proc);
|
| -
|
| -// Retrieves the original WNDPROC of a window subclassed using
|
| -// SubclassWindow.
|
| -WNDPROC GetSuperclassWNDPROC(HWND window);
|
| -
|
| // Pointer-friendly wrappers around Get/SetWindowLong(..., GWLP_USERDATA, ...)
|
| // Returns the previously set value.
|
| void* SetWindowUserData(HWND hwnd, void* user_data);
|
|
|