using System; using System.IO; using System.Runtime.InteropServices; using System.Text; namespace Apewer.Internals.Interop { internal class Constant { /// public const byte AC_SRC_OVER = 0; /// public const byte AC_SRC_ALPHA = 1; /// 从左到右显示。 public const Int32 AW_HOR_POSITIVE = 0x00000001; /// 从右到左显示。 public const Int32 AW_HOR_NEGATIVE = 0x00000002; /// 从上到下显示。 public const Int32 AW_VER_POSITIVE = 0x00000004; /// 从下到上显示。 public const Int32 AW_VER_NEGATIVE = 0x00000008; /// 若使用了AW_HIDE标志,则使窗口向内重叠,即收缩窗口;否则使窗口向外扩展,即展开窗口。 public const Int32 AW_CENTER = 0x00000010; /// 隐藏窗口,缺省则显示窗口。 public const Int32 AW_HIDE = 0x00010000; /// 激活窗口。在使用了AW_HIDE标志后不能使用这个标志。 public const Int32 AW_ACTIVATE = 0x00020000; /// 使用滑动类型。缺省则为滚动动画类型。当使用AW_CENTER标志时,这个标志就被忽略。 public const Int32 AW_SLIDE = 0x00040000; /// 透明度从高到低。 public const Int32 AW_BLEND = 0x00080000; /// public const int CS_DROPSHADOW = 0x20000; /// public const int FILE_ATTRIBUTE_NORMAL = 0x80; /// public const uint FILE_FLAG_SEQUENTIAL_SCAN = 0x08000000; /// public const int FILE_MAP_COPY = 1; /// public const int FILE_MAP_WRITE = 2; /// public const int FILE_MAP_READ = 4; /// public const int GCL_STYLE = (-26); /// public const uint GENERIC_READ = 0x80000000; /// public const uint GENERIC_WRITE = 0x40000000; /// public const int GWL_EXSTYLE = -20; /// public const int INVALID_HANDLE_VALUE = -1; /// public const int OPEN_EXISTING = 3; /// public const uint PAGE_READWRITE = 0x04; /// public const int PROCESS_ALL_ACCESS = 0x1F0FFF; /// public const int PROCESS_QUERY_INFORMATION = 0x400; /// public const int SC_MOVE = 0xF010; /// play synchronously (default) public const int SND_SYNC = 0x0000; /// play asynchronously public const int SND_ASYNC = 0x0001; /// silence (!default) if sound not found public const int SND_NODEFAULT = 0x0002; /// pszSound points to a memory file public const int SND_MEMORY = 0x0004; /// loop the sound until next sndPlaySound public const int SND_LOOP = 0x0008; /// don’t stop any currently playing sound public const int SND_NOSTOP = 0x0010; /// Stop Playing Wave public const int SND_PURGE = 0x0040; /// don’t wait if the driver is busy public const int SND_NOWAIT = 0x00002000; /// name is a registry alias public const int SND_ALIAS = 0x00010000; /// alias is a predefined id public const int SND_ALIAS_ID = 0x00110000; /// name is file name public const int SND_FILENAME = 0x00020000; /// name is resource name or atom public const int SND_RESOURCE = 0x00040004; /// public const int STILL_ALIVE = 0x103; /// public const int SW_HIDE = 0; /// public const int SW_SHOWNORMAL = 1; /// public const int SW_SHOWMINIMIZED = 2; /// public const int SW_SHOWMAXIMIZED = 3; /// public const int SW_MAXIMIZE = 3; /// public const int SW_SHOWNOACTIVATE = 4; /// public const int SW_SHOW = 5; /// public const int SW_MINIMIZE = 6; /// public const int SW_SHOWMINNOACTIVE = 7; /// public const int SW_SHOWNA = 8; /// public const int SW_RESTORE = 9; /// public const int ULW_ALPHA = 2; /// public const int WM_CLOSE = 0x0010; /// public const int WM_KEYDOWN = 0X100; /// public const int WM_KEYUP = 0X101; /// public const int WM_SYSCHAR = 0X106; /// public const int WM_SYSKEYUP = 0X105; /// public const int WM_SYSKEYDOWN = 0X104; /// public const int WM_CHAR = 0X102; /// public const int WS_EX_TRANSPARENT = 0x00000020; /// public const int WS_EX_LAYERED = 0x00080000; /// public const int WS_SYSMENU = 0x00080000; /// public const int WS_MINIMIZEBOX = 0x00020000; public const int ENUM_CURRENT_SETTINGS = -1; public const int CDS_UPDATEREGISTRY = 0x01; public const int CDS_TEST = 0x02; public const int DISP_CHANGE_SUCCESSFUL = 0; public const int DISP_CHANGE_RESTART = 1; public const int DISP_CHANGE_FAILED = -1; public const int DISP_CHANGE_BADMODE = -2; public const int DISP_CHANGE_NOTUPDATED = -3; public const int DISP_CHANGE_BADFLAGS = -4; public const int DISP_CHANGE_BADPARAM = -5; public const int DISP_CHANGE_BADDUALVIEW = -6; public const int DMDO_DEFAULT = 0; public const int DMDO_90 = 1; public const int DMDO_180 = 2; public const int DMDO_270 = 3; public const int SE_PRIVILEGE_ENABLED = 0x00000002; public const int TOKEN_QUERY = 0x00000008; public const int TOKEN_ADJUST_PRIVILEGES = 0x00000020; public const string SE_SHUTDOWN_NAME = "SeShutdownPrivilege"; public const int EWX_LOGOFF = 0x00000000; public const int EWX_SHUTDOWN = 0x00000001; public const int EWX_REBOOT = 0x00000002; public const int EWX_FORCE = 0x00000004; public const int EWX_POWEROFF = 0x00000008; public const int EWX_FORCEIFHUNG = 0x00000010; #region Windows Hook /// /// Installs a hook procedure that monitors messages generated as a result of an input event in a dialog box, message box, menu, or scroll bar. /// For more information, see the MessageProc hook procedure. /// public const int WH_MSGFILTER = -1; /// /// Installs a hook procedure that records input messages posted to the system message queue. /// This hook is useful for recording macros. /// For more information, see the JournalRecordProc hook procedure. /// public const int WH_JOURNALRECORD = 0; /// /// Installs a hook procedure that posts messages previously recorded by a WH_JOURNALRECORD hook procedure. /// For more information, see the JournalPlaybackProc hook procedure. /// public const int WH_JOURNALPLAYBACK = 1; /// /// Installs a hook procedure that monitors keystroke messages. /// For more information, see the KeyboardProc hook procedure. /// public const int WH_KEYBOARD = 2; /// /// Installs a hook procedure that monitors messages posted to a message queue. /// For more information, see the GetMsgProc hook procedure. /// public const int WH_GETMESSAGE = 3; /// /// Installs a hook procedure that monitors messages before the system sends them to the destination window procedure. /// For more information, see the CallWndProc hook procedure. /// public const int WH_CALLWNDPROC = 4; /// /// Installs a hook procedure that receives notifications useful to a CBT application. /// For more information, see the CBTProc hook procedure. /// public const int WH_CBT = 5; /// /// Installs a hook procedure that monitors messages generated as a result of an input event in a dialog box, message box, menu, or scroll bar. /// The hook procedure monitors these messages for all applications in the same desktop as the calling thread. /// For more information, see the SysMsgProc hook procedure. /// public const int WH_SYSMSGFILTER = 6; /// /// Installs a hook procedure that monitors mouse messages. /// For more information, see the MouseProc hook procedure. /// public const int WH_MOUSE = 7; /// /// Installs a hook procedure useful for debugging other hook procedures. /// For more information, see the DebugProc hook procedure. /// public const int WH_DEBUG = 9; /// /// Installs a hook procedure that receives notifications useful to shell applications. /// For more information, see the ShellProc hook procedure. /// public const int WH_SHELL = 10; /// /// Installs a hook procedure that will be called when the application's foreground thread is about to become idle. /// This hook is useful for performing low priority tasks during idle time. /// For more information, see the ForegroundIdleProc hook procedure. /// public const int WH_FOREGROUNDIDLE = 11; /// /// Installs a hook procedure that monitors messages after they have been processed by the destination window procedure. /// For more information, see the CallWndRetProc hook procedure. /// public const int WH_CALLWNDPROCRET = 12; /// /// Installs a hook procedure that monitors low-level keyboard input events. /// For more information, see the LowLevelKeyboardProc hook procedure. /// public const int WH_KEYBOARD_LL = 13; /// Installs a hook procedure that monitors low-level mouse input events. /// For more information, see the LowLevelMouseProc hook procedure. /// public const int WH_MOUSE_LL = 14; #endregion } }