+ Win32API:新增Win32API函数

This commit is contained in:
Sunny 2020-10-15 20:26:43 +08:00
parent fe4f68f26d
commit ea45cecc07
14 changed files with 9991 additions and 29 deletions

Binary file not shown.

Binary file not shown.

View File

@ -59,6 +59,7 @@ namespace Sunny.UI.Demo
private void btnInfo_Click(object sender, EventArgs e)
{
this.ShowInfoDialog("默认信息提示框");
UIMessageDialog.ShowMessageDialog("默认信息提示框", "提示", false, UIStyle.Blue, true);
}
private void btnStringInput_Click(object sender, EventArgs e)

View File

@ -37,7 +37,7 @@ namespace Sunny.UI
/// <param name="style">主题</param>
public static void ShowSuccessDialog(this Form form, string msg, UIStyle style = UIStyle.Green)
{
form.ShowMessageDialog(msg, UILocalize.SuccessTitle, false, style);
ShowMessageDialog(msg, UILocalize.SuccessTitle, false, style);
}
/// <summary>
@ -48,7 +48,7 @@ namespace Sunny.UI
/// <param name="style">主题</param>
public static void ShowInfoDialog(this Form form, string msg, UIStyle style = UIStyle.Gray)
{
form.ShowMessageDialog(msg, UILocalize.InfoTitle, false, style);
ShowMessageDialog(msg, UILocalize.InfoTitle, false, style);
}
/// <summary>
@ -59,7 +59,7 @@ namespace Sunny.UI
/// <param name="style">主题</param>
public static void ShowWarningDialog(this Form form, string msg, UIStyle style = UIStyle.Orange)
{
form.ShowMessageDialog(msg, UILocalize.WarningTitle, false, style);
ShowMessageDialog(msg, UILocalize.WarningTitle, false, style);
}
/// <summary>
@ -70,7 +70,7 @@ namespace Sunny.UI
/// <param name="style">主题</param>
public static void ShowErrorDialog(this Form form, string msg, UIStyle style = UIStyle.Red)
{
form.ShowMessageDialog(msg, UILocalize.ErrorTitle, false, style);
ShowMessageDialog(msg, UILocalize.ErrorTitle, false, style);
}
/// <summary>
@ -82,7 +82,7 @@ namespace Sunny.UI
/// <returns>结果</returns>
public static bool ShowAskDialog(this Form form, string msg, UIStyle style = UIStyle.Blue)
{
return form.ShowMessageDialog(msg, UILocalize.AskTitle, true, style);
return ShowMessageDialog(msg, UILocalize.AskTitle, true, style);
}
/// <summary>
@ -94,7 +94,7 @@ namespace Sunny.UI
/// <param name="style">主题</param>
public static void ShowSuccessDialog(this Form form, string title, string msg, UIStyle style = UIStyle.Green)
{
form.ShowMessageDialog(msg, title, false, style);
ShowMessageDialog(msg, title, false, style);
}
/// <summary>
@ -106,7 +106,7 @@ namespace Sunny.UI
/// <param name="style">主题</param>
public static void ShowInfoDialog(this Form form, string title, string msg, UIStyle style = UIStyle.Gray)
{
form.ShowMessageDialog(msg, title, false, style);
ShowMessageDialog(msg, title, false, style);
}
/// <summary>
@ -118,7 +118,7 @@ namespace Sunny.UI
/// <param name="style">主题</param>
public static void ShowWarningDialog(this Form form, string title, string msg, UIStyle style = UIStyle.Orange)
{
form.ShowMessageDialog(msg, title, false, style);
ShowMessageDialog(msg, title, false, style);
}
/// <summary>
@ -130,41 +130,45 @@ namespace Sunny.UI
/// <param name="style">主题</param>
public static void ShowErrorDialog(this Form form, string title, string msg, UIStyle style = UIStyle.Red)
{
form.ShowMessageDialog(msg, title, false, style);
ShowMessageDialog(msg, title, false, style);
}
/// <summary>
/// 确认信息提示框
/// </summary>
/// <param name="form">窗体</param>
/// <param name="title">标题</param>
/// <param name="msg">信息</param>
/// <param name="style"></param>
/// <param name="message">信息</param>
/// <param name="showCancelButton">显示取消按钮</param>
/// <param name="style">主题</param>
/// <param name="showMask">显示遮罩层</param>
/// <returns>结果</returns>
public static bool ShowAskDialog(this Form form, string title, string msg, UIStyle style = UIStyle.Blue)
public static bool ShowMessageDialog(string message, string title, bool showCancelButton, UIStyle style, bool showMask = true)
{
return form.ShowMessageDialog(msg, title, true, style);
}
Form back = null;
if (showMask)
{
int backBorder = 200;
back = new Form(); // Create the fade background
back.FormBorderStyle = FormBorderStyle.None;
back.BackColor = Color.FromArgb(0, 0, 0);
back.Opacity = 0.5;
back.ShowInTaskbar = false;
back.Location = new Point(-backBorder, -backBorder);
back.Size = new Size(Screen.PrimaryScreen.WorkingArea.Width + backBorder, Screen.PrimaryScreen.WorkingArea.Height + backBorder);
back.Show();
back.TopMost = true;
}
public static bool ShowMessageDialog(this Form form, string message, string title, bool isShowCancel, UIStyle style)
{
UIMessageForm frm = new UIMessageForm();
frm.TopMost = form.TopMost;
frm.ShowMessage(message, title, isShowCancel, style);
frm.StartPosition = FormStartPosition.CenterScreen;
frm.ShowMessage(message, title, showCancelButton, style);
frm.ShowInTaskbar = false;
frm.TopMost = showMask;
frm.ShowDialog();
bool isOk = frm.IsOK;
frm.Dispose();
return isOk;
}
public static bool ShowMessageDialog(string message, string title, bool isShowCancel, UIStyle style, bool topMost = false)
{
UIMessageForm frm = new UIMessageForm();
frm.TopMost = topMost;
frm.ShowMessage(message, title, isShowCancel, style);
frm.ShowDialog();
bool isOk = frm.IsOK;
frm.Dispose();
back?.Close();
return isOk;
}
}

View File

@ -43,6 +43,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Design" />
<Reference Include="System.Drawing" />
<Reference Include="System.Management" />
@ -513,6 +514,15 @@
<Compile Include="Units\UUdp.cs" />
<Compile Include="Units\USevenZip.cs" />
<Compile Include="Units\UXmlConfig.cs" />
<Compile Include="Win32\Win32.Added.cs" />
<Compile Include="Win32\Win32.cs" />
<Compile Include="Win32\Win32.ErrorCodes.cs" />
<Compile Include="Win32\Win32.GDI.cs" />
<Compile Include="Win32\Win32.Kernel.cs" />
<Compile Include="Win32\Win32.Multimedia.cs" />
<Compile Include="Win32\Win32.NetApi.cs" />
<Compile Include="Win32\Win32.Shell.cs" />
<Compile Include="Win32\Win32.User.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Forms\UINotifier.resx">
@ -579,6 +589,7 @@
<ItemGroup>
<None Include="Resources\Login6.png" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

View File

@ -0,0 +1,46 @@
using System;
using System.Runtime.InteropServices;
namespace Sunny.UI.Win32
{
public partial class GDI
{
[DllImport("gdi32.dll", EntryPoint = "DeleteObject", CharSet = CharSet.Ansi)]
public static extern int DeleteObject(int hObject);
[DllImport("user32.dll")]
public static extern bool PrintWindow(IntPtr window, IntPtr hdcBlt, uint nFlags);
}
public partial class User
{
[DllImport("user32.dll")]
public static extern int SetWindowRgn(IntPtr wnd, int hRgn, Boolean bRedraw);
[DllImport("user32.dll", CharSet = CharSet.Auto)]
public static extern IntPtr SendMessage(IntPtr hWnd, int msg, int wParam, string lParam);
[DllImport("user32.dll", CharSet = CharSet.Auto)]
public static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);
}
public class Dwm
{
[DllImport("dwmapi.dll")]
public static extern int DwmExtendFrameIntoClientArea(IntPtr hWnd, ref MARGINS pMarInset);
[DllImport("dwmapi.dll")]
public static extern int DwmSetWindowAttribute(IntPtr hwnd, int attr, ref int attrValue, int attrSize);
[DllImport("dwmapi.dll")]
public static extern int DwmIsCompositionEnabled(ref int pfEnabled);
public struct MARGINS
{
public int leftWidth;
public int rightWidth;
public int topHeight;
public int bottomHeight;
}
}
}

View File

@ -0,0 +1,929 @@
namespace Sunny.UI.Win32
{
public abstract class ERROR
{
public const int CACHE_E_FIRST = unchecked((int)0x80040170);
public const int CACHE_E_LAST = unchecked((int)0x8004017F);
public const int CACHE_E_NOCACHE_UPDATED = unchecked((int)0x80040170);
public const int CACHE_S_FIRST = 0x40170;
public const int CACHE_S_FORMATETC_NOTSUPPORTED = 0x40170;
public const int CACHE_S_LAST = 0x4017F;
public const int CACHE_S_SAMECACHE = 0x40171;
public const int CACHE_S_SOMECACHES_NOTUPDATED = 0x40172;
public const int CLASSFACTORY_E_FIRST = unchecked((int)0x80040110);
public const int CLASSFACTORY_E_LAST = unchecked((int)0x8004011F);
public const int CLASSFACTORY_S_FIRST = 0x40110;
public const int CLASSFACTORY_S_LAST = 0x4011F;
public const int CLASS_E_CLASSNOTAVAILABLE = unchecked((int)0x80040111);
public const int CLASS_E_NOAGGREGATION = unchecked((int)0x80040110);
public const int CLIENTSITE_E_FIRST = unchecked((int)0x80040190);
public const int CLIENTSITE_E_LAST = unchecked((int)0x8004019F);
public const int CLIENTSITE_S_FIRST = 0x40190;
public const int CLIENTSITE_S_LAST = 0x4019F;
public const int CLIPBRD_E_BAD_DATA = unchecked((int)0x800401D3);
public const int CLIPBRD_E_CANT_CLOSE = unchecked((int)0x800401D4);
public const int CLIPBRD_E_CANT_EMPTY = unchecked((int)0x800401D1);
public const int CLIPBRD_E_CANT_OPEN = unchecked((int)0x800401D0);
public const int CLIPBRD_E_CANT_SET = unchecked((int)0x800401D2);
public const int CLIPBRD_E_FIRST = unchecked((int)0x800401D0);
public const int CLIPBRD_E_LAST = unchecked((int)0x800401DF);
public const int CLIPBRD_S_FIRST = 0x401D0;
public const int CLIPBRD_S_LAST = 0x401DF;
public const int CONVERT10_E_FIRST = unchecked((int)0x800401C0);
public const int CONVERT10_E_LAST = unchecked((int)0x800401CF);
public const int CONVERT10_E_OLESTREAM_BITMAP_TO_DIB = unchecked((int)0x800401C3);
public const int CONVERT10_E_OLESTREAM_FMT = unchecked((int)0x800401C2);
public const int CONVERT10_E_OLESTREAM_GET = unchecked((int)0x800401C0);
public const int CONVERT10_E_OLESTREAM_PUT = unchecked((int)0x800401C1);
public const int CONVERT10_E_STG_DIB_TO_BITMAP = unchecked((int)0x800401C6);
public const int CONVERT10_E_STG_FMT = unchecked((int)0x800401C4);
public const int CONVERT10_E_STG_NO_STD_STREAM = unchecked((int)0x800401C5);
public const int CONVERT10_S_FIRST = 0x401C0;
public const int CONVERT10_S_LAST = 0x401CF;
public const int CONVERT10_S_NO_PRESENTATION = 0x401C0;
public const int CO_E_ALREADYINITIALIZED = unchecked((int)0x800401F1);
public const int CO_E_APPDIDNTREG = unchecked((int)0x800401FE);
public const int CO_E_APPNOTFOUND = unchecked((int)0x800401F5);
public const int CO_E_APPSINGLEUSE = unchecked((int)0x800401F6);
public const int CO_E_BAD_PATH = unchecked((int)0x80080004);
public const int CO_E_CANTDETERMINECLASS = unchecked((int)0x800401F2);
public const int CO_E_CLASSSTRING = unchecked((int)0x800401F3);
public const int CO_E_CLASS_CREATE_FAILED = unchecked((int)0x80080001);
public const int CO_E_DLLNOTFOUND = unchecked((int)0x800401F8);
public const int CO_E_ERRORINAPP = unchecked((int)0x800401F7);
public const int CO_E_ERRORINDLL = unchecked((int)0x800401F9);
public const int CO_E_FIRST = unchecked((int)0x800401F0);
public const int CO_E_IIDSTRING = unchecked((int)0x800401F4);
public const int CO_E_INIT_CLASS_CACHE = unchecked((int)0x80004009);
public const int CO_E_INIT_MEMORY_ALLOCATOR = unchecked((int)0x80004008);
public const int CO_E_INIT_ONLY_SINGLE_THREADED = unchecked((int)0x80004012);
public const int CO_E_INIT_RPC_CHANNEL = unchecked((int)0x8000400A);
public const int CO_E_INIT_SCM_EXEC_FAILURE = unchecked((int)0x80004011);
public const int CO_E_INIT_SCM_FILE_MAPPING_EXISTS = unchecked((int)0x8000400F);
public const int CO_E_INIT_SCM_MAP_VIEW_OF_FILE = unchecked((int)0x80004010);
public const int CO_E_INIT_SCM_MUTEX_EXISTS = unchecked((int)0x8000400E);
public const int CO_E_INIT_SHARED_ALLOCATOR = unchecked((int)0x80004007);
public const int CO_E_INIT_TLS = unchecked((int)0x80004006);
public const int CO_E_INIT_TLS_CHANNEL_CONTROL = unchecked((int)0x8000400C);
public const int CO_E_INIT_TLS_SET_CHANNEL_CONTROL = unchecked((int)0x8000400B);
public const int CO_E_INIT_UNACCEPTED_USER_ALLOCATOR = unchecked((int)0x8000400D);
public const int CO_E_LAST = unchecked((int)0x800401FF);
public const int CO_E_NOTINITIALIZED = unchecked((int)0x800401F0);
public const int CO_E_OBJISREG = unchecked((int)0x800401FC);
public const int CO_E_OBJNOTCONNECTED = unchecked((int)0x800401FD);
public const int CO_E_OBJNOTREG = unchecked((int)0x800401FB);
public const int CO_E_OBJSRV_RPC_FAILURE = unchecked((int)0x80080006);
public const int CO_E_RELEASED = unchecked((int)0x800401FF);
public const int CO_E_SCM_ERROR = unchecked((int)0x80080002);
public const int CO_E_SCM_RPC_FAILURE = unchecked((int)0x80080003);
public const int CO_E_SERVER_EXEC_FAILURE = unchecked((int)0x80080005);
public const int CO_E_SERVER_STOPPING = unchecked((int)0x80080008);
public const int CO_E_WRONGOSFORAPP = unchecked((int)0x800401FA);
public const int CO_S_FIRST = 0x401F0;
public const int CO_S_LAST = 0x401FF;
public const int DATA_E_FIRST = unchecked((int)0x80040130);
public const int DATA_E_LAST = unchecked((int)0x8004013F);
public const int DATA_S_FIRST = 0x40130;
public const int DATA_S_LAST = 0x4013F;
public const int DATA_S_SAMEFORMATETC = 0x40130;
public const int DISP_E_ARRAYISLOCKED = unchecked((int)0x8002000D);
public const int DISP_E_BADCALLEE = unchecked((int)0x80020010);
public const int DISP_E_BADINDEX = unchecked((int)0x8002000B);
public const int DISP_E_BADPARAMCOUNT = unchecked((int)0x8002000E);
public const int DISP_E_BADVARTYPE = unchecked((int)0x80020008);
public const int DISP_E_EXCEPTION = unchecked((int)0x80020009);
public const int DISP_E_MEMBERNOTFOUND = unchecked((int)0x80020003);
public const int DISP_E_NONAMEDARGS = unchecked((int)0x80020007);
public const int DISP_E_NOTACOLLECTION = unchecked((int)0x80020011);
public const int DISP_E_OVERFLOW = unchecked((int)0x8002000A);
public const int DISP_E_PARAMNOTFOUND = unchecked((int)0x80020004);
public const int DISP_E_PARAMNOTOPTIONAL = unchecked((int)0x8002000F);
public const int DISP_E_TYPEMISMATCH = unchecked((int)0x80020005);
public const int DISP_E_UNKNOWNINTERFACE = unchecked((int)0x80020001);
public const int DISP_E_UNKNOWNLCID = unchecked((int)0x8002000C);
public const int DISP_E_UNKNOWNNAME = unchecked((int)0x80020006);
public const int DRAGDROP_E_ALREADYREGISTERED = unchecked((int)0x80040101);
public const int DRAGDROP_E_FIRST = unchecked((int)0x80040100);
public const int DRAGDROP_E_INVALIDHWND = unchecked((int)0x80040102);
public const int DRAGDROP_E_LAST = unchecked((int)0x8004010F);
public const int DRAGDROP_E_NOTREGISTERED = unchecked((int)0x80040100);
public const int DRAGDROP_S_CANCEL = 0x40101;
public const int DRAGDROP_S_DROP = 0x40100;
public const int DRAGDROP_S_FIRST = 0x40100;
public const int DRAGDROP_S_LAST = 0x4010F;
public const int DRAGDROP_S_USEDEFAULTCURSORS = 0x40102;
public const int DV_E_CLIPFORMAT = unchecked((int)0x8004006A);
public const int DV_E_DVASPECT = unchecked((int)0x8004006B);
public const int DV_E_DVTARGETDEVICE = unchecked((int)0x80040065);
public const int DV_E_DVTARGETDEVICE_SIZE = unchecked((int)0x8004006C);
public const int DV_E_FORMATETC = unchecked((int)0x80040064);
public const int DV_E_LINDEX = unchecked((int)0x80040068);
public const int DV_E_NOIVIEWOBJECT = unchecked((int)0x8004006D);
public const int DV_E_STATDATA = unchecked((int)0x80040067);
public const int DV_E_STGMEDIUM = unchecked((int)0x80040066);
public const int DV_E_TYMED = unchecked((int)0x80040069);
public const int ENUM_E_FIRST = unchecked((int)0x800401B0);
public const int ENUM_E_LAST = unchecked((int)0x800401BF);
public const int ENUM_S_FIRST = 0x401B0;
public const int ENUM_S_LAST = 0x401BF;
public const int EPT_S_CANT_CREATE = 1899;
public const int EPT_S_CANT_PERFORM_OP = 1752;
public const int EPT_S_INVALID_ENTRY = 1751;
public const int EPT_S_NOT_REGISTERED = 1753;
public const int ERROR_ACCESS_DENIED = 5;
public const int ERROR_ACCOUNT_DISABLED = 1331;
public const int ERROR_ACCOUNT_EXPIRED = 1793;
public const int ERROR_ACCOUNT_RESTRICTION = 1327;
public const int ERROR_ADAP_HDW_ERR = 57;
public const int ERROR_ALIAS_EXISTS = 1379;
public const int ERROR_ALLOTTED_SPACE_EXCEEDED = 1344;
public const int ERROR_ALREADY_ASSIGNED = 85;
public const int ERROR_ALREADY_EXISTS = 183;
public const int ERROR_ALREADY_RUNNING_LKG = 1074;
public const int ERROR_ALREADY_WAITING = 1904;
public const int ERROR_ARENA_TRASHED = 7;
public const int ERROR_ARITHMETIC_OVERFLOW = 534;
public const int ERROR_ATOMIC_LOCKS_NOT_SUPPORTED = 174;
public const int ERROR_AUTODATASEG_EXCEEDS_64k = 199;
public const int ERROR_BADDB = 1009;
public const int ERROR_BADKEY = 1010;
public const int ERROR_BAD_ARGUMENTS = 160;
public const int ERROR_BAD_COMMAND = 22;
public const int ERROR_BAD_DESCRIPTOR_FORMAT = 1361;
public const int ERROR_BAD_DEVICE = 1200;
public const int ERROR_BAD_DEV_TYPE = 66;
public const int ERROR_BAD_DRIVER = 2001;
public const int ERROR_BAD_DRIVER_LEVEL = 119;
public const int ERROR_BAD_ENVIRONMENT = 10;
public const int ERROR_BAD_EXE_FORMAT = 193;
public const int ERROR_BAD_FORMAT = 11;
public const int ERROR_BAD_IMPERSONATION_LEVEL = 1346;
public const int ERROR_BAD_INHERITANCE_ACL = 1340;
public const int ERROR_BAD_LENGTH = 24;
public const int ERROR_BAD_LOGON_SESSION_STATE = 1365;
public const int ERROR_BAD_NETPATH = 53;
public const int ERROR_BAD_NET_NAME = 67;
public const int ERROR_BAD_NET_RESP = 58;
public const int ERROR_BAD_PATHNAME = 161;
public const int ERROR_BAD_PIPE = 230;
public const int ERROR_BAD_PROFILE = 1206;
public const int ERROR_BAD_PROVIDER = 1204;
public const int ERROR_BAD_REM_ADAP = 60;
public const int ERROR_BAD_THREADID_ADDR = 159;
public const int ERROR_BAD_TOKEN_TYPE = 1349;
public const int ERROR_BAD_UNIT = 20;
public const int ERROR_BAD_USERNAME = 2202;
public const int ERROR_BAD_VALIDATION_CLASS = 1348;
public const int ERROR_BEGINNING_OF_MEDIA = 1102;
public const int ERROR_BOOT_ALREADY_ACCEPTED = 1076;
public const int ERROR_BROKEN_PIPE = 109;
public const int ERROR_BUFFER_OVERFLOW = 111;
public const int ERROR_BUSY = 170;
public const int ERROR_BUSY_DRIVE = 142;
public const int ERROR_BUS_RESET = 1111;
public const int ERROR_CALL_NOT_IMPLEMENTED = 120;
public const int ERROR_CANCEL_VIOLATION = 173;
public const int ERROR_CANNOT_COPY = 266;
public const int ERROR_CANNOT_FIND_WND_CLASS = 1407;
public const int ERROR_CANNOT_IMPERSONATE = 1368;
public const int ERROR_CANNOT_MAKE = 82;
public const int ERROR_CANNOT_OPEN_PROFILE = 1205;
public const int ERROR_CANTOPEN = 1011;
public const int ERROR_CANTREAD = 1012;
public const int ERROR_CANTWRITE = 1013;
public const int ERROR_CANT_ACCESS_DOMAIN_INFO = 1351;
public const int ERROR_CANT_DISABLE_MANDATORY = 1310;
public const int ERROR_CANT_OPEN_ANONYMOUS = 1347;
public const int ERROR_CAN_NOT_COMPLETE = 1003;
public const int ERROR_CAN_NOT_DEL_LOCAL_WINS = 4001;
public const int ERROR_CHILD_MUST_BE_VOLATILE = 1021;
public const int ERROR_CHILD_NOT_COMPLETE = 129;
public const int ERROR_CHILD_WINDOW_MENU = 1436;
public const int ERROR_CIRCULAR_DEPENDENCY = 1059;
public const int ERROR_CLASS_ALREADY_EXISTS = 1410;
public const int ERROR_CLASS_DOES_NOT_EXIST = 1411;
public const int ERROR_CLASS_HAS_WINDOWS = 1412;
public const int ERROR_CLIPBOARD_NOT_OPEN = 1418;
public const int ERROR_CLIPPING_NOT_SUPPORTED = 2005;
public const int ERROR_CONNECTION_UNAVAIL = 1201;
public const int ERROR_CONTROL_ID_NOT_FOUND = 1421;
public const int ERROR_COUNTER_TIMEOUT = 1121;
public const int ERROR_CRC = 23;
public const int ERROR_CURRENT_DIRECTORY = 16;
public const int ERROR_DATABASE_DOES_NOT_EXIST = 1065;
public const int ERROR_DC_NOT_FOUND = 1425;
public const int ERROR_DEPENDENT_SERVICES_RUNNING = 1051;
public const int ERROR_DESTROY_OBJECT_OF_OTHER_THREAD = 1435;
public const int ERROR_DEVICE_ALREADY_REMEMBERED = 1202;
public const int ERROR_DEVICE_IN_USE = 2404;
public const int ERROR_DEVICE_NOT_PARTITIONED = 1107;
public const int ERROR_DEV_NOT_EXIST = 55;
public const int ERROR_DIRECTORY = 267;
public const int ERROR_DIRECT_ACCESS_HANDLE = 130;
public const int ERROR_DIR_NOT_EMPTY = 145;
public const int ERROR_DIR_NOT_ROOT = 144;
public const int ERROR_DISCARDED = 157;
public const int ERROR_DISK_CHANGE = 107;
public const int ERROR_DISK_CORRUPT = 1393;
public const int ERROR_DISK_FULL = 112;
public const int ERROR_DISK_OPERATION_FAILED = 1127;
public const int ERROR_DISK_RECALIBRATE_FAILED = 1126;
public const int ERROR_DISK_RESET_FAILED = 1128;
public const int ERROR_DLL_INIT_FAILED = 1114;
public const int ERROR_DOMAIN_EXISTS = 1356;
public const int ERROR_DOMAIN_LIMIT_EXCEEDED = 1357;
public const int ERROR_DOMAIN_TRUST_INCONSISTENT = 1810;
public const int ERROR_DRIVE_LOCKED = 108;
public const int ERROR_DUPLICATE_SERVICE_NAME = 1078;
public const int ERROR_DUP_DOMAINNAME = 1221;
public const int ERROR_DUP_NAME = 52;
public const int ERROR_DYNLINK_FROM_INVALID_RING = 196;
public const int ERROR_EAS_DIDNT_FIT = 275;
public const int ERROR_EAS_NOT_SUPPORTED = 282;
public const int ERROR_EA_ACCESS_DENIED = 994;
public const int ERROR_EA_FILE_CORRUPT = 276;
public const int ERROR_EA_LIST_INCONSISTENT = 255;
public const int ERROR_EA_TABLE_FULL = 277;
public const int ERROR_END_OF_MEDIA = 1100;
public const int ERROR_ENVVAR_NOT_FOUND = 203;
public const int ERROR_EOM_OVERFLOW = 1129;
public const int ERROR_EVENTLOG_CANT_START = 1501;
public const int ERROR_EVENTLOG_FILE_CHANGED = 1503;
public const int ERROR_EVENTLOG_FILE_CORRUPT = 1500;
public const int ERROR_EXCEPTION_IN_SERVICE = 1064;
public const int ERROR_EXCL_SEM_ALREADY_OWNED = 101;
public const int ERROR_EXE_MARKED_INVALID = 192;
public const int ERROR_EXTENDED_ERROR = 1208;
public const int ERROR_FAILED_SERVICE_CONTROLLER_CONNECT = 1063;
public const int ERROR_FAIL_I24 = 83;
public const int ERROR_FILEMARK_DETECTED = 1101;
public const int ERROR_FILENAME_EXCED_RANGE = 206;
public const int ERROR_FILE_CORRUPT = 1392;
public const int ERROR_FILE_EXISTS = 80;
public const int ERROR_FILE_INVALID = 1006;
public const int ERROR_FILE_NOT_FOUND = 2;
public const int ERROR_FLOPPY_BAD_REGISTERS = 1125;
public const int ERROR_FLOPPY_ID_MARK_NOT_FOUND = 1122;
public const int ERROR_FLOPPY_UNKNOWN_ERROR = 1124;
public const int ERROR_FLOPPY_WRONG_CYLINDER = 1123;
public const int ERROR_FULLSCREEN_MODE = 1007;
public const int ERROR_FULL_BACKUP = 4004;
public const int ERROR_GENERIC_NOT_MAPPED = 1360;
public const int ERROR_GEN_FAILURE = 31;
public const int ERROR_GROUP_EXISTS = 1318;
public const int ERROR_HANDLE_DISK_FULL = 39;
public const int ERROR_HANDLE_EOF = 38;
public const int ERROR_HOOK_NEEDS_HMOD = 1428;
public const int ERROR_HOOK_NOT_INSTALLED = 1431;
public const int ERROR_HOTKEY_ALREADY_REGISTERED = 1409;
public const int ERROR_HOTKEY_NOT_REGISTERED = 1419;
public const int ERROR_HWNDS_HAVE_DIFF_PARENT = 1441;
public const int ERROR_ILL_FORMED_PASSWORD = 1324;
public const int ERROR_INC_BACKUP = 4003;
public const int ERROR_INFLOOP_IN_RELOC_CHAIN = 202;
public const int ERROR_INSUFFICIENT_BUFFER = 122;
public const int ERROR_INTERNAL_DB_CORRUPTION = 1358;
public const int ERROR_INTERNAL_DB_ERROR = 1383;
public const int ERROR_INTERNAL_ERROR = 1359;
public const int ERROR_INVALID_ACCEL_HANDLE = 1403;
public const int ERROR_INVALID_ACCESS = 12;
public const int ERROR_INVALID_ACCOUNT_NAME = 1315;
public const int ERROR_INVALID_ACL = 1336;
public const int ERROR_INVALID_ADDRESS = 487;
public const int ERROR_INVALID_AT_INTERRUPT_TIME = 104;
public const int ERROR_INVALID_BLOCK = 9;
public const int ERROR_INVALID_BLOCK_LENGTH = 1106;
public const int ERROR_INVALID_CATEGORY = 117;
public const int ERROR_INVALID_COMBOBOX_MESSAGE = 1422;
public const int ERROR_INVALID_COMPUTERNAME = 1210;
public const int ERROR_INVALID_CURSOR_HANDLE = 1402;
public const int ERROR_INVALID_DATA = 13;
public const int ERROR_INVALID_DATATYPE = 1804;
public const int ERROR_INVALID_DOMAINNAME = 1212;
public const int ERROR_INVALID_DOMAIN_ROLE = 1354;
public const int ERROR_INVALID_DOMAIN_STATE = 1353;
public const int ERROR_INVALID_DRIVE = 15;
public const int ERROR_INVALID_DWP_HANDLE = 1405;
public const int ERROR_INVALID_EA_HANDLE = 278;
public const int ERROR_INVALID_EA_NAME = 254;
public const int ERROR_INVALID_EDIT_HEIGHT = 1424;
public const int ERROR_INVALID_ENVIRONMENT = 1805;
public const int ERROR_INVALID_EVENTNAME = 1211;
public const int ERROR_INVALID_EVENT_COUNT = 151;
public const int ERROR_INVALID_EXE_SIGNATURE = 191;
public const int ERROR_INVALID_FILTER_PROC = 1427;
public const int ERROR_INVALID_FLAGS = 1004;
public const int ERROR_INVALID_FLAG_NUMBER = 186;
public const int ERROR_INVALID_FORM_NAME = 1902;
public const int ERROR_INVALID_FORM_SIZE = 1903;
public const int ERROR_INVALID_FUNCTION = 1;
public const int ERROR_INVALID_GROUPNAME = 1209;
public const int ERROR_INVALID_GROUP_ATTRIBUTES = 1345;
public const int ERROR_INVALID_GW_COMMAND = 1443;
public const int ERROR_INVALID_HANDLE = 6;
public const int ERROR_INVALID_HOOK_FILTER = 1426;
public const int ERROR_INVALID_HOOK_HANDLE = 1404;
public const int ERROR_INVALID_ICON_HANDLE = 1414;
public const int ERROR_INVALID_ID_AUTHORITY = 1343;
public const int ERROR_INVALID_INDEX = 1413;
public const int ERROR_INVALID_LB_MESSAGE = 1432;
public const int ERROR_INVALID_LEVEL = 124;
public const int ERROR_INVALID_LIST_FORMAT = 153;
public const int ERROR_INVALID_LOGON_HOURS = 1328;
public const int ERROR_INVALID_LOGON_TYPE = 1367;
public const int ERROR_INVALID_MEMBER = 1388;
public const int ERROR_INVALID_MENU_HANDLE = 1401;
public const int ERROR_INVALID_MESSAGE = 1002;
public const int ERROR_INVALID_MESSAGEDEST = 1218;
public const int ERROR_INVALID_MESSAGENAME = 1217;
public const int ERROR_INVALID_MINALLOCSIZE = 195;
public const int ERROR_INVALID_MODULETYPE = 190;
public const int ERROR_INVALID_MSGBOX_STYLE = 1438;
public const int ERROR_INVALID_NAME = 123;
public const int ERROR_INVALID_NETNAME = 1214;
public const int ERROR_INVALID_ORDINAL = 182;
public const int ERROR_INVALID_OWNER = 1307;
public const int ERROR_INVALID_PARAMETER = 87;
public const int ERROR_INVALID_PASSWORD = 86;
public const int ERROR_INVALID_PASSWORDNAME = 1216;
public const int ERROR_INVALID_PIXEL_FORMAT = 2000;
public const int ERROR_INVALID_PRIMARY_GROUP = 1308;
public const int ERROR_INVALID_PRINTER_COMMAND = 1803;
public const int ERROR_INVALID_PRINTER_NAME = 1801;
public const int ERROR_INVALID_PRINTER_STATE = 1906;
public const int ERROR_INVALID_PRIORITY = 1800;
public const int ERROR_INVALID_SCROLLBAR_RANGE = 1448;
public const int ERROR_INVALID_SECURITY_DESCR = 1338;
public const int ERROR_INVALID_SEGDPL = 198;
public const int ERROR_INVALID_SEGMENT_NUMBER = 180;
public const int ERROR_INVALID_SEPARATOR_FILE = 1799;
public const int ERROR_INVALID_SERVER_STATE = 1352;
public const int ERROR_INVALID_SERVICENAME = 1213;
public const int ERROR_INVALID_SERVICE_ACCOUNT = 1057;
public const int ERROR_INVALID_SERVICE_CONTROL = 1052;
public const int ERROR_INVALID_SERVICE_LOCK = 1071;
public const int ERROR_INVALID_SHARENAME = 1215;
public const int ERROR_INVALID_SHOWWIN_COMMAND = 1449;
public const int ERROR_INVALID_SID = 1337;
public const int ERROR_INVALID_SIGNAL_NUMBER = 209;
public const int ERROR_INVALID_SPI_VALUE = 1439;
public const int ERROR_INVALID_STACKSEG = 189;
public const int ERROR_INVALID_STARTING_CODESEG = 188;
public const int ERROR_INVALID_SUB_AUTHORITY = 1335;
public const int ERROR_INVALID_TARGET_HANDLE = 114;
public const int ERROR_INVALID_THREAD_ID = 1444;
public const int ERROR_INVALID_TIME = 1901;
public const int ERROR_INVALID_USER_BUFFER = 1784;
public const int ERROR_INVALID_VERIFY_SWITCH = 118;
public const int ERROR_INVALID_WINDOW_HANDLE = 1400;
public const int ERROR_INVALID_WINDOW_STYLE = 2002;
public const int ERROR_INVALID_WORKSTATION = 1329;
public const int ERROR_IOPL_NOT_ENABLED = 197;
public const int ERROR_IO_DEVICE = 1117;
public const int ERROR_IO_INCOMPLETE = 996;
public const int ERROR_IO_PENDING = 997;
public const int ERROR_IRQ_BUSY = 1119;
public const int ERROR_IS_JOINED = 134;
public const int ERROR_IS_JOIN_PATH = 147;
public const int ERROR_IS_JOIN_TARGET = 133;
public const int ERROR_IS_SUBSTED = 135;
public const int ERROR_IS_SUBST_PATH = 146;
public const int ERROR_IS_SUBST_TARGET = 149;
public const int ERROR_ITERATED_DATA_EXCEEDS_64k = 194;
public const int ERROR_JOIN_TO_JOIN = 138;
public const int ERROR_JOIN_TO_SUBST = 140;
public const int ERROR_JOURNAL_HOOK_SET = 1430;
public const int ERROR_KEY_DELETED = 1018;
public const int ERROR_KEY_HAS_CHILDREN = 1020;
public const int ERROR_LABEL_TOO_LONG = 154;
public const int ERROR_LAST_ADMIN = 1322;
public const int ERROR_LB_WITHOUT_TABSTOPS = 1434;
public const int ERROR_LISTBOX_ID_NOT_FOUND = 1416;
public const int ERROR_LM_CROSS_ENCRYPTION_REQUIRED = 1390;
public const int ERROR_LOCAL_USER_SESSION_KEY = 1303;
public const int ERROR_LOCKED = 212;
public const int ERROR_LOCK_FAILED = 167;
public const int ERROR_LOCK_VIOLATION = 33;
public const int ERROR_LOGON_FAILURE = 1326;
public const int ERROR_LOGON_NOT_GRANTED = 1380;
public const int ERROR_LOGON_SESSION_COLLISION = 1366;
public const int ERROR_LOGON_SESSION_EXISTS = 1363;
public const int ERROR_LOGON_TYPE_NOT_GRANTED = 1385;
public const int ERROR_LOG_FILE_FULL = 1502;
public const int ERROR_LUIDS_EXHAUSTED = 1334;
public const int ERROR_MAPPED_ALIGNMENT = 1132;
public const int ERROR_MAX_THRDS_REACHED = 164;
public const int ERROR_MEDIA_CHANGED = 1110;
public const int ERROR_MEMBERS_PRIMARY_GROUP = 1374;
public const int ERROR_MEMBER_IN_ALIAS = 1378;
public const int ERROR_MEMBER_IN_GROUP = 1320;
public const int ERROR_MEMBER_NOT_IN_ALIAS = 1377;
public const int ERROR_MEMBER_NOT_IN_GROUP = 1321;
public const int ERROR_METAFILE_NOT_SUPPORTED = 2003;
public const int ERROR_META_EXPANSION_TOO_LONG = 208;
public const int ERROR_MOD_NOT_FOUND = 126;
public const int ERROR_MORE_DATA = 234;
public const int ERROR_MORE_WRITES = 1120;
public const int ERROR_MR_MID_NOT_FOUND = 317;
public const int ERROR_NEGATIVE_SEEK = 131;
public const int ERROR_NESTING_NOT_ALLOWED = 215;
public const int ERROR_NETLOGON_NOT_STARTED = 1792;
public const int ERROR_NETNAME_DELETED = 64;
public const int ERROR_NETWORK_ACCESS_DENIED = 65;
public const int ERROR_NETWORK_BUSY = 54;
public const int ERROR_NET_WRITE_FAULT = 88;
public const int ERROR_NOACCESS = 998;
public const int ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT = 1807;
public const int ERROR_NOLOGON_SERVER_TRUST_ACCOUNT = 1809;
public const int ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT = 1808;
public const int ERROR_NONE_MAPPED = 1332;
public const int ERROR_NON_MDICHILD_WINDOW = 1445;
public const int ERROR_NOTIFY_ENUM_DIR = 1022;
public const int ERROR_NOT_ALL_ASSIGNED = 1300;
public const int ERROR_NOT_CHILD_WINDOW = 1442;
public const int ERROR_NOT_CONNECTED = 2250;
public const int ERROR_NOT_CONTAINER = 1207;
public const int ERROR_NOT_DOS_DISK = 26;
public const int ERROR_NOT_ENOUGH_MEMORY = 8;
public const int ERROR_NOT_ENOUGH_QUOTA = 1816;
public const int ERROR_NOT_ENOUGH_SERVER_MEMORY = 1130;
public const int ERROR_NOT_JOINED = 136;
public const int ERROR_NOT_LOCKED = 158;
public const int ERROR_NOT_LOGON_PROCESS = 1362;
public const int ERROR_NOT_OWNER = 288;
public const int ERROR_NOT_READY = 21;
public const int ERROR_NOT_REGISTRY_FILE = 1017;
public const int ERROR_NOT_SAME_DEVICE = 17;
public const int ERROR_NOT_SUBSTED = 137;
public const int ERROR_NOT_SUPPORTED = 50;
public const int ERROR_NO_BROWSER_SERVERS_FOUND = 6118;
public const int ERROR_NO_DATA = 232;
public const int ERROR_NO_DATA_DETECTED = 1104;
public const int ERROR_NO_IMPERSONATION_TOKEN = 1309;
public const int ERROR_NO_INHERITANCE = 1391;
public const int ERROR_NO_LOGON_SERVERS = 1311;
public const int ERROR_NO_LOG_SPACE = 1019;
public const int ERROR_NO_MEDIA_IN_DRIVE = 1112;
public const int ERROR_NO_MORE_FILES = 18;
public const int ERROR_NO_MORE_ITEMS = 259;
public const int ERROR_NO_MORE_SEARCH_HANDLES = 113;
public const int ERROR_NO_NETWORK = 1222;
public const int ERROR_NO_NET_OR_BAD_PATH = 1203;
public const int ERROR_NO_PROC_SLOTS = 89;
public const int ERROR_NO_QUOTAS_FOR_ACCOUNT = 1302;
public const int ERROR_NO_SCROLLBARS = 1447;
public const int ERROR_NO_SECURITY_ON_OBJECT = 1350;
public const int ERROR_NO_SHUTDOWN_IN_PROGRESS = 1116;
public const int ERROR_NO_SIGNAL_SENT = 205;
public const int ERROR_NO_SPOOL_SPACE = 62;
public const int ERROR_NO_SUCH_ALIAS = 1376;
public const int ERROR_NO_SUCH_DOMAIN = 1355;
public const int ERROR_NO_SUCH_GROUP = 1319;
public const int ERROR_NO_SUCH_LOGON_SESSION = 1312;
public const int ERROR_NO_SUCH_MEMBER = 1387;
public const int ERROR_NO_SUCH_PACKAGE = 1364;
public const int ERROR_NO_SUCH_PRIVILEGE = 1313;
public const int ERROR_NO_SUCH_USER = 1317;
public const int ERROR_NO_SYSTEM_MENU = 1437;
public const int ERROR_NO_TOKEN = 1008;
public const int ERROR_NO_TRUST_LSA_SECRET = 1786;
public const int ERROR_NO_TRUST_SAM_ACCOUNT = 1787;
public const int ERROR_NO_UNICODE_TRANSLATION = 1113;
public const int ERROR_NO_USER_SESSION_KEY = 1394;
public const int ERROR_NO_VOLUME_LABEL = 125;
public const int ERROR_NO_WILDCARD_CHARACTERS = 1417;
public const int ERROR_NT_CROSS_ENCRYPTION_REQUIRED = 1386;
public const int ERROR_NULL_LM_PASSWORD = 1304;
public const int ERROR_OPEN_FAILED = 110;
public const int ERROR_OPEN_FILES = 2401;
public const int ERROR_OPERATION_ABORTED = 995;
public const int ERROR_OUTOFMEMORY = 14;
public const int ERROR_OUT_OF_PAPER = 28;
public const int ERROR_OUT_OF_STRUCTURES = 84;
public const int ERROR_PARTITION_FAILURE = 1105;
public const int ERROR_PASSWORD_EXPIRED = 1330;
public const int ERROR_PASSWORD_RESTRICTION = 1325;
public const int ERROR_PATH_BUSY = 148;
public const int ERROR_PATH_NOT_FOUND = 3;
public const int ERROR_PIPE_BUSY = 231;
public const int ERROR_PIPE_CONNECTED = 535;
public const int ERROR_PIPE_LISTENING = 536;
public const int ERROR_PIPE_NOT_CONNECTED = 233;
public const int ERROR_POPUP_ALREADY_ACTIVE = 1446;
public const int ERROR_POSSIBLE_DEADLOCK = 1131;
public const int ERROR_PRINTER_ALREADY_EXISTS = 1802;
public const int ERROR_PRINTER_DELETED = 1905;
public const int ERROR_PRINTER_DRIVER_ALREADY_INSTALLED = 1795;
public const int ERROR_PRINTER_DRIVER_IN_USE = 3001;
public const int ERROR_PRINTQ_FULL = 61;
public const int ERROR_PRINT_CANCELLED = 63;
public const int ERROR_PRINT_MONITOR_ALREADY_INSTALLED = 3006;
public const int ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED = 3005;
public const int ERROR_PRIVATE_DIALOG_INDEX = 1415;
public const int ERROR_PRIVILEGE_NOT_HELD = 1314;
public const int ERROR_PROCESS_ABORTED = 1067;
public const int ERROR_PROC_NOT_FOUND = 127;
public const int ERROR_PUBLIC_ONLY_HOOK = 1429;
public const int ERROR_READ_FAULT = 30;
public const int ERROR_REC_NON_EXISTENT = 4005;
public const int ERROR_REDIRECTOR_HAS_OPEN_HANDLES = 1794;
public const int ERROR_REDIR_PAUSED = 72;
public const int ERROR_REGISTRY_CORRUPT = 1015;
public const int ERROR_REGISTRY_IO_FAILED = 1016;
public const int ERROR_REGISTRY_RECOVERED = 1014;
public const int ERROR_RELOC_CHAIN_XEEDS_SEGLIM = 201;
public const int ERROR_REMOTE_SESSION_LIMIT_EXCEEDED = 1220;
public const int ERROR_REM_NOT_LIST = 51;
public const int ERROR_REQ_NOT_ACCEP = 71;
public const int ERROR_RESOURCE_DATA_NOT_FOUND = 1812;
public const int ERROR_RESOURCE_LANG_NOT_FOUND = 1815;
public const int ERROR_RESOURCE_NAME_NOT_FOUND = 1814;
public const int ERROR_RESOURCE_TYPE_NOT_FOUND = 1813;
public const int ERROR_REVISION_MISMATCH = 1306;
public const int ERROR_RING2SEG_MUST_BE_MOVABLE = 200;
public const int ERROR_RING2_STACK_IN_USE = 207;
public const int ERROR_RPL_NOT_ALLOWED = 4006;
public const int ERROR_RXACT_COMMIT_FAILURE = 1370;
public const int ERROR_RXACT_INVALID_STATE = 1369;
public const int ERROR_SAME_DRIVE = 143;
public const int ERROR_SCREEN_ALREADY_LOCKED = 1440;
public const int ERROR_SECRET_TOO_LONG = 1382;
public const int ERROR_SECTOR_NOT_FOUND = 27;
public const int ERROR_SEEK = 25;
public const int ERROR_SEEK_ON_DEVICE = 132;
public const int ERROR_SEM_IS_SET = 102;
public const int ERROR_SEM_NOT_FOUND = 187;
public const int ERROR_SEM_OWNER_DIED = 105;
public const int ERROR_SEM_TIMEOUT = 121;
public const int ERROR_SEM_USER_LIMIT = 106;
public const int ERROR_SERIAL_NO_DEVICE = 1118;
public const int ERROR_SERVER_DISABLED = 1341;
public const int ERROR_SERVER_HAS_OPEN_HANDLES = 1811;
public const int ERROR_SERVER_NOT_DISABLED = 1342;
public const int ERROR_SERVICE_ALREADY_RUNNING = 1056;
public const int ERROR_SERVICE_CANNOT_ACCEPT_CTRL = 1061;
public const int ERROR_SERVICE_DATABASE_LOCKED = 1055;
public const int ERROR_SERVICE_DEPENDENCY_DELETED = 1075;
public const int ERROR_SERVICE_DEPENDENCY_FAIL = 1068;
public const int ERROR_SERVICE_DISABLED = 1058;
public const int ERROR_SERVICE_DOES_NOT_EXIST = 1060;
public const int ERROR_SERVICE_EXISTS = 1073;
public const int ERROR_SERVICE_LOGON_FAILED = 1069;
public const int ERROR_SERVICE_MARKED_FOR_DELETE = 1072;
public const int ERROR_SERVICE_NEVER_STARTED = 1077;
public const int ERROR_SERVICE_NOT_ACTIVE = 1062;
public const int ERROR_SERVICE_NO_THREAD = 1054;
public const int ERROR_SERVICE_REQUEST_TIMEOUT = 1053;
public const int ERROR_SERVICE_SPECIFIC_ERROR = 1066;
public const int ERROR_SERVICE_START_HANG = 1070;
public const int ERROR_SESSION_CREDENTIAL_CONFLICT = 1219;
public const int ERROR_SETCOUNT_ON_BAD_LB = 1433;
public const int ERROR_SETMARK_DETECTED = 1103;
public const int ERROR_SHARING_BUFFER_EXCEEDED = 36;
public const int ERROR_SHARING_PAUSED = 70;
public const int ERROR_SHARING_VIOLATION = 32;
public const int ERROR_SHUTDOWN_IN_PROGRESS = 1115;
public const int ERROR_SIGNAL_PENDING = 162;
public const int ERROR_SIGNAL_REFUSED = 156;
public const int ERROR_SOME_NOT_MAPPED = 1301;
public const int ERROR_SPECIAL_ACCOUNT = 1371;
public const int ERROR_SPECIAL_GROUP = 1372;
public const int ERROR_SPECIAL_USER = 1373;
public const int ERROR_SPL_NO_ADDJOB = 3004;
public const int ERROR_SPL_NO_STARTDOC = 3003;
public const int ERROR_SPOOL_FILE_NOT_FOUND = 3002;
public const int ERROR_STACK_OVERFLOW = 1001;
public const int ERROR_STATIC_INIT = 4002;
public const int ERROR_SUBST_TO_JOIN = 141;
public const int ERROR_SUBST_TO_SUBST = 139;
public const int ERROR_SUCCESS = 0;
public const int ERROR_SWAPERROR = 999;
public const int ERROR_SYSTEM_TRACE = 150;
public const int ERROR_THREAD_1_INACTIVE = 210;
public const int ERROR_TLW_WITH_WSCHILD = 1406;
public const int ERROR_TOKEN_ALREADY_IN_USE = 1375;
public const int ERROR_TOO_MANY_CMDS = 56;
public const int ERROR_TOO_MANY_CONTEXT_IDS = 1384;
public const int ERROR_TOO_MANY_LUIDS_REQUESTED = 1333;
public const int ERROR_TOO_MANY_MODULES = 214;
public const int ERROR_TOO_MANY_MUXWAITERS = 152;
public const int ERROR_TOO_MANY_NAMES = 68;
public const int ERROR_TOO_MANY_OPEN_FILES = 4;
public const int ERROR_TOO_MANY_POSTS = 298;
public const int ERROR_TOO_MANY_SECRETS = 1381;
public const int ERROR_TOO_MANY_SEMAPHORES = 100;
public const int ERROR_TOO_MANY_SEM_REQUESTS = 103;
public const int ERROR_TOO_MANY_SESS = 69;
public const int ERROR_TOO_MANY_SIDS = 1389;
public const int ERROR_TOO_MANY_TCBS = 155;
public const int ERROR_TRANSFORM_NOT_SUPPORTED = 2004;
public const int ERROR_TRUSTED_DOMAIN_FAILURE = 1788;
public const int ERROR_TRUSTED_RELATIONSHIP_FAILURE = 1789;
public const int ERROR_TRUST_FAILURE = 1790;
public const int ERROR_UNABLE_TO_LOCK_MEDIA = 1108;
public const int ERROR_UNABLE_TO_UNLOAD_MEDIA = 1109;
public const int ERROR_UNEXP_NET_ERR = 59;
public const int ERROR_UNKNOWN_PORT = 1796;
public const int ERROR_UNKNOWN_PRINTER_DRIVER = 1797;
public const int ERROR_UNKNOWN_PRINTPROCESSOR = 1798;
public const int ERROR_UNKNOWN_PRINT_MONITOR = 3000;
public const int ERROR_UNKNOWN_REVISION = 1305;
public const int ERROR_UNRECOGNIZED_MEDIA = 1785;
public const int ERROR_UNRECOGNIZED_VOLUME = 1005;
public const int ERROR_USER_EXISTS = 1316;
public const int ERROR_VC_DISCONNECTED = 240;
public const int ERROR_WAIT_NO_CHILDREN = 128;
public const int ERROR_WINDOW_NOT_COMBOBOX = 1423;
public const int ERROR_WINDOW_NOT_DIALOG = 1420;
public const int ERROR_WINDOW_OF_OTHER_THREAD = 1408;
public const int ERROR_WINS_INTERNAL = 4000;
public const int ERROR_WRITE_FAULT = 29;
public const int ERROR_WRITE_PROTECT = 19;
public const int ERROR_WRONG_DISK = 34;
public const int ERROR_WRONG_PASSWORD = 1323;
public const int E_ABORT = unchecked((int)0x80004004);
public const int E_ACCESSDENIED = unchecked((int)0x80070005);
public const int E_FAIL = unchecked((int)0x80004005);
public const int E_HANDLE = unchecked((int)0x80070006);
public const int E_INVALIDARG = unchecked((int)0x80070057);
public const int E_NOINTERFACE = unchecked((int)0x80004002);
public const int E_NOTIMPL = unchecked((int)0x80004001);
public const int E_OUTOFMEMORY = unchecked((int)0x8007000E);
public const int E_POINTER = unchecked((int)0x80004003);
public const int E_UNEXPECTED = unchecked((int)0x8000FFFF);
public const int FACILITY_NT_BIT = 0x10000000;
public const int INPLACE_E_FIRST = unchecked((int)0x800401A0);
public const int INPLACE_E_LAST = unchecked((int)0x800401AF);
public const int INPLACE_E_NOTOOLSPACE = unchecked((int)0x800401A1);
public const int INPLACE_E_NOTUNDOABLE = unchecked((int)0x800401A0);
public const int INPLACE_S_FIRST = 0x401A0;
public const int INPLACE_S_LAST = 0x401AF;
public const int INPLACE_S_TRUNCATED = 0x401A0;
public const int MARSHAL_E_FIRST = unchecked((int)0x80040120);
public const int MARSHAL_E_LAST = unchecked((int)0x8004012F);
public const int MARSHAL_S_FIRST = 0x40120;
public const int MARSHAL_S_LAST = 0x4012F;
public const int MEM_E_INVALID_LINK = unchecked((int)0x80080010);
public const int MEM_E_INVALID_ROOT = unchecked((int)0x80080009);
public const int MEM_E_INVALID_SIZE = unchecked((int)0x80080011);
public const int MK_E_CANTOPENFILE = unchecked((int)0x800401EA);
public const int MK_E_CONNECTMANUALLY = unchecked((int)0x800401E0);
public const int MK_E_ENUMERATION_FAILED = unchecked((int)0x800401EF);
public const int MK_E_EXCEEDEDDEADLINE = unchecked((int)0x800401E1);
public const int MK_E_FIRST = unchecked((int)0x800401E0);
public const int MK_E_INTERMEDIATEINTERFACENOTSUPPORTED = unchecked((int)0x800401E7);
public const int MK_E_INVALIDEXTENSION = unchecked((int)0x800401E6);
public const int MK_E_LAST = unchecked((int)0x800401EF);
public const int MK_E_MUSTBOTHERUSER = unchecked((int)0x800401EB);
public const int MK_E_NEEDGENERIC = unchecked((int)0x800401E2);
public const int MK_E_NOINVERSE = unchecked((int)0x800401EC);
public const int MK_E_NOOBJECT = unchecked((int)0x800401E5);
public const int MK_E_NOPREFIX = unchecked((int)0x800401EE);
public const int MK_E_NOSTORAGE = unchecked((int)0x800401ED);
public const int MK_E_NOTBINDABLE = unchecked((int)0x800401E8);
public const int MK_E_NOTBOUND = unchecked((int)0x800401E9);
public const int MK_E_NO_NORMALIZED = unchecked((int)0x80080007);
public const int MK_E_SYNTAX = unchecked((int)0x800401E4);
public const int MK_E_UNAVAILABLE = unchecked((int)0x800401E3);
public const int MK_S_FIRST = 0x401E0;
public const int MK_S_HIM = 0x401E5;
public const int MK_S_LAST = 0x401EF;
public const int MK_S_ME = 0x401E4;
public const int MK_S_MONIKERALREADYREGISTERED = 0x401E7;
public const int MK_S_REDUCED_TO_SELF = 0x401E2;
public const int MK_S_US = 0x401E6;
public const int NOERROR = 0;
public const int NO_ERROR = 0;
public const int OLEOBJ_E_FIRST = unchecked((int)0x80040180);
public const int OLEOBJ_E_INVALIDVERB = unchecked((int)0x80040181);
public const int OLEOBJ_E_LAST = unchecked((int)0x8004018F);
public const int OLEOBJ_E_NOVERBS = unchecked((int)0x80040180);
public const int OLEOBJ_S_CANNOT_DOVERB_NOW = 0x40181;
public const int OLEOBJ_S_FIRST = 0x40180;
public const int OLEOBJ_S_INVALIDHWND = 0x40182;
public const int OLEOBJ_S_INVALIDVERB = 0x40180;
public const int OLEOBJ_S_LAST = 0x4018F;
public const int OLE_E_ADVF = unchecked((int)0x80040001);
public const int OLE_E_ADVISENOTSUPPORTED = unchecked((int)0x80040003);
public const int OLE_E_BLANK = unchecked((int)0x80040007);
public const int OLE_E_CANTCONVERT = unchecked((int)0x80040011);
public const int OLE_E_CANT_BINDTOSOURCE = unchecked((int)0x8004000A);
public const int OLE_E_CANT_GETMONIKER = unchecked((int)0x80040009);
public const int OLE_E_CLASSDIFF = unchecked((int)0x80040008);
public const int OLE_E_ENUM_NOMORE = unchecked((int)0x80040002);
public const int OLE_E_FIRST = unchecked((int)0x80040000);
public const int OLE_E_INVALIDHWND = unchecked((int)0x8004000F);
public const int OLE_E_INVALIDRECT = unchecked((int)0x8004000D);
public const int OLE_E_LAST = unchecked((int)0x800400FF);
public const int OLE_E_NOCACHE = unchecked((int)0x80040006);
public const int OLE_E_NOCONNECTION = unchecked((int)0x80040004);
public const int OLE_E_NOSTORAGE = unchecked((int)0x80040012);
public const int OLE_E_NOTRUNNING = unchecked((int)0x80040005);
public const int OLE_E_NOT_INPLACEACTIVE = unchecked((int)0x80040010);
public const int OLE_E_OLEVERB = unchecked((int)0x80040000);
public const int OLE_E_PROMPTSAVECANCELLED = unchecked((int)0x8004000C);
public const int OLE_E_STATIC = unchecked((int)0x8004000B);
public const int OLE_E_WRONGCOMPOBJ = unchecked((int)0x8004000E);
public const int OLE_S_FIRST = 0x40000;
public const int OLE_S_LAST = 0x400FF;
public const int OLE_S_MAC_CLIPFORMAT = 0x40002;
public const int OLE_S_STATIC = 0x40001;
public const int OLE_S_USEREG = 0x40000;
public const int REGDB_E_CLASSNOTREG = unchecked((int)0x80040154);
public const int REGDB_E_FIRST = unchecked((int)0x80040150);
public const int REGDB_E_IIDNOTREG = unchecked((int)0x80040155);
public const int REGDB_E_INVALIDVALUE = unchecked((int)0x80040153);
public const int REGDB_E_KEYMISSING = unchecked((int)0x80040152);
public const int REGDB_E_LAST = unchecked((int)0x8004015F);
public const int REGDB_E_READREGDB = unchecked((int)0x80040150);
public const int REGDB_E_WRITEREGDB = unchecked((int)0x80040151);
public const int REGDB_S_FIRST = 0x40150;
public const int REGDB_S_LAST = 0x4015F;
public const int RPC_E_ATTEMPTED_MULTITHREAD = unchecked((int)0x80010102);
public const int RPC_E_CALL_CANCELED = unchecked((int)0x80010002);
public const int RPC_E_CALL_REJECTED = unchecked((int)0x80010001);
public const int RPC_E_CANTCALLOUT_AGAIN = unchecked((int)0x80010011);
public const int RPC_E_CANTCALLOUT_INASYNCCALL = unchecked((int)0x80010004);
public const int RPC_E_CANTCALLOUT_INEXTERNALCALL = unchecked((int)0x80010005);
public const int RPC_E_CANTCALLOUT_ININPUTSYNCCALL = unchecked((int)0x8001010D);
public const int RPC_E_CANTPOST_INSENDCALL = unchecked((int)0x80010003);
public const int RPC_E_CANTTRANSMIT_CALL = unchecked((int)0x8001000A);
public const int RPC_E_CHANGED_MODE = unchecked((int)0x80010106);
public const int RPC_E_CLIENT_CANTMARSHAL_DATA = unchecked((int)0x8001000B);
public const int RPC_E_CLIENT_CANTUNMARSHAL_DATA = unchecked((int)0x8001000C);
public const int RPC_E_CLIENT_DIED = unchecked((int)0x80010008);
public const int RPC_E_CONNECTION_TERMINATED = unchecked((int)0x80010006);
public const int RPC_E_DISCONNECTED = unchecked((int)0x80010108);
public const int RPC_E_FAULT = unchecked((int)0x80010104);
public const int RPC_E_INVALIDMETHOD = unchecked((int)0x80010107);
public const int RPC_E_INVALID_CALLDATA = unchecked((int)0x8001010C);
public const int RPC_E_INVALID_DATA = unchecked((int)0x8001000F);
public const int RPC_E_INVALID_DATAPACKET = unchecked((int)0x80010009);
public const int RPC_E_INVALID_PARAMETER = unchecked((int)0x80010010);
public const int RPC_E_NOT_REGISTERED = unchecked((int)0x80010103);
public const int RPC_E_OUT_OF_RESOURCES = unchecked((int)0x80010101);
public const int RPC_E_RETRY = unchecked((int)0x80010109);
public const int RPC_E_SERVERCALL_REJECTED = unchecked((int)0x8001010B);
public const int RPC_E_SERVERCALL_RETRYLATER = unchecked((int)0x8001010A);
public const int RPC_E_SERVERFAULT = unchecked((int)0x80010105);
public const int RPC_E_SERVER_CANTMARSHAL_DATA = unchecked((int)0x8001000D);
public const int RPC_E_SERVER_CANTUNMARSHAL_DATA = unchecked((int)0x8001000E);
public const int RPC_E_SERVER_DIED = unchecked((int)0x80010007);
public const int RPC_E_SERVER_DIED_DNE = unchecked((int)0x80010012);
public const int RPC_E_SYS_CALL_FAILED = unchecked((int)0x80010100);
public const int RPC_E_THREAD_NOT_INIT = unchecked((int)0x8001010F);
public const int RPC_E_UNEXPECTED = unchecked((int)0x8001FFFF);
public const int RPC_E_WRONG_THREAD = unchecked((int)0x8001010E);
public const int RPC_S_ADDRESS_ERROR = 1768;
public const int RPC_S_ALREADY_LISTENING = 1713;
public const int RPC_S_ALREADY_REGISTERED = 1711;
public const int RPC_S_BINDING_HAS_NO_AUTH = 1746;
public const int RPC_S_CALL_FAILED = 1726;
public const int RPC_S_CALL_FAILED_DNE = 1727;
public const int RPC_S_CALL_IN_PROGRESS = 1791;
public const int RPC_S_CANNOT_SUPPORT = 1764;
public const int RPC_S_CANT_CREATE_ENDPOINT = 1720;
public const int RPC_S_DUPLICATE_ENDPOINT = 1740;
public const int RPC_S_ENTRY_ALREADY_EXISTS = 1760;
public const int RPC_S_ENTRY_NOT_FOUND = 1761;
public const int RPC_S_FP_DIV_ZERO = 1769;
public const int RPC_S_FP_OVERFLOW = 1771;
public const int RPC_S_FP_UNDERFLOW = 1770;
public const int RPC_S_GROUP_MEMBER_NOT_FOUND = 1898;
public const int RPC_S_INCOMPLETE_NAME = 1755;
public const int RPC_S_INTERFACE_NOT_FOUND = 1759;
public const int RPC_S_INTERNAL_ERROR = 1766;
public const int RPC_S_INVALID_AUTH_IDENTITY = 1749;
public const int RPC_S_INVALID_BINDING = 1702;
public const int RPC_S_INVALID_BOUND = 1734;
public const int RPC_S_INVALID_ENDPOINT_FORMAT = 1706;
public const int RPC_S_INVALID_NAF_ID = 1763;
public const int RPC_S_INVALID_NAME_SYNTAX = 1736;
public const int RPC_S_INVALID_NETWORK_OPTIONS = 1724;
public const int RPC_S_INVALID_NET_ADDR = 1707;
public const int RPC_S_INVALID_OBJECT = 1900;
public const int RPC_S_INVALID_RPC_PROTSEQ = 1704;
public const int RPC_S_INVALID_STRING_BINDING = 1700;
public const int RPC_S_INVALID_STRING_UUID = 1705;
public const int RPC_S_INVALID_TAG = 1733;
public const int RPC_S_INVALID_TIMEOUT = 1709;
public const int RPC_S_INVALID_VERS_OPTION = 1756;
public const int RPC_S_MAX_CALLS_TOO_SMALL = 1742;
public const int RPC_S_NAME_SERVICE_UNAVAILABLE = 1762;
public const int RPC_S_NOTHING_TO_EXPORT = 1754;
public const int RPC_S_NOT_ALL_OBJS_UNEXPORTED = 1758;
public const int RPC_S_NOT_LISTENING = 1715;
public const int RPC_S_NO_BINDINGS = 1718;
public const int RPC_S_NO_CALL_ACTIVE = 1725;
public const int RPC_S_NO_CONTEXT_AVAILABLE = 1765;
public const int RPC_S_NO_ENDPOINT_FOUND = 1708;
public const int RPC_S_NO_ENTRY_NAME = 1735;
public const int RPC_S_NO_MORE_BINDINGS = 1806;
public const int RPC_S_NO_MORE_MEMBERS = 1757;
public const int RPC_S_NO_PROTSEQS = 1719;
public const int RPC_S_NO_PROTSEQS_REGISTERED = 1714;
public const int RPC_S_OBJECT_NOT_FOUND = 1710;
public const int RPC_S_OUT_OF_RESOURCES = 1721;
public const int RPC_S_PROCNUM_OUT_OF_RANGE = 1745;
public const int RPC_S_PROTOCOL_ERROR = 1728;
public const int RPC_S_PROTSEQ_NOT_FOUND = 1744;
public const int RPC_S_PROTSEQ_NOT_SUPPORTED = 1703;
public const int RPC_S_SERVER_TOO_BUSY = 1723;
public const int RPC_S_SERVER_UNAVAILABLE = 1722;
public const int RPC_S_STRING_TOO_LONG = 1743;
public const int RPC_S_TYPE_ALREADY_REGISTERED = 1712;
public const int RPC_S_UNKNOWN_AUTHN_LEVEL = 1748;
public const int RPC_S_UNKNOWN_AUTHN_SERVICE = 1747;
public const int RPC_S_UNKNOWN_AUTHN_TYPE = 1741;
public const int RPC_S_UNKNOWN_AUTHZ_SERVICE = 1750;
public const int RPC_S_UNKNOWN_IF = 1717;
public const int RPC_S_UNKNOWN_MGR_TYPE = 1716;
public const int RPC_S_UNSUPPORTED_NAME_SYNTAX = 1737;
public const int RPC_S_UNSUPPORTED_TRANS_SYN = 1730;
public const int RPC_S_UNSUPPORTED_TYPE = 1732;
public const int RPC_S_UUID_NO_ADDRESS = 1739;
public const int RPC_S_WRONG_KIND_OF_BINDING = 1701;
public const int RPC_S_ZERO_DIVIDE = 1767;
public const int RPC_X_BAD_STUB_DATA = 1783;
public const int RPC_X_BYTE_COUNT_TOO_SMALL = 1782;
public const int RPC_X_ENUM_VALUE_OUT_OF_RANGE = 1781;
public const int RPC_X_NO_MORE_ENTRIES = 1772;
public const int RPC_X_NULL_REF_POINTER = 1780;
public const int RPC_X_SS_CANNOT_GET_CALL_HANDLE = 1779;
public const int RPC_X_SS_CHAR_TRANS_OPEN_FAIL = 1773;
public const int RPC_X_SS_CHAR_TRANS_SHORT_FILE = 1774;
public const int RPC_X_SS_CONTEXT_DAMAGED = 1777;
public const int RPC_X_SS_HANDLES_MISMATCH = 1778;
public const int RPC_X_SS_IN_NULL_CONTEXT = 1775;
public const int SEVERITY_ERROR = 1;
public const int SEVERITY_SUCCESS = 0;
public const int STG_E_ABNORMALAPIEXIT = unchecked((int)0x800300FA);
public const int STG_E_ACCESSDENIED = unchecked((int)0x80030005);
public const int STG_E_CANTSAVE = unchecked((int)0x80030103);
public const int STG_E_DISKISWRITEPROTECTED = unchecked((int)0x80030013);
public const int STG_E_EXTANTMARSHALLINGS = unchecked((int)0x80030108);
public const int STG_E_FILEALREADYEXISTS = unchecked((int)0x80030050);
public const int STG_E_FILENOTFOUND = unchecked((int)0x80030002);
public const int STG_E_INSUFFICIENTMEMORY = unchecked((int)0x80030008);
public const int STG_E_INUSE = unchecked((int)0x80030100);
public const int STG_E_INVALIDFLAG = unchecked((int)0x800300FF);
public const int STG_E_INVALIDFUNCTION = unchecked((int)0x80030001);
public const int STG_E_INVALIDHANDLE = unchecked((int)0x80030006);
public const int STG_E_INVALIDHEADER = unchecked((int)0x800300FB);
public const int STG_E_INVALIDNAME = unchecked((int)0x800300FC);
public const int STG_E_INVALIDPARAMETER = unchecked((int)0x80030057);
public const int STG_E_INVALIDPOINTER = unchecked((int)0x80030009);
public const int STG_E_LOCKVIOLATION = unchecked((int)0x80030021);
public const int STG_E_MEDIUMFULL = unchecked((int)0x80030070);
public const int STG_E_NOMOREFILES = unchecked((int)0x80030012);
public const int STG_E_NOTCURRENT = unchecked((int)0x80030101);
public const int STG_E_NOTFILEBASEDSTORAGE = unchecked((int)0x80030107);
public const int STG_E_OLDDLL = unchecked((int)0x80030105);
public const int STG_E_OLDFORMAT = unchecked((int)0x80030104);
public const int STG_E_PATHNOTFOUND = unchecked((int)0x80030003);
public const int STG_E_READFAULT = unchecked((int)0x8003001E);
public const int STG_E_REVERTED = unchecked((int)0x80030102);
public const int STG_E_SEEKERROR = unchecked((int)0x80030019);
public const int STG_E_SHAREREQUIRED = unchecked((int)0x80030106);
public const int STG_E_SHAREVIOLATION = unchecked((int)0x80030020);
public const int STG_E_TOOMANYOPENFILES = unchecked((int)0x80030004);
public const int STG_E_UNIMPLEMENTEDFUNCTION = unchecked((int)0x800300FE);
public const int STG_E_UNKNOWN = unchecked((int)0x800300FD);
public const int STG_E_WRITEFAULT = unchecked((int)0x8003001D);
public const int STG_S_CONVERTED = unchecked((int)0x30200);
public const int S_FALSE = 0x1;
public const int S_OK = 0x0;
public const int TYPE_E_AMBIGUOUSNAME = unchecked((int)0x8002802C);
public const int TYPE_E_BADMODULEKIND = unchecked((int)0x800288BD);
public const int TYPE_E_BUFFERTOOSMALL = unchecked((int)0x80028016);
public const int TYPE_E_CANTCREATETMPFILE = unchecked((int)0x80028CA3);
public const int TYPE_E_CANTLOADLIBRARY = unchecked((int)0x80029C4A);
public const int TYPE_E_CIRCULARTYPE = unchecked((int)0x80029C84);
public const int TYPE_E_DLLFUNCTIONNOTFOUND = unchecked((int)0x8002802F);
public const int TYPE_E_DUPLICATEID = unchecked((int)0x800288C6);
public const int TYPE_E_ELEMENTNOTFOUND = unchecked((int)0x8002802B);
public const int TYPE_E_INCONSISTENTPROPFUNCS = unchecked((int)0x80029C83);
public const int TYPE_E_INVALIDID = unchecked((int)0x800288CF);
public const int TYPE_E_INVALIDSTATE = unchecked((int)0x80028029);
public const int TYPE_E_INVDATAREAD = unchecked((int)0x80028018);
public const int TYPE_E_IOERROR = unchecked((int)0x80028CA2);
public const int TYPE_E_LIBNOTREGISTERED = unchecked((int)0x8002801D);
public const int TYPE_E_NAMECONFLICT = unchecked((int)0x8002802D);
public const int TYPE_E_OUTOFBOUNDS = unchecked((int)0x80028CA1);
public const int TYPE_E_QUALIFIEDNAMEDISALLOWED = unchecked((int)0x80028028);
public const int TYPE_E_REGISTRYACCESS = unchecked((int)0x8002801C);
public const int TYPE_E_SIZETOOBIG = unchecked((int)0x800288C5);
public const int TYPE_E_TYPEMISMATCH = unchecked((int)0x80028CA0);
public const int TYPE_E_UNDEFINEDTYPE = unchecked((int)0x80028027);
public const int TYPE_E_UNKNOWNLCID = unchecked((int)0x8002802E);
public const int TYPE_E_UNSUPFORMAT = unchecked((int)0x80028019);
public const int TYPE_E_WRONGTYPEKIND = unchecked((int)0x8002802A);
public const int VIEW_E_DRAW = unchecked((int)0x80040140);
public const int VIEW_E_FIRST = unchecked((int)0x80040140);
public const int VIEW_E_LAST = unchecked((int)0x8004014F);
public const int VIEW_S_ALREADY_FROZEN = 0x40140;
public const int VIEW_S_FIRST = 0x40140;
public const int VIEW_S_LAST = 0x4014F;
}
}

1999
SunnyUI/Win32/Win32.GDI.cs Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,212 @@
using System;
using System.Runtime.InteropServices;
using System.Text;
using HANDLE = System.IntPtr;
using HWND = System.IntPtr;
namespace Sunny.UI.Win32
{
public struct NETRESOURCE
{
public int dwScope;
public int dwType;
public int dwDisplayType;
public int dwUsage;
public string lpLocalName;
public string lpRemoteName;
public string lpComment;
public string lpProvider;
}
public struct USER_INFO_3
{
public int Name;
public int Password;
public int PasswordAge;
public int Privilege;
public int HomeDir;
public int Comment;
public int Flags;
public int ScriptPath;
public int AuthFlags;
public int FullName;
public int UserComment;
public int Parms;
public int Workstations;
public int LastLogon;
public int LastLogoff;
public int AcctExpires;
public int MaxStorage;
public int UnitsPerWeek;
public int LogonHours;
public int BadPwCount;
public int NumLogons;
public int LogonServer;
public int CountryCode;
public int CodePage;
public int UserID;
public int PrimaryGroupID;
public int Profile;
public int HomeDirDrive;
public int PasswordExpired;
}
public struct GROUP_INFO_2
{
public int Name;
public int Comment;
public int GroupID;
public int Attributes;
}
public struct LOCALGROUP_MEMBERS_INFO_0
{
public int pSID;
}
public struct LOCALGROUP_MEMBERS_INFO_1
{
public int pSID;
public g_netSID_NAME_USE eUsage;
public int psName;
}
public struct WKSTA_INFO_102
{
public int wki102_platform_id;
public int wki102_computername;
public int wki102_langroup;
public int wki102_ver_major;
public int wki102_ver_minor;
public int wki102_lanroot;
public int wki102_logged_on_users;
}
public struct WKSTA_USER_INFO_1
{
public int wkui1_username;
public int wkui1_logon_domain;
public int wkui1_oth_domains;
public int wkui1_logon_server;
}
public enum g_netSID_NAME_USE
{
SidTypeUser = 1,
SidTypeGroup = 2,
SidTypeDomain = 3,
SidTypeAlias = 4,
SidTypeWellKnownGroup = 5,
SidTypeDeletedAccount = 6,
SidTypeInvalid = 7,
SidTypeUnknown = 8,
}
public abstract class Mpr
{
[DllImport("mpr")] public static extern int WNetAddConnection(string lpszNetPath, string lpszPassword, string lpszLocalName);
[DllImport("mpr")] public static extern int WNetAddConnection2(ref NETRESOURCE lpNetResource, string lpPassword, string lpUserName, int dwFlags);
[DllImport("mpr")] public static extern int WNetCancelConnection(string lpszName, int bForce);
[DllImport("mpr")] public static extern int WNetCancelConnection2(string lpName, int dwFlags, int fForce);
[DllImport("mpr")] public static extern int WNetCloseEnum(HANDLE hEnum);
[DllImport("mpr")] public static extern int WNetConnectionDialog(HWND hwnd, int dwType);
[DllImport("mpr")] public static extern int WNetDisconnectDialog(HWND hwnd, int dwType);
[DllImport("mpr")] public static extern int WNetEnumResource(HANDLE hEnum, ref int lpcCount, ref NETRESOURCE lpBuffer, ref int lpBufferSize);
[DllImport("mpr")] public static extern int WNetGetConnection(string lpszLocalName, string lpszRemoteName, int cbRemoteName);
[DllImport("mpr")] public static extern int WNetGetLastError(int lpError, StringBuilder lpErrorBuf, int nErrorBufSize, string lpNameBuf, int nNameBufSize);
[DllImport("mpr")] public static extern int WNetGetUser(string lpName, StringBuilder lpUserName, ref int lpnLength);
[DllImport("mpr")] public static extern int WNetOpenEnum(int dwScope, int dwType, int dwUsage, ref NETRESOURCE lpNetResource, ref int lphEnum);
}
public abstract class NetApi
{
[DllImport("Netapi32")] public static extern int NetApiBufferFree(int lpBuffer);
[DllImport("Netapi32")] public static extern int NetRemoteTOD(IntPtr yServer, int pBuffer);
[DllImport("Netapi32")] public static extern int NetUserChangePassword(IntPtr Domain, IntPtr User, Byte OldPass, Byte NewPass);
[DllImport("Netapi32")] public static extern int NetUserGetGroups(IntPtr lpServer, Byte UserName, int Level, ref int lpBuffer, int PrefMaxLen, ref int lpEntriesRead, ref int lpTotalEntries);
[DllImport("Netapi32")] public static extern int NetUserGetInfo(IntPtr lpServer, Byte UserName, int Level, ref int lpBuffer);
[DllImport("Netapi32")] public static extern int NetUserGetLocalGroups(IntPtr lpServer, Byte UserName, int Level, int Flags, ref int lpBuffer, int MaxLen, ref int lpEntriesRead, ref int lpTotalEntries);
[DllImport("Netapi32")] public static extern int NetWkstaGetInfo(IntPtr lpServer, int Level, IntPtr lpBuffer);
[DllImport("Netapi32")] public static extern int NetWkstaUserGetInfo(IntPtr reserved, int Level, IntPtr lpBuffer);
[DllImport("netapi32")] public static extern int NetUserAdd(IntPtr lpServer, int Level, ref USER_INFO_3 lpUser, ref int lpError);
[DllImport("netapi32")] public static extern int NetLocalGroupDelMembers(int psServer, int psLocalGroup, int lLevel, ref LOCALGROUP_MEMBERS_INFO_0 uMember, int lMemberCount);
[DllImport("netapi32")] public static extern int NetLocalGroupGetMembers(int psServer, int psLocalGroup, int lLevel, int pBuffer, int lMaxLength, int plEntriesRead, int plTotalEntries, int phResume);
public const int CNLEN = 15;
public const int CONNECT_UPDATE_PROFILE = 0x1;
public const int FILTER_INTERDOMAIN_TRUST_ACCOUNT = 0x8;
public const int FILTER_NORMAL_ACCOUNT = 0x2;
public const int FILTER_PROXY_ACCOUNT = 0x4;
public const int FILTER_SERVER_TRUST_ACCOUNT = 0x20;
public const int FILTER_TEMP_DUPLICATE_ACCOUNT = 0x1;
public const int FILTER_WORKSTATION_TRUST_ACCOUNT = 0x10;
public const int GNLEN = UNLEN;
public const int LG_INCLUDE_INDIRECT = 0x1;
public const int LM20_PWLEN = 14;
public const int MAXCOMMENTSZ = 256;
public const int NERR_BASE = 2100;
public const int NERR_GroupExists = (NERR_BASE + 123);
public const int NERR_InvalidComputer = (NERR_BASE + 251);
public const int NERR_NotPrimary = (NERR_BASE + 126);
public const int NERR_PasswordTooShort = (NERR_BASE + 145);
public const int NERR_Success = 0;
public const int NERR_UserExists = (NERR_BASE + 124);
public const int PWLEN = 256;
public const int RESOURCEDISPLAYTYPE_DOMAIN = 0x1;
public const int RESOURCEDISPLAYTYPE_FILE = 0x4;
public const int RESOURCEDISPLAYTYPE_GENERIC = 0x0;
public const int RESOURCEDISPLAYTYPE_GROUP = 0x5;
public const int RESOURCEDISPLAYTYPE_SERVER = 0x2;
public const int RESOURCEDISPLAYTYPE_SHARE = 0x3;
public const int RESOURCETYPE_ANY = 0x0;
public const int RESOURCETYPE_DISK = 0x1;
public const int RESOURCETYPE_PRINT = 0x2;
public const int RESOURCETYPE_UNKNOWN = 0xFFFF;
public const int RESOURCEUSAGE_ALL = 0x0;
public const int RESOURCEUSAGE_CONNECTABLE = 0x1;
public const int RESOURCEUSAGE_CONTAINER = 0x2;
public const int RESOURCEUSAGE_RESERVED = unchecked((int)0x80000000);
public const int RESOURCE_CONNECTED = 0x1;
public const int RESOURCE_ENUM_ALL = 0xFFFF;
public const int RESOURCE_GLOBALNET = 0x2;
public const int RESOURCE_PUBLICNET = 0x2;
public const int RESOURCE_REMEMBERED = 0x3;
public const int TIMEQ_FOREVER = -1;
public const int UF_ACCOUNTDISABLE = 0x2;
public const int UF_HOMEDIR_REQUIRED = 0x8;
public const int UF_LOCKOUT = 0x10;
public const int UF_PASSWD_CANT_CHANGE = 0x40;
public const int UF_PASSWD_NOTREQD = 0x20;
public const int UF_SCRIPT = 0x1;
public const int UNITS_PER_DAY = 24;
public const int UNITS_PER_WEEK = UNITS_PER_DAY * 7;
public const int UNLEN = 256;
public const int USER_MAXSTORAGE_UNLIMITED = -1;
public const int USER_NO_LOGOFF = -1;
public const int USER_PRIV_ADMIN = 2;
public const int USER_PRIV_GUEST = 0;
public const int USER_PRIV_MASK = 3;
public const int USER_PRIV_USER = 1;
public const int WN_ACCESS_DENIED = ERROR.ERROR_ACCESS_DENIED;
public const int WN_ALREADY_CONNECTED = ERROR.ERROR_ALREADY_ASSIGNED;
public const int WN_BAD_LOCALNAME = ERROR.ERROR_BAD_DEVICE;
public const int WN_BAD_NETNAME = ERROR.ERROR_BAD_NET_NAME;
public const int WN_BAD_PASSWORD = ERROR.ERROR_INVALID_PASSWORD;
public const int WN_BAD_POINTER = ERROR.ERROR_INVALID_ADDRESS;
public const int WN_BAD_PROFILE = ERROR.ERROR_BAD_PROFILE;
public const int WN_BAD_PROVIDER = ERROR.ERROR_BAD_PROVIDER;
public const int WN_BAD_USER = ERROR.ERROR_BAD_USERNAME;
public const int WN_BAD_VALUE = ERROR.ERROR_INVALID_PARAMETER;
public const int WN_CANNOT_OPEN_PROFILE = ERROR.ERROR_CANNOT_OPEN_PROFILE;
public const int WN_CONNECTION_CLOSED = ERROR.ERROR_CONNECTION_UNAVAIL;
public const int WN_DEVICE_ERROR = ERROR.ERROR_GEN_FAILURE;
public const int WN_DEVICE_IN_USE = ERROR.ERROR_DEVICE_IN_USE;
public const int WN_EXTENDED_ERROR = ERROR.ERROR_EXTENDED_ERROR;
public const int WN_FUNCTION_BUSY = ERROR.ERROR_BUSY;
public const int WN_MORE_DATA = ERROR.ERROR_MORE_DATA;
public const int WN_NET_ERROR = ERROR.ERROR_UNEXP_NET_ERR;
public const int WN_NOT_CONNECTED = ERROR.ERROR_NOT_CONNECTED;
public const int WN_NOT_SUPPORTED = ERROR.ERROR_NOT_SUPPORTED;
public const int WN_NO_NETWORK = ERROR.ERROR_NO_NETWORK;
public const int WN_NO_NET_OR_BAD_PATH = ERROR.ERROR_NO_NET_OR_BAD_PATH;
public const int WN_OPEN_FILES = ERROR.ERROR_OPEN_FILES;
public const int WN_OUT_OF_MEMORY = ERROR.ERROR_NOT_ENOUGH_MEMORY;
public const int WN_SUCCESS = ERROR.NO_ERROR;
public const int WN_WINDOWS_ERROR = ERROR.ERROR_UNEXP_NET_ERR;
}
}

View File

@ -0,0 +1,189 @@
using System.Runtime.InteropServices;
using HANDLE = System.IntPtr;
using HWND = System.IntPtr;
namespace Sunny.UI.Win32
{
public struct DRAGINFO
{
public int uSize;
public POINT pt;
public int fNC;
public string lpFileList;
public int grfKeyState;
}
public struct APPBARDATA
{
public int cbSize;
public HWND hwnd;
public int uCallbackMessage;
public int uEdge;
public RECT rc;
public int lParam;
}
public struct SHFILEOPSTRUCT
{
public HWND hwnd;
public int wFunc;
public string pFrom;
public string pTo;
public short fFlags;
public int fAnyOperationsAborted;
public HANDLE hNameMappings;
public string lpszProgressTitle;
}
public struct SHNAMEMAPPING
{
public string pszOldPath;
public string pszNewPath;
public int cchOldPath;
public int cchNewPath;
}
public struct SHELLEXECUTEINFO
{
public int cbSize;
public int fMask;
public HWND hwnd;
public string lpVerb;
public string lpFile;
public string lpParameters;
public string lpDirectory;
public int nShow;
public HANDLE hInstApp;
public int lpIDList;
public string lpClass;
public HANDLE hkeyClass;
public int dwHotKey;
public HANDLE hIcon;
public HANDLE hProcess;
}
public struct NOTIFYICONDATA
{
public int cbSize;
public HWND hwnd;
public int uID;
public int uFlags;
public int uCallbackMessage;
public HANDLE hIcon;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)] public string szTip;
}
public struct SHFILEINFO
{
public HANDLE hIcon;
public int iIcon;
public int dwAttributes;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = Kernel.MAX_PATH)] public string szDisplayName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)] public string szTypeName;
}
public abstract class Shell
{
[DllImport("shell32")] public static extern int CommandLineToArgv(string lpCmdLine, short pNumArgs);
[DllImport("shell32")] public static extern int DoEnvironmentSubst(string szString, int cbString);
[DllImport("shell32")] public static extern int DragQueryFile(HANDLE hDROP, int UINT, string lpStr, int ch);
[DllImport("shell32")] public static extern int DragQueryPoint(HANDLE hDROP, ref POINT lpPoint);
[DllImport("shell32")] public static extern int DuplicateIcon(HANDLE hInst, HANDLE hIcon);
[DllImport("shell32")] public static extern int ExtractAssociatedIcon(HANDLE hInst, string lpIconPath, ref int lpiIcon);
[DllImport("shell32")] public static extern int ExtractIcon(HANDLE hInst, string lpszExeFileName, int nIconIndex);
[DllImport("shell32")] public static extern int ExtractIconEx(string lpszFile, int nIconIndex, ref int phiconLarge, ref int phiconSmall, int nIcons);
[DllImport("shell32")] public static extern int FindExecutable(string lpFile, string lpDirectory, string lpResult);
[DllImport("shell32")] public static extern int SHAppBarMessage(int dwMessage, ref APPBARDATA pData);
[DllImport("shell32")] public static extern int SHFileOperation(ref SHFILEOPSTRUCT lpFileOp);
[DllImport("shell32")] public static extern int SHGetFileInfo(string pszPath, int dwFileAttributes, ref SHFILEINFO psfi, int cbFileInfo, int uFlags);
[DllImport("shell32")] public static extern int SHGetNewLinkInfo(string pszLinkto, string pszDir, string pszName, ref int pfMustCopy, int uFlags);
[DllImport("shell32")] public static extern int ShellAbout(HWND hwnd, string szApp, string szOtherStuff, HANDLE hIcon);
[DllImport("shell32")] public static extern int ShellExecute(HWND hwnd, string lpOperation, string lpFile, string lpParameters, string lpDirectory, int nShowCmd);
[DllImport("shell32")] public static extern int Shell_NotifyIcon(int dwMessage, ref NOTIFYICONDATA lpData);
[DllImport("shell32")] public static extern void DragAcceptFiles(HWND hwnd, int fAccept);
[DllImport("shell32")] public static extern void DragFinish(HANDLE hDrop);
[DllImport("shell32")] public static extern void SHFreeNameMappings(HANDLE hNameMappings);
[DllImport("shell32")] public static extern void WinExecError(HWND hwnd, int error, string lpstrFileName, string lpstrTitle);
[DllImport("shell32")] public static extern int SHBrowseForFolder(BROWSEINFO lpbi);
[DllImport("shell32")] public static extern int SHGetPathFromIDList(int pidList, string lpBuffer);
public const int ABE_BOTTOM = 3;
public const int ABE_LEFT = 0;
public const int ABE_RIGHT = 2;
public const int ABE_TOP = 1;
public const int ABM_ACTIVATE = 0x6;
public const int ABM_GETAUTOHIDEBAR = 0x7;
public const int ABM_GETSTATE = 0x4;
public const int ABM_GETTASKBARPOS = 0x5;
public const int ABM_NEW = 0x0;
public const int ABM_QUERYPOS = 0x2;
public const int ABM_REMOVE = 0x1;
public const int ABM_SETAUTOHIDEBAR = 0x8;
public const int ABM_SETPOS = 0x3;
public const int ABM_WINDOWPOSCHANGED = 0x9;
public const int ABN_FULLSCREENAPP = 0x2;
public const int ABN_POSCHANGED = 0x1;
public const int ABN_STATECHANGE = 0x0;
public const int ABN_WINDOWARRANGE = 0x3;
public const int ABS_ALWAYSONTOP = 0x2;
public const int ABS_AUTOHIDE = 0x1;
public const int EIRESID = -1;
public const int FOF_ALLOWUNDO = 0x40;
public const int FOF_CONFIRMMOUSE = 0x2;
public const int FOF_FILESONLY = 0x80;
public const int FOF_MULTIDESTFILES = 0x1;
public const int FOF_NOCONFIRMATION = 0x10;
public const int FOF_NOCONFIRMMKDIR = 0x200;
public const int FOF_RENAMEONCOLLISION = 0x8;
public const int FOF_SILENT = 0x4;
public const int FOF_SIMPLEPROGRESS = 0x100;
public const int FOF_WANTMAPPINGHANDLE = 0x20;
public const int FO_COPY = 0x2;
public const int FO_DELETE = 0x3;
public const int FO_MOVE = 0x1;
public const int FO_RENAME = 0x4;
public const int NIF_ICON = 0x2;
public const int NIF_MESSAGE = 0x1;
public const int NIF_TIP = 0x4;
public const int NIM_ADD = 0x0;
public const int NIM_DELETE = 0x2;
public const int NIM_MODIFY = 0x1;
public const int PO_DELETE = 0x13;
public const int PO_PORTCHANGE = 0x20;
public const int PO_RENAME = 0x14;
public const int PO_REN_PORT = 0x34;
public const int SEE_MASK_CLASSKEY = 0x3;
public const int SEE_MASK_CLASSNAME = 0x1;
public const int SEE_MASK_CONNECTNETDRV = 0x80;
public const int SEE_MASK_DOENVSUBST = 0x200;
public const int SEE_MASK_FLAG_DDEWAIT = 0x100;
public const int SEE_MASK_FLAG_NO_UI = 0x400;
public const int SEE_MASK_HOTKEY = 0x20;
public const int SEE_MASK_ICON = 0x10;
public const int SEE_MASK_IDLIST = 0x4;
public const int SEE_MASK_INVOKEIDLIST = 0xC;
public const int SEE_MASK_NOCLOSEPROCESS = 0x40;
public const int SE_ERR_ACCESSDENIED = 5;
public const int SE_ERR_ASSOCINCOMPLETE = 27;
public const int SE_ERR_DDEBUSY = 30;
public const int SE_ERR_DDEFAIL = 29;
public const int SE_ERR_DDETIMEOUT = 28;
public const int SE_ERR_DLLNOTFOUND = 32;
public const int SE_ERR_FNF = 2;
public const int SE_ERR_NOASSOC = 31;
public const int SE_ERR_OOM = 8;
public const int SE_ERR_PNF = 3;
public const int SE_ERR_SHARE = 26;
public const int SHGFI_ATTRIBUTES = 0x800;
public const int SHGFI_DISPLAYNAME = 0x200;
public const int SHGFI_EXETYPE = 0x2000;
public const int SHGFI_ICON = 0x100;
public const int SHGFI_ICONLOCATION = 0x1000;
public const int SHGFI_LARGEICON = 0x0;
public const int SHGFI_LINKOVERLAY = 0x8000;
public const int SHGFI_OPENICON = 0x2;
public const int SHGFI_PIDL = 0x8;
public const int SHGFI_SELECTED = 0x10000;
public const int SHGFI_SHELLICONSIZE = 0x4;
public const int SHGFI_SMALLICON = 0x1;
public const int SHGFI_SYSICONINDEX = 0x4000;
public const int SHGFI_TYPENAME = 0x400;
public const int SHGFI_USEFILEATTRIBUTES = 0x10;
public const int SHGNLI_PIDL = 0x1;
public const int SHGNLI_PREFIXNAME = 0x2;
}
}

2537
SunnyUI/Win32/Win32.User.cs Normal file

File diff suppressed because it is too large Load Diff

148
SunnyUI/Win32/Win32.cs Normal file
View File

@ -0,0 +1,148 @@
using System.Runtime.InteropServices;
namespace Sunny.UI.Win32
{
public struct RECT
{
public int Left;
public int Top;
public int Right;
public int Bottom;
public RECT(int aLeft, int aTop, int aRight, int aBottom)
{
Left = aLeft;
Top = aTop;
Right = aRight;
Bottom = aBottom;
}
public RECT(RECT aRect)
{
this.Left = aRect.Left;
this.Top = aRect.Top;
this.Right = aRect.Right;
this.Bottom = aRect.Bottom;
}
public POINT TopLeft()
{
return new POINT(Left, Top);
}
public POINT BottomRight()
{
return new POINT(Right, Bottom);
}
public void SetWidth(int value)
{
Right = Left + value;
}
public int Width
{
get { return Right - Left; }
set { SetWidth(value); }
}
public void SetHeight(int value)
{
Bottom = Top + value;
}
public int Height
{
get { return Bottom - Top; }
set { SetHeight(value); }
}
public void Offset(int x, int y)
{
Left += x;
Top += y;
Right += x;
Bottom += y;
}
public void Inflate(int x, int y)
{
Left -= x;
Right += x;
Top -= y;
Bottom += y;
}
public void SetEmpty()
{
Left = 0;
Top = 0;
Right = 0;
Bottom = 0;
}
public void ReSet(RECT rect)
{
Left = rect.Left;
Top = rect.Top;
Right = rect.Right;
Bottom = rect.Bottom;
}
public void ReSetBounds(int x, int y, int w, int h)
{
Left = x;
Top = y;
Right = x + w;
Bottom = y + h;
}
}
[StructLayout(LayoutKind.Sequential)]
public struct POINT
{
public int X;
public int Y;
public POINT(int ax, int ay)
{
X = ax;
Y = ay;
}
public void Offset(int x, int y)
{
X += x;
Y += y;
}
}
public struct SIZE
{
public int cx;
public int cy;
public SIZE(int x, int y)
{
cx = x;
cy = y;
}
}
public struct FILETIME
{
public int dwLowDateTime;
public int dwHighDateTime;
}
public struct SYSTEMTIME
{
public short wYear;
public short wMonth;
public short wDayOfWeek;
public short wDay;
public short wHour;
public short wMinute;
public short wSecond;
public short wMilliseconds;
}
}