123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656 |
- using System;
- using System.Collections.Generic;
- using System.Windows.Forms;
- using System.Threading;
- using System.Drawing;
- namespace PaintDotNet
- {
- class ProgressThreadProcClass
- {
- private IFileTransferProgressEvents progressEvent;
- private Thread progressThread;
- public static void AddOnceThread(Form win32Window, Delegate method)
- {
- ProgressThreadProcClass procClass = new ProgressThreadProcClass();
- int itemCount = 100;
- ProgressThreadProcClass.IFileTransferProgressEvents progressEvents = new ProgressThreadProcClass.IFileTransferProgressEvents();
- //System.Threading.ThreadStart threadStart = null;
- System.Threading.ThreadStart copyThreadProc =
- delegate ()
- {
- try
- {
- win32Window.Invoke(method);
- }
- catch (Exception)
- {
- }
- finally
- {
- progressEvents.EndOperation(OperationResult.Finished);
- }
- };
- procClass.StartProgressAction(/*currentForm*/win32Window, itemCount, copyThreadProc, progressEvents, null);
- }
- /// <summary>
- /// 进度条消失
- /// </summary>
- /// <param name="win32Window">控制进度条的form</param>
- public void DismissProgressAction(Form win32Window)
- {
- if (progressThread != null)
- {
- //progressThread.Abort();
- progressThread = null;
- }
- if (progressEvent != null)
- {
- progressEvent.EndOperation(OperationResult.Finished);
- progressEvent = null;
- }
- }
- /// <summary>
- /// 进度条方法-无具体进度
- /// </summary>
- /// <param name="win32Window">控制进度条的form</param>
- /// <param name="threadStart">可拷贝下面方法中的内容,将delegate改为具体运算过程的方法名</param>
- public void StartProgressAutoAction(Form win32Window, ThreadStart threadStart, string dialogText)
- {
- if (progressEvent != null)
- {
- progressEvent.EndOperation(OperationResult.Finished);
- progressEvent = null;
- }
- if (progressThread != null)
- {
- progressThread.Abort();
- progressThread = null;
- }
- int itemCount = 100;
- progressEvent = new IFileTransferProgressEvents();
- progressEvent.SetAutoWait(true);
- ThreadStart copyThreadProc =
- delegate ()
- {
- try
- {
- progressEvent.SetItemCount(itemCount);
- while (progressEvent != null)
- {
- for (int i = 0; i < itemCount; ++i)
- {
- Thread.Sleep(10);
- if (progressEvent != null)
- progressEvent.SetItemOrdinal(i);
- }
- if (progressEvent != null)
- Thread.Sleep(600);
- //Thread.SpinWait(600);
- }
- }
- catch
- {
- }
- finally
- {
- if (progressEvent != null)
- {
- progressEvent.EndOperation(OperationResult.Finished);
- progressEvent = null;
- }
- }
- };
- progressThread = new Thread(threadStart);
- progressThread.SetApartmentState(ApartmentState.STA);
- progressThread.Start();
- Thread copyThread = new Thread(copyThreadProc);
- copyThread.SetApartmentState(ApartmentState.STA);
- ////copyThread.IsBackground = true;
- //copyThread/*Thread.CurrentThread*/.Priority = ThreadPriority.BelowNormal/*AboveNormal*/;
- EventHandler onUIShown =
- delegate (object sender, EventArgs e)
- {
- copyThread.Start();
- };
- progressEvent.BeginOperation(win32Window, onUIShown, dialogText);
- copyThread.Join();
- copyThread.Abort();
- GC.KeepAlive(win32Window);
- }
- /// <summary>
- /// 进度条方法-有具体进度
- /// </summary>
- /// <param name="win32Window">弹出进度条的form</param>
- /// <param name="itemCount">进度条总进度,建议值为100或200</param>
- /// <param name="copyThreadProc">可拷贝下面方法中的内容,将Thread.Sleep(50)改为具体运算过程</param>
- public void StartProgressAction(Form win32Window, int itemCount, ThreadStart copyThreadProc, IFileTransferProgressEvents progressEvents, string dialogText)
- {
- if (itemCount > 0)
- {
- if (progressEvents == null)
- {
- progressEvent = new IFileTransferProgressEvents();
- }
- else
- progressEvent = progressEvents;
- if (copyThreadProc == null)
- copyThreadProc =
- delegate ()
- {
- try
- {
- progressEvent.SetItemCount(itemCount);
- for (int i = 0; i < itemCount; ++i)
- {
- Thread.Sleep(50);
- progressEvent.SetItemOrdinal(i);
- }
- }
- finally
- {
- progressEvent.EndOperation(OperationResult.Finished);
- }
- };
- Thread copyThread = new Thread(copyThreadProc);
- copyThread.SetApartmentState(ApartmentState.STA);
- EventHandler onUIShown =
- delegate (object sender, EventArgs e)
- {
- copyThread.Start();
- };
- progressEvent.BeginOperation(win32Window, onUIShown, dialogText);
- copyThread.Join();
- }
- GC.KeepAlive(win32Window);
- }
- /// <summary>
- /// 方法备份
- /// </summary>
- /// <param name="win32Window"></param>
- /// <param name="itemCount"></param>
- public void StartProgressActionCopy(Form win32Window, int itemCount/*, string[] items*/)
- {
- //int hr = NativeConstants.S_OK;
- //List<string> localPathNames = new List<string>();
- if (itemCount/*needLocalCopy.Count*/ > 0)
- {
- IFileTransferProgressEvents progressEvents = new IFileTransferProgressEvents();
- ThreadStart copyThreadProc =
- delegate ()
- {
- try
- {
- progressEvents.SetItemCount(itemCount);
- for (int i = 0; i < itemCount/*needLocalCopy.Count*/; ++i)
- {
- //NativeInterfaces.IShellItem item = needLocalCopy[i];
- progressEvents.SetItemOrdinal(i);
- //CopyResult result = CreateLocalCopy(item, progressEvents, out pathName);
- //if (result == CopyResult.Success)
- //{
- // localPathNames.Add(pathName);
- //}
- //else if (result == CopyResult.Skipped)
- //{
- // // do nothing
- //}
- //else if (result == CopyResult.CancelOperation)
- //{
- // hr = NativeConstants.S_FALSE;
- // break;
- //}
- //else
- //{
- // throw new InvalidEnumArgumentException();
- //}
- }
- }
- finally
- {
- OperationResult result = OperationResult.Finished;
- //if (hr == NativeConstants.S_OK)
- // result = OperationResult.Finished;
- //else
- // result = OperationResult.Canceled;
- progressEvents.EndOperation(result);
- }
- };
- Thread copyThread = new Thread(copyThreadProc);
- copyThread.SetApartmentState(ApartmentState.STA);
- EventHandler onUIShown =
- delegate (object sender, EventArgs e)
- {
- copyThread.Start();
- };
- //this.cancelSink = new CancelableTearOff();
- progressEvents.BeginOperation(win32Window, onUIShown/*, cancelSink*/, null);
- //this.cancelSink = null;
- copyThread.Join();
- //oleWindow = null;
- }
- //this.FileNames = localPathNames.ToArray();
- //items.Clear();
- //items = null;
- GC.KeepAlive(win32Window);
- //return hr;
- }
- #region 内部类
- public class IFileTransferProgressEvents
- {
- private TransferProgressDialog progressDialog;
- //private ICancelable cancelSink;
- private bool autoWait = false;
- private int itemCount = 0;
- private int itemOrdinal = 0;
- private string itemName = string.Empty;
- private long totalWork;
- private long totalProgress;
- private /*const */int maxPBValue = 100;//200; // granularity of progress bar. 100 means 1%, 200 means 0.5%, etc.
- //private bool cancelRequested = false;
- public void BeginOperation(Form/*IWin32Window*/ owner, EventHandler callWhenUIShown/*, ICancelable cancelSink*/, string dialogText)
- {
- if (this.progressDialog != null)
- {
- //throw new InvalidOperationException("Operation already in progress");
- return;
- }
- this.progressDialog = new TransferProgressDialog();
- this.progressDialog.lblTitleBackColor = Color.Transparent;
- this.progressDialog.Text = dialogText == null ? PdnResources.GetString("Menu.Isoperation.Text")/*"正在运算"*/ : dialogText;// PdnResources.GetString("DocumentWorkspace.ShowFileDialog.TransferProgress.Title");
- this.progressDialog.Icon = Utility.ImageToIcon(PdnResources.GetImageResource("Icons.MenuFileOpenIcon.png").Reference);
- //this.progressDialog.Title = PdnResources.GetString("DocumentWorkspace.ShowFileDialog.ItemText.Initializing");
- this.progressDialog.ProcessMsg = PdnResources.GetString("Menu.Operationisinprogresspleasewaitpatiently.Text");//#21198
- if (autoWait/* && this.progressDialog != null*/)
- this.progressDialog.ProgressBar.Style = ProgressBarStyle.Blocks;
- else
- this.progressDialog.ProgressBar.Style = ProgressBarStyle.Marquee;
- this.progressDialog.ProgressBar.Maximum = maxPBValue;
- this.progressDialog.CancelClicked +=
- delegate (object sender, EventArgs e)
- {
- //this.cancelRequested = true;
- //this.cancelSink.RequestCancel();
- //UpdateUI();
- };
- EventHandler progressDialog_Shown =
- delegate (object sender, EventArgs e)
- {
- callWhenUIShown(this, EventArgs.Empty);
- };
- this.progressDialog.CancelVisible = false;
- //this.cancelSink = cancelSink;
- this.itemOrdinal = 0;
- //this.cancelRequested = false;
- this.itemName = this.progressDialog.Text != null ? this.progressDialog.Text : string.Empty;
- this.itemCount = 0;
- this.itemOrdinal = 0;
- this.totalProgress = 0;
- this.totalWork = 0;
- this.progressDialog.Shown += progressDialog_Shown;
- if (owner != null)
- this.progressDialog.ShowDialog(owner);
- else
- this.progressDialog.Show();
- this.progressDialog.Shown -= progressDialog_Shown;
- this.progressDialog.CancelVisible = false;
- //this.progressDialog.Dispose();
- //this.progressDialog = null;
- //this.cancelSink = null;
- }
- public void SetAutoWait(bool autoWait)
- {
- this.autoWait = autoWait;
- if (autoWait && this.progressDialog != null)
- {
- this.progressDialog.ProcessMsg = PdnResources.GetString("Menu.Operationisinprogresspleasewaitpatiently.Text");//正在处理
- }
- }
- public void SetStringProgress(string itemCount)
- {
- if (this.progressDialog != null)
- {
- this.progressDialog.ProcessMsg = itemCount;
- }
- }
- public void SetItemCount(int itemCount)
- {
- if (this.progressDialog.InvokeRequired)
- {
- this.progressDialog.BeginInvoke(new Procedure<int>(SetItemCount), new object[] { itemCount });
- }
- else
- {
- this.itemCount = itemCount;
- this.maxPBValue = itemCount;
- this.progressDialog.ProgressBar.Maximum = maxPBValue;
- UpdateUI();
- }
- }
- public void SetItemOrdinal(int itemOrdinal)
- {
- if (this.progressDialog.InvokeRequired)
- {
- this.progressDialog.BeginInvoke(new Procedure<int>(SetItemOrdinal), new object[] { itemOrdinal });
- }
- else
- {
- this.itemOrdinal = itemOrdinal;
- this.totalWork = 0;
- this.totalProgress = 0;
- UpdateUI();
- }
- }
- public void SetItemInfo(string itemInfo)
- {
- if (this.progressDialog.InvokeRequired)
- {
- this.progressDialog.BeginInvoke(new Procedure<string>(SetItemInfo), new object[] { itemInfo });
- }
- else
- {
- this.itemName = itemInfo;
- UpdateUI();
- }
- }
- public void BeginItem()
- {
- if (this.progressDialog.InvokeRequired)
- {
- this.progressDialog.BeginInvoke(new Procedure(BeginItem), null);
- }
- else
- {
- this.progressDialog.ProgressBar.Style = ProgressBarStyle.Continuous;
- }
- }
- public void SetItemWorkTotal(long totalWork)
- {
- if (this.progressDialog.InvokeRequired)
- {
- this.progressDialog.BeginInvoke(new Procedure<long>(SetItemWorkTotal), new object[] { totalWork });
- }
- else
- {
- this.totalWork = totalWork;
- UpdateUI();
- }
- }
- public void SetItemWorkProgress(long totalProgress)
- {
- if (this.progressDialog.InvokeRequired)
- {
- this.progressDialog.BeginInvoke(new Procedure<long>(SetItemWorkProgress), new object[] { totalProgress });
- }
- else
- {
- this.totalProgress = totalProgress;
- UpdateUI();
- }
- }
- public void EndItem(WorkItemResult result)
- {
- if (this.progressDialog.InvokeRequired)
- {
- this.progressDialog.BeginInvoke(new Procedure<WorkItemResult>(EndItem), new object[] { result });
- }
- else
- {
- }
- }
- public void EndOperation(OperationResult result)
- {
- if (this.progressDialog.InvokeRequired)
- {
- this.progressDialog.BeginInvoke(new Procedure<OperationResult>(EndOperation), new object[] { result });
- }
- else
- {
- this.progressDialog.Close();
- }
- }
- public WorkItemFailureAction ReportItemFailure(Exception ex)
- {
- if (this.progressDialog.InvokeRequired)
- {
- object result = this.progressDialog.Invoke(
- new Function<WorkItemFailureAction, Exception>(ReportItemFailure),
- new object[] { ex });
- return (WorkItemFailureAction)result;
- }
- else
- {
- WorkItemFailureAction result;
- result = ShowFileTransferFailedDialog(ex);
- return result;
- }
- }
- private WorkItemFailureAction ShowFileTransferFailedDialog(Exception ex)
- {
- WorkItemFailureAction result;
- Icon formIcon = this.progressDialog.Icon;
- string formTitle = PdnResources.GetString("DocumentWorkspace.ShowFileDialog.ItemFailureDialog.Title");
- Image taskImage = PdnResources.GetImageResource("Icons.WarningIcon.png").Reference;
- string introTextFormat = PdnResources.GetString("DocumentWorkspace.ShowFileDialog.ItemFailureDialog.IntroText.Format");
- string introText = string.Format(introTextFormat, ex.Message);
- TaskButton retryTB = new TaskButton(
- PdnResources.GetImageResource("Icons.MenuImageRotate90CWIcon.png").Reference,
- PdnResources.GetString("DocumentWorkspace.ShowFileDialog.RetryTB.ActionText"),
- PdnResources.GetString("DocumentWorkspace.ShowFileDialog.RetryTB.ExplanationText"));
- TaskButton skipTB = new TaskButton(
- PdnResources.GetImageResource("Icons.HistoryFastForwardIcon.png").Reference,
- PdnResources.GetString("DocumentWorkspace.ShowFileDialog.SkipTB.ActionText"),
- PdnResources.GetString("DocumentWorkspace.ShowFileDialog.SkipTB.ExplanationText"));
- TaskButton cancelTB = new TaskButton(
- PdnResources.GetImageResource("Icons.CancelIcon.png").Reference,
- PdnResources.GetString("DocumentWorkspace.ShowFileDialog.CancelTB.ActionText"),
- PdnResources.GetString("DocumentWorkspace.ShowFileDialog.CancelTB.ExplanationText"));
- List<TaskButton> taskButtons = new List<TaskButton>();
- taskButtons.Add(retryTB);
- // Only have the Skip button if there is more than 1 item being transferred.
- // If only 1 item is begin transferred, Skip and Cancel are essentially synonymous.
- if (this.itemCount > 1)
- {
- taskButtons.Add(skipTB);
- }
- taskButtons.Add(cancelTB);
- int width96 = (TaskDialog.DefaultPixelWidth96Dpi * 4) / 3; // 33% wider
- TaskButton clickedTB = TaskDialog.Show(
- this.progressDialog,
- formIcon,
- formTitle,
- taskImage,
- true,
- introText,
- taskButtons.ToArray(),
- retryTB,
- cancelTB,
- width96,
- false,
- 0,
- out bool unuse);
- if (clickedTB == retryTB)
- {
- result = WorkItemFailureAction.RetryItem;
- }
- else if (clickedTB == skipTB)
- {
- result = WorkItemFailureAction.SkipItem;
- }
- else
- {
- result = WorkItemFailureAction.CancelOperation;
- }
- return result;
- }
- private void UpdateUI()
- {
- int itemCount2 = Math.Max(1, this.itemCount);
- double startValue = (double)this.itemOrdinal / (double)itemCount2;
- double endValue = (double)(this.itemOrdinal + 1) / (double)itemCount2;
- long totalWork2 = Math.Max(1, this.totalWork);
- double lerp = (double)this.totalProgress / (double)totalWork2;
- double newValue = Utility.Lerp(startValue, endValue, lerp);
- int newValueInt = (int)Math.Ceiling(maxPBValue * newValue);
- //if (this.cancelRequested)
- //{
- // this.progressDialog.CancelEnabled = false;
- // this.progressDialog.ItemText = PdnResources.GetString("DocumentWorkspace.ShowFileDialog.ItemText.Canceling");
- // this.progressDialog.OperationProgress = string.Empty;
- // this.progressDialog.ProgressBar.Style = ProgressBarStyle.Marquee;
- //}
- //else
- {
- //this.progressDialog.CancelEnabled = true;
- this.progressDialog.CancelVisible = false;
- this.progressDialog.Title = this.itemName;
- string progressFormat = PdnResources.GetString("DocumentWorkspace.ShowFileDialog.ProgressText.Format");
- if (this.autoWait)
- {
- this.progressDialog.ProcessMsg = PdnResources.GetString("Menu.Operationisinprogresspleasewaitpatiently.Text");//正在处理
- }
- else
- {
- string progressText = string.Format(progressFormat, Math.Min(this.itemOrdinal + 1, this.itemCount), this.itemCount);
- this.progressDialog.ProcessMsg = progressText;
- }
- this.progressDialog.ProgressBar.Style = ProgressBarStyle.Continuous;
- this.progressDialog.ProgressBar.Value = newValueInt;
- }
- }
- }
- internal static class NativeConstants
- {
- public const int MAX_PATH = 260;
- public const int CSIDL_DESKTOP_DIRECTORY = 0x0010; // C:\Users\[user]\Desktop\
- public const int CSIDL_MYPICTURES = 0x0027;
- public const int CSIDL_PERSONAL = 0x0005;
- public const int CSIDL_PROGRAM_FILES = 0x0026; // C:\Program Files\
- public const int CSIDL_APPDATA = 0x001a; // C:\Users\[user]\AppData\Roaming\
- public const int CSIDL_LOCAL_APPDATA = 0x001c; // C:\Users\[user]\AppData\Local\
- public const int CSIDL_COMMON_DESKTOPDIRECTORY = 0x0019; // C:\Users\All Users\Desktop
- public const int CSIDL_FLAG_CREATE = 0x8000; // new for Win2K, or this in to force creation of folder
- public const uint SHGFP_TYPE_CURRENT = 0;
- public const uint SHGFP_TYPE_DEFAULT = 1;
- public const int BP_COMMANDLINK = 6;
- public const int CMDLS_NORMAL = 1;
- public const int CMDLS_HOT = 2;
- public const int CMDLS_PRESSED = 3;
- public const int CMDLS_DISABLED = 4;
- public const int CMDLS_DEFAULTED = 5;
- public const int CMDLS_DEFAULTED_ANIMATING = 6;
- public enum SECURITY_IMPERSONATION_LEVEL
- {
- SecurityAnonymous = 0,
- SecurityIdentification = 1,
- SecurityImpersonation = 2,
- SecurityDelegation = 3
- }
- public enum TOKEN_TYPE
- {
- TokenPrimary = 1,
- TokenImpersonation = 2
- }
- public const uint TOKEN_ASSIGN_PRIMARY = 0x0001;
- public const uint TOKEN_DUPLICATE = 0x0002;
- public const uint TOKEN_IMPERSONATE = 0x0004;
- public const uint TOKEN_QUERY = 0x0008;
- public const uint TOKEN_QUERY_SOURCE = 0x0010;
- public const uint TOKEN_ADJUST_PRIVILEGES = 0x0020;
- public const uint TOKEN_ADJUST_GROUPS = 0x0040;
- public const uint TOKEN_ADJUST_DEFAULT = 0x0080;
- public const uint TOKEN_ADJUST_SESSIONID = 0x0100;
- public const uint TOKEN_ALL_ACCESS_P =
- STANDARD_RIGHTS_REQUIRED |
- TOKEN_ASSIGN_PRIMARY |
- TOKEN_DUPLICATE |
- TOKEN_IMPERSONATE |
- TOKEN_QUERY |
- TOKEN_QUERY_SOURCE |
- TOKEN_ADJUST_PRIVILEGES |
- TOKEN_ADJUST_GROUPS |
- TOKEN_ADJUST_DEFAULT;
- public const uint TOKEN_ALL_ACCESS = TOKEN_ALL_ACCESS_P | TOKEN_ADJUST_SESSIONID;
- public const uint TOKEN_READ = STANDARD_RIGHTS_READ | TOKEN_QUERY;
- public const uint TOKEN_WRITE = STANDARD_RIGHTS_WRITE | TOKEN_ADJUST_PRIVILEGES | TOKEN_ADJUST_GROUPS | TOKEN_ADJUST_DEFAULT;
- public const uint TOKEN_EXECUTE = STANDARD_RIGHTS_EXECUTE;
- public const uint MAXIMUM_ALLOWED = 0x02000000;
- public const uint PROCESS_TERMINATE = 0x0001;
- public const uint PROCESS_CREATE_THREAD = 0x0002;
- public const uint PROCESS_SET_SESSIONID = 0x0004;
- public const uint PROCESS_VM_OPERATION = 0x0008;
- public const uint PROCESS_VM_READ = 0x0010;
- public const uint PROCESS_VM_WRITE = 0x0020;
- public const uint PROCESS_DUP_HANDLE = 0x0040;
- public const uint PROCESS_CREATE_PROCESS = 0x0080;
- public const uint PROCESS_SET_QUOTA = 0x0100;
- public const uint PROCESS_SET_INFORMATION = 0x0200;
- public const uint PROCESS_QUERY_INFORMATION = 0x0400;
- public const uint PROCESS_SUSPEND_RESUME = 0x0800;
- public const uint PROCESS_QUERY_LIMITED_INFORMATION = 0x1000;
- public const uint PROCESS_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0xFFFF;
- public const uint PF_NX_ENABLED = 12;
- public const uint PF_XMMI_INSTRUCTIONS_AVAILABLE = 6;
- public const uint PF_XMMI64_INSTRUCTIONS_AVAILABLE = 10;
- public const uint PF_SSE3_INSTRUCTIONS_AVAILABLE = 13;
- public const uint CF_ENHMETAFILE = 14;
- public static Guid BHID_Stream
- {
- get
- {
- return new Guid(0x1cebb3ab, 0x7c10, 0x499a, 0xa4, 0x17, 0x92, 0xca, 0x16, 0xc4, 0xcb, 0x83);
- }
- }
- public const string IID_IOleWindow = "00000114-0000-0000-C000-000000000046";
- public const string IID_IModalWindow = "b4db1657-70d7-485e-8e3e-6fcb5a5c1802";
- public const string IID_IFileDialog = "42f85136-db7e-439c-85f1-e4075d135fc8";
- public const string IID_IFileOpenDialog = "d57c7288-d4ad-4768-be02-9d969532d960";
- public const string IID_IFileSaveDialog = "84bccd23-5fde-4cdb-aea4-af64b83d78ab";
- public const string IID_IFileDialogEvents = "973510DB-7D7F-452B-8975-74A85828D354";
- public const string IID_IFileDialogControlEvents = "36116642-D713-4b97-9B83-7484A9D00433";
- public const string IID_IFileDialogCustomize = "8016b7b3-3d49-4504-a0aa-2a37494e606f";
- public const string IID_IShellItem = "43826D1E-E718-42EE-BC55-A1E261C37BFE";
- public const string IID_IShellItemArray = "B63EA76D-1F85-456F-A19C-48159EFA858B";
- public const string IID_IKnownFolder = "38521333-6A87-46A7-AE10-0F16706816C3";
- public const string IID_IKnownFolderManager = "44BEAAEC-24F4-4E90-B3F0-23D258FBB146";
- public const string IID_IPropertyStore = "886D8EEB-8CF2-4446-8D02-CDBA1DBDCF99";
- public const string IID_ISequentialStream = "0c733a30-2a1c-11ce-ade5-00aa0044773d";
- public const string IID_IStream = "0000000C-0000-0000-C000-000000000046";
- public const string IID_IFileOperation = "947aab5f-0a5c-4c13-b4d6-4bf7836fc9f8";
- public const string IID_IFileOperationProgressSink = "04b0f1a7-9490-44bc-96e1-4296a31252e2";
- public const string CLSID_FileOpenDialog = "DC1C5A9C-E88A-4dde-A5A1-60F82A20AEF7";
- public const string CLSID_FileSaveDialog = "C0B4E2F3-BA21-4773-8DBA-335EC946EB8B";
- public const string CLSID_KnownFolderManager = "4df0c730-df9d-4ae3-9153-aa6b82e9795a";
- public const string CLSID_FileOperation = "3ad05575-8857-4850-9277-11b85bdb8e09";
- public enum FOF
- : uint
- {
- FOF_MULTIDESTFILES = 0x0001,
- FOF_CONFIRMMOUSE = 0x0002,
- FOF_SILENT = 0x0004, // don't display progress UI (confirm prompts may be displayed still)
- FOF_RENAMEONCOLLISION = 0x0008, // automatically rename the source files to avoid the collisions
- FOF_NOCONFIRMATION = 0x0010, // don't display confirmation UI, assume "yes" for cases that can be bypassed, "no" for those that can not
- FOF_WANTMAPPINGHANDLE = 0x0020, // Fill in SHFILEOPSTRUCT.hNameMappings
- // Must be freed using SHFreeNameMappings
- FOF_ALLOWUNDO = 0x0040, // enable undo including Recycle behavior for IFileOperation::Delete()
- FOF_FILESONLY = 0x0080, // only operate on the files (non folders), both files and folders are assumed without this
- FOF_SIMPLEPROGRESS = 0x0100, // means don't show names of files
- FOF_NOCONFIRMMKDIR = 0x0200, // don't dispplay confirmatino UI before making any needed directories, assume "Yes" in these cases
- FOF_NOERRORUI = 0x0400, // don't put up error UI, other UI may be displayed, progress, confirmations
- FOF_NOCOPYSECURITYATTRIBS = 0x0800, // dont copy file security attributes (ACLs)
- FOF_NORECURSION = 0x1000, // don't recurse into directories for operations that would recurse
- FOF_NO_CONNECTED_ELEMENTS = 0x2000, // don't operate on connected elements ("xxx_files" folders that go with .htm files)
- FOF_WANTNUKEWARNING = 0x4000, // during delete operation, warn if nuking instead of recycling (partially overrides FOF_NOCONFIRMATION)
- FOF_NORECURSEREPARSE = 0x8000, // deprecated; the operations engine always does the right thing on FolderLink objects (symlinks, reparse points, folder shortcuts)
- FOF_NO_UI = (FOF_SILENT | FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_NOCONFIRMMKDIR), // don't display any UI at all
- FOFX_NOSKIPJUNCTIONS = 0x00010000, // Don't avoid binding to junctions (like Task folder, Recycle-Bin)
- FOFX_PREFERHARDLINK = 0x00020000, // Create hard link if possible
- FOFX_SHOWELEVATIONPROMPT = 0x00040000, // Show elevation prompts when error UI is disabled (use with FOF_NOERRORUI)
- FOFX_EARLYFAILURE = 0x00100000, // Fail operation as soon as a single error occurs rather than trying to process other items (applies only when using FOF_NOERRORUI)
- FOFX_PRESERVEFILEEXTENSIONS = 0x00200000, // Rename collisions preserve file extns (use with FOF_RENAMEONCOLLISION)
- FOFX_KEEPNEWERFILE = 0x00400000, // Keep newer file on naming conflicts
- FOFX_NOCOPYHOOKS = 0x00800000, // Don't use copy hooks
- FOFX_NOMINIMIZEBOX = 0x01000000, // Don't allow minimizing the progress dialog
- FOFX_MOVEACLSACROSSVOLUMES = 0x02000000, // Copy security information when performing a cross-volume move operation
- FOFX_DONTDISPLAYSOURCEPATH = 0x04000000, // Don't display the path of source file in progress dialog
- FOFX_DONTDISPLAYDESTPATH = 0x08000000, // Don't display the path of destination file in progress dialog
- }
- public enum STATFLAG
- : uint
- {
- STATFLAG_DEFAULT = 0,
- STATFLAG_NONAME = 1,
- STATFLAG_NOOPEN = 2
- }
- public enum STGTY
- : uint
- {
- STGTY_STORAGE = 1,
- STGTY_STREAM = 2,
- STGTY_LOCKBYTES = 3,
- STGTY_PROPERTY = 4
- }
- [Flags]
- public enum STGC
- : uint
- {
- STGC_DEFAULT = 0,
- STGC_OVERWRITE = 1,
- STGC_ONLYIFCURRENT = 2,
- STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE = 4,
- STGC_CONSOLIDATE = 8
- }
- public enum CDCONTROLSTATE
- {
- CDCS_INACTIVE = 0x00000000,
- CDCS_ENABLED = 0x00000001,
- CDCS_VISIBLE = 0x00000002
- }
- public enum FFFP_MODE
- {
- FFFP_EXACTMATCH,
- FFFP_NEARESTPARENTMATCH
- }
- public enum SIATTRIBFLAGS
- {
- SIATTRIBFLAGS_AND = 0x00000001, // if multiple items and the attirbutes together.
- SIATTRIBFLAGS_OR = 0x00000002, // if multiple items or the attributes together.
- SIATTRIBFLAGS_APPCOMPAT = 0x00000003, // Call GetAttributes directly on the ShellFolder for multiple attributes
- }
- public enum SIGDN : uint
- {
- SIGDN_NORMALDISPLAY = 0x00000000, // SHGDN_NORMAL
- SIGDN_PARENTRELATIVEPARSING = 0x80018001, // SHGDN_INFOLDER | SHGDN_FORPARSING
- SIGDN_DESKTOPABSOLUTEPARSING = 0x80028000, // SHGDN_FORPARSING
- SIGDN_PARENTRELATIVEEDITING = 0x80031001, // SHGDN_INFOLDER | SHGDN_FOREDITING
- SIGDN_DESKTOPABSOLUTEEDITING = 0x8004c000, // SHGDN_FORPARSING | SHGDN_FORADDRESSBAR
- SIGDN_FILESYSPATH = 0x80058000, // SHGDN_FORPARSING
- SIGDN_URL = 0x80068000, // SHGDN_FORPARSING
- SIGDN_PARENTRELATIVEFORADDRESSBAR = 0x8007c001, // SHGDN_INFOLDER | SHGDN_FORPARSING | SHGDN_FORADDRESSBAR
- SIGDN_PARENTRELATIVE = 0x80080001 // SHGDN_INFOLDER
- }
- public const uint DROPEFFECT_COPY = 1;
- public const uint DROPEFFECT_MOVE = 2;
- public const uint DROPEFFECT_LINK = 4;
- [Flags]
- public enum SFGAO : uint
- {
- SFGAO_CANCOPY = DROPEFFECT_COPY, // Objects can be copied (0x1)
- SFGAO_CANMOVE = DROPEFFECT_MOVE, // Objects can be moved (0x2)
- SFGAO_CANLINK = DROPEFFECT_LINK, // Objects can be linked (0x4)
- SFGAO_STORAGE = 0x00000008, // supports BindToObject(IID_IStorage)
- SFGAO_CANRENAME = 0x00000010, // Objects can be renamed
- SFGAO_CANDELETE = 0x00000020, // Objects can be deleted
- SFGAO_HASPROPSHEET = 0x00000040, // Objects have property sheets
- SFGAO_DROPTARGET = 0x00000100, // Objects are drop target
- SFGAO_CAPABILITYMASK = 0x00000177,
- SFGAO_ENCRYPTED = 0x00002000, // Object is encrypted (use alt color)
- SFGAO_ISSLOW = 0x00004000, // 'Slow' object
- SFGAO_GHOSTED = 0x00008000, // Ghosted icon
- SFGAO_LINK = 0x00010000, // Shortcut (link)
- SFGAO_SHARE = 0x00020000, // Shared
- SFGAO_READONLY = 0x00040000, // Read-only
- SFGAO_HIDDEN = 0x00080000, // Hidden object
- SFGAO_DISPLAYATTRMASK = 0x000FC000,
- SFGAO_FILESYSANCESTOR = 0x10000000, // May contain children with SFGAO_FILESYSTEM
- SFGAO_FOLDER = 0x20000000, // Support BindToObject(IID_IShellFolder)
- SFGAO_FILESYSTEM = 0x40000000, // Is a win32 file system object (file/folder/root)
- SFGAO_HASSUBFOLDER = 0x80000000, // May contain children with SFGAO_FOLDER (may be slow)
- SFGAO_CONTENTSMASK = 0x80000000,
- SFGAO_VALIDATE = 0x01000000, // Invalidate cached information (may be slow)
- SFGAO_REMOVABLE = 0x02000000, // Is this removeable media?
- SFGAO_COMPRESSED = 0x04000000, // Object is compressed (use alt color)
- SFGAO_BROWSABLE = 0x08000000, // Supports IShellFolder, but only implements CreateViewObject() (non-folder view)
- SFGAO_NONENUMERATED = 0x00100000, // Is a non-enumerated object (should be hidden)
- SFGAO_NEWCONTENT = 0x00200000, // Should show bold in explorer tree
- SFGAO_STREAM = 0x00400000, // Supports BindToObject(IID_IStream)
- SFGAO_CANMONIKER = 0x00400000, // Obsolete
- SFGAO_HASSTORAGE = 0x00400000, // Obsolete
- SFGAO_STORAGEANCESTOR = 0x00800000, // May contain children with SFGAO_STORAGE or SFGAO_STREAM
- SFGAO_STORAGECAPMASK = 0x70C50008, // For determining storage capabilities, ie for open/save semantics
- SFGAO_PKEYSFGAOMASK = 0x81044010 // Attributes that are masked out for PKEY_SFGAOFlags because they are considered to cause slow calculations or lack context (SFGAO_VALIDATE | SFGAO_ISSLOW | SFGAO_HASSUBFOLDER and others)
- }
- public enum FDE_OVERWRITE_RESPONSE
- {
- FDEOR_DEFAULT = 0x00000000,
- FDEOR_ACCEPT = 0x00000001,
- FDEOR_REFUSE = 0x00000002
- }
- public enum FDE_SHAREVIOLATION_RESPONSE
- {
- FDESVR_DEFAULT = 0x00000000,
- FDESVR_ACCEPT = 0x00000001,
- FDESVR_REFUSE = 0x00000002
- }
- public enum FDAP
- {
- FDAP_BOTTOM = 0x00000000,
- FDAP_TOP = 0x00000001,
- }
- [Flags]
- public enum FOS : uint
- {
- FOS_OVERWRITEPROMPT = 0x00000002,
- FOS_STRICTFILETYPES = 0x00000004,
- FOS_NOCHANGEDIR = 0x00000008,
- FOS_PICKFOLDERS = 0x00000020,
- FOS_FORCEFILESYSTEM = 0x00000040, // Ensure that items returned are filesystem items.
- FOS_ALLNONSTORAGEITEMS = 0x00000080, // Allow choosing items that have no storage.
- FOS_NOVALIDATE = 0x00000100,
- FOS_ALLOWMULTISELECT = 0x00000200,
- FOS_PATHMUSTEXIST = 0x00000800,
- FOS_FILEMUSTEXIST = 0x00001000,
- FOS_CREATEPROMPT = 0x00002000,
- FOS_SHAREAWARE = 0x00004000,
- FOS_NOREADONLYRETURN = 0x00008000,
- FOS_NOTESTFILECREATE = 0x00010000,
- FOS_HIDEMRUPLACES = 0x00020000,
- FOS_HIDEPINNEDPLACES = 0x00040000,
- FOS_NODEREFERENCELINKS = 0x00100000,
- FOS_DONTADDTORECENT = 0x02000000,
- FOS_FORCESHOWHIDDEN = 0x10000000,
- FOS_DEFAULTNOMINIMODE = 0x20000000
- }
- public enum KF_CATEGORY
- {
- KF_CATEGORY_VIRTUAL = 0x00000001,
- KF_CATEGORY_FIXED = 0x00000002,
- KF_CATEGORY_COMMON = 0x00000003,
- KF_CATEGORY_PERUSER = 0x00000004
- }
- [Flags]
- public enum KF_DEFINITION_FLAGS
- {
- KFDF_PERSONALIZE = 0x00000001,
- KFDF_LOCAL_REDIRECT_ONLY = 0x00000002,
- KFDF_ROAMABLE = 0x00000004,
- }
- public const uint DWMWA_NCRENDERING_ENABLED = 1; // [get] Is non-client rendering enabled/disabled
- public const uint DWMWA_NCRENDERING_POLICY = 2; // [set] Non-client rendering policy
- public const uint DWMWA_TRANSITIONS_FORCEDISABLED = 3; // [set] Potentially enable/forcibly disable transitions
- public const uint DWMWA_ALLOW_NCPAINT = 4; // [set] Allow contents rendered in the non-client area to be visible on the DWM-drawn frame.
- public const uint DWMWA_CAPTION_BUTTON_BOUNDS = 5; // [get] Bounds of the caption button area in window-relative space.
- public const uint DWMWA_NONCLIENT_RTL_LAYOUT = 6; // [set] Is non-client content RTL mirrored
- public const uint DWMWA_FORCE_ICONIC_REPRESENTATION = 7; // [set] Force this window to display iconic thumbnails.
- public const uint DWMWA_FLIP3D_POLICY = 8; // [set] Designates how Flip3D will treat the window.
- public const uint DWMWA_EXTENDED_FRAME_BOUNDS = 9; // [get] Gets the extended frame bounds rectangle in screen space
- public const uint DWMWA_LAST = 10;
- public const uint DWMNCRP_USEWINDOWSTYLE = 0;
- public const uint DWMNCRP_DISABLED = 1;
- public const uint DWMNCRP_ENABLED = 2;
- public const uint DWMNCRP_LAST = 3;
- public const byte VER_EQUAL = 1;
- public const byte VER_GREATER = 2;
- public const byte VER_GREATER_EQUAL = 3;
- public const byte VER_LESS = 4;
- public const byte VER_LESS_EQUAL = 5;
- public const byte VER_AND = 6;
- public const byte VER_OR = 7;
- public const uint VER_CONDITION_MASK = 7;
- public const uint VER_NUM_BITS_PER_CONDITION_MASK = 3;
- public const uint VER_MINORVERSION = 0x0000001;
- public const uint VER_MAJORVERSION = 0x0000002;
- public const uint VER_BUILDNUMBER = 0x0000004;
- public const uint VER_PLATFORMID = 0x0000008;
- public const uint VER_SERVICEPACKMINOR = 0x0000010;
- public const uint VER_SERVICEPACKMAJOR = 0x0000020;
- public const uint VER_SUITENAME = 0x0000040;
- public const uint VER_PRODUCT_TYPE = 0x0000080;
- public const uint VER_PLATFORM_WIN32s = 0;
- public const uint VER_PLATFORM_WIN32_WINDOWS = 1;
- public const uint VER_PLATFORM_WIN32_NT = 2;
- public const int THREAD_MODE_BACKGROUND_BEGIN = 0x10000;
- public const int THREAD_MODE_BACKGROUND_END = 0x20000;
- private static uint CTL_CODE(uint deviceType, uint function, uint method, uint access)
- {
- return (deviceType << 16) | (access << 14) | (function << 2) | method;
- }
- public const uint FILE_DEVICE_FILE_SYSTEM = 0x00000009;
- public const uint METHOD_BUFFERED = 0;
- public static readonly uint FSCTL_SET_COMPRESSION =
- CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 16, METHOD_BUFFERED, FILE_READ_DATA | FILE_WRITE_DATA);
- public static ushort COMPRESSION_FORMAT_DEFAULT = 1;
- public const int SW_HIDE = 0;
- public const int SW_SHOWNORMAL = 1;
- public const int SW_NORMAL = 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 SW_SHOWDEFAULT = 10;
- public const int SW_FORCEMINIMIZE = 11;
- public const int SW_MAX = 11;
- public const uint MF_BYCOMMAND = 0;
- public const uint MF_GRAYED = 1;
- public const uint MF_DISABLED = 2;
- public const uint SC_CLOSE = 0xf060;
- public const uint SEE_MASK_CLASSNAME = 0x00000001;
- public const uint SEE_MASK_CLASSKEY = 0x00000003;
- public const uint SEE_MASK_IDLIST = 0x00000004;
- public const uint SEE_MASK_INVOKEIDLIST = 0x0000000c;
- public const uint SEE_MASK_ICON = 0x00000010;
- public const uint SEE_MASK_HOTKEY = 0x00000020;
- public const uint SEE_MASK_NOCLOSEPROCESS = 0x00000040;
- public const uint SEE_MASK_CONNECTNETDRV = 0x00000080;
- public const uint SEE_MASK_FLAG_DDEWAIT = 0x00000100;
- public const uint SEE_MASK_DOENVSUBST = 0x00000200;
- public const uint SEE_MASK_FLAG_NO_UI = 0x00000400;
- public const uint SEE_MASK_UNICODE = 0x00004000;
- public const uint SEE_MASK_NO_CONSOLE = 0x00008000;
- public const uint SEE_MASK_ASYNCOK = 0x00100000;
- public const uint SEE_MASK_HMONITOR = 0x00200000;
- public const uint SEE_MASK_NOZONECHECKS = 0x00800000;
- public const uint SEE_MASK_NOQUERYCLASSSTORE = 0x01000000;
- public const uint SEE_MASK_WAITFORINPUTIDLE = 0x02000000;
- public const uint SEE_MASK_FLAG_LOG_USAGE = 0x04000000;
- public const uint SHARD_PIDL = 0x00000001;
- public const uint SHARD_PATHA = 0x00000002;
- public const uint SHARD_PATHW = 0x00000003;
- public const uint VER_NT_WORKSTATION = 0x0000001;
- public const uint VER_NT_DOMAIN_CONTROLLER = 0x0000002;
- public const uint VER_NT_SERVER = 0x0000003;
- public const uint LWA_COLORKEY = 0x00000001;
- public const uint LWA_ALPHA = 0x00000002;
- public const uint WS_EX_LAYERED = 0x00080000;
- public const ushort PROCESSOR_ARCHITECTURE_INTEL = 0;
- public const ushort PROCESSOR_ARCHITECTURE_IA64 = 6;
- public const ushort PROCESSOR_ARCHITECTURE_AMD64 = 9;
- public const ushort PROCESSOR_ARCHITECTURE_UNKNOWN = 0xFFFF;
- public const uint SHVIEW_THUMBNAIL = 0x702d;
- public const uint MA_ACTIVATE = 1;
- public const uint MA_ACTIVATEANDEAT = 2;
- public const uint MA_NOACTIVATE = 3;
- public const uint MA_NOACTIVATEANDEAT = 4;
- public const uint IDI_APPLICATION = 32512;
- public const int ERROR_SUCCESS = 0;
- public const int ERROR_ALREADY_EXISTS = 183;
- public const int ERROR_CANCELLED = 1223;
- public const int ERROR_IO_PENDING = 0x3e5;
- public const int ERROR_NO_MORE_ITEMS = 259;
- public const int ERROR_TIMEOUT = 1460;
- public const uint DIGCF_PRESENT = 2;
- public const int GWL_STYLE = -16;
- public const int GWL_EXSTYLE = -20;
- public const int GWLP_WNDPROC = -4;
- public const int GWLP_HINSTANCE = -6;
- public const int GWLP_HWNDPARENT = -8;
- public const int GWLP_USERDATA = -21;
- public const int GWLP_ID = -12;
- public const uint PBS_SMOOTH = 0x01;
- public const uint PBS_MARQUEE = 0x08;
- public const int PBM_SETMARQUEE = WM_USER + 10;
- public const int SBM_SETPOS = 0x00E0;
- public const int SBM_SETRANGE = 0x00E2;
- public const int SBM_SETRANGEREDRAW = 0x00E6;
- public const int SBM_SETSCROLLINFO = 0x00E9;
- public const int BCM_FIRST = 0x1600;
- public const int BCM_SETSHIELD = BCM_FIRST + 0x000C;
- public const int CB_SHOWDROPDOWN = 0x014f;
- public const uint WM_COMMAND = 0x111;
- public const uint WM_MOUSEACTIVATE = 0x21;
- public const uint WM_COPYDATA = 0x004a;
- public const uint SMTO_NORMAL = 0x0000;
- public const uint SMTO_BLOCK = 0x0001;
- public const uint SMTO_ABORTIFHUNG = 0x0002;
- public const uint SMTO_NOTIMEOUTIFNOTHUNG = 0x0008;
- public const int WM_USER = 0x400;
- public const int WM_HSCROLL = 0x114;
- public const int WM_VSCROLL = 0x115;
- public const int WM_SETFOCUS = 7;
- public const int WM_QUERYENDSESSION = 0x0011;
- public const int WM_ACTIVATE = 0x006;
- public const int WM_ACTIVATEAPP = 0x01C;
- public const int WM_PAINT = 0x000f;
- public const int WM_NCPAINT = 0x0085;
- public const int WM_NCACTIVATE = 0x086;
- public const int WM_SETREDRAW = 0x000B;
- public const uint WS_VSCROLL = 0x00200000;
- public const uint WS_HSCROLL = 0x00100000;
- public const uint BS_MULTILINE = 0x00002000;
- public const uint ANSI_CHARSET = 0;
- public const uint DEFAULT_CHARSET = 1;
- public const uint SYMBOL_CHARSET = 2;
- public const uint SHIFTJIS_CHARSET = 128;
- public const uint HANGEUL_CHARSET = 129;
- public const uint HANGUL_CHARSET = 129;
- public const uint GB2312_CHARSET = 134;
- public const uint CHINESEBIG5_CHARSET = 136;
- public const uint OEM_CHARSET = 255;
- public const uint JOHAB_CHARSET = 130;
- public const uint HEBREW_CHARSET = 177;
- public const uint ARABIC_CHARSET = 178;
- public const uint GREEK_CHARSET = 161;
- public const uint TURKISH_CHARSET = 162;
- public const uint VIETNAMESE_CHARSET = 163;
- public const uint THAI_CHARSET = 222;
- public const uint EASTEUROPE_CHARSET = 238;
- public const uint RUSSIAN_CHARSET = 204;
- public const uint MAC_CHARSET = 77;
- public const uint BALTIC_CHARSET = 186;
- public const uint SPI_GETBEEP = 0x0001;
- public const uint SPI_SETBEEP = 0x0002;
- public const uint SPI_GETMOUSE = 0x0003;
- public const uint SPI_SETMOUSE = 0x0004;
- public const uint SPI_GETBORDER = 0x0005;
- public const uint SPI_SETBORDER = 0x0006;
- public const uint SPI_GETKEYBOARDSPEED = 0x000A;
- public const uint SPI_SETKEYBOARDSPEED = 0x000B;
- public const uint SPI_LANGDRIVER = 0x000C;
- public const uint SPI_ICONHORIZONTALSPACING = 0x000D;
- public const uint SPI_GETSCREENSAVETIMEOUT = 0x000E;
- public const uint SPI_SETSCREENSAVETIMEOUT = 0x000F;
- public const uint SPI_GETSCREENSAVEACTIVE = 0x0010;
- public const uint SPI_SETSCREENSAVEACTIVE = 0x0011;
- public const uint SPI_GETGRIDGRANULARITY = 0x0012;
- public const uint SPI_SETGRIDGRANULARITY = 0x0013;
- public const uint SPI_SETDESKWALLPAPER = 0x0014;
- public const uint SPI_SETDESKPATTERN = 0x0015;
- public const uint SPI_GETKEYBOARDDELAY = 0x0016;
- public const uint SPI_SETKEYBOARDDELAY = 0x0017;
- public const uint SPI_ICONVERTICALSPACING = 0x0018;
- public const uint SPI_GETICONTITLEWRAP = 0x0019;
- public const uint SPI_SETICONTITLEWRAP = 0x001A;
- public const uint SPI_GETMENUDROPALIGNMENT = 0x001B;
- public const uint SPI_SETMENUDROPALIGNMENT = 0x001C;
- public const uint SPI_SETDOUBLECLKWIDTH = 0x001D;
- public const uint SPI_SETDOUBLECLKHEIGHT = 0x001E;
- public const uint SPI_GETICONTITLELOGFONT = 0x001F;
- public const uint SPI_SETDOUBLECLICKTIME = 0x0020;
- public const uint SPI_SETMOUSEBUTTONSWAP = 0x0021;
- public const uint SPI_SETICONTITLELOGFONT = 0x0022;
- public const uint SPI_GETFASTTASKSWITCH = 0x0023;
- public const uint SPI_SETFASTTASKSWITCH = 0x0024;
- public const uint SPI_SETDRAGFULLWINDOWS = 0x0025;
- public const uint SPI_GETDRAGFULLWINDOWS = 0x0026;
- public const uint SPI_GETNONCLIENTMETRICS = 0x0029;
- public const uint SPI_SETNONCLIENTMETRICS = 0x002A;
- public const uint SPI_GETMINIMIZEDMETRICS = 0x002B;
- public const uint SPI_SETMINIMIZEDMETRICS = 0x002C;
- public const uint SPI_GETICONMETRICS = 0x002D;
- public const uint SPI_SETICONMETRICS = 0x002E;
- public const uint SPI_SETWORKAREA = 0x002F;
- public const uint SPI_GETWORKAREA = 0x0030;
- public const uint SPI_SETPENWINDOWS = 0x0031;
- public const uint SPI_GETHIGHCONTRAST = 0x0042;
- public const uint SPI_SETHIGHCONTRAST = 0x0043;
- public const uint SPI_GETKEYBOARDPREF = 0x0044;
- public const uint SPI_SETKEYBOARDPREF = 0x0045;
- public const uint SPI_GETSCREENREADER = 0x0046;
- public const uint SPI_SETSCREENREADER = 0x0047;
- public const uint SPI_GETANIMATION = 0x0048;
- public const uint SPI_SETANIMATION = 0x0049;
- public const uint SPI_GETFONTSMOOTHING = 0x004A;
- public const uint SPI_SETFONTSMOOTHING = 0x004B;
- public const uint SPI_SETDRAGWIDTH = 0x004C;
- public const uint SPI_SETDRAGHEIGHT = 0x004D;
- public const uint SPI_SETHANDHELD = 0x004E;
- public const uint SPI_GETLOWPOWERTIMEOUT = 0x004F;
- public const uint SPI_GETPOWEROFFTIMEOUT = 0x0050;
- public const uint SPI_SETLOWPOWERTIMEOUT = 0x0051;
- public const uint SPI_SETPOWEROFFTIMEOUT = 0x0052;
- public const uint SPI_GETLOWPOWERACTIVE = 0x0053;
- public const uint SPI_GETPOWEROFFACTIVE = 0x0054;
- public const uint SPI_SETLOWPOWERACTIVE = 0x0055;
- public const uint SPI_SETPOWEROFFACTIVE = 0x0056;
- public const uint SPI_SETCURSORS = 0x0057;
- public const uint SPI_SETICONS = 0x0058;
- public const uint SPI_GETDEFAULTINPUTLANG = 0x0059;
- public const uint SPI_SETDEFAULTINPUTLANG = 0x005A;
- public const uint SPI_SETLANGTOGGLE = 0x005B;
- public const uint SPI_GETWINDOWSEXTENSION = 0x005C;
- public const uint SPI_SETMOUSETRAILS = 0x005D;
- public const uint SPI_GETMOUSETRAILS = 0x005E;
- public const uint SPI_SETSCREENSAVERRUNNING = 0x0061;
- public const uint SPI_SCREENSAVERRUNNING = SPI_SETSCREENSAVERRUNNING;
- public const uint SPI_GETFILTERKEYS = 0x0032;
- public const uint SPI_SETFILTERKEYS = 0x0033;
- public const uint SPI_GETTOGGLEKEYS = 0x0034;
- public const uint SPI_SETTOGGLEKEYS = 0x0035;
- public const uint SPI_GETMOUSEKEYS = 0x0036;
- public const uint SPI_SETMOUSEKEYS = 0x0037;
- public const uint SPI_GETSHOWSOUNDS = 0x0038;
- public const uint SPI_SETSHOWSOUNDS = 0x0039;
- public const uint SPI_GETSTICKYKEYS = 0x003A;
- public const uint SPI_SETSTICKYKEYS = 0x003B;
- public const uint SPI_GETACCESSTIMEOUT = 0x003C;
- public const uint SPI_SETACCESSTIMEOUT = 0x003D;
- public const uint SPI_GETSERIALKEYS = 0x003E;
- public const uint SPI_SETSERIALKEYS = 0x003F;
- public const uint SPI_GETSOUNDSENTRY = 0x0040;
- public const uint SPI_SETSOUNDSENTRY = 0x0041;
- public const uint SPI_GETSNAPTODEFBUTTON = 0x005F;
- public const uint SPI_SETSNAPTODEFBUTTON = 0x0060;
- public const uint SPI_GETMOUSEHOVERWIDTH = 0x0062;
- public const uint SPI_SETMOUSEHOVERWIDTH = 0x0063;
- public const uint SPI_GETMOUSEHOVERHEIGHT = 0x0064;
- public const uint SPI_SETMOUSEHOVERHEIGHT = 0x0065;
- public const uint SPI_GETMOUSEHOVERTIME = 0x0066;
- public const uint SPI_SETMOUSEHOVERTIME = 0x0067;
- public const uint SPI_GETWHEELSCROLLLINES = 0x0068;
- public const uint SPI_SETWHEELSCROLLLINES = 0x0069;
- public const uint SPI_GETMENUSHOWDELAY = 0x006A;
- public const uint SPI_SETMENUSHOWDELAY = 0x006B;
- public const uint SPI_GETSHOWIMEUI = 0x006E;
- public const uint SPI_SETSHOWIMEUI = 0x006F;
- public const uint SPI_GETMOUSESPEED = 0x0070;
- public const uint SPI_SETMOUSESPEED = 0x0071;
- public const uint SPI_GETSCREENSAVERRUNNING = 0x0072;
- public const uint SPI_GETDESKWALLPAPER = 0x0073;
- public const uint SPI_GETACTIVEWINDOWTRACKING = 0x1000;
- public const uint SPI_SETACTIVEWINDOWTRACKING = 0x1001;
- public const uint SPI_GETMENUANIMATION = 0x1002;
- public const uint SPI_SETMENUANIMATION = 0x1003;
- public const uint SPI_GETCOMBOBOXANIMATION = 0x1004;
- public const uint SPI_SETCOMBOBOXANIMATION = 0x1005;
- public const uint SPI_GETLISTBOXSMOOTHSCROLLING = 0x1006;
- public const uint SPI_SETLISTBOXSMOOTHSCROLLING = 0x1007;
- public const uint SPI_GETGRADIENTCAPTIONS = 0x1008;
- public const uint SPI_SETGRADIENTCAPTIONS = 0x1009;
- public const uint SPI_GETKEYBOARDCUES = 0x100A;
- public const uint SPI_SETKEYBOARDCUES = 0x100B;
- public const uint SPI_GETMENUUNDERLINES = SPI_GETKEYBOARDCUES;
- public const uint SPI_SETMENUUNDERLINES = SPI_SETKEYBOARDCUES;
- public const uint SPI_GETACTIVEWNDTRKZORDER = 0x100C;
- public const uint SPI_SETACTIVEWNDTRKZORDER = 0x100D;
- public const uint SPI_GETHOTTRACKING = 0x100E;
- public const uint SPI_SETHOTTRACKING = 0x100F;
- public const uint SPI_GETMENUFADE = 0x1012;
- public const uint SPI_SETMENUFADE = 0x1013;
- public const uint SPI_GETSELECTIONFADE = 0x1014;
- public const uint SPI_SETSELECTIONFADE = 0x1015;
- public const uint SPI_GETTOOLTIPANIMATION = 0x1016;
- public const uint SPI_SETTOOLTIPANIMATION = 0x1017;
- public const uint SPI_GETTOOLTIPFADE = 0x1018;
- public const uint SPI_SETTOOLTIPFADE = 0x1019;
- public const uint SPI_GETCURSORSHADOW = 0x101A;
- public const uint SPI_SETCURSORSHADOW = 0x101B;
- public const uint SPI_GETMOUSESONAR = 0x101C;
- public const uint SPI_SETMOUSESONAR = 0x101D;
- public const uint SPI_GETMOUSECLICKLOCK = 0x101E;
- public const uint SPI_SETMOUSECLICKLOCK = 0x101F;
- public const uint SPI_GETMOUSEVANISH = 0x1020;
- public const uint SPI_SETMOUSEVANISH = 0x1021;
- public const uint SPI_GETFLATMENU = 0x1022;
- public const uint SPI_SETFLATMENU = 0x1023;
- public const uint SPI_GETDROPSHADOW = 0x1024;
- public const uint SPI_SETDROPSHADOW = 0x1025;
- public const uint SPI_GETBLOCKSENDINPUTRESETS = 0x1026;
- public const uint SPI_SETBLOCKSENDINPUTRESETS = 0x1027;
- public const uint SPI_GETUIEFFECTS = 0x103E;
- public const uint SPI_SETUIEFFECTS = 0x103F;
- public const uint SPI_GETFOREGROUNDLOCKTIMEOUT = 0x2000;
- public const uint SPI_SETFOREGROUNDLOCKTIMEOUT = 0x2001;
- public const uint SPI_GETACTIVEWNDTRKTIMEOUT = 0x2002;
- public const uint SPI_SETACTIVEWNDTRKTIMEOUT = 0x2003;
- public const uint SPI_GETFOREGROUNDFLASHCOUNT = 0x2004;
- public const uint SPI_SETFOREGROUNDFLASHCOUNT = 0x2005;
- public const uint SPI_GETCARETWIDTH = 0x2006;
- public const uint SPI_SETCARETWIDTH = 0x2007;
- public const uint SPI_GETMOUSECLICKLOCKTIME = 0x2008;
- public const uint SPI_SETMOUSECLICKLOCKTIME = 0x2009;
- public const uint SPI_GETFONTSMOOTHINGTYPE = 0x200A;
- public const uint SPI_SETFONTSMOOTHINGTYPE = 0x200B;
- public const uint SPI_GETFONTSMOOTHINGCONTRAST = 0x200C;
- public const uint SPI_SETFONTSMOOTHINGCONTRAST = 0x200D;
- public const uint SPI_GETFOCUSBORDERWIDTH = 0x200E;
- public const uint SPI_SETFOCUSBORDERWIDTH = 0x200F;
- public const uint SPI_GETFOCUSBORDERHEIGHT = 0x2010;
- public const uint SPI_SETFOCUSBORDERHEIGHT = 0x2011;
- public const uint SPI_GETFONTSMOOTHINGORIENTATION = 0x2012;
- public const uint SPI_SETFONTSMOOTHINGORIENTATION = 0x2013;
- public const uint INFINITE = 0xffffffff;
- public const uint STATUS_WAIT_0 = 0;
- public const uint STATUS_ABANDONED_WAIT_0 = 0x80;
- public const uint WAIT_FAILED = 0xffffffff;
- public const uint WAIT_TIMEOUT = 258;
- public const uint WAIT_ABANDONED = STATUS_ABANDONED_WAIT_0 + 0;
- public const uint WAIT_OBJECT_0 = STATUS_WAIT_0 + 0;
- public const uint WAIT_ABANDONED_0 = STATUS_ABANDONED_WAIT_0 + 0;
- public const uint STATUS_USER_APC = 0x000000C0;
- public const uint WAIT_IO_COMPLETION = STATUS_USER_APC;
- public const int SM_REMOTESESSION = 0x1000;
- public const int WM_WTSSESSION_CHANGE = 0x2b1;
- public const int WM_MOVING = 0x0216;
- public const uint NOTIFY_FOR_ALL_SESSIONS = 1;
- public const uint NOTIFY_FOR_THIS_SESSION = 0;
- public const int BP_PUSHBUTTON = 1;
- public const int PBS_NORMAL = 1;
- public const int PBS_HOT = 2;
- public const int PBS_PRESSED = 3;
- public const int PBS_DISABLED = 4;
- public const int PBS_DEFAULTED = 5;
- public const int PS_SOLID = 0;
- public const int PS_DASH = 1; /* ------- */
- public const int PS_DOT = 2; /* ....... */
- public const int PS_DASHDOT = 3; /* _._._._ */
- public const int PS_DASHDOTDOT = 4; /* _.._.._ */
- public const int PS_NULL = 5;
- public const int PS_INSIDEFRAME = 6;
- public const int PS_USERSTYLE = 7;
- public const int PS_ALTERNATE = 8;
- public const int PS_ENDCAP_ROUND = 0x00000000;
- public const int PS_ENDCAP_SQUARE = 0x00000100;
- public const int PS_ENDCAP_FLAT = 0x00000200;
- public const int PS_ENDCAP_MASK = 0x00000F00;
- public const int PS_JOIN_ROUND = 0x00000000;
- public const int PS_JOIN_BEVEL = 0x00001000;
- public const int PS_JOIN_MITER = 0x00002000;
- public const int PS_JOIN_MASK = 0x0000F000;
- public const int PS_COSMETIC = 0x00000000;
- public const int PS_GEOMETRIC = 0x00010000;
- public const int PS_TYPE_MASK = 0x000F0000;
- public const int BS_SOLID = 0;
- public const int BS_NULL = 1;
- public const int BS_HOLLOW = BS_NULL;
- public const int BS_HATCHED = 2;
- public const int BS_PATTERN = 3;
- public const int BS_INDEXED = 4;
- public const int BS_DIBPATTERN = 5;
- public const int BS_DIBPATTERNPT = 6;
- public const int BS_PATTERN8X8 = 7;
- public const int BS_DIBPATTERN8X8 = 8;
- public const int BS_MONOPATTERN = 9;
- public const uint SRCCOPY = 0x00CC0020; /* dest = source */
- public const uint SRCPAINT = 0x00EE0086; /* dest = source OR dest */
- public const uint SRCAND = 0x008800C6; /* dest = source AND dest */
- public const uint SRCINVERT = 0x00660046; /* dest = source XOR dest */
- public const uint SRCERASE = 0x00440328; /* dest = source AND (NOT dest ) */
- public const uint NOTSRCCOPY = 0x00330008; /* dest = (NOT source) */
- public const uint NOTSRCERASE = 0x001100A6; /* dest = (NOT src) AND (NOT dest) */
- public const uint MERGECOPY = 0x00C000CA; /* dest = (source AND pattern) */
- public const uint MERGEPAINT = 0x00BB0226; /* dest = (NOT source) OR dest */
- public const uint PATCOPY = 0x00F00021; /* dest = pattern */
- public const uint PATPAINT = 0x00FB0A09; /* dest = DPSnoo */
- public const uint PATINVERT = 0x005A0049; /* dest = pattern XOR dest */
- public const uint DSTINVERT = 0x00550009; /* dest = (NOT dest) */
- public const uint BLACKNESS = 0x00000042; /* dest = BLACK */
- public const uint WHITENESS = 0x00FF0062; /* dest = WHITE */
- public const uint NOMIRRORBITMAP = 0x80000000; /* Do not Mirror the bitmap in this call */
- public const uint CAPTUREBLT = 0x40000000; /* Include layered windows */
- // StretchBlt() Modes
- public const int BLACKONWHITE = 1;
- public const int WHITEONBLACK = 2;
- public const int COLORONCOLOR = 3;
- public const int HALFTONE = 4;
- public const int MAXSTRETCHBLTMODE = 4;
- public const int HeapCompatibilityInformation = 0;
- public const uint HEAP_NO_SERIALIZE = 0x00000001;
- public const uint HEAP_GROWABLE = 0x00000002;
- public const uint HEAP_GENERATE_EXCEPTIONS = 0x00000004;
- public const uint HEAP_ZERO_MEMORY = 0x00000008;
- public const uint HEAP_REALLOC_IN_PLACE_ONLY = 0x00000010;
- public const uint HEAP_TAIL_CHECKING_ENABLED = 0x00000020;
- public const uint HEAP_FREE_CHECKING_ENABLED = 0x00000040;
- public const uint HEAP_DISABLE_COALESCE_ON_FREE = 0x00000080;
- public const uint HEAP_CREATE_ALIGN_16 = 0x00010000;
- public const uint HEAP_CREATE_ENABLE_TRACING = 0x00020000;
- public const uint HEAP_MAXIMUM_TAG = 0x0FFF;
- public const uint HEAP_PSEUDO_TAG_FLAG = 0x8000;
- public const uint HEAP_TAG_SHIFT = 18;
- public const int SM_TABLETPC = 86;
- public const uint MONITOR_DEFAULTTONULL = 0x00000000;
- public const uint MONITOR_DEFAULTTOPRIMARY = 0x00000001;
- public const uint MONITOR_DEFAULTTONEAREST = 0x00000002;
- public const uint WTD_UI_ALL = 1;
- public const uint WTD_UI_NONE = 2;
- public const uint WTD_UI_NOBAD = 3;
- public const uint WTD_UI_NOGOOD = 4;
- public const uint WTD_REVOKE_NONE = 0;
- public const uint WTD_REVOKE_WHOLECHAIN = 1;
- public const uint WTD_CHOICE_FILE = 1;
- public const uint WTD_CHOICE_CATALOG = 2;
- public const uint WTD_CHOICE_BLOB = 3;
- public const uint WTD_CHOICE_SIGNER = 4;
- public const uint WTD_CHOICE_CERT = 5;
- public const uint WTD_STATEACTION_IGNORE = 0;
- public const uint WTD_STATEACTION_VERIFY = 1;
- public const uint WTD_STATEACTION_CLOSE = 2;
- public const uint WTD_STATEACTION_AUTO_CACHE = 3;
- public const uint WTD_STATEACTION_AUTO_CACHE_FLUSH = 4;
- public const uint WTD_PROV_FLAGS_MASK = 0x0000FFFF;
- public const uint WTD_USE_IE4_TRUST_FLAG = 0x00000001;
- public const uint WTD_NO_IE4_CHAIN_FLAG = 0x00000002;
- public const uint WTD_NO_POLICY_USAGE_FLAG = 0x00000004;
- public const uint WTD_REVOCATION_CHECK_NONE = 0x00000010;
- public const uint WTD_REVOCATION_CHECK_END_CERT = 0x00000020;
- public const uint WTD_REVOCATION_CHECK_CHAIN = 0x00000040;
- public const uint WTD_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT = 0x00000080;
- public const uint WTD_SAFER_FLAG = 0x00000100;
- public const uint WTD_HASH_ONLY_FLAG = 0x00000200;
- public const uint WTD_USE_DEFAULT_OSVER_CHECK = 0x00000400;
- public const uint WTD_LIFETIME_SIGNING_FLAG = 0x00000800;
- public const uint WTD_CACHE_ONLY_URL_RETRIEVAL = 0x00001000;
- public static Guid WINTRUST_ACTION_GENERIC_VERIFY_V2
- {
- get
- {
- return new Guid(0xaac56b, 0xcd44, 0x11d0, 0x8c, 0xc2, 0x0, 0xc0, 0x4f, 0xc2, 0x95, 0xee);
- }
- }
- public const uint FILE_SHARE_READ = 0x00000001;
- public const uint FILE_SHARE_WRITE = 0x00000002;
- public const uint FILE_SHARE_DELETE = 0x00000004;
- public const uint FILE_READ_DATA = 0x0001;
- public const uint FILE_LIST_DIRECTORY = 0x0001;
- public const uint FILE_WRITE_DATA = 0x0002;
- public const uint FILE_ADD_FILE = 0x0002;
- public const uint FILE_APPEND_DATA = 0x0004;
- public const uint FILE_ADD_SUBDIRECTORY = 0x0004;
- public const uint FILE_CREATE_PIPE_INSTANCE = 0x0004;
- public const uint FILE_READ_EA = 0x0008;
- public const uint FILE_WRITE_EA = 0x0010;
- public const uint FILE_EXECUTE = 0x0020;
- public const uint FILE_TRAVERSE = 0x0020;
- public const uint FILE_DELETE_CHILD = 0x0040;
- public const uint FILE_READ_ATTRIBUTES = 0x0080;
- public const uint FILE_WRITE_ATTRIBUTES = 0x0100;
- public const uint FILE_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x1FF);
- public const uint FILE_GENERIC_READ = (STANDARD_RIGHTS_READ | FILE_READ_DATA | FILE_READ_ATTRIBUTES | FILE_READ_EA | SYNCHRONIZE);
- public const uint FILE_GENERIC_WRITE = (STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA | FILE_APPEND_DATA | SYNCHRONIZE);
- public const uint FILE_GENERIC_EXECUTE = (STANDARD_RIGHTS_EXECUTE | FILE_READ_ATTRIBUTES | FILE_EXECUTE | SYNCHRONIZE);
- public const uint READ_CONTROL = 0x00020000;
- public const uint SYNCHRONIZE = 0x00100000;
- public const uint STANDARD_RIGHTS_READ = READ_CONTROL;
- public const uint STANDARD_RIGHTS_WRITE = READ_CONTROL;
- public const uint STANDARD_RIGHTS_EXECUTE = READ_CONTROL;
- public const uint STANDARD_RIGHTS_REQUIRED = 0x000F0000;
- public const uint GENERIC_READ = 0x80000000;
- public const uint GENERIC_WRITE = 0x40000000;
- public const uint GENERIC_EXECUTE = 0x20000000;
- public const uint CREATE_NEW = 1;
- public const uint CREATE_ALWAYS = 2;
- public const uint OPEN_EXISTING = 3;
- public const uint OPEN_ALWAYS = 4;
- public const uint TRUNCATE_EXISTING = 5;
- public const uint FILE_ATTRIBUTE_READONLY = 0x00000001;
- public const uint FILE_ATTRIBUTE_HIDDEN = 0x00000002;
- public const uint FILE_ATTRIBUTE_SYSTEM = 0x00000004;
- public const uint FILE_ATTRIBUTE_DIRECTORY = 0x00000010;
- public const uint FILE_ATTRIBUTE_ARCHIVE = 0x00000020;
- public const uint FILE_ATTRIBUTE_DEVICE = 0x00000040;
- public const uint FILE_ATTRIBUTE_NORMAL = 0x00000080;
- public const uint FILE_ATTRIBUTE_TEMPORARY = 0x00000100;
- public const uint FILE_ATTRIBUTE_SPARSE_FILE = 0x00000200;
- public const uint FILE_ATTRIBUTE_REPARSE_POINT = 0x00000400;
- public const uint FILE_ATTRIBUTE_COMPRESSED = 0x00000800;
- public const uint FILE_ATTRIBUTE_OFFLINE = 0x00001000;
- public const uint FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = 0x00002000;
- public const uint FILE_ATTRIBUTE_ENCRYPTED = 0x00004000;
- public const uint FILE_FLAG_WRITE_THROUGH = 0x80000000;
- public const uint FILE_FLAG_OVERLAPPED = 0x40000000;
- public const uint FILE_FLAG_NO_BUFFERING = 0x20000000;
- public const uint FILE_FLAG_RANDOM_ACCESS = 0x10000000;
- public const uint FILE_FLAG_SEQUENTIAL_SCAN = 0x08000000;
- public const uint FILE_FLAG_DELETE_ON_CLOSE = 0x04000000;
- public const uint FILE_FLAG_BACKUP_SEMANTICS = 0x02000000;
- public const uint FILE_FLAG_POSIX_SEMANTICS = 0x01000000;
- public const uint FILE_FLAG_OPEN_REPARSE_POINT = 0x00200000;
- public const uint FILE_FLAG_OPEN_NO_RECALL = 0x00100000;
- public const uint FILE_FLAG_FIRST_PIPE_INSTANCE = 0x00080000;
- public const uint FILE_BEGIN = 0;
- public const uint FILE_CURRENT = 1;
- public const uint FILE_END = 2;
- public static readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1);
- public const uint HANDLE_FLAG_INHERIT = 0x1;
- public const uint HANDLE_FLAG_PROTECT_FROM_CLOSE = 0x2;
- public const uint MEM_COMMIT = 0x1000;
- public const uint MEM_RESERVE = 0x2000;
- public const uint MEM_DECOMMIT = 0x4000;
- public const uint MEM_RELEASE = 0x8000;
- public const uint MEM_RESET = 0x80000;
- public const uint MEM_TOP_DOWN = 0x100000;
- public const uint MEM_PHYSICAL = 0x400000;
- public const uint PAGE_NOACCESS = 0x01;
- public const uint PAGE_READONLY = 0x02;
- public const uint PAGE_READWRITE = 0x04;
- public const uint PAGE_WRITECOPY = 0x08;
- public const uint PAGE_EXECUTE = 0x10;
- public const uint PAGE_EXECUTE_READ = 0x20;
- public const uint PAGE_EXECUTE_READWRITE = 0x40;
- public const uint PAGE_EXECUTE_WRITECOPY = 0x80;
- public const uint PAGE_GUARD = 0x100;
- public const uint PAGE_NOCACHE = 0x200;
- public const uint PAGE_WRITECOMBINE = 0x400;
- public const uint SEC_IMAGE = 0x1000000;
- public const uint SEC_RESERVE = 0x4000000;
- public const uint SEC_COMMIT = 0x8000000;
- public const uint SEC_NOCACHE = 0x10000000;
- public const uint SECTION_QUERY = 0x0001;
- public const uint SECTION_MAP_WRITE = 0x0002;
- public const uint SECTION_MAP_READ = 0x0004;
- public const uint SECTION_MAP_EXECUTE_EXPLICIT = 0x0020;
- public const uint FILE_MAP_COPY = SECTION_QUERY;
- public const uint FILE_MAP_WRITE = SECTION_MAP_WRITE;
- public const uint FILE_MAP_READ = SECTION_MAP_READ;
- public const uint FILE_MAP_EXECUTE = SECTION_MAP_EXECUTE_EXPLICIT;
- public const uint GMEM_FIXED = 0x0000;
- public const uint GMEM_MOVEABLE = 0x0002;
- public const uint GMEM_ZEROINIT = 0x0040;
- public const uint GHND = 0x0042;
- public const uint GPTR = 0x0040;
- public const uint DIB_RGB_COLORS = 0; /* color table in RGBs */
- public const uint DIB_PAL_COLORS = 1; /* color table in palette indices */
- public const uint BI_RGB = 0;
- public const uint BI_RLE8 = 1;
- public const uint BI_RLE4 = 2;
- public const uint BI_BITFIELDS = 3;
- public const uint BI_JPEG = 4;
- public const uint BI_PNG = 5;
- public const uint DT_TOP = 0x00000000;
- public const uint DT_LEFT = 0x00000000;
- public const uint DT_CENTER = 0x00000001;
- public const uint DT_RIGHT = 0x00000002;
- public const uint DT_VCENTER = 0x00000004;
- public const uint DT_BOTTOM = 0x00000008;
- public const uint DT_WORDBREAK = 0x00000010;
- public const uint DT_SINGLELINE = 0x00000020;
- public const uint DT_EXPANDTABS = 0x00000040;
- public const uint DT_TABSTOP = 0x00000080;
- public const uint DT_NOCLIP = 0x00000100;
- public const uint DT_EXTERNALLEADING = 0x00000200;
- public const uint DT_CALCRECT = 0x00000400;
- public const uint DT_NOPREFIX = 0x00000800;
- public const uint DT_public = 0x00001000;
- public const uint DT_EDITCONTROL = 0x00002000;
- public const uint DT_PATH_ELLIPSIS = 0x00004000;
- public const uint DT_END_ELLIPSIS = 0x00008000;
- public const uint DT_MODIFYSTRING = 0x00010000;
- public const uint DT_RTLREADING = 0x00020000;
- public const uint DT_WORD_ELLIPSIS = 0x00040000;
- public const uint DT_NOFULLWIDTHCHARBREAK = 0x00080000;
- public const uint DT_HIDEPREFIX = 0x00100000;
- public const uint DT_PREFIXONLY = 0x00200000;
- public const uint FW_DONTCARE = 0;
- public const uint FW_THIN = 100;
- public const uint FW_EXTRALIGHT = 200;
- public const uint FW_LIGHT = 300;
- public const uint FW_NORMAL = 400;
- public const uint FW_MEDIUM = 500;
- public const uint FW_SEMIBOLD = 600;
- public const uint FW_BOLD = 700;
- public const uint FW_EXTRABOLD = 800;
- public const uint FW_HEAVY = 900;
- public const uint OUT_DEFAULT_PRECIS = 0;
- public const uint OUT_STRING_PRECIS = 1;
- public const uint OUT_CHARACTER_PRECIS = 2;
- public const uint OUT_STROKE_PRECIS = 3;
- public const uint OUT_TT_PRECIS = 4;
- public const uint OUT_DEVICE_PRECIS = 5;
- public const uint OUT_RASTER_PRECIS = 6;
- public const uint OUT_TT_ONLY_PRECIS = 7;
- public const uint OUT_OUTLINE_PRECIS = 8;
- public const uint OUT_SCREEN_OUTLINE_PRECIS = 9;
- public const uint OUT_PS_ONLY_PRECIS = 10;
- public const uint CLIP_DEFAULT_PRECIS = 0;
- public const uint CLIP_CHARACTER_PRECIS = 1;
- public const uint CLIP_STROKE_PRECIS = 2;
- public const uint CLIP_MASK = 0xf;
- public const uint CLIP_LH_ANGLES = (1 << 4);
- public const uint CLIP_TT_ALWAYS = (2 << 4);
- public const uint CLIP_EMBEDDED = (8 << 4);
- public const uint DEFAULT_QUALITY = 0;
- public const uint DRAFT_QUALITY = 1;
- public const uint PROOF_QUALITY = 2;
- public const uint NONANTIALIASED_QUALITY = 3;
- public const uint ANTIALIASED_QUALITY = 4;
- public const uint CLEARTYPE_QUALITY = 5;
- public const uint CLEARTYPE_NATURAL_QUALITY = 6;
- public const uint DEFAULT_PITCH = 0;
- public const uint FIXED_PITCH = 1;
- public const uint VARIABLE_PITCH = 2;
- public const uint MONO_FONT = 8;
- public const uint FF_DONTCARE = (0 << 4);
- public const uint FF_ROMAN = (1 << 4);
- public const uint FF_SWISS = (2 << 4);
- public const uint FF_MODERN = (3 << 4);
- public const uint FF_SCRIPT = (4 << 4);
- public const uint FF_DECORATIVE = (5 << 4);
- public const int SB_HORZ = 0;
- public const int SB_VERT = 1;
- public const int S_OK = 0;
- public const int S_FALSE = 1;
- public const int E_NOTIMPL = unchecked((int)0x80004001);
- }
- #endregion
- }
- }
|